Logs: liberachat/#haskell
| 2021-08-17 17:17:24 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 2021-08-17 17:19:04 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-08-17 17:21:56 | × | themc47 quits (~mc47@xmonad/TheMC47) (Quit: Leaving) |
| 2021-08-17 17:22:14 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 2021-08-17 17:26:31 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 258 seconds) |
| 2021-08-17 17:27:36 | <dsal> | timCF: I used to build my own GHC for armv7. It was always a fun challenge. |
| 2021-08-17 17:27:37 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 2021-08-17 17:28:23 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-08-17 17:29:22 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 2021-08-17 17:29:43 | <chisui> | jay-invariant: Thank's for showing me dunai. Once the system is running, it's super clean: `reactimate (time . sinwave . play)` |
| 2021-08-17 17:30:53 | <chisui> | * `reactimate (time . sinwave 440 . play)` |
| 2021-08-17 17:32:02 | × | chisui quits (~chisui@200116b864e3ed008dc027ad9120a9d2.dip.versatel-1u1.de) (Quit: Client closed) |
| 2021-08-17 17:32:42 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-08-17 17:33:06 | → | chisui joins (~chisui@200116b864e3ed008dc027ad9120a9d2.dip.versatel-1u1.de) |
| 2021-08-17 17:34:03 | → | tfeb joins (~tfb@88.98.95.237) |
| 2021-08-17 17:36:02 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-08-17 17:37:07 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 2021-08-17 17:37:27 | × | keutoi quits (~keutoi@157.47.61.149) (Quit: leaving) |
| 2021-08-17 17:38:05 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 244 seconds) |
| 2021-08-17 17:38:55 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-08-17 17:40:21 | → | burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
| 2021-08-17 17:41:00 | × | burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Remote host closed the connection) |
| 2021-08-17 17:41:03 | → | fendor_ joins (~fendor@77.119.161.62.wireless.dyn.drei.com) |
| 2021-08-17 17:41:26 | → | burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
| 2021-08-17 17:42:10 | → | Guest|96 joins (~Guest|96@97-120-201-204.ptld.qwest.net) |
| 2021-08-17 17:42:10 | → | MoC joins (~moc@user/moc) |
| 2021-08-17 17:42:27 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-17 17:43:55 | × | fendor quits (~fendor@178.165.173.29.wireless.dyn.drei.com) (Ping timeout: 268 seconds) |
| 2021-08-17 17:45:52 | × | burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 245 seconds) |
| 2021-08-17 17:49:16 | <abhixec> | trying to install termonad and getting Could not find module ‘GI.GModule.Structs.Module’ anyone know how I can resolve this? |
| 2021-08-17 17:52:06 | <abhixec> | oops wrong channel sorry! |
| 2021-08-17 17:52:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-17 17:52:19 | × | Guest|96 quits (~Guest|96@97-120-201-204.ptld.qwest.net) (Quit: Connection closed) |
| 2021-08-17 17:53:44 | × | tfeb quits (~tfb@88.98.95.237) (Quit: died) |
| 2021-08-17 17:54:06 | × | PinealGlandOptic quits (~PinealGla@37.115.210.35) (Quit: leaving) |
| 2021-08-17 17:57:57 | × | retroid_ quits (~retro@5ec19a54.skybroadband.com) (Ping timeout: 258 seconds) |
| 2021-08-17 17:58:07 | × | Vajb quits (~Vajb@2001:999:252:4e3c:27f9:d93:655e:583) (Read error: Connection reset by peer) |
| 2021-08-17 17:58:58 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 2021-08-17 18:00:27 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds) |
| 2021-08-17 18:00:43 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-17 18:02:46 | → | aegon joins (~mike@174.127.249.180) |
| 2021-08-17 18:05:21 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds) |
| 2021-08-17 18:07:39 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-08-17 18:08:50 | <jay-invariant> | timCF: I think you may need to build your own GHC. The first step is generally to install the cross toolchain (gcc, ld, libraries, etc.) for your target platform, and then you follow https://gitlab.haskell.org/ghc/ghc/-/wikis/building/cross-compiling . I've done it for ARM before and I ran into an issue with LD; it was fixed by forcing GHC to use gold (an alternate linker, included in gnu binutils) |
| 2021-08-17 18:10:07 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 2021-08-17 18:10:19 | <jay-invariant> | This blog: https://medium.com/@zw3rk/a-haskell-cross-compiler-for-raspberry-pi-ddd9d41ced94 and several of the posts linked there may be useful |
| 2021-08-17 18:12:08 | <jay-invariant> | Also note that template haskell causes some major pain when cross-compiling. People have set up some solutions, but if you don't need it I would avoid TH all together |
| 2021-08-17 18:14:15 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-17 18:17:15 | → | nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 2021-08-17 18:21:31 | → | burnsidesLlama joins (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
| 2021-08-17 18:23:22 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds) |
| 2021-08-17 18:25:01 | <chisui> | Is there a `while :: IO Bool -> IO b -> IO ()` equivalent in base? |
| 2021-08-17 18:26:09 | × | burnsidesLlama quits (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 248 seconds) |
| 2021-08-17 18:26:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 2021-08-17 18:26:30 | <glguy> | no |
| 2021-08-17 18:26:31 | → | mud joins (~mud@user/kadoban) |
| 2021-08-17 18:27:01 | → | eight joins (~eight@user/eight) |
| 2021-08-17 18:29:12 | <monochrom> | There is one in some packages on hackage such as monad-loop (I forgot the exact name) and other. |
| 2021-08-17 18:29:27 | <monochrom> | But you can tell how much I actually care. |
| 2021-08-17 18:29:37 | <dsal> | @hoogle IO Bool -> IO b -> IO b |
| 2021-08-17 18:29:38 | <lambdabot> | GHC.Base thenIO :: IO a -> IO b -> IO b |
| 2021-08-17 18:29:38 | <lambdabot> | HsShellScript (-|=) :: IO a -> IO b -> IO b |
| 2021-08-17 18:29:38 | <lambdabot> | HsShellScript (=|=) :: IO a -> IO b -> IO b |
| 2021-08-17 18:29:51 | <dsal> | That's weird. |
| 2021-08-17 18:30:21 | <jay-invariant> | It can't have that signature. What if the first action returned `False`, then you'd be getting a `b` out of nowhere |
| 2021-08-17 18:30:39 | <monochrom> | Even in C, C++, and Java, I don't really find myself writing pure for-loops and pure while-loops all that much. There is always a "break" or "continue" or "return" in the middle. |
| 2021-08-17 18:31:17 | <monochrom> | Therefore in Haskell a while-loop feature is of even lesser relevance. If it's already pretty irrelevant in C. |
| 2021-08-17 18:32:14 | <dsal> | I've used whileM_ once as far as I can tell. |
| 2021-08-17 18:32:18 | <dsal> | @hoogle whileM_ |
| 2021-08-17 18:32:18 | <lambdabot> | Control.Monad.Loops whileM_ :: Monad m => m Bool -> m a -> m () |
| 2021-08-17 18:32:24 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 2021-08-17 18:32:28 | <monochrom> | Whenever in C you see me "using" a while-loop but has some breaks and continues in the middle, you know that I would use handwritten recursion in the Haskell equivalent. |
| 2021-08-17 18:32:48 | <chisui> | I have to manually implement a spinlock. It also would be just 4 lines long. |
| 2021-08-17 18:34:23 | <dsal> | My one use case is: `runWaitForUploads = whileM_ inProgress (sleep 15)` |
| 2021-08-17 18:34:40 | <monochrom> | heh |
| 2021-08-17 18:34:47 | → | kuribas joins (~user@ptr-25vy0iacpr2aovgi62v.18120a2.ip6.access.telenet.be) |
| 2021-08-17 18:37:28 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-08-17 18:37:53 | <jay-invariant> | chisui: I'm curious, what do you need a spinlock for? I'm no expert, but the advice I've heard is "never use spinlocks in userspace" |
| 2021-08-17 18:37:59 | × | spruit11_ quits (~quassel@2a02:a467:ccd6:1:2d8e:31e9:d2b5:c97d) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2021-08-17 18:38:14 | <chisui> | jay-invariant: so that the buffer doesn't overflow. |
| 2021-08-17 18:38:20 | → | spruit11 joins (~quassel@2a02:a467:ccd6:1:2d8e:31e9:d2b5:c97d) |
| 2021-08-17 18:39:24 | <chisui> | Currently the `sinwave 440` produces output faster than sdl outputs, so I have to throttle the generating thread somehow. |
| 2021-08-17 18:39:31 | <jay-invariant> | chisui: Why not use some higher-level queue that already handles the locking? |
| 2021-08-17 18:39:31 | × | Atum_ quits (~IRC@user/atum/x-2392232) (Quit: Atum_) |
| 2021-08-17 18:40:30 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-08-17 18:41:02 | <dsal> | blocking buffered queues are good at that sort of thing. |
| 2021-08-17 18:41:54 | <chisui> | Do you have any packages I could take a look at? |
| 2021-08-17 18:42:46 | <monochrom> | You can start with MVar. Comes with GHC. Control.Concurent.MVar or something. And it is not the only choice, there are others. |
| 2021-08-17 18:43:44 | <monochrom> | MVar equals bounded queue of capacity 1. |
| 2021-08-17 18:43:47 | × | cheater quits (~Username@user/cheater) (Ping timeout: 245 seconds) |
| 2021-08-17 18:44:08 | <jay-invariant> | I know `stm` has a `TChan` and `TQueue`, but those are both unbounded. You could make it bounded using a semaphore, or look for another package. |
| 2021-08-17 18:44:16 | <monochrom> | If you like a larger capacity, there are choices. |
| 2021-08-17 18:44:41 | <monochrom> | You're in luck. stm also has a TBQueue. |
| 2021-08-17 18:45:19 | <jay-invariant> | ah, I missed that |
| 2021-08-17 18:45:20 | <chisui> | I need an efficient implementation of 200k Int32 |
| 2021-08-17 18:45:34 | <chisui> | s/of/for/ |
| 2021-08-17 18:46:12 | <dsal> | Oh interesting. TBQueue has two counters. I guess that makes sense. I would've just used an unbounded queue and one counter. |
| 2021-08-17 18:46:29 | ← | idf parts (~idf@198.23.223.146) (Killed buffer) |
| 2021-08-17 18:46:58 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 2021-08-17 18:47:26 | → | cheater joins (~Username@user/cheater) |
All times are in UTC.