Logs: liberachat/#haskell
| 2026-02-05 13:06:45 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Read error: Connection reset by peer) |
| 2026-02-05 13:06:55 | <mesaoptimizer> | oskarw: i haven't yet tried haskell-ts-mode |
| 2026-02-05 13:07:05 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2026-02-05 13:10:31 | × | fp quits (~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Ping timeout: 264 seconds) |
| 2026-02-05 13:13:58 | × | comerijn quits (~merijn@77.242.116.146) (Quit: leaving) |
| 2026-02-05 13:15:07 | → | merijn joins (~merijn@77.242.116.146) |
| 2026-02-05 13:43:25 | × | trickard quits (~trickard@cpe-61-98-47-163.wireline.com.au) (Ping timeout: 255 seconds) |
| 2026-02-05 13:43:51 | → | trickard_ joins (~trickard@cpe-61-98-47-163.wireline.com.au) |
| 2026-02-05 13:47:21 | × | ouilemur quits (~jgmerritt@user/ouilemur) (Quit: WeeChat 4.8.1) |
| 2026-02-05 13:49:02 | → | kuribas joins (~user@2a02-1810-2825-6000-6394-e629-adac-ea24.ip6.access.telenet.be) |
| 2026-02-05 13:49:10 | → | fp joins (~Thunderbi@wireless-86-50-141-35.open.aalto.fi) |
| 2026-02-05 13:50:21 | × | karenw quits (~karenw@user/karenw) (Quit: Deep into that darkness peering...) |
| 2026-02-05 13:53:35 | × | fp quits (~Thunderbi@wireless-86-50-141-35.open.aalto.fi) (Ping timeout: 244 seconds) |
| 2026-02-05 13:55:08 | × | housemate quits (~housemate@202.7.248.67) (Quit: https://ineedsomeacidtocalmmedown.space/) |
| 2026-02-05 13:58:48 | → | emaczen joins (~user@user/emaczen) |
| 2026-02-05 13:59:55 | → | fp joins (~Thunderbi@wireless-86-50-141-35.open.aalto.fi) |
| 2026-02-05 14:01:20 | → | ouilemur joins (~jgmerritt@user/ouilemur) |
| 2026-02-05 14:05:16 | × | tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in) |
| 2026-02-05 14:11:40 | → | housemate joins (~housemate@202.7.248.67) |
| 2026-02-05 14:16:29 | <gentauro> | what is `haskell-ts-mode`? Like TypeScript? |
| 2026-02-05 14:19:09 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2026-02-05 14:23:09 | <dutchie> | for a mode foo-mode, foo-ts-mode is the same mode but based on tree-sitter |
| 2026-02-05 14:23:45 | <RMSBach> | mesaoptimizer: Are you using projectile? I haven't used haskell-ts-mode, but regular haskell-mode works with cabal projects when projectile is aware of the project root for me. |
| 2026-02-05 14:43:30 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 2026-02-05 14:44:08 | <gentauro> | ahhh, got it |
| 2026-02-05 14:53:42 | × | trickard_ quits (~trickard@cpe-61-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-05 14:53:55 | → | trickard_ joins (~trickard@cpe-61-98-47-163.wireline.com.au) |
| 2026-02-05 14:58:43 | AlexZenon_2 | is now known as AlexZenon |
| 2026-02-05 14:59:18 | × | fp quits (~Thunderbi@wireless-86-50-141-35.open.aalto.fi) (Ping timeout: 244 seconds) |
| 2026-02-05 15:07:39 | <mesaoptimizer> | RMSBach: I'm using vanilla emacs, so no projectile. I might consider trying projectile if that's necessary. |
| 2026-02-05 15:07:48 | <mesaoptimizer> | thanks for the heads up |
| 2026-02-05 15:09:45 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2026-02-05 15:11:57 | → | euphores joins (~SASL_euph@user/euphores) |
| 2026-02-05 15:14:13 | trickard_ | is now known as trickard |
| 2026-02-05 15:16:03 | <RMSBach> | mesaoptimizer: I strongly recommend projectile. Also consul-projectile. The QoL is amazing. |
| 2026-02-05 15:16:22 | <RMSBach> | Also, lsp mode makes working with Haskell projects much nicer. |
| 2026-02-05 15:21:12 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2026-02-05 15:31:54 | <mesaoptimizer> | RMSBach: how does lsp mode compare to the use of eglot? Because I see someone else recommended the use of eglot to me in response to my question |
| 2026-02-05 15:32:09 | <mesaoptimizer> | if you don't have an idea, that's fine, I'll try lsp myself eventually then |
| 2026-02-05 15:33:15 | <RMSBach> | I've not tried eglot. |
| 2026-02-05 15:33:21 | × | tromp quits (~textual@2001:1c00:3487:1b00:4842:24c6:bd5c:fe37) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-02-05 15:39:16 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 2026-02-05 15:46:02 | → | rekahsoft joins (~rekahsoft@70.51.99.245) |
| 2026-02-05 15:55:16 | × | RMSBach quits (~RMSBach@24.210.9.182) (Ping timeout: 265 seconds) |
| 2026-02-05 15:55:16 | → | RSBach joins (~RMSBach@24.210.9.182) |
| 2026-02-05 15:55:40 | RSBach | is now known as RMSBach |
| 2026-02-05 15:55:58 | → | tromp joins (~textual@2001:1c00:3487:1b00:4842:24c6:bd5c:fe37) |
| 2026-02-05 16:06:37 | <machinedgod> | Good morning everyone. Question re: linear types, again - is it possible to somehow convert between numeric types linearly? I realized 'fromIntegral' is non-linear, while fromInteger is - but even if I wanted to implement manually my specific case (Int -> Float wrapped with a newtype), I cannot seem to find any function that'd let me do the raw conversion linearly. |
| 2026-02-05 16:07:35 | <machinedgod> | (also curiously, trying to pattern match on a specific value and copying it "conv (MyWrap 1) = AnotherWrap 1" also gets compiler to complain. |
| 2026-02-05 16:08:12 | <tomsmeding> | wouldn't that be because you're not copying the 1, you're dropping it and then creating a new one? |
| 2026-02-05 16:08:34 | <tomsmeding> | it seems this is simply an omission in linear-base |
| 2026-02-05 16:09:10 | <machinedgod> | Oh it might be, I wouldn't know in all honesty. I checked the code in linear-base and it seems like fromIntegral is just copied over from 'base' |
| 2026-02-05 16:09:27 | tomsmeding | doesn't see any fromIntegral in linear-base at all |
| 2026-02-05 16:11:04 | <tomsmeding> | if you want to be thorough, you could define your own linear Integral class with a linear toInteger method, define fromIntegral as fromInteger . toInteger as a linear function, and then write RULEs like in base |
| 2026-02-05 16:11:17 | <tomsmeding> | or you can skip all that and unsafeCoerce the specific conversion that you need |
| 2026-02-05 16:11:34 | <tomsmeding> | even if you go the thorough route, you'll have to do that for the specific conversions anyway |
| 2026-02-05 16:12:37 | <tomsmeding> | machinedgod: eventually, these conversions boil down to calls to functions from GHC.Exts, like int2Float# |
| 2026-02-05 16:12:58 | <machinedgod> | tomsmeding: Aye, that's where I looked at, and hoped to find something like int2Float that's linear, but no luck. |
| 2026-02-05 16:13:08 | <tomsmeding> | yeah, and those primops are simply not linear |
| 2026-02-05 16:13:28 | <tomsmeding> | morally, of course, they are, so it seems it's up to you to declare that (by using unsafeCoerce) |
| 2026-02-05 16:13:40 | <machinedgod> | I considered massaging the value forcefully with Ur, but - I wanted to verify that I am not just blind or missing something (like, toInteger cannot be logically linear) |
| 2026-02-05 16:14:21 | <machinedgod> | Would this be considered, how should I call it - acceptable quality production code for current iteration of linear-base and linear types? |
| 2026-02-05 16:14:22 | <tomsmeding> | not every type that admits a nonlinear toInteger necessarily admits a linear toInteger |
| 2026-02-05 16:14:31 | <tomsmeding> | most will, however |
| 2026-02-05 16:14:48 | <tomsmeding> | I think so |
| 2026-02-05 16:15:09 | <machinedgod> | tomsmeding: That's a wise observation! I was only focused on my newtype which holds and int anyway, so I think I'll be good. Thank you for your help, I appreciate it! |
| 2026-02-05 16:15:18 | <tomsmeding> | it's probably a good idea to define `unsafeToLinear :: (a -> b) -> (a %1-> b); unsafeToLinear = unsafeCoerce` so that you don't end up accidentally unsafeCoercing too much |
| 2026-02-05 16:15:19 | <machinedgod> | (*an int) |
| 2026-02-05 16:16:09 | <machinedgod> | tomsmeding: Aye, that's the plan, when coercions are involved, I prefer to be as specific as I can, too |
| 2026-02-05 16:16:09 | <tomsmeding> | (that observation is not a reason to not go through with this though; the same can be said for fromInteger, and linear-base has a linear fromInteger just fine) |
| 2026-02-05 16:16:14 | <tomsmeding> | nice |
| 2026-02-05 16:19:46 | <haskellbridge> | <Morj> Those of you who have mastodon (or another activitypub profile): can you search for this profile and tell me if you see the message in it? https://random.test.morj.men/u/morj |
| 2026-02-05 16:19:49 | <haskellbridge> | <Morj> Testing my impl |
| 2026-02-05 16:21:44 | <haskellbridge> | <Morj> I see a lot of people trying to open it in the browser. Not yet implemented, sorry |
| 2026-02-05 16:26:15 | → | wickedjargon joins (~user@24.83.46.194) |
| 2026-02-05 16:27:04 | → | srazkvt joins (~sarah@user/srazkvt) |
| 2026-02-05 16:31:54 | → | peterbecich joins (~Thunderbi@71.84.33.135) |
| 2026-02-05 16:38:19 | <darkling> | Morj: Yes, I see it. |
| 2026-02-05 16:38:46 | <haskellbridge> | <Morj> Thanks! |
| 2026-02-05 16:38:54 | <haskellbridge> | <Morj> Aand git commt |
| 2026-02-05 16:46:20 | × | srazkvt quits (~sarah@user/srazkvt) (Quit: Konversation terminated!) |
| 2026-02-05 17:09:20 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 240 seconds) |
| 2026-02-05 17:15:45 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 2026-02-05 17:32:41 | → | jmcantrell_ joins (~weechat@user/jmcantrell) |
| 2026-02-05 17:34:55 | × | peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 240 seconds) |
| 2026-02-05 17:40:38 | jmcantrell_ | is now known as jmcantrell |
| 2026-02-05 17:53:42 | → | Jackneill_ joins (~Jackneill@188-143-82-106.pool.digikabel.hu) |
| 2026-02-05 17:54:36 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds) |
| 2026-02-05 17:56:16 | × | trickard quits (~trickard@cpe-61-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-05 17:56:29 | → | trickard_ joins (~trickard@cpe-61-98-47-163.wireline.com.au) |
| 2026-02-05 17:56:43 | × | jackneill__ quits (~Jackneill@94-21-15-213.pool.digikabel.hu) (Ping timeout: 264 seconds) |
| 2026-02-05 18:03:31 | → | tremon joins (~tremon@83.80.159.219) |
| 2026-02-05 18:08:10 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2026-02-05 18:13:46 | × | divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer) |
| 2026-02-05 18:14:02 | → | divlamir joins (~divlamir@user/divlamir) |
| 2026-02-05 18:16:16 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-05 18:21:04 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2026-02-05 18:26:23 | catties | is now known as Catty |
| 2026-02-05 18:26:40 | → | peterbecich joins (~Thunderbi@71.84.33.135) |
| 2026-02-05 18:27:11 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
All times are in UTC.