2022/03/22

2022-03-22 00:00:02 +0100 <Axman6> pavonia: I'm not sure I understand - if a string exists in the set, then finding all prefixes of that string is trivial
2022-03-22 00:00:08 +0100 <Axman6> isn't that what you want?
2022-03-22 00:00:25 +0100 <jackdk> Axman6: nix isn't that magical
2022-03-22 00:01:06 +0100 <Axman6> just that it even compiles with a compiler which is like a decade older than the one it was written against
2022-03-22 00:01:50 +0100 <boxscape_> weird to see source files without extensions enabled, but that probably helps
2022-03-22 00:02:02 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 240 seconds)
2022-03-22 00:02:04 +0100 <boxscape_> s/extensions enabled/enabled extensions
2022-03-22 00:02:09 +0100 <pavonia> Axman6: I want to find a partition of a string such that it consists of only strings from the set
2022-03-22 00:02:33 +0100 <Axman6> I shouldn't've hiden the constructors in that package
2022-03-22 00:02:39 +0100 <Axman6> hidden*
2022-03-22 00:04:25 +0100 <jackdk> Axman6: I get it, I was making a joke that you were amazed at getting precompiled anything from nix. You should do another release.
2022-03-22 00:04:32 +0100 <abastro[m]> So the equal branch is for the strings starting with that char, right?
2022-03-22 00:04:39 +0100 <Axman6> yep
2022-03-22 00:04:55 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 256 seconds)
2022-03-22 00:05:21 +0100alp(~alp@user/alp) (Ping timeout: 245 seconds)
2022-03-22 00:05:26 +0100 <Axman6> in the map case, you end up with all the keys with the same prefix sharing that prefix in the structure, and you only branch when there's a differing character
2022-03-22 00:07:09 +0100 <pavonia> e.g. given ["a", "ab", "bc"] and "abc" as input string, a partiton is "a|bc". Checking the longest prefix first wouldn't give a correct result
2022-03-22 00:07:10 +0100 <abastro[m]> So that package is what pavonia want if the constructors were exposed
2022-03-22 00:07:57 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 00:08:37 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-03-22 00:08:59 +0100 <Axman6> pavonia: given ["a", "ab", "bc"] and "abc", what output do you expect?
2022-03-22 00:09:22 +0100 <geekosaur> pavonia showed it, "a|bc"
2022-03-22 00:09:23 +0100 <pavonia> ["a", "bc"]
2022-03-22 00:09:24 +0100 <Axman6> because it sounds like I haven't understood the question you're asking if a ternary tree doesn't solve your problem
2022-03-22 00:09:33 +0100 <Axman6> sure, but I'm not sure what that means
2022-03-22 00:09:40 +0100 <abastro[m]> Oh. So ternary breaks down for the suffix part
2022-03-22 00:10:07 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-03-22 00:10:07 +0100 <Axman6> given ["ab", "bc"] and "abc", what should the output be?
2022-03-22 00:10:18 +0100 <abastro[m]> I guess it would error
2022-03-22 00:10:21 +0100 <pavonia> Axman6: It's like building the input string from strings of the set. Imagine a set of Lego bricks to build the final result from
2022-03-22 00:10:38 +0100 <abastro[m]> Because both the prefix and suffix part is supposed to be in the set
2022-03-22 00:10:41 +0100 <pavonia> Yeah, that wouldn't give legal result
2022-03-22 00:11:26 +0100 <Axman6> but given ["ab", "bc", "c"] and "abc", you'd get back ["ab","c"]?
2022-03-22 00:11:26 +0100 <pavonia> extra credits if it would give *all* possible partitions if there are multiple
2022-03-22 00:11:38 +0100 <pavonia> Axman6: Yep
2022-03-22 00:11:52 +0100 <Axman6> that's definitely doable with a ternary tree, in both cases
2022-03-22 00:12:01 +0100 <geekosaur> mm, I'm now imagining somnething in the list monad
2022-03-22 00:12:03 +0100 <Axman6> (not using my package, I didn't expose enough)
2022-03-22 00:13:00 +0100 <abastro[m]> Idk perhaps just split at arbitrary place and check if both prefix and suffix are in the set
2022-03-22 00:13:03 +0100 <pavonia> I imagine this is a common problem so I guessed there would already be a package for that
2022-03-22 00:13:06 +0100 <Axman6> you take your string, and traverse the tree as far as possible while the prefix matches, once it doesn't match, return that prefix, and the remaining suffix, and do the same thing again
2022-03-22 00:13:13 +0100 <abastro[m]> Ternary tree does make it easier for prefix
2022-03-22 00:13:13 +0100 <Axman6> returning all matches is also trivial
2022-03-22 00:13:29 +0100 <Axman6> pavonia: it's literally a problem I've never heard of :P
2022-03-22 00:13:39 +0100 <pavonia> :S
2022-03-22 00:14:12 +0100 <abastro[m]> You need to check if suffix exists as well
2022-03-22 00:14:45 +0100machinedgod(~machinedg@24.105.81.50)
2022-03-22 00:15:25 +0100 <abastro[m]> Btw how does scala's performance compare with haskell
2022-03-22 00:16:15 +0100 <abastro[m]> In a algorithm problem solving site, scala has done poorly in performance. I wonder how haskell would have faired if it was supported
2022-03-22 00:16:44 +0100 <Axman6> Scala's developer performance is fucking attrocious.
2022-03-22 00:17:02 +0100 <Axman6> I cannot state just how much of a dogshit language Scala is
2022-03-22 00:17:35 +0100 <energizer> what is developer performance?
2022-03-22 00:17:56 +0100 <jackdk> don't worry about it, unless you're doing something wild. There were gnarly Haskell solutions on shootout.alioth.debian.org or whatever it was, but they were all highly tuned. Naive haskell is faster than python/ruby/whatever and you'll be dominated by good data structures etc outside microbenchmarks
2022-03-22 00:18:14 +0100 <Axman6> developer productivity, the language and one of the libraries we're using at work have cost our project literally years of development time because of how fucked it all is.
2022-03-22 00:18:17 +0100 <jackdk> energizer: how hard the language makes the developer work to produce an acceptable solution to a problem
2022-03-22 00:19:13 +0100 <abastro[m]> I mean, the time spent performance of scala
2022-03-22 00:19:14 +0100 <abastro[m]> That and memory
2022-03-22 00:19:20 +0100 <Axman6> it makes me angry that anyone could even consider it a reasonable language. It's what you'd get if you took Haskell and Java and kept only the worst, most complex parts of both. it's insanely complex, with only C++ beating it in terms of complexity
2022-03-22 00:19:28 +0100 <abastro[m]> Because it never beats python there
2022-03-22 00:19:56 +0100 <Axman6> abastro[m]: my point is that it doesn't even matter if the language makes you want to tear your eyes out (or quit, in my case, I've come very close purely because of how fucked working with Scala is)
2022-03-22 00:20:01 +0100 <abastro[m]> I mean, it is literally the only FP option in my country
2022-03-22 00:20:11 +0100 <energizer> https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html
2022-03-22 00:20:15 +0100 <geekosaur> not even F#
2022-03-22 00:20:16 +0100 <geekosaur> ?
2022-03-22 00:20:20 +0100 <Axman6> or Rust?
2022-03-22 00:20:24 +0100segfaultfizzbuzz(~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8)
2022-03-22 00:20:29 +0100 <Axman6> or lisp? or OCaml?
2022-03-22 00:20:30 +0100 <abastro[m]> F# is considered as dead language
2022-03-22 00:20:40 +0100 <abastro[m]> No lisp. No ocaml
2022-03-22 00:20:42 +0100 <geekosaur> and scala isn't?
2022-03-22 00:20:43 +0100 <Axman6> which country, if you dosn't mind me asking?
2022-03-22 00:20:47 +0100xff0x(~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 256 seconds)
2022-03-22 00:20:49 +0100 <abastro[m]> Rust is just began to be considered
2022-03-22 00:21:00 +0100 <abastro[m]> And somehow scala got afloat thanks to java
2022-03-22 00:21:03 +0100 <Axman6> scala deserves to be a dead language more than any language that has ever died
2022-03-22 00:21:05 +0100 <abastro[m]> It is South Korea
2022-03-22 00:21:25 +0100 <abastro[m]> Wow, you dislike scala quite a bit
2022-03-22 00:21:26 +0100 <Axman6> Move south to Japan, plenty of Haskell there =)
2022-03-22 00:21:38 +0100 <segfaultfizzbuzz> is there such thing as an instruction set which is total? (i'm not sure how to avoid trivial definitions of totality here...)
2022-03-22 00:21:44 +0100 <abastro[m]> Well if only that was feasible
2022-03-22 00:22:01 +0100 <abastro[m]> It is as easy to move to US altogether
2022-03-22 00:22:10 +0100 <segfaultfizzbuzz> meaning that you can do a many/most computations in the instruction set but you cannot perform computations which are turing complete
2022-03-22 00:22:39 +0100 <monochrom> Yeah Japan doesn't like immigrants or even work visa.
2022-03-22 00:23:09 +0100alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-03-22 00:23:13 +0100 <monochrom> Moving to US is actually less difficult.
2022-03-22 00:23:26 +0100 <Axman6> it does if you don't tell them >_>
2022-03-22 00:23:40 +0100 <monochrom> Well, apart from work visa for teaching English. OK I'll stop being off-topic, sorry!
2022-03-22 00:23:40 +0100 <geekosaur> hm, ladder logic?
2022-03-22 00:24:01 +0100 <jackdk> Dhall does this, and it's more of a design philosophy than a useful result. Having to write all list functions in terms of foldr is a bit annoying.
2022-03-22 00:24:22 +0100 <jackdk> And a non-turing-complete language can still write busy-beaver-esque programs that take more time than you have to execute
2022-03-22 00:25:00 +0100 <segfaultfizzbuzz> so the turing/non-turing distinction is moot?
2022-03-22 00:25:08 +0100 <jackdk> also, a lambda calculus is not an instruction set
2022-03-22 00:25:10 +0100 <abastro[m]> Actually leetcode accepts racket, I might try that
2022-03-22 00:25:26 +0100 <monochrom> Does Calculus of Construction count as an "instruction set"? :)
2022-03-22 00:25:48 +0100 <jackdk> in my worldview, maybe, but it's still an important theoretical result. I would rather say: "input your program, I'll let you run it for 500 reduction steps" or whatever.
2022-03-22 00:27:12 +0100 <segfaultfizzbuzz> maybe the answer here is that there is no useful constrained way of computing?
2022-03-22 00:27:16 +0100 <abastro[m]> At least having total language makes proofs more reliable
2022-03-22 00:27:32 +0100 <jackdk> Did I not just provide an alternative constraint on computing?
2022-03-22 00:27:45 +0100 <monochrom> But yeah my philosophy opinion (influenced by my thesis supervisor) is also that "it terminates but god knows how long it takes" is a pretty useless thing to know.
2022-03-22 00:28:21 +0100 <segfaultfizzbuzz> so maybe you always need a wallclock time constraint?
2022-03-22 00:28:22 +0100 <Axman6> segfaultfizzbuzz: I have a feeling that thight might be somewhat relevant: https://www.youtube.com/watch?v=96o8G5dVCaM&list=PLIpl4GKFQR6fg3CBx65LXnj3gz2MFNN5O&index=18
2022-03-22 00:28:24 +0100 <abastro[m]> Is it globally true that C# is losing off to Java?
2022-03-22 00:28:40 +0100 <geekosaur> segfaultfizzbuzz, did you look at ladderlogic as I suggested?
2022-03-22 00:28:46 +0100 <Axman6> it covers how plutus is a total languiage by construction (I think, I'm pretty sure this is the talk I was looking for)
2022-03-22 00:28:48 +0100 <jackdk> monochrom: Exactly. The influence of a design philosophy that sets out to make a non-TC language like Dhall is more important IMHO - people don't try to write overly-complicated things
2022-03-22 00:28:55 +0100 <segfaultfizzbuzz> axman6: yes i am looking at ladder logic at the moment.
2022-03-22 00:29:29 +0100 <segfaultfizzbuzz> lol ladder logic ranked #50 out of 52 programming languages in popularity lol ;-)
2022-03-22 00:29:33 +0100 <geekosaur> infinite loops and such are pretty much forbidden because they lead to things like train collisions
2022-03-22 00:29:59 +0100 <monochrom> Fortunately, in practice, even highly theoretical mathematicians don't really mean to be that useless. Observe that whenever their theorem states "it terminates", the time bound is somewhere in the proof. It is their culture that you are supposed to look at the proofs too, not just the anti-climatic theorem statement.
2022-03-22 00:30:11 +0100 <geekosaur> it's still highly important as a result
2022-03-22 00:30:31 +0100 <Axman6> hmmm, maybe that's not the talk I was after... skimming isn't showing me what I remember
2022-03-22 00:30:46 +0100 <segfaultfizzbuzz> axman6: yeah i don't see the relevance of cardano here hehe ;-)
2022-03-22 00:31:00 +0100 <abastro[m]> Typical Mathematicians do not deal with computation/termination, soo
2022-03-22 00:31:10 +0100 <monochrom> But yes, it's their strange culture that they speak like "Theorem: There exists an algorithm for regex emptiness" and the algorithm is not part of the theorem, just part of the proof.
2022-03-22 00:31:29 +0100 <segfaultfizzbuzz> i don't like/can't make sense of non-constructive mathematics
2022-03-22 00:31:43 +0100 <abastro[m]> Oh so computer scientists I guess
2022-03-22 00:31:54 +0100 <abastro[m]> Eh, nonconstructive math is how 90% of math is done so
2022-03-22 00:31:55 +0100 <abastro[m]> Idk
2022-03-22 00:32:06 +0100 <segfaultfizzbuzz> yeah, for now. i don't believe that real numbers exist, for example
2022-03-22 00:33:15 +0100 <abastro[m]> Like, In my uni, there is no one doing constructive mathematics
2022-03-22 00:33:25 +0100 <segfaultfizzbuzz> for now ;-)
2022-03-22 00:33:34 +0100 <abastro[m]> Hehe
2022-03-22 00:33:44 +0100 <geekosaur> numbers don't exist. you cannot show me a three.
2022-03-22 00:34:02 +0100 <monochrom> There are "computer scientists" who are secretly mathematicians but they joined the computer science department because more funding. It means they go on to do what mathematicians do, especially culture, manners, styles.
2022-03-22 00:34:18 +0100 <segfaultfizzbuzz> hahaha
2022-03-22 00:34:28 +0100 <abastro[m]> The uni might cease to exist before constructive mathematics
2022-03-22 00:34:55 +0100 <monochrom> Stephen Cook explicitly admitted, when asked, "yeah both the math department and the cs department made me offers. I chose the cs department because more research funding". That does it.
2022-03-22 00:35:07 +0100 <abastro[m]> Btw my uni head praises scala for its combination of FP and OOP
2022-03-22 00:35:28 +0100 <abastro[m]> * my uni CS head praises
2022-03-22 00:35:36 +0100 <Axman6> he absolutely should not do that
2022-03-22 00:35:41 +0100 <Axman6> (or she)
2022-03-22 00:36:02 +0100 <abastro[m]> As a professor of Programming Language, she advocates Scala
2022-03-22 00:36:10 +0100 <abastro[m]> And that is how I learned scala
2022-03-22 00:36:42 +0100 <abastro[m]> Tbh I think `.flatMap` thing is interesting, at least.
2022-03-22 00:37:32 +0100 <abastro[m]> Other than that.. meh
2022-03-22 00:37:59 +0100 <boxscape_> which aspect of .flatMap are you referring to?
2022-03-22 00:38:13 +0100 <abastro[m]> That you can chain
2022-03-22 00:38:15 +0100 <Axman6> I find using .flatMap over do notation/for comprehensions really painful
2022-03-22 00:38:23 +0100acidjnk(~acidjnk@p200300d0c7049f41b9198ff49f7dde11.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-03-22 00:38:39 +0100 <Axman6> I think I've only used it once to essentially build join for Maybe/Option
2022-03-22 00:38:41 +0100 <boxscape_> I suppose with record dot notation similar things are becoming possible in Haskell, though not necessarily widespread
2022-03-22 00:38:47 +0100 <abastro[m]> Ya true, but interesting nonetheless
2022-03-22 00:38:58 +0100 <segfaultfizzbuzz> axman6: trying to understand how ladder logic would differ from simply a fixed logic statement here
2022-03-22 00:39:19 +0100 <monochrom> I teach students >>= without do-notation. Perhaps it's just as painful? >:)
2022-03-22 00:39:42 +0100 <Axman6> I don't know what ladder logic is, so I won't be of any use to you :P
2022-03-22 00:40:02 +0100 <abastro[m]> A few more language rant: Many ppl in my country advocates Go, Python, JS as the next big language after Java. Rust is a bit forgotten.
2022-03-22 00:40:12 +0100 <Axman6> the necessity of using brackets with flatMap makes it really gross
2022-03-22 00:40:29 +0100 <geekosaur> Axman6, I think segfaultfizzbuzz confused us
2022-03-22 00:40:29 +0100 <segfaultfizzbuzz> Microsoft Visual Functional Basic is the next great language
2022-03-22 00:40:42 +0100 <dolio> Knowing something terminates, but not knowing how long it would take, can be useful.
2022-03-22 00:40:42 +0100 <abastro[m]> Lmao
2022-03-22 00:40:50 +0100 <dolio> It means you don't have to wait to see if it terminates.
2022-03-22 00:40:53 +0100 <monochrom> Ugh, Go Python JS were the next big language last decade already. :)
2022-03-22 00:41:15 +0100 <Axman6> Scala has not surpassed Go in my language hatred ranking. Go is simply insulting to developers, it assumes they are dumb and can't handle abstraction, but I'd take it over Scala I think... only just
2022-03-22 00:41:18 +0100 <abastro[m]> Ya I mean my country is slow, I guess
2022-03-22 00:41:41 +0100 <segfaultfizzbuzz> Microsoft Visual Functional Basic is Visual Basic but with functional features, in the same way that scala is java with functional features
2022-03-22 00:41:49 +0100 <abastro[m]> "Go is so simple, it is great. It is also made by google geniuses" :facepalm:
2022-03-22 00:42:07 +0100 <jackdk> monochrom: I agree with "teach >>= first". Then I go "here's the best layout I've found for >>=, but isn't it annoying to write all these nested lambdas?" And then I show the translation into do-notation.
2022-03-22 00:42:11 +0100 <geekosaur> sounds like about the intelligence level it was aimed at
2022-03-22 00:42:25 +0100 <dolio> For instance, if you prove `a ~ b` to GHC, but it has to evaluate the Ackermann function to get the proof witness, it has to actually evaluate it to avoid doing something unsound.
2022-03-22 00:42:45 +0100 <Axman6> I was at uni when Go was announced, and Andrew whatshisface, one of the main developers came and gave a talk, and even back then, I remember thinking "how the fuck can a modern language not have generics???" I might have even asked him something along those lines
2022-03-22 00:43:01 +0100 <dolio> Because it doesn't know that your proof is legitimate until it fully evaluates it.
2022-03-22 00:43:04 +0100 <monochrom> I do respect Go for being simple.
2022-03-22 00:43:10 +0100 <segfaultfizzbuzz> abatro[m]: have you used Functional Go ?
2022-03-22 00:43:12 +0100 <abastro[m]> They say, generics are too hard
2022-03-22 00:43:18 +0100 <monochrom> But worship of big corporations is unhealthy.
2022-03-22 00:43:19 +0100 <boxscape_> @do teach >>= first
2022-03-22 00:43:19 +0100 <lambdabot> do { a <- teach; first a}
2022-03-22 00:43:24 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-03-22 00:43:40 +0100 <abastro[m]> Idk, ppl nowadays dislike any hard concepts I guess
2022-03-22 00:43:41 +0100 <segfaultfizzbuzz> Functional Go is Go with mapreduce and serverless lambdas.
2022-03-22 00:43:53 +0100 <abastro[m]> Eww
2022-03-22 00:44:08 +0100 <monochrom> But it may take another couple of centuries for East Asia to grow out of worshipping authorities.
2022-03-22 00:44:13 +0100 <jackdk> Axman6: I remember hearing a similar story involving Java's announcement and Bertrand Meyer
2022-03-22 00:44:19 +0100 <Axman6> IMO it feels like Go is intentionally contrarian to the entire field of PL research
2022-03-22 00:44:54 +0100 <abastro[m]> Yea, because of their "research is bad"
2022-03-22 00:44:55 +0100 <boxscape_> the only thing I know about Go is that reddit post where someone faked generics by using type names with symbols that look like < and > but are actually letters
2022-03-22 00:45:19 +0100 <Axman6> just for the sake of it, the idea that even novice programmers can't understand the idea of a structurew that can hold any type and being able to write function which work on those structures no matter what the type contained is, is ludacris
2022-03-22 00:45:44 +0100 <geekosaur> segfaultfizzbuzz, ladder logic is a bit more than a fixed logic statement, and in particular you can implement math in it (but you have limits on what you can do with it)
2022-03-22 00:45:53 +0100 <Axman6> boxscape_: that was legendary - using Canadian Aboriginal characters to ram generics into Go
2022-03-22 00:46:09 +0100 <boxscape_> yeah
2022-03-22 00:46:12 +0100 <abastro[m]> Dunno, there are def ppl who have hard time comprehending those structures
2022-03-22 00:46:19 +0100 <boxscape_> though apparently a proposal to add generics has been accepted https://github.com/golang/go/issues/43651#issuecomment-776944155
2022-03-22 00:46:43 +0100 <abastro[m]> Gophers hate generics being introduced l
2022-03-22 00:46:46 +0100 <abastro[m]> Lol
2022-03-22 00:46:49 +0100 <segfaultfizzbuzz> geekosaur: implement math...?
2022-03-22 00:46:56 +0100 <hpc> yeah, it seems like some hiring manager looked at the success rate of fizzbuzz and thought google was missing out on some valuable talent
2022-03-22 00:47:11 +0100 <segfaultfizzbuzz> geekosaur: you mean you can perform arithmetic with it (but you can't with ordinary logic statements...?)
2022-03-22 00:47:11 +0100 <Axman6> yeah generics is finally coming, but it should have been there since day one - particularly since they _already are_ in the language, but the Go devbelopers have decided you are too stupid to use them, only maps can
2022-03-22 00:47:27 +0100 <Axman6> hpc: snap, far too accurate
2022-03-22 00:47:31 +0100 <boxscape_> hmm sounds vaguely reminiscent of Elm
2022-03-22 00:47:36 +0100 <segfaultfizzbuzz> Rob Pike said HKT are coming to Go in 2024
2022-03-22 00:47:41 +0100 <geekosaur> wikipedia showed how to implement nand, once you have nand you can build full adders
2022-03-22 00:48:02 +0100 <geekosaur> and once you have those you can go on to subtraction and multiplication. division is a bit harder
2022-03-22 00:48:17 +0100 <abastro[m]> "Go is great at asynchronous programming"
2022-03-22 00:48:24 +0100 <abastro[m]> Gah I dislike these days
2022-03-22 00:49:03 +0100 <Axman6> abastro[m]: that's also nonsense, it has one tool, and it is often not a good tool for concurrency. Language like Haskell and Ada both embarrass Go's concurrency model
2022-03-22 00:49:28 +0100 <abastro[m]> I wonder what kind of panic they would have after seeing haskell code. Like they would say "The hell is this mess"
2022-03-22 00:49:41 +0100 <abastro[m]> Just because non-C syntax & declarativeness
2022-03-22 00:49:50 +0100 <geekosaur> I suspect you'd get more like that paper quote from a couple hours ago
2022-03-22 00:49:59 +0100 <Axman6> I remember years ago someone making a post showing how some really trivial concurrent programming problem was literallyt impossible in go, because the abstractions of goroutines and channels weren't universal enough. Can't remember what the problem was, but it was pretty simepl
2022-03-22 00:50:05 +0100 <zzz> what . do (you $ mean) -- ?
2022-03-22 00:50:40 +0100 <hpc> Axman6: remember the async "what color is your function" javascript post?
2022-03-22 00:50:43 +0100 <Axman6> zzz: I hate that that is syntactically valid, and I can unnderstand what it would do
2022-03-22 00:50:43 +0100 <hpc> that one was painful too
2022-03-22 00:50:54 +0100 <Axman6> not sure I've seen that
2022-03-22 00:51:03 +0100 <abastro[m]> Hm, I guess, perhaps I was bad in showing scala code
2022-03-22 00:51:24 +0100 <abastro[m]> Tho I don't expect much for ppl who worship Go
2022-03-22 00:51:28 +0100 <hpc> it was something along the lines of synchronous functions are blue, async functions are red, and here's some annoyingly specific rules about how to combine them
2022-03-22 00:51:49 +0100 <hpc> and it gets thiiiiis close to saying "monad" and then doesn't make the connection and just goes off into more random details
2022-03-22 00:51:50 +0100 <segfaultfizzbuzz> the future is functional golang with hkt on the jvm on v8 on webassembly
2022-03-22 00:51:55 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 00:52:02 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 00:52:14 +0100 <Axman6> ha
2022-03-22 00:52:44 +0100 <hpc> end result, not really explaining async at all anyway
2022-03-22 00:52:46 +0100 <monochrom> No, the future is everyone trash-talking each other.
2022-03-22 00:52:56 +0100 <jackdk> monochrom: The future is now
2022-03-22 00:53:20 +0100 <Axman6> the future will be fulfilled, that is its promise
2022-03-22 00:53:58 +0100 <abastro[m]> Tbh seeing Go's success, I think something like Scratch would be the next big language
2022-03-22 00:53:58 +0100 <abastro[m]> Sincerely.. ppl love not having to learn much
2022-03-22 00:54:09 +0100 <geekosaur> logo
2022-03-22 00:54:20 +0100 <abastro[m]> Async color haha
2022-03-22 00:54:31 +0100 <geekosaur> the next browserwill be implemented with turtle graphics :þ
2022-03-22 00:54:39 +0100 <hpc> i want to see rust be the winner in all these silly language wars
2022-03-22 00:54:58 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-03-22 00:55:13 +0100 <abastro[m]> I love the github issue about how they aren't going to allow monad semantics in promise
2022-03-22 00:55:24 +0100 <hpc> it respects the programmer enough to be a more powerful tool instead of a simpler tool with a rubber handle
2022-03-22 00:55:31 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2022-03-22 00:55:33 +0100 <segfaultfizzbuzz> hpc: me too, sort of. the problem i ran into is that there is no way i will never be intelligent enough to write correct unsafe code, and i'm not sure anyone else ever will be either
2022-03-22 00:55:40 +0100 <hpc> and it just seems like the people developing it are way more concerned about solving the real problems of language
2022-03-22 00:55:50 +0100 <abastro[m]> Interesting that many of you like Rust
2022-03-22 00:56:02 +0100 <abastro[m]> Perhaps I should really try it.. someday
2022-03-22 00:56:19 +0100 <segfaultfizzbuzz> if haskell was reimplemented with the DX of rust i think it would be my fav lang
2022-03-22 00:56:20 +0100 <hpc> instead of being the n-th vaguely buggy inconsistent implementation of a third of ADTs
2022-03-22 00:56:23 +0100 <abastro[m]> Tho it is not FP
2022-03-22 00:56:30 +0100 <Axman6> I need to take some time to learn rust, there's a lot of interesting stuff there, particularly for someone who enjoys low level programming
2022-03-22 00:56:38 +0100 <segfaultfizzbuzz> abastro[m]: rust is my go-to language these days
2022-03-22 00:56:58 +0100 <hpc> segfaultfizzbuzz: pun intended?
2022-03-22 00:57:10 +0100 <segfaultfizzbuzz> hpc: which pun?
2022-03-22 00:57:13 +0100 <hpc> goto
2022-03-22 00:57:21 +0100 <segfaultfizzbuzz> oh, go-to, haha. maybe double or triple entendre
2022-03-22 00:57:23 +0100 <abastro[m]> Ya, I was avoiding rust because it is more imperative than functional
2022-03-22 00:57:36 +0100grimey(~grimey@pool-108-26-35-23.syrcny.east.verizon.net) (Ping timeout: 268 seconds)
2022-03-22 00:57:44 +0100 <hpc> abastro[m]: don't - it feels very functional when you go to actually use it imo
2022-03-22 00:57:44 +0100 <segfaultfizzbuzz> abastro[m]: i think there is some kind of joke about haskell being an imperative language...
2022-03-22 00:58:01 +0100mvk(~mvk@2607:fea8:5cc3:7e00::7980)
2022-03-22 00:58:03 +0100 <hpc> like you're always in a do block, rather than always in a vaguely fancy bash prompt
2022-03-22 00:58:12 +0100 <Axman6> yeah I've always considered rust mildly functional
2022-03-22 00:58:16 +0100 <segfaultfizzbuzz> is haskell a vaguely fancy bash prompt?
2022-03-22 00:58:41 +0100 <hpc> haskell makes me wish i paid more attention in my math classes
2022-03-22 00:58:51 +0100 <hpc> it feels like what math could have been if i didn't go with CS
2022-03-22 00:58:51 +0100 <segfaultfizzbuzz> hpc: to what...?
2022-03-22 00:58:53 +0100 <geekosaur> there used to be a joke about haskell being the best imperative language, yes
2022-03-22 00:59:01 +0100 <hpc> geekosaur: that's my joke!
2022-03-22 00:59:07 +0100 <geekosaur> I'm not sure if xmonad is an argument for or against that. :þ
2022-03-22 00:59:10 +0100 <hpc> haskell is the best imperative language and perl's the best functional language
2022-03-22 00:59:13 +0100 <monochrom> Ugh that's SPJ's joke...
2022-03-22 00:59:22 +0100 <hpc> monochrom: oh, TIL
2022-03-22 00:59:31 +0100 <geekosaur> thought SPJ's was that excel was the best functional language
2022-03-22 00:59:34 +0100 <monochrom> But you can have the perl one :)
2022-03-22 00:59:43 +0100 <hpc> haha, i will grant that excel is pretty great
2022-03-22 00:59:44 +0100 <abastro[m]> I mean, first order function is harder to apply in rust iirc
2022-03-22 00:59:59 +0100 <hpc> it's like invisible programming
2022-03-22 01:00:03 +0100 <abastro[m]> Also no monad trair in rust
2022-03-22 01:00:03 +0100 <segfaultfizzbuzz> SPJ says that the next haskell will be strict, while the idris dude says that the next idris (which i have been told is the next haskell) will be nonstrict *eyes crossing*
2022-03-22 01:00:25 +0100 <segfaultfizzbuzz> abastro[m]: why? have you looked at itertools?
2022-03-22 01:00:27 +0100Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-03-22 01:00:27 +0100 <energizer> i never understood why nobody uses haskell as a system shell
2022-03-22 01:00:41 +0100werneta_(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-03-22 01:00:52 +0100 <hpc> energizer: nothing beats bash for just writing a command and making stuff happen
2022-03-22 01:01:04 +0100 <hpc> its default mode is exec()
2022-03-22 01:01:04 +0100 <energizer> good joke
2022-03-22 01:01:08 +0100 <abastro[m]> Itertools? How do you use it?
2022-03-22 01:01:21 +0100 <geekosaur> now I'm reminded of the old NOTES entry in the v7 unix m4 manpage
2022-03-22 01:01:29 +0100 <hpc> every other plausible shell's default mode is variable-level
2022-03-22 01:01:35 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-03-22 01:01:47 +0100 <geekosaur> referring to m4 -e
2022-03-22 01:01:47 +0100 <segfaultfizzbuzz> abastro[m]: https://docs.rs/itertools/latest/itertools/ it's a haskell-y/functional way of iterating on collections
2022-03-22 01:02:14 +0100 <segfaultfizzbuzz> itertools is zip, join, fold, etc
2022-03-22 01:02:16 +0100 <hpc> haha, "beats bash", just noticed it
2022-03-22 01:02:38 +0100 <geekosaur> shouldhave been bashing out a command
2022-03-22 01:02:57 +0100 <energizer> hpc: sorry i was being sarcastic, i think bash and shells in general are bad
2022-03-22 01:03:28 +0100 <hpc> i put bash in the same bucket as vim
2022-03-22 01:03:33 +0100 <abastro[m]> Oh I see
2022-03-22 01:03:36 +0100 <hpc> or like, chorded keyboards
2022-03-22 01:03:44 +0100 <segfaultfizzbuzz> hey i use vim
2022-03-22 01:03:57 +0100 <abastro[m]> I mean, things like FunOnce in rust
2022-03-22 01:04:08 +0100 <hpc> it's a ridiculously specific tool that you have to get good at, but when you're truly good at it nothing else makes you more productive for that specific thing
2022-03-22 01:04:12 +0100 <segfaultfizzbuzz> ooooh FunOnce ;-) i had FunOnce
2022-03-22 01:04:14 +0100 <abastro[m]> That you cannot use any function in the function parameter slot.
2022-03-22 01:04:23 +0100 <abastro[m]> It complicates things I heard.
2022-03-22 01:04:41 +0100 <hpc> vim's command language is similar, very specific and idiosyncratic and there's nothing else like it
2022-03-22 01:04:49 +0100 <segfaultfizzbuzz> abastro[m]: by far rust is the highest productivity lang i have used. probably because im not smart enough to use haskell yet
2022-03-22 01:04:57 +0100 <hpc> but then you're showing someone how to do something and you go tap-tap-tap and the whole file changes
2022-03-22 01:05:07 +0100 <hpc> and that someone's head explodes from how easy it was
2022-03-22 01:05:28 +0100 <zzz> hpc: ok so that's why vim is good. but why is it bad?
2022-03-22 01:05:42 +0100 <abastro[m]> Hahaha
2022-03-22 01:05:43 +0100 <hpc> vim is objectively perfect
2022-03-22 01:05:45 +0100 <energizer> segfaultfizzbuzz: which languages is rust more productive than?
2022-03-22 01:05:49 +0100 <hpc> it's like that greek statue that's missing its head
2022-03-22 01:06:01 +0100 <hpc> it's so much better without it
2022-03-22 01:06:13 +0100 <segfaultfizzbuzz> energizer: pretty much everything i think. i am a rust kool aid zealot fundamentalist
2022-03-22 01:06:19 +0100 <abastro[m]> segfaultfizzbuzz, Well I feel productive doing haskell, I would have hard time dealing with borrow checker
2022-03-22 01:06:25 +0100 <energizer> segfaultfizzbuzz: well that's implausible
2022-03-22 01:06:36 +0100 <monochrom> I heard it was the arm. But perhaps different statue.
2022-03-22 01:06:48 +0100 <hpc> abastro[m]: you'd be surprised - it's like dealing with haskell's type checker
2022-03-22 01:06:55 +0100 <energizer> segfaultfizzbuzz: which ones are you comparing
2022-03-22 01:07:05 +0100 <hpc> a lot of it gets inferred and you don't have to muck about with lifetimes unless you are doing something very interesting
2022-03-22 01:07:19 +0100 <hpc> and it always catches some sort of lurking bug, even if you can't tell what that bug might have been
2022-03-22 01:07:25 +0100 <zzz> energizer: hackage.haskell.org/package/turtle
2022-03-22 01:07:33 +0100 <segfaultfizzbuzz> abastro[m]: the rust borrow checker used to be a little bit of work, now you won't encounter it that much. what kind of software are you trying to write?
2022-03-22 01:07:39 +0100 <abastro[m]> (Tbh I wonder why you guys are persuading to use rust in a haskell chat)
2022-03-22 01:07:42 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-22 01:07:47 +0100chenqisu1(~chenqisu1@183.217.201.47)
2022-03-22 01:07:58 +0100 <hpc> abastro[m]: we're the heroes programming deserves :D
2022-03-22 01:08:00 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-03-22 01:08:25 +0100 <monochrom> We persuade people to be rational. As opposed to religious.
2022-03-22 01:08:27 +0100 <segfaultfizzbuzz> there also is https://github.com/gluon-lang/gluon
2022-03-22 01:08:28 +0100 <abastro[m]> Oh right, I realized why I dislike rust. It steals ppl from haskell
2022-03-22 01:08:48 +0100 <monochrom> At least I do.
2022-03-22 01:09:03 +0100 <hpc> same
2022-03-22 01:09:13 +0100 <abastro[m]> I guess I love HKT and lenses too much
2022-03-22 01:09:58 +0100 <abastro[m]> And stateful list monad
2022-03-22 01:10:29 +0100 <abastro[m]> Is stateful list monad doable in rust?
2022-03-22 01:10:59 +0100werneta_(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-03-22 01:11:00 +0100 <segfaultfizzbuzz> abastro[m]: afaik you don't need lists except for some kind of flow control circumstance i don't really understand
2022-03-22 01:11:04 +0100 <abastro[m]> The nondeterminism which can duplicates state
2022-03-22 01:11:20 +0100 <segfaultfizzbuzz> abastro[m]: usually when you think you want a list you actually want a Vec
2022-03-22 01:11:37 +0100 <abastro[m]> I mean, haskell list is a stream
2022-03-22 01:11:57 +0100 <dolio> I know when I want a vector vs. a list.
2022-03-22 01:12:18 +0100 <segfaultfizzbuzz> dolio: well feel free to enlighten us
2022-03-22 01:12:26 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2022-03-22 01:12:31 +0100 <abastro[m]> So like, stateful list monad works as backtracking with state
2022-03-22 01:12:41 +0100mmhat(~mmh@55d49471.access.ecotel.net) (Quit: WeeChat 3.4.1)
2022-03-22 01:12:43 +0100 <abastro[m]> You can backtrack to certain state
2022-03-22 01:12:48 +0100 <dolio> What does that mean? I just know when I want one or the other, on a case-by-case basis.
2022-03-22 01:12:55 +0100nicbk(~nicbk@user/nicbk) (Ping timeout: 240 seconds)
2022-03-22 01:13:21 +0100 <dolio> It's more often lists, though.
2022-03-22 01:13:25 +0100 <abastro[m]> Sometimes list is more useful, indeed. Tho ppl don't see that happen often
2022-03-22 01:13:27 +0100 <abastro[m]> Oh wait
2022-03-22 01:13:31 +0100 <abastro[m]> More often lists?
2022-03-22 01:13:50 +0100 <abastro[m]> Isn't vec typically faster
2022-03-22 01:14:26 +0100 <segfaultfizzbuzz> dolio: when should i use a list?
2022-03-22 01:14:43 +0100 <segfaultfizzbuzz> abastro[m]: vec is "usually" what you want, not list
2022-03-22 01:14:51 +0100 <dolio> That question is too open ended to answer reasonably.
2022-03-22 01:14:54 +0100 <zzz> oh no haskell has become popular
2022-03-22 01:15:07 +0100 <geekosaur> I rarely use lists longer than a few elements, so I usually don't bother with Vector (or Text for that matter)
2022-03-22 01:15:10 +0100Tuplanolla(~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
2022-03-22 01:15:31 +0100 <hpc> also, in haskell or in rust?
2022-03-22 01:15:33 +0100 <zzz> segfaultfizzbuzz: do you use vectors for flow control?
2022-03-22 01:15:37 +0100 <abastro[m]> I mean for haskell, list is obv better
2022-03-22 01:15:47 +0100 <dolio> When I'm storing a context to translate to de Bruijn indices, though, I want a list, because I don't want to pay O(n) to add a variable to the front of the list.
2022-03-22 01:15:50 +0100 <monochrom> abastro[m]: In the Haskell standard library, StateT [] fits your description. I don't know how easy it is to do in Rust.
2022-03-22 01:15:50 +0100 <abastro[m]> But in rust..
2022-03-22 01:16:03 +0100 <segfaultfizzbuzz> zzz: tbh i am not sophisticated enough of a programmer (yet?) to have needed this mysterious "flow control" phenomenon
2022-03-22 01:16:06 +0100 <abastro[m]> Yea, I meant StateT []
2022-03-22 01:16:12 +0100 <monochrom> Err, StateT S [], where S is your state type.
2022-03-22 01:16:22 +0100 <zzz> segfaultfizzbuzz: maybe because i meant "control flow"
2022-03-22 01:16:24 +0100 <abastro[m]> Something like that is what I often resort to
2022-03-22 01:16:29 +0100 <abastro[m]> Idk if I am abusing monads
2022-03-22 01:16:41 +0100 <segfaultfizzbuzz> s/"flow control"/"control flow"
2022-03-22 01:16:52 +0100 <geekosaur> segfaultfizzbuzz, ever loopedover something? a list is a loop encoded as data
2022-03-22 01:16:56 +0100 <monochrom> Don't worry, StateT S [] is the right choice :)
2022-03-22 01:17:15 +0100 <abastro[m]> Isn't Rust list a linked list?
2022-03-22 01:17:24 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
2022-03-22 01:17:25 +0100 <segfaultfizzbuzz> geekosaur: interesting perspective
2022-03-22 01:17:57 +0100 <segfaultfizzbuzz> abastro[m]: probably but i don't think i have ever run across a list once in a couple years of production use of rust
2022-03-22 01:18:01 +0100 <abastro[m]> Now I wonder how to run StateT s [] asynchronously
2022-03-22 01:18:30 +0100 <abastro[m]> Well rust does make it easier to use imperative constructs like for / while
2022-03-22 01:18:37 +0100 <segfaultfizzbuzz> lists encourage pointer chasing whereas vecs encourage sequential memory access, which can be much faster
2022-03-22 01:18:49 +0100 <segfaultfizzbuzz> so lists tend to have a lot of random memory access going on
2022-03-22 01:19:06 +0100 <hpc> rust's list-like container situation is complicated, and focused on things like memory layout
2022-03-22 01:19:10 +0100 <hpc> so like, slices
2022-03-22 01:19:29 +0100 <zzz> segfaultfizzbuzz: haskell lists are stacks
2022-03-22 01:19:30 +0100 <hpc> if you have a bytestring "abcdefg" in memory somewhere, and you do some substringing to it
2022-03-22 01:19:33 +0100 <segfaultfizzbuzz> yes, rust has more direct concern for memory layout vs haskell/haskell data structures, as i understand it
2022-03-22 01:19:36 +0100 <abastro[m]> At least OS uses linked lists
2022-03-22 01:19:58 +0100 <hpc> you have a "cde" slice, which behaves like the bytestring "cde" except that it also holds onto the memory around it
2022-03-22 01:20:02 +0100 <segfaultfizzbuzz> zzz: i see, and stacks have good memory ordering?
2022-03-22 01:20:10 +0100 <abastro[m]> So there's your list application
2022-03-22 01:20:21 +0100 <zzz> segfaultfizzbuzz: no, that's why you shouldn't use lists for everything
2022-03-22 01:20:35 +0100 <abastro[m]> Haskell lists often unrolls into loops btw
2022-03-22 01:20:48 +0100 <segfaultfizzbuzz> zzz: right, so this reinforces my point that lists are a sometimes snack
2022-03-22 01:21:16 +0100 <segfaultfizzbuzz> zzz: unfortunately all the haskell introductory materials emphasize lists everywhere, and it seems like many common haskell data structures depend on them...?
2022-03-22 01:21:31 +0100 <zzz> segfaultfizzbuzz: but your point is that "vec is usually what you want, not a list", which is the point im debating against
2022-03-22 01:22:00 +0100 <zzz> you want vec when you want vec
2022-03-22 01:22:01 +0100 <segfaultfizzbuzz> zzz: ok? why do i usually want a list instead then?
2022-03-22 01:24:08 +0100 <zzz> iteration is a big one
2022-03-22 01:24:23 +0100 <abastro[m]> I guess nearly no use of lists in rust
2022-03-22 01:24:30 +0100 <segfaultfizzbuzz> zzz: itertools?
2022-03-22 01:25:05 +0100 <abastro[m]> Think haskell list is more capable than just itertools
2022-03-22 01:25:09 +0100 <segfaultfizzbuzz> abastro[m]: you can get very far in rust without lists, and it's possible that you will never encounter them. what are you trying to write
2022-03-22 01:25:29 +0100 <segfaultfizzbuzz> itertools is effectively lazy i think (?) it only computes what is necessary (??)
2022-03-22 01:25:33 +0100 <monochrom> Allow me to play devil's advocate and remind that the vector library also enjoys vector fusion, therefore WLOG you can always default to the vector library, even when [] is no worse. >:)
2022-03-22 01:25:55 +0100 <abastro[m]> I mean, I am not trying to write something. Just that I like my `StateT s []`
2022-03-22 01:26:01 +0100 <monochrom> OK OK except when you desired infinite lists!
2022-03-22 01:26:43 +0100 <abastro[m]> IIRC Rust does not have backtrack-able iteration
2022-03-22 01:27:07 +0100 <dolio> Not all uses for lists are fusible loops expressed via lists, though.
2022-03-22 01:27:14 +0100 <segfaultfizzbuzz> abastro[m]: backtrack-able? are you mutating the structure you are iterating over?
2022-03-22 01:27:27 +0100 <monochrom> Rust's list is not lazy. This can hurt some backtracking use cases.
2022-03-22 01:27:48 +0100 <segfaultfizzbuzz> monochrom: can you point to the docs for "Rust's list"? i have never seen this
2022-03-22 01:28:13 +0100 <segfaultfizzbuzz> monochrom: and as i said above, itertools is effectively lazy
2022-03-22 01:28:20 +0100 <zzz> abastro[m]: my favorite monad is the Tardis Monad
2022-03-22 01:29:15 +0100 <monochrom> Recall the N-queen problem that has a pretty natural forward constraint propagation + backtracking solution in functional programming. Using lists for choice and backtracking, the SML version takes huge memory, the Haskell version is pretty lean.
2022-03-22 01:29:59 +0100 <segfaultfizzbuzz> SML?
2022-03-22 01:30:13 +0100 <jackdk> Standard ML, probably
2022-03-22 01:30:25 +0100 <geekosaur> https://en.wikipedia.org/wiki/Standard_ML
2022-03-22 01:30:29 +0100 <zzz> Saturday Monad Live
2022-03-22 01:30:35 +0100 <segfaultfizzbuzz> ah... lol saturday monad live lol
2022-03-22 01:30:55 +0100 <zzz> sorry
2022-03-22 01:32:31 +0100 <segfaultfizzbuzz> monochrom: i think i would have to study this to see the difference
2022-03-22 01:33:26 +0100 <zzz> https://www.lri.fr/~filliatr/publis/enum2.pdf
2022-03-22 01:33:33 +0100 <segfaultfizzbuzz> but i think you are saying that branch and bound can be naturally expressed in haskell with lists but not in rust/an ML family language?
2022-03-22 01:33:37 +0100foul_owl(~kerry@174-21-69-110.tukw.qwest.net) (Ping timeout: 240 seconds)
2022-03-22 01:34:10 +0100 <monochrom> Natural in all languages.
2022-03-22 01:34:29 +0100 <monochrom> But laziness causes cost differences.
2022-03-22 01:35:01 +0100 <segfaultfizzbuzz> is there a "maximum language overhead"?
2022-03-22 01:35:17 +0100 <segfaultfizzbuzz> across languages?
2022-03-22 01:35:42 +0100 <segfaultfizzbuzz> and if language overhead exists is it just because there are unknown compiler optimizations, or can the overhead be fundamental
2022-03-22 01:36:03 +0100Akiva(~Akiva@user/Akiva)
2022-03-22 01:36:23 +0100 <geekosaur> every language has things it does better and things it does worse, where the metric can be memory, time, etc.
2022-03-22 01:36:37 +0100 <segfaultfizzbuzz> right, but absolute worst case is 100x or something?
2022-03-22 01:36:48 +0100 <geekosaur> this can differ by implementation or be fundamental to the language design
2022-03-22 01:36:50 +0100 <zzz> segfaultfizzbuzz: Haskell is not "not ML"
2022-03-22 01:37:00 +0100vorpuni(~pvorp@2001:861:3881:c690:6385:bd9:c0d2:296c) (Remote host closed the connection)
2022-03-22 01:37:31 +0100 <geekosaur> and haskell is an ML family language. it's just the non-strict member of the family
2022-03-22 01:38:52 +0100 <zzz> Haskell does *not* do well on saving space :X
2022-03-22 01:38:59 +0100 <geekosaur> I doubt a hard maximum exists
2022-03-22 01:41:02 +0100 <zzz> but that's the (increasingly small imo) price to pay for doing almost everything else right
2022-03-22 01:41:07 +0100vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-03-22 01:41:48 +0100 <geekosaur> I've only found space to be a probloem once, and that was my own damn fault
2022-03-22 01:41:55 +0100Guest26(~Guest26@60-241-4-164.static.tpgi.com.au)
2022-03-22 01:42:11 +0100 <geekosaur> (population simulator, run with bounds disabled. can you say "exponential growth", kids?)
2022-03-22 01:43:40 +0100 <zzz> I am ashamed to say how much disk space i dedicate to haskell tooling alone
2022-03-22 01:45:23 +0100 <abastro[m]> Oh right
2022-03-22 01:45:30 +0100 <abastro[m]> Cabal cache takes quite a size
2022-03-22 01:47:29 +0100lbseale(~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
2022-03-22 01:47:42 +0100zzzlaughs in nix
2022-03-22 01:47:53 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 01:48:53 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 01:48:59 +0100foul_owl(~kerry@23.82.193.88)
2022-03-22 01:52:36 +0100 <jackdk> zzz: I saw a "heaviest objects in the universe" meme that went sun; neutron star; black hole; node_modules, /nix/store
2022-03-22 01:55:00 +0100segfaultfizzbuzz(~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8) (Ping timeout: 240 seconds)
2022-03-22 01:57:11 +0100Guest26(~Guest26@60-241-4-164.static.tpgi.com.au) (Quit: Ping timeout (120 seconds))
2022-03-22 01:58:58 +0100 <abastro[m]> Is nix cache better?
2022-03-22 01:59:02 +0100 <abastro[m]> Gah I need to learn nix
2022-03-22 01:59:09 +0100 <abastro[m]> But I find it hard to get into
2022-03-22 01:59:17 +0100 <abastro[m]> I am dumb I guess
2022-03-22 01:59:28 +0100 <Maxdamantus> 327G /nix/store/
2022-03-22 01:59:39 +0100Maxdamantusdoesn't use nix much though.
2022-03-22 02:00:03 +0100Maxdamantusshould probably delete all his profiles from 2018 or so.
2022-03-22 02:00:09 +0100 <abastro[m]> Wait wha
2022-03-22 02:01:04 +0100 <geekosaur> you need to gc nix every so often to remove unused profiles and their associated program versions
2022-03-22 02:01:36 +0100 <geekosaur> it's been a while and I forget details; I decided duplicating my system multiple times under /nix/store was ridiculous
2022-03-22 02:01:45 +0100 <geekosaur> haven't really missed it
2022-03-22 02:02:41 +0100 <abastro[m]> At least nix has gc right
2022-03-22 02:03:15 +0100 <abastro[m]> Cabal does not it seems
2022-03-22 02:04:15 +0100monochromwonders where emacs stands in the tier of heavy objects in the universe. :) https://www.gnu.org/fun/jokes/ed-msg.en.html
2022-03-22 02:04:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 02:05:02 +0100 <abastro[m]> I have to nuke the cache but I am wary of the compile time it takea
2022-03-22 02:05:11 +0100 <geekosaur> once upon a time it was fairly high. nvim beat it years ago, then along came node, then nix
2022-03-22 02:05:26 +0100 <geekosaur> also monochrom wrote a cache pruner iirc
2022-03-22 02:05:32 +0100 <geekosaur> for cabal
2022-03-22 02:05:48 +0100 <monochrom> Yeah https://github.com/treblacy/cabalgc
2022-03-22 02:06:10 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 02:06:39 +0100 <monochrom> Although, if you upgrade GHC version every half a year, maybe it's simplest to just delete .cabal/store/ghc-<old version>
2022-03-22 02:06:41 +0100 <sm> see also stack-clean-old for stack and ghcup tui for ghcup-installed stuff
2022-03-22 02:07:00 +0100 <sm> and as fallback, ncdu on ~/.{ghc,cabal,stack,ghcide,...} is good
2022-03-22 02:07:44 +0100 <sm> so now in Rust land, would cargo manage all of this stuff ?
2022-03-22 02:07:58 +0100smvotes for ghcup to gc all the things
2022-03-22 02:08:04 +0100 <monochrom> Assuming, for installing executables, you refuse cabal-install's blatantly stupid default of "--install-method=symlink".
2022-03-22 02:09:50 +0100 <sclv> would be great for someone to step up and add this https://github.com/haskell/cabal/issues/3333
2022-03-22 02:10:13 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
2022-03-22 02:10:53 +0100 <abastro[m]> So I have to pick ones to keep with cabal gc :<
2022-03-22 02:11:14 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-03-22 02:11:26 +0100Techcable(~Techcable@168.235.93.147) (Changing host)
2022-03-22 02:11:26 +0100Techcable(~Techcable@user/Techcable)
2022-03-22 02:12:06 +0100 <geekosaur> see sclv's ticket, at present it's rather difficult to automate that
2022-03-22 02:12:49 +0100 <abastro[m]> Wish I could automatically set up to specify projects to keep.
2022-03-22 02:13:01 +0100 <abastro[m]> * to keep dependency of.
2022-03-22 02:14:11 +0100 <Maxdamantus> 173485 store paths deleted, 242080.20 MiB freed
2022-03-22 02:17:21 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-03-22 02:25:06 +0100segfaultfizzbuzz(~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8)
2022-03-22 02:30:27 +0100khumba(~khumba@user/khumba)
2022-03-22 02:31:03 +0100 <zzz> Maxdamantus: that's a lot
2022-03-22 02:31:29 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-22 02:31:51 +0100 <abastro[m]> Wait, 242GB???
2022-03-22 02:32:26 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
2022-03-22 02:34:25 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 268 seconds)
2022-03-22 02:38:46 +0100 <geekosaur> that was /nix/store, I think
2022-03-22 02:39:02 +0100 <geekosaur> [22 00:59:28] <Maxdamantus> 327G /nix/store/
2022-03-22 02:40:00 +0100 <monochrom> 6.02e23 /usr/bin/emacs :)
2022-03-22 02:40:37 +0100 <geekosaur> avogadro's editor?
2022-03-22 02:40:44 +0100 <monochrom> yeah heehee
2022-03-22 02:41:48 +0100 <abastro[m]> Lmao
2022-03-22 02:42:16 +0100 <monochrom> 125GeV /boot/higgs
2022-03-22 02:42:17 +0100segfaultfizzbuzz(~segfaultf@2602:306:cd3c:9350:a1ac:7cf2:d212:eed8) (Ping timeout: 240 seconds)
2022-03-22 02:44:54 +0100 <zzz> one point to vim i guess
2022-03-22 02:46:49 +0100mud(~mud@user/kadoban) (Quit: quit)
2022-03-22 02:49:26 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-03-22 02:49:46 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-03-22 02:50:13 +0100khumba(~khumba@user/khumba) ()
2022-03-22 02:54:44 +0100 <abastro[m]> Rate my sht code... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/1b07672699d44ca82dd3c634dd92e61b42fb…)
2022-03-22 02:58:43 +0100Topsi(~Tobias@dyndsl-095-033-018-177.ewe-ip-backbone.de)
2022-03-22 03:01:29 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 03:01:38 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 03:02:08 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 03:02:20 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 03:02:47 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 268 seconds)
2022-03-22 03:02:48 +0100 <Axman6> abastro[m]: FYI, long messages like that don't work well for IRC - just use a paste website like...
2022-03-22 03:02:50 +0100 <Axman6> @where paste
2022-03-22 03:02:50 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-03-22 03:03:31 +0100 <abastro[m]> Well then I guess rather post it like, https://github.com/Abastro/AdventOfCode/blob/master/src/Y2021/Prob10.hs
2022-03-22 03:05:01 +0100vysn(~vysn@user/vysn)
2022-03-22 03:05:47 +0100bitmapper(uid464869@id-464869.lymington.irccloud.com)
2022-03-22 03:06:12 +0100 <Axman6> any background on what problem you're solving? it looks pretty arbitrary
2022-03-22 03:07:11 +0100 <abastro[m]> https://adventofcode.com/2021/day/10 - it is likely my code being messy.
2022-03-22 03:10:07 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 03:10:42 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 03:15:53 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-03-22 03:28:55 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 03:29:19 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-22 03:29:19 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-22 03:29:19 +0100wroathe(~wroathe@user/wroathe)
2022-03-22 03:30:18 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net)
2022-03-22 03:30:26 +0100ptrcmd(~ptrcmd@user/ptrcmd) (Ping timeout: 250 seconds)
2022-03-22 03:30:35 +0100ptrcmd(~ptrcmd@user/ptrcmd)
2022-03-22 03:33:24 +0100ubert1(~Thunderbi@p548c8d44.dip0.t-ipconnect.de)
2022-03-22 03:34:55 +0100ubert(~Thunderbi@p200300ecdf1588ca0b7aa2fbaa2d0440.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-03-22 03:34:55 +0100ubert1ubert
2022-03-22 03:37:25 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Ping timeout: 240 seconds)
2022-03-22 03:37:44 +0100jakalx(~jakalx@base.jakalx.net) ()
2022-03-22 03:40:16 +0100jakalx(~jakalx@base.jakalx.net)
2022-03-22 03:40:35 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-03-22 03:44:56 +0100acidsys(~LSD@2a03:4000:55:d20::3) (Excess Flood)
2022-03-22 03:45:27 +0100acidsys(~LSD@2a03:4000:55:d20::3)
2022-03-22 03:51:01 +0100 <DigitalKiwi> Axman6: matrix is the future!
2022-03-22 03:51:59 +0100mud(~mud@user/kadoban)
2022-03-22 03:52:30 +0100 <geekosaur> I wouldn't actually complain about the long message since matrix helpfully auto-pastebinned it anyway
2022-03-22 03:52:51 +0100 <geekosaur> it's matrix edits that are really annoying because they just spam the channel
2022-03-22 03:54:11 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
2022-03-22 03:56:09 +0100aviladev[m](~aviladevm@2001:470:69fc:105::1:cbc7)
2022-03-22 04:03:48 +0100mvk(~mvk@2607:fea8:5cc3:7e00::7980) (Ping timeout: 240 seconds)
2022-03-22 04:04:35 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
2022-03-22 04:08:32 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net)
2022-03-22 04:09:13 +0100 <Axman6> DigitalKiwi: so was ICQ, and MSN, and Facebook Messenger, and Slack, and Discord, and ... and what still remains? IRC, forever and always
2022-03-22 04:09:42 +0100 <Axman6> yeah I was mostly pointing it out because matrix users sometimes don't know that their messages get manipulated like that sometimes
2022-03-22 04:10:23 +0100xff0x(~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
2022-03-22 04:10:54 +0100Logio_(em@kapsi.fi)
2022-03-22 04:10:55 +0100 <DigitalKiwi> never had icq
2022-03-22 04:10:57 +0100lll(~o@user/offon)
2022-03-22 04:11:00 +0100nonzen_(~nonzen@user/nonzen)
2022-03-22 04:11:11 +0100sviermsung(owJr4HCxlX@user/s4msung)
2022-03-22 04:11:15 +0100burakcan-(~burakcank@has.arrived.and.is.ready-to.party)
2022-03-22 04:11:16 +0100kmein_(~weechat@user/kmein)
2022-03-22 04:11:18 +0100thonkpod_(~thonkpod@user/thonkpod)
2022-03-22 04:11:21 +0100lawt2(~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9)
2022-03-22 04:11:29 +0100kmein(~weechat@user/kmein) (*.net *.split)
2022-03-22 04:11:29 +0100Inoperable(~PLAYER_1@fancydata.science) (*.net *.split)
2022-03-22 04:11:29 +0100mcglk(~mcglk@131.191.49.120) (*.net *.split)
2022-03-22 04:11:29 +0100Logio(em@kapsi.fi) (*.net *.split)
2022-03-22 04:11:29 +0100s4msung(z4rgS71Nb1@user/s4msung) (*.net *.split)
2022-03-22 04:11:29 +0100burakcank(~burakcank@has.arrived.and.is.ready-to.party) (*.net *.split)
2022-03-22 04:11:29 +0100Jon(jon@dow.land) (*.net *.split)
2022-03-22 04:11:29 +0100lawt(~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9) (*.net *.split)
2022-03-22 04:11:29 +0100nonzen(~nonzen@user/nonzen) (*.net *.split)
2022-03-22 04:11:29 +0100_\_(~o@user/offon) (*.net *.split)
2022-03-22 04:11:29 +0100thonkpod(~thonkpod@user/thonkpod) (*.net *.split)
2022-03-22 04:11:29 +0100jakalx(~jakalx@base.jakalx.net) (*.net *.split)
2022-03-22 04:11:44 +0100lll_\_
2022-03-22 04:11:49 +0100Jon(jon@dow.land)
2022-03-22 04:12:09 +0100 <corisco[m]> actually mirc is the future
2022-03-22 04:12:14 +0100 <Axman6> I used to use Adium, so at some point I probably did because I ended up making an account for basically every protocol it supported
2022-03-22 04:12:24 +0100burakcan-burakcank
2022-03-22 04:14:15 +0100boborygmy_(~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds)
2022-03-22 04:15:20 +0100 <DigitalKiwi> pidgin/adium/trillian gang
2022-03-22 04:15:32 +0100 <Axman6> \m/
2022-03-22 04:16:06 +0100 <Axman6> adium was the shit back in high school
2022-03-22 04:16:33 +0100In0perable(~PLAYER_1@fancydata.science)
2022-03-22 04:16:36 +0100mcglk(~mcglk@131.191.49.120)
2022-03-22 04:16:44 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 04:18:26 +0100 <Axman6> :t foldlM
2022-03-22 04:18:27 +0100 <lambdabot> (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
2022-03-22 04:19:19 +0100 <sm> yeah long inline pastes from matrix clients are fine for IRC, they show up as a nice paste link
2022-03-22 04:20:23 +0100 <Axman6> it's fine, other than that the author may not know it's happened and IMo the experience is nicer if you ask a question and link to code ratheer than asking half a question and then people needing to click a link to finish reading it
2022-03-22 04:21:45 +0100geranim0(~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection)
2022-03-22 04:22:03 +0100 <sm> good point, an inline paste by itself might not be clear. The best way is to paste it preceded by your descriptive comment. IRC users will see at least the start of the comment, plus the link
2022-03-22 04:22:08 +0100karim(~karim@102.43.202.169)
2022-03-22 04:22:51 +0100 <Axman6> abastro[m]: finally got a chance to look at your code - looks fine to me, pretty clear how it works once you've read the problem description. the foldlM feels a bit magical and took me a sec to understand (I was going to suggest using foldr because of early termination, but realised I misunderstood what was happening)
2022-03-22 04:25:32 +0100boxscape_(~boxscape_@p4ff0b60b.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-03-22 04:25:32 +0100 <abastro[m]> Oh, I should avoid editing in matrix then, if it spams :<
2022-03-22 04:25:49 +0100 <Axman6> yes, it spams for each edit :)
2022-03-22 04:26:00 +0100 <abastro[m]> ya, I guess `foldlM` is not really intuitive
2022-03-22 04:26:21 +0100 <abastro[m]> I wonder what would be more intuitive
2022-03-22 04:26:27 +0100Topsi(~Tobias@dyndsl-095-033-018-177.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-03-22 04:28:28 +0100Unicorn_Princess(~Unicorn_P@46-54-248-191.static.kate-wing.si) (Remote host closed the connection)
2022-03-22 04:28:56 +0100 <Axman6> I would probably have written things by having a function with type String -> Either Char [ChToken] to make the processing part clear, and then the other code is just mapping, filtering and reducing, it felt a bit tangled having that in the function too. not that that's necessarily a good design, just how I would have written it
2022-03-22 04:29:47 +0100 <Axman6> also, me being the sort of person I am, I immediately though about if I could save memory by not using a list and instead storing the stack in as Integer, two bits at a time XD
2022-03-22 04:30:36 +0100 <Axman6> > divMod (-7) 4
2022-03-22 04:30:38 +0100 <lambdabot> (-2,1)
2022-03-22 04:30:52 +0100 <Axman6> > quotRem (-7) 4
2022-03-22 04:30:53 +0100 <lambdabot> (-1,-3)
2022-03-22 04:30:57 +0100raym(~raym@user/raym) (Ping timeout: 240 seconds)
2022-03-22 04:31:42 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 04:32:16 +0100lagooned(~lagooned@108-208-149-42.lightspeed.hstntx.sbcglobal.net) (Quit: WeeChat 3.4)
2022-03-22 04:32:51 +0100raym(~raym@user/raym)
2022-03-22 04:32:58 +0100 <abastro[m]> I see, think your approach would be better
2022-03-22 04:33:10 +0100 <abastro[m]> Btw is posting paste better than a link?
2022-03-22 04:34:24 +0100 <zzz> @where paste
2022-03-22 04:34:24 +0100 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-03-22 04:35:40 +0100 <sm> stop me if I'm being a bore... as a matrix user I like to paste inline (following descriptive comment, as you did). Because it's much more immediate and usable for other matrix users, and as already discussed shows up as a nice trustworthy minimalist paste link for IRC users.
2022-03-22 04:36:33 +0100Akiva(~Akiva@user/Akiva)
2022-03-22 04:37:23 +0100 <sm> On the downside, the matrix pastebin won't highlight haskell code or provide the other features of a richer site like paste.tomsmeding.com. Personally though, a plain text resizable window filling no-messing raw paste is often what I want. On tomsmeding that's not the default
2022-03-22 04:37:25 +0100Techcable(~Techcable@user/Techcable) (Ping timeout: 240 seconds)
2022-03-22 04:39:11 +0100raym(~raym@user/raym) (Ping timeout: 256 seconds)
2022-03-22 04:43:43 +0100ubert(~Thunderbi@p548c8d44.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2022-03-22 04:44:00 +0100ubert(~Thunderbi@p200300ecdf158894255673a7c9121e6c.dip0.t-ipconnect.de)
2022-03-22 04:45:31 +0100 <sm> (see https://paste.tomsmeding.com/sb9sRUY4, eg tomsmeding . Ideally content is the most visible thing, but often it's not. Here I accidentally pasted a single line with no breaks. Even if I fix that, the content is still the smallest part of the page content)
2022-03-22 04:45:55 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 04:46:18 +0100 <sm> don't get me wrong, most other things about it are great
2022-03-22 04:47:05 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 04:47:24 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
2022-03-22 04:47:47 +0100terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 04:48:05 +0100 <zzz> i made my own minimalist pastebin which works nice on text based browsers even https://paste.jrvieira.com/1647920833364
2022-03-22 04:48:50 +0100meinside(uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-22 04:49:05 +0100terrorjack(~terrorjac@static.3.200.12.49.clients.your-server.de)
2022-03-22 04:49:14 +0100Nahra(~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection)
2022-03-22 04:50:33 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 04:51:30 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 04:52:24 +0100 <zzz> i removed the highlighting though but it's easy enough to implement one
2022-03-22 04:56:13 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-03-22 05:01:11 +0100raym(~raym@user/raym)
2022-03-22 05:07:56 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 05:08:32 +0100raym(~raym@user/raym) (Ping timeout: 240 seconds)
2022-03-22 05:09:26 +0100kaph(~kaph@net-109-116-124-149.cust.vodafonedsl.it) (Read error: Connection reset by peer)
2022-03-22 05:10:29 +0100raym(~raym@user/raym)
2022-03-22 05:10:35 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 05:12:01 +0100cyphase(~cyphase@user/cyphase) (Ping timeout: 245 seconds)
2022-03-22 05:12:23 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
2022-03-22 05:12:50 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 05:18:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 05:20:32 +0100cyphase(~cyphase@user/cyphase)
2022-03-22 05:20:37 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds)
2022-03-22 05:29:06 +0100k8yun(~k8yun@user/k8yun)
2022-03-22 05:30:00 +0100bahamas(~lucian@84.232.140.158)
2022-03-22 05:30:56 +0100mbuf(~Shakthi@136.185.72.170)
2022-03-22 05:31:11 +0100nicbk(~nicbk@user/nicbk)
2022-03-22 05:32:27 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
2022-03-22 05:33:26 +0100kaph(~kaph@net-109-116-124-149.cust.vodafonedsl.it)
2022-03-22 05:34:32 +0100bahamas(~lucian@84.232.140.158) (Ping timeout: 240 seconds)
2022-03-22 05:36:16 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-03-22 05:36:54 +0100zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-03-22 05:38:03 +0100zaquest(~notzaques@5.130.79.72)
2022-03-22 05:39:21 +0100Techcable(~Techcable@user/Techcable)
2022-03-22 05:40:06 +0100 <abastro[m]> Hm, I guess I'd use paste.tomsmeding.com from now on
2022-03-22 05:40:36 +0100benin(~benin@183.82.26.94)
2022-03-22 05:42:02 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
2022-03-22 05:49:27 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-03-22 05:53:24 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 240 seconds)
2022-03-22 05:54:37 +0100Maxdamantus(~Maxdamant@user/maxdamantus)
2022-03-22 05:58:38 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 06:08:17 +0100k8yun(~k8yun@user/k8yun) (Read error: Connection reset by peer)
2022-03-22 06:09:16 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 06:25:32 +0100lechner(~lechner@debian/lechner) (Ping timeout: 240 seconds)
2022-03-22 06:26:49 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 06:27:59 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds)
2022-03-22 06:31:29 +0100 <Axman6> abastro[m]: I didn't really notice this before, but your use of sort xs !! n is kinda fun, since sort in Haskell is lazy you end up only producing half the sorted list.
2022-03-22 06:33:00 +0100 <Axman6> I've had an idea mulling around in my head for a while to build a structure for finding the median of some data, with something that looks like data Median a = Median (Set a) a (Set a), where inserting maintains the invariant that the single a is always the median or one off it and the sets are no more than one element different in size
2022-03-22 06:33:16 +0100 <abastro[m]> It is why I love haskell's laziness
2022-03-22 06:33:32 +0100 <abastro[m]> Oh, Median datatype would be nice
2022-03-22 06:34:25 +0100 <Axman6> I was also thinking about where the median element would live in a min-max heap (which is the combination of a min heap and a max heap into one structure so you have efficient access to the min and max). it feels like the median is probably just the last element in the array
2022-03-22 06:35:17 +0100 <Axman6> what problem is sol10S trying to solve anyway? It doesn't seem to be anything on the challenge you linked
2022-03-22 06:37:58 +0100 <abastro[m]> Oh right. Sadly, it displays after putting in the solution..
2022-03-22 06:38:10 +0100 <Axman6> fair enough
2022-03-22 06:38:53 +0100sagax(~sagax_nb@user/sagax)
2022-03-22 06:39:32 +0100 <abastro[m]> https://paste.tomsmeding.com/NMRHRV6t
2022-03-22 06:41:04 +0100 <dsal> Oh, I remember that one.
2022-03-22 06:42:21 +0100 <Axman6> heh, it's interesting how close the answer is to what I was proposing as an efficient way to store the stack in an integer!
2022-03-22 06:42:34 +0100 <dsal> I did kind of weird stuff there. glg did this thing was like, 5 lines of code and quite fast.
2022-03-22 06:43:37 +0100toulene(~toulene@user/toulene) (Ping timeout: 256 seconds)
2022-03-22 06:43:38 +0100 <Axman6> I suggested above storing the stack as an integer which used two bits per element of the stack... if I'd suggested mod 5 and never used zero, then I would have had the answer immediately, by accident XD
2022-03-22 06:43:53 +0100 <abastro[m]> 5 lines of code for both 2?
2022-03-22 06:43:55 +0100 <abastro[m]> * both 2? Wow, how...
2022-03-22 06:44:10 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2022-03-22 06:44:24 +0100 <dsal> Mine was pretty slow, but I wanted to use megaparsec and figure out how to get its error messages to drive me to a solution.
2022-03-22 06:45:06 +0100toulene(~toulene@user/toulene)
2022-03-22 06:45:29 +0100 <abastro[m]> Oh, megaparsec
2022-03-22 06:45:43 +0100zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-03-22 06:45:45 +0100 <abastro[m]> I guess AoC also presents a cue to learn those
2022-03-22 06:46:57 +0100 <dsal> Mine was only about half a page, but messing around with megaparsec errors was some work.
2022-03-22 06:47:15 +0100karim(~karim@102.43.202.169) (Ping timeout: 256 seconds)
2022-03-22 06:48:08 +0100 <abastro[m]> Oh wait. so you mean, glg did the 5 lines & fast
2022-03-22 06:48:15 +0100 <abastro[m]> I thought that was you
2022-03-22 06:48:45 +0100 <dsal> Nah, my goal was to learn how to do megaparsec errors. He tends to boil problems down to their essence and express them as a single foldMap.
2022-03-22 06:48:56 +0100 <dsal> (or in this case, foldM)
2022-03-22 06:49:04 +0100 <abastro[m]> Oh, foldMap
2022-03-22 06:49:31 +0100 <abastro[m]> Right, I should have summarized it into single thing using Monoids
2022-03-22 06:49:56 +0100 <dsal> I do that as often as I can.
2022-03-22 06:50:18 +0100 <abastro[m]> I need to do it more
2022-03-22 06:50:34 +0100 <abastro[m]> Granted, it is a functionality only haskell offers as of now
2022-03-22 06:50:35 +0100 <Axman6> I tried to make a monoid for validating UTF-8 text but never figured it out :'(
2022-03-22 06:51:21 +0100 <abastro[m]> Oooh
2022-03-22 06:51:28 +0100 <abastro[m]> UTF-8 including unicode dealings?
2022-03-22 06:52:40 +0100 <abastro[m]> (..I forgot how unicode is handled, like graphemes codepoints etc)
2022-03-22 06:52:58 +0100 <Axman6> at the very least validating that each codepoint was valid - I wouldn't check .... the things which end up being made from multiple code points
2022-03-22 06:53:31 +0100 <abastro[m]> Yea, multiple code points. Maybe that is too much
2022-03-22 06:53:35 +0100 <dsal> Unicode wasn't too bad before they started adding color photos into it.
2022-03-22 06:54:04 +0100 <abastro[m]> Hahaha..wait color photos?
2022-03-22 06:54:15 +0100 <abastro[m]> You mean emotes?
2022-03-22 06:54:19 +0100 <dsal> 🚀
2022-03-22 06:54:40 +0100 <Maxdamantus> That square just looks white to me.
2022-03-22 06:55:01 +0100alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
2022-03-22 06:55:06 +0100 <dsal> That's at least part of my point. It's super hard for everyone to be able to render all the characters.
2022-03-22 06:55:13 +0100 <abastro[m]> So, emotes
2022-03-22 06:55:17 +0100 <Maxdamantus> emojis*
2022-03-22 06:55:17 +0100alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-03-22 06:55:20 +0100 <dsal> Then you have things like people emojis with codepoints for defining skin color.
2022-03-22 06:55:27 +0100 <abastro[m]> Ya, rendering these is hard
2022-03-22 06:55:45 +0100 <dsal> Back in my day, we had ascii, and we liked it.
2022-03-22 06:56:17 +0100 <dsal> (though I literally just wrote a parser that has to autodetect EBCDIC source)
2022-03-22 06:56:42 +0100 <Maxdamantus> Well, it's either add them to Unicode, or else have different ways of encoding them for each messaging protocol and phone manufacturer.
2022-03-22 06:56:45 +0100 <abastro[m]> Non-latin alphabet folks: Wh
2022-03-22 06:56:46 +0100 <Axman6> Haskell's handling of unicode leaves a bit to be desired, it's pretty fun doing things like:
2022-03-22 06:56:49 +0100 <Axman6> % let flags = "🇦🇺 "in print (flags, reverse flags) >> putStrLn flags >> putStrLn (reverse flags)
2022-03-22 06:56:49 +0100 <yahb> Axman6: ("\127462\127482 "," \127482\127462"); 🇦🇺 ; 🇺🇦
2022-03-22 06:56:52 +0100 <dsal> 🧓
2022-03-22 06:57:05 +0100 <Axman6> hmmmm, well I just broke my terminal somewhat with that...
2022-03-22 06:57:56 +0100 <dsal> I kind of like having things like flag and rocketship letters when other people are making it work.
2022-03-22 06:58:08 +0100 <dsal> I'm insufficiently principled.
2022-03-22 06:59:31 +0100 <Maxdamantus> $Reversing Unicode is a nonsense operation anyway.\u202E If you really want to reverse something, there are code points for that.
2022-03-22 06:59:34 +0100 <Maxdamantus> er
2022-03-22 06:59:43 +0100 <abastro[m]> Does `String` as `[Char]` mesh well with unicode?
2022-03-22 06:59:46 +0100 <Maxdamantus> Damn it, wrong shell.
2022-03-22 07:00:27 +0100 <Maxdamantus> Reversing Unicode is a nonsense operation anyway.‮ If you really want to reverse something, there are code points for that.
2022-03-22 07:00:42 +0100 <Axman6> abastro[m]: it does surprisingly well up to the point of needing to deal with things at the multiple codepoint level, a Char is a single unicode codepoint
2022-03-22 07:01:15 +0100 <abastro[m]> Hm.. characters with multiple codepoint level could suffer, then.
2022-03-22 07:02:28 +0100 <Maxdamantus> imo it should just be a list of code units, as Unicode intended.
2022-03-22 07:03:18 +0100 <Maxdamantus> list of code points gives people a false impression of Unicode correctness (similarly to how UTF-16 does), and Unicode never intended to pass around lists of code points.
2022-03-22 07:04:08 +0100 <Maxdamantus> The official ICU library just provides abstractions that work on code units.
2022-03-22 07:05:02 +0100 <Maxdamantus> Seems like people are trying to reinstate the UCS philosophy.
2022-03-22 07:05:45 +0100 <abastro[m]> I see, so code unit is like 8 bits for UTF8
2022-03-22 07:06:17 +0100 <abastro[m]> In that case, I imagine it would be harder to deal with individual characters, though.
2022-03-22 07:06:20 +0100 <Maxdamantus> Yes. Preferably strings should be sequences of code units that are conventionally UTF-8.
2022-03-22 07:06:21 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 07:06:34 +0100 <Maxdamantus> It wouldn't be any harder than working with code points.
2022-03-22 07:07:08 +0100 <abastro[m]> I mean, we cannot easily pattern match on a character then.
2022-03-22 07:07:28 +0100 <Maxdamantus> You can't do that with code points either.
2022-03-22 07:07:40 +0100 <Maxdamantus> > reverse "héllo"
2022-03-22 07:07:42 +0100 <lambdabot> "oll\769eh"
2022-03-22 07:07:55 +0100 <Maxdamantus> > putStrLn $ reverse "héllo"
2022-03-22 07:07:57 +0100 <lambdabot> <IO ()>
2022-03-22 07:08:01 +0100 <Maxdamantus> % putStrLn $ reverse "héllo"
2022-03-22 07:08:01 +0100 <yahb> Maxdamantus: olĺeh
2022-03-22 07:08:30 +0100 <abastro[m]> I mean for common cases.
2022-03-22 07:09:01 +0100sloorush(~sloorush@136.233.9.99)
2022-03-22 07:09:19 +0100 <Maxdamantus> So you want to have something that usually matches one character, but you're okay with it being incorrect?
2022-03-22 07:09:21 +0100 <abastro[m]> Like with CJK characters, makes it easier to deal with it.
2022-03-22 07:09:50 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 07:10:01 +0100 <abastro[m]> Idk, at least sometimes it is going to be incorrect
2022-03-22 07:10:12 +0100 <abastro[m]> Perhaps better approach is revising pattern matching for strings
2022-03-22 07:10:23 +0100 <Maxdamantus> How so? Korean is known for being able to compose multiple code points into a single glyph.
2022-03-22 07:11:03 +0100 <Maxdamantus> "match a single character" only makes sense if you're doing something like a character limit.
2022-03-22 07:11:30 +0100 <abastro[m]> Using regex
2022-03-22 07:11:38 +0100 <Maxdamantus> If you're doing something like /foo.*bar/, that works just as well on code units as it does code points.
2022-03-22 07:11:53 +0100 <abastro[m]> Oh, Korean letters are usually single code points
2022-03-22 07:12:33 +0100 <abastro[m]> You can compose multiple alphabets to form a character, but the character is represented by specific code point.
2022-03-22 07:12:45 +0100 <Maxdamantus> Usually, but there are separate code points for the individual jamo (the letters within the characters) that can be combined together.
2022-03-22 07:13:05 +0100 <abastro[m]> Yep, but they are usually rendered separately
2022-03-22 07:13:08 +0100 <Maxdamantus> Just like how you can write "é" as one or two code points.
2022-03-22 07:13:12 +0100 <Maxdamantus> No, they're rendered the same way.
2022-03-22 07:13:18 +0100 <abastro[m]> They do not gather and form a glyph.
2022-03-22 07:13:23 +0100 <Maxdamantus> They do.
2022-03-22 07:13:32 +0100 <Maxdamantus> > "é" == "é"
2022-03-22 07:13:33 +0100 <lambdabot> False
2022-03-22 07:13:57 +0100 <abastro[m]> Well, does ㄱㅏㅇ render as combined for you?
2022-03-22 07:14:00 +0100 <Axman6> I mentioned a while ago min-max heaps in relation to your problem abastro[m] - I finally foudn the article I was looking for that explain them; if you want to learn about cool structures, this is a great place one: https://probablydance.com/2020/08/31/on-modern-hardware-the-min-max-heap-beats-a-binary-heap/
2022-03-22 07:14:41 +0100 <abastro[m]> Wow, Axman6, great article! I'll take a look.
2022-03-22 07:14:51 +0100 <Maxdamantus> abastro[m]: you need to use a combining character.
2022-03-22 07:15:08 +0100 <Axman6> the fact that unicode has multiple ways to represent the same thing annoys me, the "é" == "é" thing annoys me
2022-03-22 07:15:39 +0100 <Axman6> abastro[m]: are you already familiar with min/max heaps?
2022-03-22 07:16:56 +0100 <abastro[m]> No, I am not familiar, so I would look at the article
2022-03-22 07:17:18 +0100 <abastro[m]> Btw by combining characters, do you mean https://en.wikipedia.org/wiki/Combining_character
2022-03-22 07:17:25 +0100 <abastro[m]> IIRC there is no combining character for Korean characters.
2022-03-22 07:17:33 +0100 <Axman6> I would learn about those first (not that a min heap and a max heap are basically the same thing, and a min-max heap basically combines them)
2022-03-22 07:18:10 +0100 <abastro[m]> Oh. I see, I thought the article was describing about the min-max heap
2022-03-22 07:18:35 +0100 <abastro[m]> I do know about min heap and max heap, but min-max heap should be something different right
2022-03-22 07:18:35 +0100 <Axman6> that article decscribes min-max heaps, but you should know what a min-heap is first
2022-03-22 07:18:47 +0100 <abastro[m]> Oh, I def knows min-heap and max-heap
2022-03-22 07:18:50 +0100 <Axman6> ok, then you should be good to go
2022-03-22 07:18:56 +0100 <abastro[m]> Yea, thanks!
2022-03-22 07:19:24 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2022-03-22 07:20:02 +0100alp(~alp@user/alp)
2022-03-22 07:23:04 +0100 <Maxdamantus> abastro[m]: oh, actually, the code points you used were the non-composing ones.
2022-03-22 07:23:43 +0100 <abastro[m]> Yep, IIRC there is no composing characters for Korean.
2022-03-22 07:23:59 +0100 <Maxdamantus> Yes, there are different code points that compose.
2022-03-22 07:24:35 +0100 <Maxdamantus> > length "가ᄋ"
2022-03-22 07:24:37 +0100 <lambdabot> 3
2022-03-22 07:24:50 +0100 <Maxdamantus> That doesn't render correctly for me (urxvt)
2022-03-22 07:25:03 +0100 <Maxdamantus> but it should in a proper Unicode renderer afaict
2022-03-22 07:25:23 +0100 <abastro[m]> Well, only 2 combined, but it did combine. Hmm
2022-03-22 07:25:27 +0100 <Maxdamantus> er, oops.
2022-03-22 07:25:33 +0100 <Maxdamantus> that was three lead jamo.
2022-03-22 07:25:53 +0100Maxdamantusfigures it out again from the table.
2022-03-22 07:26:37 +0100 <Maxdamantus> > length "강"
2022-03-22 07:26:38 +0100 <lambdabot> 3
2022-03-22 07:26:45 +0100 <Maxdamantus> Maybe that.
2022-03-22 07:27:02 +0100doyougnu(~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 240 seconds)
2022-03-22 07:27:46 +0100 <Maxdamantus> Looks reasonable on Android.
2022-03-22 07:28:22 +0100phma(phma@2001:5b0:211f:ad58:d57e:9b56:2014:519f) (Read error: Connection reset by peer)
2022-03-22 07:29:20 +0100phma(~phma@host-67-44-208-58.hnremote.net)
2022-03-22 07:29:30 +0100califax(~califax@user/califx) (Remote host closed the connection)
2022-03-22 07:29:53 +0100califax(~califax@user/califx)
2022-03-22 07:30:03 +0100 <abastro[m]> I see, I stand corrected. I did not know about it as it is nearly never used.
2022-03-22 07:30:39 +0100 <Maxdamantus> How do you know?
2022-03-22 07:31:06 +0100 <Maxdamantus> If you're using a correct Unicode renderer, you shouldn't be able to tell the difference, unless you copy the text and look at it in a hex editor or something.
2022-03-22 07:31:19 +0100 <Maxdamantus> or use the `length` function in Haskell.
2022-03-22 07:32:24 +0100Techcable(~Techcable@user/Techcable) (Remote host closed the connection)
2022-03-22 07:34:37 +0100Techcable(~Techcable@user/Techcable)
2022-03-22 07:34:38 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-03-22 07:34:47 +0100 <abastro[m]> > length "강"
2022-03-22 07:34:49 +0100 <lambdabot> 3
2022-03-22 07:35:03 +0100 <abastro[m]> Oh
2022-03-22 07:35:12 +0100 <abastro[m]> Yea, I confused something I guess.
2022-03-22 07:35:52 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-22 07:36:43 +0100 <abastro[m]> Namely, I thought Hangul Jamo region characters are not supposed to be combined
2022-03-22 07:37:18 +0100 <Maxdamantus> btw, regarding regex, the author of the main Rust regex library also created `bstr`, particularly for use as the basis of the regex library.
2022-03-22 07:37:35 +0100 <Maxdamantus> where `bstr` is basically the same as `str`, but without a constraint on UTF-8 well-formedness.
2022-03-22 07:38:00 +0100 <abastro[m]> Though, I can guarantee these encoding is rarely used - because 'combine format' is developed for ancient characters (those which are no longer used)
2022-03-22 07:38:55 +0100 <Maxdamantus> Well, if you convert to NFC or NFKC for whatever reason, you'll have those separate code points.
2022-03-22 07:38:55 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 07:39:03 +0100 <Maxdamantus> er, NFD or NFKD*
2022-03-22 07:40:15 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 07:40:31 +0100 <Maxdamantus> but sure, in general it's usually more sensible to generate precomposed code points where possible. that includes "é" just as much as "강".
2022-03-22 07:40:46 +0100 <abastro[m]> Oh, yep I was going to ask that
2022-03-22 07:40:48 +0100alMalsamolumberjack123
2022-03-22 07:40:59 +0100 <abastro[m]> * ask that: Is precomposed codepoints normally used
2022-03-22 07:41:21 +0100alp(~alp@user/alp) (Ping timeout: 252 seconds)
2022-03-22 07:41:33 +0100 <Maxdamantus> https://docs.rs/bstr/0.2.13/bstr/#when-should-i-use-byte-strings
2022-03-22 07:44:01 +0100 <abastro[m]> > UTF-8 by convention is a better trade off in some circumstances than guaranteed UTF-8
2022-03-22 07:44:01 +0100 <abastro[m]> What does this mean?
2022-03-22 07:44:02 +0100 <lambdabot> <hint>:1:43: error: parse error on input ‘in’
2022-03-22 07:44:21 +0100 <Maxdamantus> In Rust, the standard string type `str` is guaranteed to be valid UTF-8.
2022-03-22 07:44:25 +0100 <c_wraith> abastro[m]: it means that sometimes it's better to not actually parse the data
2022-03-22 07:45:12 +0100 <abastro[m]> Oh, not parsing the data
2022-03-22 07:45:14 +0100 <Maxdamantus> So when constructing a `str` from `[u8]`, the constructor will raise an error if the data is not well-formed UTF-8.
2022-03-22 07:45:17 +0100 <c_wraith> which is certainly true. Lots of applications where it's better to just store the bytes you receive
2022-03-22 07:45:52 +0100 <Maxdamantus> imo the main problem with doing that is that you end up with lots of cases where you legitimately want to deal with "strings" that potentially are not UTF-8, and then you have to do something really weird.
2022-03-22 07:46:08 +0100 <abastro[m]> So it does validation? I guess extra validation pass would indeed cost some more
2022-03-22 07:46:18 +0100 <Maxdamantus> eg in Rust, you've got `str`, `OsStr`, `[u8]`. I think there's something else too, but I haven't used Rust much.
2022-03-22 07:46:58 +0100 <abastro[m]> str is internally just [u8] validated as UTF8, right?
2022-03-22 07:47:05 +0100 <Maxdamantus> Yes.
2022-03-22 07:47:38 +0100 <Maxdamantus> It doesn't maintain any extra information, so eg, the length of a `str` is just the number of UTF-8 code units.
2022-03-22 07:48:07 +0100 <Maxdamantus> It just provides some nice UTF-8 abstractions on top, which is how Unicode handling should normally work.
2022-03-22 07:48:24 +0100 <Maxdamantus> (though preferably without the validation constraint, which leads to messy APIs)
2022-03-22 07:49:16 +0100 <abastro[m]> Hmm, unicode business is indeed complex
2022-03-22 07:50:09 +0100sloorush(~sloorush@136.233.9.99) (Ping timeout: 256 seconds)
2022-03-22 07:50:13 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2022-03-22 07:50:32 +0100 <Maxdamantus> The main problem is that people think they need to do something special with the complexity in many more cases than they actually do.
2022-03-22 07:50:47 +0100acidsys(~LSD@2a03:4000:55:d20::3) (Excess Flood)
2022-03-22 07:51:18 +0100acidsys(~LSD@2a03:4000:55:d20::3)
2022-03-22 07:51:23 +0100 <abastro[m]> Hmm
2022-03-22 07:52:40 +0100 <Maxdamantus> Unicode was designed such that you don't normally have to deal with that complexity. A string is just a sequence of code units. Most applications are only concerned with passing strings around or matching equal strings, or occasionally concatenating strings, all of which can be done on code units, and none of which necessitate a well-formedness check.
2022-03-22 07:54:04 +0100 <Maxdamantus> If you're doing something like rendering text, then you need to deal with the complexity. Also, in some cases when you're doing some sort of search, you might need to deal with some normalised form.
2022-03-22 07:54:09 +0100img(~img@user/img)
2022-03-22 07:55:20 +0100 <Maxdamantus> Usually when people claim that Unicode is hard, they use examples of nonsensical operations like reversing text, which noone ever actually wants to do.
2022-03-22 07:55:45 +0100 <hololeap> I have a 'package *' stanza and 'ghc-options:' in it, inside of cabal.project.local. it doesn't seem like these options are being used. what would be a good way to test this to be sure?
2022-03-22 07:56:47 +0100Batzy(~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-22 07:57:30 +0100 <Maxdamantus> % putStrLn $ reverse "악"
2022-03-22 07:57:30 +0100 <yahb> Maxdamantus: ᆨᅡᄋ
2022-03-22 07:57:56 +0100Batzy(~quassel@user/batzy)
2022-03-22 08:00:39 +0100 <hololeap> am I doing this right? https://dpaste.com/GFKKMJX6P
2022-03-22 08:01:53 +0100 <abastro[m]> As you have -Wall there, you can try sth like `ff:: [Int] -> [Int]; ff [] = []` and see if it reports incomplete pattern matching.
2022-03-22 08:02:33 +0100cfricke(~cfricke@user/cfricke)
2022-03-22 08:04:35 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-03-22 08:07:08 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-03-22 08:09:35 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 08:09:36 +0100nicbk(~nicbk@user/nicbk) (Ping timeout: 240 seconds)
2022-03-22 08:11:06 +0100benin(~benin@183.82.26.94) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 08:11:36 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 08:11:42 +0100nicbk(~nicbk@user/nicbk)
2022-03-22 08:13:00 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com)
2022-03-22 08:13:26 +0100acidjnk(~acidjnk@pd9e0b763.dip0.t-ipconnect.de)
2022-03-22 08:22:35 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-22 08:25:02 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-03-22 08:25:08 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-22 08:27:53 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 256 seconds)
2022-03-22 08:29:22 +0100 <sclv> hololeap: you can use the verbose flag
2022-03-22 08:30:34 +0100 <sclv> also i think you’re right. currently you need to enumerate options for each local package individually. the * confusingly enough, i think, only refers to nonlocal packages.
2022-03-22 08:32:32 +0100 <sclv> Maxdamantus: what about slicing strings? thats tricky, and also common.
2022-03-22 08:33:09 +0100 <sclv> or dealing with right to left script, especially admixed with regular script
2022-03-22 08:36:26 +0100 <abastro[m]> Right to left, hm..
2022-03-22 08:36:37 +0100 <abastro[m]> How is it dealt in unicode?
2022-03-22 08:38:00 +0100 <Maxdamantus> sclv: slicing works on code units as well, you just need to know where to slice from.
2022-03-22 08:38:21 +0100 <Maxdamantus> sclv: usually you'd want to slice after searching for a substring or something, which is fine.
2022-03-22 08:38:34 +0100 <sclv> well yes, but thats the slightly tricky bit
2022-03-22 08:38:39 +0100mmhat(~mmh@55d48f06.access.ecotel.net)
2022-03-22 08:38:57 +0100 <Maxdamantus> What? Searching for a substring? All of the UTFs are designed such that substring searches work.
2022-03-22 08:40:07 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-22 08:40:33 +0100 <Maxdamantus> If you remove a well-formed substring of a well-formed UTF code unit sequence, you will still have a well-formed code unit sequence.
2022-03-22 08:40:36 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 08:40:58 +0100 <Maxdamantus> There's no overlap, eg, https://news.ycombinator.com/item?id=30266023
2022-03-22 08:41:00 +0100 <sclv> right. but you have to work code unit wise not bytewise.
2022-03-22 08:41:06 +0100 <sclv> that’s all.
2022-03-22 08:41:22 +0100 <Maxdamantus> code units are bytes (in UTF-8).
2022-03-22 08:41:45 +0100 <Maxdamantus> in UTF-16, code units are 16-bit values.
2022-03-22 08:41:55 +0100 <Maxdamantus> in UTF-8, code units are 8-bit values (aka bytes).
2022-03-22 08:42:01 +0100 <Maxdamantus> in UTF-32, code units are 32-bit values.
2022-03-22 08:42:22 +0100 <sclv> i should have said code point wise, not code unit wise
2022-03-22 08:42:49 +0100 <Maxdamantus> Why do you think you have to work code point-wise?
2022-03-22 08:43:07 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-03-22 08:43:19 +0100 <Maxdamantus> If you search for a substring and get a position in code units, you can use that code unit position to slice the string.
2022-03-22 08:43:27 +0100 <sclv> because you shouldn’t split a codepoint down the middle. you want to work with logical characters
2022-03-22 08:43:33 +0100 <Maxdamantus> It works whether you're using code points or code units.
2022-03-22 08:43:42 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5)
2022-03-22 08:43:50 +0100 <Maxdamantus> So don't search for partial code points.
2022-03-22 08:44:04 +0100 <sclv> your substring search should give back code points not units. and you shouldn’t be able to split a code point in two
2022-03-22 08:44:14 +0100 <sclv> if your types permit this, thats a bad api
2022-03-22 08:44:18 +0100 <Maxdamantus> It should give back an offset that can be used to slice the string.
2022-03-22 08:44:33 +0100 <sclv> so you’re saying to not enforce the abstration?
2022-03-22 08:44:55 +0100 <sclv> “let users shoot themselves in the foot?”
2022-03-22 08:45:00 +0100 <Maxdamantus> You mean enforce well-formedness? Correct. I'm saying not to enforce well-formedness. That's how Unicode was designed to work.
2022-03-22 08:45:15 +0100 <Maxdamantus> Unicode doesn't expect strings to always be well-formed, because it was designed as an encoding on top of code units.
2022-03-22 08:45:19 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 08:45:21 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
2022-03-22 08:45:22 +0100 <sclv> thats silly
2022-03-22 08:45:30 +0100 <sclv> haskellers like well formed things
2022-03-22 08:45:43 +0100 <Maxdamantus> No, what's silly is making an API that claims that filenames are well-formed UTF-8 strings.
2022-03-22 08:45:47 +0100 <sclv> if a user can write an ill formed thing they will
2022-03-22 08:45:58 +0100 <sclv> i agree on that but not because unicode
2022-03-22 08:46:16 +0100 <sclv> filenames are not even necessarily unicode encoded
2022-03-22 08:46:20 +0100 <Maxdamantus> Exactly.
2022-03-22 08:46:25 +0100 <Maxdamantus> Neither are text files.
2022-03-22 08:46:29 +0100 <sclv> they’re bytes with locale dependent interpretation
2022-03-22 08:46:37 +0100 <sclv> unicode is irrelevant
2022-03-22 08:46:41 +0100 <Maxdamantus> but grep works on Unicode text files anyway. It doesn't care whether it's well-formed UTF-8.
2022-03-22 08:46:50 +0100 <Maxdamantus> this is by design of UTF-8.
2022-03-22 08:46:51 +0100 <sclv> there is no such thing as a “text file”
2022-03-22 08:47:00 +0100 <Maxdamantus> Exactly.
2022-03-22 08:47:03 +0100 <sclv> there is a file as a sequence of bytes
2022-03-22 08:47:21 +0100 <sclv> unicode is one interpretation of the file
2022-03-22 08:47:22 +0100 <Maxdamantus> Indeed. If the data exists outside of the application, it's bytes.
2022-03-22 08:47:45 +0100 <Maxdamantus> And Unicode was designed to allow people to make it so that those bytes represent human text.
2022-03-22 08:47:51 +0100 <sclv> but in the app, we like to enforce well formed representation and keep the problems at the barrier
2022-03-22 08:48:08 +0100 <sclv> if the types let people write ill formed things, they will
2022-03-22 08:48:09 +0100 <Maxdamantus> But that doesn't match reality, which is bytes.
2022-03-22 08:48:18 +0100machinedgod(~machinedg@24.105.81.50)
2022-03-22 08:48:29 +0100 <sclv> well why have floats or integers then? its all bytes!!
2022-03-22 08:48:35 +0100 <sclv> we use haskell, not c
2022-03-22 08:48:38 +0100 <Maxdamantus> If the types claim something counter to reality, your program will crash.
2022-03-22 08:48:45 +0100 <sclv> Not in haskell!
2022-03-22 08:48:57 +0100 <sclv> Because the types here don’t lie.
2022-03-22 08:49:02 +0100 <sclv> Thats the whole point
2022-03-22 08:49:12 +0100 <Maxdamantus> Yes, so Haskell will crash on non-UTF-8 data.
2022-03-22 08:49:13 +0100 <abastro[m]> Hm, lengthy discussion
2022-03-22 08:49:13 +0100 <Maxdamantus> That's bad.
2022-03-22 08:49:36 +0100 <sclv> no, text in haskell is guaranteed well formed
2022-03-22 08:49:48 +0100 <sclv> thats what the text library gives you
2022-03-22 08:49:51 +0100 <abastro[m]> Non-UTF-8 data is not supposed to be String, right?
2022-03-22 08:49:57 +0100 <Maxdamantus> The text library doesn't generate data.
2022-03-22 08:50:01 +0100 <Maxdamantus> Data comes from outside the application.
2022-03-22 08:50:04 +0100 <sclv> a string is a sequence of codepoints
2022-03-22 08:50:10 +0100 <Maxdamantus> Not according to Unicode.
2022-03-22 08:50:16 +0100 <Maxdamantus> According to Unicode, a string is a sequence of code units.
2022-03-22 08:50:29 +0100 <Maxdamantus> And they are not expected to always be well-formed.
2022-03-22 08:50:34 +0100 <Maxdamantus> Unicode explicitly says this.
2022-03-22 08:50:56 +0100 <sclv> In haskell the literal string type is a list of characters and characters are code units
2022-03-22 08:51:17 +0100 <sclv> I don’t care if unicode defines “string” differently
2022-03-22 08:51:40 +0100 <Maxdamantus> Haskell has an even weirder handling of Unicode, since it has code points but it doesn't enforce use of scalar values.
2022-03-22 08:51:55 +0100 <sclv> when parsing in bytes you get back either the answer or an error you can handle
2022-03-22 08:51:57 +0100 <sclv> Sigh
2022-03-22 08:52:18 +0100 <Maxdamantus> % putStrLn [toEnum 0xd800]
2022-03-22 08:52:18 +0100 <yahb> Maxdamantus: *** Exception: <stdout>: hPutChar: invalid argument (invalid character)
2022-03-22 08:52:54 +0100 <Maxdamantus> What sort of string is "\55296"?
2022-03-22 08:53:19 +0100 <sclv> ok but can you do that with Text which is the proper abstraction?
2022-03-22 08:53:41 +0100 <abastro[m]> So String is indeed wrong abstraction, right
2022-03-22 08:53:42 +0100 <Maxdamantus> What OS API gives back `Text`?
2022-03-22 08:54:14 +0100 <sclv> they all give back bytes. but we enforce abstraction at the boundaries when possible
2022-03-22 08:54:20 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 08:54:28 +0100 <sclv> thats what you are dismissing
2022-03-22 08:54:38 +0100 <sclv> is enforcing abstraction at the boundaries
2022-03-22 08:54:41 +0100 <Maxdamantus> If you do that, your program will crash unnecessarily.
2022-03-22 08:54:55 +0100 <sclv> no, if you do that it won’t crash
2022-03-22 08:54:55 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 08:55:01 +0100 <sclv> thats the point
2022-03-22 08:55:03 +0100 <Maxdamantus> It would suck having a `grep` that crashes as soon as it sees some ill-formed UTF-8.
2022-03-22 08:55:23 +0100 <sclv> nobody is arguing it should
2022-03-22 08:55:33 +0100 <sclv> you’re arguing against a straw man
2022-03-22 08:56:00 +0100 <sclv> but sometimes you want actual well formed text and to enforce that. how hard is that to grok!?
2022-03-22 08:56:02 +0100 <Maxdamantus> You're arguing that text inputs should be enforced as well-formed Unicode.
2022-03-22 08:56:09 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 252 seconds)
2022-03-22 08:56:11 +0100 <sclv> when it makes sense, yes
2022-03-22 08:56:12 +0100 <Maxdamantus> "sometimes", sure.
2022-03-22 08:56:28 +0100 <sclv> grep isn’t something thats about text. it is
2022-03-22 08:56:32 +0100 <Maxdamantus> So you can have an assertion for that, or even come up with a wrapper type.
2022-03-22 08:56:34 +0100 <sclv> about bytes
2022-03-22 08:56:49 +0100 <sclv> we have that type. it is called text!!
2022-03-22 08:57:03 +0100 <sclv> We have the other type too. it is called bytestring!
2022-03-22 08:57:14 +0100 <Maxdamantus> Do you intentionally grep binary files?
2022-03-22 08:57:22 +0100 <sclv> we can pick the one we want. it rules!
2022-03-22 08:57:29 +0100 <sclv> (sometimes, yes)
2022-03-22 08:57:33 +0100 <Maxdamantus> I mean .. grep does have a "binary" mode (as opposed to the default "text" mode).
2022-03-22 08:57:48 +0100 <Maxdamantus> but usually you expect to use grep in text mode, where it prints out the lines that are matched.
2022-03-22 08:57:53 +0100 <Maxdamantus> it's very much text-based.
2022-03-22 08:58:01 +0100fef(~thedawn@user/thedawn)
2022-03-22 08:58:09 +0100 <sclv> i am aware
2022-03-22 08:58:12 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-03-22 08:58:22 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 08:59:22 +0100 <abastro[m]> I guess one point of debate is, if a string of nonstandard encoding should be counted as string or not.
2022-03-22 08:59:28 +0100 <Franciman> Maxdamantus: there is bytestring for dealing with possibly invalid utf8
2022-03-22 08:59:32 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 240 seconds)
2022-03-22 08:59:37 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-03-22 08:59:48 +0100 <Franciman> if you use lazy bytestrings, you can have lazy decoding composed
2022-03-22 08:59:51 +0100 <Maxdamantus> Franciman: sure, but noone wants to pass `ByteString`s around because nothing accepts them.
2022-03-22 09:00:04 +0100 <Maxdamantus> Franciman: printing bytestrings is annoying.
2022-03-22 09:00:05 +0100 <Franciman> lazy decoding!
2022-03-22 09:00:09 +0100 <Franciman> to a text
2022-03-22 09:00:11 +0100 <Franciman> look
2022-03-22 09:00:17 +0100 <Franciman> :t decodeUtf8
2022-03-22 09:00:18 +0100 <lambdabot> error: Variable not in scope: decodeUtf8
2022-03-22 09:00:19 +0100 <Franciman> ofc
2022-03-22 09:00:43 +0100 <Franciman> https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Encoding.html#v:decodeUtf8-39-
2022-03-22 09:00:46 +0100 <Franciman> here you can catch the error
2022-03-22 09:00:46 +0100 <Maxdamantus> That gives you back a `String` iirc, which is inappropriate.
2022-03-22 09:00:53 +0100 <Franciman> it gives back a text!
2022-03-22 09:00:54 +0100 <Maxdamantus> or a `Text`, I guess.
2022-03-22 09:01:00 +0100 <Maxdamantus> again, inappropriate.
2022-03-22 09:01:05 +0100 <Franciman> what do you need?
2022-03-22 09:01:07 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 09:01:13 +0100 <Maxdamantus> Some text to print to stdout.
2022-03-22 09:01:21 +0100 <Maxdamantus> putStrLn myText
2022-03-22 09:01:36 +0100 <Franciman> i don't understand why the previous types are innapropriate, then
2022-03-22 09:01:40 +0100 <Maxdamantus> Why do I care if it's well-formed? If a user inputs ill-formed data, that's their problem. GIGO.
2022-03-22 09:02:13 +0100 <Franciman> then just use text, and when catching the exception, print "GIGO, input is ill formed"
2022-03-22 09:02:27 +0100 <Maxdamantus> But that's not the intended behaviour.
2022-03-22 09:02:38 +0100 <Franciman> so you care if it's ill formed?
2022-03-22 09:02:39 +0100 <Maxdamantus> If a user enters a string, I want to print back their string.
2022-03-22 09:02:48 +0100 <Franciman> then you want to print out bytes
2022-03-22 09:02:49 +0100 <Maxdamantus> If a user enters a garbage string, I want to print back their garbage string.
2022-03-22 09:03:00 +0100 <Franciman> and let the console handle the encoding for you
2022-03-22 09:03:02 +0100 <Maxdamantus> No, I don't care whether it's well-formed.
2022-03-22 09:03:20 +0100 <Maxdamantus> Most programs shouldn't care whether their inputs are well-formed, since all they're doing is passing them to something else.
2022-03-22 09:03:27 +0100 <Maxdamantus> and again, GIGO.
2022-03-22 09:04:06 +0100 <Maxdamantus> read some text from a file, write the text to another file. There's no need to add a corner case for ill-formed data.
2022-03-22 09:04:40 +0100 <abastro[m]> Uhm, if you just read a text from a file into another, then you could use ByteString to do the task
2022-03-22 09:04:41 +0100 <Franciman> i would use ByteString and print it with https://hackage.haskell.org/package/bytestring-0.11.3.0/docs/Data-ByteString.html#v:putStr
2022-03-22 09:05:33 +0100 <Maxdamantus> Franciman: the point is there is no need for a separate `ByteString` type.
2022-03-22 09:05:51 +0100 <Maxdamantus> The standard `String` type should be able to cater to both use cases, by itself being a byte string.
2022-03-22 09:05:57 +0100 <Franciman> String is a list
2022-03-22 09:06:07 +0100 <Franciman> it's a synonym with [Char]
2022-03-22 09:06:14 +0100 <Maxdamantus> I'm aware.
2022-03-22 09:06:33 +0100 <Franciman> and Char is a codepoint, a 32bit integer
2022-03-22 09:06:43 +0100 <Franciman> it can't deal with utf8
2022-03-22 09:06:45 +0100 <Franciman> or 16
2022-03-22 09:06:47 +0100 <Franciman> or whatever
2022-03-22 09:06:56 +0100 <sclv> the type you want would be [byte] not list of char
2022-03-22 09:07:00 +0100 <sclv> we have that too
2022-03-22 09:07:05 +0100 <Maxdamantus> Actually, it's not a particular number of bits. It's a value in the range [0..0x10ffff]
2022-03-22 09:07:17 +0100 <sclv> but we have bytestring because it is more efficient
2022-03-22 09:07:44 +0100 <Franciman> also i think having a type which guarantees well formed text is important in many cases
2022-03-22 09:08:28 +0100 <Franciman> tautologically, when you have to ensure that the input is well formed :P
2022-03-22 09:08:35 +0100 <Franciman> Text is a proof that input is well formed
2022-03-22 09:08:46 +0100 <Maxdamantus> It might be useful in a small number of cases, but in general it only adds unnecessary corner cases where your program is just going to crash instead of passing the user's data through.
2022-03-22 09:09:00 +0100 <Franciman> if you don't need it, you use a stream of bytes. After decoding the stream of bytes, if successful you have proof of correctness
2022-03-22 09:09:06 +0100 <Franciman> and i like that it's retained in the type system
2022-03-22 09:09:25 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-22 09:09:27 +0100 <Maxdamantus> It should be a conscious decision to reject ill-formed Unicode. It shouldn't be the default.
2022-03-22 09:09:54 +0100 <Maxdamantus> There are very few cases where it's actually useful.
2022-03-22 09:09:59 +0100alp(~alp@user/alp)
2022-03-22 09:10:09 +0100 <Maxdamantus> And there are lots of cases where users are going to be glad that your program doesn't break on ill-formed input.
2022-03-22 09:10:10 +0100 <Franciman> Maxdamantus: if you have to deal with both ill formed and well formed unicode, then character accessing rutines get more difficult
2022-03-22 09:10:12 +0100 <Maxdamantus> eg, grep.
2022-03-22 09:10:21 +0100 <Franciman> you have to always deal with two cases to access the n-th character
2022-03-22 09:10:27 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 09:10:32 +0100 <Franciman> what's the n-th code point of an ill formed input sequence?
2022-03-22 09:10:52 +0100 <Maxdamantus> Franciman: where does `n` come from?
2022-03-22 09:11:25 +0100 <Maxdamantus> Is it a constant value you've hardcoded into your program? What does it mean?
2022-03-22 09:11:43 +0100 <abastro[m]> Hm, I guess many uses of String is going to be ill-formed - since one might just need to pass "string"s around in quite a many cases.
2022-03-22 09:11:44 +0100 <Maxdamantus> This sounds like another one of these nonsense operations, like reversing a string.
2022-03-22 09:11:46 +0100 <Franciman> https://hackage.haskell.org/package/text-2.0/docs/Data-Text.html#v:take
2022-03-22 09:11:50 +0100 <Franciman> for exaple this function
2022-03-22 09:11:58 +0100 <Maxdamantus> Franciman: my question stands.
2022-03-22 09:12:31 +0100 <Maxdamantus> Franciman: there's also a `reverse` function. Doesn't mean it's useful.
2022-03-22 09:12:44 +0100 <Maxdamantus> Franciman: `take` makes sense if you've measured a substring.
2022-03-22 09:13:06 +0100 <Franciman> Maxdamantus: so you seem to imply that there is no need to have static guarantees that the input string is well formed
2022-03-22 09:13:08 +0100 <Franciman> ever
2022-03-22 09:13:18 +0100 <Maxdamantus> Franciman: in which case `n` is just the length of some other string. Whether it was measured in bytes or code units or glyphs should be irrelevant, just as long as it's consistent.
2022-03-22 09:13:45 +0100 <Franciman> and it would be nice if the compiler could check that it's consistent
2022-03-22 09:13:46 +0100 <Maxdamantus> Franciman: I wouldn't say "not ever"
2022-03-22 09:13:51 +0100 <Maxdamantus> 21:08:46 < Maxdamantus> It might be useful in a small number of cases, but in general it only adds unnecessary corner cases where your program is just going to crash instead of passing the user's data through.
2022-03-22 09:14:00 +0100 <Franciman> Maxdamantus: if there is at least one case, i don't see why we can't have a library for dealing with it
2022-03-22 09:14:17 +0100 <Maxdamantus> Franciman: if you want to make it consistent, don't provide `ByteString` and `Text`
2022-03-22 09:14:19 +0100 <Franciman> so i don't understand your whole proposal of "it's useless to have distinct types"
2022-03-22 09:14:24 +0100 <Franciman> i dont' see why!
2022-03-22 09:14:29 +0100 <Franciman> they serve different purposes
2022-03-22 09:14:35 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Quit: mikoto-chan)
2022-03-22 09:14:36 +0100xff0x(~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds)
2022-03-22 09:14:55 +0100 <Maxdamantus> Franciman: because it's unnecessarily introducing an additional string length, one based on a concept that is useless in all other cases.
2022-03-22 09:15:05 +0100 <Maxdamantus> https://hsivonen.fi/string-length/
2022-03-22 09:15:38 +0100 <Franciman> they are distinct types
2022-03-22 09:15:41 +0100 <Franciman> with distinct requirements
2022-03-22 09:15:51 +0100 <Franciman> and serve different purposes
2022-03-22 09:15:56 +0100 <Franciman> you use which one suits you best in each case
2022-03-22 09:16:30 +0100 <Franciman> as you said: `n` is just the length of some other string, whether misured in bytes, or code units or glyphs should be irrelevant, just as long as it's consistent
2022-03-22 09:16:34 +0100 <Franciman> the types give you the consistency
2022-03-22 09:16:40 +0100 <Franciman> if you use the bytestring interface it's bytes
2022-03-22 09:16:48 +0100 <Franciman> if you use the text interface it's codepoints IIUC
2022-03-22 09:16:49 +0100 <Maxdamantus> Right, so when is it *useful* for that `n` to be based on code points?
2022-03-22 09:17:05 +0100 <Maxdamantus> Yes, it's only useful for using `Text`.
2022-03-22 09:17:21 +0100 <Maxdamantus> So a code point length is used by `Text` because it's useful for `Text`.
2022-03-22 09:17:26 +0100 <Maxdamantus> Recursive logic.
2022-03-22 09:17:37 +0100 <Maxdamantus> code point lengths don't exist in the outside world.
2022-03-22 09:17:40 +0100dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be)
2022-03-22 09:17:43 +0100 <Franciman> i used it for my lexer
2022-03-22 09:17:59 +0100 <Franciman> and it was easier to use rather than bytestring
2022-03-22 09:18:09 +0100 <Franciman> and it was acceptable to reject ill formed utf8
2022-03-22 09:18:16 +0100 <Franciman> so it was much easier to work with Text than raw bytes
2022-03-22 09:18:32 +0100 <Franciman> and Text gives me the static guarantees to work that way, with an easier interface
2022-03-22 09:18:44 +0100 <Franciman> which i know is statically guaranteed to talk about codepoints, rather than bytes
2022-03-22 09:20:41 +0100chele(~chele@user/chele)
2022-03-22 09:21:24 +0100 <Maxdamantus> So what `Text` operations were you able to use that made it easier, and why could they not be implemented on byte strings?
2022-03-22 09:21:36 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 245 seconds)
2022-03-22 09:22:06 +0100 <Maxdamantus> If you want to reject ill-formed UTF-8, that's fine. There can be an `isWellFormed` function that checks that, and you can throw an error if someone gives you text that doesn't pass that check.
2022-03-22 09:22:27 +0100 <Franciman> bytecode only has single byte operations
2022-03-22 09:22:36 +0100 <Franciman> so you have to manually check where each codepoint starts
2022-03-22 09:23:03 +0100 <Maxdamantus> What does your lexer actually do? Is it not based on substring searching? That works on byte strings.
2022-03-22 09:23:36 +0100 <Maxdamantus> Not sure about Haskell `ByteString`, I'd have to look it up.
2022-03-22 09:24:14 +0100 <Maxdamantus> Right, there's `breakSubstring`
2022-03-22 09:24:31 +0100 <Maxdamantus> so you could presumably use something like `breakSubstring " "` if you want to separate by a space.
2022-03-22 09:24:34 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net)
2022-03-22 09:24:48 +0100 <Franciman> yes
2022-03-22 09:25:19 +0100 <Maxdamantus> And there should preferably also be a way of checking if the string starts with a given string, since that's also very useful in a lexer.
2022-03-22 09:25:19 +0100 <abastro[m]> What is codepoint btw, really?
2022-03-22 09:25:32 +0100 <Franciman> it's a number representing something
2022-03-22 09:25:55 +0100 <Franciman> i don't remember if it represent a glyph or there is an intermediate step
2022-03-22 09:26:10 +0100 <Maxdamantus> abastro[m]: technically, it's a number between 0x0 and 0x10FFFF (inclusive), normally denoted as `U+0000` to `U+10FFFF`
2022-03-22 09:26:23 +0100 <Franciman> Maxdamantus: so are you trying to argue that Text is useless and everybody should use ByteString?
2022-03-22 09:26:24 +0100 <abastro[m]> Hm I don't think it represents glyph
2022-03-22 09:27:04 +0100 <Maxdamantus> abastro[m]: though there are code points that are not allowed to be encoded in Unicode, particularly U+D800 to U+DFFF (inclusive). Excluding those invalid code points gives you the set of "Unicode scalar values".
2022-03-22 09:28:03 +0100 <Maxdamantus> abastro[m]: Unicode defines a meaning for lots of the Unicode scalar values, and it defines three encodings, UTF-8, UTF-16 and UTF-32 that are able to encode sequences of Unicode scalar values to sequences of 8-bit, 16-bit or 32-bit code units respectively.
2022-03-22 09:28:13 +0100vorpuni(~pvorp@2001:861:3881:c690:b51e:da9f:aa64:a038)
2022-03-22 09:28:33 +0100 <abastro[m]> So it is just a scalar values, which does not represent anythint
2022-03-22 09:29:02 +0100 <Maxdamantus> abastro[m]: correct. They don't necessarily represent a glyph. eg, I can write a glyph like "á" as [U+61 U+301], using those two code points.
2022-03-22 09:29:06 +0100 <abastro[m]> Just some unit of representing a symbol, which is then combined to form glyphs, graphemes and suxh
2022-03-22 09:29:35 +0100 <Franciman> is U+61 alone a glyph?
2022-03-22 09:29:47 +0100 <abastro[m]> I guess that is the crux of argument against using codepoint array/list
2022-03-22 09:29:47 +0100 <Maxdamantus> Yes, usually.
2022-03-22 09:30:05 +0100 <Franciman> yes one would need also a normalized chunk of text
2022-03-22 09:30:07 +0100 <Maxdamantus> U+61 is 'a'
2022-03-22 09:30:12 +0100 <abastro[m]> Oh wow, glyph business is complicated
2022-03-22 09:30:19 +0100 <Franciman> oh i mean u+301 sorry xD
2022-03-22 09:30:52 +0100 <Maxdamantus> then no, U+301 is not really a glyph on its own. It's a "combining character" which can be added to other glyphs.
2022-03-22 09:31:26 +0100 <Franciman> btw working on codepoints is still nice when you want to know which category they belong with
2022-03-22 09:31:36 +0100 <Franciman> that's why i used text rather than bytestring
2022-03-22 09:31:39 +0100 <[exa]> unicode defines characters (i.e., tiny pieces with semantic meaning), not glyphs (unless the character explicitly refers to some kind of a glyph)
2022-03-22 09:31:49 +0100 <Maxdamantus> There's no reason why a decent byte string library couldn't offer that.
2022-03-22 09:32:06 +0100 <Franciman> Maxdamantus: because haskell's bytestring deals with bytes
2022-03-22 09:32:35 +0100 <Maxdamantus> It could offer a function `splitFirstCodePoint :: ByteString -> (Maybe Char, ByteString)`
2022-03-22 09:32:40 +0100 <Franciman> it's a separation of concerns
2022-03-22 09:32:43 +0100 <abastro[m]> How do you get category from a codepoint?
2022-03-22 09:32:54 +0100 <Franciman> there are huge tables lol
2022-03-22 09:33:01 +0100 <[exa]> Maxdamantus: you may eventually notice that the current selection of string libraries already packs a bit of survivor bias :]
2022-03-22 09:33:06 +0100 <Maxdamantus> or `splitFirstCodePoint :: ByteString -> (Either Char Word8, ByteString)`
2022-03-22 09:33:19 +0100 <[exa]> abastro[m]: you look it up a table encoded in libicu or something
2022-03-22 09:33:35 +0100 <abastro[m]> Oh, so codepoint does mean something then
2022-03-22 09:33:48 +0100 <abastro[m]> (Albeit only occasionally)
2022-03-22 09:34:13 +0100 <abastro[m]> Anyway, I wonder if it is good practice to use `Text` for a file name
2022-03-22 09:34:19 +0100 <Franciman> btw i agree that unicode is very complicated, and most of the time working on single codepoints isn't enough
2022-03-22 09:34:36 +0100 <Franciman> but albeit it's user friendly lol
2022-03-22 09:34:50 +0100 <Franciman> because it provides a simplified model
2022-03-22 09:34:57 +0100 <Maxdamantus> abastro[m]: my overall point has been that people shouldn't be pushed into doing that.
2022-03-22 09:35:20 +0100 <Franciman> abastro[m]: depends on the platform
2022-03-22 09:35:25 +0100 <Franciman> iiuc on linux no
2022-03-22 09:35:33 +0100 <Franciman> because linux paths can contain invalid utf8
2022-03-22 09:35:50 +0100 <Maxdamantus> Haskell has `type FilePath = String`, which is just as problematic as `Text`
2022-03-22 09:35:56 +0100 <Franciman> yes
2022-03-22 09:36:00 +0100 <Franciman> true
2022-03-22 09:36:28 +0100 <tomsmeding> sm: so basically you want soft-wrapping of the paste? That's been on my todo list for a while :)
2022-03-22 09:36:36 +0100doyougnu(~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
2022-03-22 09:36:40 +0100 <abastro[m]> I guess `type FilePath = String` is one huge problem
2022-03-22 09:36:45 +0100 <abastro[m]> Separate FilePath type would be great
2022-03-22 09:36:59 +0100 <abastro[m]> Tho it would be breaking change :<
2022-03-22 09:37:04 +0100 <Maxdamantus> actually, arguably I guess someone could come up with an encoding for ill-formed UTF-8 into `String` (Python 3 did this .. a few months after release when they realised it was a problem).
2022-03-22 09:37:22 +0100 <Maxdamantus> but that thing that Python does is a hack.
2022-03-22 09:37:29 +0100 <Maxdamantus> Python 3*
2022-03-22 09:37:53 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 09:38:16 +0100 <Maxdamantus> https://peps.python.org/pep-0383/
2022-03-22 09:39:11 +0100 <Maxdamantus> So since Python 3 strings can also represent invalid code points (in the range 0xD800 to 0xDFFF), it uses that range to encode ill-formed UTF-8.
2022-03-22 09:39:13 +0100 <Hecate> abastro[m]: maerwald[m]: is on it already
2022-03-22 09:39:31 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 256 seconds)
2022-03-22 09:39:38 +0100 <abastro[m]> Oh, changing FilePath?
2022-03-22 09:39:41 +0100 <Maxdamantus> abastro[m]: my point is that there shouldn't be a separate type.
2022-03-22 09:39:47 +0100 <abastro[m]> It would be great! ..but at what cost
2022-03-22 09:40:01 +0100 <Hecate> abastro[m]: the price to pay for shitty design
2022-03-22 09:40:10 +0100 <Maxdamantus> There should be one type that is usable for the vast majority of strings, and that type is basically a wrapper around byte strings.
2022-03-22 09:40:12 +0100 <abastro[m]> Hahaha
2022-03-22 09:40:29 +0100 <abastro[m]> Btw, It would be great to have FilePath /= ByteString or Text, indeed
2022-03-22 09:40:40 +0100 <Maxdamantus> Then when people design APIs, they know which string to use, and don't have to pick between `String`, `ByteString`, `Text`, `FilePath`, whatever.
2022-03-22 09:40:43 +0100dextaa_(~dextaa@user/dextaa) (Remote host closed the connection)
2022-03-22 09:40:47 +0100 <abastro[m]> More utilities to have for FilePath.. but yea it would involve OS business
2022-03-22 09:40:55 +0100 <dibblego> just use lens and defer the decision, since there is no winner anyway
2022-03-22 09:40:56 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 09:45:23 +0100 <abastro[m]> One of criticism against haskell was that it has too many types for string, but I think rust took that now.
2022-03-22 09:46:03 +0100 <Maxdamantus> Yes, Rust also has a bunch of hacks to work around this issue.
2022-03-22 09:46:11 +0100 <Maxdamantus> `str`, `OsStr`, `[u8]`
2022-03-22 09:46:28 +0100 <abastro[m]> There would surely be a reason for that, right
2022-03-22 09:46:43 +0100 <Maxdamantus> and ime, libraries often end up providing filesystem functions for both `&str` and `&OsStr`
2022-03-22 09:46:54 +0100 <abastro[m]> At least their `str` is not linked list of code points
2022-03-22 09:46:57 +0100 <Maxdamantus> Yes, because `str` is guaranteed well-formed.
2022-03-22 09:47:08 +0100 <Maxdamantus> If they didn't have that unnecessary restriction, there would only be one string type.
2022-03-22 09:47:12 +0100mikoto-chan(~mikoto-ch@84.199.144.235)
2022-03-22 09:47:19 +0100 <Maxdamantus> and APIs wouldn't have to decide whether to use `str` or `OsStr`.
2022-03-22 09:47:24 +0100 <abastro[m]> Wouldn't converting OsStr into str and back trivial?
2022-03-22 09:47:45 +0100 <Maxdamantus> No. Some `OsStr`s can't be converted to `str`, because they contain ill-formed Unicode.
2022-03-22 09:48:35 +0100 <Hecate> I just want three types in my life: a grapheme cluster, a binary blob, and an FFI blob
2022-03-22 09:48:47 +0100 <abastro[m]> I mean, at least when we have expectation that it is str
2022-03-22 09:48:48 +0100Pickchea(~private@user/pickchea)
2022-03-22 09:50:10 +0100 <Maxdamantus> another interesting one is Raku .. Raku decided to make its strings be a sequence of grapheme clusters, which are very awkward to actually detect.
2022-03-22 09:50:51 +0100 <Maxdamantus> it also has a funny hack for handling ill-formed strings, and they've changed it a few times to handle extra cases they didn't think of, particularly because they automatically normalise strings too.
2022-03-22 09:51:38 +0100 <Hecate> https://hexdocs.pm/elixir/String.html#content <- I like this page a lot
2022-03-22 09:51:43 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
2022-03-22 09:51:47 +0100 <abastro[m]> Hm I recall some names not being valid unicode btw
2022-03-22 09:51:50 +0100 <Hecate> especially this section https://hexdocs.pm/elixir/String.html#module-code-points-and-grapheme-cluster
2022-03-22 09:52:08 +0100 <Hecate> abastro[m]: "some names" is quite vague, like people's names?
2022-03-22 09:52:13 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 240 seconds)
2022-03-22 09:52:23 +0100 <Hecate> because their alphabet wasn't incorporated into the Unicode standard?
2022-03-22 09:52:27 +0100 <Maxdamantus> Basically, there are "synthetic" grapheme clusters that look something like "\u101000xFF", which are distinct from strings that are literally written that way in the source code (in which case the string is made up of 4 grapheme clusters, "\u101000", "x", "F", "F".
2022-03-22 09:52:29 +0100 <abastro[m]> Yea, people's names
2022-03-22 09:52:39 +0100 <abastro[m]> I recall seeing the article. Yes, likely because not incorporated
2022-03-22 09:53:24 +0100zeenk(~zeenk@2a02:2f04:a110:7d00:2011:cfed:bad7:3c94)
2022-03-22 09:53:28 +0100 <Hecate> abastro[m]: yeah, then it's not something that can be actionable at the PL level
2022-03-22 09:53:49 +0100 <Maxdamantus> and I reported some bugs for weird behaviour with their handling of grapheme clusters. you can construct a well-formed UTF-8 string that's about 140 KiB, but when read in Raku it allocates about 20 GiB of memory.
2022-03-22 09:54:01 +0100 <Hecate> Maxdamantus: oh that's vile :D
2022-03-22 09:54:05 +0100 <abastro[m]> Well, you could use ByteString for the names
2022-03-22 09:54:12 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-03-22 09:54:29 +0100 <Hecate> abastro[m]: which you still have to decode into UTF-8 or UTF-16 or latin1 if you want to display :-P
2022-03-22 09:54:30 +0100 <Maxdamantus> https://github.com/MoarVM/MoarVM/issues/1648
2022-03-22 09:54:40 +0100 <Hecate> otherwise it's an opaque string and doesn't serve the basic purpose of a name ;-)
2022-03-22 09:54:58 +0100 <abastro[m]> Hm, I think names do have more purpose than display
2022-03-22 09:55:06 +0100 <Maxdamantus> 240 KiB, not 140 KiB.
2022-03-22 09:55:23 +0100mc47(~mc47@xmonad/TheMC47)
2022-03-22 09:55:26 +0100 <abastro[m]> Like some part of the identification
2022-03-22 09:55:39 +0100 <Hecate> abastro[m]: I agree with you but I think the display of a name in a computer system is the root of most of these other purposes
2022-03-22 09:56:00 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Client Quit)
2022-03-22 09:56:09 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
2022-03-22 09:56:13 +0100 <Hecate> yes but then you'd have to support entering non-unicode stuff in all the chain of equipment and software that leads to this name being compared in the database
2022-03-22 09:56:17 +0100 <abastro[m]> I recall many pages which combines name and other properties for identification process
2022-03-22 09:56:18 +0100 <Hecate> so, the keyboard must support it
2022-03-22 09:56:25 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-03-22 09:58:00 +0100 <abastro[m]> Keyboard? Uhm
2022-03-22 09:58:12 +0100 <abastro[m]> There are tons of input methods
2022-03-22 09:59:04 +0100 <merijn> I mean, I can't even properly write my IRC name on IRC, because no non-ascii allowed >.>
2022-03-22 09:59:58 +0100 <abastro[m]> Oh...
2022-03-22 10:00:09 +0100considerate[m](~considera@2001:470:69fc:105::1:c2aa) (Quit: You have been kicked for being idle)
2022-03-22 10:00:16 +0100 <abastro[m]> Yea language support in programming is rather tenuous
2022-03-22 10:00:29 +0100 <abastro[m]> https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ I guess this is the article
2022-03-22 10:00:53 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 268 seconds)
2022-03-22 10:02:17 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 10:04:27 +0100 <tomsmeding> merijn: that's kind of stretching dutch spelilng :p
2022-03-22 10:04:36 +0100fendor(~fendor@91.141.35.69.wireless.dyn.drei.com)
2022-03-22 10:04:45 +0100 <tomsmeding> other people on this planet have more right to that statement
2022-03-22 10:05:16 +0100 <Hecate> astra: I'll do you one better: https://shinesolutions.com/2018/01/08/falsehoods-programmers-believe-about-names-with-examples/
2022-03-22 10:06:27 +0100 <merijn> tomsmeding: My name has 5 letters, new-fangled revisionism be damned! >.<
2022-03-22 10:07:13 +0100 <tomsmeding> and where is that letter in the alphabet? :)
2022-03-22 10:07:35 +0100shriekingnoise(~shrieking@201.231.16.156) (Quit: Quit)
2022-03-22 10:07:40 +0100 <merijn> tomsmeding: Irrelevant, loads of letters are not in the alphabet
2022-03-22 10:08:01 +0100 <tomsmeding> fair
2022-03-22 10:08:40 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-22 10:08:53 +0100 <merijn> tomsmeding: It is clearly not a digraph like oe/au/ou/eu/ie, because don't get capitalised as one
2022-03-22 10:09:49 +0100 <tomsmeding> that _is_ true
2022-03-22 10:09:49 +0100chenqisu1(~chenqisu1@183.217.201.47) (Quit: Leaving)
2022-03-22 10:10:09 +0100 <tomsmeding> it does look ridiculous in a monospace font though
2022-03-22 10:10:49 +0100 <merijn> It looks fine, if you write it right :p
2022-03-22 10:10:50 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 10:11:01 +0100vorpuni(~pvorp@2001:861:3881:c690:b51e:da9f:aa64:a038) (Ping timeout: 256 seconds)
2022-03-22 10:11:05 +0100 <abastro[m]> astra?
2022-03-22 10:11:21 +0100 <merijn> Looks fine in my monospace font: IJsland
2022-03-22 10:11:45 +0100 <merijn> The real problem is that computer make unicode like IJ too hard to type
2022-03-22 10:12:22 +0100Akiva(~Akiva@user/Akiva)
2022-03-22 10:13:00 +0100 <merijn> tomsmeding: Incidentally, I'm pretty sure that when I was taught the alphabet it just took the place of y, since there's like 3 words with y in it anyway
2022-03-22 10:14:18 +0100ccntrq(~Thunderbi@2a01:c23:8960:6a00:997e:ae12:2988:d2c3)
2022-03-22 10:14:18 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 10:15:45 +0100 <tomsmeding> I'm quite sure I was taught that the alphabet one had no dots, though we didn't complete primary school in the same year -- might have changed, dunno
2022-03-22 10:19:03 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 250 seconds)
2022-03-22 10:20:09 +0100 <abastro[m]> Hm.. string makes programming pretty hard
2022-03-22 10:26:15 +0100michalz(~michalz@185.246.204.62)
2022-03-22 10:26:59 +0100bahamas(~lucian@86.120.77.115)
2022-03-22 10:27:54 +0100 <abastro[m]> > (const <> flip const) [1, 2] [3, 4, 5]
2022-03-22 10:27:55 +0100 <lambdabot> [1,2,3,4,5]
2022-03-22 10:28:01 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-03-22 10:28:46 +0100w1gz_w1gz
2022-03-22 10:28:54 +0100 <abastro[m]> Why does this work?
2022-03-22 10:29:08 +0100 <merijn> abastro[m]: The realisation that "strings are *really* hard" is one of the key milestones in programmer life :)
2022-03-22 10:29:27 +0100 <merijn> abastro[m]: Is there a reason why you think it shouldn't?
2022-03-22 10:29:56 +0100 <abastro[m]> Haha, key milestone
2022-03-22 10:30:03 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 10:30:24 +0100 <abastro[m]> I wonder how go would handle it with its tact at publicity
2022-03-22 10:30:40 +0100 <abastro[m]> I find (const <> flip const) working alike (<>) surprising.
2022-03-22 10:32:23 +0100 <merijn> So, let's start of with: (<>)
2022-03-22 10:32:25 +0100 <merijn> :t (<>)
2022-03-22 10:32:27 +0100 <lambdabot> Semigroup a => a -> a -> a
2022-03-22 10:32:35 +0100 <merijn> That's obvious for lists, yeah?
2022-03-22 10:33:15 +0100obp(~user@87.72.37.104)
2022-03-22 10:33:33 +0100 <abastro[m]> Yep
2022-03-22 10:33:35 +0100 <merijn> So, next step: My favourite Semigroup instance: "instance Semigroup r => Semigroup (a -> r) where f <> g = \x -> f x <> g x"
2022-03-22 10:33:41 +0100Akiva(~Akiva@user/Akiva) (Ping timeout: 256 seconds)
2022-03-22 10:34:00 +0100 <abastro[m]> But const is function
2022-03-22 10:34:03 +0100 <merijn> i.e. "any function that returns something that is a Semigroup instance, is itself a Semigroup instance"
2022-03-22 10:34:11 +0100 <abastro[m]> Er wha
2022-03-22 10:34:45 +0100 <abastro[m]> Oh right, there is such instance
2022-03-22 10:34:53 +0100 <merijn> Note that that Semigroup instance applies recursively (i.e. since "a -> b -> c" is just "a -> (b -> c)" and "b -> c" is a Semigroup instance if 'c' is a Semigroup instance
2022-03-22 10:35:07 +0100 <abastro[m]> But how does specific combinator such as const and flip const bring us back to mappend?
2022-03-22 10:35:08 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
2022-03-22 10:35:32 +0100obp(~user@87.72.37.104) ()
2022-03-22 10:35:34 +0100 <merijn> abastro[m]: So "const <> flip const" returns a new function that takes two arguments, passes them on to const and "flip const" and concat the result via <>
2022-03-22 10:35:50 +0100 <merijn> > const 'a' True
2022-03-22 10:35:51 +0100 <lambdabot> 'a'
2022-03-22 10:35:58 +0100 <merijn> > flip const 'a' True
2022-03-22 10:36:00 +0100 <lambdabot> True
2022-03-22 10:36:24 +0100 <merijn> So, you just have 2 functions, one returning the first argument, one returning the second, and then using <> on their results
2022-03-22 10:37:08 +0100 <abastro[m]> Yep.
2022-03-22 10:37:18 +0100 <abastro[m]> Ohh
2022-03-22 10:37:32 +0100 <abastro[m]> So it appends the first argument and second argument!
2022-03-22 10:37:38 +0100 <abastro[m]> :t (const <> const)
2022-03-22 10:37:39 +0100 <lambdabot> Semigroup a => a -> b -> a
2022-03-22 10:38:15 +0100 <merijn> > (const <> const) "ab" "c"
2022-03-22 10:38:16 +0100 <lambdabot> "abab"
2022-03-22 10:39:04 +0100 <abastro[m]> I guess this is going to be like (id <> id) which ignores the second parameter
2022-03-22 10:39:15 +0100 <abastro[m]> > (id <> id) "ab"
2022-03-22 10:39:17 +0100 <lambdabot> "abab"
2022-03-22 10:39:35 +0100Pickchea(~private@user/pickchea) (Ping timeout: 256 seconds)
2022-03-22 10:40:05 +0100 <abastro[m]> fold (repeat 10 id) "ab"
2022-03-22 10:40:15 +0100 <abastro[m]> > fold (repeat 10 id) "ab"
2022-03-22 10:40:17 +0100 <lambdabot> error:
2022-03-22 10:40:17 +0100 <lambdabot> • Couldn't match expected type ‘(a0 -> a0) -> t0 ([Char] -> t)’
2022-03-22 10:40:17 +0100 <lambdabot> with actual type ‘[a1]’
2022-03-22 10:40:37 +0100 <abastro[m]> Uhm why this doesn't work?
2022-03-22 10:40:46 +0100 <int-e> > mconcat [id, reverse, map succ] "ab"
2022-03-22 10:40:47 +0100 <lambdabot> "abbabc"
2022-03-22 10:43:06 +0100 <int-e> abastro[m]: you want `replicate` rather than `repeat`
2022-03-22 10:43:42 +0100 <abastro[m]> Gah, I need more haskell experience
2022-03-22 10:44:21 +0100 <int-e> I'd probably write it correctly, but I needed a second glance to see what's wrong :-P
2022-03-22 10:45:30 +0100 <int-e> @src mconcat
2022-03-22 10:45:31 +0100 <lambdabot> Source not found. Sorry about this, I know it's a bit silly.
2022-03-22 10:45:57 +0100 <abastro[m]> =>) anyway, this thing is nice replacement for mtimes
2022-03-22 10:46:04 +0100 <int-e> Oh, class member... also @src is too outdated to check whether mconcat = fold is the current definition.
2022-03-22 10:46:27 +0100obp(~user@87.72.37.104)
2022-03-22 10:46:58 +0100 <abastro[m]> Monoid is def one of the coolest I learned in haskell
2022-03-22 10:47:08 +0100kmand(~user@188.120.85.216)
2022-03-22 10:47:34 +0100 <int-e> Default implementation is mconcat = foldr mappend mempty ...that's a no then.
2022-03-22 10:47:45 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 10:48:54 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.3)
2022-03-22 10:51:43 +0100 <merijn> The source from @src (generally) lists the code from the report, not actual source used by GHC
2022-03-22 10:52:17 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 10:52:41 +0100 <abastro[m]> That is interesting, I guess it does that because report does not change
2022-03-22 10:52:59 +0100 <merijn> Also because @src is just a string to string lookup table :p
2022-03-22 10:53:04 +0100 <merijn> And not anything smart
2022-03-22 10:54:35 +0100 <abastro[m]> At least they need not care about the ghc version
2022-03-22 10:55:06 +0100mcglk(~mcglk@131.191.49.120) (Ping timeout: 260 seconds)
2022-03-22 10:55:09 +0100kmein_kmein
2022-03-22 10:55:22 +0100kmand(~user@188.120.85.216) (ERC (IRC client for Emacs 27.2))
2022-03-22 10:55:52 +0100whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-22 10:58:32 +0100krappix(~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr)
2022-03-22 10:58:52 +0100mcglk(~mcglk@131.191.49.120)
2022-03-22 11:04:48 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 11:09:18 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 11:09:31 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
2022-03-22 11:13:37 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2022-03-22 11:15:20 +0100toulene(~toulene@user/toulene) (Quit: Ping timeout (120 seconds))
2022-03-22 11:15:27 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 11:16:01 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
2022-03-22 11:16:46 +0100toulene(~toulene@user/toulene)
2022-03-22 11:17:32 +0100notzmv(~zmv@user/notzmv)
2022-03-22 11:18:07 +0100cfricke(~cfricke@user/cfricke)
2022-03-22 11:21:23 +0100kaph(~kaph@net-109-116-124-149.cust.vodafonedsl.it) (Read error: Connection reset by peer)
2022-03-22 11:22:46 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 11:23:23 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-03-22 11:23:55 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-03-22 11:27:24 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 11:29:18 +0100gentauro(~gentauro@user/gentauro)
2022-03-22 11:29:42 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 11:29:55 +0100nicbk(~nicbk@user/nicbk) (Ping timeout: 240 seconds)
2022-03-22 11:32:08 +0100Pickchea(~private@user/pickchea)
2022-03-22 11:33:53 +0100tiferrei(~tiferrei@user/tiferrei) (Remote host closed the connection)
2022-03-22 11:34:51 +0100tiferrei(~tiferrei@user/tiferrei)
2022-03-22 11:34:55 +0100toulene(~toulene@user/toulene) (Quit: Ping timeout (120 seconds))
2022-03-22 11:35:31 +0100bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-22 11:36:23 +0100toulene(~toulene@user/toulene)
2022-03-22 11:36:40 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 11:37:12 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 11:39:08 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 11:40:14 +0100kuribas(~user@ptr-25vy0i7hp9xee3gx8cn.18120a2.ip6.access.telenet.be)
2022-03-22 11:43:20 +0100bahamas(~lucian@86.120.77.115) (Ping timeout: 252 seconds)
2022-03-22 11:53:11 +0100kaph(~kaph@net-109-116-124-149.cust.vodafonedsl.it)
2022-03-22 11:56:39 +0100mmhat(~mmh@55d48f06.access.ecotel.net) (Ping timeout: 256 seconds)
2022-03-22 12:02:19 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
2022-03-22 12:07:25 +0100krappix(~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Ping timeout: 256 seconds)
2022-03-22 12:09:59 +0100mmhat(~mmh@55d48f06.access.ecotel.net)
2022-03-22 12:11:46 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net)
2022-03-22 12:15:06 +0100 <kuribas> I am back to higher kinded records and type families. There doesn't seem to be a way to put business logic into data structures, without either loosing all type info, or using advanced features.
2022-03-22 12:17:19 +0100 <kuribas> And the haskell way of making algebras seems to make redundancy necessary.
2022-03-22 12:18:35 +0100 <[exa]> what's "business logic" in this case?
2022-03-22 12:19:25 +0100 <kuribas> in this case it's the "model" of our database.
2022-03-22 12:20:00 +0100razetime(~quassel@117.254.35.226)
2022-03-22 12:20:25 +0100 <kuribas> We have on "object" table with objects and their type, then other tables with attributes which can belong to that type or object.
2022-03-22 12:21:59 +0100 <kuribas> I can then put this information in data tables, which are then used to generate queries to read or write to the database.
2022-03-22 12:22:07 +0100 <[exa]> so the business logic is basically a db schema?
2022-03-22 12:22:36 +0100 <kuribas> no, it's more like meta information about the db schema
2022-03-22 12:22:42 +0100 <kuribas> how the object model maps to the db schema.
2022-03-22 12:22:57 +0100 <kuribas> Currently I use higher kinded records to provide a mapping.
2022-03-22 12:23:11 +0100 <[exa]> so it's a description of isomorphism, kinda, right?
2022-03-22 12:23:29 +0100 <kuribas> yeah
2022-03-22 12:23:47 +0100 <kuribas> the database and object model should be isomorphic.
2022-03-22 12:24:08 +0100 <kuribas> And it's complicated because we have a history of changes also there.
2022-03-22 12:24:19 +0100 <[exa]> the database is sql?
2022-03-22 12:24:24 +0100 <kuribas> yeah
2022-03-22 12:25:04 +0100 <[exa]> ah well, you're not the first one to hit difficulties with this then (/me points at the list of failed ORMs and the queue of failing ORMs)
2022-03-22 12:25:14 +0100obp(~user@87.72.37.104) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50))
2022-03-22 12:25:53 +0100 <kuribas> well, it's not really an ORM, since the database schema was designed for this.
2022-03-22 12:26:14 +0100 <[exa]> "orm with assumptions"
2022-03-22 12:27:08 +0100 <kuribas> I mean, it was moddelled after our domain, not a generic ORM.
2022-03-22 12:27:19 +0100 <kuribas> In our case "objects" are devices.
2022-03-22 12:27:55 +0100 <[exa]> this is going to be a really very highlevel generic hint but the general error in this kind of designs is that the "objects" do not really exist (or compose well) in SQL. Esp. in functional programming it's much easier to have an isomorphism between queries and transformations, instead of between rows and objects
2022-03-22 12:28:20 +0100 <kuribas> What do you mean?
2022-03-22 12:28:22 +0100 <[exa]> I'll probably spend half of the day now searching for a good example, hoping that someone will supply one :D
2022-03-22 12:28:35 +0100 <kuribas> If the "object" is in the "object" table, it exists?
2022-03-22 12:29:08 +0100 <kuribas> well, I lied, it's called the "device table" :)
2022-03-22 12:29:21 +0100 <kuribas> the idea is the same.
2022-03-22 12:29:31 +0100 <kuribas> Things like addresses are not in the device table.
2022-03-22 12:31:11 +0100 <[exa]> the "object" in your program transforms to a very hairy collection of rows, (invisible) index entries and (unmaterialized) satisfied constraints that are specified somewhere else, and if you want it to find an actual isomorphism, it just gets hard. Instead of that, finding an isomorphism on the transformations/queries is easy and pretty much well-defined (SQL queries compose nicely!)
2022-03-22 12:31:59 +0100 <kuribas> that's basically my code now, but I find there is still a lot of duplication.
2022-03-22 12:32:13 +0100 <kuribas> separate code for reading, insertion.
2022-03-22 12:32:26 +0100razetime(~quassel@117.254.35.226) (Remote host closed the connection)
2022-03-22 12:33:33 +0100 <kuribas> So now I have a datatype for devices: like "data Device = Toaster | Fridge". Then a type family to map the device to a record with "Attributes". Then a type family to map each attribute to a record of attributeFields.
2022-03-22 12:33:42 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-22 12:34:31 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 245 seconds)
2022-03-22 12:34:45 +0100 <[exa]> I've seen a pretty good approach for abstracting over this (you basically model everything as SELECT INTO and sometimes you select from the program into the database) but no bookmark :/
2022-03-22 12:35:32 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 12:36:54 +0100 <kuribas> [exa]: how does that give me both inserts and reads?
2022-03-22 12:37:12 +0100razetime(~quassel@117.254.35.226)
2022-03-22 12:39:41 +0100 <[exa]> the data stream is basically a "row stream" and it's pretty easy to have the row stream ingested into SQL from the program (needs a bit of query transformations but nothing too harsh, they made it work with something like COPY FROM), as well as to program from SQL (that's the easy way, just SELECT)
2022-03-22 12:40:19 +0100 <abastro[m]> Coding in Immutability to DB?
2022-03-22 12:40:20 +0100 <abastro[m]> Tho how would it perform
2022-03-22 12:40:45 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
2022-03-22 12:41:23 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 12:41:25 +0100 <kuribas> abastro[m]: only add, never delete or update :)
2022-03-22 12:41:41 +0100xff0x(~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
2022-03-22 12:41:42 +0100 <kuribas> or garbage collect
2022-03-22 12:42:07 +0100 <abastro[m]> I mean, wait. You only add in your DB?
2022-03-22 12:42:12 +0100 <abastro[m]> How would that work
2022-03-22 12:42:37 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 12:42:58 +0100 <kuribas> I was being facetious
2022-03-22 12:44:24 +0100acidjnk(~acidjnk@pd9e0b763.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-03-22 12:44:41 +0100 <kuribas> [exa]: maybe a datastructure which contains both an insertor and reader?
2022-03-22 12:45:21 +0100 <kuribas> And is composable so I can compose the reader for single field into a reader of the feature.
2022-03-22 12:45:30 +0100 <abastro[m]> Ahh
2022-03-22 12:45:54 +0100 <abastro[m]> Hm wait, you need update as well, right?
2022-03-22 12:45:56 +0100 <[exa]> yeah, something like that, (RowStream -> RowStream)
2022-03-22 12:46:12 +0100 <kuribas> abastro[m]: typically in haskell, you manipulate your data and effects in a pure way, then execute the effects later.
2022-03-22 12:46:13 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-03-22 12:46:31 +0100 <[exa]> updates can be streamed, you need a selecting and updating part of the row stream
2022-03-22 12:47:00 +0100 <[exa]> same with deletes, again needs only a tiny bit of metainformation here and there
2022-03-22 12:47:10 +0100 <kuribas> [exa]: what do you mean by stream here? A stream of devices?
2022-03-22 12:47:12 +0100 <abastro[m]> Oh, so you currently have separate insert and update there - that's what you mean, right?
2022-03-22 12:47:23 +0100 <kuribas> abastro[m]: yes
2022-03-22 12:47:28 +0100 <[exa]> kuribas: stream of literal sql rows
2022-03-22 12:47:31 +0100 <abastro[m]> insert and update-capable data structure
2022-03-22 12:47:32 +0100 <abastro[m]> I see.
2022-03-22 12:47:39 +0100 <abastro[m]> Oh wait. I mean insert and read, duh
2022-03-22 12:47:49 +0100 <abastro[m]> and update is performed by the interpreter or whatever
2022-03-22 12:48:06 +0100 <kuribas> abastro[m]: in lisp you then make a datastructure describing which rows are "attributes", part of a "feature". then generate the query based on that.
2022-03-22 12:51:35 +0100 <kuribas> [exa]: concrete example, let's say I have data "Device = Toaster | Fridge | ...". Then I want to get a Toaster, and know which "features" belong to the Toaster. For example a feature table "Electrical" and "Baking".
2022-03-22 12:52:47 +0100 <abastro[m]> Uhm why does this sound like sum type example
2022-03-22 12:53:02 +0100 <abastro[m]> Like `Device = Toaster ToasterFeatures | Fridge FridgeFeatures | ...`
2022-03-22 12:53:03 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 12:53:03 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 12:53:03 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 12:53:45 +0100 <kuribas> abastro[m]: right, that is what I have now.
2022-03-22 12:54:12 +0100 <abastro[m]> Oh, what was the problem with this design?
2022-03-22 12:54:42 +0100 <abastro[m]> Like you wanted general statement over each field?
2022-03-22 12:54:51 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 12:54:58 +0100 <abastro[m]> (Asking since this sounds interesting)
2022-03-22 12:55:03 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-03-22 12:55:30 +0100 <kuribas> well, now I have to write separate queries to read and write the features.
2022-03-22 12:55:47 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-03-22 12:56:02 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Ping timeout (120 seconds))
2022-03-22 12:56:27 +0100 <abastro[m]> I thought there were utilities to automatically generate queries
2022-03-22 12:56:44 +0100 <abastro[m]> Or, are your queries quite complicated?
2022-03-22 12:56:48 +0100 <kuribas> not really
2022-03-22 12:57:29 +0100 <kuribas> I just find the logic is a bit spread out
2022-03-22 12:58:08 +0100 <kuribas> To generate a query, I have to know that the attribute "wattage" is read from the column "wattage" in the table "Electrical".
2022-03-22 12:58:33 +0100 <kuribas> I am not using an ORM, because I hate them :)
2022-03-22 12:59:09 +0100 <abastro[m]> Eh, can't infer attribute "wattage" from column name?
2022-03-22 12:59:31 +0100 <kuribas> yes, but they aren't all unique.
2022-03-22 12:59:48 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 12:59:49 +0100 <kuribas> so sometime I want to make a custom mapping.
2022-03-22 12:59:57 +0100mmhat(~mmh@55d48f06.access.ecotel.net) (Ping timeout: 240 seconds)
2022-03-22 13:00:13 +0100 <kuribas> abastro[m]: I suppose you are hinting towards using HT or generics to generate the queries?
2022-03-22 13:00:19 +0100 <kuribas> TH
2022-03-22 13:01:18 +0100toulene(~toulene@user/toulene) (Read error: Connection reset by peer)
2022-03-22 13:01:24 +0100 <abastro[m]> Yea, I'm quite sure it goes towards that end.
2022-03-22 13:02:10 +0100toulene(~toulene@user/toulene)
2022-03-22 13:02:23 +0100 <kuribas> So now I am trying to use HKD records. I have data Electrical f = Electrical { wattage :: f Double }
2022-03-22 13:03:22 +0100 <kuribas> Then I can make (Electrical SQLRows), which maps the fields to the SQL rows.
2022-03-22 13:03:46 +0100 <kuribas> And I have decoupled the actual implementation from the database description.
2022-03-22 13:03:59 +0100 <kuribas> However, it's not boring haskell anymore.
2022-03-22 13:12:21 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 13:14:36 +0100boxscape_(~boxscape_@p4ff0b60b.dip0.t-ipconnect.de)
2022-03-22 13:14:58 +0100gehmehgeh(~user@user/gehmehgeh)
2022-03-22 13:16:14 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 13:21:12 +0100 <kuribas> So I turn each field into a query, and since the query builder is applicative, I can use ftraverse to make a query over the table.
2022-03-22 13:21:15 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
2022-03-22 13:21:24 +0100 <kuribas> https://hackage.haskell.org/package/hkd-0.1/docs/Data-HKD.html#v:ftraverse
2022-03-22 13:21:51 +0100 <kuribas> My point is, the lispers claim that with dynamic languages you get more flexibility that when using types, and I have been trying to disprove it.
2022-03-22 13:22:13 +0100 <kuribas> And that you need to go to advanced type systems to make up for it.
2022-03-22 13:22:19 +0100 <kuribas> So far it just seems that they are right.
2022-03-22 13:22:51 +0100 <kuribas> well, save for not recognizing that haskell is the best dynamic language :)
2022-03-22 13:23:47 +0100 <kuribas> and "you cannot do this in haskell" is BS, since I can do any clojure technique using one big sum and partial functions.
2022-03-22 13:24:06 +0100 <kuribas> But the question is if this is satisfying...
2022-03-22 13:24:43 +0100 <abastro[m]> Personally I think their claim of flexibility is right
2022-03-22 13:25:00 +0100 <abastro[m]> Where, instead, haskell got edge on correctness
2022-03-22 13:25:26 +0100grimey63(~grimey@pool-108-26-37-118.syrcny.east.verizon.net)
2022-03-22 13:25:42 +0100 <abastro[m]> I wonder how you use HKD records though, why would you have `Electrical SQLRows`
2022-03-22 13:25:45 +0100 <kuribas> you need full dependent types to get both the same amount of flexibility and correctness.
2022-03-22 13:25:58 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 13:26:33 +0100 <kuribas> abastro[m]: SQLRows describes a row.
2022-03-22 13:26:47 +0100 <abastro[m]> Indeed, perhaps I just love to compromise some correctness
2022-03-22 13:27:17 +0100 <kuribas> compromising some correctness is better than compromising all correctness, which is what lispers do.
2022-03-22 13:27:32 +0100 <kuribas> Or rather, not having the language check any correctness.
2022-03-22 13:28:02 +0100 <abastro[m]> Oh, lispers compromise all correctness?
2022-03-22 13:28:05 +0100 <abastro[m]> I mean
2022-03-22 13:28:17 +0100 <abastro[m]> lispers only compromise some of correctness?
2022-03-22 13:28:32 +0100 <abastro[m]> Oh right, correctness could be enforced without types
2022-03-22 13:28:39 +0100 <kuribas> better said, they more correctness either into the programmer responsibility, or into tests.
2022-03-22 13:28:52 +0100 <kuribas> s/more/move
2022-03-22 13:29:11 +0100 <abastro[m]> Ah so you mean they do not allow language to check correctness
2022-03-22 13:29:17 +0100 <kuribas> yes
2022-03-22 13:29:35 +0100acidjnk(~acidjnk@p200300d0c7049f30b166e41192d3e532.dip0.t-ipconnect.de)
2022-03-22 13:29:36 +0100doyougnu(~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Remote host closed the connection)
2022-03-22 13:30:06 +0100 <kuribas> validation (if it is there), is only to filter out the user input, not to ensure the program is correct.
2022-03-22 13:30:32 +0100 <kuribas> s/lispers/dynamic programmers in general.
2022-03-22 13:30:46 +0100 <abastro[m]> So ye, I'd just have unreachable states in this case.
2022-03-22 13:30:58 +0100 <abastro[m]> As GADTs could make things complicated
2022-03-22 13:31:04 +0100 <abastro[m]> But that's just me.
2022-03-22 13:33:04 +0100 <kuribas> There is little complicated code in my case. But that's because the "magick" is done by the HKD library.
2022-03-22 13:33:21 +0100 <kuribas> Compared to clojure, where it is just builtin map manipulation functions.
2022-03-22 13:33:22 +0100karim(~karim@41.36.17.45)
2022-03-22 13:33:49 +0100 <abastro[m]> Oh, you mean a little complicated?
2022-03-22 13:34:06 +0100 <kuribas> abastro[m]: I mean not much.
2022-03-22 13:34:34 +0100 <kuribas> Not like, say, the implementation of servant.
2022-03-22 13:34:43 +0100 <abastro[m]> Tbh I still do not see why you have the type parameter
2022-03-22 13:34:47 +0100 <abastro[m]> Why is it?
2022-03-22 13:35:04 +0100epolanski(uid312403@id-312403.helmsley.irccloud.com)
2022-03-22 13:35:07 +0100 <kuribas> abastro[m]: So I know it matches the database type :)
2022-03-22 13:35:16 +0100 <abastro[m]> Do you have to somehow embed SQLRows there?
2022-03-22 13:35:35 +0100 <Philonous> How do I export an associated data constructor? E.g. I have »class Foo a where data Bar a« and »instance Foo int where data Bar Int = BarInt«, how do I export the BarInt constructor?
2022-03-22 13:36:57 +0100 <geekosaur> should be Foo(Bar) or Foo(..)
2022-03-22 13:37:17 +0100 <kuribas> abastro[m]: yeah, like electricalFields = Electrical { wattage = Field "Electrical" "wattage" }
2022-03-22 13:37:20 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 268 seconds)
2022-03-22 13:38:13 +0100karim(~karim@41.36.17.45) (Ping timeout: 240 seconds)
2022-03-22 13:39:23 +0100 <abastro[m]> Eh, why do you need Field "Electrical" "wattage" thing
2022-03-22 13:39:36 +0100 <kuribas> abastro[m]: or "wattage = Field electrical_tbl wattage_field", if the tables and fields are generated from the database schema.
2022-03-22 13:40:07 +0100 <abastro[m]> I mean why do you need that
2022-03-22 13:40:33 +0100 <Philonous> geekosaur, Ah, played around with it, both »Bar(..)« and »Bar(BarInt)« work.
2022-03-22 13:40:34 +0100 <Philonous> Thanks!
2022-03-22 13:40:35 +0100 <abastro[m]> To scrap boilerplate of e.g. reading from query?
2022-03-22 13:40:36 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 13:40:55 +0100 <kuribas> abastro[m]: yeah
2022-03-22 13:41:11 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 13:41:16 +0100 <kuribas> to avoid writing a lot of manual queries.
2022-03-22 13:41:36 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net) (Ping timeout: 252 seconds)
2022-03-22 13:41:38 +0100 <abastro[m]> Yea, sounds like TH thing
2022-03-22 13:41:54 +0100 <abastro[m]> I guess you dislike using that?
2022-03-22 13:42:08 +0100 <kuribas> yeah
2022-03-22 13:42:35 +0100mmhat(~mmh@55d48f06.access.ecotel.net)
2022-03-22 13:42:41 +0100 <kuribas> I already have TH to generate typed fields and tables from the DB schema.
2022-03-22 13:43:49 +0100 <kuribas> abastro[m]: but I see, the haskell solution would be "less flexible", "more boilerplaty", but more correct.
2022-03-22 13:44:06 +0100 <kuribas> Only with dependent types you can have both.
2022-03-22 13:44:21 +0100 <kuribas> Or you need to hack around it with TH or generics.
2022-03-22 13:44:35 +0100hololeap(~hololeap@user/hololeap) (Ping timeout: 240 seconds)
2022-03-22 13:44:43 +0100 <abastro[m]> Oh, yep.
2022-03-22 13:45:13 +0100 <abastro[m]> I often use generics so I did not know it was a hack 😣
2022-03-22 13:45:25 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-03-22 13:46:07 +0100 <abastro[m]> Dependent types also have boilerplates though. ...on the proof side.
2022-03-22 13:47:45 +0100 <abastro[m]> I realized when I say I dislike dynamic typing, I mean languages like python and js. lol
2022-03-22 13:47:58 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 13:48:00 +0100 <kuribas> abastro[m]: not lisp/clojure? :)
2022-03-22 13:48:18 +0100 <abastro[m]> Yep, I guess I am fine with lisp
2022-03-22 13:48:43 +0100 <abastro[m]> (I just used to meme with (l(i(s(p))) tho)
2022-03-22 13:49:21 +0100 <kuribas> abastro[m]: in my SQL library, I not use TH to generate columns and tables. But in a DT language I could write a constraint that looks up the fields in the database schema.
2022-03-22 13:49:36 +0100 <kuribas> abastro[m]: the latter is much cleaner IMO.
2022-03-22 13:50:16 +0100 <abastro[m]> But to see if the constraint conforms, you need proofs
2022-03-22 13:50:22 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 13:50:24 +0100 <abastro[m]> Well, at least that was my experience with DT
2022-03-22 13:51:00 +0100 <abastro[m]> Pervasive problems with proof proliferation
2022-03-22 13:51:07 +0100pavonia(~user@user/siracusa) (Quit: Bye!)
2022-03-22 13:51:16 +0100 <kuribas> it can be a simple proof, like "IsJust (lookup table schema)"
2022-03-22 13:51:50 +0100 <kuribas> if the table is in the schema, lookup returns "Just table", and the proof is done.
2022-03-22 13:51:57 +0100 <kuribas> otherwise it will fail at compile time.
2022-03-22 13:52:20 +0100 <kuribas> no need for complex tactics or rewrites :)
2022-03-22 13:52:44 +0100 <abastro[m]> The table needs to be on compile-time though
2022-03-22 13:52:45 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 268 seconds)
2022-03-22 13:52:58 +0100 <abastro[m]> And there is whole can of worms in describing datatypes in DT
2022-03-22 13:53:14 +0100 <kuribas> yeah, but it can be just a constant value.
2022-03-22 13:53:22 +0100 <kuribas> Idris1 even had type providers.
2022-03-22 13:53:30 +0100 <abastro[m]> Had hard time using DT in Coq
2022-03-22 13:53:33 +0100 <kuribas> Where you could read a value from a side-effect.
2022-03-22 13:53:38 +0100 <abastro[m]> Oh, I wonder how Idris would serve there
2022-03-22 13:54:04 +0100 <kuribas> well, an idris datatype is just like a haskell datatype.
2022-03-22 13:54:11 +0100 <abastro[m]> Yep, Idris is interesting. Just that I don't see it production-ready yet (Without trying, I know.. I should try at least once)
2022-03-22 13:54:19 +0100 <kuribas> oh, it isn't :)
2022-03-22 13:56:27 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 252 seconds)
2022-03-22 13:56:58 +0100 <kuribas> be prepared to implement half of the libraries that you take for granted in haskell.
2022-03-22 13:57:27 +0100 <abastro[m]> XD
2022-03-22 13:57:59 +0100acidsys(~LSD@2a03:4000:55:d20::3) (Excess Flood)
2022-03-22 13:58:30 +0100acidsys(~LSD@2a03:4000:55:d20::3)
2022-03-22 13:58:34 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
2022-03-22 13:59:26 +0100 <kuribas> hmm, if I combine SQL inserters and readers, I'll end up with a profunctor.
2022-03-22 14:00:04 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 14:00:07 +0100 <kuribas> Data SQLRow from to = SQLRow (Insertor from) (Reader to)
2022-03-22 14:01:45 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 14:02:01 +0100acidjnk(~acidjnk@p200300d0c7049f30b166e41192d3e532.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2022-03-22 14:03:26 +0100 <kuribas> That could be one way to remove duplication.
2022-03-22 14:04:43 +0100 <abastro[m]> Profunctor? Sounds great!
2022-03-22 14:05:58 +0100cheater(~Username@user/cheater) (Remote host closed the connection)
2022-03-22 14:06:56 +0100cheater(~Username@user/cheater)
2022-03-22 14:12:37 +0100toulene(~toulene@user/toulene) (Ping timeout: 240 seconds)
2022-03-22 14:12:53 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
2022-03-22 14:14:32 +0100toulene(~toulene@user/toulene)
2022-03-22 14:16:43 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 250 seconds)
2022-03-22 14:17:31 +0100 <kuribas> the problem with DT is that most research is into proving programs correct, instead of in how to avoid the mess that the haskell typesystem has gone into.
2022-03-22 14:17:46 +0100 <kuribas> having a principled way to do typelevel programming.
2022-03-22 14:18:05 +0100 <merijn> Most DT research doesn't use Haskell
2022-03-22 14:18:17 +0100 <merijn> Because bolting DT onto Haskell does not an elegant language make
2022-03-22 14:19:36 +0100 <kuribas> isn't the argument that making haskell DT is easier than making a DT language production ready.
2022-03-22 14:20:17 +0100 <merijn> No
2022-03-22 14:20:21 +0100 <merijn> I mean, it depends
2022-03-22 14:20:27 +0100razetime(~quassel@117.254.35.226) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-22 14:20:44 +0100 <merijn> I don't think anyone expect Dependent Haskell to be as elegant/clean as Idris
2022-03-22 14:20:53 +0100 <merijn> At least not anyone "in the know" on these things :p
2022-03-22 14:22:55 +0100 <kuribas> Unless they want to phase out other extensions, this will only introduce complexity, no?
2022-03-22 14:23:24 +0100 <maerwald> I think the point is: DT languages are not production ready. And you should ask why :p
2022-03-22 14:23:58 +0100ubert(~Thunderbi@p200300ecdf158894255673a7c9121e6c.dip0.t-ipconnect.de) (Quit: ubert)
2022-03-22 14:24:11 +0100 <kuribas> maerwald: chicken and egg question. People don't use it because they aren't production ready, and it's not production ready because people don't use them.
2022-03-22 14:24:16 +0100ubert(~Thunderbi@p200300ecdf1588942c242a19e1a99324.dip0.t-ipconnect.de)
2022-03-22 14:24:19 +0100 <maerwald> People use them
2022-03-22 14:24:28 +0100 <maerwald> but they are not general purpose languages
2022-03-22 14:24:49 +0100 <kuribas> I mean outside of an academic or mathematical proof oriented setting
2022-03-22 14:25:14 +0100 <geekosaur> dunno, idris is trying hard to be production ready
2022-03-22 14:25:28 +0100 <geekosaur> it just needs a threshold number of users to start developing an ecosystem
2022-03-22 14:25:58 +0100 <kuribas> geekosaur: yeah, nobody is to blame, but it's hard with 10 people or so :-)
2022-03-22 14:26:08 +0100shriekingnoise(~shrieking@201.231.16.156)
2022-03-22 14:26:23 +0100 <maerwald> Not every feature fits into a general purpose language
2022-03-22 14:26:35 +0100 <maerwald> And you don't need to have a general purpose language for every purpose
2022-03-22 14:26:52 +0100 <geekosaur> and what peoplew are saying about idris now, they were saying about haskell 15 years ago
2022-03-22 14:27:22 +0100 <geekosaur> (and some are still saying about it, because hackage isn't node or etc.)
2022-03-22 14:29:56 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 14:30:14 +0100hololeap(~hololeap@user/hololeap)
2022-03-22 14:31:33 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-03-22 14:32:15 +0100 <maerwald> you mean completely unaudited dumpster of code? I think it is :p
2022-03-22 14:32:15 +0100boborygmy_(~bob@pool-173-54-217-168.nwrknj.fios.verizon.net)
2022-03-22 14:32:25 +0100 <maerwald> Don't know any language that does it different
2022-03-22 14:32:52 +0100 <maerwald> not hard to upload malicious packages
2022-03-22 14:33:20 +0100 <geekosaur> I meant size
2022-03-22 14:33:35 +0100 <geekosaur> most programmers don't even think about "dumpster of code"
2022-03-22 14:33:42 +0100 <maerwald> code size? I think average code size is 10 LOC on npm :D
2022-03-22 14:34:29 +0100 <maerwald> negate_bool(lol: bool): bool { not lol }
2022-03-22 14:34:37 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 14:35:05 +0100 <kuribas> maerwald: package count
2022-03-22 14:35:58 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 14:38:03 +0100 <geekosaur> shitpile depth
2022-03-22 14:40:53 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-22 14:40:53 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-22 14:40:53 +0100wroathe(~wroathe@user/wroathe)
2022-03-22 14:40:58 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
2022-03-22 14:45:00 +0100 <maerwald> :D
2022-03-22 14:45:00 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2022-03-22 14:45:04 +0100 <maerwald> log n
2022-03-22 14:47:25 +0100 <dminuoso> 14:41:35 maerwald | [13:32:52] not hard to upload malicious packages
2022-03-22 14:47:39 +0100 <dminuoso> There's good reason why Google has internal rules to vendor dependencies in repositories.
2022-03-22 14:48:00 +0100 <dminuoso> So some degree I wish cabal-install had sufficient tooling to do the same.
2022-03-22 14:48:05 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 14:48:11 +0100 <dminuoso> Maybe I might look into that in my next vacation
2022-03-22 14:48:29 +0100 <maerwald> dminuoso: yes... I was thinking of that too, because it would solve the problem of HLS not being able to jump to dependency definitions
2022-03-22 14:48:34 +0100 <maerwald> if you vendor everything, it can
2022-03-22 14:49:16 +0100 <dminuoso> Superficially, it seems like it shouldn't be a very hard thing (I know, famous last words)
2022-03-22 14:50:09 +0100 <maerwald> via plan.json it should indeed be easy
2022-03-22 14:51:25 +0100 <maerwald> just collect everything, run `cabal unpack` in a subdir, then add optional-packages in cabal.project.local
2022-03-22 14:52:10 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 14:53:53 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5) (Quit: WeeChat 2.8)
2022-03-22 14:56:48 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 14:56:51 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds)
2022-03-22 14:57:17 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 14:57:26 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 14:57:38 +0100bahamas(~lucian@86.120.77.115)
2022-03-22 14:57:53 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 14:58:02 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 14:58:12 +0100acidsys(~LSD@2a03:4000:55:d20::3) (Excess Flood)
2022-03-22 14:58:22 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 14:58:36 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 14:58:38 +0100boborygmy_(~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Read error: Connection reset by peer)
2022-03-22 14:58:42 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2022-03-22 14:58:42 +0100acidsys(~LSD@2a03:4000:55:d20::3)
2022-03-22 14:58:57 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 14:59:05 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 14:59:24 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection)
2022-03-22 14:59:53 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 15:00:29 +0100Sgeo(~Sgeo@user/sgeo)
2022-03-22 15:01:33 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 15:02:22 +0100 <dminuoso> maerwald: So one way this starts getting complicated is if you have already vendored packages, say you have ./foo/foo.cabal and ./bar/bar.cabal
2022-03-22 15:02:22 +0100 <merijn> dminuoso: You can point it at your own hackage pretty easily and I think there's a way to point it at a local repo of tarballs too
2022-03-22 15:02:39 +0100 <dminuoso> merijn: "own hackage" and "easily" in one sentence is a bit amusing!
2022-03-22 15:02:46 +0100 <dminuoso> Been there, dont want to experience that again.
2022-03-22 15:02:57 +0100 <merijn> dminuoso: You can point it at a local cache of tarballs too, iirc
2022-03-22 15:03:17 +0100 <merijn> don't ask me how, though :)
2022-03-22 15:05:24 +0100 <dminuoso> maerwald: So yeah, I think this actually is a bit more subtle than at first look.
2022-03-22 15:05:39 +0100krappix(~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr)
2022-03-22 15:05:42 +0100 <maerwald> dminuoso: I don't understand your remark
2022-03-22 15:05:47 +0100 <dminuoso> So imagine foo/foo.cabal and bar/bar.cabal depend on the same package but in a different flavour
2022-03-22 15:06:19 +0100 <maerwald> flavour?
2022-03-22 15:06:25 +0100 <dminuoso> Versions, build flags
2022-03-22 15:06:50 +0100 <dminuoso> Or.. no just versinos.
2022-03-22 15:06:52 +0100 <maerwald> how's that possible even non-vendored?
2022-03-22 15:07:26 +0100 <dminuoso> It wouldnt, but the vendored style is very common in single repository/multiple packages style
2022-03-22 15:07:27 +0100 <maerwald> relying on plan.json means there is a *correct* and successful resolution
2022-03-22 15:07:36 +0100 <dminuoso> Yes, but that's per build target.
2022-03-22 15:08:01 +0100 <tdammers> vendoring doesn't mean you don't have to resolve dependencies, you just do it at a different point in your workflow, and you avoid some supply chain attacks
2022-03-22 15:08:12 +0100 <dminuoso> So say you have foo/ and bar/ as locally vendored packages, `cabal build foo` gives you a completely different build plan from `cabal build bar`
2022-03-22 15:08:30 +0100 <maerwald> dminuoso: very simple, you vendor per target then
2022-03-22 15:10:00 +0100 <dminuoso> maerwald: can you do this with a singular cabal.project.local? Or would that imply a separate such file per target, and you specify that with --project-file?
2022-03-22 15:10:20 +0100 <maerwald> dminuoso: yeah
2022-03-22 15:10:27 +0100 <dminuoso> Which one?
2022-03-22 15:10:35 +0100 <maerwald> --project-file
2022-03-22 15:13:06 +0100benin(~benin@183.82.207.30)
2022-03-22 15:13:41 +0100 <maerwald> but if `cabal build all` fails resolution, you're already in trouble
2022-03-22 15:13:57 +0100 <dminuoso> I guess it's just a bit annoying because you might end up duplicating dependencies this way. This would already happen for test and benchmark targets
2022-03-22 15:14:38 +0100 <maerwald> I've only discovered this on unmaintainned packages
2022-03-22 15:14:40 +0100 <dminuoso> maerwald: im not convinced of that. we have several projects that I dont think would produce good coherent singular build plans.
2022-03-22 15:15:10 +0100 <dminuoso> in fact, we split them up intentionally such that foo-cli and bar-cli dont affect each others build plans needlessly
2022-03-22 15:15:26 +0100 <maerwald> yeah, then have separate project files for them
2022-03-22 15:15:49 +0100 <dminuoso> It's just too darn convenient to type `cabal run foo-cli`! :)
2022-03-22 15:20:21 +0100 <dminuoso> I guess the interface Id be looking for is a specification for possible build targets, generate a build plan for all, collect all deduplicated dependencies, and then teach cabal to use a directory of unpacked tarballs as a hackage replacement
2022-03-22 15:21:43 +0100Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-03-22 15:21:48 +0100mikoto-chan(~mikoto-ch@84.199.144.235) (Ping timeout: 240 seconds)
2022-03-22 15:22:26 +0100 <dminuoso> It would just be nice if, as far as cabal-install is concerned, this would be transparent, such that all you might do is configure some `hackage: .vendored_deps/` in your cabal.project if that makes sense
2022-03-22 15:24:29 +0100 <maerwald> this wouldn't be the primary use case I'd think about when hacking up a solution
2022-03-22 15:24:33 +0100 <maerwald> PR's welcome ;)
2022-03-22 15:24:51 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5)
2022-03-22 15:25:14 +0100 <dminuoso> oh absolutely, Im willing to try and build this myself
2022-03-22 15:27:00 +0100Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-03-22 15:28:41 +0100 <maerwald> my main motivation is to have jump-to-dependency in HLS
2022-03-22 15:30:55 +0100lechner(~lechner@debian/lechner)
2022-03-22 15:32:09 +0100alp(~alp@user/alp) (Ping timeout: 252 seconds)
2022-03-22 15:33:30 +0100 <abastro[m]> Jump to dependency for given definition? Import?
2022-03-22 15:36:01 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-22 15:36:02 +0100acidsys(~LSD@2a03:4000:55:d20::3) (Excess Flood)
2022-03-22 15:36:33 +0100acidsys(~LSD@2a03:4000:55:d20::3)
2022-03-22 15:36:45 +0100 <dminuoso> Yeah, my concern is just auditing transitive dependency changes. But it seems whatever the solution, would would be served.
2022-03-22 15:37:49 +0100 <abastro[m]> Oh transitive dependency
2022-03-22 15:42:37 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-03-22 15:46:20 +0100mmhat(~mmh@55d48f06.access.ecotel.net) (Quit: WeeChat 3.4.1)
2022-03-22 15:46:45 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 15:48:15 +0100 <janus> has anyone encountered the GC bug 20959 in 9.0.2? is a 9.0.3 planned?
2022-03-22 15:49:40 +0100Unicorn_Princess(~Unicorn_P@46-54-248-191.static.kate-wing.si)
2022-03-22 15:57:29 +0100bahamas(~lucian@86.120.77.115) (Ping timeout: 256 seconds)
2022-03-22 15:57:47 +0100xkuru(~xkuru@user/xkuru)
2022-03-22 16:01:51 +0100acidjnk(~acidjnk@p200300d0c7049f30e5337983ccb1fe06.dip0.t-ipconnect.de)
2022-03-22 16:03:43 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds)
2022-03-22 16:05:19 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-22 16:07:03 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-22 16:07:48 +0100cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
2022-03-22 16:08:57 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-03-22 16:09:02 +0100vysn(~vysn@user/vysn) (Ping timeout: 240 seconds)
2022-03-22 16:10:56 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-03-22 16:10:58 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 16:13:44 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 16:14:05 +0100justsomeguy(~justsomeg@user/justsomeguy)
2022-03-22 16:18:27 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-03-22 16:18:54 +0100razetime(~quassel@117.254.35.226)
2022-03-22 16:19:39 +0100javiergarea(~javiergar@static-60-220-27-46.ipcom.comunitel.net)
2022-03-22 16:20:00 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
2022-03-22 16:20:39 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-03-22 16:21:45 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2022-03-22 16:22:08 +0100stiell(~stiell@gateway/tor-sasl/stiell)
2022-03-22 16:23:02 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 16:23:34 +0100Pickchea(~private@user/pickchea)
2022-03-22 16:23:39 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 16:27:01 +0100acidjnk(~acidjnk@p200300d0c7049f30e5337983ccb1fe06.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-03-22 16:29:37 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 16:30:21 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
2022-03-22 16:31:23 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-03-22 16:34:42 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 16:34:45 +0100MajorBiscuit(~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 250 seconds)
2022-03-22 16:35:24 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Client closed)
2022-03-22 16:36:39 +0100benin(~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 16:38:24 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 16:38:24 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 16:38:24 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 16:38:43 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 16:41:05 +0100dsrt^(~dsrt@96-67-120-105-static.hfc.comcastbusiness.net)
2022-03-22 16:42:02 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 16:43:29 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 16:43:31 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
2022-03-22 16:43:37 +0100yauhsien_(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 16:45:51 +0100 <justsomeguy> Where did the name fold come from? Is there some kind of metaphor for how the data structure is reduced in the name?
2022-03-22 16:46:30 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 16:46:30 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 16:46:30 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 16:46:36 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 245 seconds)
2022-03-22 16:47:52 +0100 <[exa]> justsomeguy: I always imagined folding a long strip of paper or something
2022-03-22 16:49:46 +0100 <[exa]> [1~so yeah definitely metaphorical, unless well someone here comes with an explanation for F.O.L.D. acronym
2022-03-22 16:52:05 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 250 seconds)
2022-03-22 16:52:05 +0100 <kuribas> I prefer reduce as in lisp.
2022-03-22 16:52:50 +0100 <kuribas> folding something doesn't reduce it.
2022-03-22 16:54:02 +0100 <dminuoso> kuribas: Arguably thats why folding is more honest?
2022-03-22 16:54:20 +0100 <dminuoso> % foldr (:) [] [1,2,3,4]
2022-03-22 16:54:20 +0100 <yahb> dminuoso: [1,2,3,4]
2022-03-22 16:54:24 +0100 <dminuoso> Is this "reduced" in any way?
2022-03-22 16:55:32 +0100 <dminuoso> Either way, mentally I always imagine a structure/tree of data being folded like origami by means of a function :)
2022-03-22 16:55:38 +0100 <dminuoso> Into something.. else..
2022-03-22 16:56:36 +0100 <Zemyla> > foldr (:) [5,6,7,8] [1,2,3,4]
2022-03-22 16:56:37 +0100 <lambdabot> [1,2,3,4,5,6,7,8]
2022-03-22 16:57:04 +0100 <kuribas> dminuoso: yeah, to a new list :)
2022-03-22 16:57:09 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 16:57:12 +0100 <kuribas> dminuoso: it just looks like the old one.
2022-03-22 16:57:14 +0100 <dminuoso> Zemyla: Mmm, what a cunning way to pre/append!
2022-03-22 16:57:15 +0100 <stefan-_> in scala there is a `reduce` function on collections: https://www.scala-lang.org/api/2.13.3/scala/collection/immutable/List.html#reduce[B%3E:A](op:(B,B)=%3EB):B
2022-03-22 16:57:53 +0100 <dminuoso> Besides, folding has a nice matching opposite unfolding.
2022-03-22 16:57:55 +0100ystael_(~ystael@user/ystael) (Read error: Connection reset by peer)
2022-03-22 16:57:56 +0100 <dminuoso> So that's quite nice as well
2022-03-22 16:58:12 +0100 <Zemyla> That's actually how append works in the build/foldr fusion system in GHC.List.
2022-03-22 16:58:18 +0100 <janus> reduce has an nice opposite too: embiggen :D
2022-03-22 16:58:43 +0100 <kuribas> dminuoso: unfold this: foldl (+) 0 [2, 5, 4]
2022-03-22 16:58:46 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 16:59:19 +0100 <dminuoso> Zemyla: conceptually it's just a delayed fold, such that you can simply compose the functions in between right?
2022-03-22 16:59:59 +0100 <byorgey> the word 'fold' seems to be already used in Miranda
2022-03-22 17:00:03 +0100 <justsomeguy> Maybe I should just think about it is as a "constructor substitution" function?
2022-03-22 17:00:16 +0100lbseale(~ep1ctetus@user/ep1ctetus)
2022-03-22 17:00:19 +0100 <byorgey> justsomeguy: yes, that's exactly what it is
2022-03-22 17:00:28 +0100 <dminuoso> Well, in case of foldr anyway
2022-03-22 17:00:35 +0100 <dminuoso> foldl' is better thought of as a loop
2022-03-22 17:00:38 +0100ystael(~ystael@user/ystael)
2022-03-22 17:02:16 +0100haskl(~haskl@user/haskl) (Read error: Connection reset by peer)
2022-03-22 17:02:18 +0100 <monochrom> https://docs.racket-lang.org/srfi/srfi-std/srfi-1.html#reduce
2022-03-22 17:02:58 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-22 17:03:35 +0100 <kuribas> > foldr (+) 0 [2, 5, 4]
2022-03-22 17:03:37 +0100 <lambdabot> 11
2022-03-22 17:03:59 +0100 <monochrom> Every programmer tries to be honest when naming. But foresight and logical conclusions are much harder, not something you can achieve by just willing.
2022-03-22 17:04:22 +0100 <kuribas> monochrom: still, reduce was already commonly used.
2022-03-22 17:04:41 +0100 <kuribas> http://clhs.lisp.se/Body/f_reduce.htm
2022-03-22 17:05:05 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
2022-03-22 17:05:14 +0100haskl(~haskl@user/haskl)
2022-03-22 17:05:55 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:4242:d6b8:d93f:54e5) (Quit: WeeChat 2.8)
2022-03-22 17:06:15 +0100 <monochrom> Yeah, I'm saying "reduce" is just as honest and intuitive as "fold" for a lot of people.
2022-03-22 17:08:58 +0100 <Zemyla> dminuoso: Yes. It's a composable fold.
2022-03-22 17:10:02 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 240 seconds)
2022-03-22 17:10:30 +0100son0p(~ff@181.136.122.143) (Remote host closed the connection)
2022-03-22 17:10:36 +0100Akiva(~Akiva@user/Akiva)
2022-03-22 17:10:54 +0100krappix(~krappix@nat-eduroam-76-gw-01-lne.lille.inria.fr) (Quit: Client closed)
2022-03-22 17:11:00 +0100 <monochrom> marinate :: (b -> Maybe (a, b)) -> b -> [a] >:)
2022-03-22 17:11:04 +0100Vajb(~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813)
2022-03-22 17:13:22 +0100 <justsomeguy> :D
2022-03-22 17:13:41 +0100jakalx(~jakalx@base.jakalx.net)
2022-03-22 17:14:42 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 17:16:36 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 17:16:36 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 17:16:36 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 17:17:14 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 17:18:37 +0100Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-03-22 17:19:53 +0100 <merijn> monochrom: Surely that'd be 'stew' or 'simmer'? :p
2022-03-22 17:21:49 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 17:23:40 +0100son0p(~ff@181.136.122.143)
2022-03-22 17:24:53 +0100ubert(~Thunderbi@p200300ecdf1588942c242a19e1a99324.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-03-22 17:27:27 +0100ccntrq(~Thunderbi@2a01:c23:8960:6a00:997e:ae12:2988:d2c3) (Remote host closed the connection)
2022-03-22 17:27:37 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 17:29:04 +0100justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
2022-03-22 17:32:56 +0100son0p(~ff@181.136.122.143) (Read error: Connection reset by peer)
2022-03-22 17:33:42 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 17:34:08 +0100bahamas(~lucian@84.232.140.158)
2022-03-22 17:35:18 +0100karim(~karim@41.34.201.10)
2022-03-22 17:37:38 +0100econo(uid147250@user/econo)
2022-03-22 17:38:17 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 17:39:10 +0100__monty__(~toonn@user/toonn)
2022-03-22 17:47:57 +0100razetime(~quassel@117.254.35.226) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-22 17:49:18 +0100benin(~benin@183.82.207.30)
2022-03-22 17:49:34 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 17:54:38 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
2022-03-22 17:56:43 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Client closed)
2022-03-22 17:56:44 +0100Vajb(~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813) (Read error: Connection reset by peer)
2022-03-22 17:57:24 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-03-22 17:59:27 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2022-03-22 18:00:45 +0100chele(~chele@user/chele) (Remote host closed the connection)
2022-03-22 18:00:48 +0100ubert(~Thunderbi@p200300ecdf158894f1c8f499466ba149.dip0.t-ipconnect.de)
2022-03-22 18:00:53 +0100boxscape(~boxscape@user/boxscape)
2022-03-22 18:01:36 +0100cosimone(~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 245 seconds)
2022-03-22 18:01:44 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-22 18:02:02 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-03-22 18:03:42 +0100 <Zemyla> The opposite of reduce would be rehydrate, I think.
2022-03-22 18:04:00 +0100 <geekosaur> induce?
2022-03-22 18:04:59 +0100 <Zemyla> No, it works because a reduction is a dehydrated list.
2022-03-22 18:06:57 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 18:07:00 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 18:07:46 +0100nfju
2022-03-22 18:08:02 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 18:08:02 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 18:08:02 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 18:08:16 +0100juGuest3578
2022-03-22 18:08:24 +0100Guest3578nf
2022-03-22 18:09:21 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2022-03-22 18:12:05 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2022-03-22 18:14:05 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-03-22 18:20:38 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-22 18:20:58 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
2022-03-22 18:21:22 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-22 18:21:25 +0100alp(~alp@user/alp)
2022-03-22 18:21:26 +0100dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
2022-03-22 18:22:45 +0100fendor_(~fendor@178.115.72.153.wireless.dyn.drei.com)
2022-03-22 18:25:09 +0100fendor(~fendor@91.141.35.69.wireless.dyn.drei.com) (Ping timeout: 256 seconds)
2022-03-22 18:25:25 +0100 <dsal> How do I replace `Nothing` in a lens traversal?
2022-03-22 18:26:04 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-22 18:26:25 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 18:27:42 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 18:28:36 +0100 <dsal> I guess I can `%~ Just . fromMaybe x`
2022-03-22 18:29:35 +0100 <dsal> Which is <|> I guess
2022-03-22 18:32:44 +0100epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-22 18:33:33 +0100javiergarea(~javiergar@static-60-220-27-46.ipcom.comunitel.net) (Quit: Client closed)
2022-03-22 18:36:26 +0100 <dsal> I wrote `<|>~` -- that seems clear enough
2022-03-22 18:37:43 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 18:39:10 +0100kayvank(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2022-03-22 18:40:22 +0100mbuf(~Shakthi@136.185.72.170) (Quit: Leaving)
2022-03-22 18:44:39 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-03-22 18:44:46 +0100Guest|71(~Guest|71@ip70-186-124-59.no.no.cox.net)
2022-03-22 18:45:27 +0100Guest|71(~Guest|71@ip70-186-124-59.no.no.cox.net) (Client Quit)
2022-03-22 18:46:01 +0100jlamothe(~jlamothe@198.251.61.229) (Quit: leaving)
2022-03-22 18:46:07 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 18:47:06 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-03-22 18:47:38 +0100yauhsien_(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-22 18:47:38 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-03-22 18:49:55 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net)
2022-03-22 18:51:27 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-03-22 18:51:27 +0100vglfr(~vglfr@88.155.11.162) (Read error: Connection reset by peer)
2022-03-22 18:51:46 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 18:54:32 +0100yauhsien(~yauhsien@61-231-22-192.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2022-03-22 19:03:00 +0100benin(~benin@183.82.207.30) (Quit: The Lounge - https://thelounge.chat)
2022-03-22 19:03:21 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Client closed)
2022-03-22 19:04:19 +0100jlamothe(~jlamothe@198.251.61.229)
2022-03-22 19:05:30 +0100ix(~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe)
2022-03-22 19:05:55 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it)
2022-03-22 19:06:25 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
2022-03-22 19:06:50 +0100raehik(~raehik@78.129.150.252)
2022-03-22 19:07:19 +0100vglfr(~vglfr@88.155.11.162) (Ping timeout: 256 seconds)
2022-03-22 19:08:16 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 19:09:33 +0100 <hololeap> % :t \x m -> m <|> pure x
2022-03-22 19:09:33 +0100 <yahb> hololeap: Alternative f => a -> f a -> f a
2022-03-22 19:10:46 +0100 <hololeap> I guess that's called 'option' in parser combinators
2022-03-22 19:11:00 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 19:12:37 +0100EvanR(~EvanR@user/evanr) (Quit: Leaving)
2022-03-22 19:12:49 +0100neurocyte0917090(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2022-03-22 19:13:01 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2022-03-22 19:13:41 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de)
2022-03-22 19:13:41 +0100neurocyte0917090(~neurocyte@IP-045014191158.dynamic.medianet-world.de) (Changing host)
2022-03-22 19:13:41 +0100neurocyte0917090(~neurocyte@user/neurocyte)
2022-03-22 19:15:36 +0100vicfred(~vicfred@user/vicfred)
2022-03-22 19:15:48 +0100raehik(~raehik@78.129.150.252) (Ping timeout: 240 seconds)
2022-03-22 19:16:26 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-03-22 19:17:06 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 252 seconds)
2022-03-22 19:18:10 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-22 19:18:35 +0100 <Zemyla> @pl \x m -> m <|> pure x
2022-03-22 19:18:35 +0100 <lambdabot> flip (<|>) . pure
2022-03-22 19:19:09 +0100mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-22 19:21:23 +0100vysn(~vysn@user/vysn)
2022-03-22 19:22:18 +0100jakalx(~jakalx@base.jakalx.net)
2022-03-22 19:22:23 +0100bahamas(~lucian@84.232.140.158) (Ping timeout: 256 seconds)
2022-03-22 19:23:54 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 19:23:55 +0100 <monochrom> Yeah it's "option".
2022-03-22 19:24:41 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 19:26:24 +0100ub(~Thunderbi@p200300ecdf158894bc3487aad6770a01.dip0.t-ipconnect.de)
2022-03-22 19:28:37 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 19:29:25 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-03-22 19:31:25 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-03-22 19:31:48 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 19:31:52 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Client closed)
2022-03-22 19:33:42 +0100vglfr(~vglfr@88.155.11.162)
2022-03-22 19:34:19 +0100fef(~thedawn@user/thedawn) (Remote host closed the connection)
2022-03-22 19:36:36 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-03-22 19:41:47 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 19:41:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-22 19:41:51 +0100wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-22 19:41:51 +0100wroathe(~wroathe@user/wroathe)
2022-03-22 19:49:56 +0100justOkay(~justache@user/justache) (Read error: Connection reset by peer)
2022-03-22 19:50:55 +0100justOkay(~justache@user/justache)
2022-03-22 19:51:15 +0100Graham31415(~Graham314@5.33.52.156)
2022-03-22 19:51:35 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-03-22 19:54:29 +0100 <hololeap> hm, it seems that cabal is influenced by cabal.project in a parent directory. e.g. I'm in subdir/ and working with subdir/subdir.cabal, but it keeps looking at the top level (and putting cabal.project.local there)
2022-03-22 19:56:04 +0100sloorush(~sloorush@2401:4900:234a:ee9b:8aa3:1d87:a269:b8a8)
2022-03-22 19:56:23 +0100 <hololeap> any way to disable this, so it's only looking at subdir/ ?
2022-03-22 19:57:02 +0100 <maerwald[m]> Symlink
2022-03-22 19:57:10 +0100 <hololeap> for reference, I'm working on the dhall/ subdir here: https://github.com/dhall-lang/dhall-haskell
2022-03-22 19:57:28 +0100 <hololeap> symlink what?
2022-03-22 19:58:05 +0100alp(~alp@user/alp) (Ping timeout: 256 seconds)
2022-03-22 19:58:11 +0100 <maerwald[m]> hololeap: you move the subdir out and symlink it back in
2022-03-22 19:58:41 +0100 <maerwald[m]> They the original cabal.project still sees the subdir, but when you cd to it. Cabal doesn't see the parent calab.project
2022-03-22 19:58:58 +0100 <maerwald[m]> Because ../ doesn't resolve that way
2022-03-22 19:59:48 +0100 <maerwald[m]> That may break your git checkout though :)
2022-03-22 20:00:17 +0100zincy_(~zincy@2a00:23c8:970c:4801:a9ba:a14e:e332:b83f)
2022-03-22 20:01:20 +0100 <sclv> you can just put a cabal.project in the subdir
2022-03-22 20:01:26 +0100 <sclv> that only applies to the subdir
2022-03-22 20:03:33 +0100zebrag(~chris@user/zebrag)
2022-03-22 20:04:13 +0100vysn(~vysn@user/vysn) (Ping timeout: 240 seconds)
2022-03-22 20:04:58 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2022-03-22 20:05:14 +0100 <hololeap> there seems to be some undocumented --ignore-project option
2022-03-22 20:05:43 +0100sciencentistguy(~sciencent@hacksoc/ordinary-member)
2022-03-22 20:05:47 +0100 <sciencentistguy> :config
2022-03-22 20:05:53 +0100 <sciencentistguy> whoops, sorry
2022-03-22 20:07:09 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
2022-03-22 20:08:32 +0100justsomeguy(~justsomeg@user/justsomeguy)
2022-03-22 20:08:56 +0100jao(~jao@45.152.183.53)
2022-03-22 20:09:05 +0100 <hololeap> it's mentioned once here: https://cabal.readthedocs.io/en/3.6/cabal-commands.html?highlight=ignore-project#cabal-v2-repl
2022-03-22 20:09:58 +0100 <hololeap> cabal configure added "ignore-project: False" to my cabal.project.local which is how I discovered it
2022-03-22 20:10:40 +0100 <monochrom> Hrm there is a chance --ignore-project is only for repl.
2022-03-22 20:11:02 +0100mud(~mud@user/kadoban) (Quit: quit)
2022-03-22 20:11:10 +0100 <monochrom> I haven't tested anything, but I looked at "cabal build --help" and "cabal repl --help".
2022-03-22 20:12:00 +0100 <monochrom> Does it help to say --project-file=/dev/null ? :)
2022-03-22 20:12:14 +0100 <sclv> ignore project works mainly but not always iirc
2022-03-22 20:12:45 +0100 <hololeap> at this point I can't reproduce the behavior... I'm just going to move on for now
2022-03-22 20:13:34 +0100 <sclv> https://github.com/haskell/cabal/issues/7965
2022-03-22 20:14:07 +0100 <sclv> its ugly :-/
2022-03-22 20:14:50 +0100 <sclv> by "mainly" i should have said "sporadically"
2022-03-22 20:16:05 +0100 <hololeap> thanks, good to see someone filed a bug for this
2022-03-22 20:21:49 +0100bahamas(~lucian@84.232.140.158)
2022-03-22 20:27:29 +0100bahamas(~lucian@84.232.140.158) (Ping timeout: 252 seconds)
2022-03-22 20:30:07 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it) (Read error: Connection reset by peer)
2022-03-22 20:32:45 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it)
2022-03-22 20:35:09 +0100wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-03-22 20:36:35 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-22 20:37:13 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net)
2022-03-22 20:43:05 +0100DNH(~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a)
2022-03-22 20:45:41 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 256 seconds)
2022-03-22 20:46:29 +0100sloorush(~sloorush@2401:4900:234a:ee9b:8aa3:1d87:a269:b8a8) (Ping timeout: 256 seconds)
2022-03-22 20:48:18 +0100vorpuni(~pvorp@2001:861:3881:c690:3875:d51d:97cc:8362)
2022-03-22 20:53:33 +0100alp(~alp@user/alp)
2022-03-22 20:59:13 +0100bitmapper(uid464869@id-464869.lymington.irccloud.com)
2022-03-22 20:59:39 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 20:59:46 +0100justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
2022-03-22 21:00:16 +0100ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-22 21:01:03 +0100romesrf(~romes@44.190.189.46.rev.vodafone.pt)
2022-03-22 21:02:42 +0100bahamas(~lucian@84.232.140.158)
2022-03-22 21:03:12 +0100 <romesrf> Hi! I'm going to an upcoming small hackathon and am thinking about ideas for a project (unfortunately there's no theme)
2022-03-22 21:03:18 +0100 <romesrf> Has anyone any?
2022-03-22 21:05:02 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 260 seconds)
2022-03-22 21:05:51 +0100Graham31415(~Graham314@5.33.52.156) (Quit: Client closed)
2022-03-22 21:07:32 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2022-03-22 21:07:50 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-03-22 21:09:52 +0100kuribas(~user@ptr-25vy0i7hp9xee3gx8cn.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2022-03-22 21:10:40 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 21:12:34 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 21:15:21 +0100bahamas(~lucian@84.232.140.158) (Ping timeout: 252 seconds)
2022-03-22 21:15:59 +0100mud(~mud@user/kadoban)
2022-03-22 21:16:44 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 21:18:47 +0100DELL(~DELL@eth-east-parth2-46-193-64-159.wb.wifirst.net)
2022-03-22 21:20:39 +0100Pickchea(~private@user/pickchea)
2022-03-22 21:20:45 +0100dcoutts__(~duncan@host86-167-206-34.range86-167.btcentralplus.com) (Remote host closed the connection)
2022-03-22 21:20:46 +0100DELL(~DELL@eth-east-parth2-46-193-64-159.wb.wifirst.net) (Client Quit)
2022-03-22 21:21:03 +0100dcoutts__(~duncan@host86-167-206-34.range86-167.btcentralplus.com)
2022-03-22 21:24:57 +0100lawt2lawt
2022-03-22 21:26:16 +0100Hemmo(~Hemmo@85-76-66-96-nat.elisa-mobile.fi)
2022-03-22 21:27:41 +0100 <Hemmo> Hello! I'm having trouble finding what exactly does '\x -> ' do in the filter function!
2022-03-22 21:27:44 +0100 <Hemmo> Function here :
2022-03-22 21:27:45 +0100 <Hemmo> Input: filter (\x -> length x > 4) ["aaaa","bbbbbbbbbbbbb","cc"]
2022-03-22 21:27:45 +0100 <Hemmo> Output: ["bbbbbbbbbbbbb"]
2022-03-22 21:28:36 +0100 <Hemmo> Oh wait it takes an element of the list?
2022-03-22 21:28:47 +0100 <Hemmo> Why does it have a \ in it though? What does it signify?
2022-03-22 21:36:19 +0100Guest27(~Guest27@c-174-63-99-174.hsd1.ma.comcast.net)
2022-03-22 21:36:35 +0100 <janus> Hemmo: the backslash is part of the anonymous function syntax
2022-03-22 21:37:09 +0100 <Guest27> Recommended .gitignore for cabal v2-style projects? At a minimum seems you want to ignore dist-newstyle/build
2022-03-22 21:39:05 +0100 <geekosaur> I'd ignore all of dist-newstyle
2022-03-22 21:39:42 +0100 <Guest27> Sweet, thanks
2022-03-22 21:40:07 +0100 <geekosaur> looking at my local projects, that and editor temp files are basically it
2022-03-22 21:40:19 +0100 <janus> Guest27: if you use tasty you may wanna ignore .tasty-retun-log
2022-03-22 21:40:46 +0100 <janus> also consider ignore *.dump-hi files
2022-03-22 21:41:55 +0100 <geekosaur> https://github.com/xmonad/xmonad/blob/master/.gitignore fwiw
2022-03-22 21:41:59 +0100 <Guest27> Don't use tasty but I need to adopt a testing framework soon...
2022-03-22 21:42:00 +0100 <Guest27> What produces .dump-hi?
2022-03-22 21:42:12 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 240 seconds)
2022-03-22 21:42:44 +0100 <Guest27> geekosaur Oh that's perfect
2022-03-22 21:42:51 +0100 <geekosaur> ghc with -ddump-hi ? ingeneral anything with suffix .dump-* comes from ghc -d*
2022-03-22 21:43:00 +0100bahamas(~lucian@84.232.140.158)
2022-03-22 21:43:01 +0100 <Guest27> Ah okay
2022-03-22 21:43:24 +0100 <geekosaur> and -ddump-to-filoe but both cabal and stack turn that on
2022-03-22 21:43:33 +0100 <geekosaur> *-ddump-to-file
2022-03-22 21:44:51 +0100Pickchea(~private@user/pickchea) (Ping timeout: 256 seconds)
2022-03-22 21:47:19 +0100 <janus> Guest27: some of the files in the xmonad config are from before v2, i think
2022-03-22 21:47:28 +0100dextaa_(~dextaa@user/dextaa)
2022-03-22 21:47:41 +0100bahamas(~lucian@84.232.140.158) (Ping timeout: 256 seconds)
2022-03-22 21:48:30 +0100 <geekosaur> yeh, I don't think dist or .xmonad-sandbox are used these days.
2022-03-22 21:48:45 +0100 <geekosaur> (in fact I think sandbox support has been removed?)
2022-03-22 21:48:50 +0100 <Guest27> janus it looks like a good nuclear option for if I ever switch from cabal to stack or whatnot
2022-03-22 21:50:22 +0100xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-03-22 21:51:56 +0100pavonia(~user@user/siracusa)
2022-03-22 21:53:05 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-22 21:54:24 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 252 seconds)
2022-03-22 21:58:45 +0100yauhsien(~yauhsien@61-231-38-131.dynamic-ip.hinet.net)
2022-03-22 22:00:11 +0100karim(~karim@41.34.201.10) (Ping timeout: 250 seconds)
2022-03-22 22:01:47 +0100pwug(~pwug@user/pwug)
2022-03-22 22:02:55 +0100Tuplanolla(~Tuplanoll@91-159-69-98.elisa-laajakaista.fi)
2022-03-22 22:03:00 +0100yauhsien(~yauhsien@61-231-38-131.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-03-22 22:06:30 +0100alp(~alp@user/alp) (Ping timeout: 252 seconds)
2022-03-22 22:07:19 +0100Hemmo(~Hemmo@85-76-66-96-nat.elisa-mobile.fi) (Remote host closed the connection)
2022-03-22 22:10:05 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-22 22:11:26 +0100boxscape_(~boxscape_@p4ff0b60b.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-03-22 22:11:43 +0100geekosaurwonders why threadDelay takes an Int instead of a Micro. should work the same way but the type at least would document that it's microseconds. (Num instance should cover existing usage?)
2022-03-22 22:12:17 +0100 <geekosaur> well, hm, not for computed delays I guess. which means bikeshedding. :(
2022-03-22 22:12:26 +0100fendor_(~fendor@178.115.72.153.wireless.dyn.drei.com) (Remote host closed the connection)
2022-03-22 22:12:45 +0100fendor_(~fendor@178.115.72.153.wireless.dyn.drei.com)
2022-03-22 22:13:21 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
2022-03-22 22:14:07 +0100 <tomsmeding> breaking changes are a sensitive topic these days
2022-03-22 22:17:21 +0100 <janus> geekosaur: Micro, where is that defined? doesn't seem easy to google
2022-03-22 22:17:25 +0100mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds)
2022-03-22 22:17:25 +0100 <janus> @src Micro
2022-03-22 22:17:25 +0100 <lambdabot> Source not found. And you call yourself a Rocket Scientist!
2022-03-22 22:17:42 +0100 <tomsmeding> https://hackage.haskell.org/package/base-4.16.0.0/docs/Data-Fixed.html#t:Micro
2022-03-22 22:18:40 +0100 <janus> ah, so it is a breaking change. i thought it would be a synonym for Int somehow
2022-03-22 22:19:10 +0100 <janus> if the API is broken may as well ensure it can't be negative ;)
2022-03-22 22:21:24 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 22:22:12 +0100merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-03-22 22:22:14 +0100 <Guest27> Without negative arguments how will my time-traveling concurrency work???
2022-03-22 22:23:30 +0100 <janus> % :m +Control.Concurrent
2022-03-22 22:23:30 +0100 <yahb> janus:
2022-03-22 22:23:36 +0100 <janus> % threadDelay (-1)
2022-03-22 22:23:36 +0100 <yahb> janus:
2022-03-22 22:24:00 +0100januslooks around, expecting to see a glitch in the matrix
2022-03-22 22:24:32 +0100 <Guest27> You may not have felt it but everything shifted back by exactly one microsecond ;)
2022-03-22 22:25:32 +0100 <tomsmeding> janus: it eventually calls registerTimeout here, where the delay is the second argument https://hackage.haskell.org/package/base-4.15.0.0/src/GHC/Event/TimerManager.hs
2022-03-22 22:25:51 +0100 <geekosaur> right, my point was the Num instance would make literals work as they do now, but computed delays would lose because it'snot an Int any more
2022-03-22 22:25:59 +0100_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-03-22 22:26:13 +0100 <geekosaur> then again, iirc Fixed is backed by Integer so it also fixes a bug/wart
2022-03-22 22:26:25 +0100 <geekosaur> sadly that one has come upbefore and been rejected
2022-03-22 22:26:38 +0100 <monochrom> I wonder if time travel can extend Curry-Howard to cover classical logic. >:)
2022-03-22 22:27:04 +0100 <geekosaur> yep, backed by Integer
2022-03-22 22:27:13 +0100 <tomsmeding> also fun: "If humanity still exists in 2500 CE we will ned to be a bit more careful here."
2022-03-22 22:27:14 +0100jaror[m](~jaror@2001:470:69fc:105::265)
2022-03-22 22:28:05 +0100gehmehgeh(~user@user/gehmehgeh)
2022-03-22 22:30:51 +0100 <monochrom> I think currently it is only known that time-like loops imply P=NP. Merely. :)
2022-03-22 22:32:08 +0100ProfSimm(~ProfSimm@87.227.196.109)
2022-03-22 22:32:50 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 22:35:11 +0100Guest49(~Guest49@2600:1700:2050:1040:5d4c:e061:4689:d06a)
2022-03-22 22:37:16 +0100nsyd(~psy@104-62-224-96.lightspeed.chrlnc.sbcglobal.net)
2022-03-22 22:37:50 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 252 seconds)
2022-03-22 22:38:39 +0100Guest49(~Guest49@2600:1700:2050:1040:5d4c:e061:4689:d06a) (Quit: Client closed)
2022-03-22 22:39:21 +0100charukiewicz[m](~charukiew@2001:470:69fc:105::ded4)
2022-03-22 22:42:55 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds)
2022-03-22 22:44:29 +0100Batzy(~quassel@user/batzy) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-22 22:44:37 +0100ub(~Thunderbi@p200300ecdf158894bc3487aad6770a01.dip0.t-ipconnect.de) (Quit: ub)
2022-03-22 22:44:50 +0100alt-romes(~romes@44.190.189.46.rev.vodafone.pt)
2022-03-22 22:45:16 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-03-22 22:45:24 +0100Guest|85(~Guest|85@pool-108-41-198-29.nycmny.fios.verizon.net)
2022-03-22 22:45:34 +0100Batzy(~quassel@user/batzy)
2022-03-22 22:46:39 +0100zmt00(~zmt00@user/zmt00)
2022-03-22 22:46:54 +0100 <dolio> I don't think so. The 'time travel' interpretation of excluded middle requires different things to happen the second time. So it's not a consistent loop.
2022-03-22 22:47:29 +0100 <Guest|85> Just have a quick question, when I try to run the command found on https://www.haskell.org/ghcup/ in powershell to try to get Haskell install on my PC, my powershell window just close itself and ghcup is not installed. How should I install it correctly?
2022-03-22 22:47:42 +0100romesrf(~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 260 seconds)
2022-03-22 22:48:07 +0100charukiewicz(~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560)
2022-03-22 22:48:07 +0100 <maerwald> Guest|85: https://www.youtube.com/watch?v=bB4fmQiUYPw
2022-03-22 22:48:27 +0100 <Guest|85> thx I will check that
2022-03-22 22:48:57 +0100 <maerwald> make sure to not run in an admin session
2022-03-22 22:49:10 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com)
2022-03-22 22:49:27 +0100zmt01(~zmt00@user/zmt00) (Ping timeout: 256 seconds)
2022-03-22 22:49:35 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2022-03-22 22:49:53 +0100wyrd(~wyrd@gateway/tor-sasl/wyrd)
2022-03-22 22:50:01 +0100 <yushyin> i see the video is already paying off ;)
2022-03-22 22:50:37 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
2022-03-22 22:51:16 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2022-03-22 22:51:23 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-03-22 22:56:21 +0100alp(~alp@user/alp)
2022-03-22 22:56:35 +0100DNH(~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-22 23:01:48 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-03-22 23:03:00 +0100xsarnik(xsarnik@lounge.fi.muni.cz) (Quit: Ping timeout (120 seconds))
2022-03-22 23:03:17 +0100DNH(~DNH@2a02:8108:1100:16d8:b07b:b6be:41fa:d6a)
2022-03-22 23:03:52 +0100xsarnik(xbraun1@lounge.fi.muni.cz)
2022-03-22 23:04:02 +0100mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-03-22 23:05:55 +0100 <Guest|85> Turns out what's blocking me from running the script is because I forgot to turn off my antivirus program
2022-03-22 23:06:08 +0100 <Guest|85> X)
2022-03-22 23:06:16 +0100vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-03-22 23:06:37 +0100vysn(~vysn@user/vysn)
2022-03-22 23:07:21 +0100 <monochrom> Personally I just let Windows Defender stay on and say no to any "stronger" ones that are just CPU hogs and disk hogs for no extra value.
2022-03-22 23:08:20 +0100 <Guest|85> Yeah that's probably the best
2022-03-22 23:08:32 +0100 <Guest|85> Thx for the help
2022-03-22 23:08:36 +0100Guest|85(~Guest|85@pool-108-41-198-29.nycmny.fios.verizon.net) (Quit: Connection closed)
2022-03-22 23:09:12 +0100hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Ping timeout: 252 seconds)
2022-03-22 23:10:42 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 23:11:18 +0100boxscape_(~boxscape_@p4ff0b60b.dip0.t-ipconnect.de)
2022-03-22 23:11:35 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
2022-03-22 23:12:27 +0100 <boxscape_> I've made an alias for `\f g -> fmap f . g` a few times, but I just now realized that Control.Arrow.^<< exists
2022-03-22 23:12:48 +0100 <boxscape_> tbf hoogle doesn't find it when you enter the specialized type of that function
2022-03-22 23:13:37 +0100 <boxscape_> oh wait I think you'd have to wrap it in Kleisli for that...
2022-03-22 23:14:36 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-03-22 23:15:03 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2022-03-22 23:15:31 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2022-03-22 23:15:46 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2022-03-22 23:19:55 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 23:19:55 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-03-22 23:20:07 +0100sugar(~sugar@bras-base-hmtnon1497w-grc-46-67-70-68-108.dsl.bell.ca)
2022-03-22 23:20:19 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-03-22 23:20:37 +0100fendor_(~fendor@178.115.72.153.wireless.dyn.drei.com) (Remote host closed the connection)
2022-03-22 23:21:51 +0100notzmv(~zmv@user/notzmv) (Ping timeout: 252 seconds)
2022-03-22 23:22:05 +0100charukiewicz(~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560) (Remote host closed the connection)
2022-03-22 23:23:17 +0100charukiewicz(~charukiew@2600:1702:a90:2750:724d:7bff:fe2b:f560)
2022-03-22 23:24:03 +0100acidjnk(~acidjnk@p200300d0c7049f30dd97d7382d55cf65.dip0.t-ipconnect.de)
2022-03-22 23:25:53 +0100cosimone(~user@93-44-187-176.ip98.fastwebnet.it)
2022-03-22 23:26:29 +0100jgeerds(~jgeerds@55d4548e.access.ecotel.net) (Remote host closed the connection)
2022-03-22 23:29:40 +0100 <abastro[m]> :t fmap f . g
2022-03-22 23:29:40 +0100 <lambdabot> (Functor f, Show a1, Show a2, FromExpr b, FromExpr (f a1)) => a2 -> f b
2022-03-22 23:30:04 +0100 <monochrom> You may have better luck with \f g -> fmap f . g
2022-03-22 23:30:14 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4.1)
2022-03-22 23:30:15 +0100 <abastro[m]> Oh wait
2022-03-22 23:30:16 +0100 <abastro[m]> My bad
2022-03-22 23:30:30 +0100 <abastro[m]> :t \f g -> fmap f . g
2022-03-22 23:30:31 +0100 <lambdabot> Functor f => (a1 -> b) -> (a2 -> f a1) -> a2 -> f b
2022-03-22 23:31:05 +0100 <geekosaur> you got some simple_reflect mixed upin there, yeh
2022-03-22 23:31:40 +0100 <abastro[m]> Oh. That type is straightforward
2022-03-22 23:32:13 +0100 <abastro[m]> Guess I just personally have never needed to shorten it
2022-03-22 23:34:20 +0100michalz(~michalz@185.246.204.62) (Remote host closed the connection)
2022-03-22 23:34:50 +0100 <janus> is there a better alternative to generic-arbitrary? it seems abandoned
2022-03-22 23:34:59 +0100 <janus> @package generic-arbitrary
2022-03-22 23:34:59 +0100 <lambdabot> https://hackage.haskell.org/package/generic-arbitrary
2022-03-22 23:38:50 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-22 23:43:03 +0100zincy_(~zincy@2a00:23c8:970c:4801:a9ba:a14e:e332:b83f) (Remote host closed the connection)
2022-03-22 23:43:47 +0100 <abastro[m]> Looks new enough to me except for lack of support for GHC 9.0+
2022-03-22 23:44:30 +0100yauhsien(~yauhsien@61-231-38-131.dynamic-ip.hinet.net)
2022-03-22 23:44:58 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-03-22 23:46:55 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-03-22 23:46:59 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-22 23:47:34 +0100Tuplanolla(~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
2022-03-22 23:48:37 +0100yauhsien(~yauhsien@61-231-38-131.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-03-22 23:48:42 +0100 <[itchyjunk]> hmm
2022-03-22 23:49:16 +0100 <[itchyjunk]> I have a function Int -> [Int] -> (Int,Int)
2022-03-22 23:49:52 +0100 <[itchyjunk]> For that first input, i would like to apply different ints over time.. idk if map is the right thing to use here
2022-03-22 23:50:30 +0100 <abastro[m]> Wdym different inputs over time?
2022-03-22 23:50:40 +0100 <[itchyjunk]> I can map this function to a list of ints but i'd end up with partially applied functions to which i cna somehow apply ..
2022-03-22 23:50:47 +0100 <abastro[m]> You mean it is supplied by e.g. timer
2022-03-22 23:50:48 +0100 <[itchyjunk]> well i have fun x xs
2022-03-22 23:50:55 +0100 <[itchyjunk]> i want x to range over 0 through 9
2022-03-22 23:51:04 +0100 <[itchyjunk]> so fun 0 xs, fun 1 xs ...
2022-03-22 23:51:15 +0100tiferrei(~tiferrei@user/tiferrei) (Ping timeout: 240 seconds)
2022-03-22 23:51:17 +0100 <[itchyjunk]> no no, not timer. time was the wrong choice of words
2022-03-22 23:51:38 +0100 <abastro[m]> I guess the way I would do is
2022-03-22 23:51:45 +0100 <[itchyjunk]> I just need to use this function 10 times. where the first argument changes from 0 through 9
2022-03-22 23:51:57 +0100lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-22 23:52:00 +0100 <[itchyjunk]> and the second argument is the same list
2022-03-22 23:52:01 +0100tiferrei(~tiferrei@user/tiferrei)
2022-03-22 23:52:02 +0100 <monochrom> map (\i -> fun i xs) [0, 1, 2, ...]
2022-03-22 23:52:14 +0100 <abastro[m]> `map (flip fun xs) [1..9]` assuming you want list
2022-03-22 23:52:27 +0100 <monochrom> [fun i xs | i <- [0, 1, 2, ...]]
2022-03-22 23:52:41 +0100 <abastro[m]> Or `\i -> fun i xs` instead of flip..
2022-03-22 23:52:45 +0100son0p(~ff@181.136.122.143)
2022-03-22 23:53:15 +0100 <[itchyjunk]> oh! the list comprehension one made sense
2022-03-22 23:53:23 +0100 <[itchyjunk]> hmm not sure about that lambda function one
2022-03-22 23:53:32 +0100 <abastro[m]> `do i <- [1..9]; pure (fun i xs)`
2022-03-22 23:53:37 +0100leungbk(~user@2603-8000-1201-2dd2-e446-391d-2222-0a22.res6.spectrum.com) (Ping timeout: 240 seconds)
2022-03-22 23:53:56 +0100 <abastro[m]> The lambda one just maps the function over the list
2022-03-22 23:54:18 +0100 <abastro[m]> map f [x1, x2, ...] = [f x1, f x2, ...]
2022-03-22 23:54:26 +0100 <monochrom> [fun 0 xs, fun 1 xs, fun 2 xs] = [(\i -> fun i xs) 0, (\i -> fun i xs) 1, (\i -> fun i xs) 2] = map (\i -> fun i xs) [0,1,2].
2022-03-22 23:54:33 +0100 <monochrom> This is just vanilla refactoring.
2022-03-22 23:54:47 +0100 <abastro[m]> > map (+2) [0, 2, 3, 1]
2022-03-22 23:54:49 +0100 <lambdabot> [2,4,5,3]
2022-03-22 23:55:38 +0100 <abastro[m]> > map (\i -> i + 2) [0, 2, 3, 1]
2022-03-22 23:55:39 +0100 <lambdabot> [2,4,5,3]
2022-03-22 23:55:40 +0100 <monochrom> This is why I disagree with "don't need math for haskell". You need math skills, such as doing algebraic factoring.
2022-03-22 23:55:56 +0100 <monochrom> You don't need the quadratic formula or volume of sphere, sure.
2022-03-22 23:56:00 +0100 <abastro[m]> Ignore `(+2)`
2022-03-22 23:56:08 +0100 <[itchyjunk]> ahh
2022-03-22 23:57:25 +0100 <abastro[m]> monochrom: it would make the claim "Too mathy for me" valid tho
2022-03-22 23:57:58 +0100 <boxscape_> monochrom to be fair it's possible to pick those up while learning Haskell, though I'm sure coming into it already having that skill set is helpful
2022-03-22 23:58:12 +0100 <monochrom> It is the whole point of FP. To just do algebra and you can understand my code.
2022-03-22 23:58:19 +0100alp(~alp@user/alp) (Ping timeout: 268 seconds)
2022-03-22 23:58:27 +0100 <monochrom> As opposed to "imagine how to execute".
2022-03-22 23:58:53 +0100 <abastro[m]> I think dealing with equals sign is not much of math ppl imagine
2022-03-22 23:59:24 +0100 <abastro[m]> It is not like calculating integration or something
2022-03-22 23:59:42 +0100machinedgod(~machinedg@24.105.81.50)