Logs: freenode/#haskell
| 2020-10-28 18:53:43 | <geekosaur> | let defines things recursively. this is a feature when used appropriately since infinite values are useful when they're productive |
| 2020-10-28 18:53:59 | → | Kolkrabe joins (~user@unaffiliated/siracusa) |
| 2020-10-28 18:54:09 | <geekosaur> | > let ones = 1 : ones in take 10 ones |
| 2020-10-28 18:54:12 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1] |
| 2020-10-28 18:54:45 | → | GyroW_ joins (~GyroW@d54C03E98.access.telenet.be) |
| 2020-10-28 18:54:45 | × | GyroW_ quits (~GyroW@d54C03E98.access.telenet.be) (Changing host) |
| 2020-10-28 18:54:45 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-28 18:54:49 | → | fabianhjr joins (~fabian@2806:106e:18:31bb:397f:b3aa:2c0e:c3b3) |
| 2020-10-28 18:54:49 | × | fabianhjr quits (~fabian@2806:106e:18:31bb:397f:b3aa:2c0e:c3b3) (Client Quit) |
| 2020-10-28 18:55:07 | <geekosaur> | there are ways to limit heap but it'll still crash ghci |
| 2020-10-28 18:55:09 | <rx_> | that's haskell after the : ? |
| 2020-10-28 18:55:29 | <geekosaur> | yes |
| 2020-10-28 18:55:44 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds) |
| 2020-10-28 18:56:04 | <geekosaur> | (x:xs) is the fundamental way of building a list |
| 2020-10-28 18:56:13 | <rx_> | oh yeah |
| 2020-10-28 18:56:23 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 2020-10-28 18:56:29 | <rx_> | I thought it was a separator for a moment |
| 2020-10-28 18:56:31 | <rx_> | thanks |
| 2020-10-28 18:59:57 | hackage | vimeta 0.3.0.1 - Frontend for video metadata tagging tools https://hackage.haskell.org/package/vimeta-0.3.0.1 (PeterJones) |
| 2020-10-28 19:00:14 | × | knupfer quits (~Thunderbi@200116b82c889000c591b125fca64e2d.dip.versatel-1u1.de) (Remote host closed the connection) |
| 2020-10-28 19:00:23 | → | knupfer joins (~Thunderbi@200116b82c889000d491c85aad532716.dip.versatel-1u1.de) |
| 2020-10-28 19:00:24 | × | mirrorbird quits (~psutcliff@m83-187-163-53.cust.tele2.se) (Ping timeout: 240 seconds) |
| 2020-10-28 19:00:49 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 2020-10-28 19:01:05 | → | nineonine joins (~textual@216.81.48.202) |
| 2020-10-28 19:01:12 | → | alp joins (~alp@2a01:e0a:58b:4920:d435:c55a:9994:ea6) |
| 2020-10-28 19:03:27 | <dminuoso> | rx_: As a useful note, (:) is actually just a data constructor that happens to look like an operator. :) |
| 2020-10-28 19:03:29 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-28 19:03:30 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 2020-10-28 19:04:04 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds) |
| 2020-10-28 19:04:21 | <dminuoso> | One could assume list was defined as `data [a] = a : [a] | []` - or alternatively as `data List a = Cons a [a] | Nil`. In this second version `Cons` takes the role of (:) :) |
| 2020-10-28 19:04:29 | → | is_null joins (~jpic@pdpc/supporter/professional/is-null) |
| 2020-10-28 19:05:11 | <rx_> | what does caps mean in hs ? |
| 2020-10-28 19:05:22 | <rx_> | library function? |
| 2020-10-28 19:05:33 | <geekosaur> | initial capital is a constructor, vs. a variable/binding |
| 2020-10-28 19:05:46 | <rx_> | oh ok |
| 2020-10-28 19:06:22 | <geekosaur> | this is important in pattersn so it knows which parts are structural to be matched against, vs. which parts are data that can be bound to |
| 2020-10-28 19:06:40 | → | bartemius joins (~bartemius@109-252-20-20.nat.spd-mgts.ru) |
| 2020-10-28 19:06:55 | <dminuoso> | Oh, I messed up the second declaration. That should have read `data List a = Cons a (List a) | Nil` of course. |
| 2020-10-28 19:06:59 | → | fmeyer joins (~fmeyer@p4fc127b6.dip0.t-ipconnect.de) |
| 2020-10-28 19:07:06 | <dminuoso> | % data List a = Cons a (List a) | Nil |
| 2020-10-28 19:07:06 | <yahb> | dminuoso: |
| 2020-10-28 19:07:25 | × | tdhttt quits (~tdhttt@static-198-54-131-149.cust.tzulo.com) (Ping timeout: 240 seconds) |
| 2020-10-28 19:07:49 | <geekosaur> | when using infix constructors, initial colon (:) is "capital" (borrowed from list syntax) |
| 2020-10-28 19:07:56 | × | ulidtko|k quits (~ulidtko@193.111.48.79) (Remote host closed the connection) |
| 2020-10-28 19:08:02 | <rx_> | hmm, there is no way out of the quadruple function is there |
| 2020-10-28 19:08:14 | → | ulidtko|k joins (~ulidtko@193.111.48.79) |
| 2020-10-28 19:08:25 | <geekosaur> | not as written. but did you want double (double x) ? |
| 2020-10-28 19:08:38 | <rx_> | I'm tracing through it but I realize it needs a way out |
| 2020-10-28 19:08:48 | <rx_> | ah no, just going through the haskell wikibook |
| 2020-10-28 19:09:16 | <rx_> | clever question by the author I guess :] |
| 2020-10-28 19:09:16 | <hyperisco> | okay I hate exceptions in Haskell now |
| 2020-10-28 19:09:17 | <geekosaur> | either that, or a way to produce a partial result before it recurses (like the `ones` example) |
| 2020-10-28 19:09:33 | <hyperisco> | so about them checked exceptions |
| 2020-10-28 19:09:35 | <geekosaur> | hyperisco, what took you so long? |
| 2020-10-28 19:09:49 | <hyperisco> | I have never written a program that does IO in Haskell until now lol |
| 2020-10-28 19:09:49 | × | damianfral4 quits (~damianfra@243.red-176-80-34.dynamicip.rima-tde.net) (Ping timeout: 264 seconds) |
| 2020-10-28 19:09:58 | → | tdhttt joins (~tdhttt@2600:8802:2203:2500:49a:4401:3967:ca62) |
| 2020-10-28 19:09:59 | <hyperisco> | you know how Haskell is also a research language? |
| 2020-10-28 19:10:11 | <hyperisco> | so anyways, every exception is a SomeException right? |
| 2020-10-28 19:10:17 | <geekosaur> | yes |
| 2020-10-28 19:10:22 | <hyperisco> | okay then it is fixed |
| 2020-10-28 19:10:51 | <hyperisco> | I am just in two minds that you either have unityped errors or you have checked errors, and checked errors are not really so useful |
| 2020-10-28 19:11:02 | × | thir quits (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2020-10-28 19:11:29 | <hyperisco> | a half-way of unchecked I dunno what type you're throwing is unpleasant |
| 2020-10-28 19:11:39 | <dsal> | I'm a pretty non-fan of checked exceptions. I've gone from "I hate exceptions in Haskell" to "Eh" |
| 2020-10-28 19:12:03 | <dminuoso> | dsal: Are you opposed to the general idea of it, or to specific implementations of it? |
| 2020-10-28 19:12:11 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 2020-10-28 19:12:11 | <dminuoso> | Because why would you willingly discard information? |
| 2020-10-28 19:12:21 | <dsal> | I've only experienced in Java, and most of what I've done there is get rid of things. |
| 2020-10-28 19:13:08 | <dsal> | It just seems to sprawl without bounds and get wrapped in other thing that make it somewhat lossy. I don't think it *can't* be done, but the Java experiment was very bad. |
| 2020-10-28 19:13:10 | <hyperisco> | dminuoso, you'd willingly discard information when there is no decisions to be made on the basis of that information |
| 2020-10-28 19:13:25 | <hyperisco> | because, otherwise, it is extra effort to keep around |
| 2020-10-28 19:13:27 | <geekosaur> | ^ |
| 2020-10-28 19:13:47 | <dminuoso> | hyperisco: Why do decisions need to be made? Isn't it enough to have some kind of proof your program is right? |
| 2020-10-28 19:13:50 | <dsal> | Yeah, like, I'd be fine with a handler somewhere that could infer what exceptions were in scope. |
| 2020-10-28 19:13:58 | <hyperisco> | and it just seems to be that, for many uses, a string message and maybe a stack trace and maybe a source line suffices |
| 2020-10-28 19:14:02 | <dminuoso> | In a similar sense to how type systems dont make active decisions for you, they just filter out bad programs. |
| 2020-10-28 19:14:25 | <dsal> | i.e., when you go to write an exception handler, it would be aware of the things that might be thrown. If you're not writing an exception handler, you shouldn't have to say anything. |
| 2020-10-28 19:14:30 | <dminuoso> | "Oops forgot to catch an exception here" can lead to brittle software in production. |
| 2020-10-28 19:14:53 | <dsal> | I've seen far more bugs from "I was forced to deal with an exception here" than forgetting to catch them. |
| 2020-10-28 19:15:03 | <dsal> | Crashes > bad behavior. |
| 2020-10-28 19:15:13 | <hyperisco> | dminuoso, what is the point of having more than one exception type? |
| 2020-10-28 19:15:16 | <dminuoso> | Not sure whether the > denotes badness or goodness. |
| 2020-10-28 19:15:26 | <rx_> | dminuoso, it seems hard to solve just forgetting to do something |
| 2020-10-28 19:15:35 | <dsal> | Heh. I'd rather have software crash than behave incorrectly. |
| 2020-10-28 19:15:58 | <dminuoso> | dsal: Depends on what the cost of crash recovery is. |
| 2020-10-28 19:16:03 | <dsal> | But I'd be open to "what kinds of crashes might occur here" |
| 2020-10-28 19:16:29 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-28 19:16:40 | <dminuoso> | hyperisco: The same point of having more than one data type? |
| 2020-10-28 19:16:42 | <dsal> | The cost of crash recovery is probably less than the cost of "the software just did the wrong thing that was kind of undefined" |
| 2020-10-28 19:16:52 | <dminuoso> | The ability to pattern match on it, and make decisions. |
| 2020-10-28 19:17:05 | <dsal> | I used to write a lot of erlang, though, where crashing is great. |
| 2020-10-28 19:17:05 | <hyperisco> | dminuoso, I think that is a good hypothesis but my experience is that it does not bear out |
| 2020-10-28 19:17:11 | <dminuoso> | dsal: Id argue that depends greatly on the problem domain of your software. |
| 2020-10-28 19:17:45 | <dminuoso> | hyperisco: So perhaps the right ergonomics haven't been discovered or implemented yet. Im merely suggesting that in principle checked exceptions seems like a desirable thing. |
| 2020-10-28 19:17:57 | <dsal> | Maybe, but I'd think undefined behavior is generally worse than crashed program. |
| 2020-10-28 19:18:10 | <hyperisco> | dminuoso, I found some utility with file system operations, because you can glean the state of the file system (or at least what the state was) by which exception was thrown |
| 2020-10-28 19:18:16 | <dminuoso> | Because I'd rather have my compiler tell me "you have an uncaught exception here" than to discover this at runtime. |
| 2020-10-28 19:18:22 | <dminuoso> | I mean folks, that's precisely why we love our typesystem. |
| 2020-10-28 19:18:27 | <dsal> | dminuoso: I'm not sure I disagree with you in general. It wouldn't be the only thing Java got very wrong. |
All times are in UTC.