Logs on 2021-12-14 (liberachat/#haskell)
| 00:01:33 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 00:04:48 | <monochrom> | In eager languages, you can recover half of laziness (the delaying half, but not the memoizing half) by putting the burden on the user. |
| 00:05:01 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 00:05:59 | <monochrom> | You can define "f' x y z = if x>0 then y() else z()", now the user has to write like "f' r (\_ -> 1/r) (\_ -> r*2)" instead of "f r (1/r) (r*2)" |
| 00:05:59 | <dsal> | promise is the memoizing bit, right? |
| 00:06:07 | <monochrom> | I don't know promise. |
| 00:06:37 | <dsal> | https://srfi.schemers.org/srfi-155/srfi-155.html |
| 00:06:58 | <dsal> | you explicitly "delay" to get a promise which can later be "force"d |
| 00:06:59 | <monochrom> | I tried to do that in anger when teaching a course that taught that in Racket Scheme. It got old and error prone and painful very quickly. |
| 00:06:59 | <hpc> | usually the memoizing bit is "put it in redis and be very careful how you access it" in practice |
| 00:08:07 | <hpc> | dsal: that's more about side effects than memoizing i thought |
| 00:08:29 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 00:08:32 | <hpc> | so you could reorder IO or potentially not do it at all |
| 00:08:39 | <hpc> | like very manual unsafeInterleaveIO |
| 00:09:30 | <monochrom> | And Lawrence Paulson agrees. In his SML textbook, he also teaches that technique, then finally concedes "this kind of thing is better in Haskell". |
| 00:12:09 | <snake> | besides a tuple and a list are there any other data structures that are like front-line options that aren't like libraries etc |
| 00:12:36 | × | madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 00:13:45 | <geekosaur> | I think they're the only wired-in ones. And lists wouldn't be wired-in were it not for the [x,y,z] syntax (as opposed to x:y:z:[]) |
| 00:14:13 | <dsal> | snake: Is there a reason you're looking for "not in libraries"? |
| 00:14:26 | <dsal> | There are some really common ones you'll see from external libraries. |
| 00:14:47 | <snake> | nah i still have no idea what i'm going ngl |
| 00:15:03 | <monochrom> | x:xs is also wired-in syntax. You cannot do your own "import Prelude hiding ((:)); data F a = Nil | Int : F a" |
| 00:15:13 | <dsal> | snake: you won't write much real world code without https://hackage.haskell.org/package/containers |
| 00:15:19 | <glguy> | number literals, string literals, character literals... |
| 00:15:28 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:15:28 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 00:15:28 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:15:30 | <snake> | ooh |
| 00:15:53 | <snake> | thankyou |
| 00:16:01 | <monochrom> | Then again Integer is usually not considered "data structure". :) |
| 00:16:27 | <dsal> | Integer is a fine data structure with a few functions applied. |
| 00:16:38 | <dsal> | I made an Integer-backed BitSet a few days ago. |
| 00:17:04 | <geekosaur> | unordered-containers is also pretty useful |
| 00:17:28 | <energizer> | https://reasonablypolymorphic.com/blog/higher-kinded-data/ where it says `data Person' f = Person`, does that define `Person` to be something? |
| 00:17:28 | <dsal> | I don't use unordered-containers much. Too much chaos. |
| 00:17:48 | <dsal> | energizer: Looks like Person is a data constructor. |
| 00:18:12 | <geekosaur> | with a phantom type parameter |
| 00:18:16 | <dsal> | Oh, it's a record. You have to look at the next lines. |
| 00:18:26 | <geekosaur> | oh |
| 00:18:44 | <energizer> | yeah sorry didnt know how to typeset that nicely in here :) |
| 00:19:36 | <geekosaur> | better to use a pastebin |
| 00:19:39 | <geekosaur> | @where paste |
| 00:19:39 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 00:19:57 | <energizer> | well i already linked the code i'm talking about |
| 00:21:42 | <geekosaur> | yeh |
| 00:22:19 | → | Guest19 joins (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) |
| 00:22:42 | × | Guest19 quits (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) (Client Quit) |
| 00:23:25 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:23:25 | <energizer> | does Person have to be defined before that? |
| 00:24:09 | <dsal> | What do you mean? That's where Person is defined. |
| 00:24:11 | <hpc> | Person is the data constructor |
| 00:24:17 | <hpc> | Person' is like Bool, Person is like True |
| 00:24:24 | <dsal> | Heh, I was about to use that example. |
| 00:24:25 | <geekosaur> | I think they're asking about the original definition |
| 00:24:29 | <hpc> | data Bool = False | True -- defines all three of those things |
| 00:24:33 | → | alx741 joins (~alx741@157.100.93.160) |
| 00:24:36 | <energizer> | i tried https://bpa.st/7ORA and ghc didn't complain |
| 00:24:45 | <geekosaur> | and the answer is no, you need neither Person nor MaybePerson |
| 00:24:51 | <energizer> | but i dont get how it's defining both Person' and Person in the same line |
| 00:25:01 | <geekosaur> | hpc showed you |
| 00:25:17 | <geekosaur> | Person' is a type constructor. Person is the corresponding data constructor |
| 00:25:42 | <energizer> | ok |
| 00:26:14 | <hpc> | maybe it would be easier to see in GADTSyntax? |
| 00:26:17 | <hpc> | data Person' f where |
| 00:26:22 | <hpc> | Person :: Person' f |
| 00:26:40 | <geekosaur> | well, you're missing the record part |
| 00:26:49 | <hpc> | oh, i didn't click the link :P |
| 00:27:12 | <energizer> | `data Colour = Red | Green | Blue` clears it up |
| 00:27:16 | <hpc> | pretend i remember how to write records in GADTSyntax |
| 00:28:11 | → | BrokenClutch joins (~pioneer@2804:d41:c2b2:be00:da32:623d:efa3:7121) |
| 00:28:29 | <mdrake> | that is kind of neat how you can have record with partial fields without having the boilerplate of defining two types |
| 00:29:06 | × | mmhat quits (~mmh@55d455f3.access.ecotel.net) (Quit: WeeChat 3.3) |
| 00:29:26 | <dsal> | I feel like that's mostly a way to write bugs. |
| 00:29:54 | <energizer> | i thought it was cool too, can you explain dsal |
| 00:30:24 | <dsal> | If you have a sum type with records, what does an accessor do that's defined for only one of the branches? |
| 00:30:40 | → | d34df00d joins (~d34df00d@2600:1700:8c60:3a10::48) |
| 00:30:48 | <d34df00d> | Hi! |
| 00:30:57 | <geekosaur> | um? I didn't see it doing that |
| 00:31:04 | <d34df00d> | I just wrote a function of type unsafeShrink :: A.STUArray s Int e -> Int -> A.STUArray s Int e |
| 00:31:06 | <BrokenClutch> | d34df00d hi |
| 00:31:14 | <mdrake> | yeah I'm not sure what you're talking about dsal |
| 00:31:21 | <dmj`> | > do { x@2 <- [1,2,3,2,3]; pure x } |
| 00:31:21 | <d34df00d> | with the implementation unsafeShrink arr@(A.STUArray l _ n marr) cnt = if cnt >= n then arr else A.STUArray l (l + cnt - 1) cnt marr |
| 00:31:23 | <lambdabot> | [2,2] |
| 00:31:24 | <d34df00d> | How bad should I feel? |
| 00:31:33 | <geekosaur> | possibly making an assumption about "partial fields"? |
| 00:31:45 | <mdrake> | good guess |
| 00:32:06 | × | boxscape_ quits (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Quit: Connection closed) |
| 00:32:24 | <dsal> | I meant doing things like this: data S = A { someA :: Int } | B { someB :: Int} |
| 00:32:32 | <mdrake> | dsal, I was talking about this: https://reasonablypolymorphic.com/blog/higher-kinded-data/ |
| 00:32:46 | <dsal> | Yeah, I guess I didn't understand what you meant by "partial fields" |
| 00:33:24 | <geekosaur> | I thought it was a peculiar way of saying what they intended, since that does normally have the meaning you assumed |
| 00:33:52 | <mdrake> | that's probably true. I just assumed everyone knew the context |
| 00:35:09 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Quit: Leaving...) |
| 00:35:10 | <mdrake> | partial, as in data could be missing (it could be Nothing). not sure what would be the better way of phrasing it |
| 00:35:33 | <mdrake> | s/data/field |
| 00:35:34 | <geekosaur> | (possibly) incomplete? |
| 00:40:32 | → | mvk joins (~mvk@2607:fea8:5cdd:f000::9788) |
| 00:42:10 | <mdrake> | yeah that's probably better |
| 00:43:04 | → | meinside joins (uid24933@id-24933.helmsley.irccloud.com) |
| 00:43:19 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 00:44:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:45:18 | <energizer> | not sure if this question makes sense. how can you distinguish between instances of the Identity case, which has `= a`, and other instances, which have `= f a`? it's possible that the `a` in the first case could also be an instance of `f _` |
| 00:46:43 | <geekosaur> | do you mean in the definition of HKD? |
| 00:48:11 | <monochrom> | This is a closed type family. If you go to the GHC user's guide and look for "closed type families", it is well explained there. |
| 00:49:33 | <geekosaur> | closed and non-injective, meaning that it can only ever be used in the direction HKD type1 type2 -> type1 type2 or HKD Identity type2 -> type2 |
| 00:49:36 | <energizer> | i mean after HKD is applied `HKD (Identity (foo bar))` or `HKD (foo bar)`, how do i know if i have the left case or thr right case |
| 00:50:00 | × | raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 00:50:16 | <monochrom> | That question is answered in the doc I referred to. |
| 00:50:59 | <energizer> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/type_families.html#closed-type-families |
| 00:52:08 | <geekosaur> | not sure I'd recommend that link as it's for ghc HEAD and sometimes things will be different there. https://downloads.haskell.org/ghc/latest/docs/html/users_guide/index.html |
| 00:52:22 | <geekosaur> | or replace "latest" with the version you want |
| 00:52:56 | <Axman6> | energizer: it would be HKD Identity foo, and would mean all the elements of foo are just their respective types, without being wrapped in Identity |
| 00:54:08 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 00:54:29 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 00:54:38 | <geekosaur> | the type family (or type function if you prefer) HKD inspects its first argument and matches it against each specified instance in turn. so HKD Identity … will always match the first case and anything else the second |
| 00:55:04 | <Axman6> | energizer: which library are you using for HKD? |
| 00:55:06 | <geekosaur> | much like case … of at value level |
| 00:55:24 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/users_guide/index.html |
| 00:55:37 | <geekosaur> | oops |
| 00:56:17 | <geekosaur> | https://reasonablypolymorphic.com/blog/higher-kinded-data/ |
| 00:56:24 | Axman6 | has to go |
| 00:57:39 | → | lavaman joins (~lavaman@98.38.249.169) |
| 00:57:58 | <energizer> | i mean /after/ that. when i have either `a` or `f a`. the `a` that comes out of the first case might be similar to the `f a` that comes out of the second case, so i wont know where I came from, right? |
| 00:58:26 | <energizer> | since once case drops a level of wrapping, and the other doesnt |
| 00:59:04 | dysfigured | is now known as dfg |
| 00:59:06 | <geekosaur> | that never comes up, because HKD is non-injective (meaning, it can't be run "backwards") |
| 00:59:11 | <monochrom> | I'm actually quite disappointed at that article. "You won't need TH!" That would be great if not for "But now you need GHC.Generics." That's just a different yak to shave, really. |
| 00:59:19 | × | dfg quits (~dfg@li490-89.members.linode.com) (Changing host) |
| 00:59:19 | → | dfg joins (~dfg@user/dfg) |
| 00:59:24 | <geekosaur> | we run it in only one direction and use the result immediately |
| 00:59:45 | <geekosaur> | monochrom, the article says that in not so many words :) |
| 00:59:49 | → | alx741 joins (~alx741@157.100.93.160) |
| 00:59:51 | <monochrom> | Plus the fact that the closed type family is just an distracting optimization to optimize away Identity. |
| 01:00:56 | <geekosaur> | basically, you can never have Identity a because the HKD function disallows it |
| 01:01:14 | <geekosaur> | *type function |
| 01:02:01 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
| 01:03:25 | → | lavaman joins (~lavaman@98.38.249.169) |
| 01:06:10 | <energizer> | suppose `HKD Identity a = a` produces `Just 4` (if `a` is `Just 4`) and `HKD f a = f a` produces `Just 4` (if `f` is `Just` and `a` is `4`). that can happen, right? |
| 01:06:55 | <monochrom> | For starters, where did that "4" come from?! |
| 01:07:13 | <monochrom> | Why is it not 5? Why is it not a boolean? |
| 01:07:17 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 01:08:26 | <jackdk> | I do not like the HKD family, it seems to create a bunch of extra noise. I'd rather eat the boilerplate of explicit `Identity` here and there where I can actually see what's going on |
| 01:08:28 | <energizer> | the value of `a` is data, right? so i can suppose it to be 4 |
| 01:09:16 | <monochrom> | So you agree that you, not `HKD Identity a = a`, produced that "4". |
| 01:10:03 | <energizer> | can you ask a more helpful question or something |
| 01:10:09 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 01:11:02 | <energizer> | if it was `Identity 4` when it comes in, it's `4` when it goes out |
| 01:11:02 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 01:11:08 | <monochrom> | Yes. "What does your question mean?" |
| 01:11:43 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 01:11:47 | <energizer> | what is a plausible value of `a` there? |
| 01:11:59 | <monochrom> | Int, Bool, Char |
| 01:12:19 | <dsal> | Are there any constraints? |
| 01:12:21 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
| 01:12:47 | <geekosaur> | if I understand your question, you are asking if Just 4 came from HKD Identity (Maybe Int) or from HKD Maybe Int? |
| 01:13:00 | <geekosaur> | and you can't know this |
| 01:13:11 | <energizer> | that is right geekosaur |
| 01:13:14 | <geekosaur> | but then, you can't know it in any other situation either |
| 01:14:32 | <geekosaur> | you know it only if you have just received it from a `Person'` of some variety — but to receive it, you must know whether it was a `Person' Identity` or a `Person' Maybe`, so you must know the answer already |
| 01:14:57 | <geekosaur> | and afterward it is irrelevant |
| 01:16:10 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 260 seconds) |
| 01:18:04 | <geekosaur> | in particular, if you are operating on a `Person` a` for unspecified `a`, you cannot inspect the `Person` because you have to know what `a` is to do so |
| 01:18:06 | <johnw> | monochrom: thank you! |
| 01:18:20 | <geekosaur> | it's the same as |
| 01:18:28 | <geekosaur> | % :t length @[] |
| 01:18:28 | <yahb> | geekosaur: [a] -> Int |
| 01:18:46 | <geekosaur> | length cannot inspect the values in the list because it has no idea what `a` is |
| 01:18:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 01:19:43 | <geekosaur> | but it can inspect the list nodes themselves because it knows a list is (_ : xs) for some unknown `_` |
| 01:19:50 | × | slice quits (~slice@user/slice) (Quit: zzz) |
| 01:21:47 | <johnw> | monochrom: Conal showed me this article a few weeks ago, but hadn't read it yet |
| 01:22:28 | × | cjb quits (~cjb@user/cjb) (Read error: Connection reset by peer) |
| 01:22:30 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 01:22:32 | × | acidjnk quits (~acidjnk@p200300d0c7271e77ede7a7f9d267d612.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 01:23:11 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 01:23:28 | <energizer> | that means there's no distinguishing between instances of the types described earlier in the article as MaybePerson and Person, right? whereas they can be distinguished under the other method that doesn't drop the Identity wrapper |
| 01:23:29 | <monochrom> | It's pretty delightful. I have always felt "there are consistent rules behind APL but I can't tell say what". This paper solves it. |
| 01:23:31 | <geekosaur> | now, as it turns out, there is nothing about a `Person'` you can determine without knowing if it is a `Person' Identity` or a `Person' Maybe` or something else, so at the only point where your question has meaning either you know the answer already or it can't come up |
| 01:23:43 | <jackdk> | monochrom: what paper is this? |
| 01:24:12 | <monochrom> | https://link.springer.com/chapter/10.1007/978-3-662-54434-1_21 |
| 01:26:26 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 01:27:30 | <energizer> | geekosaur: that means there's no distinguishing between instances of the types described earlier in the article as MaybePerson and Person, right? whereas they can be distinguished under the other method that doesn't drop the Identity wrapper. so if I'm given a Person' I can't tell if it's been cleaned already |
| 01:27:39 | <geekosaur> | uh? |
| 01:27:43 | × | Kauto quits (~Kauto@wireless-student-pt10-182-232.lut.ac.uk) (Quit: Client closed) |
| 01:28:02 | → | alx741 joins (~alx741@157.100.93.160) |
| 01:28:03 | <geekosaur> | you never have a Person'. you have a Person' Identity or a Person' Maybe |
| 01:28:29 | <geekosaur> | and since you have to know which of those you have to do anything with it, you know what a Maybe 4 must mean |
| 01:28:58 | <geekosaur> | the fact that we talk about a Person' Maybe instead of a MaybePerson is not relevant; they're still distinct types |
| 01:29:18 | × | curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Remote host closed the connection) |
| 01:30:31 | <geekosaur> | if you have a Person' Identity then a Maybe 4 must mean it's a field of type Maybe Int. if you have a Person' Maybe then the field is of type Int. there are no other options and *there is no way to not know which you have* |
| 01:30:53 | <zero> | is there a generalized version of (\\) like a `differenceBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]` ? |
| 01:31:07 | <geekosaur> | your expression will not typecheck unless you know which one you have |
| 01:31:19 | → | nfd joins (~nfd@user/nfd) |
| 01:31:41 | <monochrom> | Does Data.List have it? |
| 01:32:07 | <monochrom> | Oh well it doesn't. |
| 01:32:26 | <geekosaur> | "It is a special case of deleteFirstsBy, which allows the programmer to supply their own equality test." |
| 01:32:29 | <monochrom> | Eh it does, but it is called deleteBy |
| 01:33:19 | × | jiribenes quits (~jiribenes@rosa.jiribenes.com) (Remote host closed the connection) |
| 01:34:04 | → | jiribenes joins (~jiribenes@rosa.jiribenes.com) |
| 01:34:11 | ← | BrokenClutch parts (~pioneer@2804:d41:c2b2:be00:da32:623d:efa3:7121) () |
| 01:35:13 | <monochrom> | Then it goes on to give an example that is not even remotely close to any sense of equality test... |
| 01:35:59 | <monochrom> | What's wrong with people... |
| 01:36:21 | × | emf_ quits (~emf@2620:10d:c091:480::1:e5d2) (Ping timeout: 252 seconds) |
| 01:37:29 | <jackdk> | monochrom: thank you for that link, fun paper. |
| 01:37:34 | <energizer> | ok i'll medidate on that. thank you geekosaur |
| 01:37:44 | × | pfurla[m] quits (uid345156@id-345156.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 01:37:48 | → | lavaman joins (~lavaman@98.38.249.169) |
| 01:37:50 | × | mjacob quits (~mjacob@adrastea.uberspace.de) (Ping timeout: 265 seconds) |
| 01:37:51 | × | AWizzArd quits (~code@gehrels.uberspace.de) (Ping timeout: 245 seconds) |
| 01:37:58 | <geekosaur> | basically Person' is not a thing, like Maybe by itself is not a thing |
| 01:38:16 | <geekosaur> | it's always something like Maybe Int. it's always something like Person' Identity |
| 01:39:11 | <geekosaur> | (this is not always true, as Person' itself demonstrates for Maybe. but that's where "higher kinded" comes in; you are talking about types of kinds other than `Type`) |
| 01:39:14 | <zero> | monochrom: thanks. i should have been more dilligent in my search |
| 01:40:20 | → | shapr joins (~user@12.5.211.156) |
| 01:40:26 | <geekosaur> | but there are not *values* of kinds other than `Type`. thus there is never a value of type Person', because Person' has kind `Type -> Type`, not `Type` |
| 01:40:55 | <geekosaur> | (more correctly it's of kind `(Type -> Type) -> Type`) |
| 01:40:56 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 01:42:18 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 01:43:30 | → | mjacob joins (~mjacob@adrastea.uberspace.de) |
| 01:45:36 | → | AWizzArd joins (~code@gehrels.uberspace.de) |
| 01:45:55 | <EvanR> | if values correspond to proofs, and there are no values of anything other than Type, does that mean most things in type level haskell are not true? xD |
| 01:46:20 | × | shapr quits (~user@12.5.211.156) (Remote host closed the connection) |
| 01:48:18 | <monochrom> | In fact you could ask that question of all dependently typed languages. You can ask it of Coq and Agda. |
| 01:48:31 | <zero> | dO(n) . The deleteBy function behaves like delete, but takes a user-supplied equality predicate. |
| 01:48:34 | <zero> | >>> deleteBy (<=) 4 [1..10] |
| 01:48:37 | <zero> | [1,2,3,5,6,7,8,9,10] |
| 01:48:43 | <zero> | what am i not getting here? |
| 01:48:49 | <EvanR> | 4 is gone |
| 01:48:51 | <mniip> | <= is not an equality |
| 01:49:01 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 01:49:24 | <EvanR> | oh tricky |
| 01:49:28 | <monochrom> | It stops after the first deletion. |
| 01:49:38 | <zero> | why 4 then? |
| 01:49:41 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:49:51 | <mniip> | the docs doesn't specify which side of the equality predicate the four will appear on |
| 01:49:54 | <monochrom> | 4<=1 is false. |
| 01:49:57 | <mniip> | so it's deleting the first x such taht 4<=x |
| 01:50:08 | × | nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.3) |
| 01:50:16 | <zero> | oh |
| 01:50:37 | <geekosaur> | which is what you get for specifying a non-equality predicate :) |
| 01:50:39 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 01:50:55 | <monochrom> | But deleteFirstBy is more analogous to (\\) and has a better name. |
| 01:51:12 | → | g joins (x@libera/staff/glguy) |
| 01:51:15 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 01:51:46 | <EvanR> | > deleteBy (\x y -> (even x && even y) || (odd x && odd y)) 1 [0..9] |
| 01:51:48 | <lambdabot> | [0,2,3,4,5,6,7,8,9] |
| 01:52:26 | <EvanR> | works |
| 01:52:31 | <EvanR> | > deleteBy (\x y -> (even x && even y) || (odd x && odd y)) 7 [0..9] |
| 01:52:32 | <lambdabot> | [0,2,3,4,5,6,7,8,9] |
| 01:52:36 | <g> | even x == even y |
| 01:52:51 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 252 seconds) |
| 01:53:48 | <monochrom> | Suppose I want to explain factorial to you. I begin with "it maps a natural number n to the product 1*2*...*n". |
| 01:54:09 | <monochrom> | Then I proceed to say "Example: factorial of 3.5 is 11.6317..." |
| 01:54:23 | <monochrom> | What are you missing? Answer: The fact that I'm nuts. :) |
| 01:56:02 | <monochrom> | Did you know: "even x == even y" is a thing, too. |
| 01:57:01 | <monochrom> | Err g beat me to it, heh |
| 01:58:31 | → | alx741 joins (~alx741@157.100.93.160) |
| 02:01:53 | → | slice joins (~slice@user/slice) |
| 02:02:56 | → | curiousgay joins (~curiousga@77-120-141-90.kha.volia.net) |
| 02:03:28 | <g> | We have pretty good participation this year so far, but if anyone's doing advent of code in Haskell and hasn't joined the private leaderboard in the topic, there's still room! |
| 02:04:45 | <g> | It's ok if your goal isn't speed; it's also a good way to find solutions to compare with |
| 02:06:47 | × | xff0x quits (~xff0x@2001:1a81:5245:500:35c3:4c34:eb85:8494) (Ping timeout: 252 seconds) |
| 02:06:55 | × | hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8) |
| 02:08:39 | <mniip> | something about setoids |
| 02:08:47 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:4425:b1f0:8a15:3e7c) |
| 02:11:35 | × | slice quits (~slice@user/slice) (Quit: zzz) |
| 02:11:46 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 02:12:26 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 02:13:19 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:16:32 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds) |
| 02:17:02 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
| 02:17:25 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 02:17:25 | × | mvk quits (~mvk@2607:fea8:5cdd:f000::9788) (Ping timeout: 252 seconds) |
| 02:17:44 | × | Ferdirand quits (~somebody@2001:4c78:2012:5000::2) (Ping timeout: 268 seconds) |
| 02:17:50 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 02:17:51 | → | Ferdirand joins (~somebody@2001:4c78:2012:5000::2) |
| 02:18:05 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 02:18:16 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 02:18:32 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 02:18:42 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 02:19:43 | → | slice joins (~slice@user/slice) |
| 02:23:41 | → | aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 02:28:51 | × | Jing quits (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
| 02:29:24 | × | slice quits (~slice@user/slice) (Quit: zzz) |
| 02:29:38 | → | nosewings joins (~ngpc@2603-8081-3e05-e2d0-f324-1a41-5d30-c2c5.res6.spectrum.com) |
| 02:31:43 | → | slice joins (~slice@user/slice) |
| 02:32:15 | → | Jing joins (~hedgehog@2604:a840:3::10c8) |
| 02:32:31 | → | shapr joins (~user@12.5.211.156) |
| 02:36:27 | → | ubert1 joins (~Thunderbi@p200300ecdf1abbee60b6487a781d8af1.dip0.t-ipconnect.de) |
| 02:37:16 | × | curiousgay quits (~curiousga@77-120-141-90.kha.volia.net) (Quit: Leaving) |
| 02:37:35 | × | ubert quits (~Thunderbi@p200300ecdf1abbd3ca03b07f10ffc657.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 02:37:35 | ubert1 | is now known as ubert |
| 02:38:07 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 02:39:13 | <dsal> | Is there anything in megaparsec for parsing quoted strings? |
| 02:41:40 | <glguy> | between and then your own set of escapes? |
| 02:51:38 | × | nfd quits (~nfd@user/nfd) (Ping timeout: 268 seconds) |
| 02:51:45 | <snake> | why is insert into a map O(log n) |
| 02:51:56 | <snake> | that is slow |
| 02:54:44 | × | shapr quits (~user@12.5.211.156) (Ping timeout: 268 seconds) |
| 02:55:55 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 02:56:05 | → | alx741 joins (~alx741@157.100.93.160) |
| 02:59:00 | <zero> | well... it really depends |
| 03:00:13 | <nosewings> | O(log n) is fast |
| 03:00:46 | <nosewings> | Ignoring the constants, log(2^64) ~ 44 |
| 03:02:23 | × | nosewings quits (~ngpc@2603-8081-3e05-e2d0-f324-1a41-5d30-c2c5.res6.spectrum.com) (Remote host closed the connection) |
| 03:02:38 | <zero> | i would say it's fast for a purely functional data structure |
| 03:03:40 | <dsal> | glguy: Yeah… I've done it a few ways, but it seems like something kind of common. |
| 03:04:05 | <dsal> | snake: how would you do it? |
| 03:04:29 | <glguy> | About every language uses a slightly different escape syntax, so I'm not sure what I'd want megaparsec to provide |
| 03:04:59 | <dsal> | Yeah, I guess. I just end up with some basic "x" type strings. |
| 03:05:25 | → | deadmarshal joins (~deadmarsh@95.38.230.166) |
| 03:05:47 | → | nosewings joins (~ngpc@2603-8081-3e05-e2d0-f324-1a41-5d30-c2c5.res6.spectrum.com) |
| 03:05:59 | <snake> | dsal, i'd use an array, O(1) time |
| 03:06:12 | <snake> | zero, sure maybe that is true |
| 03:06:28 | <glguy> | updating an array would be O(n) instead of the faster O(log n) |
| 03:07:00 | <snake> | glguy, what do you mean by "array" |
| 03:07:11 | <snake> | the way i have learned about arrays they are O(1) for access and update |
| 03:07:16 | <glguy> | If you're talking about Map, you're talking about an immutable data structure |
| 03:07:29 | <glguy> | so updating an array would mean to copy it to make a new one with the change |
| 03:07:37 | → | Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) |
| 03:07:42 | <snake> | no he's asking how i would do it |
| 03:07:46 | <snake> | not how Map would do it |
| 03:07:59 | × | Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Client Quit) |
| 03:08:04 | <dsal> | Yes, and glguy's response suggests that your way would be *significantly* more expensive. |
| 03:08:12 | → | Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) |
| 03:08:22 | <snake> | not in a language where you can update a single entry in an array |
| 03:08:27 | <snake> | without replacing it |
| 03:08:54 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 03:08:58 | <dsal> | OK, this conversation is a bit weird because we're not talking about what we'd try to do, but let's assume you're using mutable arrays. How do you decide which element to update? |
| 03:09:05 | <dsal> | What if you didn't build a large enough array in the first place? |
| 03:09:05 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 03:09:51 | × | deadmarshal quits (~deadmarsh@95.38.230.166) (Ping timeout: 252 seconds) |
| 03:09:56 | <snake> | you use a hash algorithm on the key to get a bucket to insert to, and a probing function to handle collisions |
| 03:10:21 | <snake> | the array would have a certain capacity and would resize after its maybe like 75% full for example |
| 03:10:22 | × | Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Client Quit) |
| 03:10:47 | <snake> | this is amortized constant time since you have to resize and rehash every 0.75 N elements you insert |
| 03:10:53 | <snake> | since you only* |
| 03:10:53 | <glguy> | snake: If you're interested in talking about mutable datastructures (which Haskell has) then you wouldn't bring up the complexity of inserting into a Map |
| 03:12:29 | <snake> | what advantage does Map have over the faster data structure and algorithm? |
| 03:12:30 | <glguy> | There are also mutable hashtables and mutable arrays available |
| 03:13:06 | <glguy> | snake: Map is faster and more efficient for rolling back to old versions and having multiple versions active at the same time |
| 03:13:39 | <snake> | ah i see |
| 03:13:50 | <glguy> | and not having mutation makes it easier to maintain invariants, avoid side-effect |
| 03:13:59 | <dsal> | And cheaper to pass your map around. |
| 03:15:25 | <dsal> | It's quite possible that if your program is slow, it's not because of Map. Did you profile? |
| 03:15:32 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 03:15:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:15:59 | <snake> | no i didn't use it yet, i was just curious because it was theoretically slower than i expected |
| 03:16:20 | <snake> | i think c++ calls hash table a map, so maybe that's why i expected that |
| 03:17:00 | <dsal> | https://en.cppreference.com/w/cpp/container/map |
| 03:17:08 | <dsal> | std::map is not a hash table. |
| 03:17:37 | → | raghavgururajan joins (9fd51d1ea8@user/raghavgururajan) |
| 03:17:49 | <snake> | you are right, thankyou |
| 03:18:13 | <snake> | guess i just assumed maps are hash tables |
| 03:20:03 | <dsal> | You'll learn more about performance issues from the profiler than just guessing. O(log n) isn't a big deal since most data is pretty small. I did find a case where just using lookup in a list was faster (that's O(N)). But it's faster in my program. |
| 03:20:40 | <zero> | aren't Data.Map self-balancing binary search trees? |
| 03:20:43 | <dsal> | There's also the case where the Aeson hash table stuff where badly formed input can do really awful things due to hash collisions. |
| 03:21:51 | <dsal> | zero: https://hackage.haskell.org/package/containers-0.4.0.0/docs/Data-Map.html yeah, the docs suggest it does fancy stuff. |
| 03:24:29 | <Axman6> | snake: it;'s worth mentioning that hash based structures are fundamentally different from ordering based structures like map. an orserding based array implementation would have worse asymtotics than the Map implementation |
| 03:24:29 | × | Jing quits (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
| 03:25:11 | <Axman6> | O(log n) is, IIRC, optimal for comparison bsed maps. hash maps are a differtent beast, and we use a different strucutre for thos (HAMTs) |
| 03:25:27 | <Axman6> | based* those* |
| 03:26:36 | <snake> | yeah i had no idea there was a distinction. i thought map was just an ADT that used keys to access values |
| 03:26:47 | × | td_ quits (~td@94.134.91.178) (Ping timeout: 268 seconds) |
| 03:27:21 | <Axman6> | one of the big benefits of Data.Map is that you can get out the elements in orted order in O(n) time, which you can't do with a hash based structure |
| 03:27:43 | → | alx741 joins (~alx741@157.100.93.160) |
| 03:27:58 | → | td_ joins (~td@muedsl-82-207-238-255.citykom.de) |
| 03:28:12 | <Axman6> | Data.HashMap gives you a HAMT, which also has O(log n) operations (though really, you can consider them O(1) because n is bounded to 64 bits) |
| 03:28:24 | <Axman6> | use the right tool for the job |
| 03:28:24 | → | mbuf joins (~Shakthi@122.178.176.47) |
| 03:28:44 | → | Jing joins (~hedgehog@2604:a840:3::10c8) |
| 03:29:01 | <zero> | Ord is also an arguably better consraint to have than Hashable |
| 03:32:42 | → | Inst joins (~Inst@2601:6c4:4080:3f80:1504:5494:6920:c755) |
| 03:32:51 | <dsal> | Ord is certainly easier to get. |
| 03:33:26 | <glguy> | snake: any chance you're doing the advent of code problems this year? |
| 03:34:03 | <snake> | glguy, i was but im also doing final exams this week. i did days 1-5 with java and day 6 with haskell |
| 03:36:13 | → | BrokenClutch joins (~pioneer@2804:d41:c2b2:be00:da32:623d:efa3:7121) |
| 03:36:34 | <snake> | glguy, https://dpaste.com/5GFLBLSEJ this is day 6 |
| 03:37:15 | → | nfd joins (~nfd@user/nfd) |
| 03:37:27 | <glguy> | ah, cool :) |
| 03:40:18 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 03:43:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:44:11 | <glguy> | snake: Do you know you can use [x,y,z] list syntax in patterns (instead of needing to write (x:y:z:[])? |
| 03:46:10 | <snake> | no i didnt know that im a bit lost LOL |
| 03:49:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 03:56:00 | × | BrokenClutch quits (~pioneer@2804:d41:c2b2:be00:da32:623d:efa3:7121) (Quit: Leaving.) |
| 03:58:14 | → | alx741 joins (~alx741@157.100.93.160) |
| 03:58:55 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 04:10:42 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 04:24:07 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:29:11 | → | alx741 joins (~alx741@157.100.93.160) |
| 04:35:12 | × | kayvank quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 04:38:22 | → | Nolrai2 joins (~Nolrai2@73.240.1.39) |
| 04:40:03 | <Nolrai2> | So if I there is a bug in a library on stackage whats the best way to pull down a local copy of it so I can fix it? |
| 04:40:52 | <dsal> | There's usually a github url |
| 04:41:14 | <dsal> | If you're using stack, you can just clone it and override to your clone in stack.yaml |
| 04:41:15 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 04:45:11 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 04:53:49 | <Nolrai2> | In the stack.yaml does the path to the clone go in packages or extra-deps? |
| 04:54:02 | <dsal> | extra-deps |
| 04:54:25 | <dsal> | You can either put a path there, or a git URL and commit. |
| 04:54:51 | <dsal> | stack gets pretty confused if change code at a reference without changing the version number, though. |
| 04:55:52 | <Nolrai2> | Thanks. I'll keep that in mind! |
| 04:59:41 | → | alx741 joins (~alx741@157.100.93.160) |
| 05:02:36 | × | Nolrai2 quits (~Nolrai2@73.240.1.39) (Quit: Client closed) |
| 05:04:41 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 250 seconds) |
| 05:06:49 | → | osewingsn joins (~ngpc@2603-8081-3e05-e2d0-a55f-bbff-7ca5-7d0e.res6.spectrum.com) |
| 05:06:50 | → | neverwas joins (jpneverwas@swissbox.unperson.link) |
| 05:07:32 | × | osewingsn quits (~ngpc@2603-8081-3e05-e2d0-a55f-bbff-7ca5-7d0e.res6.spectrum.com) (Remote host closed the connection) |
| 05:08:44 | → | osewingsn joins (~ngpc@2603-8081-3e05-e2d0-a55f-bbff-7ca5-7d0e.res6.spectrum.com) |
| 05:25:06 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 05:28:04 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 05:30:14 | × | ubert quits (~Thunderbi@p200300ecdf1abbee60b6487a781d8af1.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 05:30:32 | → | ubert joins (~Thunderbi@p200300ecdf1abbee60b6487a781d8af1.dip0.t-ipconnect.de) |
| 05:37:28 | × | juhp quits (~juhp@128.106.188.82) (Quit: juhp) |
| 05:44:44 | → | alx741 joins (~alx741@181.199.42.79) |
| 05:46:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:47:13 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
| 05:54:30 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:58:29 | × | alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
| 05:59:14 | → | alx741 joins (~alx741@157.100.93.160) |
| 06:07:30 | → | lavaman joins (~lavaman@98.38.249.169) |
| 06:08:46 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:10:21 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 06:10:59 | → | deadmarshal joins (~deadmarsh@95.38.230.166) |
| 06:11:52 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 06:12:33 | × | Jing quits (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
| 06:13:17 | → | Jing joins (~hedgehog@125.106.89.200) |
| 06:15:50 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 06:20:09 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 06:25:28 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 256 seconds) |
| 06:27:17 | → | alx741 joins (~alx741@181.199.42.79) |
| 06:28:04 | × | monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER) |
| 06:29:49 | → | monochrom joins (trebla@216.138.220.146) |
| 06:33:15 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:34:36 | × | osewingsn quits (~ngpc@2603-8081-3e05-e2d0-a55f-bbff-7ca5-7d0e.res6.spectrum.com) (Remote host closed the connection) |
| 06:40:02 | × | alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
| 06:40:34 | → | Akiva joins (~Akiva@user/Akiva) |
| 06:40:47 | → | alx741 joins (~alx741@157.100.93.160) |
| 06:43:44 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 06:45:26 | <xerox> | cyphase: we are tied for 10 :o |
| 06:46:09 | <cyphase> | hmm, perhaps i need to refocus my efforts |
| 06:46:26 | <cyphase> | (no, not really) |
| 06:47:17 | × | Inst quits (~Inst@2601:6c4:4080:3f80:1504:5494:6920:c755) (Ping timeout: 252 seconds) |
| 06:47:36 | <cyphase> | the drop in rank is totally worth the distraction i have to say :) |
| 06:55:52 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 06:59:51 | × | Jing quits (~hedgehog@125.106.89.200) (Read error: Connection reset by peer) |
| 07:04:31 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
| 07:05:27 | → | Jing joins (~hedgehog@2604:a840:3::10c8) |
| 07:05:45 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 07:06:04 | × | remexre quits (~remexre@user/remexre) (Remote host closed the connection) |
| 07:06:57 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 07:07:42 | → | chele joins (~chele@user/chele) |
| 07:14:22 | → | alx741 joins (~alx741@157.100.93.160) |
| 07:17:07 | <int-e> | > "AoD" > "AoC" -- 'D' is for 'distractions' of course |
| 07:17:09 | <lambdabot> | True |
| 07:20:48 | → | remexre joins (~remexre@user/remexre) |
| 07:22:21 | × | xff0x quits (~xff0x@2001:1a81:5283:7b00:4425:b1f0:8a15:3e7c) (Ping timeout: 268 seconds) |
| 07:22:31 | → | michalz joins (~michalz@185.246.204.109) |
| 07:22:59 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:6c74:59db:ccc0:34d8) |
| 07:23:47 | → | bollu joins (uid233390@id-233390.helmsley.irccloud.com) |
| 07:25:02 | × | mncheck quits (~mncheck@193.224.205.254) (Quit: Leaving) |
| 07:25:35 | <mjrosenb> | xerox: cyphase: globally? |
| 07:26:09 | <cyphase> | haha, no. the haskell leaderboard; code in the topic |
| 07:27:46 | × | mdrake quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout)) |
| 07:28:21 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 07:28:32 | <xerox> | tie... broken! :D |
| 07:28:49 | <mjrosenb> | you're welcome? |
| 07:29:27 | <mjrosenb> | c.c there are people ahead of me that haven't finished today's yet. |
| 07:29:40 | <mjrosenb> | that's what I get for forgetting about it for a couple of days. |
| 07:31:37 | <mjrosenb> | anyhow, I came in here to ask about emacs and flycheck. I just set up haskell-lsp, and it says that flycheck is enabled in my buffers, but I'm not seeing any evidence of it. |
| 07:35:04 | → | evocatus joins (~evocatus@91.211.251.87) |
| 07:36:34 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f458:37c0:1547:7436) (Remote host closed the connection) |
| 07:38:40 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:39:29 | × | phma quits (phma@2001:5b0:211c:2a58:d0c:f178:6e2:131e) (Read error: Connection reset by peer) |
| 07:40:15 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 07:40:25 | → | phma joins (~phma@host-67-44-208-155.hnremote.net) |
| 07:41:01 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 07:47:31 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:48:19 | → | fr33domlover joins (~fr33@2.55.170.123) |
| 07:51:07 | → | InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 07:56:43 | → | alx741 joins (~alx741@157.100.93.160) |
| 08:00:44 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2c0a:74d4:9496:54f1) |
| 08:01:45 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 08:08:55 | <[itchyjunk]> | @where paste |
| 08:08:55 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 08:09:30 | <[itchyjunk]> | Huh, I was expecting this to be harder. does this look correct? https://paste.tomsmeding.com/dzQcCatd |
| 08:10:18 | <[itchyjunk]> | I guess `fib n` should actually generate n terms maybe. but that would just be turning this into a helper and having come other function do the counting and recursion maybe? |
| 08:10:33 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 08:11:41 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 08:16:27 | <[itchyjunk]> | Hm, looks like i still have issues with making lists. |
| 08:16:30 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 08:16:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:16:47 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 08:17:00 | <[itchyjunk]> | `fib :: Int -> [Int]` I want to take some integer n and produce a list of n integers, so i think the signature is correct |
| 08:17:56 | → | cosimone joins (~user@93-47-231-203.ip115.fastwebnet.it) |
| 08:18:36 | → | phma_ joins (phma@2001:5b0:2144:24c8:3448:3cec:586:a41) |
| 08:19:20 | → | iteratee_ joins (~kyle@162.218.222.107) |
| 08:19:32 | → | pyook joins (~puke@user/puke) |
| 08:19:33 | × | puke quits (~puke@user/puke) (Killed (iridium.libera.chat (Nickname regained by services))) |
| 08:19:33 | pyook | is now known as puke |
| 08:20:25 | <mjrosenb> | is there a reason to have fib :: Int -> [Int] rather than just fib :: [Int]? |
| 08:20:34 | <mjrosenb> | [itchyjunk]: ^ |
| 08:20:41 | <[itchyjunk]> | hmmmmmmmmm |
| 08:21:13 | <[itchyjunk]> | I would just produce infinite list of fibbonaci lazyly evaluated? |
| 08:21:32 | <[itchyjunk]> | Didn't realize that was an option. but is this harder? |
| 08:21:52 | × | iteratee quits (~kyle@162.218.222.107) (Read error: Connection reset by peer) |
| 08:22:15 | × | phma quits (~phma@host-67-44-208-155.hnremote.net) (Ping timeout: 252 seconds) |
| 08:23:32 | <mjrosenb> | the lazy list of infinite fibonacci numbers is definitely one of the "wait, haskell can do /that/?!" examples |
| 08:26:50 | <[itchyjunk]> | Hm, idk how a function that take no parameter but produces a list would go |
| 08:26:58 | → | alx741 joins (~alx741@157.100.93.160) |
| 08:28:25 | → | chexum_ joins (~quassel@gateway/tor-sasl/chexum) |
| 08:28:41 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 08:28:42 | <mjrosenb> | You can start simple, how about a list that contains only the number 1, an infinite number of times? |
| 08:28:50 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 08:30:53 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 08:31:37 | <[itchyjunk]> | this does something but running this turned into an infinite loop |
| 08:31:38 | <[itchyjunk]> | https://paste.tomsmeding.com/RfymL3yt |
| 08:32:06 | <[itchyjunk]> | guess this isn't what i want though |
| 08:32:22 | <[itchyjunk]> | But does compile and run @_@ |
| 08:32:38 | × | slice quits (~slice@user/slice) (Quit: cya) |
| 08:33:13 | <mjrosenb> | that looks correct. |
| 08:33:26 | <mjrosenb> | it'll turn into an infinite loop if you try to look at all of ut |
| 08:33:52 | <mjrosenb> | but e.g. `take 300 simple` or `simple !! 9000` should both be fine. |
| 08:33:53 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 08:35:13 | <[itchyjunk]> | hmm, `take 30 simple` produces a list of 30 1's but `simple !! 30` just outputs 1 |
| 08:35:14 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 08:35:36 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 08:36:02 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:36:02 | <mjrosenb> | yes. (!!) is the index operator, it asks for the 30th element in the list, which is 1 |
| 08:36:07 | <mjrosenb> | since every element in the list is 1. |
| 08:36:12 | <[itchyjunk]> | ah |
| 08:36:34 | <mjrosenb> | ok, next step: how about a list that has the natural numbers? |
| 08:36:57 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 08:37:57 | → | mncheck joins (~mncheck@193.224.205.254) |
| 08:38:54 | → | evocatus_ joins (~evocatus@213.193.2.105) |
| 08:39:30 | × | evocatus_ quits (~evocatus@213.193.2.105) (Remote host closed the connection) |
| 08:41:19 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Ping timeout: 252 seconds) |
| 08:41:54 | × | evocatus quits (~evocatus@91.211.251.87) (Ping timeout: 268 seconds) |
| 08:43:40 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 08:44:31 | <[itchyjunk]> | Do i wanna take the last element, add one to it and add it back to the list? |
| 08:44:49 | <[itchyjunk]> | natList = n+1 : natList where n = 0 was the closest idea i had lol |
| 08:46:27 | <mjrosenb> | that will produce the same thing as simple, since n is always the same. |
| 08:48:02 | <[itchyjunk]> | right |
| 08:48:02 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 08:48:02 | → | kuribas joins (~user@ptr-25vy0i8khbpxjegyagx.18120a2.ip6.access.telenet.be) |
| 08:48:02 | <[itchyjunk]> | but i might be able to say where n is last thing in natList though.. I think |
| 08:48:24 | <mjrosenb> | so starting with `natList = 1 : natList`, the second element is wrong, since it is 1 rather than 2 |
| 08:48:35 | <mjrosenb> | and you want to affect *every* element after the first |
| 08:48:43 | <mjrosenb> | how do you affect every element in a list? |
| 08:48:55 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 08:49:21 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:49:38 | <[itchyjunk]> | Hm, apply a function to each element of list? maybe with map |
| 08:50:01 | <mjrosenb> | sounds right. |
| 08:50:43 | <[itchyjunk]> | This seems to somehow compile and do something weird btw : natList = n+1 : natList where n = last natList |
| 08:51:05 | → | Inst joins (~Inst@2601:6c4:4080:3f80:7939:82b5:8236:6c32) |
| 08:51:10 | <[itchyjunk]> | When i run it, all I see is a `[` |
| 08:52:26 | <mjrosenb> | hah, yeah. taking the last element of an infinite list will take a while. |
| 08:52:35 | <[itchyjunk]> | ah |
| 08:54:22 | <mjrosenb> | so |
| 08:54:44 | <mjrosenb> | `natlist = 1 : ` is definitely correct. You have your base case; the first natural number is 1. |
| 08:55:12 | <mjrosenb> | and you want to continue from there, with something that will evaluate to [2,3,4,5...] |
| 08:55:43 | <[itchyjunk]> | yeah i was testing out how map works `map (+ 1) [1 .. 10] seems to do what i wanted |
| 08:56:09 | <mjrosenb> | but using a range is cheating :-p |
| 08:56:22 | <mjrosenb> | anyhow... |
| 08:56:28 | <[itchyjunk]> | that was for testing |
| 08:56:30 | <[itchyjunk]> | natList = 1 : map (+ 1) natList |
| 08:56:45 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 08:56:47 | <mjrosenb> | yup, that looks right. |
| 08:57:12 | <[itchyjunk]> | Hmm, I need to think this one through though. Does work |
| 08:58:37 | → | acidjnk joins (~acidjnk@p200300d0c7271e77ede7a7f9d267d612.dip0.t-ipconnect.de) |
| 08:58:37 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 08:59:24 | <[itchyjunk]> | Oh i think it makes sense.. just barely |
| 08:59:40 | <[itchyjunk]> | it hard to mentally follow along what is happening |
| 08:59:53 | <mjrosenb> | it... takes some getting used to |
| 09:00:04 | <mjrosenb> | but it is *very* illustrative |
| 09:00:17 | <[itchyjunk]> | ah, good to know there is a future where i will be used to it |
| 09:00:53 | <mjrosenb> | so, this is the natural numbers; nats 1 = 1; nats n = 1 + nats (n-1) |
| 09:01:17 | <mjrosenb> | we want the fibonacci numbers; fib 1 = 1; fib 2 = 1; fib n = fib (n-1) + fib (n-2) |
| 09:02:02 | <mjrosenb> | just by cargo culting, you can get something like `fibList = 1:1:...` |
| 09:02:15 | <[itchyjunk]> | lol tat's what i had |
| 09:02:35 | <mjrosenb> | but map isn't going to work, since the thing that is being applied isn't a constant, but instead varies depending on where you are in the list |
| 09:02:49 | <mjrosenb> | but, a quirk of this method is... you can't really tell where you are in the list. |
| 09:03:37 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
| 09:04:01 | <mjrosenb> | so, I guess as another intermediate step, rather than the natural numbers, you can do the powers of two |
| 09:04:12 | <mjrosenb> | which comes in a simple flavor |
| 09:04:33 | <mjrosenb> | powTwoList = 1 : map (2*) powTwoList |
| 09:04:58 | <mjrosenb> | and, knowing that 2*x == x+x, a slightly stranger form |
| 09:05:18 | <mjrosenb> | powTwoList = 1 : zip (+) powTwoList powTwoList |
| 09:06:42 | <[itchyjunk]> | hmm |
| 09:10:17 | <mjrosenb> | err |
| 09:10:28 | <mjrosenb> | powTwoList = 1 : zipWith (+) powTwoList powTwoList |
| 09:10:30 | <mjrosenb> | sorry about that. |
| 09:12:39 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 09:12:46 | <int-e> | > fix (scanl (+) 1) |
| 09:12:47 | <lambdabot> | [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,2... |
| 09:13:13 | <[itchyjunk]> | looks cheaty |
| 09:13:42 | <int-e> | > fix ((0:) . scanl (+) 1) -- this is the more famous twin |
| 09:13:44 | <lambdabot> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,... |
| 09:13:52 | → | notzmv joins (~zmv@user/notzmv) |
| 09:14:23 | <xerox> | who wears a cool hat |
| 09:14:59 | → | alx741 joins (~alx741@157.100.93.160) |
| 09:15:11 | <mjrosenb> | int-e: well, I guess that doesn't take away from the solution I was working towards at all :-p |
| 09:16:03 | <int-e> | mjrosenb: I hope you're aiming for the zip-based one |
| 09:16:41 | <int-e> | I would always start at F_0 = 0 though. |
| 09:16:47 | <mjrosenb> | well, I did have zipWith in the last definition I gave :-) |
| 09:17:18 | <mjrosenb> | any reason? |
| 09:17:36 | <mjrosenb> | I know why I don't like it, but it is a dumb reason. |
| 09:18:29 | <mjrosenb> | actually, technically, I don't even like starting with two ones; 1:2:3:5:8... |
| 09:18:42 | <mjrosenb> | but that seems to upset people too much. |
| 09:18:50 | <int-e> | mjrosenb: yes, there is a reason: F_0 = 0 ensures that F_n | F_m when n | m |
| 09:19:14 | → | cosimone` joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
| 09:20:34 | × | cosimone quits (~user@93-47-231-203.ip115.fastwebnet.it) (Ping timeout: 256 seconds) |
| 09:21:39 | <mjrosenb> | is that n divides evenly into m? |
| 09:21:45 | <int-e> | yes |
| 09:22:23 | <mjrosenb> | that makes sense. |
| 09:22:35 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 09:23:29 | <mjrosenb> | I like [1,2,3,5...] because every integer can be uniquely represented as a sum of non-consecutive fibonacci numbers |
| 09:23:41 | <mjrosenb> | but including a second 1 and a 0 breaks that. |
| 09:24:49 | <int-e> | Oh the Zeckendorf thing. |
| 09:27:34 | <mjrosenb> | is F_0 = 0 required for gcd(F_n, F_m) = F_gcd(n,m)? |
| 09:28:40 | <int-e> | Yes. (If you take n = 0 then this becomes gcd(F_0, F_m) = F_m) |
| 09:29:34 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 09:31:26 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:32:04 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Remote host closed the connection) |
| 09:32:28 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 09:32:29 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 09:32:41 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 09:36:06 | → | statusbot4 joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
| 09:36:59 | → | SquidDev9 joins (~SquidDev@autoclave.squiddev.cc) |
| 09:37:24 | → | darkstarx joins (~darkstard@50.39.115.145) |
| 09:37:44 | → | remedan_ joins (~remedan@balak.me) |
| 09:37:55 | → | tubogram4 joins (~tubogram@user/tubogram) |
| 09:38:03 | → | feliix42_ joins (~felix@gibbs.uberspace.de) |
| 09:38:15 | × | SquidDev quits (~SquidDev@autoclave.squiddev.cc) (Killed (NickServ (GHOST command used by SquidDev9))) |
| 09:38:17 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 09:38:21 | SquidDev9 | is now known as SquidDev |
| 09:38:44 | → | derelict joins (derelict@user/derelict) |
| 09:38:44 | → | Athas_ joins (athas@2a01:7c8:aaac:1cf:fd6:8489:d8da:43d) |
| 09:38:55 | → | greyrat joins (~greyrat@ip202.ip-51-178-215.eu) |
| 09:39:48 | <mjrosenb> | hrm, so far, I'm unimpressed with lsp-mode |
| 09:39:55 | → | Logio_ joins (em@kapsi.fi) |
| 09:39:58 | → | jzsinatr2 joins (~jzsinatra@88-114-238-31.elisa-laajakaista.fi) |
| 09:39:59 | × | madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 09:40:05 | → | haveo_ joins (~haveo@sl35.iuwt.fr) |
| 09:40:05 | <mjrosenb> | I kind of suspect I don't have it set up correctly. |
| 09:40:12 | → | td__ joins (~td@muedsl-82-207-238-255.citykom.de) |
| 09:40:14 | → | hltk_ joins (~hltk@hltk.fi) |
| 09:40:15 | → | _ht_ joins (~quassel@82-169-194-8.biz.kpn.net) |
| 09:40:20 | → | kritzefitz_ joins (~kritzefit@debian/kritzefitz) |
| 09:40:20 | → | Techcable_ joins (~Techcable@168.235.93.147) |
| 09:40:25 | → | mjacob_ joins (~mjacob@adrastea.uberspace.de) |
| 09:40:26 | → | bens_ joins (~bens@www.typius.com) |
| 09:40:44 | → | ft_ joins (~ft@shell.chaostreff-dortmund.de) |
| 09:40:55 | → | Megant_ joins (megant@user/megant) |
| 09:41:01 | → | mstksg joins (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
| 09:41:03 | → | gentauro_ joins (~gentauro@185.107.12.141) |
| 09:41:05 | → | dfordvm joins (~dfordivam@tk2-219-19469.vs.sakura.ne.jp) |
| 09:41:07 | → | jjhoo_ joins (~jahakala@user/jjhoo) |
| 09:41:11 | → | peutri_ joins (~peutri@ns317027.ip-94-23-46.eu) |
| 09:41:13 | → | [exa]_ joins (exa@srv3.blesmrt.net) |
| 09:41:22 | → | gdd1 joins (~gdd@129.199.146.230) |
| 09:41:23 | → | takuan_dozo joins (~takuan@178-116-218-225.access.telenet.be) |
| 09:41:23 | → | jlamothe_ joins (~jlamothe@198.251.61.229) |
| 09:41:25 | → | sweater1 joins (~sweater@206.81.18.26) |
| 09:41:28 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 09:41:43 | → | finstern1s joins (~X@23.226.237.192) |
| 09:41:49 | → | aweinsto1k joins (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) |
| 09:41:55 | → | kritzefitz_unaut joins (~kritzefit@fw-front.credativ.com) |
| 09:42:08 | ← | kritzefitz_unaut parts (~kritzefit@fw-front.credativ.com) () |
| 09:43:06 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Killed (lithium.libera.chat (Nickname regained by services))) |
| 09:43:06 | kritzefitz_ | is now known as kritzefitz |
| 09:43:13 | × | pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer) |
| 09:44:36 | → | adamCS_ joins (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) |
| 09:44:45 | → | dka_ joins (~code-is-a@ns3059207.ip-193-70-33.eu) |
| 09:44:52 | → | cyphase_eviltwin joins (~cyphase@user/cyphase) |
| 09:45:56 | → | alx741 joins (~alx741@157.100.93.160) |
| 09:46:22 | × | [exa]_ quits (exa@srv3.blesmrt.net) (Changing host) |
| 09:46:22 | → | [exa]_ joins (exa@user/exa/x-3587197) |
| 09:46:40 | × | [exa] quits (~exa@user/exa/x-3587197) (Killed (calcium.libera.chat (Nickname regained by services))) |
| 09:46:40 | [exa]_ | is now known as [exa] |
| 09:46:44 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (*.net *.split) |
| 09:46:44 | × | cfricke quits (~cfricke@user/cfricke) (*.net *.split) |
| 09:46:44 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (*.net *.split) |
| 09:46:44 | × | deadmarshal quits (~deadmarsh@95.38.230.166) (*.net *.split) |
| 09:46:44 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (*.net *.split) |
| 09:46:44 | × | td_ quits (~td@muedsl-82-207-238-255.citykom.de) (*.net *.split) |
| 09:46:44 | × | mjacob quits (~mjacob@adrastea.uberspace.de) (*.net *.split) |
| 09:46:44 | × | cheater quits (~Username@user/cheater) (*.net *.split) |
| 09:46:44 | × | dsrt^ quits (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (*.net *.split) |
| 09:46:44 | × | paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (*.net *.split) |
| 09:46:44 | × | kmein quits (~weechat@user/kmein) (*.net *.split) |
| 09:46:44 | × | gdd quits (~gdd@129.199.146.230) (*.net *.split) |
| 09:46:44 | × | Alex_test quits (~al_test@178.34.163.33) (*.net *.split) |
| 09:46:44 | × | AlexZenon quits (~alzenon@178.34.163.33) (*.net *.split) |
| 09:46:44 | × | Techcable quits (~Techcable@168.235.93.147) (*.net *.split) |
| 09:46:44 | × | tubogram quits (~tubogram@user/tubogram) (*.net *.split) |
| 09:46:44 | × | darkstardevx quits (~darkstard@50.39.115.145) (*.net *.split) |
| 09:46:44 | × | danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (*.net *.split) |
| 09:46:44 | × | joo-_ quits (~joo-_@fsf/member/joo--) (*.net *.split) |
| 09:46:44 | × | Digit quits (~user@user/digit) (*.net *.split) |
| 09:46:44 | × | jle` quits (~jle`@cpe-23-240-75-236.socal.res.rr.com) (*.net *.split) |
| 09:46:44 | × | nek0 quits (~nek0@nek0.eu) (*.net *.split) |
| 09:46:44 | × | Megant quits (megant@user/megant) (*.net *.split) |
| 09:46:44 | × | sweater quits (~sweater@206.81.18.26) (*.net *.split) |
| 09:46:44 | × | dwt_ quits (~dwt_@c-98-198-103-176.hsd1.tx.comcast.net) (*.net *.split) |
| 09:46:44 | × | Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (*.net *.split) |
| 09:46:44 | × | noctux quits (~noctux@user/noctux) (*.net *.split) |
| 09:46:44 | × | feliix42 quits (~felix@gibbs.uberspace.de) (*.net *.split) |
| 09:46:44 | × | cyphase quits (~cyphase@user/cyphase) (*.net *.split) |
| 09:46:44 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (*.net *.split) |
| 09:46:44 | × | Hecate quits (~mariposa@user/hecate) (*.net *.split) |
| 09:46:44 | × | remedan quits (~remedan@balak.me) (*.net *.split) |
| 09:46:45 | × | ft quits (~ft@shell.chaostreff-dortmund.de) (*.net *.split) |
| 09:46:45 | × | drewolson quits (~drewolson@user/drewolson) (*.net *.split) |
| 09:46:45 | × | PigDude quits (~PigDude@159.203.16.199) (*.net *.split) |
| 09:46:45 | × | aweinstock quits (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) (*.net *.split) |
| 09:46:45 | × | hrdl quits (~hrdl@mail.hrdl.eu) (*.net *.split) |
| 09:46:45 | × | jlamothe quits (~jlamothe@198.251.61.229) (*.net *.split) |
| 09:46:45 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (*.net *.split) |
| 09:46:45 | × | gentauro quits (~gentauro@user/gentauro) (*.net *.split) |
| 09:46:45 | × | Logio quits (em@kapsi.fi) (*.net *.split) |
| 09:46:45 | × | niko quits (~niko@libera/staff/niko) (*.net *.split) |
| 09:46:45 | × | nisstyre quits (~wes@user/nisstyre) (*.net *.split) |
| 09:46:45 | × | pragma- quits (~chaos@user/pragmatic-chaos) (*.net *.split) |
| 09:46:45 | × | dka quits (~code-is-a@ns3059207.ip-193-70-33.eu) (*.net *.split) |
| 09:46:45 | × | hltk quits (~hltk@hltk.fi) (*.net *.split) |
| 09:46:45 | × | pie__ quits (~pie_bnc@user/pie/x-2818909) (*.net *.split) |
| 09:46:45 | × | dfordivam1 quits (~dfordivam@tk2-219-19469.vs.sakura.ne.jp) (*.net *.split) |
| 09:46:45 | × | greyrat_ quits (~greyrat@ip202.ip-51-178-215.eu) (*.net *.split) |
| 09:46:45 | × | eL_Bart0- quits (eL_Bart0@dietunichtguten.org) (*.net *.split) |
| 09:46:45 | × | jzsinatra quits (~jzsinatra@88-114-238-31.elisa-laajakaista.fi) (*.net *.split) |
| 09:46:45 | × | statusbot quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (*.net *.split) |
| 09:46:45 | × | peutri quits (~peutri@ns317027.ip-94-23-46.eu) (*.net *.split) |
| 09:46:45 | × | ikke quits (~kevin@alpine/developer/ikke) (*.net *.split) |
| 09:46:45 | × | Athas quits (athas@sigkill.dk) (*.net *.split) |
| 09:46:45 | × | haveo quits (~haveo@sl35.iuwt.fr) (*.net *.split) |
| 09:46:45 | × | bens quits (~bens@www.typius.com) (*.net *.split) |
| 09:46:45 | × | jjhoo quits (~jahakala@user/jjhoo) (*.net *.split) |
| 09:46:45 | × | finsternis quits (~X@23.226.237.192) (*.net *.split) |
| 09:46:45 | × | yahb quits (xsbot@user/mniip/bot/yahb) (*.net *.split) |
| 09:46:45 | × | tetrahedron quits (~derelict@user/derelict) (*.net *.split) |
| 09:46:46 | × | asm quits (~alexander@user/asm) (*.net *.split) |
| 09:46:46 | × | adamCS quits (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) (*.net *.split) |
| 09:46:46 | tubogram4 | is now known as tubogram |
| 09:46:46 | ft_ | is now known as ft |
| 09:46:46 | adamCS_ | is now known as adamCS |
| 09:46:56 | → | dsrt^ joins (~dsrt@wsip-98-188-240-142.mc.at.cox.net) |
| 09:47:27 | → | yahb joins (xsbot@user/mniip/bot/yahb) |
| 09:48:05 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 250 seconds) |
| 09:48:29 | → | pavonia joins (~user@user/siracusa) |
| 09:51:51 | → | AlexZenon joins (~alzenon@178.34.163.33) |
| 09:51:51 | → | Alex_test joins (~al_test@178.34.163.33) |
| 09:51:51 | → | InternetCitizen joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 09:51:51 | → | deadmarshal joins (~deadmarsh@95.38.230.166) |
| 09:51:51 | → | cheater joins (~Username@user/cheater) |
| 09:51:51 | → | kmein joins (~weechat@user/kmein) |
| 09:51:51 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 09:51:51 | → | Digit joins (~user@user/digit) |
| 09:51:51 | → | nek0 joins (~nek0@nek0.eu) |
| 09:51:51 | → | dwt_ joins (~dwt_@c-98-198-103-176.hsd1.tx.comcast.net) |
| 09:51:51 | → | Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com) |
| 09:51:51 | → | drewolson joins (~drewolson@user/drewolson) |
| 09:51:51 | → | PigDude joins (~PigDude@159.203.16.199) |
| 09:51:51 | → | hrdl joins (~hrdl@mail.hrdl.eu) |
| 09:51:51 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 09:51:51 | → | niko joins (~niko@libera/staff/niko) |
| 09:51:51 | → | nisstyre joins (~wes@user/nisstyre) |
| 09:52:25 | → | noctux joins (~noctux@user/noctux) |
| 09:53:06 | → | asm joins (~alexander@burner.asm89.io) |
| 09:53:36 | → | pragma- joins (~chaos@user/pragmatic-chaos) |
| 09:53:38 | → | paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) |
| 09:53:39 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:53:39 | → | teo joins (~teo@user/teo) |
| 09:53:40 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 09:53:53 | → | ikke joins (~kevin@alpine/developer/ikke) |
| 09:53:55 | × | nfd quits (~nfd@user/nfd) (Ping timeout: 252 seconds) |
| 09:59:43 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 10:00:14 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 256 seconds) |
| 10:02:08 | → | joo-_ joins (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) |
| 10:02:08 | × | joo-_ quits (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) (Changing host) |
| 10:02:08 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 10:08:57 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2c0a:74d4:9496:54f1) (Ping timeout: 252 seconds) |
| 10:09:09 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 10:15:02 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
| 10:15:06 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:15:51 | → | Whatever009 joins (~fuzzypixe@tchebychev.ensimag.fr) |
| 10:15:58 | → | alx741 joins (~alx741@157.100.93.160) |
| 10:16:07 | × | InternetCitizen quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 10:16:20 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2a7d:20d:33d5:1d47) |
| 10:17:00 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 10:17:56 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:24:42 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 10:25:09 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 265 seconds) |
| 10:28:01 | jjhoo_ | is now known as jjhoo |
| 10:30:25 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 10:33:38 | → | mmhat joins (~mmh@55d46318.access.ecotel.net) |
| 10:36:50 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 10:43:37 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Quit: Leaving) |
| 10:44:00 | × | Inst quits (~Inst@2601:6c4:4080:3f80:7939:82b5:8236:6c32) (Remote host closed the connection) |
| 10:44:11 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 10:44:18 | → | Inst joins (~Inst@2601:6c4:4080:3f80:7939:82b5:8236:6c32) |
| 10:45:42 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Client Quit) |
| 10:46:29 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 10:46:43 | × | Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 252 seconds) |
| 10:46:55 | → | alx741 joins (~alx741@157.100.93.160) |
| 10:54:30 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds) |
| 10:54:53 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 10:55:16 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Quit: Leaving) |
| 10:55:43 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 268 seconds) |
| 10:55:43 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 10:56:17 | → | DNH joins (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) |
| 10:57:00 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 10:57:51 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 11:00:03 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) |
| 11:00:46 | → | Unhammer joins (~Unhammer@user/unhammer) |
| 11:05:11 | → | max22- joins (~maxime@2a01cb08833598008d643fe4ea2e3b05.ipv6.abo.wanadoo.fr) |
| 11:07:04 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:07:18 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:4508:9275:13c9:2a0) (Remote host closed the connection) |
| 11:07:20 | → | __monty__ joins (~toonn@user/toonn) |
| 11:07:21 | → | lavaman joins (~lavaman@98.38.249.169) |
| 11:07:45 | Athas_ | is now known as Athas |
| 11:11:32 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 11:11:57 | → | alx741 joins (~alx741@157.100.93.160) |
| 11:12:49 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 11:17:19 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 11:19:46 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 11:21:14 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 11:22:41 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 11:29:02 | × | Whatever009 quits (~fuzzypixe@tchebychev.ensimag.fr) (Ping timeout: 240 seconds) |
| 11:29:17 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 250 seconds) |
| 11:29:26 | × | fr33domlover quits (~fr33@2.55.170.123) (Ping timeout: 265 seconds) |
| 11:29:35 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:30:05 | → | Whatever009 joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 11:31:00 | → | fr33domlover joins (~fr33@2.55.142.29) |
| 11:36:38 | → | xkuru joins (~xkuru@user/xkuru) |
| 11:36:47 | → | Hecate joins (~mariposa@163.172.211.189) |
| 11:37:30 | → | lbseale_ joins (~ep1ctetus@user/ep1ctetus) |
| 11:38:02 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 240 seconds) |
| 11:39:06 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 11:39:16 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:40:37 | → | alx741 joins (~alx741@157.100.93.160) |
| 11:40:48 | × | johnw quits (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) (Read error: Connection reset by peer) |
| 11:41:04 | → | ThC27 joins (ThC27@gateway/vpn/protonvpn/thc27) |
| 11:41:43 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 252 seconds) |
| 11:42:30 | → | johnw joins (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 11:46:17 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Quit: leaving) |
| 11:46:34 | → | joo-_ joins (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) |
| 11:46:34 | × | joo-_ quits (~joo-_@87-49-45-77-mobile.dk.customer.tdc.net) (Changing host) |
| 11:46:34 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 11:49:47 | × | Whatever009 quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 252 seconds) |
| 11:53:46 | → | pfurla_ joins (~pfurla@177.79.122.168) |
| 11:57:07 | × | pfurla quits (~pfurla@177.25.178.222) (Ping timeout: 252 seconds) |
| 11:58:10 | → | raehik joins (~raehik@cpc144538-stap14-2-0-cust361.12-2.cable.virginm.net) |
| 12:00:36 | aweinsto1k | is now known as aweinstock |
| 12:03:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 12:04:53 | × | asm quits (~alexander@burner.asm89.io) (Changing host) |
| 12:04:53 | → | asm joins (~alexander@user/asm) |
| 12:06:36 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 256 seconds) |
| 12:08:55 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 12:10:15 | × | canta quits (~canta@user/canta) (Quit: WeeChat 2.8) |
| 12:13:14 | → | curiousgay joins (~curiousga@77-120-141-90.kha.volia.net) |
| 12:25:54 | → | alx741 joins (~alx741@157.100.93.160) |
| 12:26:43 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 12:35:15 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:38:23 | <dminuoso> | Is there a way to protect myself against a cabal package on hackage being replaced? |
| 12:38:34 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 12:38:59 | → | Dansk31 joins (~Dansk31@147.114.141.88.rev.sfr.net) |
| 12:39:14 | × | Dansk31 quits (~Dansk31@147.114.141.88.rev.sfr.net) (Client Quit) |
| 12:39:40 | <dminuoso> | If memory serves right, hackage in principle allows some people to replace a package |
| 12:41:18 | × | ThC27 quits (ThC27@gateway/vpn/protonvpn/thc27) (Quit: ThC27) |
| 12:44:44 | <hpc> | i think the best protection is to keep the package actively maintained |
| 12:45:49 | <hpc> | it will never be "impossible" to replace a hackage package, as long as the reason is good enough |
| 12:52:49 | × | Hecate quits (~mariposa@163.172.211.189) (Changing host) |
| 12:52:49 | → | Hecate joins (~mariposa@user/hecate) |
| 12:55:02 | → | alx741 joins (~alx741@157.100.93.160) |
| 12:58:40 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 12:59:29 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:03:38 | × | max22- quits (~maxime@2a01cb08833598008d643fe4ea2e3b05.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 13:05:53 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 13:08:00 | <dminuoso> | Sure, I dont mind that part as much |
| 13:08:10 | <dminuoso> | But cabal has no way of pinning the hash, right? |
| 13:08:17 | → | chomwitt joins (~chomwitt@2a02:587:dc0d:3700:12c3:7bff:fe6d:d374) |
| 13:08:21 | <dminuoso> | It seems the best way would be to vendor all dependencies |
| 13:08:38 | → | altern joins (~Sergii@altern.corbina.com.ua) |
| 13:08:52 | <dminuoso> | Incidentally, if you vendor them, you get to actually observe and use `git diff` each time a package is updated. Makes auditing changes in your transitive dependency graph easier. :) |
| 13:09:52 | <dminuoso> | And it keeps my build really deterministic, irrespective of whether a compromised or evil hackage admin decides to hijack `containers` |
| 13:09:56 | <merijn> | dminuoso: If you use source-repositories you can pin to specific git commits |
| 13:10:20 | <dminuoso> | merijn: I felt this feature has quite poor UX |
| 13:10:28 | <dminuoso> | I still have a bad taste in my mouth of it. |
| 13:10:31 | <merijn> | dminuoso: tbh, freeze files pinning a specific version should have the same effect, since versions do have hashes in the cabal index |
| 13:10:38 | × | deadmarshal quits (~deadmarsh@95.38.230.166) (Ping timeout: 256 seconds) |
| 13:10:39 | <merijn> | dminuoso: How so? |
| 13:11:03 | <dminuoso> | So first, it relies on the git repository still being available. Every now and then I find packages whose upstream git/mercurial repo has just vanished |
| 13:11:35 | <merijn> | dminuoso: Well, pin to repos you control (which can just be mirrors of upstream) |
| 13:11:53 | <merijn> | That doesn't sound like a UX issue |
| 13:12:03 | <dminuoso> | merijn: I think it might be much easier to instrument cabal to vendor all libraries, rather than to fork all repositories |
| 13:12:34 | <dminuoso> | merijn: I found it interefered with caching in strange ways. |
| 13:13:00 | <dminuoso> | There are bugs I still cant reliably reproduce that would leave me with stale dist-newstyle/ in very odd scenarios, and they always occured when I used source-repositories |
| 13:13:09 | <dminuoso> | s/always/only/ |
| 13:13:41 | × | SIben quits (~SIben@ns3106586.ip-5-135-191.eu) (Ping timeout: 245 seconds) |
| 13:22:07 | → | alx741 joins (~alx741@157.100.93.160) |
| 13:22:07 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:23:38 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 13:24:04 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 13:26:11 | × | son0p quits (~ff@2800:484:1d81:b700::4) (Ping timeout: 268 seconds) |
| 13:36:30 | → | max22- joins (~maxime@2a01cb08833598001d6a33d2fe2bc13e.ipv6.abo.wanadoo.fr) |
| 13:39:24 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 13:39:43 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 250 seconds) |
| 13:41:47 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 13:41:52 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:42:38 | <neverwas> | mjrosenb, what problems were you seeing with lsp? I tried setting it up recently as well and ran into a few sore spots. for example, it gets in an inconsistent state where the snippet sent for diagnosis will be elided |
| 13:43:00 | <neverwas> | as in corrupted by virtue of being sent too early (i think). |
| 13:43:13 | <neverwas> | so what the server sees is somehow "stale" while the live text in the buffer may be fine but gets underlined as being faulty anyway. |
| 13:43:58 | <neverwas> | To be clear, this is lsp-mode (not eglot), and the version I'm running is likely a few weeks old (or more) |
| 13:45:46 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 13:46:02 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 13:56:15 | → | alx741 joins (~alx741@157.100.93.160) |
| 13:56:41 | → | ian` joins (~user@ool-45779fe5.dyn.optonline.net) |
| 13:56:44 | ian` | is now known as Guest999 |
| 13:57:01 | Guest999 | is now known as bontaq |
| 14:04:59 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:05:08 | → | SIben joins (~SIben@ns3106586.ip-5-135-191.eu) |
| 14:05:43 | × | max22- quits (~maxime@2a01cb08833598001d6a33d2fe2bc13e.ipv6.abo.wanadoo.fr) (Ping timeout: 250 seconds) |
| 14:07:01 | × | xff0x quits (~xff0x@2001:1a81:5283:7b00:6c74:59db:ccc0:34d8) (Ping timeout: 240 seconds) |
| 14:07:19 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:08:10 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:180c:adc:91b3:927a) |
| 14:14:11 | → | deadmarshal joins (~deadmarsh@95.38.230.166) |
| 14:16:36 | → | ub joins (~Thunderbi@p200300ecdf1abbee153a2c4097e8e97e.dip0.t-ipconnect.de) |
| 14:21:57 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 14:23:20 | × | chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 14:23:32 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 14:23:32 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 14:31:11 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 14:39:57 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 14:40:07 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:40:07 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 14:40:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:40:13 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 14:40:24 | → | alx741 joins (~alx741@157.100.93.160) |
| 14:40:38 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:43:17 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 268 seconds) |
| 14:43:50 | → | thevishy joins (~Nishant@2405:201:f005:c007:d93e:9746:14f0:2f69) |
| 14:43:52 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 14:44:16 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 14:48:23 | × | xff0x quits (~xff0x@2001:1a81:5283:7b00:180c:adc:91b3:927a) (Ping timeout: 250 seconds) |
| 14:48:39 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 14:50:16 | → | pfurla joins (~pfurla@177.79.125.203) |
| 14:50:28 | <dminuoso> | Is there some windows/linux/macOS portable mechanism for asking whether a given path is a regular file or a regular direcotry? |
| 14:50:37 | <dminuoso> | I dont care about anything else, really. |
| 14:50:55 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 14:51:47 | × | pfurla_ quits (~pfurla@177.79.122.168) (Read error: Connection reset by peer) |
| 14:54:01 | × | wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
| 14:54:32 | <merijn> | dminuoso: One of the stat() system calls? |
| 14:54:33 | → | wagle joins (~wagle@quassel.wagle.io) |
| 14:55:38 | <dminuoso> | merijn: And Windows? |
| 14:55:48 | <dminuoso> | Or do you suggest I just ifdef my way out of this? |
| 14:55:52 | <geekosaur> | do you care about symlinks? |
| 14:56:07 | <merijn> | dminuoso: Good luck getting a single cross platform API |
| 14:56:26 | <geekosaur> | that said, ifdefs may be your only solution (what merijn said, basically) |
| 14:56:32 | <dminuoso> | My requirements are really simple. I want to naively traverse all files, under the assumption the administrator has not set up loops. |
| 14:56:41 | <dminuoso> | And I want to read these files. |
| 14:57:01 | <dminuoso> | But for sanity I want to skip all these special files like fifos or chararacter devices |
| 14:57:06 | <merijn> | dminuoso: Try changing directory to it and see if it works :p |
| 14:57:17 | × | deadmarshal quits (~deadmarsh@95.38.230.166) (Ping timeout: 250 seconds) |
| 14:57:20 | <merijn> | dminuoso: stat and friend can tell you if something is a special file or not |
| 14:57:26 | <dminuoso> | merijn: Sure, on linux. |
| 14:58:18 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/libraries/directory-1.3.6.2/System-Directory.html#v:doesFileExist may be the best you'll do, assuming you don't care about symlinks or something that is neither file nor directory |
| 14:58:59 | <geekosaur> | on POSIX you need {,l}stat to do any better; on Windows you need to check for reparse points and possibly verify that a reparse point represents a symlink |
| 14:59:24 | <geekosaur> | basically, doing this portably is Hard |
| 15:02:21 | <dminuoso> | reparse points? |
| 15:02:29 | <dminuoso> | What black magic does Win32 have here? |
| 15:03:06 | <geekosaur> | reparse points are how windows implements symlinks, but also how it does other things like network directories (roughly equivalent to a unix mount point) |
| 15:05:06 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/libraries/directory-1.3.6.2/System-Directory.html#v:pathIsSymbolicLink note reference to junction points, which are not symlinks |
| 15:05:32 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:05:35 | <geekosaur> | also file and directory "symlinks" are distinct entities / reparse points on windows |
| 15:06:49 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:07:43 | → | alx741 joins (~alx741@157.100.93.160) |
| 15:08:09 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 15:10:45 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:180c:adc:91b3:927a) |
| 15:15:56 | → | max22- joins (~maxime@2a01cb0883359800604ddf259a1a7168.ipv6.abo.wanadoo.fr) |
| 15:15:57 | × | dolio quits (~dolio@130.44.130.54) (Ping timeout: 268 seconds) |
| 15:15:59 | <sprout> | https://github.com/egel-lang/aoc-2021/blob/main/day14/task2.eg <- Advent of Code, day 14, task 2, solution in Egel. though dicts are overkill on this problem |
| 15:16:08 | <sprout> | https://pasteboard.co/6fErCUImZtkF.png <- 'pretty' colors |
| 15:18:34 | <janus> | what is the connection between haskell and egel? |
| 15:19:11 | <janus> | is it that they both have purely functional parts? |
| 15:19:11 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 15:20:03 | × | _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Read error: Connection reset by peer) |
| 15:21:23 | → | zebrag joins (~chris@user/zebrag) |
| 15:21:35 | × | Athas quits (athas@2a01:7c8:aaac:1cf:fd6:8489:d8da:43d) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:21:46 | → | Athas joins (athas@2a01:7c8:aaac:1cf:fd6:8489:d8da:43d) |
| 15:22:11 | × | xff0x quits (~xff0x@2001:1a81:5283:7b00:180c:adc:91b3:927a) (Ping timeout: 250 seconds) |
| 15:22:56 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:9491:73c8:4b2b:b7f3) |
| 15:23:10 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:23:10 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 15:23:10 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:24:18 | <sprout> | both functional. but because how egel developed it is on a number of things diametrically opposite. eager impure untyped and with reflection (under development) |
| 15:25:51 | → | _xor joins (~xor@dsl-50-5-233-169.fuse.net) |
| 15:26:21 | <sprout> | still slow though. beta/proof of concept code. at some point I'll change the back-end which should give an order and be some factor slower than ghci hopefully |
| 15:27:50 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 15:27:51 | → | juhp joins (~juhp@128.106.188.82) |
| 15:29:10 | × | acidjnk quits (~acidjnk@p200300d0c7271e77ede7a7f9d267d612.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 15:33:04 | → | canta joins (~canta@user/canta) |
| 15:35:31 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 15:37:17 | → | alx741 joins (~alx741@157.100.93.160) |
| 15:39:41 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 252 seconds) |
| 15:41:00 | → | nvmd joins (~nvmd@user/nvmd) |
| 15:43:22 | → | son0p joins (~ff@2800:484:1d81:b700:d40b:900:b387:320) |
| 15:43:32 | → | hololeap_ joins (~hololeap@user/hololeap) |
| 15:43:45 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 15:45:07 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 15:45:19 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 15:48:11 | × | raehik quits (~raehik@cpc144538-stap14-2-0-cust361.12-2.cable.virginm.net) (Ping timeout: 256 seconds) |
| 15:49:41 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 15:59:51 | × | chele quits (~chele@user/chele) (Ping timeout: 252 seconds) |
| 16:02:47 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:02:51 | → | josemotanet joins (~jose@2001:8a0:ee85:a00:d4ef:b473:6a8a:ba2e) |
| 16:02:56 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 16:03:29 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds) |
| 16:07:40 | → | zaquest joins (~notzaques@5.130.79.72) |
| 16:07:53 | → | Whatever009 joins (~fuzzypixe@ensi-libre-service-019.ensimag.fr) |
| 16:13:33 | → | Guest19 joins (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) |
| 16:14:23 | × | bliminse quits (~bliminse@host86-162-147-196.range86-162.btcentralplus.com) (Quit: leaving) |
| 16:17:03 | × | lbseale_ quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
| 16:17:33 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2a7d:20d:33d5:1d47) (Quit: WeeChat 2.8) |
| 16:20:11 | <snake> | is there a doc or something that demonstrates all the places where i can use curly braces and semicolons in haskell? |
| 16:21:42 | <merijn> | snake: Well, there's mostly documentation that explains on how to use indentation instead of braces, but that should also mostly explain the reverse :) |
| 16:21:48 | <merijn> | snake: https://en.wikibooks.org/wiki/Haskell/Indentation |
| 16:22:08 | <merijn> | And of course the (more formal) version in the report: https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17800010.3 |
| 16:23:07 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 16:23:19 | → | MoC joins (~moc@user/moc) |
| 16:24:37 | × | mncheck quits (~mncheck@193.224.205.254) (Remote host closed the connection) |
| 16:26:36 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 16:26:57 | → | bliminse joins (~bliminse@host86-162-147-196.range86-162.btcentralplus.com) |
| 16:27:37 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 250 seconds) |
| 16:30:46 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:33:56 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 16:34:25 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 16:34:28 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Remote host closed the connection) |
| 16:35:20 | × | nek0 quits (~nek0@nek0.eu) (Quit: The Lounge - https://thelounge.chat) |
| 16:35:34 | <snake> | merijn, what is wrong with my main function? i'm getting "parse error on print" https://dpaste.com/9FEUGP7QS |
| 16:36:43 | × | cosimone` quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Ping timeout: 250 seconds) |
| 16:37:16 | <merijn> | snake: You have no braces on let |
| 16:37:22 | <c_wraith> | snake: that's what happens when you use braces and semicolons instead of layout - if you don't use all of them, you get parse errors |
| 16:37:31 | <merijn> | let { nums = toList myLines } |
| 16:37:32 | <snake> | oh i see |
| 16:37:37 | <snake> | sad lol |
| 16:37:58 | → | cosimone joins (~user@93-47-231-203.ip115.fastwebnet.it) |
| 16:38:33 | <snake> | why am i addicted to writing in a new lang i dislike |
| 16:41:01 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:41:38 | <snake> | maybe i'm a workaholic LOL |
| 16:42:27 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 16:43:51 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:44:42 | → | nek0 joins (~nek0@nek0.eu) |
| 16:48:42 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 16:53:16 | <merijn> | bah |
| 16:53:22 | <merijn> | My solution for today seems insufficiently lazy |
| 16:54:32 | × | fr33domlover quits (~fr33@2.55.142.29) (Ping timeout: 240 seconds) |
| 16:54:58 | → | emf joins (~emf@cpe-174-109-36-85.nc.res.rr.com) |
| 16:57:40 | <c_wraith> | What laziness goal do you have for it? |
| 16:57:41 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 16:58:00 | <merijn> | c_wraith: Not materialising several GB of state :p |
| 16:58:16 | <merijn> | but I think more details is probably a spoiler? |
| 16:58:32 | <merijn> | I seem to have gotten it lazy enough no, albeit still slow |
| 16:58:58 | → | emf_ joins (~emf@2620:10d:c091:480::1:3f40) |
| 16:59:49 | <c_wraith> | It's exponential growth. It's gonna be slow. |
| 17:00:10 | × | emf quits (~emf@cpe-174-109-36-85.nc.res.rr.com) (Ping timeout: 268 seconds) |
| 17:00:57 | <merijn> | Yeah, but it's, like, a solid minute now, generally AOC solutions aren't *that* slow |
| 17:01:25 | <c_wraith> | well, you don't *have* to do it the slow way. |
| 17:01:38 | ← | snake parts (~snake@user/snake) (Leaving) |
| 17:02:14 | <c_wraith> | I saw someone stick with the slow approach and use a kind of meet-in-the-middle approach to cut the exponent in half. |
| 17:02:25 | × | altern quits (~Sergii@altern.corbina.com.ua) (Ping timeout: 256 seconds) |
| 17:03:30 | <c_wraith> | that was very clever for still needing exponential allocation |
| 17:03:56 | × | DNH quits (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:04:04 | × | Guest19 quits (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) (Quit: Client closed) |
| 17:06:43 | → | alx741 joins (~alx741@181.199.42.79) |
| 17:07:31 | → | DNH joins (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) |
| 17:09:33 | → | lavaman joins (~lavaman@98.38.249.169) |
| 17:11:02 | <sprout> | it's less than .5 sec in egel which is a slow... language... you could use maps instead of lists |
| 17:11:02 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 17:11:19 | <sprout> | though I think that's overkill on this problem |
| 17:12:37 | × | alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
| 17:13:12 | → | alx741 joins (~alx741@181.199.42.79) |
| 17:14:19 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 17:15:46 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:20:50 | → | gdown joins (~gavin@94.140.8.38) |
| 17:22:39 | × | alx741 quits (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
| 17:23:46 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 17:24:06 | × | DNH quits (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:24:58 | → | notabled1 joins (~notabledu@ares.dbalan.in) |
| 17:26:19 | → | xkuru joins (~xkuru@user/xkuru) |
| 17:26:54 | → | deadmarshal joins (~deadmarsh@95.38.230.166) |
| 17:33:32 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 17:37:37 | × | josemotanet quits (~jose@2001:8a0:ee85:a00:d4ef:b473:6a8a:ba2e) (Quit: WeeChat 3.3) |
| 17:37:52 | → | DNH joins (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) |
| 17:39:29 | → | alx741 joins (~alx741@157.100.93.160) |
| 17:41:55 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 17:46:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:53:50 | → | Akiva joins (~Akiva@user/Akiva) |
| 17:58:22 | → | dolio joins (~dolio@130.44.130.54) |
| 18:02:58 | peutri_ | is now known as peutri |
| 18:07:27 | → | econo joins (uid147250@user/econo) |
| 18:07:41 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:07:41 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 18:08:40 | → | briandaed joins (~root@185.234.208.208.r.toneticgroup.pl) |
| 18:08:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 18:10:25 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 18:10:35 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:10:52 | → | nfd joins (~nfd@user/nfd) |
| 18:11:13 | <merijn> | bah, I thought I had an ingenious solution, but clearly not >.> |
| 18:12:48 | <dsal> | @tell snake You might not dislike it so much if you didn't work against how we do things. Try doing things the way we do things and see where that takes you. |
| 18:12:48 | <lambdabot> | Consider it noted. |
| 18:15:47 | <EvanR> | had to get some sleep before getting day 14 part 2 |
| 18:15:51 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 18:15:53 | <EvanR> | my poor rankings |
| 18:17:14 | <dsal> | I had a tiny power glitch which took out my ailing UPS running my networking equipment right as I was submitting my part 2 answer. |
| 18:17:25 | <dsal> | The good news is that the part 2 answer I was submitting was wrong. |
| 18:18:06 | <merijn> | EvanR: I'm still fighting it >.> |
| 18:18:48 | <EvanR> | I have an ingenious solution but the margin of the power failure is too small to fit it |
| 18:19:13 | <dsal> | I got the right answer and submitted it via phone hot spot. |
| 18:19:27 | <dsal> | Power's still out here, but I almost wouldn't've noticed if it weren't for that stupid UPS. |
| 18:19:33 | <EvanR> | how did you solve it without power |
| 18:20:53 | <EvanR> | phone haskell? xD |
| 18:21:38 | <dsal> | I have a Powerwall, but was working my laptop anyway. The thing that *didn't* have power was my networking equipment / Starlink. |
| 18:23:21 | × | bollu quits (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:23:34 | → | earendel joins (uid498179@user/earendel) |
| 18:25:55 | → | alx741 joins (~alx741@157.100.93.160) |
| 18:29:44 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 18:30:33 | × | briandaed quits (~root@185.234.208.208.r.toneticgroup.pl) (Quit: Lost terminal) |
| 18:31:15 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 18:36:04 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 18:39:16 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
| 18:40:08 | <oats> | Optics By Example is an excellent book |
| 18:40:45 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 18:43:29 | <dsal> | ++ |
| 18:44:10 | <dsal> | I was looking at propagators yesterday and the author also wrote this library: |
| 18:44:13 | <dsal> | @package mad-props |
| 18:44:14 | <lambdabot> | https://hackage.haskell.org/package/mad-props |
| 18:45:19 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 18:48:25 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:48:28 | <EvanR> | I went to order this book and found it's E only |
| 18:50:48 | <dsal> | LOL at the guy who doesn't have a printer. |
| 18:51:50 | → | jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net) |
| 18:52:10 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:52:37 | <EvanR> | it literally has 420 pages |
| 18:53:38 | × | mbuf quits (~Shakthi@122.178.176.47) (Quit: Leaving) |
| 18:54:49 | → | alx741 joins (~alx741@157.100.93.160) |
| 19:00:09 | × | xff0x quits (~xff0x@2001:1a81:5283:7b00:9491:73c8:4b2b:b7f3) (Ping timeout: 250 seconds) |
| 19:01:09 | → | xff0x joins (~xff0x@2001:1a81:5283:7b00:fc6:4766:ca7:9337) |
| 19:04:29 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:04:31 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 19:06:04 | <earendel> | you are still misusing the word literaly *rolleyes |
| 19:07:04 | <earendel> | the damn printer mafia ink is expensive. |
| 19:07:38 | × | max22- quits (~maxime@2a01cb0883359800604ddf259a1a7168.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds) |
| 19:07:38 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 19:08:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 19:08:23 | <dsal> | It's a book. How much more literal can it be? |
| 19:08:50 | <EvanR> | I literally saw a stat on the page for it that literally says 420 pages |
| 19:10:00 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:10:48 | <monochrom> | It is literally not a physics book. :) |
| 19:11:31 | <dsal> | It's a great coffee table photography book. |
| 19:11:37 | × | madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 19:13:58 | <earendel> | literally is the opposite of figuratively. so if you don't use a metaphor, but want to express you mean it literally not figuratively it is a superfluos adverb |
| 19:14:50 | <EvanR> | the number of ways to use literally seems open ended |
| 19:14:58 | <EvanR> | to use literally wrong* |
| 19:15:18 | <EvanR> | that has become it's defining characteristic |
| 19:15:25 | <earendel> | this guy is literally melting down.. would mean he is changing his aggregate-state from solid to liquid. |
| 19:15:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 19:15:35 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 19:15:37 | <monochrom> | It is figuratively an optics book. Are you happy now? |
| 19:15:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:16:23 | <earendel> | it just defines your inability to properly express yourself. |
| 19:16:47 | <[exa]> | is literature allowed to be literal? |
| 19:17:09 | <earendel> | monochom: i don't get it. ^^ maybe i'm not familiar with that figure. |
| 19:17:43 | <monochrom> | I want to say yes, but seeing that all the literature people are deeply into allegories, I think in practice no, they insist to be figurative. |
| 19:17:48 | <EvanR> | earendel you're like a canary in a coal mine |
| 19:18:05 | <[exa]> | I'll separate the figures from my literals later today |
| 19:18:36 | <EvanR> | non-literally |
| 19:19:18 | <earendel> | great. another satisfied customer |
| 19:19:39 | <monochrom> | class Applicative f => Figurative f where burrito :: a -> f a; unwrap :: f (f a) -> f a -- >:) |
| 19:20:14 | <EvanR> | i though roll was f (f a) -> f a and unroll was f a -> f (f a) |
| 19:20:22 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:20:25 | <monochrom> | Figurative burrito unwrapping law: unwrap . burrito = id |
| 19:20:34 | <[exa]> | there was some coliteral damage to the semantics |
| 19:20:44 | <Clint> | now i want a littoral burrito |
| 19:20:47 | <monochrom> | Oh, "roll" is probably better, I didn't think of it! |
| 19:21:15 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 19:21:16 | <geekosaur> | my literals have figures |
| 19:21:28 | <Clint> | significant ones? |
| 19:21:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:21:54 | <monochrom> | In a graphical programming language, you have figure literals >:) |
| 19:23:57 | → | alx741 joins (~alx741@157.100.93.160) |
| 19:24:07 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:24:42 | <earendel> | it also is a sign of inflationary superlatives in language. so, sometimes just leaving them out can make the break gaining the relvance of your expression (in the eye of the beholder) |
| 19:25:28 | <earendel> | you can say really. it really has 420 pages? yes, there's no joke coming whatsoever. |
| 19:25:43 | <monochrom> | What's your problem? |
| 19:26:29 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 19:27:01 | <earendel> | hm? just talking. |
| 19:27:15 | <geekosaur> | english is all about the unmarked metaphor |
| 19:27:48 | <monochrom> | Please stop over-analyzing what was just having fun making bad jokes and bad puns. |
| 19:28:22 | <monochrom> | All of us already know how "really" and "literally" are abused, you're preaching to the choir, thanks but no thanks. |
| 19:28:24 | <earendel> | i see. |
| 19:29:56 | <earendel> | i did analyze a joke? |
| 19:31:44 | <earendel> | maybe your analysis of my character is a bit premature, giving the fact i just joined this channel and we never spoke before. |
| 19:32:05 | <monochrom> | Are you done? |
| 19:32:50 | <geekosaur> | you, uh, filled up most of the channel and possibly derailed a discussion over it |
| 19:32:52 | <earendel> | lol. |
| 19:33:13 | <Clint> | yes, but he only did that for 40 minutes |
| 19:33:29 | <earendel> | was it me? |
| 19:33:44 | <earendel> | oops. |
| 19:34:00 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
| 19:34:14 | <EvanR> | I prefer paper books even though I don't have a bookshelf |
| 19:34:43 | <EvanR> | I don't really have a convenient way to read 420 pages electronically :( |
| 19:35:26 | <Clint> | i gave up on paper books and ereaders ages ago |
| 19:35:32 | <monochrom> | I am paradoxical about paper books vs electronic books. Paper books feel better in hand. Electronic books are more mobile, seachable, copy-paste-able. |
| 19:36:20 | <monochrom> | Eventually I broke the tie by "I have run out of room for paper books". |
| 19:36:36 | <systemfault> | I usually buy the book... and steal the electronic version :/ They should really give you the electronic version when you buy the paper book. |
| 19:36:49 | <EvanR> | really, I've camera-ed a page and screenshotted a pdf, but copying text out of a pdf is hit or miss |
| 19:37:08 | <EvanR> | and searching paper books mainly involves accessing my photographic memory xD |
| 19:37:08 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 19:37:28 | <Clint> | you might have to read the book first for that to work |
| 19:37:30 | <monochrom> | Big volumes like CLRS make me feel guilty when I teach a course and say "the textbook is CLRS" and if the students go the the paper one it means they have like an extra 1kg to carry in their backpacks. |
| 19:37:35 | <EvanR> | true |
| 19:37:39 | → | kayvan joins (~kayvan@52-119-115-185.PUBLIC.monkeybrains.net) |
| 19:38:06 | <monochrom> | (And if I also declare "the exam is open book", you can be sure I am indirectly incentivizing the students to go for the paper book.) |
| 19:38:26 | <EvanR> | which optics library does the book Optics By Example use? |
| 19:38:35 | <monochrom> | (This is part of the reason why I now declare "you can bring 2 aid sheets to the exam".) |
| 19:38:41 | × | kayvan quits (~kayvan@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 19:39:03 | <monochrom> | systemfault: Yeah, I agree too. |
| 19:39:13 | → | nolrai joins (~nolrai@73.240.1.39) |
| 19:39:56 | <earendel> | in my exams you would be allowed to use internet. |
| 19:40:31 | <EvanR> | I'd end up distracted on IRC or something |
| 19:40:48 | <nolrai> | Hey so when building with stack I see this "ghc-pkg.exe: C:\Users\XXXX\haskell\Shades\.stack-work\install\791f0cf9\pkgdb\package.cache.lock: openBinaryFile: resource busy (file is locked)" or equivalent a lot, anyone know whats up with it and if I should do something about it? |
| 19:42:33 | × | burnsidesLlama quits (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
| 19:43:44 | → | max22- joins (~maxime@2a01cb088335980077ae04132abb6848.ipv6.abo.wanadoo.fr) |
| 19:44:49 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 19:45:11 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 19:55:49 | → | alx741 joins (~alx741@157.100.93.160) |
| 19:56:12 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 19:57:34 | × | nunggu quits (~q@gateway/tor-sasl/nunggu) (Remote host closed the connection) |
| 19:57:46 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 20:01:59 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
| 20:04:57 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:05:27 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds) |
| 20:06:42 | → | juhp joins (~juhp@128.106.188.82) |
| 20:08:02 | <merijn> | bleh, solved part 2, but not happy with the result. Takes about 40s to complete |
| 20:08:02 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:08:38 | → | alx741 joins (~alx741@157.100.93.160) |
| 20:09:04 | <EvanR> | dang |
| 20:09:23 | <merijn> | I feel it should be possible to go much faster |
| 20:09:30 | <EvanR> | better than my approach last night which might have taken days or months to finish xD |
| 20:10:01 | <merijn> | ah |
| 20:10:14 | <merijn> | I have an idea that might make it faster, but I can't be arsed atm >.> |
| 20:12:01 | × | nolrai quits (~nolrai@73.240.1.39) (Remote host closed the connection) |
| 20:15:03 | <EvanR> | I'm curious how you got 40s |
| 20:15:11 | <EvanR> | but it might be spoilery for here |
| 20:17:24 | → | glebg joins (~user@85-192-130-19.dsl.esoo.ru) |
| 20:17:38 | × | raghavgururajan quits (9fd51d1ea8@user/raghavgururajan) (Ping timeout: 260 seconds) |
| 20:18:01 | <merijn> | EvanR: https://github.com/merijn/AdventOfCode/blob/master/Day14.hs |
| 20:18:45 | × | singpolyma quits (8a1e37e5a6@tilde.team/user/singpolyma) (Ping timeout: 268 seconds) |
| 20:20:06 | <EvanR> | impressive |
| 20:20:26 | <EvanR> | you did 20 rounds, not 40? |
| 20:20:45 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:20:49 | <merijn> | I'll answer in PM to avoid spoilers :p |
| 20:22:31 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 20:24:15 | → | nunggu joins (~q@gateway/tor-sasl/nunggu) |
| 20:29:56 | × | gdown quits (~gavin@94.140.8.38) (Remote host closed the connection) |
| 20:33:46 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 20:36:16 | × | puke quits (~puke@user/puke) (Remote host closed the connection) |
| 20:36:31 | → | puke joins (~puke@user/puke) |
| 20:38:46 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 20:39:02 | × | thevishy quits (~Nishant@2405:201:f005:c007:d93e:9746:14f0:2f69) (Read error: Connection reset by peer) |
| 20:39:16 | → | alx741 joins (~alx741@157.100.93.160) |
| 20:39:46 | → | y04nn joins (~y04nn@92.223.89.196) |
| 20:39:50 | → | thevishy joins (~Nishant@2405:201:f005:c007:49c7:f8b1:7727:93e) |
| 20:40:41 | × | Athas quits (athas@2a01:7c8:aaac:1cf:fd6:8489:d8da:43d) (Quit: ZNC 1.8.2 - https://znc.in) |
| 20:40:44 | → | lavaman joins (~lavaman@98.38.249.169) |
| 20:40:50 | → | Athas joins (athas@sigkill.dk) |
| 20:41:54 | × | ft quits (~ft@shell.chaostreff-dortmund.de) (Quit: leaving) |
| 20:42:07 | → | ft joins (~ft@shell.chaostreff-dortmund.de) |
| 20:44:41 | → | gentauro joins (~gentauro@user/gentauro) |
| 20:45:07 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 20:48:02 | × | Whatever009 quits (~fuzzypixe@ensi-libre-service-019.ensimag.fr) (Ping timeout: 240 seconds) |
| 20:48:17 | → | burnsidesLlama joins (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
| 20:50:16 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 20:51:53 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:53:00 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:56:24 | <energizer> | (fmap (*3) (+100)) 1 gives 303. is there a function that i can replace fmap with to get 103? |
| 20:58:09 | <EvanR> | (+103) |
| 20:58:24 | <EvanR> | (+302) |
| 20:58:43 | <merijn> | (.)? :p |
| 20:58:49 | <merijn> | oh, wait, no |
| 20:58:53 | <merijn> | flip (.) :p |
| 20:58:54 | <EvanR> | (*303) |
| 21:02:13 | <sprout> | merijn: https://github.com/egel-lang/aoc-2021/blob/main/day14/task2.eg <- just adapt this? if it runs fast in egel it is certainly bound to run fast in haskell |
| 21:02:22 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 21:02:41 | × | _ht_ quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:03:03 | <sprout> | but I get the sentiment. I don't look at spoilers, fix a solution, throw it over the hedge. cannot be buggered to rewrite either |
| 21:04:07 | × | andreas303 quits (andreas303@ip227.orange.bnc4free.com) (Ping timeout: 265 seconds) |
| 21:04:11 | × | xacktm quits (xacktm@user/xacktm) (Ping timeout: 252 seconds) |
| 21:04:12 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 21:04:29 | <sprout> | happened to me yesterday, some posted a really nice solution in haskell |
| 21:04:53 | <EvanR> | on some days you get your star and move on, on others you get nerd sniped |
| 21:05:31 | <geekosaur> | energizer: flip fmap |
| 21:05:34 | <geekosaur> | ? |
| 21:07:29 | <energizer> | not sure if that's what i mean. i'm reading a blog post that says "This gives us the intuition that fmap over functions is just composition." so i'm guessing there's some opposite of functor that has an opposite of fmap? |
| 21:08:13 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 250 seconds) |
| 21:08:23 | → | alx741 joins (~alx741@157.100.93.160) |
| 21:09:14 | <dibblego> | @type (<&>) |
| 21:09:15 | <lambdabot> | Functor f => f a -> (a -> b) -> f b |
| 21:09:16 | <energizer> | the blog post in question https://blog.ssanj.net/posts/2018-03-05-functor-applicative-and-monad-instances-for-reader.html |
| 21:09:31 | <EvanR> | gotta love law of trichotomy using floats https://paste.tomsmeding.com/ZSsda7Zn |
| 21:09:39 | <dibblego> | @type contramap |
| 21:09:40 | <lambdabot> | Contravariant f => (a -> b) -> f b -> f a |
| 21:10:19 | → | pfurla_ joins (~pfurla@172.58.160.35) |
| 21:10:31 | <EvanR> | I hate it when people say don't use == on floats xD |
| 21:11:11 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds) |
| 21:13:01 | → | MrNobody_0000000 joins (~MrNobody@user/mrnobody-0000000/x-9129771) |
| 21:13:02 | × | pfurla quits (~pfurla@177.79.125.203) (Ping timeout: 240 seconds) |
| 21:13:29 | → | prrxddq[m] joins (~prrxddqma@2001:470:69fc:105::1:4f72) |
| 21:13:33 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 21:14:08 | → | kjak_ joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 21:14:09 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 21:14:17 | × | kjak_ quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Client Quit) |
| 21:14:17 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Client Quit) |
| 21:14:38 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 21:17:20 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:21:25 | → | acidjnk joins (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) |
| 21:23:01 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 21:23:23 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:f0cf:5664:8ee5:8e87) (Ping timeout: 250 seconds) |
| 21:26:49 | → | epolanski joins (uid312403@id-312403.helmsley.irccloud.com) |
| 21:27:35 | <energizer> | isn't it a bad idea to use == on floats? |
| 21:29:48 | → | raghavgururajan joins (9fd51d1ea8@user/raghavgururajan) |
| 21:30:19 | <dolio> | Yeah. |
| 21:31:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 21:31:04 | → | xacktm joins (xacktm@user/xacktm) |
| 21:33:15 | <EvanR> | lol |
| 21:33:28 | → | yuyua32 joins (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
| 21:33:46 | × | MrNobody_0000000 quits (~MrNobody@user/mrnobody-0000000/x-9129771) (Quit: MrNobody_0000000) |
| 21:34:24 | <yuyua32> | how do haskell functions resemble mathmetical functions? I was reading about Haskell and read that its good for abstract algebra/mathemeticians could someone explain this |
| 21:34:35 | <EvanR> | I'll just ship a game that says if x < y do this, x > y do that, that's all xD |
| 21:34:42 | <EvanR> | should work most of the time |
| 21:34:52 | <janus> | EvanR: just write that snippet with "case comparing a b of` instead, then the compiler will make sure you won't have to write the 'otherwise' case ;) |
| 21:35:01 | <EvanR> | lol |
| 21:35:17 | <EvanR> | wth happens when you compare ... |
| 21:35:32 | <dolio> | Covering x<y and x>y isn't actually all the cases, right? |
| 21:35:44 | <janus> | > compare (0/0) (0/0) |
| 21:35:45 | <lambdabot> | GT |
| 21:35:48 | <EvanR> | yeah they can be equal |
| 21:35:51 | <EvanR> | hence the == test |
| 21:35:54 | <janus> | (0/0) > (0/0) |
| 21:35:56 | <janus> | > (0/0) > (0/0) |
| 21:35:57 | <dolio> | Even that isn't all of them. |
| 21:35:58 | <lambdabot> | False |
| 21:36:32 | <EvanR> | why do I even bother pasting anything lol |
| 21:36:51 | <EvanR> | I posted a "law of trichotomy" with 4 cases |
| 21:37:25 | <EvanR> | one of which is supposedly "a bad idea" |
| 21:37:39 | <dolio> | Yeah, it is a bad idea. |
| 21:37:43 | <EvanR> | k, removed xD |
| 21:39:45 | <zero> | > 0/0 |
| 21:39:47 | <lambdabot> | NaN |
| 21:39:48 | → | alx741 joins (~alx741@157.100.93.160) |
| 21:40:05 | <zero> | > compare NaN NaN |
| 21:40:07 | <lambdabot> | error: Data constructor not in scope: NaNerror: Data constructor not in scop... |
| 21:40:13 | <EvanR> | GT |
| 21:40:16 | <EvanR> | apparently |
| 21:40:43 | <zero> | > flip compare (0/0) (0/0) |
| 21:40:44 | <lambdabot> | GT |
| 21:40:49 | <zero> | :/ |
| 21:40:52 | <EvanR> | it's GT itself |
| 21:41:05 | <dolio> | The reason that people give that advice is that some of the cases where x<y and x>y return True should actually be considered x==y cases, because they might arise from calculating x and y with different associativities and such. |
| 21:41:32 | <tomsmeding> | background: https://hackage.haskell.org/package/ghc-prim-0.6.1/docs/src/GHC.Classes.html#line-458 |
| 21:41:32 | <zero> | and rounding errors |
| 21:41:36 | <EvanR> | yes it seems people think all equality tests should be closeness tests |
| 21:41:51 | <tomsmeding> | _usually_ they should be, not always |
| 21:42:09 | <EvanR> | still have never run into a case where that would be correct |
| 21:42:14 | <tomsmeding> | closeness? |
| 21:42:38 | <EvanR> | like, it would move the weird test case over by delta, ime |
| 21:42:47 | <zero> | ? |
| 21:42:47 | <tomsmeding> | quite true |
| 21:42:48 | → | andreas303 joins (andreas303@ip227.orange.bnc4free.com) |
| 21:43:25 | × | cosimone quits (~user@93-47-231-203.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1)) |
| 21:44:35 | <tomsmeding> | most of those "don't use X" rules are more accurately written as "if you use X, be sure to have argument why it is better than the alternatives, because this may be non-intuitive" |
| 21:45:02 | × | alx741 quits (~alx741@157.100.93.160) (Ping timeout: 240 seconds) |
| 21:45:44 | <janus> | yeah. if you use Ord you better remember to write which instances your algorithm won't work with. ;) |
| 21:46:33 | → | zyzzyxdonta joins (~zyzzyxdon@2a02:3036:7:5279:ff4:1db4:c08b:ca7d) |
| 21:47:00 | × | zyzzyxdonta quits (~zyzzyxdon@2a02:3036:7:5279:ff4:1db4:c08b:ca7d) (Client Quit) |
| 21:47:07 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:47:07 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 21:47:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:47:42 | → | Tuplanolla joins (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) |
| 21:49:00 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 21:50:34 | <energizer> | `data ITree a = Leaf (Int -> a) | Node [ITree a]` is this a data structure i might recognize as having some name? |
| 21:57:46 | → | alx741 joins (~alx741@181.199.42.79) |
| 21:57:59 | <energizer> | am i right in thinking "functor" means something different in haskell than in math? fmap seems like a functor, not the "Functor" `f` that implements `fmap`. what is the reason for this naming convention? |
| 21:58:35 | <monochrom> | Yes and no. |
| 21:58:48 | <nosewings> | The term "Functor" in Haskell comes from math, but it basically just means "anything that has a map function" |
| 21:59:33 | <energizer> | yeah seems confusing |
| 21:59:54 | <dsal> | Functor means "that datastructure functs" |
| 22:00:04 | <nosewings> | I honestly have no idea where the use of "functor" to mean "first-class function" comes from |
| 22:00:25 | <janus> | dsal: functs is german for 'works' right? |
| 22:00:27 | <monochrom> | The standard library type class Functor is better known in math as endofunctor. Moreover, the notation is a bit different: Whereas the object map is still called Maybe or [] for example, the morphism map is called "fmap" regardless of whether it's Maybe or [] or other examples. |
| 22:01:28 | <monochrom> | Moreover you can further argue that the Functor type class is only for endofunctors on one single hardcoded category: the objects are Haskell types, the morphisms are Haskell functions. |
| 22:02:17 | <monochrom> | OTOH you can counter-argue that since that's an example of functor, the name is not wrong either. |
| 22:02:34 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:03:12 | <monochrom> | At the end you just have to meditate on the wisdom behind "Tuesday: it's like Monday, but different" |
| 22:03:26 | <monochrom> | http://www.vex.net/~trebla/humour/tautologies.html |
| 22:03:59 | → | ph88 joins (~ph88@2a02:8109:9e00:71d0:943d:5b05:e9f7:79b5) |
| 22:04:06 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 22:04:17 | <ph88> | I want to keep tracked of which pieces of data have been synced with a server. Would it be better to put a sync field into the item record or better to use a type like data Sync a = Unsynced a | Synced a ? |
| 22:07:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 22:07:17 | → | lavaman joins (~lavaman@98.38.249.169) |
| 22:11:06 | → | codolio joins (~dolio@130.44.130.54) |
| 22:12:16 | × | dolio quits (~dolio@130.44.130.54) (Read error: Connection reset by peer) |
| 22:12:24 | codolio | is now known as dolio |
| 22:14:54 | → | zincy_ joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com) |
| 22:17:43 | <dsal> | ph88: too many depends. Just do one and then later realize the other was better. :) |
| 22:18:05 | <monochrom> | hehe, the other pasture is always greener |
| 22:18:23 | <monochrom> | I was also thinking "do both". |
| 22:18:38 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 22:18:59 | × | emf_ quits (~emf@2620:10d:c091:480::1:3f40) (Ping timeout: 252 seconds) |
| 22:19:03 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
| 22:19:37 | <monochrom> | Do you want to know a 3rd way that is more painful? |
| 22:19:46 | × | zincy_ quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection) |
| 22:20:01 | × | yuyua32 quits (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
| 22:21:00 | <monochrom> | Consider turning on DataKinds and define "data Sync = Unsynced | Synced" but use it as a kind so define your actual data type as "data D (s :: Sync) = Ctor ..." so "x :: D Synced" is synced and "y :: D Unsynced" is unsynced. |
| 22:23:28 | × | michalz quits (~michalz@185.246.204.109) (Remote host closed the connection) |
| 22:24:29 | → | emf joins (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) |
| 22:25:07 | × | pfurla_ quits (~pfurla@172.58.160.35) (Quit: gone to sleep. ZZZzzz…) |
| 22:26:18 | × | takuan_dozo quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:28:25 | → | emf_ joins (~emf@2620:10d:c091:480::1:9cd9) |
| 22:28:53 | × | emf quits (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) (Ping timeout: 252 seconds) |
| 22:30:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
| 22:33:49 | <ph88> | Cool idea =) |
| 22:36:32 | <dsal> | I've never used DataKinds. It's one of those things i try to use now and then and then realize it's not actually helping. |
| 22:37:02 | → | tripa[m] joins (~tripamatr@2001:470:69fc:105::1:4f7e) |
| 22:41:03 | <janus> | dsal: you don't like servant? |
| 22:41:32 | → | pfurla joins (~pfurla@172.58.176.86) |
| 22:41:53 | <dsal> | janus: I've never used it on purpose. |
| 22:42:37 | <dsal> | I do most little web stuff with Scotty. |
| 22:42:49 | <dsal> | It seems like a lot less work. |
| 22:43:25 | <janus> | it doesn't give you the same level of safety though |
| 22:44:05 | <janus> | the 'less work' depends on what you're doing |
| 22:44:17 | × | arahael quits (~arahael@27-32-144-20.tpgi.com.au) (Ping timeout: 252 seconds) |
| 22:45:10 | <monochrom> | The most advanced (least elementary) type-level technique I have ever used is phantom-typed GADTs, e.g., "data Expr a where IntLit :: Int -> Expr Int; GT :: Expr a -> Expr a -> Expr Bool" |
| 22:46:41 | <monochrom> | But yeah, this is more about reflecting what I use Haskell for. |
| 22:47:11 | <monochrom> | Or what safety I care about in my Haskell code. |
| 22:48:12 | <janus> | i know of a cryptographic multi-signature protocol where there is an intermediate nonce which can't be used twice, or the private key is inferrable |
| 22:48:27 | <janus> | i thought this would be a nice application of linearTypes but Cale once said that it should be doable with ST also |
| 22:48:36 | <janus> | what would you use in a situation like that? |
| 22:49:34 | <monochrom> | This one I think linear typing is more direct. |
| 22:50:06 | <monochrom> | I don't think ST can express it, but I may be wrong, but if I'm wrong, I still think the solution is indirect. |
| 22:50:54 | <janus> | well the ST-like context could keep track of whether operations that could potentially leak the nonce are executed more than once |
| 22:51:01 | <monochrom> | Right? Linear typing has "%1" staring right into your face. :) |
| 22:51:46 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 22:51:47 | <janus> | if the ST-like context doesn't allow for extracting the nonce out, the API should be safe then |
| 22:52:01 | <janus> | i agree that linear typing seems more direct, but it is also a newer and more unstable feature |
| 22:52:21 | <janus> | you can't have 'let' in a linear do block iirc |
| 22:53:27 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds) |
| 22:53:38 | <jackdk> | but you could use the nonce within an st-like block twice by accident still? |
| 22:54:22 | <janus> | jackdk: no because the 'executor' of this ST-like type would keep track of which operations 'use' the nonce |
| 22:55:00 | <janus> | jackdk: then it could just count, and if it sees more than one use, it crashes and says PC LOAD LETTER :P |
| 22:55:41 | <janus> | don't really know if this i should call it 'ST-like' since it wouldn't really have need the impredicative forall or anything, hmm |
| 22:55:52 | <jackdk> | Right, but unless you're doing typelevel indexed monad-ish stuff you're looking at runtime crashes instead of compile errors? |
| 22:56:11 | <janus> | yeah i guess so, so that is a real disadvantage |
| 22:56:24 | <jackdk> | or if you can get away without a monad, a free applicative would let you inspect the computation before you try to run it |
| 22:56:43 | <jackdk> | still runtime crashes, though |
| 22:56:58 | → | pfurla_ joins (~pfurla@2804:18:5854:5897:8ac:66e0:c04d:6ee5) |
| 22:57:32 | <janus> | i wonder if it is even doable with linear typing. because presumably you'd need to have it in a monad transformer stack such that the intermediate nonces could be sent across the network. and that shouldn't be part of the cryptographic api itself |
| 22:58:15 | <janus> | i guess it should work since they would just be pure linear functions that could be used in any context |
| 23:00:32 | × | pfurla quits (~pfurla@172.58.176.86) (Ping timeout: 240 seconds) |
| 23:02:01 | × | kuribas quits (~user@ptr-25vy0i8khbpxjegyagx.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 23:02:03 | → | pfurla joins (~pfurla@172.58.110.204) |
| 23:02:46 | → | arahael joins (~arahael@203.158.51.1) |
| 23:04:13 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 23:04:34 | × | Katarushisu quits (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
| 23:05:03 | <janus> | what happens if a Haskell process forks while linear bindings are alive? it would break safety in this case :O |
| 23:05:10 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
| 23:05:11 | × | pfurla_ quits (~pfurla@2804:18:5854:5897:8ac:66e0:c04d:6ee5) (Ping timeout: 252 seconds) |
| 23:05:33 | × | y04nn quits (~y04nn@92.223.89.196) (Ping timeout: 252 seconds) |
| 23:05:39 | → | Katarushisu joins (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
| 23:05:42 | × | ub quits (~Thunderbi@p200300ecdf1abbee153a2c4097e8e97e.dip0.t-ipconnect.de) (Quit: ub) |
| 23:06:05 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
| 23:06:10 | <geekosaur> | I would expect both forkIO and forkProcess to be unsafe in a linear context |
| 23:06:15 | → | mikail joins (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
| 23:06:25 | <monochrom> | Yeah I don't know of the interaction between linear typing and IO and forking. I have only heard that the IO exception system is a backdoor. I haven't bothered to ask for an example. |
| 23:06:52 | <monochrom> | And too lazy to study one. :) |
| 23:07:05 | <monochrom> | Category theory is so much easier! |
| 23:07:06 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
| 23:08:37 | × | gehmehgeh quits (~user@user/gehmehgeh) (Client Quit) |
| 23:09:11 | → | pfurla_ joins (~pfurla@2804:18:5854:5897:49e8:d425:47ba:a206) |
| 23:11:13 | × | mikail quits (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Quit: Leaving) |
| 23:12:27 | × | pfurla quits (~pfurla@172.58.110.204) (Ping timeout: 256 seconds) |
| 23:12:30 | × | Katarushisu quits (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
| 23:13:35 | → | Katarushisu joins (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
| 23:13:38 | <Axman6> | why would forkIO be unsafe in a linear context? You can still track whether something linear is used ones in the forked action or the forking action, and as long as it's not used in both you're ok. Rust does exacrtly this right? |
| 23:14:27 | <monochrom> | Rust allows multiple readers. %1 doesn't. |
| 23:14:59 | <geekosaur> | and I doubt linear haskell actually knows that forkIO or forkOS or forkProcess is "special" |
| 23:15:04 | <Axman6> | so the check is even simpler for Haskell right? |
| 23:15:04 | <monochrom> | Rust's system also aims at tracking "can I free() now?", which is quite a bit different. |
| 23:15:50 | <geekosaur> | or any other of the variants that essentially dupliucate an execution context |
| 23:17:32 | <geekosaur> | we already have the problem that nothing in ghc/rts knows that in the child of a forkProcess all threads have ceased to exist |
| 23:17:42 | × | jespada quits (~jespada@87.74.33.157) (Quit: Textual IRC Client: www.textualapp.com) |
| 23:18:04 | <geekosaur> | (well, the rts knows to recreate its own threads, but knows nothing about the state of any user program threads after a forkProcess) |
| 23:18:06 | → | pfurla joins (~pfurla@185.81.136.19) |
| 23:19:17 | × | pfurla_ quits (~pfurla@2804:18:5854:5897:49e8:d425:47ba:a206) (Ping timeout: 250 seconds) |
| 23:22:26 | <[itchyjunk]> | I have a question. If i wanted to learn say `datastructure and algorithms`, is haskell still a good choice for me? I am a bit intimidated by this prospect. my alternative would be java i think.. |
| 23:23:07 | <[itchyjunk]> | I would like to learn things like trees and graphs and "depth first" type stuff |
| 23:23:15 | <geekosaur> | depends on how you want to learn them, I think; the two have different focuses |
| 23:23:15 | × | pfurla quits (~pfurla@185.81.136.19) (Read error: No route to host) |
| 23:23:38 | <nosewings> | Haskell is good at stuff like trees and graphs, but if you don't know Haskell, it might be a challenge to learn both at the same time |
| 23:23:41 | → | pfurla joins (~pfurla@185.81.136.19) |
| 23:24:02 | <[itchyjunk]> | Right, i don't know Haskell (and much programming in general). |
| 23:24:15 | <monochrom> | Learn programming first? :) |
| 23:24:49 | <[itchyjunk]> | i think people pick up `algo and datascructure` in their journey to learn programming |
| 23:24:49 | × | pfurla quits (~pfurla@185.81.136.19) (Read error: Connection reset by peer) |
| 23:24:51 | <monochrom> | In universities, data structure and algorithms are usually considered at least 2nd-year course(s), and even multiple courses. |
| 23:25:07 | <[itchyjunk]> | well, if i was in uni, it would be my next course. |
| 23:25:21 | <[itchyjunk]> | I just got done with the `Accelerated intro to OOP` |
| 23:25:27 | <monochrom> | This means it requires the student to have spent 1 year on imperative and/or functional programming at the beginner level. |
| 23:25:44 | <[itchyjunk]> | but i won't be taking the `data structure and algo` course but wanted to dabble with it a bit at least |
| 23:26:37 | <monochrom> | Well if you have completed OOP-based beginner programming, you're ready for a data structure and algorithm course that presents imperative data structures and algorithms. |
| 23:26:49 | → | snake joins (~snake@user/snake) |
| 23:26:54 | <monochrom> | which means not Haskell. |
| 23:27:00 | <[itchyjunk]> | ah |
| 23:27:09 | <[itchyjunk]> | So I should go with Java or maybe python? |
| 23:27:13 | → | pfurla joins (~pfurla@2804:18:5854:5897:2c6f:9eef:289e:85ce) |
| 23:27:19 | <snake> | i just realized that whatever you print from an IO() function is also the value of that function when used in an assignment expression |
| 23:27:34 | <nosewings> | Yeah, the other thing is that the structures/algorithms commonly used in Haskell are sometimes different from wht you might see in other languages |
| 23:27:39 | <snake> | what if you wanted to print debug messages in between tho |
| 23:27:40 | <monochrom> | Haskell is a good choice for a functional data structure and algorithm course, but only if you have already trained with Haskell or SML or Scheme or... |
| 23:28:12 | <[itchyjunk]> | I thought maybe i could kill infinitely many birds at once by doing this in haskell |
| 23:28:30 | <[itchyjunk]> | How would you learn haskell without dabbeling with these though? |
| 23:28:37 | <snake> | itchyjunk i recommend either java or python |
| 23:28:41 | <[itchyjunk]> | How do you first learn programming then come back to it |
| 23:28:43 | <geekosaur> | snake: what? the result is by definition () |
| 23:28:47 | <snake> | i dislike haskell (but here i am) |
| 23:28:49 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 23:28:53 | <[itchyjunk]> | Maybe i should get my python going on then. |
| 23:28:58 | × | teo quits (~teo@user/teo) (Ping timeout: 260 seconds) |
| 23:29:00 | <snake> | geekosaur, huh, well its working check it out: |
| 23:29:02 | <monochrom> | The human brain is weaker than the computer. The human brain blocks at information overload where the computer can productively interleave and manage. |
| 23:29:14 | <geekosaur> | % let x = putStrLn "hello, world"; print x |
| 23:29:14 | <snake> | let x = getNumbers "input-day-6.txt" |
| 23:29:14 | <yahb> | geekosaur: ; <interactive>:125:41: error: parse error (possibly incorrect indentation or mismatched brackets) |
| 23:29:22 | <nosewings> | Python's a good language to know, even it it's completely unprincipled |
| 23:29:35 | <geekosaur> | % let x = putStrLn "hello, world" in print x |
| 23:29:35 | <yahb> | geekosaur: ; <interactive>:126:36: error:; * No instance for (Show (IO ())) arising from a use of `print'; * In the expression: print x; In the expression: let x = putStrLn "hello, world" in print x; In an equation for `it': it = let x = putStrLn "hello, world" in print x |
| 23:29:43 | <monochrom> | Don't use your brain to build multiple dependencies just because cabal can. |
| 23:29:45 | <snake> | stahp |
| 23:29:50 | → | AlexNoo_ joins (~AlexNoo@178.34.151.66) |
| 23:29:57 | <geekosaur> | the second one is correct, x is a value of type IO () |
| 23:29:58 | <snake> | geekosaur, i did it in ghci actually |
| 23:30:08 | <geekosaur> | if I unwrap it by using do, it's a value of type () |
| 23:30:09 | <snake> | let me try with --make |
| 23:30:16 | <dibblego> | that's ghci evaluating the IO value |
| 23:30:19 | <nosewings> | ghci automatically runs IO actions |
| 23:30:20 | <geekosaur> | the % invokes yahb, which is ghci |
| 23:30:27 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
| 23:30:49 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 23:31:33 | <geekosaur> | % putStrLn "hello, world" >>= print |
| 23:31:33 | <yahb> | geekosaur: hello, world; () |
| 23:31:43 | × | Alex_test quits (~al_test@178.34.163.33) (Ping timeout: 256 seconds) |
| 23:31:53 | <geekosaur> | the () is from the `print` |
| 23:32:51 | × | AlexZenon quits (~alzenon@178.34.163.33) (Ping timeout: 256 seconds) |
| 23:33:38 | × | AlexNoo quits (~AlexNoo@178.34.163.33) (Ping timeout: 260 seconds) |
| 23:34:17 | <snake> | yeah it doesn't work with --make at all |
| 23:34:23 | <snake> | so what should i do to return a value |
| 23:34:32 | <snake> | from a file |
| 23:34:49 | <geekosaur> | you'd have to show us some context but probably `pure` |
| 23:34:55 | <snake> | sure |
| 23:35:06 | <janus> | % readFile "/proc/self/cmdline" |
| 23:35:06 | <yahb> | janus: "/srv/sandbox/root/usr/lib/ghc-9.0.1/bin/ghc\NUL-B/srv/sandbox/root/usr/lib/ghc-9.0.1\NUL--interactive\NUL-v0\NUL-ghci-script\NUL/srv/sandbox/root/usr/lib/run/ghci-init\NUL-tmpdir\NUL/srv/sandbox/root/data/tmp/\NUL-odir\NUL/srv/sandbox/root/data/tmp/\NUL-hidir\NUL/srv/sandbox/root/data/tmp/\NUL-ignore-dot-ghci\NUL-package\NULghc\NUL+RTS\NUL-M200M\NUL-V0\NUL-C0\NUL-K100M\NUL" |
| 23:35:45 | <snake> | https://dpaste.com/DLVAHS92Q |
| 23:36:13 | <snake> | janus, oh |
| 23:36:17 | <janus> | it would be easier just to read it all at once if it fits in memory... |
| 23:36:22 | <janus> | it's a tradeoff, i guess |
| 23:36:22 | <snake> | yeah |
| 23:36:31 | <snake> | no i didnt see that in any tutorials |
| 23:36:31 | <geekosaur> | yeh, you want pure |
| 23:36:45 | <geekosaur> | specifically `pure nums` |
| 23:37:06 | → | YehoshuaPesachWa joins (~yehoshuap@2001:470:69fc:105::a5f) |
| 23:37:43 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 250 seconds) |
| 23:37:49 | → | Alex_test joins (~al_test@178.34.151.66) |
| 23:38:03 | → | AlexZenon joins (~alzenon@178.34.151.66) |
| 23:38:21 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
| 23:38:22 | <glguy> | YehoshuaPesachWa: welcome |
| 23:38:42 | <YehoshuaPesachWa> | Thanks! |
| 23:39:44 | <snake> | geekosaur, wat |
| 23:39:55 | <snake> | i am trying to google for an example of pure and getting a lot of philosophy |
| 23:40:19 | <nosewings> | snake, what are you actually trying to do on line 20? |
| 23:40:26 | <snake> | *shrug* |
| 23:40:30 | <snake> | dunno |
| 23:40:42 | <snake> | oh |
| 23:40:42 | <janus> | snake: do you know what type classes are? |
| 23:40:51 | <snake> | nosewings, i want an [Int] or something like that |
| 23:40:56 | → | pfurla_ joins (~pfurla@177.79.126.48) |
| 23:41:05 | <snake> | janus, sorta, derek banas mentioned that in his youtube tutorial for haskell |
| 23:41:08 | <nosewings> | oh, so you want to return that from getNumbers |
| 23:41:12 | <snake> | like Show |
| 23:41:17 | <snake> | nosewings, yeah |
| 23:41:21 | → | jespada joins (~jespada@87.74.33.157) |
| 23:41:30 | <nosewings> | so you need to change the type to getNumbers :: String -> IO [Int] |
| 23:41:52 | <nosewings> | and then at the end of the function put "return nums" or "pure nums" (same thing) |
| 23:42:07 | <janus> | snake: you should read a proper book explaining these concepts from the start. they usually will explain the Applicative type class which is what pure is contained in |
| 23:42:52 | <snake> | what proper book |
| 23:43:12 | <janus> | @where books |
| 23:43:12 | <lambdabot> | https://www.extrema.is/articles/haskell-books, see also @where LYAH, RWH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, HTAC, TwT, FoP, PFAD, WYAH, non-haskell-books |
| 23:43:50 | <geekosaur> | http://www.vex.net/~trebla/haskell/IO.xhtml |
| 23:44:25 | × | pfurla quits (~pfurla@2804:18:5854:5897:2c6f:9eef:289e:85ce) (Ping timeout: 252 seconds) |
| 23:44:57 | <snake> | This book will help you learn HASKELL very easily. In this book, you will learn HASKELL from scratch and discover the FULL BLUEPRINT ON HOW TO MOVE from a beginner to an expert in HASKELL, how to avoid most mistakes that most people make in HASKELL, how to become a PRO in HASKELL, and how to avoid most errors in HASKELL. |
| 23:45:03 | <snake> | nice |
| 23:46:03 | <janus> | snake: i would go for one that isn't self-published... |
| 23:46:45 | → | yuyua32 joins (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
| 23:47:02 | × | Jing quits (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
| 23:47:26 | <snake> | o |
| 23:47:39 | → | Jing joins (~hedgehog@2604:a840:3::10c8) |
| 23:47:47 | <snake> | yeah it seemed like a sales pitch |
| 23:49:32 | × | jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds) |
| 23:49:59 | <snake> | you guys must read a lot |
| 23:50:03 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 23:50:53 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 23:54:23 | <janus> | most of these books contain similar content, i don't think most people have read more than one or two |
| 23:54:55 | <nosewings> | I mostly just read blogs |
| 23:55:27 | <geekosaur> | I haven't read any of them, I used the so-called Gentle Introduction (which commonly is not considered very gentle at all) |
| 23:55:42 | × | yuyua32 quits (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
| 23:56:04 | <geekosaur> | but I have quite a lot of programming experience, including with other functional languages |
| 23:56:14 | → | yuyua32 joins (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
| 23:56:28 | <yuyua32> | Im trying to write a function which finds the index of a value in haskell |
| 23:56:33 | <yuyua32> | returns * |
| 23:56:40 | <yuyua32> | so if I have |
| 23:56:45 | → | kranius_ joins (~kranius@222.186.245.213.rev.sfr.net) |
| 23:56:47 | <yuyua32> | Index n (x:xs) |
| 23:58:02 | <yuyua32> | | n == x = ? |
| 23:58:27 | <snake> | 0 |
| 23:58:35 | <yuyua32> | but how does that return the index |
| 23:58:45 | <hpc> | it returns the index of n in that particular list |
| 23:58:47 | <snake> | if its the first character (x) then the index is 0 |
| 23:58:52 | <EvanR> | if the first thing in the list is the thing you want, it's zero by definition |
| 23:58:56 | <yuyua32> | oh right thats true |
| 23:58:59 | <yuyua32> | but I also have |
| 23:59:02 | <hpc> | when n == x, n is definitely at the start of (x:xs) |
| 23:59:04 | <snake> | otherwise = Index (xs) |
| 23:59:07 | <snake> | er 1 + |
| 23:59:08 | <yuyua32> | | otherwise = index (xs y) |
| 23:59:19 | <yuyua32> | sorry yeah | otherwise = 1 + index (xs y) |
| 23:59:22 | <hpc> | snake: suppose you have a list, xs |
| 23:59:25 | <snake> | yup you got it |
| 23:59:27 | <hpc> | and n is at index i in xs |
| 23:59:33 | <hpc> | where is n in (x:xs)? |
| 23:59:40 | <hpc> | ah, yep |
| 23:59:57 | <hpc> | the parens are wrong though |
All times are in UTC on 2021-12-14.