Home liberachat/#haskell: Logs Calendar

Logs on 2022-03-22 (liberachat/#haskell)

00:00:03 <abastro[m]> Also no monad trair in rust
00:00:03 <segfaultfizzbuzz> SPJ says that the next haskell will be strict, while the idris dude says that the next idris (which i have been told is the next haskell) will be nonstrict *eyes crossing*
00:00:25 <segfaultfizzbuzz> abastro[m]: why? have you looked at itertools?
00:00:27 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
00:00:27 <energizer> i never understood why nobody uses haskell as a system shell
00:00:41 werneta_ joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
00:00:52 <hpc> energizer: nothing beats bash for just writing a command and making stuff happen
00:01:04 <hpc> its default mode is exec()
00:01:04 <energizer> good joke
00:01:08 <abastro[m]> Itertools? How do you use it?
00:01:21 <geekosaur> now I'm reminded of the old NOTES entry in the v7 unix m4 manpage
00:01:29 <hpc> every other plausible shell's default mode is variable-level
00:01:35 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
00:01:47 <geekosaur> referring to m4 -e
00:01:47 <segfaultfizzbuzz> abastro[m]: https://docs.rs/itertools/latest/itertools/ it's a haskell-y/functional way of iterating on collections
00:02:14 <segfaultfizzbuzz> itertools is zip, join, fold, etc
00:02:16 <hpc> haha, "beats bash", just noticed it
00:02:38 <geekosaur> shouldhave been bashing out a command
00:02:57 <energizer> hpc: sorry i was being sarcastic, i think bash and shells in general are bad
00:03:28 <hpc> i put bash in the same bucket as vim
00:03:33 <abastro[m]> Oh I see
00:03:36 <hpc> or like, chorded keyboards
00:03:44 <segfaultfizzbuzz> hey i use vim
00:03:57 <abastro[m]> I mean, things like FunOnce in rust
00:04:08 <hpc> it's a ridiculously specific tool that you have to get good at, but when you're truly good at it nothing else makes you more productive for that specific thing
00:04:12 <segfaultfizzbuzz> ooooh FunOnce ;-) i had FunOnce
00:04:14 <abastro[m]> That you cannot use any function in the function parameter slot.
00:04:23 <abastro[m]> It complicates things I heard.
00:04:41 <hpc> vim's command language is similar, very specific and idiosyncratic and there's nothing else like it
00:04:49 <segfaultfizzbuzz> abastro[m]: by far rust is the highest productivity lang i have used. probably because im not smart enough to use haskell yet
00:04:57 <hpc> but then you're showing someone how to do something and you go tap-tap-tap and the whole file changes
00:05:07 <hpc> and that someone's head explodes from how easy it was
00:05:28 <zzz> hpc: ok so that's why vim is good. but why is it bad?
00:05:42 <abastro[m]> Hahaha
00:05:43 <hpc> vim is objectively perfect
00:05:45 <energizer> segfaultfizzbuzz: which languages is rust more productive than?
00:05:49 <hpc> it's like that greek statue that's missing its head
00:06:01 <hpc> it's so much better without it
00:06:13 <segfaultfizzbuzz> energizer: pretty much everything i think. i am a rust kool aid zealot fundamentalist
00:06:19 <abastro[m]> segfaultfizzbuzz, Well I feel productive doing haskell, I would have hard time dealing with borrow checker
00:06:25 <energizer> segfaultfizzbuzz: well that's implausible
00:06:36 <monochrom> I heard it was the arm. But perhaps different statue.
00:06:48 <hpc> abastro[m]: you'd be surprised - it's like dealing with haskell's type checker
00:06:55 <energizer> segfaultfizzbuzz: which ones are you comparing
00:07:05 <hpc> a lot of it gets inferred and you don't have to muck about with lifetimes unless you are doing something very interesting
00:07:19 <hpc> and it always catches some sort of lurking bug, even if you can't tell what that bug might have been
00:07:25 <zzz> energizer: hackage.haskell.org/package/turtle
00:07:33 <segfaultfizzbuzz> abastro[m]: the rust borrow checker used to be a little bit of work, now you won't encounter it that much. what kind of software are you trying to write?
00:07:39 <abastro[m]> (Tbh I wonder why you guys are persuading to use rust in a haskell chat)
00:07:42 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
00:07:47 chenqisu1 joins (~chenqisu1@183.217.201.47)
00:07:58 <hpc> abastro[m]: we're the heroes programming deserves :D
00:08:00 ProfSimm joins (~ProfSimm@87.227.196.109)
00:08:25 <monochrom> We persuade people to be rational. As opposed to religious.
00:08:27 <segfaultfizzbuzz> there also is https://github.com/gluon-lang/gluon
00:08:28 <abastro[m]> Oh right, I realized why I dislike rust. It steals ppl from haskell
00:08:48 <monochrom> At least I do.
00:09:03 <hpc> same
00:09:13 <abastro[m]> I guess I love HKT and lenses too much
00:09:58 <abastro[m]> And stateful list monad
00:10:29 <abastro[m]> Is stateful list monad doable in rust?
00:10:59 × werneta_ quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
00:11:00 <segfaultfizzbuzz> abastro[m]: afaik you don't need lists except for some kind of flow control circumstance i don't really understand
00:11:04 <abastro[m]> The nondeterminism which can duplicates state
00:11:20 <segfaultfizzbuzz> abastro[m]: usually when you think you want a list you actually want a Vec
00:11:37 <abastro[m]> I mean, haskell list is a stream
00:11:57 <dolio> I know when I want a vector vs. a list.
00:12:18 <segfaultfizzbuzz> dolio: well feel free to enlighten us
00:12:26 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
00:12:31 <abastro[m]> So like, stateful list monad works as backtracking with state
00:12:41 × mmhat quits (~mmh@55d49471.access.ecotel.net) (Quit: WeeChat 3.4.1)
00:12:43 <abastro[m]> You can backtrack to certain state
00:12:48 <dolio> What does that mean? I just know when I want one or the other, on a case-by-case basis.
00:12:55 × nicbk quits (~nicbk@user/nicbk) (Ping timeout: 240 seconds)
00:13:21 <dolio> It's more often lists, though.
00:13:25 <abastro[m]> Sometimes list is more useful, indeed. Tho ppl don't see that happen often
00:13:27 <abastro[m]> Oh wait
00:13:31 <abastro[m]> More often lists?
00:13:50 <abastro[m]> Isn't vec typically faster
00:14:26 <segfaultfizzbuzz> dolio: when should i use a list?
00:14:43 <segfaultfizzbuzz> abastro[m]: vec is "usually" what you want, not list
00:14:51 <dolio> That question is too open ended to answer reasonably.
00:14:54 <zzz> oh no haskell has become popular
00:15:07 <geekosaur> I rarely use lists longer than a few elements, so I usually don't bother with Vector (or Text for that matter)
00:15:10 × Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
00:15:31 <hpc> also, in haskell or in rust?
00:15:33 <zzz> segfaultfizzbuzz: do you use vectors for flow control?
00:15:37 <abastro[m]> I mean for haskell, list is obv better
00:15:47 <dolio> When I'm storing a context to translate to de Bruijn indices, though, I want a list, because I don't want to pay O(n) to add a variable to the front of the list.
00:15:50 <monochrom> abastro[m]: In the Haskell standard library, StateT [] fits your description. I don't know how easy it is to do in Rust.
00:15:50 <abastro[m]> But in rust..
00:16:03 <segfaultfizzbuzz> zzz: tbh i am not sophisticated enough of a programmer (yet?) to have needed this mysterious "flow control" phenomenon
00:16:06 <abastro[m]> Yea, I meant StateT []
00:16:12 <monochrom> Err, StateT S [], where S is your state type.
00:16:22 <zzz> segfaultfizzbuzz: maybe because i meant "control flow"
00:16:24 <abastro[m]> Something like that is what I often resort to
00:16:29 <abastro[m]> Idk if I am abusing monads
00:16:41 <segfaultfizzbuzz> s/"flow control"/"control flow"
00:16:52 <geekosaur> segfaultfizzbuzz, ever loopedover something? a list is a loop encoded as data
00:16:56 <monochrom> Don't worry, StateT S [] is the right choice :)
00:17:15 <abastro[m]> Isn't Rust list a linked list?
00:17:24 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
00:17:25 <segfaultfizzbuzz> geekosaur: interesting perspective
00:17:57 <segfaultfizzbuzz> abastro[m]: probably but i don't think i have ever run across a list once in a couple years of production use of rust
00:18:01 <abastro[m]> Now I wonder how to run StateT s [] asynchronously
00:18:30 <abastro[m]> Well rust does make it easier to use imperative constructs like for / while
00:18:37 <segfaultfizzbuzz> lists encourage pointer chasing whereas vecs encourage sequential memory access, which can be much faster
00:18:49 <segfaultfizzbuzz> so lists tend to have a lot of random memory access going on
00:19:06 <hpc> rust's list-like container situation is complicated, and focused on things like memory layout
00:19:10 <hpc> so like, slices
00:19:29 <zzz> segfaultfizzbuzz: haskell lists are stacks
00:19:30 <hpc> if you have a bytestring "abcdefg" in memory somewhere, and you do some substringing to it
00:19:33 <segfaultfizzbuzz> yes, rust has more direct concern for memory layout vs haskell/haskell data structures, as i understand it
00:19:36 <abastro[m]> At least OS uses linked lists
00:19:58 <hpc> you have a "cde" slice, which behaves like the bytestring "cde" except that it also holds onto the memory around it
00:20:02 <segfaultfizzbuzz> zzz: i see, and stacks have good memory ordering?
00:20:10 <abastro[m]> So there's your list application
00:20:21 <zzz> segfaultfizzbuzz: no, that's why you shouldn't use lists for everything
00:20:35 <abastro[m]> Haskell lists often unrolls into loops btw
00:20:48 <segfaultfizzbuzz> zzz: right, so this reinforces my point that lists are a sometimes snack
00:21:16 <segfaultfizzbuzz> zzz: unfortunately all the haskell introductory materials emphasize lists everywhere, and it seems like many common haskell data structures depend on them...?
00:21:31 <zzz> segfaultfizzbuzz: but your point is that "vec is usually what you want, not a list", which is the point im debating against
00:22:00 <zzz> you want vec when you want vec
00:22:01 <segfaultfizzbuzz> zzz: ok? why do i usually want a list instead then?
00:24:08 <zzz> iteration is a big one
00:24:23 <abastro[m]> I guess nearly no use of lists in rust
00:24:30 <segfaultfizzbuzz> zzz: itertools?
00:25:05 <abastro[m]> Think haskell list is more capable than just itertools
00:25:09 <segfaultfizzbuzz> abastro[m]: you can get very far in rust without lists, and it's possible that you will never encounter them. what are you trying to write
00:25:29 <segfaultfizzbuzz> itertools is effectively lazy i think (?) it only computes what is necessary (??)
00:25:33 <monochrom> Allow me to play devil's advocate and remind that the vector library also enjoys vector fusion, therefore WLOG you can always default to the vector library, even when [] is no worse. >:)
00:25:55 <abastro[m]> I mean, I am not trying to write something. Just that I like my `StateT s []`
00:26:01 <monochrom> OK OK except when you desired infinite lists!
00:26:43 <abastro[m]> IIRC Rust does not have backtrack-able iteration
00:27:07 <dolio> Not all uses for lists are fusible loops expressed via lists, though.
00:27:14 <segfaultfizzbuzz> abastro[m]: backtrack-able? are you mutating the structure you are iterating over?
00:27:27 <monochrom> Rust's list is not lazy. This can hurt some backtracking use cases.
00:27:48 <segfaultfizzbuzz> monochrom: can you point to the docs for "Rust's list"? i have never seen this
00:28:13 <segfaultfizzbuzz> monochrom: and as i said above, itertools is effectively lazy
00:28:20 <zzz> abastro[m]: my favorite monad is the Tardis Monad
00:29:15 <monochrom> Recall the N-queen problem that has a pretty natural forward constraint propagation + backtracking solution in functional programming. Using lists for choice and backtracking, the SML version takes huge memory, the Haskell version is pretty lean.
00:29:59 <segfaultfizzbuzz> SML?
00:30:13 <jackdk> Standard ML, probably
00:30:25 <geekosaur> https://en.wikipedia.org/wiki/Standard_ML
00:30:29 <zzz> Saturday Monad Live
00:30:35 <segfaultfizzbuzz> ah... lol saturday monad live lol
00:30:55 <zzz> sorry
00:32:31 <segfaultfizzbuzz> monochrom: i think i would have to study this to see the difference
00:33:26 <zzz> https://www.lri.fr/~filliatr/publis/enum2.pdf
00:33:33 <segfaultfizzbuzz> but i think you are saying that branch and bound can be naturally expressed in haskell with lists but not in rust/an ML family language?
00:33:37 × foul_owl quits (~kerry@174-21-69-110.tukw.qwest.net) (Ping timeout: 240 seconds)
00:34:10 <monochrom> Natural in all languages.
00:34:29 <monochrom> But laziness causes cost differences.
00:35:01 <segfaultfizzbuzz> is there a "maximum language overhead"?
00:35:17 <segfaultfizzbuzz> across languages?
00:35:42 <segfaultfizzbuzz> and if language overhead exists is it just because there are unknown compiler optimizations, or can the overhead be fundamental
00:36:03 Akiva joins (~Akiva@user/Akiva)
00:36:23 <geekosaur> every language has things it does better and things it does worse, where the metric can be memory, time, etc.
00:36:37 <segfaultfizzbuzz> right, but absolute worst case is 100x or something?
00:36:48 <geekosaur> this can differ by implementation or be fundamental to the language design
00:36:50 <zzz> segfaultfizzbuzz: Haskell is not "not ML"
00:37:00 × vorpuni quits (~pvorp@2001:861:3881:c690:6385:bd9:c0d2:296c) (Remote host closed the connection)
00:37:31 <geekosaur> and haskell is an ML family language. it's just the non-strict member of the family
00:38:52 <zzz> Haskell does *not* do well on saving space :X
00:38:59 <geekosaur> I doubt a hard maximum exists
00:41:02 <zzz> but that's the (increasingly small imo) price to pay for doing almost everything else right
00:41:07 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:41:48 <geekosaur> I've only found space to be a probloem once, and that was my own damn fault
00:41:55 Guest26 joins (~Guest26@60-241-4-164.static.tpgi.com.au)
00:42:11 <geekosaur> (population simulator, run with bounds disabled. can you say "exponential growth", kids?)
00:43:40 <zzz> I am ashamed to say how much disk space i dedicate to haskell tooling alone
00:45:23 <abastro[m]> Oh right
00:45:30 <abastro[m]> Cabal cache takes quite a size
00:47:29 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
00:47:42 zzz laughs in nix
00:47:53 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
00:48:53 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
00:48:59 foul_owl joins (~kerry@23.82.193.88)
00:52:36 <jackdk> zzz: I saw a "heaviest objects in the universe" meme that went sun; neutron star; black hole; node_modules, /nix/store
00:55:00 × segfaultfizzbuzz quits (~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8) (Ping timeout: 240 seconds)
00:57:11 × Guest26 quits (~Guest26@60-241-4-164.static.tpgi.com.au) (Quit: Ping timeout (120 seconds))
00:58:58 <abastro[m]> Is nix cache better?
00:59:02 <abastro[m]> Gah I need to learn nix
00:59:09 <abastro[m]> But I find it hard to get into
00:59:17 <abastro[m]> I am dumb I guess
00:59:28 <Maxdamantus> 327G /nix/store/
00:59:39 Maxdamantus doesn't use nix much though.
01:00:03 Maxdamantus should probably delete all his profiles from 2018 or so.
01:00:09 <abastro[m]> Wait wha
01:01:04 <geekosaur> you need to gc nix every so often to remove unused profiles and their associated program versions
01:01:36 <geekosaur> it's been a while and I forget details; I decided duplicating my system multiple times under /nix/store was ridiculous
01:01:45 <geekosaur> haven't really missed it
01:02:41 <abastro[m]> At least nix has gc right
01:03:15 <abastro[m]> Cabal does not it seems
01:04:15 monochrom wonders where emacs stands in the tier of heavy objects in the universe. :) https://www.gnu.org/fun/jokes/ed-msg.en.html
01:04:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
01:05:02 <abastro[m]> I have to nuke the cache but I am wary of the compile time it takea
01:05:11 <geekosaur> once upon a time it was fairly high. nvim beat it years ago, then along came node, then nix
01:05:26 <geekosaur> also monochrom wrote a cache pruner iirc
01:05:32 <geekosaur> for cabal
01:05:48 <monochrom> Yeah https://github.com/treblacy/cabalgc
01:06:10 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:06:39 <monochrom> Although, if you upgrade GHC version every half a year, maybe it's simplest to just delete .cabal/store/ghc-<old version>
01:06:41 <sm> see also stack-clean-old for stack and ghcup tui for ghcup-installed stuff
01:07:00 <sm> and as fallback, ncdu on ~/.{ghc,cabal,stack,ghcide,...} is good
01:07:44 <sm> so now in Rust land, would cargo manage all of this stuff ?
01:07:58 sm votes for ghcup to gc all the things
01:08:04 <monochrom> Assuming, for installing executables, you refuse cabal-install's blatantly stupid default of "--install-method=symlink".
01:09:50 <sclv> would be great for someone to step up and add this https://github.com/haskell/cabal/issues/3333
01:10:13 × cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
01:10:53 <abastro[m]> So I have to pick ones to keep with cabal gc :<
01:11:14 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:11:26 × Techcable quits (~Techcable@168.235.93.147) (Changing host)
01:11:26 Techcable joins (~Techcable@user/Techcable)
01:12:06 <geekosaur> see sclv's ticket, at present it's rather difficult to automate that
01:12:49 <abastro[m]> Wish I could automatically set up to specify projects to keep.
01:13:01 <abastro[m]> * to keep dependency of.
01:14:11 <Maxdamantus> 173485 store paths deleted, 242080.20 MiB freed
01:17:21 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:25:06 segfaultfizzbuzz joins (~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8)
01:30:27 khumba joins (~khumba@user/khumba)
01:31:03 <zzz> Maxdamantus: that's a lot
01:31:29 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
01:31:51 <abastro[m]> Wait, 242GB???
01:32:26 × hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
01:34:25 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 268 seconds)
01:38:46 <geekosaur> that was /nix/store, I think
01:39:02 <geekosaur> [22 00:59:28] <Maxdamantus> 327G /nix/store/
01:40:00 <monochrom> 6.02e23 /usr/bin/emacs :)
01:40:37 <geekosaur> avogadro's editor?
01:40:44 <monochrom> yeah heehee
01:41:48 <abastro[m]> Lmao
01:42:16 <monochrom> 125GeV /boot/higgs
01:42:17 × segfaultfizzbuzz quits (~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8) (Ping timeout: 240 seconds)
01:44:54 <zzz> one point to vim i guess
01:46:49 × mud quits (~mud@user/kadoban) (Quit: quit)
01:49:26 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
01:49:46 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:50:13 × khumba quits (~khumba@user/khumba) ()
01:54:44 <abastro[m]> Rate my sht code... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/1b07672699d44ca82dd3c634dd92e61b42fbfcb2)
01:58:43 Topsi joins (~Tobias@dyndsl-095-033-018-177.ewe-ip-backbone.de)
02:01:29 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
02:01:38 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
02:02:08 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
02:02:20 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
02:02:47 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 268 seconds)
02:02:48 <Axman6> abastro[m]: FYI, long messages like that don't work well for IRC - just use a paste website like...
02:02:50 <Axman6> @where paste
02:02:50 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
02:03:31 <abastro[m]> Well then I guess rather post it like, https://github.com/Abastro/AdventOfCode/blob/master/src/Y2021/Prob10.hs
02:05:01 vysn joins (~vysn@user/vysn)
02:05:47 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
02:06:12 <Axman6> any background on what problem you're solving? it looks pretty arbitrary
02:07:11 <abastro[m]> https://adventofcode.com/2021/day/10 - it is likely my code being messy.
02:10:07 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
02:10:42 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
02:15:53 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
02:28:55 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
02:29:19 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
02:29:19 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
02:29:19 wroathe joins (~wroathe@user/wroathe)
02:30:18 hughjfchen joins (~hughjfche@vmi556545.contaboserver.net)
02:30:26 × ptrcmd quits (~ptrcmd@user/ptrcmd) (Ping timeout: 250 seconds)
02:30:35 ptrcmd joins (~ptrcmd@user/ptrcmd)
02:33:24 ubert1 joins (~Thunderbi@p548c8d44.dip0.t-ipconnect.de)
02:34:55 × ubert quits (~Thunderbi@p200300ecdf1588ca0b7aa2fbaa2d0440.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
02:34:55 ubert1 is now known as ubert
02:37:25 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
02:37:44 jakalx parts (~jakalx@base.jakalx.net) ()
02:40:16 jakalx joins (~jakalx@base.jakalx.net)
02:40:35 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
02:44:56 × acidsys quits (~LSD@2a03:4000:55:d20::3) (Excess Flood)
02:45:27 acidsys joins (~LSD@2a03:4000:55:d20::3)
02:51:01 <DigitalKiwi> Axman6: matrix is the future!
02:51:59 mud joins (~mud@user/kadoban)
02:52:30 <geekosaur> I wouldn't actually complain about the long message since matrix helpfully auto-pastebinned it anyway
02:52:51 <geekosaur> it's matrix edits that are really annoying because they just spam the channel
02:54:11 × hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
02:56:09 aviladev[m] joins (~aviladevm@2001:470:69fc:105::1:cbc7)
03:03:48 × mvk quits (~mvk@2607:fea8:5cc3:7e00::7980) (Ping timeout: 240 seconds)
03:04:35 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
03:08:32 hughjfchen joins (~hughjfche@vmi556545.contaboserver.net)
03:09:13 <Axman6> DigitalKiwi: so was ICQ, and MSN, and Facebook Messenger, and Slack, and Discord, and ... and what still remains? IRC, forever and always
03:09:42 <Axman6> yeah I was mostly pointing it out because matrix users sometimes don't know that their messages get manipulated like that sometimes
03:10:23 xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
03:10:54 Logio_ joins (em@kapsi.fi)
03:10:55 <DigitalKiwi> never had icq
03:10:57 lll joins (~o@user/offon)
03:11:00 nonzen_ joins (~nonzen@user/nonzen)
03:11:11 sviermsung joins (owJr4HCxlX@user/s4msung)
03:11:15 burakcan- joins (~burakcank@has.arrived.and.is.ready-to.party)
03:11:16 kmein_ joins (~weechat@user/kmein)
03:11:18 thonkpod_ joins (~thonkpod@user/thonkpod)
03:11:21 lawt2 joins (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9)
03:11:29 × kmein quits (~weechat@user/kmein) (*.net *.split)
03:11:29 × Inoperable quits (~PLAYER_1@fancydata.science) (*.net *.split)
03:11:29 × mcglk quits (~mcglk@131.191.49.120) (*.net *.split)
03:11:29 × Logio quits (em@kapsi.fi) (*.net *.split)
03:11:29 × s4msung quits (z4rgS71Nb1@user/s4msung) (*.net *.split)
03:11:29 × burakcank quits (~burakcank@has.arrived.and.is.ready-to.party) (*.net *.split)
03:11:29 × Jon quits (jon@dow.land) (*.net *.split)
03:11:29 × lawt quits (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9) (*.net *.split)
03:11:29 × nonzen quits (~nonzen@user/nonzen) (*.net *.split)
03:11:29 × _\_ quits (~o@user/offon) (*.net *.split)
03:11:29 × thonkpod quits (~thonkpod@user/thonkpod) (*.net *.split)
03:11:29 × jakalx quits (~jakalx@base.jakalx.net) (*.net *.split)
03:11:44 lll is now known as _\_
03:11:49 Jon joins (jon@dow.land)
03:12:09 <corisco[m]> actually mirc is the future
03:12:14 <Axman6> I used to use Adium, so at some point I probably did because I ended up making an account for basically every protocol it supported
03:12:24 burakcan- is now known as burakcank
03:14:15 × boborygmy_ quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds)
03:15:20 <DigitalKiwi> pidgin/adium/trillian gang
03:15:32 <Axman6> \m/
03:16:06 <Axman6> adium was the shit back in high school
03:16:33 In0perable joins (~PLAYER_1@fancydata.science)
03:16:36 mcglk joins (~mcglk@131.191.49.120)
03:16:44 vglfr joins (~vglfr@88.155.11.162)
03:18:26 <Axman6> :t foldlM
03:18:27 <lambdabot> (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
03:19:19 <sm> yeah long inline pastes from matrix clients are fine for IRC, they show up as a nice paste link
03:20:23 <Axman6> it's fine, other than that the author may not know it's happened and IMo the experience is nicer if you ask a question and link to code ratheer than asking half a question and then people needing to click a link to finish reading it
03:21:45 × geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection)
03:22:03 <sm> good point, an inline paste by itself might not be clear. The best way is to paste it preceded by your descriptive comment. IRC users will see at least the start of the comment, plus the link
03:22:08 karim joins (~karim@102.43.202.169)
03:22:51 <Axman6> abastro[m]: finally got a chance to look at your code - looks fine to me, pretty clear how it works once you've read the problem description. the foldlM feels a bit magical and took me a sec to understand (I was going to suggest using foldr because of early termination, but realised I misunderstood what was happening)
03:25:32 × boxscape_ quits (~boxscape_@p4ff0b60b.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
03:25:32 <abastro[m]> Oh, I should avoid editing in matrix then, if it spams :<
03:25:49 <Axman6> yes, it spams for each edit :)
03:26:00 <abastro[m]> ya, I guess `foldlM` is not really intuitive
03:26:21 <abastro[m]> I wonder what would be more intuitive
03:26:27 × Topsi quits (~Tobias@dyndsl-095-033-018-177.ewe-ip-backbone.de) (Read error: Connection reset by peer)
03:28:28 × Unicorn_Princess quits (~Unicorn_P@46-54-248-191.static.kate-wing.si) (Remote host closed the connection)
03:28:56 <Axman6> I would probably have written things by having a function with type String -> Either Char [ChToken] to make the processing part clear, and then the other code is just mapping, filtering and reducing, it felt a bit tangled having that in the function too. not that that's necessarily a good design, just how I would have written it
03:29:47 <Axman6> also, me being the sort of person I am, I immediately though about if I could save memory by not using a list and instead storing the stack in as Integer, two bits at a time XD
03:30:36 <Axman6> > divMod (-7) 4
03:30:38 <lambdabot> (-2,1)
03:30:52 <Axman6> > quotRem (-7) 4
03:30:53 <lambdabot> (-1,-3)
03:30:57 × raym quits (~raym@user/raym) (Ping timeout: 240 seconds)
03:31:42 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
03:32:16 × lagooned quits (~lagooned@108-208-149-42.lightspeed.hstntx.sbcglobal.net) (Quit: WeeChat 3.4)
03:32:51 raym joins (~raym@user/raym)
03:32:58 <abastro[m]> I see, think your approach would be better
03:33:10 <abastro[m]> Btw is posting paste better than a link?
03:34:24 <zzz> @where paste
03:34:24 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
03:35:40 <sm> stop me if I'm being a bore... as a matrix user I like to paste inline (following descriptive comment, as you did). Because it's much more immediate and usable for other matrix users, and as already discussed shows up as a nice trustworthy minimalist paste link for IRC users.
03:36:33 Akiva joins (~Akiva@user/Akiva)
03:37:23 <sm> On the downside, the matrix pastebin won't highlight haskell code or provide the other features of a richer site like paste.tomsmeding.com. Personally though, a plain text resizable window filling no-messing raw paste is often what I want. On tomsmeding that's not the default
03:37:25 × Techcable quits (~Techcable@user/Techcable) (Ping timeout: 240 seconds)
03:39:11 × raym quits (~raym@user/raym) (Ping timeout: 256 seconds)
03:43:43 × ubert quits (~Thunderbi@p548c8d44.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
03:44:00 ubert joins (~Thunderbi@p200300ecdf158894255673a7c9121e6c.dip0.t-ipconnect.de)
03:45:31 <sm> (see https://paste.tomsmeding.com/sb9sRUY4, eg tomsmeding . Ideally content is the most visible thing, but often it's not. Here I accidentally pasted a single line with no breaks. Even if I fix that, the content is still the smallest part of the page content)
03:45:55 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
03:46:18 <sm> don't get me wrong, most other things about it are great
03:47:05 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
03:47:24 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
03:47:47 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
03:48:05 <zzz> i made my own minimalist pastebin which works nice on text based browsers even https://paste.jrvieira.com/1647920833364
03:48:50 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
03:49:05 terrorjack joins (~terrorjac@static.3.200.12.49.clients.your-server.de)
03:49:14 × Nahra quits (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection)
03:50:33 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
03:51:30 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
03:52:24 <zzz> i removed the highlighting though but it's easy enough to implement one
03:56:13 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
04:01:11 raym joins (~raym@user/raym)
04:07:56 vglfr joins (~vglfr@88.155.11.162)
04:08:32 × raym quits (~raym@user/raym) (Ping timeout: 240 seconds)
04:09:26 × kaph quits (~kaph@net-109-116-124-149.cust.vodafonedsl.it) (Read error: Connection reset by peer)
04:10:29 raym joins (~raym@user/raym)
04:10:35 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
04:12:01 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 245 seconds)
04:12:23 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
04:12:50 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:18:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
04:20:32 cyphase joins (~cyphase@user/cyphase)
04:20:37 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds)
04:29:06 k8yun joins (~k8yun@user/k8yun)
04:30:00 bahamas joins (~lucian@84.232.140.158)
04:30:56 mbuf joins (~Shakthi@136.185.72.170)
04:31:11 nicbk joins (~nicbk@user/nicbk)
04:32:27 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
04:33:26 kaph joins (~kaph@net-109-116-124-149.cust.vodafonedsl.it)
04:34:32 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 240 seconds)
04:36:16 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
04:36:54 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
04:38:03 zaquest joins (~notzaques@5.130.79.72)
04:39:21 Techcable joins (~Techcable@user/Techcable)
04:40:06 <abastro[m]> Hm, I guess I'd use paste.tomsmeding.com from now on
04:40:36 benin joins (~benin@183.82.26.94)
04:42:02 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
04:49:27 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
04:53:24 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 240 seconds)
04:54:37 Maxdamantus joins (~Maxdamant@user/maxdamantus)
04:58:38 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:08:17 × k8yun quits (~k8yun@user/k8yun) (Read error: Connection reset by peer)
05:09:16 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
05:25:32 × lechner quits (~lechner@debian/lechner) (Ping timeout: 240 seconds)
05:26:49 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
05:27:59 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds)
05:31:29 <Axman6> abastro[m]: I didn't really notice this before, but your use of sort xs !! n is kinda fun, since sort in Haskell is lazy you end up only producing half the sorted list.
05:33:00 <Axman6> I've had an idea mulling around in my head for a while to build a structure for finding the median of some data, with something that looks like data Median a = Median (Set a) a (Set a), where inserting maintains the invariant that the single a is always the median or one off it and the sets are no more than one element different in size
05:33:16 <abastro[m]> It is why I love haskell's laziness
05:33:32 <abastro[m]> Oh, Median datatype would be nice
05:34:25 <Axman6> I was also thinking about where the median element would live in a min-max heap (which is the combination of a min heap and a max heap into one structure so you have efficient access to the min and max). it feels like the median is probably just the last element in the array
05:35:17 <Axman6> what problem is sol10S trying to solve anyway? It doesn't seem to be anything on the challenge you linked
05:37:58 <abastro[m]> Oh right. Sadly, it displays after putting in the solution..
05:38:10 <Axman6> fair enough
05:38:53 sagax joins (~sagax_nb@user/sagax)
05:39:32 <abastro[m]> https://paste.tomsmeding.com/NMRHRV6t
05:41:04 <dsal> Oh, I remember that one.
05:42:21 <Axman6> heh, it's interesting how close the answer is to what I was proposing as an efficient way to store the stack in an integer!
05:42:34 <dsal> I did kind of weird stuff there. glg did this thing was like, 5 lines of code and quite fast.
05:43:37 × toulene quits (~toulene@user/toulene) (Ping timeout: 256 seconds)
05:43:38 <Axman6> I suggested above storing the stack as an integer which used two bits per element of the stack... if I'd suggested mod 5 and never used zero, then I would have had the answer immediately, by accident XD
05:43:53 <abastro[m]> 5 lines of code for both 2?
05:43:55 <abastro[m]> * both 2? Wow, how...
05:44:10 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
05:44:24 <dsal> Mine was pretty slow, but I wanted to use megaparsec and figure out how to get its error messages to drive me to a solution.
05:45:06 toulene joins (~toulene@user/toulene)
05:45:29 <abastro[m]> Oh, megaparsec
05:45:43 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
05:45:45 <abastro[m]> I guess AoC also presents a cue to learn those
05:46:57 <dsal> Mine was only about half a page, but messing around with megaparsec errors was some work.
05:47:15 × karim quits (~karim@102.43.202.169) (Ping timeout: 256 seconds)
05:48:08 <abastro[m]> Oh wait. so you mean, glg did the 5 lines & fast
05:48:15 <abastro[m]> I thought that was you
05:48:45 <dsal> Nah, my goal was to learn how to do megaparsec errors. He tends to boil problems down to their essence and express them as a single foldMap.
05:48:56 <dsal> (or in this case, foldM)
05:49:04 <abastro[m]> Oh, foldMap
05:49:31 <abastro[m]> Right, I should have summarized it into single thing using Monoids
05:49:56 <dsal> I do that as often as I can.
05:50:18 <abastro[m]> I need to do it more
05:50:34 <abastro[m]> Granted, it is a functionality only haskell offers as of now
05:50:35 <Axman6> I tried to make a monoid for validating UTF-8 text but never figured it out :'(
05:51:21 <abastro[m]> Oooh
05:51:28 <abastro[m]> UTF-8 including unicode dealings?
05:52:40 <abastro[m]> (..I forgot how unicode is handled, like graphemes codepoints etc)
05:52:58 <Axman6> at the very least validating that each codepoint was valid - I wouldn't check .... the things which end up being made from multiple code points
05:53:31 <abastro[m]> Yea, multiple code points. Maybe that is too much
05:53:35 <dsal> Unicode wasn't too bad before they started adding color photos into it.
05:54:04 <abastro[m]> Hahaha..wait color photos?
05:54:15 <abastro[m]> You mean emotes?
05:54:19 <dsal> 🚀
05:54:40 <Maxdamantus> That square just looks white to me.
05:55:01 × alMalsamo quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
05:55:06 <dsal> That's at least part of my point. It's super hard for everyone to be able to render all the characters.
05:55:13 <abastro[m]> So, emotes
05:55:17 <Maxdamantus> emojis*
05:55:17 alMalsamo joins (~alMalsamo@gateway/tor-sasl/almalsamo)
05:55:20 <dsal> Then you have things like people emojis with codepoints for defining skin color.
05:55:27 <abastro[m]> Ya, rendering these is hard
05:55:45 <dsal> Back in my day, we had ascii, and we liked it.
05:56:17 <dsal> (though I literally just wrote a parser that has to autodetect EBCDIC source)
05:56:42 <Maxdamantus> Well, it's either add them to Unicode, or else have different ways of encoding them for each messaging protocol and phone manufacturer.
05:56:45 <abastro[m]> Non-latin alphabet folks: Wh
05:56:46 <Axman6> Haskell's handling of unicode leaves a bit to be desired, it's pretty fun doing things like:
05:56:49 <Axman6> % let flags = "🇦🇺 "in print (flags, reverse flags) >> putStrLn flags >> putStrLn (reverse flags)
05:56:49 <yahb> Axman6: ("\127462\127482 "," \127482\127462"); 🇦🇺 ; 🇺🇦
05:56:52 <dsal> 🧓
05:57:05 <Axman6> hmmmm, well I just broke my terminal somewhat with that...
05:57:56 <dsal> I kind of like having things like flag and rocketship letters when other people are making it work.
05:58:08 <dsal> I'm insufficiently principled.
05:59:31 <Maxdamantus> $Reversing Unicode is a nonsense operation anyway.\u202E If you really want to reverse something, there are code points for that.
05:59:34 <Maxdamantus> er
05:59:43 <abastro[m]> Does `String` as `[Char]` mesh well with unicode?
05:59:46 <Maxdamantus> Damn it, wrong shell.
06:00:27 <Maxdamantus> Reversing Unicode is a nonsense operation anyway.‮ If you really want to reverse something, there are code points for that.
06:00:42 <Axman6> abastro[m]: it does surprisingly well up to the point of needing to deal with things at the multiple codepoint level, a Char is a single unicode codepoint
06:01:15 <abastro[m]> Hm.. characters with multiple codepoint level could suffer, then.
06:02:28 <Maxdamantus> imo it should just be a list of code units, as Unicode intended.
06:03:18 <Maxdamantus> list of code points gives people a false impression of Unicode correctness (similarly to how UTF-16 does), and Unicode never intended to pass around lists of code points.
06:04:08 <Maxdamantus> The official ICU library just provides abstractions that work on code units.
06:05:02 <Maxdamantus> Seems like people are trying to reinstate the UCS philosophy.
06:05:45 <abastro[m]> I see, so code unit is like 8 bits for UTF8
06:06:17 <abastro[m]> In that case, I imagine it would be harder to deal with individual characters, though.
06:06:20 <Maxdamantus> Yes. Preferably strings should be sequences of code units that are conventionally UTF-8.
06:06:21 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
06:06:34 <Maxdamantus> It wouldn't be any harder than working with code points.
06:07:08 <abastro[m]> I mean, we cannot easily pattern match on a character then.
06:07:28 <Maxdamantus> You can't do that with code points either.
06:07:40 <Maxdamantus> > reverse "héllo"
06:07:42 <lambdabot> "oll\769eh"
06:07:55 <Maxdamantus> > putStrLn $ reverse "héllo"
06:07:57 <lambdabot> <IO ()>
06:08:01 <Maxdamantus> % putStrLn $ reverse "héllo"
06:08:01 <yahb> Maxdamantus: olĺeh
06:08:30 <abastro[m]> I mean for common cases.
06:09:01 sloorush joins (~sloorush@136.233.9.99)
06:09:19 <Maxdamantus> So you want to have something that usually matches one character, but you're okay with it being incorrect?
06:09:21 <abastro[m]> Like with CJK characters, makes it easier to deal with it.
06:09:50 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
06:10:01 <abastro[m]> Idk, at least sometimes it is going to be incorrect
06:10:12 <abastro[m]> Perhaps better approach is revising pattern matching for strings
06:10:23 <Maxdamantus> How so? Korean is known for being able to compose multiple code points into a single glyph.
06:11:03 <Maxdamantus> "match a single character" only makes sense if you're doing something like a character limit.
06:11:30 <abastro[m]> Using regex
06:11:38 <Maxdamantus> If you're doing something like /foo.*bar/, that works just as well on code units as it does code points.
06:11:53 <abastro[m]> Oh, Korean letters are usually single code points
06:12:33 <abastro[m]> You can compose multiple alphabets to form a character, but the character is represented by specific code point.
06:12:45 <Maxdamantus> Usually, but there are separate code points for the individual jamo (the letters within the characters) that can be combined together.
06:13:05 <abastro[m]> Yep, but they are usually rendered separately
06:13:08 <Maxdamantus> Just like how you can write "é" as one or two code points.
06:13:12 <Maxdamantus> No, they're rendered the same way.
06:13:18 <abastro[m]> They do not gather and form a glyph.
06:13:23 <Maxdamantus> They do.
06:13:32 <Maxdamantus> > "é" == "é"
06:13:33 <lambdabot> False
06:13:57 <abastro[m]> Well, does ㄱㅏㅇ render as combined for you?
06:14:00 <Axman6> I mentioned a while ago min-max heaps in relation to your problem abastro[m] - I finally foudn the article I was looking for that explain them; if you want to learn about cool structures, this is a great place one: https://probablydance.com/2020/08/31/on-modern-hardware-the-min-max-heap-beats-a-binary-heap/
06:14:41 <abastro[m]> Wow, Axman6, great article! I'll take a look.
06:14:51 <Maxdamantus> abastro[m]: you need to use a combining character.
06:15:08 <Axman6> the fact that unicode has multiple ways to represent the same thing annoys me, the "é" == "é" thing annoys me
06:15:39 <Axman6> abastro[m]: are you already familiar with min/max heaps?
06:16:56 <abastro[m]> No, I am not familiar, so I would look at the article
06:17:18 <abastro[m]> Btw by combining characters, do you mean https://en.wikipedia.org/wiki/Combining_character
06:17:25 <abastro[m]> IIRC there is no combining character for Korean characters.
06:17:33 <Axman6> I would learn about those first (not that a min heap and a max heap are basically the same thing, and a min-max heap basically combines them)
06:18:10 <abastro[m]> Oh. I see, I thought the article was describing about the min-max heap
06:18:35 <abastro[m]> I do know about min heap and max heap, but min-max heap should be something different right
06:18:35 <Axman6> that article decscribes min-max heaps, but you should know what a min-heap is first
06:18:47 <abastro[m]> Oh, I def knows min-heap and max-heap
06:18:50 <Axman6> ok, then you should be good to go
06:18:56 <abastro[m]> Yea, thanks!
06:19:24 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:20:02 alp joins (~alp@user/alp)
06:23:04 <Maxdamantus> abastro[m]: oh, actually, the code points you used were the non-composing ones.
06:23:43 <abastro[m]> Yep, IIRC there is no composing characters for Korean.
06:23:59 <Maxdamantus> Yes, there are different code points that compose.
06:24:35 <Maxdamantus> > length "가ᄋ"
06:24:37 <lambdabot> 3
06:24:50 <Maxdamantus> That doesn't render correctly for me (urxvt)
06:25:03 <Maxdamantus> but it should in a proper Unicode renderer afaict
06:25:23 <abastro[m]> Well, only 2 combined, but it did combine. Hmm
06:25:27 <Maxdamantus> er, oops.
06:25:33 <Maxdamantus> that was three lead jamo.
06:25:53 Maxdamantus figures it out again from the table.
06:26:37 <Maxdamantus> > length "강"
06:26:38 <lambdabot> 3
06:26:45 <Maxdamantus> Maybe that.
06:27:02 × doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 240 seconds)
06:27:46 <Maxdamantus> Looks reasonable on Android.
06:28:22 × phma quits (phma@2001:5b0:211f:ad58:d57e:9b56:2014:519f) (Read error: Connection reset by peer)
06:29:20 phma joins (~phma@host-67-44-208-58.hnremote.net)
06:29:30 × califax quits (~califax@user/califx) (Remote host closed the connection)
06:29:53 califax joins (~califax@user/califx)
06:30:03 <abastro[m]> I see, I stand corrected. I did not know about it as it is nearly never used.
06:30:39 <Maxdamantus> How do you know?
06:31:06 <Maxdamantus> If you're using a correct Unicode renderer, you shouldn't be able to tell the difference, unless you copy the text and look at it in a hex editor or something.
06:31:19 <Maxdamantus> or use the `length` function in Haskell.
06:32:24 × Techcable quits (~Techcable@user/Techcable) (Remote host closed the connection)
06:34:37 Techcable joins (~Techcable@user/Techcable)
06:34:38 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
06:34:47 <abastro[m]> > length "강"
06:34:49 <lambdabot> 3
06:35:03 <abastro[m]> Oh
06:35:12 <abastro[m]> Yea, I confused something I guess.
06:35:52 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
06:36:43 <abastro[m]> Namely, I thought Hangul Jamo region characters are not supposed to be combined
06:37:18 <Maxdamantus> btw, regarding regex, the author of the main Rust regex library also created `bstr`, particularly for use as the basis of the regex library.
06:37:35 <Maxdamantus> where `bstr` is basically the same as `str`, but without a constraint on UTF-8 well-formedness.
06:38:00 <abastro[m]> Though, I can guarantee these encoding is rarely used - because 'combine format' is developed for ancient characters (those which are no longer used)
06:38:55 <Maxdamantus> Well, if you convert to NFC or NFKC for whatever reason, you'll have those separate code points.
06:38:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
06:39:03 <Maxdamantus> er, NFD or NFKD*
06:40:15 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
06:40:31 <Maxdamantus> but sure, in general it's usually more sensible to generate precomposed code points where possible. that includes "é" just as much as "강".
06:40:46 <abastro[m]> Oh, yep I was going to ask that
06:40:48 alMalsamo is now known as lumberjack123
06:40:59 <abastro[m]> * ask that: Is precomposed codepoints normally used
06:41:21 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
06:41:33 <Maxdamantus> https://docs.rs/bstr/0.2.13/bstr/#when-should-i-use-byte-strings
06:44:01 <abastro[m]> > UTF-8 by convention is a better trade off in some circumstances than guaranteed UTF-8
06:44:01 <abastro[m]> What does this mean?
06:44:02 <lambdabot> <hint>:1:43: error: parse error on input ‘in’
06:44:21 <Maxdamantus> In Rust, the standard string type `str` is guaranteed to be valid UTF-8.
06:44:25 <c_wraith> abastro[m]: it means that sometimes it's better to not actually parse the data
06:45:12 <abastro[m]> Oh, not parsing the data
06:45:14 <Maxdamantus> So when constructing a `str` from `[u8]`, the constructor will raise an error if the data is not well-formed UTF-8.
06:45:17 <c_wraith> which is certainly true. Lots of applications where it's better to just store the bytes you receive
06:45:52 <Maxdamantus> imo the main problem with doing that is that you end up with lots of cases where you legitimately want to deal with "strings" that potentially are not UTF-8, and then you have to do something really weird.
06:46:08 <abastro[m]> So it does validation? I guess extra validation pass would indeed cost some more
06:46:18 <Maxdamantus> eg in Rust, you've got `str`, `OsStr`, `[u8]`. I think there's something else too, but I haven't used Rust much.
06:46:58 <abastro[m]> str is internally just [u8] validated as UTF8, right?
06:47:05 <Maxdamantus> Yes.
06:47:38 <Maxdamantus> It doesn't maintain any extra information, so eg, the length of a `str` is just the number of UTF-8 code units.
06:48:07 <Maxdamantus> It just provides some nice UTF-8 abstractions on top, which is how Unicode handling should normally work.
06:48:24 <Maxdamantus> (though preferably without the validation constraint, which leads to messy APIs)
06:49:16 <abastro[m]> Hmm, unicode business is indeed complex
06:50:09 × sloorush quits (~sloorush@136.233.9.99) (Ping timeout: 256 seconds)
06:50:13 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
06:50:32 <Maxdamantus> The main problem is that people think they need to do something special with the complexity in many more cases than they actually do.
06:50:47 × acidsys quits (~LSD@2a03:4000:55:d20::3) (Excess Flood)
06:51:18 acidsys joins (~LSD@2a03:4000:55:d20::3)
06:51:23 <abastro[m]> Hmm
06:52:40 <Maxdamantus> Unicode was designed such that you don't normally have to deal with that complexity. A string is just a sequence of code units. Most applications are only concerned with passing strings around or matching equal strings, or occasionally concatenating strings, all of which can be done on code units, and none of which necessitate a well-formedness check.
06:54:04 <Maxdamantus> If you're doing something like rendering text, then you need to deal with the complexity. Also, in some cases when you're doing some sort of search, you might need to deal with some normalised form.
06:54:09 img joins (~img@user/img)
06:55:20 <Maxdamantus> Usually when people claim that Unicode is hard, they use examples of nonsensical operations like reversing text, which noone ever actually wants to do.
06:55:45 <hololeap> I have a 'package *' stanza and 'ghc-options:' in it, inside of cabal.project.local. it doesn't seem like these options are being used. what would be a good way to test this to be sure?
06:56:47 × Batzy quits (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
06:57:30 <Maxdamantus> % putStrLn $ reverse "악"
06:57:30 <yahb> Maxdamantus: ᆨᅡᄋ
06:57:56 Batzy joins (~quassel@user/batzy)
07:00:39 <hololeap> am I doing this right? https://dpaste.com/GFKKMJX6P
07:01:53 <abastro[m]> As you have -Wall there, you can try sth like `ff:: [Int] -> [Int]; ff [] = []` and see if it reports incomplete pattern matching.
07:02:33 cfricke joins (~cfricke@user/cfricke)
07:04:35 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
07:07:08 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
07:09:35 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
07:09:36 × nicbk quits (~nicbk@user/nicbk) (Ping timeout: 240 seconds)
07:11:06 × benin quits (~benin@183.82.26.94) (Quit: The Lounge - https://thelounge.chat)
07:11:36 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:11:42 nicbk joins (~nicbk@user/nicbk)
07:13:00 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
07:13:26 acidjnk joins (~acidjnk@pd9e0b763.dip0.t-ipconnect.de)
07:22:35 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
07:25:02 _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
07:25:08 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:27:53 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 256 seconds)
07:29:22 <sclv> hololeap: you can use the verbose flag
07:30:34 <sclv> also i think you’re right. currently you need to enumerate options for each local package individually. the * confusingly enough, i think, only refers to nonlocal packages.
07:32:32 <sclv> Maxdamantus: what about slicing strings? thats tricky, and also common.
07:33:09 <sclv> or dealing with right to left script, especially admixed with regular script
07:36:26 <abastro[m]> Right to left, hm..
07:36:37 <abastro[m]> How is it dealt in unicode?
07:38:00 <Maxdamantus> sclv: slicing works on code units as well, you just need to know where to slice from.
07:38:21 <Maxdamantus> sclv: usually you'd want to slice after searching for a substring or something, which is fine.
07:38:34 <sclv> well yes, but thats the slightly tricky bit
07:38:39 mmhat joins (~mmh@55d48f06.access.ecotel.net)
07:38:57 <Maxdamantus> What? Searching for a substring? All of the UTFs are designed such that substring searches work.
07:40:07 mikoto-chan joins (~mikoto-ch@213.177.151.239)
07:40:33 <Maxdamantus> If you remove a well-formed substring of a well-formed UTF code unit sequence, you will still have a well-formed code unit sequence.
07:40:36 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
07:40:58 <Maxdamantus> There's no overlap, eg, https://news.ycombinator.com/item?id=30266023
07:41:00 <sclv> right. but you have to work code unit wise not bytewise.
07:41:06 <sclv> that’s all.
07:41:22 <Maxdamantus> code units are bytes (in UTF-8).
07:41:45 <Maxdamantus> in UTF-16, code units are 16-bit values.
07:41:55 <Maxdamantus> in UTF-8, code units are 8-bit values (aka bytes).
07:42:01 <Maxdamantus> in UTF-32, code units are 32-bit values.
07:42:22 <sclv> i should have said code point wise, not code unit wise
07:42:49 <Maxdamantus> Why do you think you have to work code point-wise?
07:43:07 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:43:19 <Maxdamantus> If you search for a substring and get a position in code units, you can use that code unit position to slice the string.
07:43:27 <sclv> because you shouldn’t split a codepoint down the middle. you want to work with logical characters
07:43:33 <Maxdamantus> It works whether you're using code points or code units.
07:43:42 lortabac joins (~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5)
07:43:50 <Maxdamantus> So don't search for partial code points.
07:44:04 <sclv> your substring search should give back code points not units. and you shouldn’t be able to split a code point in two
07:44:14 <sclv> if your types permit this, thats a bad api
07:44:18 <Maxdamantus> It should give back an offset that can be used to slice the string.
07:44:33 <sclv> so you’re saying to not enforce the abstration?
07:44:55 <sclv> “let users shoot themselves in the foot?”
07:45:00 <Maxdamantus> You mean enforce well-formedness? Correct. I'm saying not to enforce well-formedness. That's how Unicode was designed to work.
07:45:15 <Maxdamantus> Unicode doesn't expect strings to always be well-formed, because it was designed as an encoding on top of code units.
07:45:19 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
07:45:21 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
07:45:22 <sclv> thats silly
07:45:30 <sclv> haskellers like well formed things
07:45:43 <Maxdamantus> No, what's silly is making an API that claims that filenames are well-formed UTF-8 strings.
07:45:47 <sclv> if a user can write an ill formed thing they will
07:45:58 <sclv> i agree on that but not because unicode
07:46:16 <sclv> filenames are not even necessarily unicode encoded
07:46:20 <Maxdamantus> Exactly.
07:46:25 <Maxdamantus> Neither are text files.
07:46:29 <sclv> they’re bytes with locale dependent interpretation
07:46:37 <sclv> unicode is irrelevant
07:46:41 <Maxdamantus> but grep works on Unicode text files anyway. It doesn't care whether it's well-formed UTF-8.
07:46:50 <Maxdamantus> this is by design of UTF-8.
07:46:51 <sclv> there is no such thing as a “text file”
07:47:00 <Maxdamantus> Exactly.
07:47:03 <sclv> there is a file as a sequence of bytes
07:47:21 <sclv> unicode is one interpretation of the file
07:47:22 <Maxdamantus> Indeed. If the data exists outside of the application, it's bytes.
07:47:45 <Maxdamantus> And Unicode was designed to allow people to make it so that those bytes represent human text.
07:47:51 <sclv> but in the app, we like to enforce well formed representation and keep the problems at the barrier
07:48:08 <sclv> if the types let people write ill formed things, they will
07:48:09 <Maxdamantus> But that doesn't match reality, which is bytes.
07:48:18 machinedgod joins (~machinedg@24.105.81.50)
07:48:29 <sclv> well why have floats or integers then? its all bytes!!
07:48:35 <sclv> we use haskell, not c
07:48:38 <Maxdamantus> If the types claim something counter to reality, your program will crash.
07:48:45 <sclv> Not in haskell!
07:48:57 <sclv> Because the types here don’t lie.
07:49:02 <sclv> Thats the whole point
07:49:12 <Maxdamantus> Yes, so Haskell will crash on non-UTF-8 data.
07:49:13 <abastro[m]> Hm, lengthy discussion
07:49:13 <Maxdamantus> That's bad.
07:49:36 <sclv> no, text in haskell is guaranteed well formed
07:49:48 <sclv> thats what the text library gives you
07:49:51 <abastro[m]> Non-UTF-8 data is not supposed to be String, right?
07:49:57 <Maxdamantus> The text library doesn't generate data.
07:50:01 <Maxdamantus> Data comes from outside the application.
07:50:04 <sclv> a string is a sequence of codepoints
07:50:10 <Maxdamantus> Not according to Unicode.
07:50:16 <Maxdamantus> According to Unicode, a string is a sequence of code units.
07:50:29 <Maxdamantus> And they are not expected to always be well-formed.
07:50:34 <Maxdamantus> Unicode explicitly says this.
07:50:56 <sclv> In haskell the literal string type is a list of characters and characters are code units
07:51:17 <sclv> I don’t care if unicode defines “string” differently
07:51:40 <Maxdamantus> Haskell has an even weirder handling of Unicode, since it has code points but it doesn't enforce use of scalar values.
07:51:55 <sclv> when parsing in bytes you get back either the answer or an error you can handle
07:51:57 <sclv> Sigh
07:52:18 <Maxdamantus> % putStrLn [toEnum 0xd800]
07:52:18 <yahb> Maxdamantus: *** Exception: <stdout>: hPutChar: invalid argument (invalid character)
07:52:54 <Maxdamantus> What sort of string is "\55296"?
07:53:19 <sclv> ok but can you do that with Text which is the proper abstraction?
07:53:41 <abastro[m]> So String is indeed wrong abstraction, right
07:53:42 <Maxdamantus> What OS API gives back `Text`?
07:54:14 <sclv> they all give back bytes. but we enforce abstraction at the boundaries when possible
07:54:20 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
07:54:28 <sclv> thats what you are dismissing
07:54:38 <sclv> is enforcing abstraction at the boundaries
07:54:41 <Maxdamantus> If you do that, your program will crash unnecessarily.
07:54:55 <sclv> no, if you do that it won’t crash
07:54:55 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
07:55:01 <sclv> thats the point
07:55:03 <Maxdamantus> It would suck having a `grep` that crashes as soon as it sees some ill-formed UTF-8.
07:55:23 <sclv> nobody is arguing it should
07:55:33 <sclv> you’re arguing against a straw man
07:56:00 <sclv> but sometimes you want actual well formed text and to enforce that. how hard is that to grok!?
07:56:02 <Maxdamantus> You're arguing that text inputs should be enforced as well-formed Unicode.
07:56:09 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
07:56:11 <sclv> when it makes sense, yes
07:56:12 <Maxdamantus> "sometimes", sure.
07:56:28 <sclv> grep isn’t something thats about text. it is
07:56:32 <Maxdamantus> So you can have an assertion for that, or even come up with a wrapper type.
07:56:34 <sclv> about bytes
07:56:49 <sclv> we have that type. it is called text!!
07:57:03 <sclv> We have the other type too. it is called bytestring!
07:57:14 <Maxdamantus> Do you intentionally grep binary files?
07:57:22 <sclv> we can pick the one we want. it rules!
07:57:29 <sclv> (sometimes, yes)
07:57:33 <Maxdamantus> I mean .. grep does have a "binary" mode (as opposed to the default "text" mode).
07:57:48 <Maxdamantus> but usually you expect to use grep in text mode, where it prints out the lines that are matched.
07:57:53 <Maxdamantus> it's very much text-based.
07:58:01 fef joins (~thedawn@user/thedawn)
07:58:09 <sclv> i am aware
07:58:12 × _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
07:58:22 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
07:59:22 <abastro[m]> I guess one point of debate is, if a string of nonstandard encoding should be counted as string or not.
07:59:28 <Franciman> Maxdamantus: there is bytestring for dealing with possibly invalid utf8
07:59:32 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds)
07:59:37 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
07:59:48 <Franciman> if you use lazy bytestrings, you can have lazy decoding composed
07:59:51 <Maxdamantus> Franciman: sure, but noone wants to pass `ByteString`s around because nothing accepts them.
08:00:04 <Maxdamantus> Franciman: printing bytestrings is annoying.
08:00:05 <Franciman> lazy decoding!
08:00:09 <Franciman> to a text
08:00:11 <Franciman> look
08:00:17 <Franciman> :t decodeUtf8
08:00:18 <lambdabot> error: Variable not in scope: decodeUtf8
08:00:19 <Franciman> ofc
08:00:43 <Franciman> https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Encoding.html#v:decodeUtf8-39-
08:00:46 <Franciman> here you can catch the error
08:00:46 <Maxdamantus> That gives you back a `String` iirc, which is inappropriate.
08:00:53 <Franciman> it gives back a text!
08:00:54 <Maxdamantus> or a `Text`, I guess.
08:01:00 <Maxdamantus> again, inappropriate.
08:01:05 <Franciman> what do you need?
08:01:07 vglfr joins (~vglfr@88.155.11.162)
08:01:13 <Maxdamantus> Some text to print to stdout.
08:01:21 <Maxdamantus> putStrLn myText
08:01:36 <Franciman> i don't understand why the previous types are innapropriate, then
08:01:40 <Maxdamantus> Why do I care if it's well-formed? If a user inputs ill-formed data, that's their problem. GIGO.
08:02:13 <Franciman> then just use text, and when catching the exception, print "GIGO, input is ill formed"
08:02:27 <Maxdamantus> But that's not the intended behaviour.
08:02:38 <Franciman> so you care if it's ill formed?
08:02:39 <Maxdamantus> If a user enters a string, I want to print back their string.
08:02:48 <Franciman> then you want to print out bytes
08:02:49 <Maxdamantus> If a user enters a garbage string, I want to print back their garbage string.
08:03:00 <Franciman> and let the console handle the encoding for you
08:03:02 <Maxdamantus> No, I don't care whether it's well-formed.
08:03:20 <Maxdamantus> Most programs shouldn't care whether their inputs are well-formed, since all they're doing is passing them to something else.
08:03:27 <Maxdamantus> and again, GIGO.
08:04:06 <Maxdamantus> read some text from a file, write the text to another file. There's no need to add a corner case for ill-formed data.
08:04:40 <abastro[m]> Uhm, if you just read a text from a file into another, then you could use ByteString to do the task
08:04:41 <Franciman> i would use ByteString and print it with https://hackage.haskell.org/package/bytestring-0.11.3.0/docs/Data-ByteString.html#v:putStr
08:05:33 <Maxdamantus> Franciman: the point is there is no need for a separate `ByteString` type.
08:05:51 <Maxdamantus> The standard `String` type should be able to cater to both use cases, by itself being a byte string.
08:05:57 <Franciman> String is a list
08:06:07 <Franciman> it's a synonym with [Char]
08:06:14 <Maxdamantus> I'm aware.
08:06:33 <Franciman> and Char is a codepoint, a 32bit integer
08:06:43 <Franciman> it can't deal with utf8
08:06:45 <Franciman> or 16
08:06:47 <Franciman> or whatever
08:06:56 <sclv> the type you want would be [byte] not list of char
08:07:00 <sclv> we have that too
08:07:05 <Maxdamantus> Actually, it's not a particular number of bits. It's a value in the range [0..0x10ffff]
08:07:17 <sclv> but we have bytestring because it is more efficient
08:07:44 <Franciman> also i think having a type which guarantees well formed text is important in many cases
08:08:28 <Franciman> tautologically, when you have to ensure that the input is well formed :P
08:08:35 <Franciman> Text is a proof that input is well formed
08:08:46 <Maxdamantus> It might be useful in a small number of cases, but in general it only adds unnecessary corner cases where your program is just going to crash instead of passing the user's data through.
08:09:00 <Franciman> if you don't need it, you use a stream of bytes. After decoding the stream of bytes, if successful you have proof of correctness
08:09:06 <Franciman> and i like that it's retained in the type system
08:09:25 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
08:09:27 <Maxdamantus> It should be a conscious decision to reject ill-formed Unicode. It shouldn't be the default.
08:09:54 <Maxdamantus> There are very few cases where it's actually useful.
08:09:59 alp joins (~alp@user/alp)
08:10:09 <Maxdamantus> And there are lots of cases where users are going to be glad that your program doesn't break on ill-formed input.
08:10:10 <Franciman> Maxdamantus: if you have to deal with both ill formed and well formed unicode, then character accessing rutines get more difficult
08:10:12 <Maxdamantus> eg, grep.
08:10:21 <Franciman> you have to always deal with two cases to access the n-th character
08:10:27 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
08:10:32 <Franciman> what's the n-th code point of an ill formed input sequence?
08:10:52 <Maxdamantus> Franciman: where does `n` come from?
08:11:25 <Maxdamantus> Is it a constant value you've hardcoded into your program? What does it mean?
08:11:43 <abastro[m]> Hm, I guess many uses of String is going to be ill-formed - since one might just need to pass "string"s around in quite a many cases.
08:11:44 <Maxdamantus> This sounds like another one of these nonsense operations, like reversing a string.
08:11:46 <Franciman> https://hackage.haskell.org/package/text-2.0/docs/Data-Text.html#v:take
08:11:50 <Franciman> for exaple this function
08:11:58 <Maxdamantus> Franciman: my question stands.
08:12:31 <Maxdamantus> Franciman: there's also a `reverse` function. Doesn't mean it's useful.
08:12:44 <Maxdamantus> Franciman: `take` makes sense if you've measured a substring.
08:13:06 <Franciman> Maxdamantus: so you seem to imply that there is no need to have static guarantees that the input string is well formed
08:13:08 <Franciman> ever
08:13:18 <Maxdamantus> Franciman: in which case `n` is just the length of some other string. Whether it was measured in bytes or code units or glyphs should be irrelevant, just as long as it's consistent.
08:13:45 <Franciman> and it would be nice if the compiler could check that it's consistent
08:13:46 <Maxdamantus> Franciman: I wouldn't say "not ever"
08:13:51 <Maxdamantus> 21:08:46 < Maxdamantus> It might be useful in a small number of cases, but in general it only adds unnecessary corner cases where your program is just going to crash instead of passing the user's data through.
08:14:00 <Franciman> Maxdamantus: if there is at least one case, i don't see why we can't have a library for dealing with it
08:14:17 <Maxdamantus> Franciman: if you want to make it consistent, don't provide `ByteString` and `Text`
08:14:19 <Franciman> so i don't understand your whole proposal of "it's useless to have distinct types"
08:14:24 <Franciman> i dont' see why!
08:14:29 <Franciman> they serve different purposes
08:14:35 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Quit: mikoto-chan)
08:14:36 × xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds)
08:14:55 <Maxdamantus> Franciman: because it's unnecessarily introducing an additional string length, one based on a concept that is useless in all other cases.
08:15:05 <Maxdamantus> https://hsivonen.fi/string-length/
08:15:38 <Franciman> they are distinct types
08:15:41 <Franciman> with distinct requirements
08:15:51 <Franciman> and serve different purposes
08:15:56 <Franciman> you use which one suits you best in each case
08:16:30 <Franciman> as you said: `n` is just the length of some other string, whether misured in bytes, or code units or glyphs should be irrelevant, just as long as it's consistent
08:16:34 <Franciman> the types give you the consistency
08:16:40 <Franciman> if you use the bytestring interface it's bytes
08:16:48 <Franciman> if you use the text interface it's codepoints IIUC
08:16:49 <Maxdamantus> Right, so when is it *useful* for that `n` to be based on code points?
08:17:05 <Maxdamantus> Yes, it's only useful for using `Text`.
08:17:21 <Maxdamantus> So a code point length is used by `Text` because it's useful for `Text`.
08:17:26 <Maxdamantus> Recursive logic.
08:17:37 <Maxdamantus> code point lengths don't exist in the outside world.
08:17:40 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:17:43 <Franciman> i used it for my lexer
08:17:59 <Franciman> and it was easier to use rather than bytestring
08:18:09 <Franciman> and it was acceptable to reject ill formed utf8
08:18:16 <Franciman> so it was much easier to work with Text than raw bytes
08:18:32 <Franciman> and Text gives me the static guarantees to work that way, with an easier interface
08:18:44 <Franciman> which i know is statically guaranteed to talk about codepoints, rather than bytes
08:20:41 chele joins (~chele@user/chele)
08:21:24 <Maxdamantus> So what `Text` operations were you able to use that made it easier, and why could they not be implemented on byte strings?
08:21:36 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 245 seconds)
08:22:06 <Maxdamantus> If you want to reject ill-formed UTF-8, that's fine. There can be an `isWellFormed` function that checks that, and you can throw an error if someone gives you text that doesn't pass that check.
08:22:27 <Franciman> bytecode only has single byte operations
08:22:36 <Franciman> so you have to manually check where each codepoint starts
08:23:03 <Maxdamantus> What does your lexer actually do? Is it not based on substring searching? That works on byte strings.
08:23:36 <Maxdamantus> Not sure about Haskell `ByteString`, I'd have to look it up.
08:24:14 <Maxdamantus> Right, there's `breakSubstring`
08:24:31 <Maxdamantus> so you could presumably use something like `breakSubstring " "` if you want to separate by a space.
08:24:34 jgeerds joins (~jgeerds@55d4548e.access.ecotel.net)
08:24:48 <Franciman> yes
08:25:19 <Maxdamantus> And there should preferably also be a way of checking if the string starts with a given string, since that's also very useful in a lexer.
08:25:19 <abastro[m]> What is codepoint btw, really?
08:25:32 <Franciman> it's a number representing something
08:25:55 <Franciman> i don't remember if it represent a glyph or there is an intermediate step
08:26:10 <Maxdamantus> abastro[m]: technically, it's a number between 0x0 and 0x10FFFF (inclusive), normally denoted as `U+0000` to `U+10FFFF`
08:26:23 <Franciman> Maxdamantus: so are you trying to argue that Text is useless and everybody should use ByteString?
08:26:24 <abastro[m]> Hm I don't think it represents glyph
08:27:04 <Maxdamantus> abastro[m]: though there are code points that are not allowed to be encoded in Unicode, particularly U+D800 to U+DFFF (inclusive). Excluding those invalid code points gives you the set of "Unicode scalar values".
08:28:03 <Maxdamantus> abastro[m]: Unicode defines a meaning for lots of the Unicode scalar values, and it defines three encodings, UTF-8, UTF-16 and UTF-32 that are able to encode sequences of Unicode scalar values to sequences of 8-bit, 16-bit or 32-bit code units respectively.
08:28:13 vorpuni joins (~pvorp@2001:861:3881:c690:b51e:da9f:aa64:a038)
08:28:33 <abastro[m]> So it is just a scalar values, which does not represent anythint
08:29:02 <Maxdamantus> abastro[m]: correct. They don't necessarily represent a glyph. eg, I can write a glyph like "á" as [U+61 U+301], using those two code points.
08:29:06 <abastro[m]> Just some unit of representing a symbol, which is then combined to form glyphs, graphemes and suxh
08:29:35 <Franciman> is U+61 alone a glyph?
08:29:47 <abastro[m]> I guess that is the crux of argument against using codepoint array/list
08:29:47 <Maxdamantus> Yes, usually.
08:30:05 <Franciman> yes one would need also a normalized chunk of text
08:30:07 <Maxdamantus> U+61 is 'a'
08:30:12 <abastro[m]> Oh wow, glyph business is complicated
08:30:19 <Franciman> oh i mean u+301 sorry xD
08:30:52 <Maxdamantus> then no, U+301 is not really a glyph on its own. It's a "combining character" which can be added to other glyphs.
08:31:26 <Franciman> btw working on codepoints is still nice when you want to know which category they belong with
08:31:36 <Franciman> that's why i used text rather than bytestring
08:31:39 <[exa]> unicode defines characters (i.e., tiny pieces with semantic meaning), not glyphs (unless the character explicitly refers to some kind of a glyph)
08:31:49 <Maxdamantus> There's no reason why a decent byte string library couldn't offer that.
08:32:06 <Franciman> Maxdamantus: because haskell's bytestring deals with bytes
08:32:35 <Maxdamantus> It could offer a function `splitFirstCodePoint :: ByteString -> (Maybe Char, ByteString)`
08:32:40 <Franciman> it's a separation of concerns
08:32:43 <abastro[m]> How do you get category from a codepoint?
08:32:54 <Franciman> there are huge tables lol
08:33:01 <[exa]> Maxdamantus: you may eventually notice that the current selection of string libraries already packs a bit of survivor bias :]
08:33:06 <Maxdamantus> or `splitFirstCodePoint :: ByteString -> (Either Char Word8, ByteString)`
08:33:19 <[exa]> abastro[m]: you look it up a table encoded in libicu or something
08:33:35 <abastro[m]> Oh, so codepoint does mean something then
08:33:48 <abastro[m]> (Albeit only occasionally)
08:34:13 <abastro[m]> Anyway, I wonder if it is good practice to use `Text` for a file name
08:34:19 <Franciman> btw i agree that unicode is very complicated, and most of the time working on single codepoints isn't enough
08:34:36 <Franciman> but albeit it's user friendly lol
08:34:50 <Franciman> because it provides a simplified model
08:34:57 <Maxdamantus> abastro[m]: my overall point has been that people shouldn't be pushed into doing that.
08:35:20 <Franciman> abastro[m]: depends on the platform
08:35:25 <Franciman> iiuc on linux no
08:35:33 <Franciman> because linux paths can contain invalid utf8
08:35:50 <Maxdamantus> Haskell has `type FilePath = String`, which is just as problematic as `Text`
08:35:56 <Franciman> yes
08:36:00 <Franciman> true
08:36:28 <tomsmeding> sm: so basically you want soft-wrapping of the paste? That's been on my todo list for a while :)
08:36:36 doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
08:36:40 <abastro[m]> I guess `type FilePath = String` is one huge problem
08:36:45 <abastro[m]> Separate FilePath type would be great
08:36:59 <abastro[m]> Tho it would be breaking change :<
08:37:04 <Maxdamantus> actually, arguably I guess someone could come up with an encoding for ill-formed UTF-8 into `String` (Python 3 did this .. a few months after release when they realised it was a problem).
08:37:22 <Maxdamantus> but that thing that Python does is a hack.
08:37:29 <Maxdamantus> Python 3*
08:37:53 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
08:38:16 <Maxdamantus> https://peps.python.org/pep-0383/
08:39:11 <Maxdamantus> So since Python 3 strings can also represent invalid code points (in the range 0xD800 to 0xDFFF), it uses that range to encode ill-formed UTF-8.
08:39:13 <Hecate> abastro[m]: maerwald[m]: is on it already
08:39:31 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 256 seconds)
08:39:38 <abastro[m]> Oh, changing FilePath?
08:39:41 <Maxdamantus> abastro[m]: my point is that there shouldn't be a separate type.
08:39:47 <abastro[m]> It would be great! ..but at what cost
08:40:01 <Hecate> abastro[m]: the price to pay for shitty design
08:40:10 <Maxdamantus> There should be one type that is usable for the vast majority of strings, and that type is basically a wrapper around byte strings.
08:40:12 <abastro[m]> Hahaha
08:40:29 <abastro[m]> Btw, It would be great to have FilePath /= ByteString or Text, indeed
08:40:40 <Maxdamantus> Then when people design APIs, they know which string to use, and don't have to pick between `String`, `ByteString`, `Text`, `FilePath`, whatever.
08:40:43 × dextaa_ quits (~dextaa@user/dextaa) (Remote host closed the connection)
08:40:47 <abastro[m]> More utilities to have for FilePath.. but yea it would involve OS business
08:40:55 <dibblego> just use lens and defer the decision, since there is no winner anyway
08:40:56 vglfr joins (~vglfr@88.155.11.162)
08:45:23 <abastro[m]> One of criticism against haskell was that it has too many types for string, but I think rust took that now.
08:46:03 <Maxdamantus> Yes, Rust also has a bunch of hacks to work around this issue.
08:46:11 <Maxdamantus> `str`, `OsStr`, `[u8]`
08:46:28 <abastro[m]> There would surely be a reason for that, right
08:46:43 <Maxdamantus> and ime, libraries often end up providing filesystem functions for both `&str` and `&OsStr`
08:46:54 <abastro[m]> At least their `str` is not linked list of code points
08:46:57 <Maxdamantus> Yes, because `str` is guaranteed well-formed.
08:47:08 <Maxdamantus> If they didn't have that unnecessary restriction, there would only be one string type.
08:47:12 mikoto-chan joins (~mikoto-ch@84.199.144.235)
08:47:19 <Maxdamantus> and APIs wouldn't have to decide whether to use `str` or `OsStr`.
08:47:24 <abastro[m]> Wouldn't converting OsStr into str and back trivial?
08:47:45 <Maxdamantus> No. Some `OsStr`s can't be converted to `str`, because they contain ill-formed Unicode.
08:48:35 <Hecate> I just want three types in my life: a grapheme cluster, a binary blob, and an FFI blob
08:48:47 <abastro[m]> I mean, at least when we have expectation that it is str
08:48:48 Pickchea joins (~private@user/pickchea)
08:50:10 <Maxdamantus> another interesting one is Raku .. Raku decided to make its strings be a sequence of grapheme clusters, which are very awkward to actually detect.
08:50:51 <Maxdamantus> it also has a funny hack for handling ill-formed strings, and they've changed it a few times to handle extra cases they didn't think of, particularly because they automatically normalise strings too.
08:51:38 <Hecate> https://hexdocs.pm/elixir/String.html#content <- I like this page a lot
08:51:43 MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
08:51:47 <abastro[m]> Hm I recall some names not being valid unicode btw
08:51:50 <Hecate> especially this section https://hexdocs.pm/elixir/String.html#module-code-points-and-grapheme-cluster
08:52:08 <Hecate> abastro[m]: "some names" is quite vague, like people's names?
08:52:13 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
08:52:23 <Hecate> because their alphabet wasn't incorporated into the Unicode standard?
08:52:27 <Maxdamantus> Basically, there are "synthetic" grapheme clusters that look something like "\u101000xFF", which are distinct from strings that are literally written that way in the source code (in which case the string is made up of 4 grapheme clusters, "\u101000", "x", "F", "F".
08:52:29 <abastro[m]> Yea, people's names
08:52:39 <abastro[m]> I recall seeing the article. Yes, likely because not incorporated
08:53:24 zeenk joins (~zeenk@2a02:2f04:a110:7d00:2011:cfed:bad7:3c94)
08:53:28 <Hecate> abastro[m]: yeah, then it's not something that can be actionable at the PL level
08:53:49 <Maxdamantus> and I reported some bugs for weird behaviour with their handling of grapheme clusters. you can construct a well-formed UTF-8 string that's about 140 KiB, but when read in Raku it allocates about 20 GiB of memory.
08:54:01 <Hecate> Maxdamantus: oh that's vile :D
08:54:05 <abastro[m]> Well, you could use ByteString for the names
08:54:12 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
08:54:29 <Hecate> abastro[m]: which you still have to decode into UTF-8 or UTF-16 or latin1 if you want to display :-P
08:54:30 <Maxdamantus> https://github.com/MoarVM/MoarVM/issues/1648
08:54:40 <Hecate> otherwise it's an opaque string and doesn't serve the basic purpose of a name ;-)
08:54:58 <abastro[m]> Hm, I think names do have more purpose than display
08:55:06 <Maxdamantus> 240 KiB, not 140 KiB.
08:55:23 mc47 joins (~mc47@xmonad/TheMC47)
08:55:26 <abastro[m]> Like some part of the identification
08:55:39 <Hecate> abastro[m]: I agree with you but I think the display of a name in a computer system is the root of most of these other purposes
08:56:00 × MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Client Quit)
08:56:09 MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
08:56:13 <Hecate> yes but then you'd have to support entering non-unicode stuff in all the chain of equipment and software that leads to this name being compared in the database
08:56:17 <abastro[m]> I recall many pages which combines name and other properties for identification process
08:56:18 <Hecate> so, the keyboard must support it
08:56:25 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
08:58:00 <abastro[m]> Keyboard? Uhm
08:58:12 <abastro[m]> There are tons of input methods
08:59:04 <merijn> I mean, I can't even properly write my IRC name on IRC, because no non-ascii allowed >.>
08:59:58 <abastro[m]> Oh...
09:00:09 × considerate[m] quits (~considera@2001:470:69fc:105::1:c2aa) (Quit: You have been kicked for being idle)
09:00:16 <abastro[m]> Yea language support in programming is rather tenuous
09:00:29 <abastro[m]> https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ I guess this is the article
09:00:53 × jgeerds quits (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 268 seconds)
09:02:17 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
09:04:27 <tomsmeding> merijn: that's kind of stretching dutch spelilng :p
09:04:36 fendor joins (~fendor@91.141.35.69.wireless.dyn.drei.com)
09:04:45 <tomsmeding> other people on this planet have more right to that statement
09:05:16 <Hecate> astra: I'll do you one better: https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/
09:06:27 <merijn> tomsmeding: My name has 5 letters, new-fangled revisionism be damned! >.<
09:07:13 <tomsmeding> and where is that letter in the alphabet? :)
09:07:35 × shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit)
09:07:40 <merijn> tomsmeding: Irrelevant, loads of letters are not in the alphabet
09:08:01 <tomsmeding> fair
09:08:40 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
09:08:53 <merijn> tomsmeding: It is clearly not a digraph like oe/au/ou/eu/ie, because don't get capitalised as one
09:09:49 <tomsmeding> that _is_ true
09:09:49 × chenqisu1 quits (~chenqisu1@183.217.201.47) (Quit: Leaving)
09:10:09 <tomsmeding> it does look ridiculous in a monospace font though
09:10:49 <merijn> It looks fine, if you write it right :p
09:10:50 vglfr joins (~vglfr@88.155.11.162)
09:11:01 × vorpuni quits (~pvorp@2001:861:3881:c690:b51e:da9f:aa64:a038) (Ping timeout: 256 seconds)
09:11:05 <abastro[m]> astra?
09:11:21 <merijn> Looks fine in my monospace font: IJsland
09:11:45 <merijn> The real problem is that computer make unicode like IJ too hard to type
09:12:22 Akiva joins (~Akiva@user/Akiva)
09:13:00 <merijn> tomsmeding: Incidentally, I'm pretty sure that when I was taught the alphabet it just took the place of y, since there's like 3 words with y in it anyway
09:14:18 ccntrq joins (~Thunderbi@2a01:c23:8960:6a00:997e:ae12:2988:d2c3)
09:14:18 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
09:15:45 <tomsmeding> I'm quite sure I was taught that the alphabet one had no dots, though we didn't complete primary school in the same year -- might have changed, dunno
09:19:03 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 250 seconds)
09:20:09 <abastro[m]> Hm.. string makes programming pretty hard
09:26:15 michalz joins (~michalz@185.246.204.62)
09:26:59 bahamas joins (~lucian@86.120.77.115)
09:27:54 <abastro[m]> > (const <> flip const) [1, 2] [3, 4, 5]
09:27:55 <lambdabot> [1,2,3,4,5]
09:28:01 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
09:28:46 w1gz_ is now known as w1gz
09:28:54 <abastro[m]> Why does this work?
09:29:08 <merijn> abastro[m]: The realisation that "strings are *really* hard" is one of the key milestones in programmer life :)
09:29:27 <merijn> abastro[m]: Is there a reason why you think it shouldn't?
09:29:56 <abastro[m]> Haha, key milestone
09:30:03 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
09:30:24 <abastro[m]> I wonder how go would handle it with its tact at publicity
09:30:40 <abastro[m]> I find (const <> flip const) working alike (<>) surprising.
09:32:23 <merijn> So, let's start of with: (<>)
09:32:25 <merijn> :t (<>)
09:32:27 <lambdabot> Semigroup a => a -> a -> a
09:32:35 <merijn> That's obvious for lists, yeah?
09:33:15 obp joins (~user@87.72.37.104)
09:33:33 <abastro[m]> Yep
09:33:35 <merijn> So, next step: My favourite Semigroup instance: "instance Semigroup r => Semigroup (a -> r) where f <> g = \x -> f x <> g x"
09:33:41 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds)
09:34:00 <abastro[m]> But const is function
09:34:03 <merijn> i.e. "any function that returns something that is a Semigroup instance, is itself a Semigroup instance"
09:34:11 <abastro[m]> Er wha
09:34:45 <abastro[m]> Oh right, there is such instance
09:34:53 <merijn> Note that that Semigroup instance applies recursively (i.e. since "a -> b -> c" is just "a -> (b -> c)" and "b -> c" is a Semigroup instance if 'c' is a Semigroup instance
09:35:07 <abastro[m]> But how does specific combinator such as const and flip const bring us back to mappend?
09:35:08 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
09:35:32 obp parts (~user@87.72.37.104) ()
09:35:34 <merijn> abastro[m]: So "const <> flip const" returns a new function that takes two arguments, passes them on to const and "flip const" and concat the result via <>
09:35:50 <merijn> > const 'a' True
09:35:51 <lambdabot> 'a'
09:35:58 <merijn> > flip const 'a' True
09:36:00 <lambdabot> True
09:36:24 <merijn> So, you just have 2 functions, one returning the first argument, one returning the second, and then using <> on their results
09:37:08 <abastro[m]> Yep.
09:37:18 <abastro[m]> Ohh
09:37:32 <abastro[m]> So it appends the first argument and second argument!
09:37:38 <abastro[m]> :t (const <> const)
09:37:39 <lambdabot> Semigroup a => a -> b -> a
09:38:15 <merijn> > (const <> const) "ab" "c"
09:38:16 <lambdabot> "abab"
09:39:04 <abastro[m]> I guess this is going to be like (id <> id) which ignores the second parameter
09:39:15 <abastro[m]> > (id <> id) "ab"
09:39:17 <lambdabot> "abab"
09:39:35 × Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds)
09:40:05 <abastro[m]> fold (repeat 10 id) "ab"
09:40:15 <abastro[m]> > fold (repeat 10 id) "ab"
09:40:17 <lambdabot> error:
09:40:17 <lambdabot> • Couldn't match expected type ‘(a0 -> a0) -> t0 ([Char] -> t)’
09:40:17 <lambdabot> with actual type ‘[a1]’
09:40:37 <abastro[m]> Uhm why this doesn't work?
09:40:46 <int-e> > mconcat [id, reverse, map succ] "ab"
09:40:47 <lambdabot> "abbabc"
09:43:06 <int-e> abastro[m]: you want `replicate` rather than `repeat`
09:43:42 <abastro[m]> Gah, I need more haskell experience
09:44:21 <int-e> I'd probably write it correctly, but I needed a second glance to see what's wrong :-P
09:45:30 <int-e> @src mconcat
09:45:31 <lambdabot> Source not found. Sorry about this, I know it's a bit silly.
09:45:57 <abastro[m]> =>) anyway, this thing is nice replacement for mtimes
09:46:04 <int-e> Oh, class member... also @src is too outdated to check whether mconcat = fold is the current definition.
09:46:27 obp joins (~user@87.72.37.104)
09:46:58 <abastro[m]> Monoid is def one of the coolest I learned in haskell
09:47:08 kmand joins (~user@188.120.85.216)
09:47:34 <int-e> Default implementation is mconcat = foldr mappend mempty ...that's a no then.
09:47:45 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
09:48:54 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
09:51:43 <merijn> The source from @src (generally) lists the code from the report, not actual source used by GHC
09:52:17 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
09:52:41 <abastro[m]> That is interesting, I guess it does that because report does not change
09:52:59 <merijn> Also because @src is just a string to string lookup table :p
09:53:04 <merijn> And not anything smart
09:54:35 <abastro[m]> At least they need not care about the ghc version
09:55:06 × mcglk quits (~mcglk@131.191.49.120) (Ping timeout: 260 seconds)
09:55:09 kmein_ is now known as kmein
09:55:22 kmand parts (~user@188.120.85.216) (ERC (IRC client for Emacs 27.2))
09:55:52 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
09:58:32 krappix joins (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr)
09:58:52 mcglk joins (~mcglk@131.191.49.120)
10:04:48 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
10:09:18 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:09:31 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
10:13:37 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
10:15:20 × toulene quits (~toulene@user/toulene) (Quit: Ping timeout (120 seconds))
10:15:27 Graham31415 joins (~Graham314@5.33.52.156)
10:16:01 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
10:16:46 toulene joins (~toulene@user/toulene)
10:17:32 notzmv joins (~zmv@user/notzmv)
10:18:07 cfricke joins (~cfricke@user/cfricke)
10:21:23 × kaph quits (~kaph@net-109-116-124-149.cust.vodafonedsl.it) (Read error: Connection reset by peer)
10:22:46 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
10:23:23 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
10:23:55 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:27:24 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
10:29:18 gentauro joins (~gentauro@user/gentauro)
10:29:42 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
10:29:55 × nicbk quits (~nicbk@user/nicbk) (Ping timeout: 240 seconds)
10:32:08 Pickchea joins (~private@user/pickchea)
10:33:53 × tiferrei quits (~tiferrei@user/tiferrei) (Remote host closed the connection)
10:34:51 tiferrei joins (~tiferrei@user/tiferrei)
10:34:55 × toulene quits (~toulene@user/toulene) (Quit: Ping timeout (120 seconds))
10:35:31 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
10:36:23 toulene joins (~toulene@user/toulene)
10:36:40 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
10:37:12 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
10:39:08 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
10:40:14 kuribas joins (~user@ptr-25vy0i7hp9xee3gx8cn.18120a2.ip6.access.telenet.be)
10:43:20 × bahamas quits (~lucian@86.120.77.115) (Ping timeout: 252 seconds)
10:53:11 kaph joins (~kaph@net-109-116-124-149.cust.vodafonedsl.it)
10:56:39 × mmhat quits (~mmh@55d48f06.access.ecotel.net) (Ping timeout: 256 seconds)
11:02:19 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
11:07:25 × krappix quits (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Ping timeout: 256 seconds)
11:09:59 mmhat joins (~mmh@55d48f06.access.ecotel.net)
11:11:46 jgeerds joins (~jgeerds@55d4548e.access.ecotel.net)
11:15:06 <kuribas> I am back to higher kinded records and type families. There doesn't seem to be a way to put business logic into data structures, without either loosing all type info, or using advanced features.
11:17:19 <kuribas> And the haskell way of making algebras seems to make redundancy necessary.
11:18:35 <[exa]> what's "business logic" in this case?
11:19:25 <kuribas> in this case it's the "model" of our database.
11:20:00 razetime joins (~quassel@117.254.35.226)
11:20:25 <kuribas> We have on "object" table with objects and their type, then other tables with attributes which can belong to that type or object.
11:21:59 <kuribas> I can then put this information in data tables, which are then used to generate queries to read or write to the database.
11:22:07 <[exa]> so the business logic is basically a db schema?
11:22:36 <kuribas> no, it's more like meta information about the db schema
11:22:42 <kuribas> how the object model maps to the db schema.
11:22:57 <kuribas> Currently I use higher kinded records to provide a mapping.
11:23:11 <[exa]> so it's a description of isomorphism, kinda, right?
11:23:29 <kuribas> yeah
11:23:47 <kuribas> the database and object model should be isomorphic.
11:24:08 <kuribas> And it's complicated because we have a history of changes also there.
11:24:19 <[exa]> the database is sql?
11:24:24 <kuribas> yeah
11:25:04 <[exa]> ah well, you're not the first one to hit difficulties with this then (/me points at the list of failed ORMs and the queue of failing ORMs)
11:25:14 obp parts (~user@87.72.37.104) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50))
11:25:53 <kuribas> well, it's not really an ORM, since the database schema was designed for this.
11:26:14 <[exa]> "orm with assumptions"
11:27:08 <kuribas> I mean, it was moddelled after our domain, not a generic ORM.
11:27:19 <kuribas> In our case "objects" are devices.
11:27:55 <[exa]> this is going to be a really very highlevel generic hint but the general error in this kind of designs is that the "objects" do not really exist (or compose well) in SQL. Esp. in functional programming it's much easier to have an isomorphism between queries and transformations, instead of between rows and objects
11:28:20 <kuribas> What do you mean?
11:28:22 <[exa]> I'll probably spend half of the day now searching for a good example, hoping that someone will supply one :D
11:28:35 <kuribas> If the "object" is in the "object" table, it exists?
11:29:08 <kuribas> well, I lied, it's called the "device table" :)
11:29:21 <kuribas> the idea is the same.
11:29:31 <kuribas> Things like addresses are not in the device table.
11:31:11 <[exa]> the "object" in your program transforms to a very hairy collection of rows, (invisible) index entries and (unmaterialized) satisfied constraints that are specified somewhere else, and if you want it to find an actual isomorphism, it just gets hard. Instead of that, finding an isomorphism on the transformations/queries is easy and pretty much well-defined (SQL queries compose nicely!)
11:31:59 <kuribas> that's basically my code now, but I find there is still a lot of duplication.
11:32:13 <kuribas> separate code for reading, insertion.
11:32:26 × razetime quits (~quassel@117.254.35.226) (Remote host closed the connection)
11:33:33 <kuribas> So now I have a datatype for devices: like "data Device = Toaster | Fridge". Then a type family to map the device to a record with "Attributes". Then a type family to map each attribute to a record of attributeFields.
11:33:42 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:34:31 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 245 seconds)
11:34:45 <[exa]> I've seen a pretty good approach for abstracting over this (you basically model everything as SELECT INTO and sometimes you select from the program into the database) but no bookmark :/
11:35:32 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
11:36:54 <kuribas> [exa]: how does that give me both inserts and reads?
11:37:12 razetime joins (~quassel@117.254.35.226)
11:39:41 <[exa]> the data stream is basically a "row stream" and it's pretty easy to have the row stream ingested into SQL from the program (needs a bit of query transformations but nothing too harsh, they made it work with something like COPY FROM), as well as to program from SQL (that's the easy way, just SELECT)
11:40:19 <abastro[m]> Coding in Immutability to DB?
11:40:20 <abastro[m]> Tho how would it perform
11:40:45 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
11:41:23 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
11:41:25 <kuribas> abastro[m]: only add, never delete or update :)
11:41:41 xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
11:41:42 <kuribas> or garbage collect
11:42:07 <abastro[m]> I mean, wait. You only add in your DB?
11:42:12 <abastro[m]> How would that work
11:42:37 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
11:42:58 <kuribas> I was being facetious
11:44:24 × acidjnk quits (~acidjnk@pd9e0b763.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
11:44:41 <kuribas> [exa]: maybe a datastructure which contains both an insertor and reader?
11:45:21 <kuribas> And is composable so I can compose the reader for single field into a reader of the feature.
11:45:30 <abastro[m]> Ahh
11:45:54 <abastro[m]> Hm wait, you need update as well, right?
11:45:56 <[exa]> yeah, something like that, (RowStream -> RowStream)
11:46:12 <kuribas> abastro[m]: typically in haskell, you manipulate your data and effects in a pure way, then execute the effects later.
11:46:13 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
11:46:31 <[exa]> updates can be streamed, you need a selecting and updating part of the row stream
11:47:00 <[exa]> same with deletes, again needs only a tiny bit of metainformation here and there
11:47:10 <kuribas> [exa]: what do you mean by stream here? A stream of devices?
11:47:12 <abastro[m]> Oh, so you currently have separate insert and update there - that's what you mean, right?
11:47:23 <kuribas> abastro[m]: yes
11:47:28 <[exa]> kuribas: stream of literal sql rows
11:47:31 <abastro[m]> insert and update-capable data structure
11:47:32 <abastro[m]> I see.
11:47:39 <abastro[m]> Oh wait. I mean insert and read, duh
11:47:49 <abastro[m]> and update is performed by the interpreter or whatever
11:48:06 <kuribas> abastro[m]: in lisp you then make a datastructure describing which rows are "attributes", part of a "feature". then generate the query based on that.
11:51:35 <kuribas> [exa]: concrete example, let's say I have data "Device = Toaster | Fridge | ...". Then I want to get a Toaster, and know which "features" belong to the Toaster. For example a feature table "Electrical" and "Baking".
11:52:47 <abastro[m]> Uhm why does this sound like sum type example
11:53:02 <abastro[m]> Like `Device = Toaster ToasterFeatures | Fridge FridgeFeatures | ...`
11:53:03 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
11:53:03 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
11:53:03 neurocyte0917090 joins (~neurocyte@user/neurocyte)
11:53:45 <kuribas> abastro[m]: right, that is what I have now.
11:54:12 <abastro[m]> Oh, what was the problem with this design?
11:54:42 <abastro[m]> Like you wanted general statement over each field?
11:54:51 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
11:54:58 <abastro[m]> (Asking since this sounds interesting)
11:55:03 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
11:55:30 <kuribas> well, now I have to write separate queries to read and write the features.
11:55:47 ProfSimm joins (~ProfSimm@87.227.196.109)
11:56:02 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Ping timeout (120 seconds))
11:56:27 <abastro[m]> I thought there were utilities to automatically generate queries
11:56:44 <abastro[m]> Or, are your queries quite complicated?
11:56:48 <kuribas> not really
11:57:29 <kuribas> I just find the logic is a bit spread out
11:58:08 <kuribas> To generate a query, I have to know that the attribute "wattage" is read from the column "wattage" in the table "Electrical".
11:58:33 <kuribas> I am not using an ORM, because I hate them :)
11:59:09 <abastro[m]> Eh, can't infer attribute "wattage" from column name?
11:59:31 <kuribas> yes, but they aren't all unique.
11:59:48 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
11:59:49 <kuribas> so sometime I want to make a custom mapping.
11:59:57 × mmhat quits (~mmh@55d48f06.access.ecotel.net) (Ping timeout: 240 seconds)
12:00:13 <kuribas> abastro[m]: I suppose you are hinting towards using HT or generics to generate the queries?
12:00:19 <kuribas> TH
12:01:18 × toulene quits (~toulene@user/toulene) (Read error: Connection reset by peer)
12:01:24 <abastro[m]> Yea, I'm quite sure it goes towards that end.
12:02:10 toulene joins (~toulene@user/toulene)
12:02:23 <kuribas> So now I am trying to use HKD records. I have data Electrical f = Electrical { wattage :: f Double }
12:03:22 <kuribas> Then I can make (Electrical SQLRows), which maps the fields to the SQL rows.
12:03:46 <kuribas> And I have decoupled the actual implementation from the database description.
12:03:59 <kuribas> However, it's not boring haskell anymore.
12:12:21 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
12:14:36 boxscape_ joins (~boxscape_@p4ff0b60b.dip0.t-ipconnect.de)
12:14:58 gehmehgeh joins (~user@user/gehmehgeh)
12:16:14 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
12:21:12 <kuribas> So I turn each field into a query, and since the query builder is applicative, I can use ftraverse to make a query over the table.
12:21:15 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
12:21:24 <kuribas> https://hackage.haskell.org/package/hkd-0.1/docs/Data-HKD.html#v:ftraverse
12:21:51 <kuribas> My point is, the lispers claim that with dynamic languages you get more flexibility that when using types, and I have been trying to disprove it.
12:22:13 <kuribas> And that you need to go to advanced type systems to make up for it.
12:22:19 <kuribas> So far it just seems that they are right.
12:22:51 <kuribas> well, save for not recognizing that haskell is the best dynamic language :)
12:23:47 <kuribas> and "you cannot do this in haskell" is BS, since I can do any clojure technique using one big sum and partial functions.
12:24:06 <kuribas> But the question is if this is satisfying...
12:24:43 <abastro[m]> Personally I think their claim of flexibility is right
12:25:00 <abastro[m]> Where, instead, haskell got edge on correctness
12:25:26 grimey63 joins (~grimey@pool-108-26-37-118.syrcny.east.verizon.net)
12:25:42 <abastro[m]> I wonder how you use HKD records though, why would you have `Electrical SQLRows`
12:25:45 <kuribas> you need full dependent types to get both the same amount of flexibility and correctness.
12:25:58 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
12:26:33 <kuribas> abastro[m]: SQLRows describes a row.
12:26:47 <abastro[m]> Indeed, perhaps I just love to compromise some correctness
12:27:17 <kuribas> compromising some correctness is better than compromising all correctness, which is what lispers do.
12:27:32 <kuribas> Or rather, not having the language check any correctness.
12:28:02 <abastro[m]> Oh, lispers compromise all correctness?
12:28:05 <abastro[m]> I mean
12:28:17 <abastro[m]> lispers only compromise some of correctness?
12:28:32 <abastro[m]> Oh right, correctness could be enforced without types
12:28:39 <kuribas> better said, they more correctness either into the programmer responsibility, or into tests.
12:28:52 <kuribas> s/more/move
12:29:11 <abastro[m]> Ah so you mean they do not allow language to check correctness
12:29:17 <kuribas> yes
12:29:35 acidjnk joins (~acidjnk@p200300d0c7049f30b166e41192d3e532.dip0.t-ipconnect.de)
12:29:36 × doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Remote host closed the connection)
12:30:06 <kuribas> validation (if it is there), is only to filter out the user input, not to ensure the program is correct.
12:30:32 <kuribas> s/lispers/dynamic programmers in general.
12:30:46 <abastro[m]> So ye, I'd just have unreachable states in this case.
12:30:58 <abastro[m]> As GADTs could make things complicated
12:31:04 <abastro[m]> But that's just me.
12:33:04 <kuribas> There is little complicated code in my case. But that's because the "magick" is done by the HKD library.
12:33:21 <kuribas> Compared to clojure, where it is just builtin map manipulation functions.
12:33:22 karim joins (~karim@41.36.17.45)
12:33:49 <abastro[m]> Oh, you mean a little complicated?
12:34:06 <kuribas> abastro[m]: I mean not much.
12:34:34 <kuribas> Not like, say, the implementation of servant.
12:34:43 <abastro[m]> Tbh I still do not see why you have the type parameter
12:34:47 <abastro[m]> Why is it?
12:35:04 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
12:35:07 <kuribas> abastro[m]: So I know it matches the database type :)
12:35:16 <abastro[m]> Do you have to somehow embed SQLRows there?
12:35:35 <Philonous> How do I export an associated data constructor? E.g. I have »class Foo a where data Bar a« and »instance Foo int where data Bar Int = BarInt«, how do I export the BarInt constructor?
12:36:57 <geekosaur> should be Foo(Bar) or Foo(..)
12:37:17 <kuribas> abastro[m]: yeah, like electricalFields = Electrical { wattage = Field "Electrical" "wattage" }
12:37:20 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 268 seconds)
12:38:13 × karim quits (~karim@41.36.17.45) (Ping timeout: 240 seconds)
12:39:23 <abastro[m]> Eh, why do you need Field "Electrical" "wattage" thing
12:39:36 <kuribas> abastro[m]: or "wattage = Field electrical_tbl wattage_field", if the tables and fields are generated from the database schema.
12:40:07 <abastro[m]> I mean why do you need that
12:40:33 <Philonous> geekosaur, Ah, played around with it, both »Bar(..)« and »Bar(BarInt)« work.
12:40:34 <Philonous> Thanks!
12:40:35 <abastro[m]> To scrap boilerplate of e.g. reading from query?
12:40:36 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
12:40:55 <kuribas> abastro[m]: yeah
12:41:11 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
12:41:16 <kuribas> to avoid writing a lot of manual queries.
12:41:36 × jgeerds quits (~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 252 seconds)
12:41:38 <abastro[m]> Yea, sounds like TH thing
12:41:54 <abastro[m]> I guess you dislike using that?
12:42:08 <kuribas> yeah
12:42:35 mmhat joins (~mmh@55d48f06.access.ecotel.net)
12:42:41 <kuribas> I already have TH to generate typed fields and tables from the DB schema.
12:43:49 <kuribas> abastro[m]: but I see, the haskell solution would be "less flexible", "more boilerplaty", but more correct.
12:44:06 <kuribas> Only with dependent types you can have both.
12:44:21 <kuribas> Or you need to hack around it with TH or generics.
12:44:35 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds)
12:44:43 <abastro[m]> Oh, yep.
12:45:13 <abastro[m]> I often use generics so I did not know it was a hack 😣
12:45:25 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
12:46:07 <abastro[m]> Dependent types also have boilerplates though. ...on the proof side.
12:47:45 <abastro[m]> I realized when I say I dislike dynamic typing, I mean languages like python and js. lol
12:47:58 vglfr joins (~vglfr@88.155.11.162)
12:48:00 <kuribas> abastro[m]: not lisp/clojure? :)
12:48:18 <abastro[m]> Yep, I guess I am fine with lisp
12:48:43 <abastro[m]> (I just used to meme with (l(i(s(p))) tho)
12:49:21 <kuribas> abastro[m]: in my SQL library, I not use TH to generate columns and tables. But in a DT language I could write a constraint that looks up the fields in the database schema.
12:49:36 <kuribas> abastro[m]: the latter is much cleaner IMO.
12:50:16 <abastro[m]> But to see if the constraint conforms, you need proofs
12:50:22 Graham31415 joins (~Graham314@5.33.52.156)
12:50:24 <abastro[m]> Well, at least that was my experience with DT
12:51:00 <abastro[m]> Pervasive problems with proof proliferation
12:51:07 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:51:16 <kuribas> it can be a simple proof, like "IsJust (lookup table schema)"
12:51:50 <kuribas> if the table is in the schema, lookup returns "Just table", and the proof is done.
12:51:57 <kuribas> otherwise it will fail at compile time.
12:52:20 <kuribas> no need for complex tactics or rewrites :)
12:52:44 <abastro[m]> The table needs to be on compile-time though
12:52:45 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 268 seconds)
12:52:58 <abastro[m]> And there is whole can of worms in describing datatypes in DT
12:53:14 <kuribas> yeah, but it can be just a constant value.
12:53:22 <kuribas> Idris1 even had type providers.
12:53:30 <abastro[m]> Had hard time using DT in Coq
12:53:33 <kuribas> Where you could read a value from a side-effect.
12:53:38 <abastro[m]> Oh, I wonder how Idris would serve there
12:54:04 <kuribas> well, an idris datatype is just like a haskell datatype.
12:54:11 <abastro[m]> Yep, Idris is interesting. Just that I don't see it production-ready yet (Without trying, I know.. I should try at least once)
12:54:19 <kuribas> oh, it isn't :)
12:56:27 × MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 252 seconds)
12:56:58 <kuribas> be prepared to implement half of the libraries that you take for granted in haskell.
12:57:27 <abastro[m]> XD
12:57:59 × acidsys quits (~LSD@2a03:4000:55:d20::3) (Excess Flood)
12:58:30 acidsys joins (~LSD@2a03:4000:55:d20::3)
12:58:34 MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
12:59:26 <kuribas> hmm, if I combine SQL inserters and readers, I'll end up with a profunctor.
13:00:04 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
13:00:07 <kuribas> Data SQLRow from to = SQLRow (Insertor from) (Reader to)
13:01:45 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
13:02:01 × acidjnk quits (~acidjnk@p200300d0c7049f30b166e41192d3e532.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
13:03:26 <kuribas> That could be one way to remove duplication.
13:04:43 <abastro[m]> Profunctor? Sounds great!
13:05:58 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
13:06:56 cheater joins (~Username@user/cheater)
13:12:37 × toulene quits (~toulene@user/toulene) (Ping timeout: 240 seconds)
13:12:53 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
13:14:32 toulene joins (~toulene@user/toulene)
13:16:43 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 250 seconds)
13:17:31 <kuribas> the problem with DT is that most research is into proving programs correct, instead of in how to avoid the mess that the haskell typesystem has gone into.
13:17:46 <kuribas> having a principled way to do typelevel programming.
13:18:05 <merijn> Most DT research doesn't use Haskell
13:18:17 <merijn> Because bolting DT onto Haskell does not an elegant language make
13:19:36 <kuribas> isn't the argument that making haskell DT is easier than making a DT language production ready.
13:20:17 <merijn> No
13:20:21 <merijn> I mean, it depends
13:20:27 × razetime quits (~quassel@117.254.35.226) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:20:44 <merijn> I don't think anyone expect Dependent Haskell to be as elegant/clean as Idris
13:20:53 <merijn> At least not anyone "in the know" on these things :p
13:22:55 <kuribas> Unless they want to phase out other extensions, this will only introduce complexity, no?
13:23:24 <maerwald> I think the point is: DT languages are not production ready. And you should ask why :p
13:23:58 × ubert quits (~Thunderbi@p200300ecdf158894255673a7c9121e6c.dip0.t-ipconnect.de) (Quit: ubert)
13:24:11 <kuribas> maerwald: chicken and egg question. People don't use it because they aren't production ready, and it's not production ready because people don't use them.
13:24:16 ubert joins (~Thunderbi@p200300ecdf1588942c242a19e1a99324.dip0.t-ipconnect.de)
13:24:19 <maerwald> People use them
13:24:28 <maerwald> but they are not general purpose languages
13:24:49 <kuribas> I mean outside of an academic or mathematical proof oriented setting
13:25:14 <geekosaur> dunno, idris is trying hard to be production ready
13:25:28 <geekosaur> it just needs a threshold number of users to start developing an ecosystem
13:25:58 <kuribas> geekosaur: yeah, nobody is to blame, but it's hard with 10 people or so :-)
13:26:08 shriekingnoise joins (~shrieking@201.231.16.156)
13:26:23 <maerwald> Not every feature fits into a general purpose language
13:26:35 <maerwald> And you don't need to have a general purpose language for every purpose
13:26:52 <geekosaur> and what peoplew are saying about idris now, they were saying about haskell 15 years ago
13:27:22 <geekosaur> (and some are still saying about it, because hackage isn't node or etc.)
13:29:56 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
13:30:14 hololeap joins (~hololeap@user/hololeap)
13:31:33 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
13:32:15 <maerwald> you mean completely unaudited dumpster of code? I think it is :p
13:32:15 boborygmy_ joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net)
13:32:25 <maerwald> Don't know any language that does it different
13:32:52 <maerwald> not hard to upload malicious packages
13:33:20 <geekosaur> I meant size
13:33:35 <geekosaur> most programmers don't even think about "dumpster of code"
13:33:42 <maerwald> code size? I think average code size is 10 LOC on npm :D
13:34:29 <maerwald> negate_bool(lol: bool): bool { not lol }
13:34:37 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
13:35:05 <kuribas> maerwald: package count
13:35:58 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
13:38:03 <geekosaur> shitpile depth
13:40:53 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
13:40:53 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
13:40:53 wroathe joins (~wroathe@user/wroathe)
13:40:58 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
13:45:00 <maerwald> :D
13:45:00 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
13:45:04 <maerwald> log n
13:47:25 <dminuoso> 14:41:35 maerwald | [13:32:52] not hard to upload malicious packages
13:47:39 <dminuoso> There's good reason why Google has internal rules to vendor dependencies in repositories.
13:48:00 <dminuoso> So some degree I wish cabal-install had sufficient tooling to do the same.
13:48:05 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
13:48:11 <dminuoso> Maybe I might look into that in my next vacation
13:48:29 <maerwald> dminuoso: yes... I was thinking of that too, because it would solve the problem of HLS not being able to jump to dependency definitions
13:48:34 <maerwald> if you vendor everything, it can
13:49:16 <dminuoso> Superficially, it seems like it shouldn't be a very hard thing (I know, famous last words)
13:50:09 <maerwald> via plan.json it should indeed be easy
13:51:25 <maerwald> just collect everything, run `cabal unpack` in a subdir, then add optional-packages in cabal.project.local
13:52:10 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
13:53:53 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5) (Quit: WeeChat 2.8)
13:56:48 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
13:56:51 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
13:57:17 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
13:57:26 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
13:57:38 bahamas joins (~lucian@86.120.77.115)
13:57:53 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
13:58:02 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
13:58:12 × acidsys quits (~LSD@2a03:4000:55:d20::3) (Excess Flood)
13:58:22 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
13:58:36 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
13:58:38 × boborygmy_ quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Read error: Connection reset by peer)
13:58:42 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
13:58:42 acidsys joins (~LSD@2a03:4000:55:d20::3)
13:58:57 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
13:59:05 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
13:59:24 × ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
13:59:53 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
14:00:29 Sgeo joins (~Sgeo@user/sgeo)
14:01:33 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
14:02:22 <dminuoso> maerwald: So one way this starts getting complicated is if you have already vendored packages, say you have ./foo/foo.cabal and ./bar/bar.cabal
14:02:22 <merijn> dminuoso: You can point it at your own hackage pretty easily and I think there's a way to point it at a local repo of tarballs too
14:02:39 <dminuoso> merijn: "own hackage" and "easily" in one sentence is a bit amusing!
14:02:46 <dminuoso> Been there, dont want to experience that again.
14:02:57 <merijn> dminuoso: You can point it at a local cache of tarballs too, iirc
14:03:17 <merijn> don't ask me how, though :)
14:05:24 <dminuoso> maerwald: So yeah, I think this actually is a bit more subtle than at first look.
14:05:39 krappix joins (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr)
14:05:42 <maerwald> dminuoso: I don't understand your remark
14:05:47 <dminuoso> So imagine foo/foo.cabal and bar/bar.cabal depend on the same package but in a different flavour
14:06:19 <maerwald> flavour?
14:06:25 <dminuoso> Versions, build flags
14:06:50 <dminuoso> Or.. no just versinos.
14:06:52 <maerwald> how's that possible even non-vendored?
14:07:26 <dminuoso> It wouldnt, but the vendored style is very common in single repository/multiple packages style
14:07:27 <maerwald> relying on plan.json means there is a *correct* and successful resolution
14:07:36 <dminuoso> Yes, but that's per build target.
14:08:01 <tdammers> vendoring doesn't mean you don't have to resolve dependencies, you just do it at a different point in your workflow, and you avoid some supply chain attacks
14:08:12 <dminuoso> So say you have foo/ and bar/ as locally vendored packages, `cabal build foo` gives you a completely different build plan from `cabal build bar`
14:08:30 <maerwald> dminuoso: very simple, you vendor per target then
14:10:00 <dminuoso> maerwald: can you do this with a singular cabal.project.local? Or would that imply a separate such file per target, and you specify that with --project-file?
14:10:20 <maerwald> dminuoso: yeah
14:10:27 <dminuoso> Which one?
14:10:35 <maerwald> --project-file
14:13:06 benin joins (~benin@183.82.207.30)
14:13:41 <maerwald> but if `cabal build all` fails resolution, you're already in trouble
14:13:57 <dminuoso> I guess it's just a bit annoying because you might end up duplicating dependencies this way. This would already happen for test and benchmark targets
14:14:38 <maerwald> I've only discovered this on unmaintainned packages
14:14:40 <dminuoso> maerwald: im not convinced of that. we have several projects that I dont think would produce good coherent singular build plans.
14:15:10 <dminuoso> in fact, we split them up intentionally such that foo-cli and bar-cli dont affect each others build plans needlessly
14:15:26 <maerwald> yeah, then have separate project files for them
14:15:49 <dminuoso> It's just too darn convenient to type `cabal run foo-cli`! :)
14:20:21 <dminuoso> I guess the interface Id be looking for is a specification for possible build targets, generate a build plan for all, collect all deduplicated dependencies, and then teach cabal to use a directory of unpacked tarballs as a hackage replacement
14:21:43 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
14:21:48 × mikoto-chan quits (~mikoto-ch@84.199.144.235) (Ping timeout: 240 seconds)
14:22:26 <dminuoso> It would just be nice if, as far as cabal-install is concerned, this would be transparent, such that all you might do is configure some `hackage: .vendored_deps/` in your cabal.project if that makes sense
14:24:29 <maerwald> this wouldn't be the primary use case I'd think about when hacking up a solution
14:24:33 <maerwald> PR's welcome ;)
14:24:51 lortabac joins (~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5)
14:25:14 <dminuoso> oh absolutely, Im willing to try and build this myself
14:27:00 × Pickchea quits (~private@user/pickchea) (Ping timeout: 240 seconds)
14:28:41 <maerwald> my main motivation is to have jump-to-dependency in HLS
14:30:55 lechner joins (~lechner@debian/lechner)
14:32:09 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
14:33:30 <abastro[m]> Jump to dependency for given definition? Import?
14:36:01 mikoto-chan joins (~mikoto-ch@213.177.151.239)
14:36:02 × acidsys quits (~LSD@2a03:4000:55:d20::3) (Excess Flood)
14:36:33 acidsys joins (~LSD@2a03:4000:55:d20::3)
14:36:45 <dminuoso> Yeah, my concern is just auditing transitive dependency changes. But it seems whatever the solution, would would be served.
14:37:49 <abastro[m]> Oh transitive dependency
14:42:37 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
14:46:20 × mmhat quits (~mmh@55d48f06.access.ecotel.net) (Quit: WeeChat 3.4.1)
14:46:45 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
14:48:15 <janus> has anyone encountered the GC bug 20959 in 9.0.2? is a 9.0.3 planned?
14:49:40 Unicorn_Princess joins (~Unicorn_P@46-54-248-191.static.kate-wing.si)
14:57:29 × bahamas quits (~lucian@86.120.77.115) (Ping timeout: 256 seconds)
14:57:47 xkuru joins (~xkuru@user/xkuru)
15:01:51 acidjnk joins (~acidjnk@p200300d0c7049f30e5337983ccb1fe06.dip0.t-ipconnect.de)
15:03:43 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds)
15:05:19 mikoto-chan joins (~mikoto-ch@213.177.151.239)
15:07:03 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
15:07:48 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
15:08:57 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
15:09:02 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
15:10:56 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:10:58 vglfr joins (~vglfr@88.155.11.162)
15:13:44 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:14:05 justsomeguy joins (~justsomeg@user/justsomeguy)
15:18:27 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
15:18:54 razetime joins (~quassel@117.254.35.226)
15:19:39 javiergarea joins (~javiergar@static-60-220-27-46.ipcom.comunitel.net)
15:20:00 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
15:20:39 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
15:21:45 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
15:22:08 stiell joins (~stiell@gateway/tor-sasl/stiell)
15:23:02 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
15:23:34 Pickchea joins (~private@user/pickchea)
15:23:39 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
15:27:01 × acidjnk quits (~acidjnk@p200300d0c7049f30e5337983ccb1fe06.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
15:29:37 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
15:30:21 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
15:31:23 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
15:34:42 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
15:34:45 × MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 250 seconds)
15:35:24 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Client closed)
15:36:39 × benin quits (~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
15:38:24 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
15:38:24 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
15:38:24 neurocyte0917090 joins (~neurocyte@user/neurocyte)
15:38:43 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
15:41:05 dsrt^ joins (~dsrt@96-67-120-105-static.hfc.comcastbusiness.net)
15:42:02 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
15:43:29 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
15:43:31 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
15:43:37 yauhsien_ joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
15:45:51 <justsomeguy> Where did the name fold come from? Is there some kind of metaphor for how the data structure is reduced in the name?
15:46:30 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
15:46:30 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
15:46:30 neurocyte0917090 joins (~neurocyte@user/neurocyte)
15:46:36 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
15:47:52 <[exa]> justsomeguy: I always imagined folding a long strip of paper or something
15:49:46 <[exa]> [1~so yeah definitely metaphorical, unless well someone here comes with an explanation for F.O.L.D. acronym
15:52:05 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 250 seconds)
15:52:05 <kuribas> I prefer reduce as in lisp.
15:52:50 <kuribas> folding something doesn't reduce it.
15:54:02 <dminuoso> kuribas: Arguably thats why folding is more honest?
15:54:20 <dminuoso> % foldr (:) [] [1,2,3,4]
15:54:20 <yahb> dminuoso: [1,2,3,4]
15:54:24 <dminuoso> Is this "reduced" in any way?
15:55:32 <dminuoso> Either way, mentally I always imagine a structure/tree of data being folded like origami by means of a function :)
15:55:38 <dminuoso> Into something.. else..
15:56:36 <Zemyla> > foldr (:) [5,6,7,8] [1,2,3,4]
15:56:37 <lambdabot> [1,2,3,4,5,6,7,8]
15:57:04 <kuribas> dminuoso: yeah, to a new list :)
15:57:09 Graham31415 joins (~Graham314@5.33.52.156)
15:57:12 <kuribas> dminuoso: it just looks like the old one.
15:57:14 <dminuoso> Zemyla: Mmm, what a cunning way to pre/append!
15:57:15 <stefan-_> in scala there is a `reduce` function on collections: https://www.scala-lang.org/api/2.13.3/scala/collection/immutable/List.html#reduce[B%3E:A](op:(B,B)=%3EB):B
15:57:53 <dminuoso> Besides, folding has a nice matching opposite unfolding.
15:57:55 × ystael_ quits (~ystael@user/ystael) (Read error: Connection reset by peer)
15:57:56 <dminuoso> So that's quite nice as well
15:58:12 <Zemyla> That's actually how append works in the build/foldr fusion system in GHC.List.
15:58:18 <janus> reduce has an nice opposite too: embiggen :D
15:58:43 <kuribas> dminuoso: unfold this: foldl (+) 0 [2, 5, 4]
15:58:46 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
15:59:19 <dminuoso> Zemyla: conceptually it's just a delayed fold, such that you can simply compose the functions in between right?
15:59:59 <byorgey> the word 'fold' seems to be already used in Miranda
16:00:03 <justsomeguy> Maybe I should just think about it is as a "constructor substitution" function?
16:00:16 lbseale joins (~ep1ctetus@user/ep1ctetus)
16:00:19 <byorgey> justsomeguy: yes, that's exactly what it is
16:00:28 <dminuoso> Well, in case of foldr anyway
16:00:35 <dminuoso> foldl' is better thought of as a loop
16:00:38 ystael joins (~ystael@user/ystael)
16:02:16 × haskl quits (~haskl@user/haskl) (Read error: Connection reset by peer)
16:02:18 <monochrom> https://docs.racket-lang.org/srfi/srfi-std/srfi-1.html#reduce
16:02:58 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:03:35 <kuribas> > foldr (+) 0 [2, 5, 4]
16:03:37 <lambdabot> 11
16:03:59 <monochrom> Every programmer tries to be honest when naming. But foresight and logical conclusions are much harder, not something you can achieve by just willing.
16:04:22 <kuribas> monochrom: still, reduce was already commonly used.
16:04:41 <kuribas> http://clhs.lisp.se/Body/f_reduce.htm
16:05:05 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
16:05:14 haskl joins (~haskl@user/haskl)
16:05:55 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5) (Quit: WeeChat 2.8)
16:06:15 <monochrom> Yeah, I'm saying "reduce" is just as honest and intuitive as "fold" for a lot of people.
16:08:58 <Zemyla> dminuoso: Yes. It's a composable fold.
16:10:02 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 240 seconds)
16:10:30 × son0p quits (~ff@181.136.122.143) (Remote host closed the connection)
16:10:36 Akiva joins (~Akiva@user/Akiva)
16:10:54 × krappix quits (~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Quit: Client closed)
16:11:00 <monochrom> marinate :: (b -> Maybe (a, b)) -> b -> [a] >:)
16:11:04 Vajb joins (~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813)
16:13:22 <justsomeguy> :D
16:13:41 jakalx joins (~jakalx@base.jakalx.net)
16:14:42 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
16:16:36 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
16:16:36 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
16:16:36 neurocyte0917090 joins (~neurocyte@user/neurocyte)
16:17:14 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
16:18:37 × Pickchea quits (~private@user/pickchea) (Ping timeout: 240 seconds)
16:19:53 <merijn> monochrom: Surely that'd be 'stew' or 'simmer'? :p
16:21:49 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
16:23:40 son0p joins (~ff@181.136.122.143)
16:24:53 × ubert quits (~Thunderbi@p200300ecdf1588942c242a19e1a99324.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
16:27:27 × ccntrq quits (~Thunderbi@2a01:c23:8960:6a00:997e:ae12:2988:d2c3) (Remote host closed the connection)
16:27:37 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:29:04 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
16:32:56 × son0p quits (~ff@181.136.122.143) (Read error: Connection reset by peer)
16:33:42 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
16:34:08 bahamas joins (~lucian@84.232.140.158)
16:35:18 karim joins (~karim@41.34.201.10)
16:37:38 econo joins (uid147250@user/econo)
16:38:17 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
16:39:10 __monty__ joins (~toonn@user/toonn)
16:47:57 × razetime quits (~quassel@117.254.35.226) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:49:18 benin joins (~benin@183.82.207.30)
16:49:34 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
16:54:38 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
16:56:43 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Client closed)
16:56:44 × Vajb quits (~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813) (Read error: Connection reset by peer)
16:57:24 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
16:59:27 jpds joins (~jpds@gateway/tor-sasl/jpds)
17:00:45 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:00:48 ubert joins (~Thunderbi@p200300ecdf158894f1c8f499466ba149.dip0.t-ipconnect.de)
17:00:53 boxscape joins (~boxscape@user/boxscape)
17:01:36 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 245 seconds)
17:01:44 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
17:02:02 ProfSimm joins (~ProfSimm@87.227.196.109)
17:03:42 <Zemyla> The opposite of reduce would be rehydrate, I think.
17:04:00 <geekosaur> induce?
17:04:59 <Zemyla> No, it works because a reduction is a dehydrated list.
17:06:57 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
17:07:00 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
17:07:46 nf is now known as ju
17:08:02 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
17:08:02 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
17:08:02 neurocyte0917090 joins (~neurocyte@user/neurocyte)
17:08:16 ju is now known as Guest3578
17:08:24 Guest3578 is now known as nf
17:09:21 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
17:12:05 jpds joins (~jpds@gateway/tor-sasl/jpds)
17:14:05 _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
17:20:38 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
17:20:58 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
17:21:22 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
17:21:25 alp joins (~alp@user/alp)
17:21:26 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
17:22:45 fendor_ joins (~fendor@178.115.72.153.wireless.dyn.drei.com)
17:25:09 × fendor quits (~fendor@91.141.35.69.wireless.dyn.drei.com) (Ping timeout: 256 seconds)
17:25:25 <dsal> How do I replace `Nothing` in a lens traversal?
17:26:04 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
17:26:25 Graham31415 joins (~Graham314@5.33.52.156)
17:27:42 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
17:28:36 <dsal> I guess I can `%~ Just . fromMaybe x`
17:29:35 <dsal> Which is <|> I guess
17:32:44 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
17:33:33 × javiergarea quits (~javiergar@static-60-220-27-46.ipcom.comunitel.net) (Quit: Client closed)
17:36:26 <dsal> I wrote `<|>~` -- that seems clear enough
17:37:43 vglfr joins (~vglfr@88.155.11.162)
17:39:10 kayvank joins (~user@52-119-115-185.PUBLIC.monkeybrains.net)
17:40:22 × mbuf quits (~Shakthi@136.185.72.170) (Quit: Leaving)
17:44:39 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
17:44:46 Guest|71 joins (~Guest|71@ip70-186-124-59.no.no.cox.net)
17:45:27 × Guest|71 quits (~Guest|71@ip70-186-124-59.no.no.cox.net) (Client Quit)
17:46:01 × jlamothe quits (~jlamothe@198.251.61.229) (Quit: leaving)
17:46:07 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
17:47:06 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
17:47:38 × yauhsien_ quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
17:47:38 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
17:49:55 yauhsien joins (~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
17:51:27 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
17:51:27 × vglfr quits (~vglfr@88.155.11.162) (Read error: Connection reset by peer)
17:51:46 vglfr joins (~vglfr@88.155.11.162)
17:54:32 × yauhsien quits (~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
18:03:00 × benin quits (~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
18:03:21 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Client closed)
18:04:19 jlamothe joins (~jlamothe@198.251.61.229)
18:05:30 ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
18:05:55 cosimone joins (~user@93-44-187-176.ip98.fastwebnet.it)
18:06:25 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
18:06:50 raehik joins (~raehik@78.129.150.252)
18:07:19 × vglfr quits (~vglfr@88.155.11.162) (Ping timeout: 256 seconds)
18:08:16 Graham31415 joins (~Graham314@5.33.52.156)
18:09:33 <hololeap> % :t \x m -> m <|> pure x
18:09:33 <yahb> hololeap: Alternative f => a -> f a -> f a
18:10:46 <hololeap> I guess that's called 'option' in parser combinators
18:11:00 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
18:12:37 × EvanR quits (~EvanR@user/evanr) (Quit: Leaving)
18:12:49 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
18:13:01 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
18:13:41 neurocyte0917090 joins (~neurocyte@IP-045014191158.dynamic.medianet-world.de)
18:13:41 × neurocyte0917090 quits (~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
18:13:41 neurocyte0917090 joins (~neurocyte@user/neurocyte)
18:15:36 vicfred joins (~vicfred@user/vicfred)
18:15:48 × raehik quits (~raehik@78.129.150.252) (Ping timeout: 240 seconds)
18:16:26 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
18:17:06 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 252 seconds)
18:18:10 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:18:35 <Zemyla> @pl \x m -> m <|> pure x
18:18:35 <lambdabot> flip (<|>) . pure
18:19:09 mikoto-chan joins (~mikoto-ch@213.177.151.239)
18:21:23 vysn joins (~vysn@user/vysn)
18:22:18 jakalx joins (~jakalx@base.jakalx.net)
18:22:23 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 256 seconds)
18:23:54 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
18:23:55 <monochrom> Yeah it's "option".
18:24:41 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
18:26:24 ub joins (~Thunderbi@p200300ecdf158894bc3487aad6770a01.dip0.t-ipconnect.de)
18:28:37 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
18:29:25 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
18:31:25 ProfSimm joins (~ProfSimm@87.227.196.109)
18:31:48 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
18:31:52 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Client closed)
18:33:42 vglfr joins (~vglfr@88.155.11.162)
18:34:19 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
18:36:36 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
18:41:47 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
18:41:51 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
18:41:51 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
18:41:51 wroathe joins (~wroathe@user/wroathe)
18:49:56 × justOkay quits (~justache@user/justache) (Read error: Connection reset by peer)
18:50:55 justOkay joins (~justache@user/justache)
18:51:15 Graham31415 joins (~Graham314@5.33.52.156)
18:51:35 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
18:54:29 <hololeap> hm, it seems that cabal is influenced by cabal.project in a parent directory. e.g. I'm in subdir/ and working with subdir/subdir.cabal, but it keeps looking at the top level (and putting cabal.project.local there)
18:56:04 sloorush joins (~sloorush@2401:4900:234a:ee9b:8aa3:1d87:a269:b8a8)
18:56:23 <hololeap> any way to disable this, so it's only looking at subdir/ ?
18:57:02 <maerwald[m]> Symlink
18:57:10 <hololeap> for reference, I'm working on the dhall/ subdir here: https://github.com/dhall-lang/dhall-haskell
18:57:28 <hololeap> symlink what?
18:58:05 × alp quits (~alp@user/alp) (Ping timeout: 256 seconds)
18:58:11 <maerwald[m]> hololeap: you move the subdir out and symlink it back in
18:58:41 <maerwald[m]> They the original cabal.project still sees the subdir, but when you cd to it. Cabal doesn't see the parent calab.project
18:58:58 <maerwald[m]> Because ../ doesn't resolve that way
18:59:48 <maerwald[m]> That may break your git checkout though :)
19:00:17 zincy_ joins (~zincy@2a00:23c8:970c:4801:a9ba:a14e:e332:b83f)
19:01:20 <sclv> you can just put a cabal.project in the subdir
19:01:26 <sclv> that only applies to the subdir
19:03:33 zebrag joins (~chris@user/zebrag)
19:04:13 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
19:04:58 geekosaur joins (~geekosaur@xmonad/geekosaur)
19:05:14 <hololeap> there seems to be some undocumented --ignore-project option
19:05:43 sciencentistguy joins (~sciencent@hacksoc/ordinary-member)
19:05:47 <sciencentistguy> :config
19:05:53 <sciencentistguy> whoops, sorry
19:07:09 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
19:08:32 justsomeguy joins (~justsomeg@user/justsomeguy)
19:08:56 jao joins (~jao@45.152.183.53)
19:09:05 <hololeap> it's mentioned once here: https://cabal.readthedocs.io/en/3.6/cabal-commands.html?highlight=ignore-project#cabal-v2-repl
19:09:58 <hololeap> cabal configure added "ignore-project: False" to my cabal.project.local which is how I discovered it
19:10:40 <monochrom> Hrm there is a chance --ignore-project is only for repl.
19:11:02 × mud quits (~mud@user/kadoban) (Quit: quit)
19:11:10 <monochrom> I haven't tested anything, but I looked at "cabal build --help" and "cabal repl --help".
19:12:00 <monochrom> Does it help to say --project-file=/dev/null ? :)
19:12:14 <sclv> ignore project works mainly but not always iirc
19:12:45 <hololeap> at this point I can't reproduce the behavior... I'm just going to move on for now
19:13:34 <sclv> https://github.com/haskell/cabal/issues/7965
19:14:07 <sclv> its ugly :-/
19:14:50 <sclv> by "mainly" i should have said "sporadically"
19:16:05 <hololeap> thanks, good to see someone filed a bug for this
19:21:49 bahamas joins (~lucian@84.232.140.158)
19:27:29 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 252 seconds)
19:30:07 × cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Read error: Connection reset by peer)
19:32:45 cosimone joins (~user@93-44-187-176.ip98.fastwebnet.it)
19:35:09 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
19:36:35 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:37:13 jgeerds joins (~jgeerds@55d4548e.access.ecotel.net)
19:43:05 DNH joins (~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a)
19:45:41 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 256 seconds)
19:46:29 × sloorush quits (~sloorush@2401:4900:234a:ee9b:8aa3:1d87:a269:b8a8) (Ping timeout: 256 seconds)
19:48:18 vorpuni joins (~pvorp@2001:861:3881:c690:3875:d51d:97cc:8362)
19:53:33 alp joins (~alp@user/alp)
19:59:13 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
19:59:39 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
19:59:46 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
20:00:16 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
20:01:03 romesrf joins (~romes@44.190.189.46.rev.vodafone.pt)
20:02:42 bahamas joins (~lucian@84.232.140.158)
20:03:12 <romesrf> Hi! I'm going to an upcoming small hackathon and am thinking about ideas for a project (unfortunately there's no theme)
20:03:18 <romesrf> Has anyone any?
20:05:02 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
20:05:51 × Graham31415 quits (~Graham314@5.33.52.156) (Quit: Client closed)
20:07:32 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
20:07:50 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
20:09:52 × kuribas quits (~user@ptr-25vy0i7hp9xee3gx8cn.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
20:10:40 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
20:12:34 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:15:21 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 252 seconds)
20:15:59 mud joins (~mud@user/kadoban)
20:16:44 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
20:18:47 DELL joins (~DELL@eth-east-parth2-46-193-64-159.wb.wifirst.net)
20:20:39 Pickchea joins (~private@user/pickchea)
20:20:45 × dcoutts__ quits (~duncan@host86-167-206-34.range86-167.btcentralplus.com) (Remote host closed the connection)
20:20:46 × DELL quits (~DELL@eth-east-parth2-46-193-64-159.wb.wifirst.net) (Client Quit)
20:21:03 dcoutts__ joins (~duncan@host86-167-206-34.range86-167.btcentralplus.com)
20:24:57 lawt2 is now known as lawt
20:26:16 Hemmo joins (~Hemmo@85-76-66-96-nat.elisa-mobile.fi)
20:27:41 <Hemmo> Hello! I'm having trouble finding what exactly does '\x -> ' do in the filter function!
20:27:44 <Hemmo> Function here :
20:27:45 <Hemmo> Input: filter (\x -> length x > 4) ["aaaa","bbbbbbbbbbbbb","cc"]
20:27:45 <Hemmo> Output: ["bbbbbbbbbbbbb"]
20:28:36 <Hemmo> Oh wait it takes an element of the list?
20:28:47 <Hemmo> Why does it have a \ in it though? What does it signify?
20:36:19 Guest27 joins (~Guest27@c-174-63-99-174.hsd1.ma.comcast.net)
20:36:35 <janus> Hemmo: the backslash is part of the anonymous function syntax
20:37:09 <Guest27> Recommended .gitignore for cabal v2-style projects? At a minimum seems you want to ignore dist-newstyle/build
20:39:05 <geekosaur> I'd ignore all of dist-newstyle
20:39:42 <Guest27> Sweet, thanks
20:40:07 <geekosaur> looking at my local projects, that and editor temp files are basically it
20:40:19 <janus> Guest27: if you use tasty you may wanna ignore .tasty-retun-log
20:40:46 <janus> also consider ignore *.dump-hi files
20:41:55 <geekosaur> https://github.com/xmonad/xmonad/blob/master/.gitignore fwiw
20:41:59 <Guest27> Don't use tasty but I need to adopt a testing framework soon...
20:42:00 <Guest27> What produces .dump-hi?
20:42:12 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds)
20:42:44 <Guest27> geekosaur Oh that's perfect
20:42:51 <geekosaur> ghc with -ddump-hi ? ingeneral anything with suffix .dump-* comes from ghc -d*
20:43:00 bahamas joins (~lucian@84.232.140.158)
20:43:01 <Guest27> Ah okay
20:43:24 <geekosaur> and -ddump-to-filoe but both cabal and stack turn that on
20:43:33 <geekosaur> *-ddump-to-file
20:44:51 × Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds)
20:47:19 <janus> Guest27: some of the files in the xmonad config are from before v2, i think
20:47:28 dextaa_ joins (~dextaa@user/dextaa)
20:47:41 × bahamas quits (~lucian@84.232.140.158) (Ping timeout: 256 seconds)
20:48:30 <geekosaur> yeh, I don't think dist or .xmonad-sandbox are used these days.
20:48:45 <geekosaur> (in fact I think sandbox support has been removed?)
20:48:50 <Guest27> janus it looks like a good nuclear option for if I ever switch from cabal to stack or whatnot
20:50:22 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
20:51:56 pavonia joins (~user@user/siracusa)
20:53:05 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
20:54:24 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 252 seconds)
20:58:45 yauhsien joins (~yauhsien@61-231-38-131.dynamic-ip.hinet.net)
21:00:11 × karim quits (~karim@41.34.201.10) (Ping timeout: 250 seconds)
21:01:47 pwug joins (~pwug@user/pwug)
21:02:55 Tuplanolla joins (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi)
21:03:00 × yauhsien quits (~yauhsien@61-231-38-131.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
21:06:30 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
21:07:19 × Hemmo quits (~Hemmo@85-76-66-96-nat.elisa-mobile.fi) (Remote host closed the connection)
21:10:05 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:11:26 × boxscape_ quits (~boxscape_@p4ff0b60b.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
21:11:43 geekosaur wonders why threadDelay takes an Int instead of a Micro. should work the same way but the type at least would document that it's microseconds. (Num instance should cover existing usage?)
21:12:17 <geekosaur> well, hm, not for computed delays I guess. which means bikeshedding. :(
21:12:26 × fendor_ quits (~fendor@178.115.72.153.wireless.dyn.drei.com) (Remote host closed the connection)
21:12:45 fendor_ joins (~fendor@178.115.72.153.wireless.dyn.drei.com)
21:13:21 × cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
21:14:07 <tomsmeding> breaking changes are a sensitive topic these days
21:17:21 <janus> geekosaur: Micro, where is that defined? doesn't seem easy to google
21:17:25 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds)
21:17:25 <janus> @src Micro
21:17:25 <lambdabot> Source not found. And you call yourself a Rocket Scientist!
21:17:42 <tomsmeding> https://hackage.haskell.org/package/base-4.16.0.0/docs/Data-Fixed.html#t:Micro
21:18:40 <janus> ah, so it is a breaking change. i thought it would be a synonym for Int somehow
21:19:10 <janus> if the API is broken may as well ensure it can't be negative ;)
21:21:24 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
21:22:12 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
21:22:14 <Guest27> Without negative arguments how will my time-traveling concurrency work???
21:23:30 <janus> % :m +Control.Concurrent
21:23:30 <yahb> janus:
21:23:36 <janus> % threadDelay (-1)
21:23:36 <yahb> janus:
21:24:00 janus looks around, expecting to see a glitch in the matrix
21:24:32 <Guest27> You may not have felt it but everything shifted back by exactly one microsecond ;)
21:25:32 <tomsmeding> janus: it eventually calls registerTimeout here, where the delay is the second argument https://hackage.haskell.org/package/base-4.15.0.0/src/GHC/Event/TimerManager.hs
21:25:51 <geekosaur> right, my point was the Num instance would make literals work as they do now, but computed delays would lose because it'snot an Int any more
21:25:59 × _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
21:26:13 <geekosaur> then again, iirc Fixed is backed by Integer so it also fixes a bug/wart
21:26:25 <geekosaur> sadly that one has come upbefore and been rejected
21:26:38 <monochrom> I wonder if time travel can extend Curry-Howard to cover classical logic. >:)
21:27:04 <geekosaur> yep, backed by Integer
21:27:13 <tomsmeding> also fun: "If humanity still exists in 2500 CE we will ned to be a bit more careful here."
21:27:14 jaror[m] joins (~jaror@2001:470:69fc:105::265)
21:28:05 gehmehgeh joins (~user@user/gehmehgeh)
21:30:51 <monochrom> I think currently it is only known that time-like loops imply P=NP. Merely. :)
21:32:08 ProfSimm joins (~ProfSimm@87.227.196.109)
21:32:50 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
21:35:11 Guest49 joins (~Guest49@2600:1700:2050:1040:5d4c:e061:4689:d06a)
21:37:16 nsyd joins (~psy@104-62-224-96.lightspeed.chrlnc.sbcglobal.net)
21:37:50 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
21:38:39 × Guest49 quits (~Guest49@2600:1700:2050:1040:5d4c:e061:4689:d06a) (Quit: Client closed)
21:39:21 charukiewicz[m] joins (~charukiew@2001:470:69fc:105::ded4)
21:42:55 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds)
21:44:29 × Batzy quits (~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:44:37 × ub quits (~Thunderbi@p200300ecdf158894bc3487aad6770a01.dip0.t-ipconnect.de) (Quit: ub)
21:44:50 alt-romes joins (~romes@44.190.189.46.rev.vodafone.pt)
21:45:16 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
21:45:24 Guest|85 joins (~Guest|85@pool-108-41-198-29.nycmny.fios.verizon.net)
21:45:34 Batzy joins (~quassel@user/batzy)
21:46:39 zmt00 joins (~zmt00@user/zmt00)
21:46:54 <dolio> I don't think so. The 'time travel' interpretation of excluded middle requires different things to happen the second time. So it's not a consistent loop.
21:47:29 <Guest|85> Just have a quick question, when I try to run the command found on https://www.haskell.org/ghcup/ in powershell to try to get Haskell install on my PC, my powershell window just close itself and ghcup is not installed. How should I install it correctly?
21:47:42 × romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 260 seconds)
21:48:07 charukiewicz joins (~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560)
21:48:07 <maerwald> Guest|85: https://www.youtube.com/watch?v=bB4fmQiUYPw
21:48:27 <Guest|85> thx I will check that
21:48:57 <maerwald> make sure to not run in an admin session
21:49:10 leungbk joins (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
21:49:27 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 256 seconds)
21:49:35 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
21:49:53 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
21:50:01 <yushyin> i see the video is already paying off ;)
21:50:37 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
21:51:16 geekosaur joins (~geekosaur@xmonad/geekosaur)
21:51:23 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
21:56:21 alp joins (~alp@user/alp)
21:56:35 × DNH quits (~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:01:48 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
22:03:00 × xsarnik quits (xsarnik@lounge.fi.muni.cz) (Quit: Ping timeout (120 seconds))
22:03:17 DNH joins (~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a)
22:03:52 xsarnik joins (xbraun1@lounge.fi.muni.cz)
22:04:02 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
22:05:55 <Guest|85> Turns out what's blocking me from running the script is because I forgot to turn off my antivirus program
22:06:08 <Guest|85> X)
22:06:16 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
22:06:37 vysn joins (~vysn@user/vysn)
22:07:21 <monochrom> Personally I just let Windows Defender stay on and say no to any "stronger" ones that are just CPU hogs and disk hogs for no extra value.
22:08:20 <Guest|85> Yeah that's probably the best
22:08:32 <Guest|85> Thx for the help
22:08:36 × Guest|85 quits (~Guest|85@pool-108-41-198-29.nycmny.fios.verizon.net) (Quit: Connection closed)
22:09:12 × hgolden quits (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Ping timeout: 252 seconds)
22:10:42 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:11:18 boxscape_ joins (~boxscape_@p4ff0b60b.dip0.t-ipconnect.de)
22:11:35 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
22:12:27 <boxscape_> I've made an alias for `\f g -> fmap f . g` a few times, but I just now realized that Control.Arrow.^<< exists
22:12:48 <boxscape_> tbf hoogle doesn't find it when you enter the specialized type of that function
22:13:37 <boxscape_> oh wait I think you'd have to wrap it in Kleisli for that...
22:14:36 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:15:03 jpds joins (~jpds@gateway/tor-sasl/jpds)
22:15:31 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
22:15:46 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:19:55 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:19:55 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
22:20:07 sugar joins (~sugar@bras-base-hmtnon1497w-grc-46-67-70-68-108.dsl.bell.ca)
22:20:19 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
22:20:37 × fendor_ quits (~fendor@178.115.72.153.wireless.dyn.drei.com) (Remote host closed the connection)
22:21:51 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
22:22:05 × charukiewicz quits (~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560) (Remote host closed the connection)
22:23:17 charukiewicz joins (~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560)
22:24:03 acidjnk joins (~acidjnk@p200300d0c7049f30dd97d7382d55cf65.dip0.t-ipconnect.de)
22:25:53 cosimone joins (~user@93-44-187-176.ip98.fastwebnet.it)
22:26:29 × jgeerds quits (~jgeerds@55d4548e.access.ecotel.net) (Remote host closed the connection)
22:29:40 <abastro[m]> :t fmap f . g
22:29:40 <lambdabot> (Functor f, Show a1, Show a2, FromExpr b, FromExpr (f a1)) => a2 -> f b
22:30:04 <monochrom> You may have better luck with \f g -> fmap f . g
22:30:14 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4.1)
22:30:15 <abastro[m]> Oh wait
22:30:16 <abastro[m]> My bad
22:30:30 <abastro[m]> :t \f g -> fmap f . g
22:30:31 <lambdabot> Functor f => (a1 -> b) -> (a2 -> f a1) -> a2 -> f b
22:31:05 <geekosaur> you got some simple_reflect mixed upin there, yeh
22:31:40 <abastro[m]> Oh. That type is straightforward
22:32:13 <abastro[m]> Guess I just personally have never needed to shorten it
22:34:20 × michalz quits (~michalz@185.246.204.62) (Remote host closed the connection)
22:34:50 <janus> is there a better alternative to generic-arbitrary? it seems abandoned
22:34:59 <janus> @package generic-arbitrary
22:34:59 <lambdabot> https://hackage.haskell.org/package/generic-arbitrary
22:38:50 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:43:03 × zincy_ quits (~zincy@2a00:23c8:970c:4801:a9ba:a14e:e332:b83f) (Remote host closed the connection)
22:43:47 <abastro[m]> Looks new enough to me except for lack of support for GHC 9.0+
22:44:30 yauhsien joins (~yauhsien@61-231-38-131.dynamic-ip.hinet.net)
22:44:58 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:46:55 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:46:59 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:47:34 × Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
22:48:37 × yauhsien quits (~yauhsien@61-231-38-131.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
22:48:42 <[itchyjunk]> hmm
22:49:16 <[itchyjunk]> I have a function Int -> [Int] -> (Int,Int)
22:49:52 <[itchyjunk]> For that first input, i would like to apply different ints over time.. idk if map is the right thing to use here
22:50:30 <abastro[m]> Wdym different inputs over time?
22:50:40 <[itchyjunk]> I can map this function to a list of ints but i'd end up with partially applied functions to which i cna somehow apply ..
22:50:47 <abastro[m]> You mean it is supplied by e.g. timer
22:50:48 <[itchyjunk]> well i have fun x xs
22:50:55 <[itchyjunk]> i want x to range over 0 through 9
22:51:04 <[itchyjunk]> so fun 0 xs, fun 1 xs ...
22:51:15 × tiferrei quits (~tiferrei@user/tiferrei) (Ping timeout: 240 seconds)
22:51:17 <[itchyjunk]> no no, not timer. time was the wrong choice of words
22:51:38 <abastro[m]> I guess the way I would do is
22:51:45 <[itchyjunk]> I just need to use this function 10 times. where the first argument changes from 0 through 9
22:51:57 lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
22:52:00 <[itchyjunk]> and the second argument is the same list
22:52:01 tiferrei joins (~tiferrei@user/tiferrei)
22:52:02 <monochrom> map (\i -> fun i xs) [0, 1, 2, ...]
22:52:14 <abastro[m]> `map (flip fun xs) [1..9]` assuming you want list
22:52:27 <monochrom> [fun i xs | i <- [0, 1, 2, ...]]
22:52:41 <abastro[m]> Or `\i -> fun i xs` instead of flip..
22:52:45 son0p joins (~ff@181.136.122.143)
22:53:15 <[itchyjunk]> oh! the list comprehension one made sense
22:53:23 <[itchyjunk]> hmm not sure about that lambda function one
22:53:32 <abastro[m]> `do i <- [1..9]; pure (fun i xs)`
22:53:37 × leungbk quits (~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
22:53:56 <abastro[m]> The lambda one just maps the function over the list
22:54:18 <abastro[m]> map f [x1, x2, ...] = [f x1, f x2, ...]
22:54:26 <monochrom> [fun 0 xs, fun 1 xs, fun 2 xs] = [(\i -> fun i xs) 0, (\i -> fun i xs) 1, (\i -> fun i xs) 2] = map (\i -> fun i xs) [0,1,2].
22:54:33 <monochrom> This is just vanilla refactoring.
22:54:47 <abastro[m]> > map (+2) [0, 2, 3, 1]
22:54:49 <lambdabot> [2,4,5,3]
22:55:38 <abastro[m]> > map (\i -> i + 2) [0, 2, 3, 1]
22:55:39 <lambdabot> [2,4,5,3]
22:55:40 <monochrom> This is why I disagree with "don't need math for haskell". You need math skills, such as doing algebraic factoring.
22:55:56 <monochrom> You don't need the quadratic formula or volume of sphere, sure.
22:56:00 <abastro[m]> Ignore `(+2)`
22:56:08 <[itchyjunk]> ahh
22:57:25 <abastro[m]> monochrom: it would make the claim "Too mathy for me" valid tho
22:57:58 <boxscape_> monochrom to be fair it's possible to pick those up while learning Haskell, though I'm sure coming into it already having that skill set is helpful
22:58:12 <monochrom> It is the whole point of FP. To just do algebra and you can understand my code.
22:58:19 × alp quits (~alp@user/alp) (Ping timeout: 268 seconds)
22:58:27 <monochrom> As opposed to "imagine how to execute".
22:58:53 <abastro[m]> I think dealing with equals sign is not much of math ppl imagine
22:59:24 <abastro[m]> It is not like calculating integration or something
22:59:42 machinedgod joins (~machinedg@24.105.81.50)
23:00:28 <abastro[m]> Hm I guess I'd like symbolic calculator for haskell
23:00:38 <abastro[m]> Tho idk what would be normal form
23:00:49 <monochrom> My impression is that people who self-identify as "bad at math" already struggle with the full logical conclusions of equality. Though, I have no data.
23:01:00 <[itchyjunk]> So close to being able to solve this : https://i.imgur.com/1K4VUux.png
23:01:07 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:01:08 <[itchyjunk]> I can count how often each digit appears now.
23:01:08 <monochrom> The following next hurdle though, I saw it in students first-hand.
23:01:14 <[itchyjunk]> https://bpa.st/NA6A
23:01:35 <monochrom> Define f(x)=x+3, g(x)=x*4. People struggle with f(g(x)).
23:02:01 <abastro[m]> Yea it is hard
23:02:05 <monochrom> Here is why. Their mental model is like BASIC. Have a global variable x, same x for both f and g.
23:02:19 <abastro[m]> Granted, I wonder how ppl would even program without the ability
23:02:23 <abastro[m]> Oh wait
23:02:32 <abastro[m]> Same global variable,
23:02:43 <monochrom> To find f(1), set global x to 1. To find g(2), set global x to 2. Now f(g(x)) is a paradox.
23:02:58 <abastro[m]> Think that could be fixed by using different symbol.. maybe not? :<
23:03:19 <abastro[m]> So ppl's minds do operate in imperative way :<
23:03:22 <boxscape_> I kind of wish early mathematicians had written (x)f instead
23:04:24 <dolio> Variables are often poorly explained in mathematics, so it's not entirely the students' fault.
23:04:38 <abastro[m]> Then we won't have haskell notation
23:04:56 <abastro[m]> Of having `f x y z` with currying
23:04:58 × vorpuni quits (~pvorp@2001:861:3881:c690:3875:d51d:97cc:8362) (Remote host closed the connection)
23:05:22 <monochrom> You can have "z y x f" with currying :)
23:05:39 <abastro[m]> Ewww
23:05:58 <boxscape_> kind of a RPN vibe
23:06:16 <abastro[m]> (((z y) x) f)
23:06:26 <abastro[m]> :^)
23:06:27 <geekosaur> forth
23:06:34 vorpuni joins (~pvorp@2001:861:3881:c690:c18a:999a:aef5:52af)
23:07:38 leungbk joins (~user@2603-8000-1201-2dd2-1d5f-5d86-90b5-efe4.res6.spectrum.com)
23:07:48 <abastro[m]> Perhaps haskell is too hard for ppl..
23:08:09 <geekosaur> <cynic> thinking is too hard for people
23:08:12 <abastro[m]> Tho I wonder why ppl do not find programming hard
23:08:46 <abastro[m]> Indeed, thinking is too hard for ppl. You can see it everywhere nowadays :facepalm:
23:08:55 <monochrom> You may have a selection bias. People who survive 1st-year CS don't find programming hard.
23:09:00 <dolio> Because the problem isn't actually that Haskell is too hard for people.
23:09:07 <[itchyjunk]> I find programming hard.
23:09:08 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
23:10:08 <monochrom> I think I saw first-hand when a friend taught a "computer stuff for non-CS-majors" course and taught a little bit of python scripting. The students struggled with even for-loops.
23:10:20 <monochrom> And to think it was python, not even haskell.
23:10:43 <boxscape_> can't struggle with for loops if you language doesn't have for loops
23:10:46 <hpc> i mean... i struggle with loops in python
23:10:50 jakalx joins (~jakalx@base.jakalx.net)
23:10:53 <alt-romes> boxscape_: lol
23:10:55 <monochrom> Haha OK.
23:11:07 <monochrom> But they struggled with almost everything in python.
23:11:24 <monochrom> Supposedly the most newbie-friendly language.
23:11:29 <alt-romes> boxscape_: for [1..n] (do stuff)
23:11:36 <boxscape_> cheating
23:11:41 <alt-romes> hahaha ;)
23:11:41 <monochrom> Probably they struggled with merely variables, too.
23:12:20 hpc . o O ( fizzbuzz is a legitimate job interview filtering tool )
23:12:23 <alt-romes> monochrom: I've seen it too in those sort of non-CS-majors
23:12:26 × leungbk quits (~user@2603-8000-1201-2dd2-1d5f-5d86-90b5-efe4.res6.spectrum.com) (Ping timeout: 252 seconds)
23:12:36 <abastro[m]> Oh I see, perhaps programming is hard but ppl do not realize
23:12:43 <alt-romes> fizzbuzz = fizzbuzz "See, it compiles"
23:13:00 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
23:13:26 × alt-romes quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4)
23:13:33 <abastro[m]> And just think after learning imperative programming, that they know everything they need
23:13:40 <abastro[m]> And refuse to learn further
23:13:44 <hpc> there's a mindset of logic and precision that's required for programming (and a lot of other sciencey stuff), that's likely what's hard
23:13:50 <abastro[m]> Ya that is perhaps what is happening
23:14:23 <abastro[m]> And ppl somehow say python is easier to learn
23:14:25 <hpc> i want to call it "rationality" but that's a much broader and deeper term
23:14:32 <abastro[m]> ..like, it just has lots of resources
23:14:43 <hpc> and no matter what language you use, even if it's excel formulas
23:14:48 <hpc> you need at least a little bit of that mindset
23:15:27 <boxscape_> helps even if you use natural language
23:16:06 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:16:06 <hpc> yeah
23:16:16 <hpc> almost to the point that scientific literacy is the new book-literacy
23:16:17 <abastro[m]> Doesn't help with daily job tho
23:16:26 <hpc> (complete with percentage of population that's skilled at it)
23:16:35 <abastro[m]> Book literacy?
23:16:36 <abastro[m]> Oh
23:16:38 <abastro[m]> I see.
23:16:38 <boxscape_> hm yeah
23:17:02 <abastro[m]> And we see ppl revolting against authority of scientific literacy
23:17:23 <hpc> there's a lot of logical steps to follow in order to go from "i need to do my taxes" to "i should install an adblocker and google carefully so i don't empty my bank account"
23:17:28 <abastro[m]> Then there is my theory of flat earthers origin, one of the revolts
23:17:52 <hpc> much like the logical steps from "i am hungry" to "i should read this year's almanac so i don't deplete the nitrogen in my fields"
23:18:47 merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
23:19:12 <abastro[m]> I guess the skill is not much help in real life tho, seeing those who lack the skill thrive in the society
23:19:24 <hpc> (fun fact - textiles specialists were the first commercial programmers, and farmers are behind all the recent right-to-repair bills in the US)
23:19:53 <geekosaur> people thrived when literacy was rare, too
23:19:57 <hpc> eh, i wouldn't say they thrived
23:20:33 <abastro[m]> I mean, those who lack the skill thrive "now"
23:21:02 <hpc> when i hear "thrive" i think like the nobility who spend their lives learning horse riding and astronomy for fun
23:21:07 <hpc> or people who fly to orbit for fun
23:21:15 <abastro[m]> Somehow my brain connect the dot with "University is dying in current society"
23:21:27 <hpc> not people who are negative net worth most of their lives and retire at the age of 70
23:21:40 <abastro[m]> Yea, born as nobility greatly help there
23:22:09 <abastro[m]> Retire at age 70 sounds like success tbh
23:22:42 <abastro[m]> I heard ppl at those ages crave having jobs
23:23:05 <hpc> ... this is very off topic lol
23:23:24 <abastro[m]> Oh wait
23:23:36 <abastro[m]> This chat is for haskell right
23:23:39 <abastro[m]> Apparently I forgot
23:23:44 <hpc> in theory, yeah :D
23:24:04 leungbk joins (~user@2603-8000-1201-2dd2-1d5f-5d86-90b5-efe4.res6.spectrum.com)
23:24:05 <abastro[m]> (Btw is there haskell-offtopic bridged over matrix)
23:24:06 × vysn quits (~vysn@user/vysn) (Ping timeout: 245 seconds)
23:24:17 <hpc> all of libera is bridged, i think?
23:24:29 <geekosaur> I see matrix folk there, don'tknow what it's called matrix side
23:24:48 <abastro[m]> I see, let me try
23:25:54 <abastro[m]> Eh idk how
23:27:31 <abastro[m]> Hm, does anyone got a symbolic calculator which calculates haskell terms into sensible normal forms?
23:27:36 <boxscape_> abastro[m] /join #haskell-offtopic:libera.chat
23:27:51 × cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
23:28:02 <abastro[m]> Thank you!!
23:28:07 <boxscape_> np
23:28:57 × leungbk quits (~user@2603-8000-1201-2dd2-1d5f-5d86-90b5-efe4.res6.spectrum.com) (Ping timeout: 252 seconds)
23:30:07 <abastro[m]> As ppl p much live with calculator nowadays, I think a symbolic calculator for haskell would greatly help.
23:34:17 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
23:34:25 <Guest27> Hmmm... sounds like a fun project
23:34:25 <Guest27> Perhaps peek inside GHC's frontend
23:35:10 <geekosaur> not sure ghc would helpmuch, ghc'sidea of normal form is core
23:35:16 <geekosaur> maybe hugs?
23:35:17 × lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
23:39:15 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
23:39:53 × Benzi-Junior quits (~BenziJuni@dsl-149-64-179.hive.is) (Quit: ZNC 1.8.2 - https://znc.in)
23:39:58 leungbk joins (~user@2603-8000-1201-2dd2-1d5f-5d86-90b5-efe4.res6.spectrum.com)
23:44:24 cosimone joins (~user@93-44-187-176.ip98.fastwebnet.it)
23:46:38 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
23:51:51 × xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 256 seconds)
23:53:09 × merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
23:53:16 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
23:53:48 × euandreh quits (~euandreh@2804:14c:33:9fe5:156d:4cd3:81cf:f50c) (Ping timeout: 240 seconds)
23:55:51 euandreh joins (~euandreh@2804:14c:33:9fe5:2b3e:70f8:165f:be99)
23:55:54 × cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
23:56:16 nicbk joins (~nicbk@user/nicbk)
23:56:52 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
23:58:12 × sugar quits (~sugar@bras-base-hmtnon1497w-grc-46-67-70-68-108.dsl.bell.ca) (Quit: Client closed)
23:58:56 <Axman6> > cos a ^ 2 + sin a ^ 2 :: Expr
23:58:57 <lambdabot> cos a * cos a + sin a * sin a
23:59:11 × acidjnk quits (~acidjnk@p200300d0c7049f30dd97d7382d55cf65.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
23:59:13 × sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 256 seconds)
23:59:29 <abastro[m]> Ohh
23:59:59 <geekosaur> @hackage simple-reflect
23:59:59 <lambdabot> https://hackage.haskell.org/package/simple-reflect
23:59:59 <abastro[m]> > foldMap First [a, b, c] :: Expr

All times are in UTC on 2022-03-22.