Logs: liberachat/#haskell
| 2021-08-28 16:08:10 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 240 seconds) |
| 2021-08-28 16:08:25 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 16:08:31 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:45ef:351a:e045:ed35) |
| 2021-08-28 16:14:36 | × | derelict quits (~derelict@user/derelict) (Quit: WeeChat 3.2) |
| 2021-08-28 16:15:34 | <DigitalKiwi> | is it really the best? |
| 2021-08-28 16:15:57 | <DigitalKiwi> | simply being official doesn't make it the gest |
| 2021-08-28 16:16:04 | <DigitalKiwi> | or best |
| 2021-08-28 16:16:16 | → | derelict joins (derelict@2600:3c02::f03c:92ff:fe45:2498) |
| 2021-08-28 16:16:34 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 2021-08-28 16:18:11 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2021-08-28 16:18:21 | <maerwald> | I think we just established that it's the best. |
| 2021-08-28 16:19:23 | <DigitalKiwi> | have we though |
| 2021-08-28 16:20:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-08-28 16:21:04 | → | neo2 joins (~neo3@cpe-292712.ip.primehome.com) |
| 2021-08-28 16:21:14 | → | Vajb joins (~Vajb@85-76-37-217-nat.elisa-mobile.fi) |
| 2021-08-28 16:22:44 | × | derelict quits (derelict@2600:3c02::f03c:92ff:fe45:2498) (Quit: bye) |
| 2021-08-28 16:22:59 | → | derelict joins (derelict@user/derelict) |
| 2021-08-28 16:25:48 | × | Vajb quits (~Vajb@85-76-37-217-nat.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 2021-08-28 16:26:42 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) |
| 2021-08-28 16:27:40 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 240 seconds) |
| 2021-08-28 16:28:27 | × | nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Quit: WeeChat 3.2) |
| 2021-08-28 16:28:48 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 16:33:05 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 248 seconds) |
| 2021-08-28 16:33:43 | → | falafel joins (~falafel@74.214.230.170) |
| 2021-08-28 16:34:08 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 16:34:46 | × | lbseale_ quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
| 2021-08-28 16:37:53 | × | Guest3892 quits (~chris@81.96.113.213) (Ping timeout: 248 seconds) |
| 2021-08-28 16:42:06 | → | chris joins (~chris@81.96.113.213) |
| 2021-08-28 16:42:09 | chris | is now known as Guest2283 |
| 2021-08-28 16:42:38 | × | Guest2283 quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-08-28 16:43:22 | × | falafel quits (~falafel@74.214.230.170) (Ping timeout: 245 seconds) |
| 2021-08-28 16:44:46 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 2021-08-28 16:46:15 | → | APic joins (apic@apic.name) |
| 2021-08-28 16:49:38 | → | chris joins (~chris@81.96.113.213) |
| 2021-08-28 16:49:42 | chris | is now known as Guest8241 |
| 2021-08-28 16:51:29 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-28 16:51:56 | × | jrm quits (~jrm@156.34.187.65) (Quit: ciao) |
| 2021-08-28 16:53:23 | <monochrom> | It's how I learned Haskell, and I think it's the best, or least worst, compared to tutorials that came after. |
| 2021-08-28 16:54:25 | <monochrom> | One of its strengths is that it does not have broken analogies or misleading pictures that everyone praises in other, worse, tutorials. |
| 2021-08-28 16:55:51 | <monochrom> | Note that there is a line to be drawn between tutorials and textbooks. I am comparing tutorials with tutorials, not tutorials with textbooks. |
| 2021-08-28 16:57:13 | <monochrom> | http://www.vex.net/~trebla/haskell/learn-sources.html#a-gentle-introduction-to-haskell |
| 2021-08-28 17:04:52 | × | kuribas quits (~user@ptr-25vy0i6qx5na6znp5k4.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 2021-08-28 17:10:48 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 2021-08-28 17:11:26 | → | Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net) |
| 2021-08-28 17:11:42 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 245 seconds) |
| 2021-08-28 17:14:07 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-08-28 17:14:35 | <hololeap> | is there a monad (transformer) similar to ExceptT, but with different semantics, where the monad will "short-circuit" and return when a computation is finished, as opposed to on an error? |
| 2021-08-28 17:15:20 | <janus> | hololeap: not sure i understand, why not just swap success and error types in ExceptT ? |
| 2021-08-28 17:17:19 | <monochrom> | I don't understand how "finished" and "short-circuit" can be brought together. |
| 2021-08-28 17:17:23 | <janus> | maybe if we eschew the "success/error" terminology and just call it "returned on short circuit" "returned when no short circuiting appears". that captures ExceptT just as accurately, no? |
| 2021-08-28 17:17:34 | <monochrom> | I would think "short-circuit" means "unfinished but quit". |
| 2021-08-28 17:17:34 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 17:18:19 | <hololeap> | monochrom: for instance, I'm building a data structure using Accum using "pieces" that come in from a list, and I want to stop reading from the list when the data structure is complete |
| 2021-08-28 17:18:47 | <monochrom> | I don't know Accum. |
| 2021-08-28 17:19:05 | <hololeap> | It's basically just State but specialized for monoids as `s` |
| 2021-08-28 17:19:07 | × | haykam quits (~haykam@static.100.2.21.65.clients.your-server.de) (Remote host closed the connection) |
| 2021-08-28 17:19:14 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-08-28 17:19:21 | → | haykam joins (~haykam@static.100.2.21.65.clients.your-server.de) |
| 2021-08-28 17:19:23 | <hololeap> | it's actually in transformers |
| 2021-08-28 17:20:00 | <monochrom> | But "f (x:y:_) = (x,y)" satisfies "stop reading from the list when the tuple (x,y) is complete". |
| 2021-08-28 17:20:57 | <hololeap> | this is more like, `data MyThing (Maybe X) (Maybe Y) (Maybe Z)` and I want to stop when all the fields are (Just X), (Just Y), etc |
| 2021-08-28 17:22:16 | <hololeap> | oh, I just remembered monad-loops. takeWhileM is probably what I'm looking for |
| 2021-08-28 17:23:40 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
| 2021-08-28 17:24:18 | <monochrom> | Equivalently, making a recursive call means "don't stop", therefore simply don't make a recursive call to "stop". |
| 2021-08-28 17:25:24 | <hololeap> | true, but I like to avoid rolling my own recursion when possible. I find the code easier to comprehend that way |
| 2021-08-28 17:27:36 | <monochrom> | When I'm writing in C, half of the loops are for-loops that don't contain "break", "continue", "return", "exit()". They are the pure loops, they would be foldl, foldr, foldMap, mapM_ if I were writing Haskell. |
| 2021-08-28 17:27:41 | <kaol> | I've used ContT for my not-ExceptT things sometimes. |
| 2021-08-28 17:28:54 | <monochrom> | But the other half, they were really handwritten recursion in my head, and for just cause, but then it's C so I compiled recursion to "loop"s with "break" and "continue" and "return". |
| 2021-08-28 17:30:00 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 2021-08-28 17:30:28 | <monochrom> | Basically trying to explain that half of the "loops" in C are dishonest loops. They don't improve comprehensibility. |
| 2021-08-28 17:33:05 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 2021-08-28 17:33:51 | <kaol> | flip runContT return $ callCC $ \exit -> ... and exit can be called to short circuit and it'll have the same type as the whole computation, with no Either involved. |
| 2021-08-28 17:35:27 | <monochrom> | http://www.vex.net/~trebla/haskell/cont.xhtml#yield for using that to exit and re-enter and re-exit and re-enter... >:) |
| 2021-08-28 17:38:35 | <hpc> | if you want to be extra mean, flip runContT pure $ callCC $ \return -> ... |
| 2021-08-28 17:39:02 | <hpc> | now return actually affects control flow! :D |
| 2021-08-28 17:39:16 | <monochrom> | That's only the 2nd meanest. s/pure/return/ to be the meanest. |
| 2021-08-28 17:40:17 | <hpc> | then you can't nest it though |
| 2021-08-28 17:40:27 | <monochrom> | But let me optimize it for you. |
| 2021-08-28 17:40:27 | × | martin02 quits (~silas@2001:4ca0:0:fe00:0:5efe:a96:1bc1) (Ping timeout: 240 seconds) |
| 2021-08-28 17:40:27 | <maerwald> | is `pure` even politically correct? |
| 2021-08-28 17:40:30 | <hpc> | it's fun to not know if your return is going to take you too far up, or not take you too far up enough |
| 2021-08-28 17:40:41 | <monochrom> | flip runContT pure $ \pure -> ... |
| 2021-08-28 17:41:07 | <monochrom> | err |
| 2021-08-28 17:41:13 | <hpc> | actually, hmm |
| 2021-08-28 17:41:16 | <monochrom> | flip runContT pure $ ContT $ \pure -> ... |
| 2021-08-28 17:41:30 | <hpc> | in \pure, that pure has the same type as actual pure |
| 2021-08-28 17:41:37 | <hpc> | monochrom: so yes, yours is better |
| 2021-08-28 17:41:48 | <hpc> | because then who even knows what nesting it will do |
| 2021-08-28 17:46:40 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 240 seconds) |
| 2021-08-28 17:46:54 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 17:51:10 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 240 seconds) |
| 2021-08-28 17:52:15 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 17:52:43 | → | Gurkenglas joins (~Gurkengla@dslb-088-064-053-140.088.064.pools.vodafone-ip.de) |
| 2021-08-28 17:52:53 | → | martin02 joins (~silas@141.84.69.76) |
| 2021-08-28 17:59:37 | × | APic quits (apic@apic.name) (Ping timeout: 252 seconds) |
| 2021-08-28 18:01:10 | × | azeem quits (~azeem@5.168.90.242) (Ping timeout: 240 seconds) |
| 2021-08-28 18:02:06 | → | azeem joins (~azeem@5.168.90.242) |
| 2021-08-28 18:03:33 | <monochrom> | On second thought, callCC is necessary. |
| 2021-08-28 18:04:06 | <hpc> | it's always on second thought with callCC :P |
| 2021-08-28 18:06:05 | × | ArctVaulMarsHMPJ quits (~pjetcetal@128-71-152-79.broadband.corbina.ru) (Remote host closed the connection) |
All times are in UTC.