Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,802,629 events total
2025-11-14 16:03:37 <kuribas> [exa]: I don't even see why I would want that...
2025-11-14 16:03:59 <comerijn> Sometimes you gotta deal with things you don't want :p
2025-11-14 16:04:02 <kuribas> I'd try to better separate pure from effectul code.
2025-11-14 16:04:06 <comerijn> Because the alternative is worse
2025-11-14 16:04:20 <comerijn> kuribas: I mean, that's nice and may work for you, but that doesn't mean it works for everything
2025-11-14 16:04:42 <kuribas> comerijn: sure, maybe I haven't gotten a usecase where I would need it.
2025-11-14 16:06:49 <kuribas> The only part where it sucks is in logging.
2025-11-14 16:07:08 <kuribas> Because pure functions become IO due to logging.
2025-11-14 16:09:41 L29Ah joins (~L29Ah@wikipedia/L29Ah)
2025-11-14 16:13:30 <lucabtz> [exa] i dont know a lot about algebraic effects but i dont see the point like kuribas
2025-11-14 16:18:01 × Googulator quits (~Googulato@team.broadbit.hu) (Quit: Client closed)
2025-11-14 16:18:18 Googulator joins (~Googulato@team.broadbit.hu)
2025-11-14 16:19:06 <dolio> I think it's more like there are many small 'points.'
2025-11-14 16:20:48 <dolio> Like, Either is a bad way to implement exceptions, and assuming you use continuations to support your algebraic effects, the corresponding algebraic effect is automatically better, I think.
2025-11-14 16:24:49 × DetourNetworkUK quits (~DetourNet@user/DetourNetworkUK) (Read error: Connection reset by peer)
2025-11-14 16:25:06 DetourNe- joins (DetourNetw@user/DetourNetworkUK)
2025-11-14 16:25:49 × spew quits (~spew@user/spew) (Quit: WeeChat 4.6.3)
2025-11-14 16:26:23 <dolio> And then having that baked in can influence the large scale design of things. You can do something better than Either in Haskell, but how many things are you going to have to wrap from returning Either?
2025-11-14 16:26:43 <dolio> What if they could be designed the other way to begin with?
2025-11-14 16:27:22 DetourNe- is now known as DetourNetworkUK
2025-11-14 16:28:02 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2025-11-14 16:28:36 <kuribas> I just use IO exceptions
2025-11-14 16:28:51 <kuribas> For exceptional things. Either for expected things (parser error, etc...).
2025-11-14 16:29:08 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2025-11-14 16:29:19 <comerijn> I'd rather have checked IO exceptions, though
2025-11-14 16:29:22 Lord_of_Life_ is now known as Lord_of_Life
2025-11-14 16:29:50 <dolio> 'Just dump everything in IO' doesn't sound like a better answer.
2025-11-14 16:30:23 × lucabtz quits (~lucabtz@user/lucabtz) (Remote host closed the connection)
2025-11-14 16:30:31 <kuribas> RIO is just fine for most of my applications.
2025-11-14 16:30:41 Googulator44 joins (~Googulato@team.broadbit.hu)
2025-11-14 16:30:46 Inline joins (~inlinE@2001-4dd7-ae97-0-4674-ae6d-2607-c022.ipv6dyn.netcologne.de)
2025-11-14 16:30:49 <kuribas> Still much better than a mess of global state in other languages.
2025-11-14 16:30:52 × DetourNetworkUK quits (DetourNetw@user/DetourNetworkUK) (Read error: Connection reset by peer)
2025-11-14 16:31:11 <dolio> I mean, that is how you get well performing exceptions in GHC, but what if you could have catchable exceptions that performed that well, but were sound to use outside of IO?
2025-11-14 16:31:40 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-11-14 16:33:59 × Googulator quits (~Googulato@team.broadbit.hu) (Ping timeout: 250 seconds)
2025-11-14 16:34:14 DetourNetworkUK joins (~DetourNet@user/DetourNetworkUK)
2025-11-14 16:38:42 <haskellbridge> <loonycyborg> They're in IO only because the order they actually happen in at runtime is undefined.
2025-11-14 16:38:59 Anarchos joins (~Anarchos@91-161-254-16.subs.proxad.net)
2025-11-14 16:39:26 <haskellbridge> <loonycyborg> I think it's possible to have pure exceptions too but then you'd have to get whole list of exceptions that happened, not random one of them
2025-11-14 16:39:48 <haskellbridge> <loonycyborg> and then items in list can be in different order
2025-11-14 16:40:08 <haskellbridge> <loonycyborg> so that should be unordered list which isn't a built-in feature in haskell
2025-11-14 16:40:42 bggd joins (~bgg@2a01:e0a:819:1510:cb15:dfb4:31e5:1dfe)
2025-11-14 16:43:21 <haskellbridge> <loonycyborg> In fact having a set(which is a list in no particular order) as a basic builtin type for a language like haskell would make sense I think :P
2025-11-14 16:44:21 × Googulator44 quits (~Googulato@team.broadbit.hu) (Quit: Client closed)
2025-11-14 16:44:28 <haskellbridge> <loonycyborg> It's just implementing such containers is generally done via hashing and it just wasn't a widespread thing when haskell was originally designed
2025-11-14 16:44:36 Googulator44 joins (~Googulato@team.broadbit.hu)
2025-11-14 16:50:49 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2025-11-14 16:50:50 Googulator16 joins (~Googulato@team.broadbit.hu)
2025-11-14 16:52:07 img joins (~img@user/img)
2025-11-14 16:52:15 <geekosaur> well, in Haskell's case it had more to do with it being originally intended as a teaching and FP exploration language
2025-11-14 16:52:33 <geekosaur> I mean, Perl, Python, and even awk already existed when Haskell was designed
2025-11-14 16:52:40 <geekosaur> and Javascript
2025-11-14 16:53:16 <Leary> loonycyborg: The issue with pure exceptions in Haskell is undefined evaluation order due to /laziness/. An effect system can easily provide deterministic, pure exception handling, so long as it imposes a strict sequencing of operations.
2025-11-14 16:53:55 × Googulator44 quits (~Googulato@team.broadbit.hu) (Ping timeout: 250 seconds)
2025-11-14 16:53:55 <comerijn> geekosaur: What?
2025-11-14 16:54:03 <comerijn> perl and awk, sure
2025-11-14 16:54:09 <comerijn> Python's first public release was 1991
2025-11-14 16:54:42 <comerijn> So Haskell 1.0 predates it by a year
2025-11-14 16:54:46 acarrico1 joins (~acarrico@pppoe-209-99-223-51.greenmountainaccess.net)
2025-11-14 16:54:52 <geekosaur> python 1.0 and perl 32.0 came out the same week. I was comp.sources.misc moderator at the time and approved both
2025-11-14 16:55:28 <geekosaur> which made it late 1980s
2025-11-14 16:55:28 <comerijn> geekosaur: Wikipedia lists "Python implementation began in December 1989.[43] Van Rossum first released it in 1991 as Python 0.9.0"
2025-11-14 16:57:44 <comerijn> The Haskell Committee started in 1987, predating python and the Haskell 1.0 was 1990. Not sure which compiler was first
2025-11-14 16:58:00 <comerijn> iirc it was Lennart's compiler in Lazy ML?
2025-11-14 16:59:29 <dolio> That's the usual story.
2025-11-14 16:59:29 <comerijn> And Javascript coming out in 1995 was waaaay later
2025-11-14 16:59:58 <kuribas> I wish I could write production code in idris.
2025-11-14 17:00:32 <comerijn> I'm also confused by the qualifier "even" awk, as if awk is more modern than Perl and Python
2025-11-14 17:00:49 <comerijn> Given that the first awk is from 1977
2025-11-14 17:02:04 <haskellbridge> <geekosaur> Mm right about ja
2025-11-14 17:02:37 <haskellbridge> <Zemyla> Perl 32.0? I thought they were still working on Perl 6.
2025-11-14 17:02:52 <haskellbridge> <geekosaur> Sorry I'm on my way to the store (sister's driving)
2025-11-14 17:03:08 × Fijxu quits (~Fijxu@user/fijxu) (Ping timeout: 256 seconds)
2025-11-14 17:03:09 × tromp quits (~textual@2001:1c00:3487:1b00:f8db:b16d:6074:eae9) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-11-14 17:03:23 <haskellbridge> <geekosaur> 3.0 not typing well
2025-11-14 17:03:30 <comerijn> This should be obvious, given javascript was named after java, which is substantially newer than both Python and Haskell (since Java cribbed immutable strings from python, and python cribbed list comprehensions from haskell)
2025-11-14 17:03:32 <dolio> Anyhow, back when I was working on ermine, I recall one thing we did was unsafe coerce exceptions into ST to try to borrow the more efficient handling that IO has.
2025-11-14 17:03:41 <haskellbridge> <geekosaur> Bad time for me to be trying to do this
2025-11-14 17:03:46 <dolio> We never really got to fruition with that implementation, though.
2025-11-14 17:04:01 <dolio> But, like, what if you had that and it wasn't "you shouldn't be doing this."
2025-11-14 17:05:43 Googulator4 joins (~Googulato@team.broadbit.hu)
2025-11-14 17:05:47 <dolio> You probably do get that with the continuation-based algebraic effect things in Haskell. Because it's doing sort of the same thing for exceptions.
2025-11-14 17:05:55 <haskellbridge> <geekosaur> But I'm pretty sure Perl and something claiming to be "Python" were late 80s
2025-11-14 17:07:14 <haskellbridge> <loonycyborg> Leary: strict sequencing isn't necessarily a good thing. I'd prefer to embrace laziness(at least by default) and adapt to it.
2025-11-14 17:08:07 <haskellbridge> <loonycyborg> And I see a way for that like this: gather all exceptions that happened into an unordered list and then pattern-match on it to find exception you want to handle.
2025-11-14 17:09:05 × Googulator16 quits (~Googulato@team.broadbit.hu) (Ping timeout: 250 seconds)
2025-11-14 17:10:12 × polykernel quits (~polykerne@user/polykernel) (Remote host closed the connection)
2025-11-14 17:10:35 polykernel joins (~polykerne@user/polykernel)
2025-11-14 17:15:42 Googulator85 joins (~Googulato@team.broadbit.hu)
2025-11-14 17:16:16 <jreicher> dolio: is unison lazy? Since monochrom put me on to the question I've been trying to find examples of an implementation (or formal semantics) for delimited continuation operators on a lazy machine, as I think there does need to be something preventing a shift/control/etc "crossing" a reset/prompt/etc during substitution.
2025-11-14 17:16:48 <dolio> No, it's not lazy.
2025-11-14 17:17:38 sindu joins (~sindu@2.151.25.127.tmi.telenormobil.no)
2025-11-14 17:18:04 tromp joins (~textual@2001:1c00:3487:1b00:f8db:b16d:6074:eae9)
2025-11-14 17:18:16 <haskellbridge> <Zemyla> Okay, I'm trying to figure out how much performance I'd get if I made a mutable Seq in ST.
2025-11-14 17:19:03 × Googulator4 quits (~Googulato@team.broadbit.hu) (Ping timeout: 250 seconds)
2025-11-14 17:19:30 <haskellbridge> <Zemyla> freeze would be safe and O(log n).
2025-11-14 17:19:30 <dolio> Delimited continuations are effectful, so what happens if you allow them with laziness gets difficult to think about. And you'd have to commit to a particular lazy evaluation order, I think.
2025-11-14 17:20:03 <dolio> Unlike Haskell where the exact order is somewhat unspecified (which can be an advantage).
2025-11-14 17:20:24 × polykernel quits (~polykerne@user/polykernel) (Remote host closed the connection)

All times are in UTC.