Newest at the top
2025-01-15 19:37:42 +0100 | <tomsmeding> | what is "the status quo" for "the first element of an empty list"? |
2025-01-15 19:37:30 +0100 | <ash3en> | probably keep the status quo |
2025-01-15 19:37:26 +0100 | <tomsmeding> | first decide that, then see how you can best express that behaviour |
2025-01-15 19:37:14 +0100 | <tomsmeding> | ash3en: what do you want to happen if the list is empty? |
2025-01-15 19:36:56 +0100 | <EvanR> | async library makes recovering a failed thread easy |
2025-01-15 19:36:50 +0100 | <ash3en> | ok, so then the other question is what to use instead of head. pattern match, uncons or non empty? |
2025-01-15 19:36:37 +0100 | <tomsmeding> | you can technically catch the exception inside IO |
2025-01-15 19:36:24 +0100 | <EvanR> | if it's the main thread everything crashes |
2025-01-15 19:36:16 +0100 | <EvanR> | the thread crashes |
2025-01-15 19:36:10 +0100 | <tomsmeding> | yes |
2025-01-15 19:36:06 +0100 | <tomsmeding> | usually, though (but not _quite_ always), it's clearer to pattern-match on the list |
2025-01-15 19:36:06 +0100 | <ash3en> | will the whole program crash on a failed tail? |
2025-01-15 19:35:54 +0100 | <EvanR> | drop 1 [] won't crash immediately, so you might not know or the crash might be somewhere else and confusing |
2025-01-15 19:35:33 +0100 | <EvanR> | which is good to know |
2025-01-15 19:35:22 +0100 | <EvanR> | if it is definitely non-empty, the tail works and will crash when you assumption is wrong |
2025-01-15 19:35:20 +0100 | <int-e> | but maybe you *have* to fail on an empty list and then `tail` is your friend |
2025-01-15 19:35:14 +0100 | <lambdabot> | *Exception: Prelude.tail: empty list |
2025-01-15 19:35:13 +0100 | <tomsmeding> | > tail [] |
2025-01-15 19:35:02 +0100 | <lambdabot> | [] |
2025-01-15 19:35:00 +0100 | <int-e> | > drop 1 [] |
2025-01-15 19:34:50 +0100 | <EvanR> | tail only works in situations where the input list is non-empty |
2025-01-15 19:34:30 +0100 | <EvanR> | I don't know about BETTER, but it has a different behavior that can be more convenient sometimes |
2025-01-15 19:33:52 +0100 | raym | (~ray@user/raym) (Ping timeout: 252 seconds) |
2025-01-15 19:32:46 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-01-15 19:32:17 +0100 | <ash3en> | is 'drop 1' really better than 'tail'? |
2025-01-15 19:26:14 +0100 | jakesyl_____ | (sid56879@id-56879.hampstead.irccloud.com) |
2025-01-15 19:24:59 +0100 | akegalj | (~akegalj@142-231.dsl.iskon.hr) (Ping timeout: 244 seconds) |
2025-01-15 19:24:44 +0100 | jakesyl_____ | (sid56879@id-56879.hampstead.irccloud.com) (Ping timeout: 262 seconds) |
2025-01-15 19:22:22 +0100 | 068AAY72X | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection) |
2025-01-15 19:22:22 +0100 | statusbot | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) statusbot |
2025-01-15 19:22:22 +0100 | statusbot | 068AAY72X |
2025-01-15 19:21:49 +0100 | Vq | (~vq@81-226-38-201-no600.tbcn.telia.com) Vq |
2025-01-15 19:21:49 +0100 | constxd | (~constxd@user/constxd) constxd |
2025-01-15 19:21:49 +0100 | stefan-__ | (~m-yh2rcc@42dots.de) stefan-__ |
2025-01-15 19:21:49 +0100 | Philonous | (~Philonous@user/philonous) Philonous |
2025-01-15 19:21:49 +0100 | ames | (~amelia@offtopia/offtopian/amelia) {ames} |
2025-01-15 19:21:49 +0100 | WzC | (~Frank@77-162-168-71.fixed.kpn.net) |
2025-01-15 19:21:49 +0100 | polux | (~polux@51-15-169-172.rev.poneytelecom.eu) polux |
2025-01-15 19:21:49 +0100 | skylord5816 | (~skylord58@user/skylord5816) skylord5816 |
2025-01-15 19:21:49 +0100 | PHO` | (~pho@akari.cielonegro.org) PHO` |
2025-01-15 19:21:49 +0100 | gmc | (sid58314@id-58314.ilkley.irccloud.com) gmc |
2025-01-15 19:21:49 +0100 | h2t | (~h2t@user/h2t) h2t |
2025-01-15 19:21:49 +0100 | davean | (~davean@davean.sciesnet.net) davean |
2025-01-15 19:21:49 +0100 | JSharp | (sid4580@user/JSharp) JSharp |
2025-01-15 19:21:49 +0100 | tapas | (sid467876@id-467876.ilkley.irccloud.com) tapas |
2025-01-15 19:21:49 +0100 | nshepperd | (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) nshepperd |
2025-01-15 19:21:49 +0100 | [exa] | (~exa@user/exa/x-3587197) [exa] |
2025-01-15 19:21:49 +0100 | landonf | (landonf@mac68k.info) |
2025-01-15 19:21:49 +0100 | [_________] | (~oos95GWG@user/oos95GWG) oos95GWG |
2025-01-15 19:21:49 +0100 | farn__ | (~farn@2a03:4000:7:3cd:d4ab:85ff:feeb:f505) farn |