Logs: liberachat/#haskell
| 2021-07-29 22:14:45 | → | agua joins (~agua@2804:18:4f:b157:1:0:6976:119) |
| 2021-07-29 22:15:35 | <motle> | and they were like, in some convoluted way shouting "but you can read this ones wallet code right?" |
| 2021-07-29 22:15:59 | <arkanoid> | Drew[m]: you can wrap an unsafe function into a pure one and referential transparency is gone, just like in any other programming language. It is rare I think |
| 2021-07-29 22:16:04 | <motle> | me complaining about its heavy use of lenses |
| 2021-07-29 22:16:31 | <Drew[m]> | Sure there are backdoors to purity but if you actually use them to break referential transparency rather than just things like breaking calls to pure C code out of IO then the chances are it just doesn't do what you wanted it to do |
| 2021-07-29 22:16:57 | <motle> | "i can bore all your staff into writing graphs until they do and then humnity will buy your fricking coins" |
| 2021-07-29 22:17:11 | <Drew[m]> | Which is why in practice there isn't a great rush to use the backdoors to violate RT even if it's technically possible, I think |
| 2021-07-29 22:17:12 | <motle> | he didnt get back to me |
| 2021-07-29 22:17:30 | × | doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 240 seconds) |
| 2021-07-29 22:17:38 | <monochrom> | https://www.rea-group.com/blog/the-abject-failure-of-weak-typing/ has a motivation for ADT. (The "Primitives" section.) |
| 2021-07-29 22:17:44 | × | pesada quits (~agua@2804:14c:8793:8e2f:98cd:a6bd:9d36:17f2) (Ping timeout: 250 seconds) |
| 2021-07-29 22:18:32 | <motle> | jokes on them though right if the values derived from, wait, what was it? |
| 2021-07-29 22:18:44 | <motle> | im sure theres some over here... |
| 2021-07-29 22:18:56 | <monochrom> | TLDR you want "compare :: X -> X -> Ordering" where "data Ordering = LT | EQ | GT". You don't want "compare :: X -> X -> Int". |
| 2021-07-29 22:19:32 | <monochrom> | The whole article is worth reading anyway. |
| 2021-07-29 22:19:50 | <monochrom> | Especially since this is a group of Scala people who are saying that Haskell does it right. |
| 2021-07-29 22:19:57 | <motle> | im sick of this "do your homework fully - conquer money" which is impossible, and the "lol, look he was actually trying" |
| 2021-07-29 22:20:16 | <motle> | like literally |
| 2021-07-29 22:20:34 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) (Remote host closed the connection) |
| 2021-07-29 22:20:46 | <motle> | god job i trashed it i reckon |
| 2021-07-29 22:20:53 | <monochrom> | motle, are you done? |
| 2021-07-29 22:21:00 | × | zeenk quits (~zeenk@2a02:2f04:a008:d600:18f2:3421:bac6:8f38) (Quit: Konversation terminated!) |
| 2021-07-29 22:21:21 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 2021-07-29 22:21:26 | <motle> | what can i say? |
| 2021-07-29 22:21:47 | <monochrom> | You can stop. |
| 2021-07-29 22:21:47 | <arkanoid> | btw if you want to try a procedural language that can enforce kinda purity (does effect tracking), has kinda sum types (object variants), give lots of power (ast based metaprogramming) and is very speed at runtime (compiles to C), I suggesto you to try nim. Warning, quite small community, but it's enjoyable |
| 2021-07-29 22:22:15 | <motle> | thats what i was trying to say i was trying to do... thanks |
| 2021-07-29 22:23:01 | <motle> | unsure... |
| 2021-07-29 22:23:57 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-07-29 22:23:58 | <motle> | depends if it was ever possible i guess |
| 2021-07-29 22:24:10 | ChanServ | sets mode +o monochrom |
| 2021-07-29 22:24:13 | monochrom | sets mode +b *!*@cpc103048-sgyl39-2-0-cust506.18-2.cable.virginm.net |
| 2021-07-29 22:24:13 | motle | is kicked by monochrom (motle) |
| 2021-07-29 22:24:18 | monochrom | sets mode -o monochrom |
| 2021-07-29 22:24:25 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi) |
| 2021-07-29 22:24:34 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9507354aa6404eb54f37.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2021-07-29 22:25:23 | → | pesada joins (~agua@2804:14c:8793:8e2f:98cd:a6bd:9d36:17f2) |
| 2021-07-29 22:25:33 | <justsomeguy> | arkanoid: It's interesting that Ada, which influenced Nim, has seperate constructs for pure expressions and effectul things (like procedures vs functions). |
| 2021-07-29 22:25:34 | × | chomwitt quits (~chomwitt@ppp-94-67-203-142.home.otenet.gr) (Remote host closed the connection) |
| 2021-07-29 22:26:23 | <arkanoid> | justsomeguy: also nim have proc (that have side effect) and func (that has not, it's implicitly a proc with pragma {.noSideEffect.}) |
| 2021-07-29 22:26:59 | <Drew[m]> | Alas, I set motle to ignore so I didn't see what finally got them the boot... |
| 2021-07-29 22:27:02 | <arkanoid> | also there's let for immutable data, and var for mutable |
| 2021-07-29 22:28:34 | × | agua quits (~agua@2804:18:4f:b157:1:0:6976:119) (Ping timeout: 250 seconds) |
| 2021-07-29 22:29:35 | <arkanoid> | I've a question for you experienced haskell programmers. When you write functions, you first write the body and then the declaration/signature, or the other way around? |
| 2021-07-29 22:30:05 | <monochrom> | I do both. And more. |
| 2021-07-29 22:30:21 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 276 seconds) |
| 2021-07-29 22:30:52 | <sm> | most often the name and type signature first for me, but it can be done either way |
| 2021-07-29 22:30:54 | <arkanoid> | I started writing the declaration first and body later, but then I realised that if I don't write the declaration vs code suggests me much more generic declaration that I didn't even realize it was possible |
| 2021-07-29 22:31:34 | <sm> | nailing down the types early clarifies your thinking cheaply and ensures the best error messages |
| 2021-07-29 22:31:55 | <Drew[m]> | You can always write the type annotation, write the code, then delete the type annotation and have the compiler hand you the most general one it can infer |
| 2021-07-29 22:31:55 | <sm> | but sometimes the types are too hard and it's easier to implement and then ask ghc what they are |
| 2021-07-29 22:32:12 | × | roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) (Remote host closed the connection) |
| 2021-07-29 22:32:20 | <monochrom> | Let's reduce this to the general question of top-down-waterfall vs bottom-up-evolve. |
| 2021-07-29 22:32:35 | → | dajoer joins (~david@user/gvx) |
| 2021-07-29 22:32:43 | <monochrom> | For which we know of a very clear answer. |
| 2021-07-29 22:32:49 | → | roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) |
| 2021-07-29 22:33:12 | <monochrom> | If you're still exploring your options of course it's bottom-up-evolve don't-be-afraid-to-break-things-and-change-your-mind. |
| 2021-07-29 22:33:20 | <sm> | top down and bottom up are both perfectly valid tactics, i wouldn't tie them to waterfall or evolve |
| 2021-07-29 22:33:54 | <monochrom> | If you have already received a clear unchangable non-negotiatble specification, clearly it's top-down-waterfall. |
| 2021-07-29 22:34:11 | × | roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) (Remote host closed the connection) |
| 2021-07-29 22:34:23 | → | roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) |
| 2021-07-29 22:35:18 | <arkanoid> | sure but there's a big difference in thinking with types and thining with typeclasses. If I let ghc infer the types, I do realize more the properties required to the used types |
| 2021-07-29 22:35:26 | <hpc> | and if you have an unclear everchanging non-negotiable set of empty jira tickets, that's agile |
| 2021-07-29 22:35:38 | <monochrom> | :) |
| 2021-07-29 22:35:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds) |
| 2021-07-29 22:36:19 | <sm> | arkanoid: it's a back and forth conversation with the compiler as your assistant, sometimes |
| 2021-07-29 22:36:38 | → | paravida joins (~myChateau@user/paravida) |
| 2021-07-29 22:37:12 | <bryan[m]> | I also use both ways |
| 2021-07-29 22:38:02 | <Drew[m]> | arkanoid: That's why I'd say write the type annotations then delete and have the compiler generalize. If you know the shape of the function you are looking for then writing out the type allows the compiler to help you write it with typed holes. Once a function is written the compiler is probably the best thing for figuring out what the most general type the implementation can have is. |
| 2021-07-29 22:38:06 | <bryan[m]> | I tend to start with thinking about the types first, since they're also really good to look at first when working with existing code |
| 2021-07-29 22:38:22 | <arkanoid> | got it. Actually it's the first time I meet such a gentle, clear and intelligent compiler. It's always surprising to see how the typeclasses gets inferred. It's feels more like an old professor than a cold robot |
| 2021-07-29 22:39:09 | <monochrom> | But I aspire to be a cold old professor robot. |
| 2021-07-29 22:39:23 | <justsomeguy> | I get bitten by "cannot construct the infinite type ..." a lot, lately. |
| 2021-07-29 22:40:09 | <Drew[m]> | I always say, all those errors aren't you having a fight with the compiler, its having a gentle conversation with your friend the compiler who is asking you to clarify exactly what you meant |
| 2021-07-29 22:40:20 | <monochrom> | onoes ghcup new version |
| 2021-07-29 22:40:30 | <Drew[m]> | Ok sometimes it's a fight with the compiler |
| 2021-07-29 22:40:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-07-29 22:41:44 | <monochrom> | Haha new addition "ghcup nuke" |
| 2021-07-29 22:42:08 | <arkanoid> | thanks for the conversation, I need some sleep now. I hope to be able to pick up haskell again in the future to actually write something more than a week-long experiment |
| 2021-07-29 22:42:27 | <monochrom> | You know, "nuke" is the wrong metaphor because nuclear winter and fallouts and... |
| 2021-07-29 22:42:28 | <davean> | monochrom: That fuck with your drive's OPAL settings? |
| 2021-07-29 22:42:38 | <monochrom> | I don't know! I haven't tried. |
| 2021-07-29 22:42:46 | <davean> | Theres definately fallout if it does |
| 2021-07-29 22:43:29 | <monochrom> | But what are OPAL settings? |
| 2021-07-29 22:43:45 | <sm> | arkanoid: good luck. give it time, it takes more than other languages |
| 2021-07-29 22:44:09 | <monochrom> | https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/135 may state the exact feature. |
| 2021-07-29 22:44:57 | × | roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) (Remote host closed the connection) |
| 2021-07-29 22:45:19 | <arkanoid> | sm: I have strong feeling that I will search haskell features from now on with every other language |
| 2021-07-29 22:45:29 | → | roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) |
| 2021-07-29 22:45:41 | <sm> | yup! |
| 2021-07-29 22:45:46 | <Drew[m]> | monochrom well global thermonuclear war is dirty in terms of radioactive fallout, but very cleansing in terms of life |
| 2021-07-29 22:45:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 2021-07-29 22:46:10 | × | roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) (Read error: Connection reset by peer) |
| 2021-07-29 22:46:13 | → | agua joins (~agua@2804:18:4f:b157:1:0:6976:119) |
| 2021-07-29 22:46:23 | → | roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:1557:b33d:ca8c:dfa4) |
| 2021-07-29 22:46:25 | <sm> | Drew: lol way to see the silver lining |
| 2021-07-29 22:46:33 | <monochrom> | :) |
| 2021-07-29 22:46:41 | <monochrom> | Eveery silver lining has tarnish. |
| 2021-07-29 22:48:01 | × | dfg quits (dfg@user/dfg) (Quit: I hate quit messages.) |
| 2021-07-29 22:48:42 | × | pesada quits (~agua@2804:14c:8793:8e2f:98cd:a6bd:9d36:17f2) (Ping timeout: 240 seconds) |
All times are in UTC.