Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,801,901 events total
2025-12-04 15:56:12 PaulMartensen joins (15a119e437@2001:bc8:1210:2cd8::3bc)
2025-12-04 15:56:58 Digit joins (~user@user/digit)
2025-12-04 15:58:58 × lambda_gibbon quits (~lambda_gi@2603:7080:ee00:37d8:313d:1898:c3f8:5287) (Ping timeout: 246 seconds)
2025-12-04 16:00:12 × chele quits (~chele@user/chele) (Remote host closed the connection)
2025-12-04 16:02:27 mikess joins (~sam@user/mikess)
2025-12-04 16:03:51 × spew quits (~spew@user/spew) (Quit: WeeChat 4.7.2)
2025-12-04 16:05:03 tromp joins (~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e)
2025-12-04 16:08:44 __monty_1 joins (~toonn@user/toonn)
2025-12-04 16:10:21 × __monty__ quits (~toonn@user/toonn) (Ping timeout: 252 seconds)
2025-12-04 16:10:40 × trickard_ quits (~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-04 16:10:54 trickard_ joins (~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-04 16:12:02 <lucabtz> tomsmeding in defense of the inclusive upper bound in haskell [x..y] includes y
2025-12-04 16:12:15 <lucabtz> anyhow i dropped the idea for now as it was taking me too long
2025-12-04 16:12:29 <tomsmeding> yeah and this is why I always have to [0 .. n-1] and it's annoying :p
2025-12-04 16:12:45 <tomsmeding> Rust has 0 ..< n syntax
2025-12-04 16:13:40 <lucabtz> yeah i agree it is annoying
2025-12-04 16:13:49 <lucabtz> i got reminded just now so i sent that
2025-12-04 16:20:52 × lucabtz quits (~lucabtz@user/lucabtz) (Remote host closed the connection)
2025-12-04 16:24:05 × infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 245 seconds)
2025-12-04 16:32:06 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-12-04 16:32:38 humasect joins (~humasect@dyn-192-249-132-90.nexicom.net)
2025-12-04 16:32:58 <EvanR> clearly we need special syntax [0 .. n)
2025-12-04 16:33:03 <EvanR> just kidding
2025-12-04 16:33:38 <EvanR> I actually hate the implicitly not including the right number
2025-12-04 16:33:46 <EvanR> in the case of sequence of integers
2025-12-04 16:34:06 <EvanR> this is where C syntax wins, since it's not implicit
2025-12-04 16:34:06 CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db)
2025-12-04 16:35:49 lambda_gibbon joins (~lambda_gi@2603:7080:ee00:37d8:313d:1898:c3f8:5287)
2025-12-04 16:36:09 <tomsmeding> EvanR: what about [0 ..< n]?
2025-12-04 16:36:22 <tomsmeding> (I'm not actually suggesting Haskell get this, we have enough special syntax as is)
2025-12-04 16:37:00 × humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 244 seconds)
2025-12-04 16:38:02 <EvanR> it's kind of lucky / good that [0 .. n-1] even works without more parentheses or something
2025-12-04 16:38:12 <EvanR> so you can just write that
2025-12-04 16:38:32 <EvanR> tell the next person who complains that IS the special syntax for that xD
2025-12-04 16:40:04 × lambda_gibbon quits (~lambda_gi@2603:7080:ee00:37d8:313d:1898:c3f8:5287) (Ping timeout: 260 seconds)
2025-12-04 16:42:37 × sindu quits (~sindu@2.148.32.207.tmi.telenormobil.no) (Ping timeout: 264 seconds)
2025-12-04 16:44:36 infinity0 joins (~infinity0@pwned.gg)
2025-12-04 16:57:11 euphores joins (~SASL_euph@user/euphores)
2025-12-04 16:58:18 × euphores quits (~SASL_euph@user/euphores) (Client Quit)
2025-12-04 16:59:35 trickard_ is now known as trickard
2025-12-04 17:07:38 AlexZenon_2 joins (~alzenon@85.174.183.177)
2025-12-04 17:07:50 × AlexZenon quits (~alzenon@85.174.183.177) (Ping timeout: 245 seconds)
2025-12-04 17:09:57 euphores joins (~SASL_euph@user/euphores)
2025-12-04 17:10:48 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
2025-12-04 17:11:28 gmg joins (~user@user/gehmehgeh)
2025-12-04 17:12:01 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 264 seconds)
2025-12-04 17:14:21 gehmehgeh joins (~user@user/gehmehgeh)
2025-12-04 17:14:36 × gmg quits (~user@user/gehmehgeh) (Remote host closed the connection)
2025-12-04 17:14:42 × X-Scale quits (~ARM@50.65.114.89.rev.vodafone.pt) (Quit: HydraIRC -> http://www.hydrairc.com <- \o/)
2025-12-04 17:22:35 wickedjargon joins (~user@207.194.126.4)
2025-12-04 17:25:11 marlino joins (~marlino@96-8-193-101.block0.gvtc.com)
2025-12-04 17:26:01 machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net)
2025-12-04 17:26:44 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Ping timeout: 260 seconds)
2025-12-04 17:34:00 <__monty_1> I find myself doing `fold . unfoldr` is there a combinator I'm missing that does this? My intuition from foldr->fold suggests unfold but none of those expects a Monoid constraint. Corecursive from recursion-schemes seems similar to Monoid maybe. So then it would be `hylo`?
2025-12-04 17:34:05 __monty_1 is now known as __monty__
2025-12-04 17:35:47 divlamir_ joins (~divlamir@user/divlamir)
2025-12-04 17:38:55 × divlamir quits (~divlamir@user/divlamir) (Ping timeout: 240 seconds)
2025-12-04 17:38:56 divlamir_ is now known as divlamir
2025-12-04 17:46:49 × Square2 quits (~Square4@user/square) (Ping timeout: 264 seconds)
2025-12-04 17:47:53 Googulator joins (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu)
2025-12-04 17:48:07 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
2025-12-04 18:00:17 target_i joins (~target_i@user/target-i/x-6023099)
2025-12-04 18:03:13 sindu joins (~sindu@2.148.32.207.tmi.telenormobil.no)
2025-12-04 18:08:01 lambda_gibbon joins (~lambda_gi@208.83.175.39)
2025-12-04 18:08:18 × wickedjargon quits (~user@207.194.126.4) (Remote host closed the connection)
2025-12-04 18:09:25 ft joins (~ft@p508db844.dip0.t-ipconnect.de)
2025-12-04 18:18:52 Square2 joins (~Square4@user/square)
2025-12-04 18:21:07 <__monty__> Hmm, `hylo` still requires passing in `fold` and `unfoldr (...)` I guess. It's also a lot slower than just `fold . unfoldr (...)` in my case for some reason.
2025-12-04 18:22:39 deptype joins (~deptype@2406:b400:3a:9d2f:cc6c:ad35:cfc6:21bb)
2025-12-04 18:30:58 <int-e> tomsmeding: Rust has the distinction but uses .. (exclusive) and ..= (inclusive). I know a languaage (LPC) that uses ..< but there ranges are inclusive and the < means "index from the end of the array". :-P
2025-12-04 18:31:49 haritz joins (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
2025-12-04 18:31:49 × haritz quits (~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
2025-12-04 18:31:49 haritz joins (~hrtz@user/haritz)
2025-12-04 18:33:28 <haskellbridge> <loonycyborg> Haskell's notation is on the simpler side actually. Even compared to C I'd say.
2025-12-04 18:35:34 × annamalai quits (~annamalai@157.32.218.49) (Ping timeout: 260 seconds)
2025-12-04 18:35:55 annamalai joins (~annamalai@117.246.122.240)
2025-12-04 18:37:13 × euphores quits (~SASL_euph@user/euphores) (Ping timeout: 264 seconds)
2025-12-04 18:38:43 <haskellbridge> <loonycyborg> In particular the "data" declaration, it can both replace C enum and C struct while being simpler conceptually.
2025-12-04 18:39:06 <haskellbridge> <loonycyborg> unless you're using record syntax, then they're mostly same :P
2025-12-04 18:39:41 × tromp quits (~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-12-04 18:41:12 <haskellbridge> <loonycyborg> as in C
2025-12-04 18:41:39 <mauke> upto n = [0 .. n-1]
2025-12-04 18:43:54 <monochrom> [0 .. n-1] is why, for example, length :: ... -> Int instead of Word
2025-12-04 18:45:51 Googulator15 joins (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu)
2025-12-04 18:45:56 <monochrom> If you take the position that length should have an unsigned type, then you must logically take the position that we need some kind of [0..n)
2025-12-04 18:45:56 × Googulator quits (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed)
2025-12-04 18:46:10 <mauke> why?
2025-12-04 18:46:45 <monochrom> Because [0 .. (n :: Int) - 1] and [0 .. (n :: Integer) - 1] are foot guns.
2025-12-04 18:47:07 fp joins (~Thunderbi@89-27-10-140.bb.dnainternet.fi)
2025-12-04 18:47:07 <monochrom> Err, [0 .. (n :: Word) - 1] and [0 .. (n :: Natural) - 1] are foot guns.
2025-12-04 18:47:32 <int-e> monochrom: what is this "Word" you're talking about? https://www.haskell.org/onlinereport/basic.html#sect6.4
2025-12-04 18:47:38 <haskellbridge> <Zemyla> filter (/= n) [0..n]
2025-12-04 18:47:52 <monochrom> Word is in Data.Word
2025-12-04 18:48:06 <int-e> monochrom: I know, and you missed the point :-P
2025-12-04 18:48:34 <monochrom> I don't get the point.
2025-12-04 18:48:34 <int-e> I just don't think your explanation why `length` doesn't return Word is supported by history.
2025-12-04 18:49:37 <monochrom> Oh, I revise history all the time. >:)
2025-12-04 18:50:21 <mauke> "upto" is the kind of [0..n)
2025-12-04 18:51:29 <mauke> maybe its implementation needs to be revised: upto n = takeWhile (< n) [0 ..]
2025-12-04 18:51:41 <Square2> first/second from Bifunctor is great for tuples. I ended up with a tuple-3 and tried to find something similar but the only thing I foudn was https://hackage.haskell.org/package/n-ary-functor-1.0 which felt a bit clumsy

All times are in UTC.