Logs on 2023-10-21 (liberachat/#haskell)
| 00:00:05 | × | CiaoSen quits (~Jura@2a05:5800:282:6600:664b:f0ff:fe37:9ef) (Ping timeout: 240 seconds) |
| 00:00:27 | → | Vajb joins (~Vajb@207.61.167.122) |
| 00:01:08 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 00:02:29 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:03:36 | → | califax joins (~califax@user/califx) |
| 00:05:06 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 272 seconds) |
| 00:05:27 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds) |
| 00:12:01 | × | solution quits (~solution@87-97-30-205.pool.digikabel.hu) (K-Lined) |
| 00:12:26 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 00:14:04 | → | solution joins (~solution@213-197-76-92.pool.digikabel.hu) |
| 00:16:58 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 00:19:37 | × | pixelmonk quits (~pixelmonk@173.46.79.26) (Quit: WeeChat 4.1.0) |
| 00:24:46 | → | notzmv joins (~zmv@user/notzmv) |
| 00:28:19 | × | solution quits (~solution@213-197-76-92.pool.digikabel.hu) (Quit: leaving) |
| 00:39:09 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 00:43:58 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 258 seconds) |
| 00:49:03 | → | Guest82 joins (~Guest82@2600:4040:5078:d200:f0f4:2f68:dfcc:7aee) |
| 00:49:05 | × | waleee quits (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) (Ping timeout: 240 seconds) |
| 00:50:05 | × | Guest82 quits (~Guest82@2600:4040:5078:d200:f0f4:2f68:dfcc:7aee) (Client Quit) |
| 00:50:50 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 00:52:23 | → | rosco joins (~rosco@gbk-48-6.tm.net.my) |
| 00:55:22 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 00:59:10 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 00:59:41 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 01:00:32 | Lord_of_Life_ | is now known as Lord_of_Life |
| 01:02:36 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 01:11:11 | × | otto_s quits (~user@p5b0443cb.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 01:12:47 | → | otto_s joins (~user@p5b044cbd.dip0.t-ipconnect.de) |
| 01:17:35 | × | rosco quits (~rosco@gbk-48-6.tm.net.my) (Ping timeout: 255 seconds) |
| 01:18:04 | → | rosco joins (~rosco@gbk-48-6.tm.net.my) |
| 01:18:50 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 01:19:12 | × | phma quits (phma@2001:5b0:210f:118:12d5:66dc:e6c4:4af1) (Read error: Connection reset by peer) |
| 01:19:39 | → | phma joins (phma@2001:5b0:210f:118:12d5:66dc:e6c4:4af1) |
| 01:27:06 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 01:30:18 | × | Pozyomka quits (~pyon@user/pyon) (Quit: Pozyomka, my beloved: https://i.imgur.com/BMmVfTq.png) |
| 01:31:31 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e1a3:648c:fb34:72ec) |
| 01:33:48 | × | _________ quits (~nobody@user/noodly) (Ping timeout: 258 seconds) |
| 01:42:15 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 01:44:15 | → | billchenchina joins (~billchenc@103.152.35.21) |
| 01:49:40 | × | rosco quits (~rosco@gbk-48-6.tm.net.my) (Ping timeout: 255 seconds) |
| 01:51:10 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 01:55:13 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 260 seconds) |
| 01:59:04 | <Inst> | can i ask a quick question about Parsec? |
| 01:59:12 | <Inst> | Parsec can't resume parsing after incomplete input, right? |
| 01:59:37 | → | sm joins (~sm@plaintextaccounting/sm) |
| 02:16:14 | → | rosco joins (~rosco@gbk-48-6.tm.net.my) |
| 02:16:40 | <EvanR> | you might be able to defensively save and yield the parser state if early EOF is encountered, which sounds like a hack. attoparsec API allows resuming directly |
| 02:17:23 | → | Pozyomka joins (~pyon@user/pyon) |
| 02:25:21 | <Inst> | i'm thinking about joke solutions to the exact parser problem, which bodigrim seems to be indicating isn't really necessary |
| 02:25:39 | <Inst> | one joke solution is simply to feed data to the parser at the same time you're logging it |
| 02:26:07 | <Inst> | then once data is yielded, tuple together the parser output and the log |
| 02:26:26 | <Inst> | WriterT ParserT, eh? |
| 02:26:40 | <EvanR> | :k WriterT |
| 02:26:40 | <lambdabot> | * -> (* -> *) -> * -> * |
| 02:27:23 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:27:23 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:27:23 | finn_elija | is now known as FinnElija |
| 02:27:30 | <Inst> | spiritually |
| 02:29:29 | <EvanR> | attoparsec supports Text now so |
| 02:32:02 | × | rosco quits (~rosco@gbk-48-6.tm.net.my) (Ping timeout: 272 seconds) |
| 02:32:17 | × | td_ quits (~td@i5387091B.versanet.de) (Ping timeout: 255 seconds) |
| 02:33:57 | → | td_ joins (~td@i5387091E.versanet.de) |
| 02:35:42 | <haskellbridge> | <Inst> i mean, something done over the existing cabal parser |
| 02:35:48 | <haskellbridge> | <Inst> it's a "peasant" solution |
| 02:40:17 | → | Vajb joins (~Vajb@207.61.167.122) |
| 02:44:18 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 02:45:24 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 02:57:02 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e1a3:648c:fb34:72ec) (Remote host closed the connection) |
| 02:57:19 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 03:13:01 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 03:13:51 | → | sm joins (~sm@plaintextaccounting/sm) |
| 03:17:15 | → | aforemny_ joins (~aforemny@i59F516C8.versanet.de) |
| 03:17:27 | × | aforemny quits (~aforemny@2001:9e8:6cea:d00:75b1:1f0b:5b86:9d9f) (Ping timeout: 240 seconds) |
| 03:20:18 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:20:48 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 272 seconds) |
| 03:21:04 | → | danza_ joins (~francesco@151.47.125.134) |
| 03:36:37 | → | random-jellyfish joins (~random-je@user/random-jellyfish) |
| 03:37:14 | <random-jellyfish> | are transformer neural networks pure functions? |
| 03:37:53 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 260 seconds) |
| 03:38:13 | <random-jellyfish> | or do they need to modify some global state? |
| 03:39:12 | <danza_> | any stateful computation can be modeled in terms of pure functions, but i am not familiar with transformer networks |
| 03:40:58 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 03:41:15 | <random-jellyfish> | I don't underatand how in context learning works, where is the learned information from one prompt stored so that it can be used with the next prompt? |
| 03:41:38 | <random-jellyfish> | are the some internal parameters that get changed with each prompt? |
| 03:42:01 | <EvanR> | passing and returning state can also be modeled as taking the entire history of the dialog as argument |
| 03:42:21 | <EvanR> | (and not returning the updated state because it's redundant) |
| 03:42:34 | <random-jellyfish> | EvanR: yeah that was the other scenario I was thinking about |
| 03:43:27 | <random-jellyfish> | so when I talk to chatgpt with every prompt I send the entire history of the dialog is sent all over again? |
| 03:43:54 | <danza_> | i doubt chatgpt is purely functional |
| 03:44:05 | <EvanR> | probably not but they could have done it that way if no one cared about performance |
| 03:44:25 | <random-jellyfish> | and the learned information is "stored" in the replies it gives me? |
| 03:44:44 | <random-jellyfish> | the openai python api seems to work that way |
| 03:44:45 | <EvanR> | the learned information would not be stored, but derived from history every time |
| 03:44:52 | <danza_> | there are probably more efficient ways to do purely functional machine learning |
| 03:45:45 | <danza_> | functional does not mean there is no state |
| 03:45:59 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 03:46:00 | <random-jellyfish> | I looked at the transformer nn architecture, I can't find any mutable state |
| 03:46:17 | <random-jellyfish> | the changes happen during backpropagation training |
| 03:46:20 | <EvanR> | i thought the NN itself is the state |
| 03:46:33 | <random-jellyfish> | but in inference mode the weights remain unchanged |
| 03:46:54 | <random-jellyfish> | yet it can still "learn" stuff during inference |
| 03:47:10 | <EvanR> | maybe old questions are provided as input like you said |
| 03:47:20 | <EvanR> | if there's really no other changes |
| 03:47:31 | <danza_> | if it learns, there ought to be some change |
| 03:48:01 | <random-jellyfish> | yeah I think so too, most likely, it's the history |
| 03:48:10 | <EvanR> | not necessarily, since part of NN is predicting what you might even ask next |
| 03:48:30 | <danza_> | oh i see what you mean |
| 03:49:22 | <EvanR> | "are transformer neural networks pure functions" is a great question, I don't know. But the answer would answer everything we discussed up to this point |
| 03:49:57 | <danza_> | maybe we can distinguish between learning and training here then |
| 03:50:37 | <danza_> | it's a strange question. A model or an algorithm can be expressed as pure functions or functions with side effects, that's unrelated |
| 03:52:24 | <danza_> | (or call the others "impure" so that they cannot be mistaken with monadic pure functions) |
| 03:52:40 | <random-jellyfish> | I think learning is the more general term and it includes training |
| 03:53:03 | <random-jellyfish> | learning implies some accumulation of information |
| 03:53:29 | <danza_> | well a trained network can learn about a dialogue without that affecting its training from what you said (weights not changing) |
| 03:53:37 | <random-jellyfish> | training implies accumulating information by changing some parameters |
| 03:54:15 | <random-jellyfish> | changing aka fine tuning |
| 03:57:05 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 03:58:20 | <danza_> | anyways, to go in the direction of your question, i think often for machine learning mutable data structures are used, probably for efficiency |
| 04:00:43 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 04:01:11 | <random-jellyfish> | yeah performance oriented implementations you have all the state and weigths preallocated and they will get changed on the fly during inference and training |
| 04:01:35 | → | Vajb joins (~Vajb@207.61.167.122) |
| 04:01:44 | <random-jellyfish> | you don't want any garbage collection of billion element matrices at runtime lol |
| 04:03:30 | <danza_> | i think immutable implementations of big matrices do not throw them away at each change, but i don't know the details |
| 04:05:26 | × | Inst quits (~Inst@120.244.192.250) (Ping timeout: 255 seconds) |
| 04:05:45 | <EvanR> | big matrix, you want to reuse an old big matrix you no longer are using |
| 04:05:49 | <EvanR> | to store results |
| 04:08:31 | <danza_> | yep |
| 04:09:29 | <danza_> | i am not very familiar with haskell idioms for mutability. STM? |
| 04:11:19 | <EvanR> | IOVector xD |
| 04:11:31 | <EvanR> | ffi to fortran |
| 04:13:20 | <danza_> | oh there are a lot of libraries with efficient matrices ... in this channel they chat a lot about accelerate recently. I was wondering about a simple abstraction that works in the general case |
| 04:16:04 | × | Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Quit: Ping timeout (120 seconds)) |
| 04:16:22 | → | Sciencentistguy joins (~sciencent@hacksoc/ordinary-member) |
| 04:17:45 | <[Leary]> | danza_: ST. |
| 04:18:29 | <danza_> | oh that is it then. Thanks [Leary] ... i seldom do mutability these days |
| 04:19:00 | <random-jellyfish> | BLAS and LAPACK are great for linear algebra...if only their functions didn't look like assembly language instructions |
| 04:19:36 | <danza_> | do they have symbolic facilities? I usually think of python or R for linear algebra |
| 04:21:35 | <random-jellyfish> | I think BLAS and Lapack are the backend of most open source linear algebra libs |
| 04:22:13 | <danza_> | i don't think python nor R (nor Julia) would use them as a backend |
| 04:22:53 | <random-jellyfish> | numpy uses them for sure, not sure about Julia and R |
| 04:23:52 | <danza_> | oh cool, i thought numpy had its own implementations |
| 04:24:08 | <danza_> | lemme check the project |
| 04:24:12 | <random-jellyfish> | nah, even Julia uses them I see |
| 04:24:45 | <random-jellyfish> | some libs use Intel's mkl, but mkl is closed source |
| 04:25:32 | <danza_> | wow. These projects are so buried behind other frontends |
| 04:26:48 | <danza_> | turns out we are all running on fortran |
| 04:27:28 | <danza_> | thanks random-jellyfish, that was instructive |
| 04:28:32 | <random-jellyfish> | danza_: no problem |
| 04:31:49 | × | sabino quits (~sabino@user/sabino) (Quit: Lambda _ -> x) |
| 04:34:33 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 04:35:54 | → | gawen joins (~gawen@user/gawen) |
| 04:40:57 | × | bilegeek quits (~bilegeek@2600:1008:b06b:9a73:e45e:f9df:6e0b:4afb) (Quit: Leaving) |
| 04:41:09 | × | rgw quits (~R@2605:a601:a0df:5600:41e1:fde1:f907:ea46) (Quit: rgw) |
| 04:46:05 | → | danza__ joins (~francesco@151.35.100.193) |
| 04:46:29 | × | danza_ quits (~francesco@151.47.125.134) (Read error: Connection reset by peer) |
| 04:47:10 | × | billchenchina quits (~billchenc@103.152.35.21) (Read error: Connection reset by peer) |
| 04:50:43 | → | _________ joins (~nobody@user/noodly) |
| 04:56:14 | × | [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 05:02:25 | × | hiyori quits (~hiyori@user/hiyori) (Quit: Ping timeout (120 seconds)) |
| 05:20:16 | × | danza__ quits (~francesco@151.35.100.193) (Ping timeout: 255 seconds) |
| 05:26:58 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 260 seconds) |
| 05:35:20 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:37:55 | → | harveypwca joins (~harveypwc@2601:246:c280:6a90:837d:db39:3eea:f7db) |
| 05:40:34 | → | danza__ joins (~francesco@151.35.100.193) |
| 05:59:27 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 06:01:24 | <hololeap> | GHC.IO.Encoding.getFileSystemEncoding returns `IO TextEncoding`, but how would I use that to convert a ByteString to a String? |
| 06:02:31 | <danza__> | interesting question. I thought text encoding was specific to files |
| 06:04:38 | <hololeap> | I'm trying to use linux-inotify, and currently I need to convert the ByteString returned by `name` to a FilePath (String): https://hackage.haskell.org/package/linux-inotify-0.3.0.2/docs/System-Linux-Inotify.html#t:Event |
| 06:04:53 | <hololeap> | it says: The proper Haskell interpretation of this seems to be to use getFileSystemEncoding and then unpack it to a String or decode it using the text package. |
| 06:06:03 | <danza__> | i see it is a path |
| 06:08:05 | <danza__> | this seems a bit convoluted |
| 06:08:35 | <danza__> | mkTextDecoder here https://downloads.haskell.org/~ghc/9.4.2/docs/libraries/base-4.17.0.0/GHC-IO-Encoding.html#t:TextEncoding |
| 06:09:20 | <danza__> | TextDecoder is just an alias for BufferCodec https://downloads.haskell.org/~ghc/9.4.2/docs/libraries/base-4.17.0.0/GHC-IO-Encoding.html |
| 06:10:03 | <danza__> | and there is an `encode` on BufferCodec that works also for decoding if you read the types |
| 06:10:24 | <hololeap> | I might end up just using Data.Text.Encoding.decodeUtf8 |
| 06:11:17 | <danza__> | hehe yes probably easier ... i haven't even finished the chain of functions i think ... |
| 06:11:27 | <hololeap> | danza__: the problem is that the GHC module is using some Buffer wrapper as opposed to the more familiar ByteString and String types |
| 06:12:04 | <danza__> | yeah i am also not familiar with those types |
| 06:12:38 | <hololeap> | there's basically 0% chance that the paths will be anything other than ASCII so decodeUtf8 should be safe |
| 06:13:10 | <hololeap> | but I wanted to see if anyone knew what the linux-inotify docs were trying to say |
| 06:13:38 | <danza__> | the docs sound like they are not sure either... |
| 06:14:30 | <danza__> | anyways it depends on whether you are coding for yourself or you plan to release that i guess |
| 06:14:50 | <hololeap> | I plan on releasing it, but it's definitely not critical software |
| 06:15:04 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 06:15:30 | <hololeap> | if someone hits an issue with decoding on their system I can go back and look at this |
| 06:26:35 | → | sm joins (~sm@plaintextaccounting/sm) |
| 06:28:05 | → | rosco joins (~rosco@gbk-48-6.tm.net.my) |
| 06:28:16 | × | [Leary] quits (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
| 06:32:34 | → | [Leary] joins (~Leary]@user/Leary/x-0910699) |
| 06:36:42 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:40:22 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 06:42:05 | → | euleritian joins (~euleritia@dynamic-046-114-205-113.46.114.pool.telefonica.de) |
| 06:50:00 | × | euleritian quits (~euleritia@dynamic-046-114-205-113.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
| 06:50:18 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 06:51:25 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 06:59:18 | <[Leary]> | hololeap: The advice there looks outdated; this `ByteString` probably ought to be an `OsPath`. If you run it through `fromBytes` (exposed internals, not sure if there's a better option) then you can use `decodeFS` or `decodeWith`. |
| 06:59:52 | → | Square joins (~Square@user/square) |
| 07:05:32 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 07:06:29 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 07:08:40 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:16:39 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 240 seconds) |
| 07:18:26 | <danza__> | maybe poke the maintainers with an issue about that doc then hololeap, if you don't mind |
| 07:25:58 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 07:26:09 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 07:30:31 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 07:30:57 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 07:31:08 | → | fendor joins (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) |
| 07:33:10 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 07:33:10 | → | idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 07:33:32 | → | CiaoSen joins (~Jura@2a05:5800:2bf:4500:664b:f0ff:fe37:9ef) |
| 07:33:36 | → | acidjnk_new joins (~acidjnk@p200300d6e72b93737dc6e69178877b3f.dip0.t-ipconnect.de) |
| 07:33:41 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 07:42:29 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 07:44:30 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:e1a3:648c:fb34:72ec) |
| 07:47:25 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 07:52:25 | → | lortabac joins (~lortabac@ip-185-104-138-41.ptr.icomera.net) |
| 07:55:01 | × | lortabac quits (~lortabac@ip-185-104-138-41.ptr.icomera.net) (Client Quit) |
| 08:07:52 | × | Flow quits (~none@gentoo/developer/flow) (Ping timeout: 258 seconds) |
| 08:10:15 | <Square> | can I make a newtype of Int and keep Num instances for arithmetic and relational operators? |
| 08:10:29 | <Square> | ...easily |
| 08:11:47 | <Square> | oh, found it. GeneralizedNewtypeDeriving |
| 08:12:21 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 08:14:31 | → | nickiminjaj joins (~nickiminj@188.146.126.78) |
| 08:14:31 | × | nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host) |
| 08:14:31 | → | nickiminjaj joins (~nickiminj@user/laxhh) |
| 08:14:38 | → | Guest7 joins (~Guest7@2603-7000-4b42-1100-7984-deb8-b762-75ca.res6.spectrum.com) |
| 08:15:11 | <Guest7> | Hello, how to extract the Shape of a Tree, and be able to reconstruct it again with a list of values and a Shape? |
| 08:15:39 | → | Flow joins (~none@gentoo/developer/flow) |
| 08:16:34 | <danza__> | are you referring to a precise Tree type Guest7? Would you mind pasting the link here? |
| 08:16:36 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 08:16:58 | <Guest7> | Yes, but I was wonderting is there is one solution for all |
| 08:17:00 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 08:17:02 | → | Jackneill joins (~Jackneill@20014C4E1E0E6F0085D71214A6273985.dsl.pool.telekom.hu) |
| 08:17:26 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:17:43 | → | gmg joins (~user@user/gehmehgeh) |
| 08:18:12 | × | harveypwca quits (~harveypwc@2601:246:c280:6a90:837d:db39:3eea:f7db) (Quit: Leaving) |
| 08:19:05 | <danza__> | there is probably a solution for all Tree and Shape, once we will know which Tree and Shape are you talking about |
| 08:19:16 | <[Leary]> | You can do this for an arbitrary Traversable, which most trees are. The real question is, why would you want to? |
| 08:21:51 | × | Vq quits (~vq@90-225-115-195-no122.tbcn.telia.com) (Ping timeout: 260 seconds) |
| 08:22:17 | → | Vq joins (~vq@90-225-115-195-no122.tbcn.telia.com) |
| 08:26:09 | <Guest7> | https://github.com/smoge/haskMus/blob/main/src/Music/Time/Rtm.hs |
| 08:27:09 | <Guest7> | data RtmValue |
| 08:27:10 | <Guest7> | = RtmNote Int |
| 08:27:10 | <Guest7> | | RtmRest Int |
| 08:27:11 | <Guest7> | | RtmLeaf Int RtmProportions |
| 08:27:11 | <Guest7> | deriving (Eq, Ord, Show) |
| 08:27:12 | <Guest7> | data RtmProportions = |
| 08:27:12 | <Guest7> | RtmProportions [RtmValue] |
| 08:27:13 | <Guest7> | deriving (Eq, Ord, Show) |
| 08:31:13 | → | cpressey joins (~cpressey@host-92-10-146-234.as13285.net) |
| 08:31:39 | <danza__> | thanks. I find no Tree nor Shape there |
| 08:32:00 | <danza__> | ArrayShape maybe? |
| 08:34:16 | <Guest7> | it's a tree like structure, nested. What is ArrayShape? APL inspired Array? |
| 08:37:52 | <danza__> | not sure, just the thing i found in your code that was closer to the Shape type you mentioned |
| 08:38:30 | <danza__> | so yes, types are shaped like trees, but you mentioned Tree and Shape and uppercase like that they seem types |
| 08:39:03 | <Guest7> | Yes, do you know implementation of Shape representing the structure of a tree-like structure? |
| 08:42:11 | <danza__> | usually i would get that with a parametric type. If you have ... i will play with the interpreter a bit |
| 08:42:37 | <danza__> | % data Value i = Note i | Rest i | Leaf i Char |
| 08:42:38 | <yahb2> | <no output> |
| 08:42:51 | <danza__> | i used `Char` instead of `Proportions` |
| 08:43:30 | <danza__> | well in that case i guess you have the "shape" outside the tree |
| 08:45:12 | <Guest7> | I was trying something like this: |
| 08:45:12 | <Guest7> | -- >>> rtm = RtmProportions [RtmNote 5, RtmLeaf 2 (RtmProportions [RtmNote 6, RtmRest 4]), RtmRest 3] |
| 08:45:13 | <Guest7> | -- >>> toRtmArray rtm |
| 08:45:13 | <Guest7> | -- RtmArray [5,2,6,-4,-3] (Vector [Scalar,Vector [Scalar,Vector [Scalar,Scalar]],Scalar]) |
| 08:46:35 | → | danza_ joins (~francesco@151.43.123.193) |
| 08:46:37 | <Guest7> | makes sense? |
| 08:46:44 | × | danza__ quits (~francesco@151.35.100.193) (Read error: Connection reset by peer) |
| 08:47:39 | <[Leary]> | The best representation of the structure of a tree is the tree itself. |
| 08:49:05 | <danza_> | seems to make sense anyway, why not, depends what you want to achieve |
| 08:51:01 | <Guest7> | Yes, but it's not working correctly. I was wondering if there is a better way to do, or a library to help with this. |
| 08:51:17 | → | Pickchea joins (~private@user/pickchea) |
| 08:54:27 | <Rembane> | Guest7: What's the intended behaviour? And what's the actual behaviour? |
| 08:55:47 | × | rosco quits (~rosco@gbk-48-6.tm.net.my) (Quit: Lost terminal) |
| 08:56:29 | × | Guest7 quits (~Guest7@2603-7000-4b42-1100-7984-deb8-b762-75ca.res6.spectrum.com) (Quit: Client closed) |
| 09:08:31 | × | tzh quits (~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz) |
| 09:08:58 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 09:11:38 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 09:12:52 | → | Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
| 09:14:43 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 255 seconds) |
| 09:18:24 | × | phma quits (phma@2001:5b0:210f:118:12d5:66dc:e6c4:4af1) (Read error: Connection reset by peer) |
| 09:19:15 | → | phma joins (phma@2001:5b0:210d:e0f8:4b17:f518:800e:b47e) |
| 09:25:05 | → | ubert1 joins (~Thunderbi@91.141.58.4.wireless.dyn.drei.com) |
| 09:26:43 | × | Square quits (~Square@user/square) (Ping timeout: 260 seconds) |
| 09:26:50 | × | ubert quits (~Thunderbi@77.119.196.197.wireless.dyn.drei.com) (Ping timeout: 258 seconds) |
| 09:26:50 | ubert1 | is now known as ubert |
| 09:39:36 | × | yoyofreeman quits (~yoyofreem@176.97.76.178) (Remote host closed the connection) |
| 09:40:17 | → | yoyofreeman joins (~yoyofreem@176.97.76.178) |
| 09:40:30 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 09:41:13 | → | euleritian joins (~euleritia@dynamic-046-114-109-096.46.114.pool.telefonica.de) |
| 09:43:25 | × | xigua quits (~xigua@user/xigua) (Remote host closed the connection) |
| 09:43:59 | → | xigua joins (~xigua@user/xigua) |
| 09:50:12 | × | random-jellyfish quits (~random-je@user/random-jellyfish) (Ping timeout: 240 seconds) |
| 09:55:14 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 10:05:13 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 260 seconds) |
| 10:06:38 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 10:10:00 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection) |
| 10:10:18 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 10:10:23 | × | TheCatCollective quits (NyaaTheKit@user/calculuscat) (Quit: Meow Meow Meow Meow Meow Meow Meow Meow) |
| 10:14:11 | → | Maxdamantus joins (~Maxdamant@user/maxdamantus) |
| 10:14:50 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 10:15:28 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 255 seconds) |
| 10:17:54 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 10:20:07 | × | acidjnk_new quits (~acidjnk@p200300d6e72b93737dc6e69178877b3f.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 10:21:20 | × | vglfr quits (~vglfr@37.73.16.154) (Ping timeout: 272 seconds) |
| 10:29:36 | × | danza_ quits (~francesco@151.43.123.193) (Ping timeout: 260 seconds) |
| 10:30:46 | × | haskl quits (~haskl@user/haskl) (Read error: Connection reset by peer) |
| 10:33:05 | → | haskl joins (~haskl@user/haskl) |
| 10:57:36 | → | simendsjo joins (~user@84.211.91.241) |
| 10:58:36 | → | simendsj` joins (~user@84.211.91.241) |
| 11:00:42 | × | simendsjo quits (~user@84.211.91.241) (Remote host closed the connection) |
| 11:00:42 | × | simendsj` quits (~user@84.211.91.241) (Remote host closed the connection) |
| 11:01:34 | → | simendsjo joins (~user@84.211.91.241) |
| 11:01:43 | → | vglfr joins (~vglfr@37.73.16.154) |
| 11:07:47 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 11:12:06 | → | Vajb joins (~Vajb@207.61.167.122) |
| 11:36:35 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 240 seconds) |
| 11:44:00 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 11:48:46 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 11:50:10 | → | roger_ joins (~roger@122.162.144.48) |
| 11:50:37 | <roger_> | hi! |
| 11:52:46 | × | idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5) |
| 11:53:10 | × | roger_ quits (~roger@122.162.144.48) (Quit: Lost terminal) |
| 11:55:43 | → | arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) |
| 12:03:05 | → | acidjnk_new joins (~acidjnk@p200300d6e72b93737dc6e69178877b3f.dip0.t-ipconnect.de) |
| 12:04:43 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 12:04:43 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 12:04:43 | finn_elija | is now known as FinnElija |
| 12:16:38 | → | fweht joins (uid404746@id-404746.lymington.irccloud.com) |
| 12:26:52 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 255 seconds) |
| 12:31:56 | → | todi joins (~todi@p4fd1a3e6.dip0.t-ipconnect.de) |
| 12:35:07 | × | yoyofreeman quits (~yoyofreem@176.97.76.178) (Remote host closed the connection) |
| 12:35:48 | → | yoyofreeman joins (~yoyofreem@176.97.76.178) |
| 12:42:13 | × | nickiminjaj quits (~nickiminj@user/laxhh) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:49:35 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 12:54:36 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e1a3:648c:fb34:72ec) (Ping timeout: 248 seconds) |
| 13:06:39 | → | alphacentauri joins (alphacenta@gateway/vpn/protonvpn/alphacentauri) |
| 13:07:31 | × | arahael quits (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 13:08:36 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 13:09:26 | → | Square joins (~Square@user/square) |
| 13:13:38 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:15:08 | × | vglfr quits (~vglfr@37.73.16.154) (Remote host closed the connection) |
| 13:15:43 | → | vglfr joins (~vglfr@37.73.16.154) |
| 13:17:00 | × | vglfr quits (~vglfr@37.73.16.154) (Remote host closed the connection) |
| 13:17:46 | → | vglfr joins (~vglfr@37.73.16.154) |
| 13:20:00 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 13:22:37 | × | vglfr quits (~vglfr@37.73.16.154) (Remote host closed the connection) |
| 13:23:02 | → | vglfr joins (~vglfr@37.73.16.154) |
| 13:34:06 | → | Lycurgus joins (~jdaughert@user/Lycurgus) |
| 13:34:13 | → | ystael joins (~ystael@user/ystael) |
| 13:40:15 | × | Lycurgus quits (~jdaughert@user/Lycurgus) (Quit: leaving) |
| 13:41:03 | × | simendsjo quits (~user@84.211.91.241) (Ping timeout: 260 seconds) |
| 13:43:27 | × | Pozyomka quits (~pyon@user/pyon) (Quit: Pozyomka, my beloved: https://i.imgur.com/BMmVfTq.png) |
| 13:44:03 | × | CiaoSen quits (~Jura@2a05:5800:2bf:4500:664b:f0ff:fe37:9ef) (Ping timeout: 258 seconds) |
| 13:45:52 | → | Lycurgus joins (~Ren@user/Lycurgus) |
| 13:46:45 | × | Lycurgus quits (~Ren@user/Lycurgus) (Client Quit) |
| 13:48:01 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 13:48:37 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 13:49:30 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 14:12:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 14:13:02 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 14:22:49 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 14:29:40 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 258 seconds) |
| 14:37:25 | → | nickiminjaj joins (~nickiminj@188.146.126.78) |
| 14:37:25 | × | nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host) |
| 14:37:25 | → | nickiminjaj joins (~nickiminj@user/laxhh) |
| 14:42:46 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 14:43:32 | × | eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (Quit: Restarting) |
| 14:44:54 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 14:45:52 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 14:48:45 | × | fendor quits (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection) |
| 14:50:08 | <yin> | how do i write (λpq.ppq) and (λpq.pqp) in haskell> |
| 14:50:17 | <yin> | ? |
| 14:50:21 | → | fendor joins (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) |
| 14:50:42 | <tromp> | p p q won't typee-check |
| 14:50:48 | <yin> | no it won't |
| 14:51:30 | <yin> | iiuc it's because i would need some kind of recursive type? |
| 14:51:31 | <tromp> | of course you could have data Lambda = Abs ... | App ... | Var ... |
| 14:52:16 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:49ec:9442:e7af:3828) |
| 14:53:20 | <[Leary]> | % :t \p q -> p p q |
| 14:53:21 | <yahb2> | <interactive>:1:11: error: ; • Couldn't match expected type ‘t’ with actual type ‘t -> t1 -> t2’ ; ‘t’ is a rigid type variable bound by ; the inferred type of it :: (t -> t1 -> t... |
| 14:53:33 | <[Leary]> | % newtype T a b = T{ ($$) :: T a b -> a -> b } |
| 14:53:33 | <yahb2> | <no output> |
| 14:53:44 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 14:53:47 | <[Leary]> | % :t \p q -> (p $$ p) q |
| 14:53:47 | <yahb2> | \p q -> (p $$ p) q :: forall {a} {b}. T a b -> a -> b |
| 14:55:38 | <yin> | i don't think i can wrap my head around that by myself |
| 14:55:40 | <yin> | let me try |
| 15:01:18 | <[Leary]> | yin: `T t1 t2` is a solution (sans wrappers) to the equation `t = t -> t1 -> t2` that the type checker is complaining about being unable to solve. |
| 15:02:05 | → | rgw joins (~R@2605:a601:a0df:5600:5007:462b:c57d:9381) |
| 15:03:11 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:49ec:9442:e7af:3828) (Ping timeout: 272 seconds) |
| 15:07:19 | <yin> | what about \p q -> p q p ? |
| 15:08:21 | <[Leary]> | % :t \p q -> p q p |
| 15:08:21 | <yahb2> | <interactive>:1:13: error: ; • Couldn't match expected type ‘t1’ ; with actual type ‘t -> t1 -> t2’ ; ‘t1’ is a rigid type variable bound by ; the inferred type ... |
| 15:09:07 | <[Leary]> | So for this, you want to solve `t1 = t -> t1 -> t2` instead. |
| 15:12:43 | <yin> | ok let me try to figure it out |
| 15:16:47 | <yin> | [Leary]: https://paste.jrvieira.com/1697901399353 ? |
| 15:17:29 | → | P1RATEZ joins (piratez@user/p1ratez) |
| 15:17:54 | × | moni quits (~moni@cpe-174-106-185-141.ec.res.rr.com) (Remote host closed the connection) |
| 15:18:43 | <yin> | oh, no |
| 15:18:55 | <yin> | should be `a -> AND a b -> b` |
| 15:18:56 | <yin> | right? |
| 15:20:16 | <yin> | https://paste.jrvieira.com/1697901614713 |
| 15:22:27 | <[Leary]> | Looks right to me. |
| 15:24:47 | <yin> | i can just do `newtype T a b = T { ($$) :: T a b -> T a b -> T a b }` ? |
| 15:27:34 | <int-e> | You can, but how do you ever inspect such a value? |
| 15:27:43 | <[Leary]> | Err. You can do `newtype LC = LC (LC -> LC)` (which your type is equivalent to) and indeed encode arbitrary lambda calculus terms, but good luck doing anything useful with this representation. |
| 15:30:04 | <int-e> | You can inject exceptions (using unsafePerformIO) and get some insight into such terms but it gets very convoluted quickly. |
| 15:32:59 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 245 seconds) |
| 15:38:40 | <[Leary]> | % lcfix :: (a -> a) -> a; lcfix = unsafeCoerce $ LC \f -> (LC \x -> f $$ (x $$ x)) $$ (LC \x -> f $$ (x $$ x)) |
| 15:38:41 | <yahb2> | <interactive>:9:51: error: ; Unexpected lambda expression in function application: ; \ f -> (LC \ x -> f $$ (x $$ x)) $$ (LC \ x -> f $$ (x $$ x)) ; You could write it with parenthe... |
| 15:38:51 | <[Leary]> | % :set -BlockArguments |
| 15:38:52 | <yahb2> | Some flags have not been recognized: -BlockArguments |
| 15:38:55 | <[Leary]> | % :set -XBlockArguments |
| 15:38:56 | <yahb2> | <no output> |
| 15:38:58 | <[Leary]> | % lcfix :: (a -> a) -> a; lcfix = unsafeCoerce $ LC \f -> (LC \x -> f $$ (x $$ x)) $$ (LC \x -> f $$ (x $$ x)) |
| 15:38:58 | <yahb2> | <no output> |
| 15:39:07 | <[Leary]> | % lcfix (\lucas a b -> a:lucas b (a + b)) 0 1 |
| 15:39:07 | <yahb2> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,3908... |
| 15:39:19 | <[Leary]> | Correction: when there's a will, there's a way. |
| 15:39:27 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 15:40:01 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:49ec:9442:e7af:3828) |
| 15:41:46 | → | audio joins (~audio@user/audio) |
| 15:42:35 | × | euleritian quits (~euleritia@dynamic-046-114-109-096.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:42:54 | → | euleritian joins (~euleritia@77.22.252.56) |
| 15:44:05 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds) |
| 15:44:58 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 15:45:29 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 15:45:38 | <yin> | nice |
| 15:49:35 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds) |
| 15:50:10 | <yin> | % lcfix' :: (a -> a) -> a; lcfix' = unsafeCoerce $ LC \f -> (LC \x -> x $$ x) $$ (LC \x -> f $$ (x $$ x)) |
| 15:50:11 | <yahb2> | <no output> |
| 15:50:16 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 15:50:31 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 15:50:34 | <yin> | % lcfix' (\lucas a b -> a:lucas b (a + b)) 0 1 |
| 15:50:34 | <yahb2> | [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,3908... |
| 15:51:37 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 255 seconds) |
| 15:53:32 | <yin> | % lcfix' (\lucas a b -> a:lucas b (a + b)) 2 1 -- for consistency |
| 15:53:32 | <yahb2> | [2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,... |
| 15:55:04 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 245 seconds) |
| 15:55:47 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 15:56:04 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 15:58:22 | → | Vajb joins (~Vajb@207.61.167.122) |
| 15:58:47 | <audio> | i was here years ago and remember you guys being interesting people |
| 15:58:50 | <audio> | is that still the case? |
| 16:00:26 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 246 seconds) |
| 16:01:36 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 16:03:23 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 16:04:14 | → | myme joins (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) |
| 16:06:02 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 246 seconds) |
| 16:07:21 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 260 seconds) |
| 16:07:46 | <monochrom> | I think I am still interesting, and more interesting than before. >:) |
| 16:08:08 | <dolio> | Hmm, I don't know... |
| 16:08:21 | → | sm joins (~sm@plaintextaccounting/sm) |
| 16:08:33 | <monochrom> | Self assessments need to be biased! |
| 16:09:32 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds) |
| 16:13:01 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 16:14:13 | × | qqq quits (~qqq@92.43.167.61) (Remote host closed the connection) |
| 16:14:29 | <shapr> | @quote |
| 16:14:29 | <lambdabot> | mauke_ says: sin x / n = six / 1 = 6 |
| 16:14:33 | <shapr> | audio: maybe? |
| 16:14:49 | <shapr> | audio: what do you consider interesting? |
| 16:17:33 | × | myme quits (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) (Quit: WeeChat 4.0.5) |
| 16:17:48 | → | myme joins (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) |
| 16:22:36 | × | Xe quits (~cadey@perl/impostor/xe) (Ping timeout: 248 seconds) |
| 16:22:58 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds) |
| 16:24:40 | → | Xe joins (~cadey@perl/impostor/xe) |
| 16:25:40 | × | Nixkernal quits (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 16:26:17 | → | Nixkernal joins (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) |
| 16:28:21 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 16:29:35 | → | euleritian joins (~euleritia@77.22.252.56) |
| 16:29:43 | <yin> | how do i import the list type when i have NoImplicitPrelude? |
| 16:31:48 | <monochrom> | I think the list type is always there as syntax. I haven't checked. |
| 16:33:47 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 255 seconds) |
| 16:37:11 | <yin> | you're right it seems |
| 16:42:08 | → | erisco_ joins (~erisco@d24-141-66-165.home.cgocable.net) |
| 16:44:30 | × | erisco quits (~erisco@d24-141-66-165.home.cgocable.net) (Ping timeout: 272 seconds) |
| 16:44:30 | erisco_ | is now known as erisco |
| 16:45:27 | × | kraftwerk28 quits (~kraftwerk@164.92.219.160) (Ping timeout: 240 seconds) |
| 16:46:17 | × | Yumemi quits (~Yumemi@chamoin.net) (Ping timeout: 240 seconds) |
| 16:46:23 | → | kraftwerk28 joins (~kraftwerk@164.92.219.160) |
| 16:46:34 | → | Yumemi joins (~Yumemi@2001:bc8:47a0:1b14::1) |
| 16:46:42 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection) |
| 16:46:56 | → | waleee joins (~waleee@2001:9b0:21c:e600:f2f3:f744:435d:137c) |
| 16:47:00 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 16:48:24 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 16:49:27 | → | califax joins (~califax@user/califx) |
| 16:52:14 | → | __monty__ joins (~toonn@user/toonn) |
| 16:56:39 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds) |
| 16:58:45 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 17:01:57 | → | Vajb joins (~Vajb@207.61.167.122) |
| 17:07:38 | × | todi quits (~todi@p4fd1a3e6.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 17:14:37 | <Unicorn_Princess> | hmmm... what's the consensus on prefixing query functions with verbs? like `isEven` vs `even`, or `takeFirstWord` vs `firstWord`? |
| 17:14:59 | <Unicorn_Princess> | the versions without verbs seem more elegant and concise, but i suspect it leads to confusion... |
| 17:15:35 | <geekosaur> | :t even |
| 17:15:36 | <lambdabot> | Integral a => a -> Bool |
| 17:15:43 | <geekosaur> | base likes the prefix-less ones |
| 17:16:10 | × | kanto quits (~kantokuen@user/kantokuen) (Remote host closed the connection) |
| 17:16:37 | → | kantokuen joins (~kantokuen@user/kantokuen) |
| 17:16:37 | <geekosaur> | well, that's not entirely true, but I think the exceptions are when the unprefixed ones don't work |
| 17:16:46 | <geekosaur> | :t Data.Maybe.isNothing |
| 17:16:47 | <lambdabot> | Maybe a -> Bool |
| 17:17:41 | <Unicorn_Princess> | System.Directory and .FilePath mostly use the prefixed ones |
| 17:18:28 | <Unicorn_Princess> | i often want to name variables/parameters the same as unprefixed functions, too |
| 17:20:59 | → | nucranium joins (~nucranium@2a02:8010:6173:0:7d81:65c5:a598:8bba) |
| 17:21:14 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 17:21:18 | → | tzh joins (~tzh@c-71-193-181-0.hsd1.or.comcast.net) |
| 17:24:20 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:24:39 | ← | audio parts (~audio@user/audio) () |
| 17:25:38 | <EvanR> | Unicorn_Princess, I brought this up at some point. Functions aren't always verbs |
| 17:25:48 | <EvanR> | haskell has lots of parts of speech |
| 17:26:39 | <EvanR> | maybe IO actions are always verbs because imperative programming |
| 17:27:10 | <dolio> | They aren't. |
| 17:28:39 | <Unicorn_Princess> | unrelated, if i installed my haskell stuff with ghcup, do i still need to run `cabal update`? and if i don't specify a version in mypackage.cabal, what determines which version it uses, or which are available? i notice i'm not always getting the latest that is on hackage |
| 17:29:01 | <mauke> | open, put, get, close |
| 17:29:05 | <mauke> | imperative |
| 17:29:21 | <dolio> | directoryContents |
| 17:29:32 | <EvanR> | open could be an adjective and fork could be a noun xD |
| 17:29:41 | <ncf> | isn't it getDirectoryContents |
| 17:29:43 | <mauke> | square root, even, ord, chr -- declarative |
| 17:29:46 | <dolio> | Oh, is it? |
| 17:30:01 | → | todi joins (~todi@p4fd1a3e6.dip0.t-ipconnect.de) |
| 17:30:12 | <ncf> | i like that adverbs modify verbs, i.e. atomically :: STM a → IO a |
| 17:30:19 | <EvanR> | ^ |
| 17:30:24 | <sclv> | Unicorn_Princess: `cabal update` should be run to update the _hackage index_ -- ghcup runs it for you on install, but you need to run it periodically to update the view of hackage. |
| 17:30:35 | <mauke> | atomically is badly named and should be something like runSTM |
| 17:30:41 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 17:31:02 | <EvanR> | atomically rocks |
| 17:31:08 | <sclv> | the version used is determined by cabal running a solver that attempts to use the latest compatible version with otherwise-constrained libraries -- e.g. the version of base that is builtin to the ghc you have installed, etc. |
| 17:31:16 | <mauke> | alternatively, STM should be renamed to Atomically or something |
| 17:31:39 | <sclv> | `run` is usually reserved for functions of the form `m a -> a` |
| 17:31:50 | <sclv> | or which take some other arguments, but eventually yield something of that form |
| 17:32:02 | <mauke> | :t runReaderT |
| 17:32:03 | <lambdabot> | ReaderT r m a -> r -> m a |
| 17:32:27 | <Unicorn_Princess> | sclv, thanks! |
| 17:32:38 | → | califax joins (~califax@user/califx) |
| 17:32:43 | <haskellbridge> | <Inst> I'd see functions as verbs and non-function values as nouns. |
| 17:32:46 | <mauke> | the point is that there is no way to run an STM computation non-atomically |
| 17:33:05 | <mauke> | but the existence of 'atomically' suggests that there is |
| 17:33:09 | <haskellbridge> | <Inst> You can noun a verb by wrapping it in a newtype, or putting it into a container. |
| 17:33:10 | <geekosaur> | note that that also works in the other direction, you can specify a timestamp to `cabal update` to set the Hackage view to the one current at that time |
| 17:34:12 | <haskellbridge> | <Inst> verb a noun with const? :) |
| 17:35:01 | <sclv> | :t flip runReader |
| 17:35:02 | <lambdabot> | r -> Reader r c -> c |
| 17:35:05 | <sclv> | :-P |
| 17:36:22 | <EvanR> | but also atomically emphasizes that you are running the action atomically while runSTM doesn't as much, though it contains a T for transaction it's not as in-your-face |
| 17:36:48 | <EvanR> | and atomic stuff should be in your face! |
| 17:37:30 | × | friendshipaka quits (~Friendshi@user/Friendship) (Ping timeout: 255 seconds) |
| 17:38:32 | <mauke> | for me it had the opposite effect |
| 17:39:34 | <mauke> | because I was relying on atomicity when putting together critical parts of my STM actions, but I couldn't find a way to use 'atomically' in STM because it would only return IO |
| 17:39:41 | → | target_i joins (~target_i@217.175.14.39) |
| 17:40:04 | <mauke> | so I kept worrying that someone might inadvertently use my actions non-atomically and break invariants |
| 17:40:28 | <mauke> | until I realized that 'atomically' is misnamed and the part that guarantees atomicity is STM itself, not the run function |
| 17:43:12 | <haskellbridge> | <Inst> if then else vs guards for only 1 cond: which is better on function definition level? |
| 17:44:53 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 260 seconds) |
| 17:47:21 | <EvanR> | I only use if then else if it's very small and readable |
| 17:53:19 | → | idgaen joins (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 17:55:36 | <monochrom> | Every case is different. |
| 17:56:51 | <monochrom> | I am not afraid of choosing one way that looks nice here-and-now, and changing to the other way in the future if there needs change. |
| 17:58:03 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:02:08 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:02:58 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 260 seconds) |
| 18:03:45 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:04:39 | × | nucranium quits (~nucranium@2a02:8010:6173:0:7d81:65c5:a598:8bba) (Ping timeout: 245 seconds) |
| 18:05:42 | × | stilgart quits (~Christoph@chezlefab.net) (Quit: leaving) |
| 18:05:52 | → | stilgart joins (~Christoph@chezlefab.net) |
| 18:08:37 | × | P1RATEZ quits (piratez@user/p1ratez) (Remote host closed the connection) |
| 18:08:48 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 260 seconds) |
| 18:09:41 | → | wroathe joins (~wroathe@50.205.197.50) |
| 18:09:41 | × | wroathe quits (~wroathe@50.205.197.50) (Changing host) |
| 18:09:41 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:13:26 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 18:13:47 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 18:14:41 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:19:46 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 260 seconds) |
| 18:19:51 | × | fweht quits (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:20:24 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:24:37 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 18:24:56 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 18:25:58 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:30:36 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 18:31:30 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 18:33:19 | × | cpressey quits (~cpressey@host-92-10-146-234.as13285.net) (Ping timeout: 248 seconds) |
| 18:35:15 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 18:35:56 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 248 seconds) |
| 18:43:52 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 18:48:50 | → | cpressey joins (~cpressey@host-92-21-194-169.as13285.net) |
| 18:53:01 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 18:53:29 | → | falafel joins (~falafel@62.175.113.194.dyn.user.ono.com) |
| 18:54:01 | <haskellbridge> | <Inst> If then else still has utility if you're writing a pure expression, for instance, putStrLn (if foo == bar then "OK" else "Error") |
| 18:54:26 | <haskellbridge> | <Inst> or that could be written as putStrLn $ if foo == bar then "OK" else "Error" |
| 18:55:03 | <haskellbridge> | <Inst> Also, why is coerce unreliable? |
| 18:55:35 | <haskellbridge> | <Inst> I'm trying to get it to open a newtype, but it turns out it can't figure out how to coerce into Vector (Vector Bool) for a for_ HOF, and requires type annotations |
| 18:55:59 | <EvanR> | the parentheses version looks much better from here |
| 18:56:28 | <EvanR> | if then else works fine on IO actions |
| 18:56:35 | <EvanR> | also |
| 18:56:46 | <mauke> | % putStrLn if 1 == 2 then "OK" else "Error" |
| 18:56:46 | <yahb2> | Error |
| 18:57:18 | <EvanR> | mind blown |
| 18:57:27 | <mauke> | blog arguments |
| 18:57:30 | → | Inst joins (~Inst@120.244.192.250) |
| 18:57:52 | <Inst> | % {-# LANGUAGE BlockArguments #-} |
| 18:57:53 | <yahb2> | <no output> |
| 18:58:10 | <Inst> | % putStrLn if 1 == 2 then "OK" else "Error" |
| 18:58:11 | <yahb2> | Error |
| 18:58:30 | <monochrom> | Unpopular opinion: MultiwayIf is also pretty nifty. |
| 18:58:47 | <Inst> | ^^^ |
| 18:58:51 | <monochrom> | It looks like guards but it's an expression. |
| 18:59:22 | <mauke> | % [putStrLn "OK", putStrLn "Error"] !! fromEnum (1 == 2) -- who needs if |
| 18:59:22 | <yahb2> | OK |
| 18:59:50 | <monochrom> | Ugh haha |
| 19:00:05 | <EvanR> | install aviary and use combinators |
| 19:00:19 | <Inst> | newConway | 0 `elem` [cols, rows] = conway | otherwise = ... |
| 19:00:27 | <monochrom> | Darn I have also needed a {false,true}->{0,1} function and I forgot that fromEnum does it. :) |
| 19:00:34 | monochrom | goes change his code! |
| 19:00:51 | <mauke> | % [putStrLn "OK", putStrLn "Error"] !! unsafeCoerce (1 == 2) -- who needs fromEnum |
| 19:00:52 | <yahb2> | *** Exception: Prelude.!!: index too large |
| 19:00:54 | <mauke> | aww |
| 19:01:09 | <mauke> | right, I forgot |
| 19:01:29 | <EvanR> | so I dare ask how that was supposed to work |
| 19:01:57 | <mauke> | it works in C! |
| 19:02:10 | <Inst> | you just made me crash my GHCI :( |
| 19:02:19 | <EvanR> | I don't know how that explains it or if it even is true xD |
| 19:02:35 | <monochrom> | Ah I see, I wanted the 0 and 1 to be Double. |
| 19:03:10 | <EvanR> | !! [0.0, 1.0] !! fromEnum (1 == 2) |
| 19:03:16 | <EvanR> | or something |
| 19:03:27 | <mauke> | newtype Bool = Bool Double; true = Bool 1; false = Bool 0 |
| 19:03:38 | <Inst> | % unsafeCoerce True :: Int |
| 19:03:39 | <yahb2> | -576460205259816976 |
| 19:03:49 | <Inst> | % unsafeCoerce True :: Word |
| 19:03:49 | <yahb2> | 17870283868449734640 |
| 19:03:57 | <Inst> | % unsafeCoerce True :: Int |
| 19:03:58 | <yahb2> | -576460205259816976 |
| 19:04:20 | <EvanR> | you can't handle the truth |
| 19:04:55 | <EvanR> | (with unsafeCoerce) |
| 19:05:42 | <monochrom> | An Insecure Truth |
| 19:05:53 | <mauke> | % unsafeCoerce False :: Maybe () |
| 19:05:54 | <yahb2> | Nothing |
| 19:06:00 | <mauke> | ah, that looks promising |
| 19:06:05 | <monochrom> | @quote monochrom unsafeCoerce |
| 19:06:05 | <lambdabot> | monochrom says: isTrue = (unsafeCoerce :: Either a b -> Bool) . (unsafeCoerce :: Maybe c -> Either a b) . (unsafeCoerce :: Bool -> Maybe c) |
| 19:07:19 | <mauke> | % maybe (putStrLn "Error") (\ ~()-> putStrLn "OK") (unsafeCoerce (1 == 2)) |
| 19:07:19 | <yahb2> | Error |
| 19:07:24 | → | Lycurgus joins (~georg@user/Lycurgus) |
| 19:10:39 | <EvanR> | :t coerce |
| 19:10:40 | <lambdabot> | error: |
| 19:10:40 | <lambdabot> | • Variable not in scope: coerce |
| 19:10:40 | <lambdabot> | • Perhaps you meant ‘coerced’ (imported from Control.Lens) |
| 19:11:01 | <tomsmeding> | % :t Data.Coerce.coerce |
| 19:11:01 | <yahb2> | Data.Coerce.coerce :: Coercible a b => a -> b |
| 19:12:03 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 19:12:16 | <EvanR> | Inst, it's a -> b, it can easily fail to infer a or b due to ambiguity if there's no other type information around. Luckily there's no defaulting |
| 19:13:02 | <monochrom> | % maybe (putStrLn "Error") (\ ~()-> putStrLn "OK") (unsafeCoerce (1 == 1)) |
| 19:13:02 | <yahb2> | OK |
| 19:13:20 | <monochrom> | That is awesome and awful at the same time. :) |
| 19:13:26 | <tomsmeding> | % maybe (putStrLn "Error") (\(Just _) -> putStrLn "OK") (unsafeCoerce (1 == 1)) |
| 19:13:26 | <yahb2> | /workdir/entry.sh: line 6: 4 Segmentation fault (core dumped) ghcup --offline run -- ghci Yahb2Defs.hs 2>&1 |
| 19:13:30 | <tomsmeding> | :D |
| 19:13:33 | <tomsmeding> | % 42 |
| 19:13:34 | <yahb2> | Oops, something went wrong |
| 19:13:35 | <tomsmeding> | % 42 |
| 19:13:36 | <yahb2> | 42 |
| 19:13:41 | <tomsmeding> | okay it's alive again |
| 19:14:11 | <tomsmeding> | I love how that shell output just ends up in irc -- it makes sense given how the thing is set up |
| 19:14:34 | <EvanR> | you cause yahb2 to shatter into a million pieces. Then they liquid metal reformed via advanced-for-the-time special effects |
| 19:15:37 | <monochrom> | Sorry! |
| 19:16:06 | <tomsmeding> | monochrom: why are you apologising? |
| 19:16:20 | <monochrom> | For inspiring how to crash yahb2 :) |
| 19:16:24 | <tomsmeding> | :p |
| 19:16:51 | <mauke> | https://infosec.exchange/@barubary/111271784359087322 |
| 19:17:17 | <monochrom> | :) |
| 19:17:39 | <tomsmeding> | I wonder why they specifically called out haskell |
| 19:17:59 | <EvanR> | and that's why we have the sense of => backwards in type class / instance definitions |
| 19:18:15 | <monochrom> | But Bool's <= is stricter than necessary. False `implies` undefined could be True rather than bottoming out. |
| 19:18:50 | <tomsmeding> | hence they should have used C or JS or whatever as an example, where that's not an issue :p |
| 19:18:55 | <monochrom> | I think because other languages either have no real Bool or do not order Bool. |
| 19:18:58 | <EvanR> | > False <= True |
| 19:18:59 | <lambdabot> | True |
| 19:19:03 | <EvanR> | > False <= undefined |
| 19:19:05 | <lambdabot> | *Exception: Prelude.undefined |
| 19:19:15 | <EvanR> | yeah but should False really be ordered earlier than bottom |
| 19:19:34 | <EvanR> | "who ordered that" |
| 19:19:36 | <geekosaur> | it's not ordering, it's laziness |
| 19:19:43 | <monochrom> | No, in C both 1 and -1 (and 2 and -2 and...) are true. You don't have a reliable false <= true. |
| 19:19:53 | <monochrom> | You don't even have true == true heh |
| 19:19:55 | <tomsmeding> | #include <stdbool.h> |
| 19:19:57 | <EvanR> | "False <= undefined could be True" |
| 19:20:03 | <tomsmeding> | monochrom: you have true == true |
| 19:20:19 | <geekosaur> | yes, because you only need to see the Fslse |
| 19:20:20 | <tomsmeding> | you just don't have that !!x && !!y implies x == y |
| 19:20:28 | <geekosaur> | *False |
| 19:20:28 | <EvanR> | it could also be False |
| 19:20:31 | <monochrom> | Right OK. |
| 19:21:23 | <monochrom> | && and || are already conditionally non-strict in the 2nd argument. I would implement implies to be like that too. |
| 19:21:47 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:21:51 | <monochrom> | I don't mean everyone should accept it, but socially many people may expect it. |
| 19:21:52 | <geekosaur> | that's my take as well |
| 19:22:14 | <geekosaur> | once you see the first argument is False, you don't care about the second |
| 19:22:19 | <tomsmeding> | !a || b is lazy enough |
| 19:22:30 | <mauke> | why shouldn't minBound <= _ = True everywhere? |
| 19:22:35 | <monochrom> | I hate !a || b :) |
| 19:22:43 | <tomsmeding> | doesn't handle 'undefined => True', but then neither ooes (||) |
| 19:22:45 | <tomsmeding> | *does |
| 19:23:22 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 19:24:13 | <monochrom> | mauke: Along the same line, why shouldn't 0 * _ = 0 almost everywhere? :) |
| 19:26:02 | <mauke> | > undefined ^ 0 |
| 19:26:04 | <lambdabot> | 1 |
| 19:26:09 | <monochrom> | <3 |
| 19:26:24 | <mauke> | > undefined ^ 0 <3 |
| 19:26:26 | <lambdabot> | True |
| 19:26:33 | <monochrom> | :( |
| 19:27:18 | <tomsmeding> | :p |
| 19:32:42 | × | idgaen quits (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.5) |
| 19:33:25 | <EvanR> | :[] |
| 19:33:39 | <tomsmeding> | Ö |
| 19:33:50 | <mauke> | ö_ö |
| 19:35:35 | × | vglfr quits (~vglfr@37.73.16.154) (Read error: Connection reset by peer) |
| 19:38:38 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 260 seconds) |
| 19:46:59 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 19:49:11 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 19:51:58 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds) |
| 19:52:22 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 19:57:01 | × | Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving) |
| 19:59:34 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds) |
| 20:04:53 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 20:11:41 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 20:13:53 | → | ystael joins (~ystael@user/ystael) |
| 20:16:32 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 20:17:23 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 20:21:13 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
| 20:22:40 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 20:26:15 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 240 seconds) |
| 20:29:03 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 240 seconds) |
| 20:30:17 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 20:31:04 | × | Square quits (~Square@user/square) (Ping timeout: 255 seconds) |
| 20:31:37 | → | Vajb joins (~Vajb@207.61.167.122) |
| 20:34:05 | × | hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 255 seconds) |
| 20:35:49 | → | hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net) |
| 20:36:27 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 20:37:59 | × | myme quits (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) (Quit: WeeChat 4.0.5) |
| 20:41:07 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 258 seconds) |
| 20:43:15 | → | myme joins (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) |
| 20:48:20 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 256 seconds) |
| 20:49:44 | → | Square joins (~Square@user/square) |
| 20:50:59 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 20:52:11 | × | dcoutts quits (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection) |
| 20:52:33 | → | dcoutts joins (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
| 20:52:49 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 20:56:34 | × | [exa] quits (~exa@srv3n.blesmrt.net) (Remote host closed the connection) |
| 20:57:16 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 248 seconds) |
| 21:01:19 | × | alphacentauri quits (alphacenta@gateway/vpn/protonvpn/alphacentauri) (Quit: WeeChat 4.1.0) |
| 21:01:56 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 256 seconds) |
| 21:02:31 | → | alphacentauri joins (alphacenta@gateway/vpn/protonvpn/alphacentauri) |
| 21:03:04 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 21:06:06 | → | alphacen1 joins (~alphacent@modemcable048.127-56-74.mc.videotron.ca) |
| 21:07:58 | × | alphacentauri quits (alphacenta@gateway/vpn/protonvpn/alphacentauri) (Ping timeout: 272 seconds) |
| 21:08:14 | × | alphacen1 quits (~alphacent@modemcable048.127-56-74.mc.videotron.ca) (Client Quit) |
| 21:09:32 | × | Jackneill quits (~Jackneill@20014C4E1E0E6F0085D71214A6273985.dsl.pool.telekom.hu) (Ping timeout: 255 seconds) |
| 21:09:43 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 21:10:02 | × | fendor quits (~fendor@2a02:8388:1640:be00:aab:1226:f274:5021) (Remote host closed the connection) |
| 21:13:56 | → | vglfr joins (~vglfr@138.199.53.246) |
| 21:14:50 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:17:08 | → | Pickchea joins (~private@user/pickchea) |
| 21:17:08 | × | Vajb quits (~Vajb@207.61.167.122) (Read error: Connection reset by peer) |
| 21:18:10 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 21:18:31 | → | sm joins (~sm@plaintextaccounting/sm) |
| 21:19:22 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds) |
| 21:21:13 | × | myme quits (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) (Quit: WeeChat 4.0.5) |
| 21:25:16 | × | vglfr quits (~vglfr@138.199.53.246) (Ping timeout: 260 seconds) |
| 21:25:50 | → | vglfr joins (~vglfr@88.155.246.162) |
| 21:30:05 | × | vglfr quits (~vglfr@88.155.246.162) (Ping timeout: 240 seconds) |
| 21:30:38 | → | myme joins (~myme@2a01:799:d60:e400:9f43:ca0d:9ecf:24fd) |
| 21:31:08 | → | vglfr joins (~vglfr@88.155.246.162) |
| 21:33:12 | × | vglfr quits (~vglfr@88.155.246.162) (Read error: Connection reset by peer) |
| 21:40:34 | → | falafel joins (~falafel@62.175.113.194.dyn.user.ono.com) |
| 21:46:28 | <Unicorn_Princess> | hm. when chaining pure and monadic computations, e.g. to modify a file with `readFile file <&> fixContents >>= writeFile file`, one has to mix a bunch of different chaining operators, i.e. <&> and >>= in this case. i there some category theory magic that can simplify this? the conduit package looks promising |
| 21:46:35 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:53:51 | <ncf> | i'm not sure what kind of simplification you're after, but note that you can reassociate that to >>=/>>> instead of <&>/>>= |
| 21:53:56 | → | alphacentauri joins (alphacenta@gateway/vpn/protonvpn/alphacentauri) |
| 21:56:15 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:56:52 | <Unicorn_Princess> | https://github.com/snoyberg/conduit#readme has nice examples for what i have in mind |
| 21:57:29 | <Unicorn_Princess> | how would i jam >>> in there btw? i know very little about arrows |
| 21:58:29 | <ncf> | readFile file >>= (fixContents >>> writeFile file) |
| 21:58:47 | <ncf> | where (>>>) = flip (.) |
| 21:59:41 | <geekosaur> | I think that's essentially the one from Control.Category, not the one from Control.Arrow |
| 22:00:04 | × | cpressey quits (~cpressey@host-92-21-194-169.as13285.net) (Quit: Client closed) |
| 22:01:00 | <tomsmeding> | Unicorn_Princess: `readFile file >>= (return . fixContents) >>= writeFile file` ? |
| 22:01:36 | <Unicorn_Princess> | yeah that works, but return is ugly there :P |
| 22:04:52 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 22:05:31 | <Unicorn_Princess> | hmmm, it's midnight here, i better put away arrows for now |
| 22:08:15 | <Inst> | `readFile file >>= writeFile file . fixContents |
| 22:09:43 | <Unicorn_Princess> | gross. loses the left-to-right flow of data |
| 22:10:02 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 272 seconds) |
| 22:10:04 | <Inst> | you can verticalize it |
| 22:10:08 | <Inst> | readFile |
| 22:10:14 | <Inst> | >>= writeFile file . fixContents |
| 22:10:29 | <Unicorn_Princess> | i prefer the version with <&> for now |
| 22:11:11 | <Inst> | also, tbh, having to use different pure and monadic chaining operators isn't necessarily a bad thing, because they help give hints as to what the functions do |
| 22:11:25 | <geekosaur> | ^ |
| 22:12:32 | <Inst> | arguably foo =<< bar is less smelly than foo(bar()) because you at least have annotations to point out what's effectful and what's not |
| 22:13:06 | <Inst> | as well as indicate an order of effects |
| 22:14:09 | <Inst> | i'm incredibly depressed, just put together my first game of life, and it's mesmerizing :( |
| 22:14:21 | <Inst> | but missing so many features! |
| 22:15:47 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds) |
| 22:16:15 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 22:19:55 | × | acidjnk_new quits (~acidjnk@p200300d6e72b93737dc6e69178877b3f.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 22:20:48 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 260 seconds) |
| 22:21:38 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 22:26:08 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 22:30:41 | <EvanR> | to uniformize and potentially make it harder to understand you can use <=< everywhere |
| 22:31:08 | × | Square quits (~Square@user/square) (Ping timeout: 248 seconds) |
| 22:32:27 | × | jargon quits (~jargon@174-22-221-150.phnx.qwest.net) (Remote host closed the connection) |
| 22:32:42 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 22:33:10 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 256 seconds) |
| 22:35:02 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:37:13 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 22:37:24 | → | Vajb joins (~Vajb@207.61.167.122) |
| 22:38:18 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 22:40:33 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 22:41:26 | × | Inst quits (~Inst@120.244.192.250) (Ping timeout: 255 seconds) |
| 22:43:04 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 22:44:05 | × | Vajb quits (~Vajb@207.61.167.122) (Ping timeout: 240 seconds) |
| 22:45:35 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 23:02:46 | → | Alleria joins (~JohnGalt@user/alleria) |
| 23:02:50 | dy_ | is now known as dy |
| 23:03:00 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 23:03:06 | × | dy quits (sid3438@id-3438.helmsley.irccloud.com) (Changing host) |
| 23:03:06 | → | dy joins (sid3438@user/dy) |
| 23:05:33 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 23:05:47 | → | migas4 joins (~migas@astra4961.startdedicated.net) |
| 23:10:22 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 23:11:17 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 23:13:57 | <probie> | Why not use `(.)` from Control.Category everywhere (along with `Control.Arrow`) |
| 23:14:07 | <probie> | runKleisli (Kleisli (writeFile file) . arr fixContents . Kleisli readFile) file |
| 23:15:09 | × | Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:15:12 | × | migas9 quits (~migas@static.140.65.63.178.clients.your-server.de) (Quit: The Lounge - https://thelounge.github.io) |
| 23:15:27 | <probie> | (which I guess is morally `>=>` or `<=<` everywhere) |
| 23:15:34 | → | migas9 joins (~migas@static.140.65.63.178.clients.your-server.de) |
| 23:16:05 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 255 seconds) |
| 23:16:52 | <EvanR> | yeah basically, that's even more uniform and more confusing xD |
| 23:17:18 | <EvanR> | different categories at different places in the line of code |
| 23:18:16 | <Unicorn_Princess> | is it just me or is the haskell LSP incredibly janky? on emacs with lsp-haskell, it seems to work, like, 30% of the time :| |
| 23:22:08 | → | Vajb joins (~Vajb@207.61.167.122) |
| 23:27:21 | → | arahael joins (~arahael@119-18-2-212.771202.syd.nbn.aussiebb.net) |
| 23:27:35 | × | target_i quits (~target_i@217.175.14.39) (Quit: leaving) |
| 23:32:38 | <geekosaur> | works well for me but I use VSCode |
| 23:33:45 | <Unicorn_Princess> | what does vscode use under the hood for haskell? |
| 23:34:08 | → | dhruvasagar joins (~dhruvasag@49.207.194.211) |
| 23:34:22 | <geekosaur> | it uses the same LSP but has its own built-in LSP support code rather than the LSP support library emacs uses |
| 23:34:29 | <geekosaur> | which might be a bit dubious |
| 23:35:10 | <Unicorn_Princess> | hm. iirc the lsp for rust felt very solid in emacs, which uses the same (i think?) glue code... |
| 23:35:42 | <Unicorn_Princess> | ah no there are some specialized packages in-between. hm |
| 23:36:31 | <Unicorn_Princess> | maybe tomorrow. goodnight |
| 23:36:40 | <geekosaur> | yeh, it uses lsp-rust-servcer instead of lsp-mode |
| 23:36:49 | <Unicorn_Princess> | wait what |
| 23:37:20 | <Unicorn_Princess> | i only have rustic in my emacs init file for rust |
| 23:37:22 | <probie> | In my experience, most of the headaches come from hls, since it's rather picky about what GHC versions its used with. I haven't had too many problems with `lsp-mode` itself |
| 23:38:13 | <geekosaur> | there's a separate one for rustic, yeh |
| 23:38:32 | <Unicorn_Princess> | nah it's too late for this rabbit hole. goodnight! |
| 23:38:49 | × | nickiminjaj quits (~nickiminj@user/laxhh) (Read error: Connection reset by peer) |
| 23:38:51 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
| 23:39:21 | <geekosaur> | I have more trouble with rust-analyzer in vscode, for some reason it insists my xmonad config dir needs a cargo config file |
| 23:39:48 | <geekosaur> | (no, my rust stuff isn't even on the same drive, idiot) |
| 23:40:39 | → | nickiminjaj joins (~nickiminj@188.146.126.78) |
| 23:40:39 | × | nickiminjaj quits (~nickiminj@188.146.126.78) (Changing host) |
| 23:40:39 | → | nickiminjaj joins (~nickiminj@user/laxhh) |
| 23:44:07 | × | dhruvasagar quits (~dhruvasag@49.207.194.211) (Ping timeout: 264 seconds) |
| 23:49:07 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 23:53:53 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
All times are in UTC on 2023-10-21.