2024/07/22

2024-07-22 00:00:02 +0200 <omentic> only problem is idk where that is so i'm trying to print debug all the relevant terms and find out where it might be
2024-07-22 00:00:11 +0200tomku(~tomku@user/tomku)
2024-07-22 00:01:03 +0200 <ddellacosta> I see
2024-07-22 00:01:46 +0200 <monochrom> You can try standalone deriving. If that is not an option, you can write your own X->String function.
2024-07-22 00:04:28 +0200 <ddellacosta> oh that's a good point, you can just write a straightforward serialization function
2024-07-22 00:12:39 +0200 <omentic> hrm. Context appears to be generic over a type
2024-07-22 00:13:24 +0200 <omentic> which i think throws a wrench in the serialization function??
2024-07-22 00:14:56 +0200 <omentic> oh wait, this is generic but then used in Item a, and Item a has show defined on it nvm
2024-07-22 00:15:36 +0200 <Hecate> https://discourse.haskell.org/t/maintain-a-golden-test-of-your-packages-api-with-diff-package-api-…
2024-07-22 00:15:39 +0200 <Hecate> enjoy
2024-07-22 00:23:26 +0200 <ddellacosta> omentic: yeah I assume you should be able to write a function that returns one string for a Context String vs. a Context _anythingElse, but I'm not super familiar with existentials. Hopefully someone else on here can give you better advice if you get stuck on that bit
2024-07-22 00:25:14 +0200omentic(~apropos@104.193.135.206) (Quit: Lost terminal)
2024-07-22 00:25:31 +0200 <ddellacosta> also, maybe Template has what you are looking for? and that has a Show instance https://hackage.haskell.org/package/hakyll-4.16.2.2/docs/Hakyll-Web-Template-Internal.html
2024-07-22 00:25:49 +0200omentic(~apropos@104.193.135.206)
2024-07-22 00:26:11 +0200 <ddellacosta> not sure if you should rely on an Internal API other than for debugging to be clear
2024-07-22 00:29:45 +0200 <omentic> ok i'm kinda confused about this newtype syntax
2024-07-22 00:29:56 +0200 <omentic> why is ex. a newtype declaration this: newtype Context a = Context { unContext :: String -> [String] -> Item a -> Compiler ContextField }
2024-07-22 00:30:06 +0200 <omentic> and not this? newtype Context a = String -> [String] -> Item a -> Compiler ContextField
2024-07-22 00:30:19 +0200 <c_wraith> It's using record syntax to declare an accessor at the same time
2024-07-22 00:30:40 +0200 <c_wraith> That's perfectly valid, as long as the record only has one field.
2024-07-22 00:30:43 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2024-07-22 00:31:40 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-07-22 00:32:22 +0200 <omentic> hmm
2024-07-22 00:33:03 +0200 <c_wraith> also, your suggested alternative doesn't contain a constructor
2024-07-22 00:33:08 +0200 <c_wraith> newtypes always have constructors
2024-07-22 00:33:39 +0200 <omentic> ok so i guess, what is the structure of the Context type?
2024-07-22 00:33:44 +0200 <c_wraith> it would be like newtype Context a = Context (String -> [String] -> Item a -> Compiler ContextField)
2024-07-22 00:34:20 +0200 <c_wraith> that creates the exact same type, it just doesn't also create a value named unContext to extract the value
2024-07-22 00:34:34 +0200 <omentic> why is Context in there twice? what's the = Context for
2024-07-22 00:35:00 +0200 <c_wraith> newtype TypeName = ConstructorName ContentType
2024-07-22 00:35:15 +0200 <c_wraith> Types and constructors are separate namespaces, so it's common to reuse the same name
2024-07-22 00:35:32 +0200 <c_wraith> as the example you initially quoted does
2024-07-22 00:35:34 +0200 <omentic> also unContext is returning... a function that takes in a String, a list of Strings, and an Item and returning the Compiler ContextField right (as a sanity check)
2024-07-22 00:36:15 +0200 <c_wraith> yeah, unContext actually has an annoying type, because it's not the type specified afterwards. That's kind of a failing of record syntax.
2024-07-22 00:36:20 +0200 <omentic> ok i see interesting, ig i'm used to the constructor name being implicit. that's cool
2024-07-22 00:37:00 +0200 <c_wraith> Well, it's like constructor names for data, as well. for instance, data Bool = False | True
2024-07-22 00:37:12 +0200 <c_wraith> Two different constructors, each creates a Bool value
2024-07-22 00:37:23 +0200 <c_wraith> But a newtype can only have one constructor.
2024-07-22 00:37:57 +0200 <omentic> 👍
2024-07-22 00:38:44 +0200 <omentic> hmm can you explain unContext a little more
2024-07-22 00:39:38 +0200 <c_wraith> Well. uncontext is technically a "field selector". Field selectors can work in several different ways
2024-07-22 00:40:20 +0200 <c_wraith> In the specific way it's being used there, the only really important one is that a field selector can be used as a function which takes the full structure and returns the specified field
2024-07-22 00:41:11 +0200 <c_wraith> So you have unContext :: Context a -> (String -> [String] -> Item a -> Compiler ContextField)
2024-07-22 00:41:21 +0200 <omentic> hm. i guess i'm confused on what constructing and destructing this newtype would look like
2024-07-22 00:42:07 +0200 <c_wraith> The reverse is the constructor, which is also a function - Context :: (String -> [String] -> Item a -> Compiler ContextField) -> Context a
2024-07-22 00:42:18 +0200target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2024-07-22 00:42:36 +0200 <omentic> ok, so the constructor is implicit from the type of the unContext field?
2024-07-22 00:42:47 +0200 <omentic> then does that mean you can't have multiple fields in a record in a newtype?
2024-07-22 00:43:05 +0200 <c_wraith> a newtype is a zero-cost wrapper around another type, so it can only have a single field
2024-07-22 00:43:14 +0200 <omentic> ohh ok
2024-07-22 00:43:16 +0200 <c_wraith> a regular record is a data declaration, and can have many fields
2024-07-22 00:44:10 +0200 <omentic> ah. ok this clears up some confusion. coming from rust that is the case too but there isn't also a separate newtype keyword
2024-07-22 00:44:21 +0200 <omentic> so just the single-field-record structure implicitly functions like a newtype
2024-07-22 00:45:20 +0200 <omentic> how do newtypes interact with things that are not single-field-records?
2024-07-22 00:45:48 +0200 <c_wraith> Well, you can use the non-record syntax. But it's an error to declare a newtype with any number of fields than exactly one
2024-07-22 00:47:09 +0200 <c_wraith> thanks to Haskell having non-strict semantics, a one-field data type has slightly different behavior than a newtype. So it has a separate keyword for the special case.
2024-07-22 00:48:31 +0200 <omentic> ok so is newtype Foo = Foo X (about) the same thing as newtype Foo = Foo {x::X}?
2024-07-22 00:48:43 +0200 <c_wraith> yes
2024-07-22 00:49:05 +0200 <c_wraith> it doesn't declare the field selector, but it's otherwise identical
2024-07-22 00:51:38 +0200 <omentic> how then do you destructure a newtype?
2024-07-22 00:51:53 +0200 <omentic> do you have to worry about the field selector or can you do so the same way as raw data
2024-07-22 00:52:25 +0200 <c_wraith> you can pattern match no matter how it's declared, or use the field selector if it exists
2024-07-22 00:52:36 +0200 <c_wraith> Whatever is more convenient for the code you're writing
2024-07-22 00:55:11 +0200 <omentic> so i guess, what would matching on that newtype Context a = Context (String -> [String] -> Item a -> Compiler ContextField) look like?
2024-07-22 00:55:19 +0200 <omentic> (i am entirely new to haskell)
2024-07-22 00:56:10 +0200 <omentic> b/c Context a is like... func Context<A>(String, Vec<String>, Item<A>) -> Compiler<ContextField> in rust syntax right
2024-07-22 00:56:25 +0200 <c_wraith> Ah. Some of this might be better addressed by going through an intro text, then. But in general, you can pattern match in a case expression or in the LHS of a declaration.
2024-07-22 00:56:58 +0200 <c_wraith> as an expression, case c of (Context f) -> <some code using f>
2024-07-22 00:57:22 +0200 <c_wraith> Or in the LHS of a function definition, you'd have something like foo (Context f) = <some code using f>
2024-07-22 01:00:00 +0200 <omentic> so something like contextToString (Context (foo -> bar -> Item a -> baz)) = ...?
2024-07-22 01:00:13 +0200 <omentic> (this doesn't work though & i get a warning about ViewPatterns)
2024-07-22 01:00:36 +0200 <c_wraith> Oh, yeah. functions don't have patterns - you can't match on them. You can only apply them.
2024-07-22 01:00:54 +0200 <omentic> okok
2024-07-22 01:00:56 +0200 <c_wraith> So you have to just match on the function as a single name, then you can call that function as desired
2024-07-22 01:01:50 +0200 <omentic> interesting. i'm now very confused on *why* this is a function b/c i thought it was supposed to be something of a key-value store
2024-07-22 01:02:16 +0200 <c_wraith> With names like Item and Compiler - is this Hakyll code?
2024-07-22 01:02:27 +0200 <omentic> oh yeah
2024-07-22 01:03:01 +0200 <omentic> idk when you jumped in the channel but the background is i'm trying to print debug hakyll so i can figure out what is going on
2024-07-22 01:03:25 +0200 <omentic> but Context doesn't implement Show, so i need to implement some Context a -> String function so i can use it with trace
2024-07-22 01:03:26 +0200 <c_wraith> hakyll isn't very friendly towards that. Lots of functions in its internal representations
2024-07-22 01:03:41 +0200 <omentic> interesting
2024-07-22 01:03:50 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-07-22 01:04:33 +0200 <c_wraith> In some sense, a function can act as a lookup in a key-value store. But I don't know if it's doing that for this.
2024-07-22 01:05:12 +0200 <c_wraith> I honestly try to ignore Hakyll's internals.
2024-07-22 01:05:51 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 276 seconds)
2024-07-22 01:06:11 +0200 <omentic> yeah it's basically like. the default hakyll setup does almost everything i want it to. but i want to dynamically dispatch templates based on metadata jekyll-style, ex. having ---\n layout: post\n --- in yaml headers of files
2024-07-22 01:06:23 +0200 <dibblego> when using ghc -e, how might I reference an installed module?
2024-07-22 01:07:07 +0200 <omentic> this involves writing a single loadLayoutTemplate :: Context a -> Item a -> Compiler (Item String) function, but it also means i have to understand both hakyll (where is metadata is) and haskell (how to write functions) a little more than i currently do
2024-07-22 01:08:14 +0200 <dibblego> omentic: took me a while to get my head around hakyll as well. I have an example if it helps.
2024-07-22 01:09:08 +0200 <omentic> dibblego: i'll defo take an example, most of what i've learned abt it so far has been from reading other ppl's code
2024-07-22 01:09:31 +0200 <omentic> haven't found someone doing specifically-what-i-want wrt. the jekyll style template thing unfortunately
2024-07-22 01:09:32 +0200 <dibblego> omentic: https://gitlab.com/system-f/systemf.com.au/ produces this: https://www.systemf.com.au/
2024-07-22 01:13:28 +0200gehmehgehgmg
2024-07-22 01:17:19 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2024-07-22 01:18:04 +0200gmg(~user@user/gehmehgeh)
2024-07-22 01:22:26 +0200 <omentic> dibblego: could you explain this line? https://gitlab.com/system-f/systemf.com.au/-/blob/master/hs/System/F/Rules.hs?ref_type=heads#L65
2024-07-22 01:23:00 +0200 <omentic> s/line/section ig
2024-07-22 01:24:02 +0200 <dibblego> that's matching basically everything under the "p" directory and applying templates
2024-07-22 01:24:10 +0200 <omentic> oh, ok nvm i understand what it's doing now
2024-07-22 01:24:29 +0200 <omentic> yeah i forgot hakyll like. doesn't explicitly pass around the pages
2024-07-22 01:24:34 +0200 <dibblego> the "ersa-current" and "charts-current" thing is because of having to produce a link to an external document where that link keeps changing
2024-07-22 01:24:58 +0200 <omentic> this is helpful though esp for what the Context actually looks like
2024-07-22 01:26:21 +0200 <omentic> hmmmm maybe Context does not have what i need it to have in there then... i wish i could print it out directly
2024-07-22 01:29:52 +0200 <omentic> dibblego: do you understand what metadataField, like, is? i'm really hoping it's the metadata from the Pandoc YAML stuff but idk how to find this out
2024-07-22 01:34:55 +0200lain`(lain`@user/lain/x-9874679) (Remote host closed the connection)
2024-07-22 01:35:50 +0200Midjak(~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep)
2024-07-22 01:39:46 +0200lain`(lain`@user/lain/x-9874679)
2024-07-22 01:40:08 +0200lain`(lain`@user/lain/x-9874679) (Remote host closed the connection)
2024-07-22 01:42:45 +0200Square2(~Square@user/square) (Ping timeout: 248 seconds)
2024-07-22 01:43:08 +0200lain`(lain`@user/lain/x-9874679)
2024-07-22 01:43:40 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 260 seconds)
2024-07-22 01:46:27 +0200CiaoSen(~Jura@2a05:5800:25c:2700:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds)
2024-07-22 01:46:49 +0200 <dibblego> omentic: vaguely, I haven't read the backlog... what are you tryna do?
2024-07-22 01:47:18 +0200 <dibblego> on a related note, any pandoc experts? https://gist.github.com/tonymorris/c2fd03e175e8da5493f1b4dbec29508c
2024-07-22 01:48:07 +0200 <omentic> dibblego: basically, i'm not sure what "metadata" refers to
2024-07-22 01:48:15 +0200 <omentic> i really wish pandoc had like single-line documentation
2024-07-22 01:48:38 +0200 <omentic> there's also this getMetadataField thing but idk if it is the YAML metadata at the top of items or what
2024-07-22 01:49:16 +0200 <dibblego> omentic: I found it helped to have it all loaded in a REPL, and to carefully watch the types change as I put it together. I generally forget the details immediately after I get it type-checking and working :)
2024-07-22 01:49:23 +0200 <omentic> haha
2024-07-22 01:49:49 +0200 <omentic> oh wait maybe i can print debug this
2024-07-22 01:50:52 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-07-22 01:51:27 +0200 <omentic> argh item is implicit b/c of hakyll's weird macro dsl. how do i grab this
2024-07-22 01:51:44 +0200 <c_wraith> the way Hakyll uses Item is mostly a design error anyway
2024-07-22 01:51:45 +0200 <haskellbridge> <thirdofmay18081814goya> been on twitter since i started following ml researchers
2024-07-22 01:51:49 +0200 <haskellbridge> <thirdofmay18081814goya> any haskellers worth followingf/
2024-07-22 01:51:53 +0200 <haskellbridge> <thirdofmay18081814goya> * following?
2024-07-22 01:56:15 +0200 <dibblego> I agree with design error in hakyll, there are lots imo
2024-07-22 01:56:55 +0200 <omentic> ok i am hitting a weird error
2024-07-22 01:57:19 +0200 <omentic> Ambiguous type variable ‘m0’ arising from a use of ‘getMetadataField’ prevents the constraint ‘(MonadMetadata m0)’ from being solved.
2024-07-22 01:58:21 +0200 <omentic> where abouts should i annotate something to fix this? it is arising from the following line: trace (show (getMetadataField (fromFilePath "about.html"))) ...
2024-07-22 01:59:05 +0200 <omentic> actually, hm. i should eat and then figure this out it is probably straightforward
2024-07-22 01:59:26 +0200 <omentic> ty all for all the help today
2024-07-22 01:59:31 +0200omentic(~apropos@104.193.135.206) (Quit: leaving)
2024-07-22 01:59:34 +0200aaronv(~aaronv@user/aaronv)
2024-07-22 02:11:18 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2024-07-22 02:12:50 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 260 seconds)
2024-07-22 02:17:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2024-07-22 02:19:15 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-07-22 02:29:00 +0200average(uid473595@user/average)
2024-07-22 02:31:29 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 02:34:05 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 02:44:20 +0200omentic(~apropos@104.193.135.206)
2024-07-22 03:10:17 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-07-22 03:19:06 +0200xff0x(~xff0x@2405:6580:b080:900:1ad7:bf8c:8156:7b85) (Ping timeout: 276 seconds)
2024-07-22 03:21:14 +0200xff0x(~xff0x@2405:6580:b080:900:4b6d:240e:ce3d:bc81)
2024-07-22 03:29:58 +0200m5zs7k(aquares@web10.mydevil.net) (Quit: m5zs7k)
2024-07-22 03:33:29 +0200m5zs7k(aquares@web10.mydevil.net)
2024-07-22 03:44:08 +0200phma(~phma@2001:5b0:212a:d468:e9b2:3bc1:1a12:92a8) (Read error: Connection reset by peer)
2024-07-22 03:52:20 +0200phma(phma@2001:5b0:212a:b4a8:c0ba:6a3a:cddf:dd85)
2024-07-22 04:00:45 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-07-22 04:08:30 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 276 seconds)
2024-07-22 04:10:03 +0200dysthesis(~dysthesis@user/dysthesis) (Remote host closed the connection)
2024-07-22 04:13:39 +0200 <omentic> hi all, i would like to call a function of type IO Bool in a case guard. what would the notation for this look like?
2024-07-22 04:15:30 +0200 <geekosaur> you can't, you call it before and use the result in the guard
2024-07-22 04:16:11 +0200 <omentic> it depends on the thing i'm matching on though
2024-07-22 04:16:18 +0200 <omentic> https://paste.sr.ht/~apropos/be0bc82b401ee0d1107d9a072c5c94ce52678e21
2024-07-22 04:16:31 +0200 <omentic> (this doesn't compile & has other issues but it's vaguely what i'm trying to do)
2024-07-22 04:18:19 +0200td_(~td@i53870911.versanet.de) (Ping timeout: 245 seconds)
2024-07-22 04:19:23 +0200 <geekosaur> yes, starting with the factthat `Compiler` doesn't have a `MonadIO` instance so you can't do `doesFileExist` at all
2024-07-22 04:19:56 +0200 <geekosaur> (yes, there is a backdoor. it doesn't do what you want and is free to give you garbage if you attempt it)
2024-07-22 04:20:19 +0200td_(~td@i53870938.versanet.de)
2024-07-22 04:21:08 +0200 <omentic> what should i be doing instead then? i think i need to perform IO in the match to check if the template path i'm matching on actually exists
2024-07-22 04:21:20 +0200 <omentic> (i know zero haskell for reference also)
2024-07-22 04:24:41 +0200 <geekosaur> I don't know Hakyll (I relied on hoogle to see what Compiler was) so I don't think I can give you a good answer
2024-07-22 04:25:41 +0200 <omentic> hmm, i might be able to check if the template exists from the context somehow
2024-07-22 04:26:12 +0200 <omentic> ok but so returning a type that does not have a MonadIO instance means you can't do any IO within the function?
2024-07-22 04:29:47 +0200 <geekosaur> yes
2024-07-22 04:36:22 +0200 <mauke> not technically true, but probably true enough
2024-07-22 04:36:55 +0200 <mauke> by which I mean I could define a type with a custom "embed IO action" operation without making it an instance of MonadIO
2024-07-22 04:37:37 +0200arahael(~arahael@119-18-1-21.771201.syd.nbn.aussiebb.net)
2024-07-22 04:42:45 +0200 <omentic> holy smokes my code compiled
2024-07-22 04:43:06 +0200 <omentic> ahaha yes fantastic
2024-07-22 04:43:36 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 04:43:39 +0200 <omentic> ok i didn't need to match against the guard at all, hakyll will catch invalid paths to templates and treat it as a user error
2024-07-22 04:43:46 +0200 <omentic> omg this works, wow
2024-07-22 04:44:54 +0200aaronv(~aaronv@user/aaronv) (Ping timeout: 276 seconds)
2024-07-22 04:45:59 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 04:48:52 +0200sympt(~sympt@user/sympt)
2024-07-22 04:52:13 +0200aaronv(~aaronv@user/aaronv)
2024-07-22 05:07:39 +0200aaronv(~aaronv@user/aaronv) (Ping timeout: 276 seconds)
2024-07-22 05:08:24 +0200aaronv(~aaronv@user/aaronv)
2024-07-22 05:22:18 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-07-22 05:45:42 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-07-22 05:50:14 +0200aaronv(~aaronv@user/aaronv) (Ping timeout: 260 seconds)
2024-07-22 05:59:14 +0200aforemny(~aforemny@i59F516C3.versanet.de)
2024-07-22 05:59:45 +0200aforemny_(~aforemny@2001:9e8:6cd3:7e00:62f7:f9a2:3af8:50bb) (Ping timeout: 260 seconds)
2024-07-22 06:09:46 +0200smalltalkman(uid545680@id-545680.hampstead.irccloud.com)
2024-07-22 06:16:42 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2024-07-22 06:17:04 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-07-22 06:17:15 +0200cpressey(~weechat@176.254.71.203) (Ping timeout: 260 seconds)
2024-07-22 06:17:38 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de)
2024-07-22 06:18:29 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 06:18:50 +0200euleritian(~euleritia@77.22.252.56)
2024-07-22 06:20:52 +0200euleritian(~euleritia@77.22.252.56) (Read error: Connection reset by peer)
2024-07-22 06:22:21 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 06:26:57 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 276 seconds)
2024-07-22 06:27:48 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de)
2024-07-22 06:33:11 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 06:33:29 +0200euleritian(~euleritia@77.22.252.56)
2024-07-22 06:42:55 +0200omentic(~apropos@104.193.135.206) (Quit: leaving)
2024-07-22 07:06:15 +0200tomku(~tomku@user/tomku) (Ping timeout: 260 seconds)
2024-07-22 07:06:28 +0200tomku(~tomku@user/tomku)
2024-07-22 07:09:57 +0200euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2024-07-22 07:15:32 +0200euphores(~SASL_euph@user/euphores)
2024-07-22 07:16:05 +0200tcard(~tcard@p5147008-ipxg23701hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 252 seconds)
2024-07-22 07:23:58 +0200Midjak(~MarciZ@82.66.147.146)
2024-07-22 07:30:28 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-07-22 07:32:30 +0200euleritian(~euleritia@77.22.252.56) (Read error: Connection reset by peer)
2024-07-22 07:33:15 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 07:37:39 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
2024-07-22 07:38:14 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de)
2024-07-22 07:38:35 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2024-07-22 07:45:09 +0200michalz(~michalz@185.246.207.221)
2024-07-22 07:47:17 +0200rosco(~rosco@121.120.69.219)
2024-07-22 07:49:54 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 07:50:12 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 07:53:37 +0200michalz(~michalz@185.246.207.221) (Quit: ZNC 1.9.0 - https://znc.in)
2024-07-22 07:56:24 +0200michalz(~michalz@185.246.207.221)
2024-07-22 08:03:35 +0200emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2024-07-22 08:14:52 +0200YoungFrog(~youngfrog@2a02:a03f:c9db:fc00:d73b:e7c2:b203:47a3) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in)
2024-07-22 08:15:12 +0200YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be)
2024-07-22 08:17:15 +0200chexum_(~quassel@gateway/tor-sasl/chexum)
2024-07-22 08:21:16 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Ping timeout: 260 seconds)
2024-07-22 08:34:57 +0200Midjak(~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep)
2024-07-22 08:37:09 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2024-07-22 08:38:07 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de)
2024-07-22 08:39:43 +0200sord937(~sord937@gateway/tor-sasl/sord937)
2024-07-22 08:39:43 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 08:41:57 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-07-22 08:45:02 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 08:47:46 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 08:53:17 +0200acidjnk(~acidjnk@p200300d6e72cfb694c86a1cb8ab41399.dip0.t-ipconnect.de)
2024-07-22 08:54:18 +0200ft(~ft@p3e9bc4e7.dip0.t-ipconnect.de) (Quit: leaving)
2024-07-22 09:12:18 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 09:14:09 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 09:16:47 +0200rosco(~rosco@121.120.69.219) (Quit: Lost terminal)
2024-07-22 09:50:42 +0200zetef(~quassel@2a02:2f00:5202:1200:3fa2:e908:b522:fa2f)
2024-07-22 09:50:54 +0200zetef(~quassel@2a02:2f00:5202:1200:3fa2:e908:b522:fa2f) (Client Quit)
2024-07-22 09:57:05 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2024-07-22 09:57:42 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-07-22 09:58:02 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2024-07-22 09:58:29 +0200Lord_of_Life_Lord_of_Life
2024-07-22 09:58:49 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03)
2024-07-22 10:02:56 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 10:03:14 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 10:03:14 +0200gmg(~user@user/gehmehgeh)
2024-07-22 10:09:17 +0200flounders(~flounders@2607:fb91:f01:d76e:1e66:42c0:b933:4f56)
2024-07-22 10:13:35 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Quit: see you soon)
2024-07-22 10:13:58 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2024-07-22 10:29:06 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 10:35:56 +0200pointlessslippe1(~pointless@212.82.82.3) (Ping timeout: 252 seconds)
2024-07-22 10:40:59 +0200pointlessslippe1(~pointless@212.82.82.3)
2024-07-22 10:44:25 +0200chele(~chele@user/chele)
2024-07-22 10:45:30 +0200chele(~chele@user/chele) (Client Quit)
2024-07-22 10:46:50 +0200chele(~chele@user/chele)
2024-07-22 10:58:39 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-07-22 10:59:18 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2024-07-22 11:00:18 +0200iteratee_(~kyle@162.218.222.207)
2024-07-22 11:02:14 +0200haetsal(~quassel@221.138.168.192) (Quit: No Ping reply in 180 seconds.)
2024-07-22 11:02:49 +0200iteratee(~kyle@162.218.222.207) (Ping timeout: 252 seconds)
2024-07-22 11:03:27 +0200haetsal(~quassel@221.138.168.192)
2024-07-22 11:10:37 +0200__monty__(~toonn@user/toonn)
2024-07-22 11:23:19 +0200Midjak(~MarciZ@82.66.147.146)
2024-07-22 11:37:30 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-07-22 11:37:47 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de)
2024-07-22 12:14:06 +0200cfricke(~cfricke@user/cfricke)
2024-07-22 12:19:20 +0200euleritian(~euleritia@dynamic-176-006-128-049.176.6.pool.telefonica.de) (Ping timeout: 252 seconds)
2024-07-22 12:20:00 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de)
2024-07-22 12:20:21 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 12:22:52 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de)
2024-07-22 12:23:35 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Ping timeout: 260 seconds)
2024-07-22 12:23:52 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 12:24:26 +0200sawilagar(~sawilagar@user/sawilagar)
2024-07-22 12:36:54 +0200phma(phma@2001:5b0:212a:b4a8:c0ba:6a3a:cddf:dd85) (Quit: Konversation terminated!)
2024-07-22 12:54:36 +0200lortabac(~lortabac@host-87-8-210-48.retail.telecomitalia.it)
2024-07-22 12:56:10 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Quit: Leaving)
2024-07-22 12:57:25 +0200tomku(~tomku@user/tomku) (Ping timeout: 260 seconds)
2024-07-22 12:57:40 +0200tomku(~tomku@user/tomku)
2024-07-22 13:07:01 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 13:09:38 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 13:12:53 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03) (Ping timeout: 248 seconds)
2024-07-22 13:15:20 +0200 <bwe> which currently maintained alternatives to acid-state exist in the Haskell world? I need to update and retrieve values for unique keys. the data does fit in memory.
2024-07-22 13:15:26 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 13:17:00 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 13:21:26 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds)
2024-07-22 13:22:59 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 13:24:29 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de)
2024-07-22 13:25:07 +0200CrunchyFlakes(~CrunchyFl@146.52.130.128)
2024-07-22 13:26:32 +0200CrunchyFlakes(~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer)
2024-07-22 13:29:08 +0200CrunchyFlakes(~CrunchyFl@146.52.130.128)
2024-07-22 13:30:02 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 13:34:08 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 13:35:58 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de)
2024-07-22 13:43:03 +0200 <haskellbridge> <mauke> sqlite
2024-07-22 13:45:35 +0200lortabac(~lortabac@host-87-8-210-48.retail.telecomitalia.it) (Quit: WeeChat 4.2.2)
2024-07-22 13:45:56 +0200 <Rembane> bwe: What about Data.Map.Strict or its hashmap-based variant? Could they fill the same need?
2024-07-22 13:46:58 +0200 <[exa]> Hey all, I'm trying to use Generic1 to make ToMyFormat1-style typeclasses automatically. Roughly following ToJSON1 from aeson, I'm hitting a problem where when processing Rec1 and Par1, it seems that the typesystem is unable to see that the type I'm processing is indeed the one that is supposed to go out. Is there any advice on that? I managed to make a small non-working example here:
2024-07-22 13:47:00 +0200 <[exa]> https://paste.tomsmeding.com/Bm5DMIGR
2024-07-22 13:48:10 +0200 <[exa]> The error is basically "Expected Par1 x -> a, got Par1 x -> x" which I assume that I'm either pushing not enough or too much type equality to there somewhere somehow
2024-07-22 13:49:07 +0200 <[exa]> btw the "data" in XYZ are kindof prolog-like clauses, something(this(), that()), etc.
2024-07-22 13:52:21 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 248 seconds)
2024-07-22 13:53:03 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542)
2024-07-22 13:55:38 +0200 <[exa]> bonus question that I guess is very related: what does the `x` in `
2024-07-22 13:55:40 +0200 <[exa]> class GToXYZ param rep out where gToXYZ :: param -> rep x -> out` (line 21) actually do
2024-07-22 13:57:50 +0200m1dnight(~christoph@82.146.125.185) (Quit: WeeChat 4.2.2)
2024-07-22 13:58:23 +0200 <bwe> Rembane: I'd like its simplicity. Question is how to persist it to disk?
2024-07-22 13:58:32 +0200m1dnight(~christoph@82.146.125.185)
2024-07-22 13:59:26 +0200 <bwe> <mauke> I am already using that; my concern now is to serialise and deserialise my haskell data structures to and from sqlite using selda.
2024-07-22 14:01:20 +0200 <Rembane> bwe: if you need persisting to disk then sqlite is a better fit
2024-07-22 14:02:08 +0200 <Lears> [exa]: IIRC that's been "reserved for future use" for years.
2024-07-22 14:02:29 +0200amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com) (Ping timeout: 245 seconds)
2024-07-22 14:03:47 +0200 <Lears> Mentioned here: https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-Generics.html#g:10
2024-07-22 14:05:07 +0200ph88(~ph88@2a02:8109:9e26:c800:c862:a391:c956:e9fa)
2024-07-22 14:06:25 +0200amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com)
2024-07-22 14:07:58 +0200ph88(~ph88@2a02:8109:9e26:c800:c862:a391:c956:e9fa) (Remote host closed the connection)
2024-07-22 14:09:12 +0200ph88(~ph88@2a02:8109:9e26:c800:8b04:e43e:ede4:7dfb)
2024-07-22 14:10:44 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 14:15:25 +0200Midjak(~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep)
2024-07-22 14:18:29 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 252 seconds)
2024-07-22 14:20:32 +0200ashemark(~nav@49.205.39.70)
2024-07-22 14:20:41 +0200RedFlamingos(~RedFlamin@user/RedFlamingos) (Quit: RedFlamingos)
2024-07-22 14:20:56 +0200 <ashemark> hi, all!
2024-07-22 14:22:35 +0200 <ashemark> i've been reading learnyouahaskell and what a beautiful book it is.. currently i'm stuck on chapter 9 after devouring the first 8 chapters in 2 days.. looks like i hit a brick wall.. how to get unstuck?
2024-07-22 14:23:59 +0200 <haskellbridge> <sm> what's ch 9 about ashemark
2024-07-22 14:24:50 +0200 <haskellbridge> <sm> and what's something specific you're stuck on ?
2024-07-22 14:27:46 +0200 <bwe> Rembane: Well, I fail currently with defining Bounded for (Maybe Text). Context: Defining SqlType in Selda.
2024-07-22 14:29:12 +0200 <ashemark> haskellbridge: chapter 9 is about input/output (actions) with streams etc..
2024-07-22 14:31:15 +0200 <bwe> ashemark: maybe just take a break and connect back with the enjoyment you had since to replenish your energy…
2024-07-22 14:31:44 +0200 <ashemark> bwe: thanks ! it's been a month since i finished the other chapters :( but i'll revisit again
2024-07-22 14:32:30 +0200 <bwe> ashemark: oh, I didn't know that; it sounded to me that you just did it the last 2 days…
2024-07-22 14:33:29 +0200 <haskellbridge> <thirdofmay18081814goya> is _Parallel and Concurrent Haskell_ still common practice for parallelism?
2024-07-22 14:34:25 +0200 <Rembane> bwe: That's interesting. How far do you get?
2024-07-22 14:35:23 +0200 <bwe> Rembane: not far. it works only for non GADT sum types like `data Color = Blue | Green | Red`
2024-07-22 14:36:01 +0200 <bwe> it doesn't work for `data Color = Blue Int | Green Double | Red`
2024-07-22 14:36:32 +0200 <bwe> it doesn't because it requires Enum and Bounded instances and Bounded isn't there for GADT
2024-07-22 14:36:33 +0200 <Rembane> bwe: Yeah, because that's what enums in SQL can represent
2024-07-22 14:36:54 +0200 <Rembane> bwe: ...what are you trying to do on a more high level?
2024-07-22 14:38:16 +0200 <jackdk> ashemark: I like B.Yorgey's explanation of how IO works. I'd be interested to know if it helps you: https://www.youtube.com/watch?v=4zrYRiTSWQo
2024-07-22 14:38:31 +0200dev2(~dev@2405:201:c062:8850:ae2f:b52b:21ba:40d5) (Ping timeout: 264 seconds)
2024-07-22 14:39:10 +0200 <bwe> I am searching through [Entry], which I need to update individually. Currently I create [Entry] on the fly. But that requires too much time for creating a REst API
2024-07-22 14:39:56 +0200 <bwe> And this `Entry` data structure is composed of other data structures, GADTs, etc.
2024-07-22 14:40:17 +0200 <bwe> I might consider to write it just to json and store it along an id to sqlite
2024-07-22 14:40:42 +0200 <Rembane> That sounds like a small step forward, it might become painful later, but sufficient for now.
2024-07-22 14:41:14 +0200 <bwe> assumption: I don't need Enum and Bounded in encoding / decoding to and from json.
2024-07-22 14:41:18 +0200 <bwe> Rembane: Why?
2024-07-22 14:42:01 +0200 <bwe> I did find the idea of acid-state appealing since I can just use my data structure as it is.
2024-07-22 14:43:36 +0200 <Rembane> bwe: Because indices etc don't work very well with json-blobs, and sql won't help you in the same way as it does when you have columns.
2024-07-22 14:45:43 +0200lortabac(~lortabac@host-87-8-210-48.retail.telecomitalia.it)
2024-07-22 14:47:56 +0200cfricke(~cfricke@user/cfricke)
2024-07-22 14:48:15 +0200 <[exa]> Lears: ok good to know, I hoped it would somewhat point me towards solving this issue because that was the last thing I was missing :D
2024-07-22 14:50:46 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2024-07-22 14:51:56 +0200 <bwe> Rembane: so the question is: should I change my data structure to fit into sql OR should I find a solution that just persists my data structure?
2024-07-22 14:52:08 +0200Square2(~Square@user/square)
2024-07-22 14:52:26 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 14:52:46 +0200 <bwe> I mean, Project M36 is the ultimate solution in terms of sane architecture.
2024-07-22 14:53:12 +0200 <Rembane> bwe: I would go for the sql version because I really like sql etc, but maybe it's less work to find something that could persist your existing data structures.
2024-07-22 14:53:29 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 14:53:50 +0200 <hadronized> GHC doesn’t have an extension to do DT typing, right?
2024-07-22 14:54:37 +0200 <hadronized> I lately had a look at Zig (completely irrelevant to Haskell / Idris) and was surprised that it could almost be the « perfect fit » for low-level, safe programming, but it lacks basically everything that would make it a safe modern language
2024-07-22 14:54:50 +0200 <hadronized> and I realized linear types and DT (which it almost has) would probably solve most of the problems
2024-07-22 14:54:58 +0200 <[exa]> by DT you mean Dependent Types right?
2024-07-22 14:54:58 +0200 <hadronized> I’m not really keen to go the ATS route…
2024-07-22 14:55:00 +0200 <hadronized> yes
2024-07-22 14:55:23 +0200 <hadronized> Zig doesn’t have DT, yet it can do crazy powerful things with comptime
2024-07-22 14:55:35 +0200 <hadronized> it’s like lifted DT (between comptime and types, instead of types and values)
2024-07-22 14:55:39 +0200 <[exa]> well you can do a lot of DT-like stuff, I guess the zig things should be doable mostly
2024-07-22 14:55:44 +0200 <[exa]> anything specific from zig?
2024-07-22 14:56:05 +0200 <hadronized> comptime mostly, like using a function as part of a type
2024-07-22 14:56:15 +0200 <bwe> Rembane: I have the feeling that going into the sql direction will end up in having to cut the data into different tables and reconstruct the data structure again once I load it…
2024-07-22 14:56:39 +0200 <bwe> Rembane: so, relational dbs are not at all relational; I need to do the relations manually…
2024-07-22 14:56:49 +0200 <Rembane> bwe: Yup
2024-07-22 14:56:49 +0200 <hadronized> for instance, a function that takes a string and return an array of N placeholders by counting the holes in the string
2024-07-22 14:56:52 +0200 <hadronized> that kind of stuff
2024-07-22 14:57:18 +0200 <hadronized> but Zig doesn’t have protection against UAF, against sUAF, it doesn’t have linear typing nor destructors so it’s super simple to leak memory
2024-07-22 14:57:20 +0200 <bwe> Rembane: fair enough yet still that will be detrimental to performance
2024-07-22 14:57:31 +0200 <bwe> Rembane: do you have experience with acid-state?
2024-07-22 14:57:49 +0200 <hadronized> [exa]: do you know any low-level language besides ATS with support of linear types and DT?
2024-07-22 14:58:05 +0200 <[exa]> hadronized: lots of this stuff is preprocessing and can be done with TH pretty nicely, or with Generics if you really want the thing to reflect on what the type inference thinks
2024-07-22 14:58:18 +0200 <[exa]> hadronized: not really tbh
2024-07-22 14:58:28 +0200 <hadronized> [exa]: that’s what is so surprising about Zig
2024-07-22 14:58:42 +0200average(uid473595@user/average) (Quit: Connection closed for inactivity)
2024-07-22 14:58:44 +0200 <hadronized> it doesn’t have macros, template-zig, generics; everything is comptime reflection
2024-07-22 14:58:56 +0200 <hadronized> which is probably the best of all worlds
2024-07-22 14:59:04 +0200 <hadronized> but the language is not modern in terms of protection
2024-07-22 14:59:14 +0200 <[exa]> (also "DT support" is smudgy usually. People confuse that with typelevel computation all times, at which point you might say c++ has dependent types)
2024-07-22 14:59:23 +0200 <hadronized> people lash out at Rust’s lifetimes “because too complex” but they are there for a good reason
2024-07-22 14:59:37 +0200 <hadronized> [exa]: no, I mean the same as Idris 2
2024-07-22 14:59:53 +0200 <hadronized> something that can reason on the values
2024-07-22 15:00:02 +0200 <hadronized> I remember a talk about LH that could do that
2024-07-22 15:00:08 +0200 <hadronized> it was during a ZuriHack IIRC
2024-07-22 15:00:26 +0200dev2(~dev@2405:201:c062:8850:44b5:cf88:3e8b:8a9d)
2024-07-22 15:00:35 +0200 <hadronized> but I guess refinement types ≠ DT
2024-07-22 15:03:31 +0200 <Rembane> bwe: I have not experience with acid-state. I usually do the whole normalization dance and put things in databases
2024-07-22 15:04:27 +0200 <bwe> Rembane: so, you would actually do the effort of deconstructing all of the data structure to put it into different tables only then to reconstruct it from there?
2024-07-22 15:05:03 +0200 <Rembane> bwe: Exactly!
2024-07-22 15:05:25 +0200bwelooks into TCache's examples: https://github.com/agocorona/TCache/blob/master/demos/indexQuery.hs -- it says it supports even indices
2024-07-22 15:06:09 +0200euleritian(~euleritia@dynamic-176-000-009-010.176.0.pool.telefonica.de) (Ping timeout: 252 seconds)
2024-07-22 15:06:59 +0200euleritian(~euleritia@dynamic-176-002-148-207.176.2.pool.telefonica.de)
2024-07-22 15:07:51 +0200 <[exa]> hadronized: btw the zig approach _is_ nice, might be an interesting experiment to just slap it on other languages
2024-07-22 15:08:02 +0200 <hadronized> what approach are you referring to?
2024-07-22 15:08:28 +0200 <hadronized> [exa]: Zig used to allow comptime mutation over containers; i.e. you could in theory implement your linear engine with it
2024-07-22 15:08:30 +0200 <hadronized> but they removed it
2024-07-22 15:08:48 +0200 <hadronized> the problem I have with Zig is that it’s a pretty new language, which has, at least to me, the wrong mantra
2024-07-22 15:08:57 +0200 <hadronized> it states that it’s safer than unsafe Rust, which is true
2024-07-22 15:09:14 +0200 <hadronized> but most of the Rust code one write is 99,9% of the time safe Rust
2024-07-22 15:09:20 +0200 <[exa]> yeah... let's go to #-offtopic though
2024-07-22 15:09:24 +0200 <hadronized> while with Zig, well, it’s 100% safer unsafe
2024-07-22 15:09:26 +0200 <hadronized> yeah.
2024-07-22 15:11:07 +0200cassiopea(~cassiopea@user/cassiopea)
2024-07-22 15:14:42 +0200 <probie> Zig's "general purpose allocator" detects use after free. That turns it into a runtime error, which certainly isn't as great as detecting it at compile time, but at least you won't end up with weird behaviour
2024-07-22 15:15:57 +0200ash3en(~Thunderbi@89.246.174.164)
2024-07-22 15:20:20 +0200ash3en(~Thunderbi@89.246.174.164) (Ping timeout: 260 seconds)
2024-07-22 15:24:19 +0200ystael(~ystael@user/ystael)
2024-07-22 15:25:03 +0200 <bwe> Rembane: there is https://github.com/thma/generic-persistence
2024-07-22 15:25:45 +0200 <bwe> but I haven't clarified for the more GADT support yet, at least the examples don't suggest that it's supporting GADTs
2024-07-22 15:26:13 +0200 <probie> I wonder if it'd be possible to abuse something ST-like to have block of code in Haskell where all data is allocated by a specific allocator. But allowing that would probably involve adding an "Allocator" argument to `BoxedRep`, which seems like it could be very messy
2024-07-22 15:26:41 +0200 <probie> especially since you'd want most types to be able to be polymorphic in their allocator
2024-07-22 15:27:15 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03)
2024-07-22 15:28:22 +0200lambdaDandy(~lambdaDan@84.245.120.100)
2024-07-22 15:28:57 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-07-22 15:30:56 +0200lambdaDandy(~lambdaDan@84.245.120.100) (Client Quit)
2024-07-22 15:31:25 +0200pure_sandals(~pure_sand@84.245.120.100)
2024-07-22 15:31:39 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
2024-07-22 15:31:47 +0200 <pure_sandals> good day to you fellow cabalists. anyone compiles to wasm here?
2024-07-22 15:32:52 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03) (Ping timeout: 252 seconds)
2024-07-22 15:33:31 +0200 <[exa]> pure_sandals: I wish I would
2024-07-22 15:33:48 +0200euleritian(~euleritia@dynamic-176-002-148-207.176.2.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 15:34:07 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 15:35:04 +0200 <probie> pure_sandals: The answer to your question is "yes", as long as you _don't_ mean from Haskell :p
2024-07-22 15:36:31 +0200 <pure_sandals> [exa]: that makes at least two of us
2024-07-22 15:36:47 +0200 <pure_sandals> probie: unfortunately that's what i mean
2024-07-22 15:37:29 +0200 <pure_sandals> this compiles nicely out of the box https://github.com/tweag/ghc-wasm-miso-examples
2024-07-22 15:37:38 +0200 <pure_sandals> but i want to depend on other packages
2024-07-22 15:37:46 +0200 <pure_sandals> and they don't play along so nicely
2024-07-22 15:38:41 +0200 <probie> What happens?
2024-07-22 15:39:37 +0200 <pure_sandals> this https://github.com/tweag/ghc-wasm-miso-examples/issues/17
2024-07-22 15:40:02 +0200 <pure_sandals> wasm-ld: error: unable to find library -lHSrts-1.0.2_thr
2024-07-22 15:40:02 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 15:40:28 +0200 <pure_sandals> i assume threaded runtime is not available on wasm backend? am I reading that correctly?
2024-07-22 15:40:50 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 15:43:17 +0200ash3en(~Thunderbi@89.246.174.164)
2024-07-22 15:45:41 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 15:47:36 +0200 <probie> I think that's what the docs imply; "Do keep in mind that we’re using the single-threaded runtime at the moment, so other than supporting re-entrancy, safe C calls don’t offer extra advantage than unsafe."
2024-07-22 15:48:20 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 252 seconds)
2024-07-22 15:50:06 +0200 <probie> However, even without that issue, I'm sceptical of whether the `entropy` package is going to work at all.
2024-07-22 15:51:08 +0200 <ashemark> jackdk: thank you!!
2024-07-22 15:52:15 +0200ashemark(~nav@49.205.39.70) (Quit: leaving)
2024-07-22 15:57:22 +0200 <pure_sandals> hmm, I assumed threaded code would get somehow emulated in a single thread - i think i saw stm package compiled to wasm somewhere..guess it's not that straightforward
2024-07-22 15:57:30 +0200 <pure_sandals> nice find, thanks
2024-07-22 15:57:41 +0200cfricke(~cfricke@user/cfricke)
2024-07-22 15:57:43 +0200 <pure_sandals> why do you think it would not work at all?
2024-07-22 15:57:51 +0200 <pure_sandals> entropy can compile to javascript backend
2024-07-22 15:58:16 +0200 <pure_sandals> so i assumed compiling it to wasm would be a breeze as well
2024-07-22 16:02:48 +0200 <probie> Because it has a lot of CPP-shenanigans going on to choose the appropriate "backend" for the target platform. Without that, it defaults to the "generic unix" backend, which tries to read `/dev/urandom`, which it won't be able to find
2024-07-22 16:03:20 +0200tram(~tram@2a02:587:b43:7300:a89e:683a:2da1:a2ed)
2024-07-22 16:03:31 +0200 <pure_sandals> (y)
2024-07-22 16:04:11 +0200 <probie> If you were to fork entropy and update it so that it chooses the same choices for the wasm backend as it does for ghcjs, it might "just work", since jsaddle works
2024-07-22 16:04:54 +0200 <haskellbridge> <thirdofmay18081814goya> how do I figure out what to import in cabal in order to have "Control.Parallel.Strategies" work?
2024-07-22 16:05:25 +0200 <pure_sandals> indeed, i went down this rabbit hole for a while but ran into other problems, with some imports if i remember correctly...and all this time i was not even sure if what i am doing is not going to break something else
2024-07-22 16:06:18 +0200 <pure_sandals> oh well, i better ask entropy "owner" to do it for me
2024-07-22 16:09:51 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 16:09:55 +0200misterfish(~misterfis@84.53.85.146) (Quit: leaving)
2024-07-22 16:10:17 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 16:10:29 +0200misterfish(~misterfis@84.53.85.146) (Client Quit)
2024-07-22 16:11:23 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 16:11:25 +0200misterfish(~misterfis@84.53.85.146) (Client Quit)
2024-07-22 16:11:33 +0200 <pure_sandals> thirdofmay18081814goya: https://hoogle.haskell.org/?hoogle=Control.Parallel.Strategies
2024-07-22 16:12:23 +0200 <pure_sandals> how does on reply to these "bridge messages" correctly?
2024-07-22 16:12:39 +0200 <haskellbridge> <thirdofmay18081814goya> ah i never realized hoogle listed the package name itself, ty
2024-07-22 16:12:44 +0200 <pure_sandals> probie: anyway, thanks for help! (y)
2024-07-22 16:13:01 +0200 <haskellbridge> <thirdofmay18081814goya> pure_sandals: (i received the reply properly as if matrix-native)
2024-07-22 16:13:15 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 16:13:16 +0200 <pure_sandals> thirdofmay18081814goya: cool (y)
2024-07-22 16:13:45 +0200misterfish(~misterfis@84.53.85.146) (Client Quit)
2024-07-22 16:14:45 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 16:14:59 +0200misterfish(~misterfis@84.53.85.146) (Client Quit)
2024-07-22 16:15:29 +0200misterfish(~misterfis@84.53.85.146)
2024-07-22 16:17:01 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 16:21:11 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Remote host closed the connection)
2024-07-22 16:21:42 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 16:23:29 +0200 <tram> Is there an elegant way to `findIndex` and if it's Just n do a function on that element of the list and return Just (index, resultOfFunAtThatIndex)?
2024-07-22 16:24:56 +0200 <tram> I was trying something like ` second (fmap (f . (list!!))) $ join (,) $ findIndex predicate list `, but it uses (!!), which kind of misses the point, and also I don't know how to (Maybe a, Myabe b) -> Maybe (a, b)
2024-07-22 16:25:39 +0200 <tram> (I'm a beginer sorry if it's bad question)
2024-07-22 16:27:08 +0200 <jackdk> tram: sounds specific enough that I would probably write it out by hand
2024-07-22 16:27:27 +0200 <danse-nr3> i guess you could zip with [0..] and write the find yourself to avoid accessing the list twice
2024-07-22 16:27:36 +0200 <jackdk> `Maybe a -> Maybe b -> Maybe (a, b)` is `liftA2 (,)` though, FWIW
2024-07-22 16:27:50 +0200 <Lears> :t \f i -> fmap (id &&& f) . findIndex i
2024-07-22 16:27:51 +0200 <lambdabot> (Int -> c') -> (a -> Bool) -> [a] -> Maybe (Int, c')
2024-07-22 16:27:55 +0200 <danse-nr3> :t find
2024-07-22 16:27:56 +0200 <lambdabot> Foldable t => (a -> Bool) -> t a -> Maybe a
2024-07-22 16:28:13 +0200 <danse-nr3> :t zip [0..]
2024-07-22 16:28:14 +0200 <lambdabot> (Num a, Enum a) => [b] -> [(a, b)]
2024-07-22 16:28:31 +0200 <xerox> :t uncurry (liftA2 (,))
2024-07-22 16:28:32 +0200 <lambdabot> Applicative f => (f a, f b) -> f (a, b)
2024-07-22 16:29:22 +0200 <danse-nr3> :t \f -> fmap (second f) . find
2024-07-22 16:29:23 +0200 <lambdabot> error:
2024-07-22 16:29:23 +0200 <lambdabot> • Couldn't match type ‘Maybe a’ with ‘(d, b)’
2024-07-22 16:29:23 +0200 <lambdabot> Expected type: (a -> Bool) -> t a -> (d, b)
2024-07-22 16:29:53 +0200 <pure_sandals> write it explicitly in a do block
2024-07-22 16:29:54 +0200 <danse-nr3> :t \f p -> fmap (second f) . find p
2024-07-22 16:29:54 +0200 <lambdabot> Foldable t => (b -> c) -> ((d, b) -> Bool) -> t (d, b) -> Maybe (d, c)
2024-07-22 16:30:43 +0200 <danse-nr3> :t \f p -> fmap (second f) . find p . zip [0..]
2024-07-22 16:30:44 +0200 <lambdabot> (Num a, Enum a) => (b -> c) -> ((a, b) -> Bool) -> [b] -> Maybe (a, c)
2024-07-22 16:30:56 +0200 <int-e> ... find (p . snd) ...
2024-07-22 16:31:15 +0200 <danse-nr3> cheers
2024-07-22 16:31:22 +0200 <danse-nr3> :t \f p -> fmap (second f) . find (p . snd) . zip [0..]
2024-07-22 16:31:23 +0200 <lambdabot> (Num a, Enum a) => (b -> c) -> (b -> Bool) -> [b] -> Maybe (a, c)
2024-07-22 16:32:15 +0200 <danse-nr3> personally i would group the find . zip but leave the fmap to the callers
2024-07-22 16:32:32 +0200bsima(~bsima@2604:a880:400:d0::19f1:7001) (So long, and thanks for all the fish.)
2024-07-22 16:35:19 +0200 <probie> :t \f p -> ($ 0) . foldr (\x k n -> if p x then Just (n, f x) else k $! n + 1) (const Nothing)
2024-07-22 16:35:20 +0200 <lambdabot> (Num a, Foldable t1) => (t2 -> b) -> (t2 -> Bool) -> t1 t2 -> Maybe (a, b)
2024-07-22 16:35:29 +0200 <tram> This is alot to unpack:P
2024-07-22 16:35:29 +0200 <tram> @xerox : uncurry (liftA2 (,)) is nice!
2024-07-22 16:35:29 +0200 <tram> @ danse-nr3 : thanks! for some reason I was not thinking of zipping...
2024-07-22 16:35:29 +0200 <lambdabot> Unknown command, try @list
2024-07-22 16:35:54 +0200 <danse-nr3> v
2024-07-22 16:37:19 +0200 <probie> <bad advice>Just use `foldr`. It solves 90% of problems involving lists</bad advice>
2024-07-22 16:38:28 +0200 <pure_sandals> \list i f -> findIndex i list >>= \idx -> pure (idx, f (list !! idx))
2024-07-22 16:38:57 +0200 <danse-nr3> they said they don't like the !!, understandably
2024-07-22 16:40:00 +0200 <pure_sandals> fair play
2024-07-22 16:41:01 +0200 <tram> for some reason I feel like it's good avoiding to write list twice... (not sure if there is a good reason). I'm going with zipping: danse-nr3's \f p -> fmap (second f) . find (p . snd) . zip [0..]
2024-07-22 16:41:55 +0200 <danse-nr3> well i understand that, it introduces an unnecessary potential error, and types would tell you...
2024-07-22 16:41:58 +0200 <danse-nr3> :t (!!)
2024-07-22 16:41:59 +0200 <lambdabot> [a] -> Int -> a
2024-07-22 16:42:07 +0200 <danse-nr3> if we were a bit more careful about safety
2024-07-22 16:42:32 +0200 <pure_sandals> do
2024-07-22 16:42:33 +0200 <pure_sandals> idx <- findIndex i list
2024-07-22 16:42:33 +0200 <pure_sandals> x <- list !? idx
2024-07-22 16:42:34 +0200 <pure_sandals> pure (idx, f x)
2024-07-22 16:42:44 +0200 <pure_sandals> don't bother with zips and whatnot - nobody can read that
2024-07-22 16:42:57 +0200ash3en(~Thunderbi@89.246.174.164) (Ping timeout: 252 seconds)
2024-07-22 16:43:22 +0200 <pure_sandals> it's a simple do block in a Maybe monad
2024-07-22 16:43:59 +0200 <probie> But involves walking the list twice which is "bad"
2024-07-22 16:44:33 +0200 <pure_sandals> right
2024-07-22 16:44:35 +0200 <pure_sandals> then
2024-07-22 16:44:48 +0200 <pure_sandals> there is no need for findIndex anyway
2024-07-22 16:45:00 +0200 <tram> yes that is what I was doing but I felt bad using both `findIndex` and ` (!?) `, when they kind of overlap in what they do
2024-07-22 16:45:04 +0200 <pure_sandals> do
2024-07-22 16:45:04 +0200 <pure_sandals> x <- list !? idx
2024-07-22 16:45:04 +0200 <pure_sandals> pure (idx, f x)
2024-07-22 16:45:23 +0200 <tram> oh yes!
2024-07-22 16:45:41 +0200 <pure_sandals> wait no you don't know the index :D
2024-07-22 16:45:50 +0200 <tram> hahaha
2024-07-22 16:45:53 +0200 <tram> yes
2024-07-22 16:51:09 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03)
2024-07-22 17:02:00 +0200 <pure_sandals> welp then i guess off you go, zipping, foldring and &&&ing '=D
2024-07-22 17:06:09 +0200 <probie> or you could `foldr` :p
2024-07-22 17:07:23 +0200rosco(~rosco@14.191.221.176)
2024-07-22 17:07:41 +0200 <pure_sandals> yop, that's what i meant by foldring
2024-07-22 17:10:14 +0200CrunchyFlakes(~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer)
2024-07-22 17:12:26 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 17:21:46 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2024-07-22 17:22:19 +0200lortabac(~lortabac@host-87-8-210-48.retail.telecomitalia.it) (Quit: WeeChat 4.2.2)
2024-07-22 17:27:07 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 17:30:41 +0200ThePenguin(~ThePengui@cust-95-80-24-166.csbnet.se) (Quit: Ping timeout (120 seconds))
2024-07-22 17:31:00 +0200ThePenguin(~ThePengui@cust-95-80-24-166.csbnet.se)
2024-07-22 17:32:41 +0200ash3en(~Thunderbi@89.246.174.164)
2024-07-22 17:33:34 +0200ash3en(~Thunderbi@89.246.174.164) (Client Quit)
2024-07-22 17:37:15 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2024-07-22 17:46:15 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2024-07-22 17:48:50 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-07-22 17:50:30 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 17:51:06 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 4.2.2)
2024-07-22 17:52:46 +0200chele(~chele@user/chele) (Remote host closed the connection)
2024-07-22 18:04:58 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 18:06:13 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03) (Ping timeout: 248 seconds)
2024-07-22 18:19:48 +0200tv(~tv@user/tv) (Quit: derp)
2024-07-22 18:20:11 +0200tv(~tv@user/tv)
2024-07-22 18:20:14 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 255 seconds)
2024-07-22 18:32:43 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Ping timeout: 252 seconds)
2024-07-22 18:41:37 +0200billchenchina-(~billchenc@118.38.173.226)
2024-07-22 18:41:51 +0200sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2024-07-22 18:45:33 +0200rosco(~rosco@14.191.221.176) (Quit: Lost terminal)
2024-07-22 18:46:48 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 18:55:25 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-07-22 18:56:22 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2024-07-22 18:58:05 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Remote host closed the connection)
2024-07-22 18:58:36 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 19:00:37 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Read error: Connection reset by peer)
2024-07-22 19:01:41 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds)
2024-07-22 19:01:49 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 19:10:44 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds)
2024-07-22 19:11:30 +0200dunj3(~dunj3@kingdread.de) (Quit: ZNC 1.8.2+deb2+deb11u1 - https://znc.in)
2024-07-22 19:23:00 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 19:23:36 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-07-22 19:28:11 +0200pure_sandals49(~pure_sand@84.245.120.100)
2024-07-22 19:31:59 +0200pure_sandals(~pure_sand@84.245.120.100) (Ping timeout: 256 seconds)
2024-07-22 19:37:44 +0200billchenchina-(~billchenc@118.38.173.226) (Ping timeout: 272 seconds)
2024-07-22 19:38:22 +0200billchenchina-(~billchenc@118.38.173.226)
2024-07-22 19:39:20 +0200 <kqr> I have a field deeply nested in a thing, and I happen to be retrieving it with lenses. I.e. `thing^.some.levels.down :: [a]`. Now I also have a function f :: a -> b which I would like to apply to all elements of this list. I can extract the list with lenses and then map it separately, but I would like to learn how to map it within the world of optics. I initially tried appending `.traverse.to f`
2024-07-22 19:39:23 +0200 <kqr> but that doesn't work because Traversal and Getter are on separate branches of the abstraction tree.
2024-07-22 19:42:15 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-07-22 19:42:52 +0200euleritian(~euleritia@dynamic-176-006-136-124.176.6.pool.telefonica.de)
2024-07-22 19:43:19 +0200 <jle`> kqr: yeah in that case you wouldn't get the list, you'd get each individual thing
2024-07-22 19:43:31 +0200 <jle`> kqr: if it makes sense in your case, you can use toListOf instead
2024-07-22 19:43:42 +0200 <jle`> then you'd target every item, and then assemble those into a list
2024-07-22 19:43:58 +0200 <jle`> `thing ^.. some . levels . down . traversed . to f` should work i think
2024-07-22 19:44:36 +0200 <jle`> (^..) being toListOf
2024-07-22 19:47:51 +0200 <ncf> or thing ^. some . levels . down . to (map f)
2024-07-22 19:49:06 +0200dostoyevsky2(~sck@user/dostoyevsky2) (Quit: leaving)
2024-07-22 19:49:20 +0200dostoyevsky2(~sck@user/dostoyevsky2)
2024-07-22 19:50:26 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 19:50:40 +0200lain`(lain`@user/lain/x-9874679) (Remote host closed the connection)
2024-07-22 19:51:20 +0200 <kqr> Ah, both interesting options. Thank you. I had forgot entirely about ^.. as a toListOf. to (map f) was clever also.
2024-07-22 19:53:20 +0200 <pure_sandals49> what happened to good old "%~". Is that not enough?
2024-07-22 19:53:35 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-07-22 19:53:49 +0200lain`(lain`@user/lain/x-9874679)
2024-07-22 19:55:04 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 19:55:06 +0200ash3en(~Thunderbi@2a03:7846:b6eb:101:7abc:9971:7960:b2c8)
2024-07-22 19:55:13 +0200 <jle`> pure_sandals49: that would get the original structure back i think
2024-07-22 19:55:36 +0200 <pure_sandals49> thing & some . levels . down %~ fmap f
2024-07-22 19:55:56 +0200 <c_wraith> you can use mapped to move the fmapping to the lens side
2024-07-22 19:55:58 +0200 <pure_sandals49> i don't have a fired up REPL so I am just shooting in the air here
2024-07-22 19:56:04 +0200 <jle`> yeah that would give you something of the type of thing
2024-07-22 19:56:24 +0200 <jle`> > (1,[2,3,4]) & _2 %~ fmap negate
2024-07-22 19:56:25 +0200 <lambdabot> (1,[-2,-3,-4])
2024-07-22 19:56:38 +0200 <jle`> > (1,[2,3,4]) ^. _2 . fmap negate
2024-07-22 19:56:40 +0200 <lambdabot> error:
2024-07-22 19:56:40 +0200 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_112342’
2024-07-22 19:56:40 +0200 <lambdabot> • In the expression: e_112342
2024-07-22 19:56:47 +0200 <jle`> > (1,[2,3,4]) ^. _2 . to (fmap negate)
2024-07-22 19:56:48 +0200 <lambdabot> [-2,-3,-4]
2024-07-22 19:57:14 +0200 <jle`> i like the to (map f) better than toListOf because it doesn't have to reconstruct the list via mappends
2024-07-22 19:57:34 +0200 <pure_sandals49> oh so he does not want to reconstruct the structure after?
2024-07-22 19:57:40 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Read error: Connection reset by peer)
2024-07-22 19:57:57 +0200danse-nr3(~danse-nr3@user/danse-nr3)
2024-07-22 19:58:12 +0200 <pure_sandals49> if not, then what's the point of doing it "with lenses" then?
2024-07-22 19:58:23 +0200 <jle`> the original question explains it a bit
2024-07-22 19:58:42 +0200 <jle`> "I can extract the list with lenses and then map it separately, but I ..."
2024-07-22 20:00:31 +0200 <pure_sandals49> then i would say there's no point doing it with optics. it's just confusing
2024-07-22 20:00:42 +0200 <pure_sandals49> why use a spaceship when you can use a toothpick
2024-07-22 20:00:53 +0200 <jle`> it's an exercise for learning
2024-07-22 20:01:52 +0200 <pure_sandals49> OK, but then it's learning something which you should never use '=D
2024-07-22 20:03:13 +0200 <jle`> it's playing around and developing an intuition about how to, traversals, getters, etc. fit together
2024-07-22 20:03:43 +0200 <jle`> and also healthy curiosity?
2024-07-22 20:05:26 +0200 <jle`> most of my haskell learning has been playing around with interesting concepts just to see how they fit together and interact with each other
2024-07-22 20:05:42 +0200 <EvanR> I find it amusing any time someone wastes time on chatrooms opining on the time cost of learning something
2024-07-22 20:06:00 +0200 <EvanR> that would better be used learning something
2024-07-22 20:06:23 +0200pure_sandals(~pure_sand@84.245.120.100)
2024-07-22 20:06:30 +0200 <jle`> especially haskell is probably the language where the culture encourages playing around and tinkering with new concepts the most, as opposed to directly going to something useful
2024-07-22 20:07:25 +0200 <EvanR> haskell started out as a platform for experimentation, more standardized than lazy functional of the week
2024-07-22 20:07:31 +0200 <monochrom> Just be ready to face the possibility that after you have learned it, you now see why you should never use it.
2024-07-22 20:07:52 +0200 <EvanR> that's 99.999% of everything I ever learned xD
2024-07-22 20:08:03 +0200 <EvanR> the rest being what I learned in kindergarten
2024-07-22 20:08:10 +0200 <EvanR> :tm:
2024-07-22 20:08:15 +0200pure_sandals49(~pure_sand@84.245.120.100) (Ping timeout: 256 seconds)
2024-07-22 20:08:51 +0200 <jle`> learning haskell is 90% just doing stuff for the fun of it heh
2024-07-22 20:09:11 +0200 <monochrom> What I see though is the human nature of the sunk cost policy: Since I spent weeks and $5000 to get my Microsoft Windows certification, I must now recommend everyone to install Windows!
2024-07-22 20:09:56 +0200ph88(~ph88@2a02:8109:9e26:c800:8b04:e43e:ede4:7dfb) (Quit: Leaving)
2024-07-22 20:10:04 +0200 <pure_sandals> jle`: sure, i don't want to argue against tinkering. Just don't use it in a team project :D
2024-07-22 20:10:06 +0200 <monochrom> Or: I spent years grokking C++, therefore I must defend it with my life for the rest of my life!
2024-07-22 20:10:41 +0200 <EvanR> teams are dragging me down!
2024-07-22 20:10:56 +0200 <EvanR> forcing me to use the dumbest as nails tech
2024-07-22 20:11:20 +0200 <EvanR> don't use good stuff or we won't be able to hire your replacement
2024-07-22 20:11:20 +0200pure_sandals(~pure_sand@84.245.120.100) (Quit: Client closed)
2024-07-22 20:11:36 +0200pure_sandals(~pure_sand@84.245.120.100)
2024-07-22 20:12:16 +0200tomku(~tomku@user/tomku) (Ping timeout: 252 seconds)
2024-07-22 20:12:29 +0200tomku(~tomku@user/tomku)
2024-07-22 20:12:35 +0200 <pure_sandals> most of valuable software is not doable in a one person team (too much work)
2024-07-22 20:12:55 +0200 <pure_sandals> thus, some coding style and clarity is required when you write code, so others can pick it up easily
2024-07-22 20:13:09 +0200 <EvanR> that contradicts me experience in the remote work market
2024-07-22 20:13:19 +0200 <pure_sandals> how so?
2024-07-22 20:13:25 +0200 <monochrom> Yeah that cuts both ways.
2024-07-22 20:13:42 +0200 <EvanR> one person created this valuable, likely steaming pile ecommerce site
2024-07-22 20:13:52 +0200 <EvanR> one person can keep it running while it earns infinite money
2024-07-22 20:14:34 +0200 <EvanR> granted that's 1 more person than it should require
2024-07-22 20:15:14 +0200 <EvanR> code style and clarity almost certainly nil
2024-07-22 20:16:12 +0200 <monochrom> I have coding style and clarify for my own sake already.
2024-07-22 20:16:46 +0200 <monochrom> But why are we talking about that again?
2024-07-22 20:18:21 +0200 <pure_sandals> To explain why using a toothpick is better than using a spaceship if it gets the job done
2024-07-22 20:18:22 +0200 <pure_sandals> :D
2024-07-22 20:18:46 +0200 <monochrom> Eww
2024-07-22 20:18:56 +0200 <pure_sandals> brother ewwwwww!
2024-07-22 20:18:59 +0200 <monochrom> A whole team of 10 people sharing the same toothpick?!
2024-07-22 20:19:01 +0200 <monochrom> Eww
2024-07-22 20:19:07 +0200 <monochrom> What's wrong with you
2024-07-22 20:19:41 +0200 <pure_sandals> saving the planet bro
2024-07-22 20:19:46 +0200 <pure_sandals> lolz
2024-07-22 20:19:55 +0200 <monochrom> OK that works.
2024-07-22 20:21:12 +0200 <EvanR> is the toothpick C programming because that is absurd enough to get behind
2024-07-22 20:21:26 +0200 <monochrom> shell scripts
2024-07-22 20:21:58 +0200 <EvanR> that's beyond the pale
2024-07-22 20:22:24 +0200 <pure_sandals> toothpick is reasonable use of optics library, spaceship is esoteric use
2024-07-22 20:22:48 +0200 <dolio> This methodology is completely meaningless.
2024-07-22 20:23:05 +0200 <pure_sandals> why so?
2024-07-22 20:23:45 +0200 <dolio> 'Reasonable' and 'esoteric' aren't definable.
2024-07-22 20:24:21 +0200 <pure_sandals> Fine. Engineer and over-engineer then
2024-07-22 20:24:52 +0200 <monochrom> Sometimes I question the 0th premise that one has deeply nested records of ... of records in the first place. Like we mentioned the other way, why not go relational instead. (The DB people already did decades ago.)
2024-07-22 20:26:12 +0200 <dolio> Those are also very context sensitive.
2024-07-22 20:26:30 +0200 <monochrom> Yeah I know, hence "sometimes".
2024-07-22 20:28:23 +0200 <bwe> is there some way to search through the irc logs of this channel easily?
2024-07-22 20:29:00 +0200 <monochrom> I don't know of one.
2024-07-22 20:29:01 +0200 <dolio> Sometimes you 'don't overengineer,' then you later find out your 'engineering' wasn't adequate.
2024-07-22 20:29:30 +0200 <monochrom> But I make my own logs and I search my own logs instead.
2024-07-22 20:29:49 +0200 <bwe> oh, I might have those, too :)
2024-07-22 20:29:59 +0200 <pure_sandals> dolio: that's when you refactor
2024-07-22 20:30:01 +0200 <dolio> Because software often isn't as predictable as engineering problems.
2024-07-22 20:30:31 +0200danse-nr3(~danse-nr3@user/danse-nr3) (Quit: Leaving)
2024-07-22 20:30:34 +0200 <monochrom> But I seldom want/need to search unless I'm looking for someone who was banned and they somehow showed up again and I need to widen the ban. :)
2024-07-22 20:30:36 +0200 <pure_sandals> dolio: it's called refactoring - something Haskell is the best language for
2024-07-22 20:36:12 +0200RedFlamingos(~RedFlamin@user/RedFlamingos)
2024-07-22 20:45:01 +0200pure_sandals(~pure_sand@84.245.120.100) (Quit: Client closed)
2024-07-22 20:45:16 +0200pure_sandals(~pure_sand@84.245.120.100)
2024-07-22 20:45:21 +0200 <haskellbridge> <sm> smalltalk is pretty nice for it too
2024-07-22 20:47:23 +0200 <haskellbridge> <sm> @bwe: if you join the Haskell IRC matrix room that's bridged here, maybe it'll let you search history since the bridge was set up
2024-07-22 20:49:06 +0200 <haskellbridge> <sm> and https://ircbrowse.tomsmeding.com/browse/lchaskell is the actual archive, maybe you can search that with a search engine
2024-07-22 20:49:54 +0200 <haskellbridge> <sm> why is it lchaskell, I wonder
2024-07-22 20:49:56 +0200 <pure_sandals> sm: is it? I never tried it. But looking back at when I worked with OO languages, now after working with Haskell I am asking myself if there is any point to OO?
2024-07-22 20:50:30 +0200tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net)
2024-07-22 20:51:00 +0200 <c_wraith> depends on how you define OO. If it's "values with the same type but open behavior", then yes, it's still important.
2024-07-22 20:51:07 +0200 <haskellbridge> <sm> "OO" means a lot of different things. There's definitely a lot to learn from smalltalk & co.
2024-07-22 20:51:39 +0200 <haskellbridge> <sm> and the experienced OO writers
2024-07-22 20:52:04 +0200 <haskellbridge> <sm> * experience and writings from the OO world
2024-07-22 20:53:18 +0200 <EvanR> theory of objects can't be denied if for no other reason than the trisquirclehedron graphic on the cover
2024-07-22 20:53:45 +0200 <monochrom> :)
2024-07-22 20:56:26 +0200Inst(~Inst@user/Inst) (Remote host closed the connection)
2024-07-22 20:56:36 +0200 <pure_sandals> c_wraith: same type but different behaviour? Interesting, in Haskell types don't have any behaviour. Can you think of any example to demonstrate value of types with different behaviour?
2024-07-22 20:56:48 +0200 <c_wraith> pure_sandals: functions do
2024-07-22 20:57:25 +0200 <pure_sandals> those are values
2024-07-22 20:57:30 +0200 <c_wraith> pure_sandals: It's a relatively common pattern to pack up a set of functions into a record to provide a uniform interface with open behavior.
2024-07-22 20:58:22 +0200 <c_wraith> along with a monomorphic type, so you can store collections of them together
2024-07-22 21:00:08 +0200 <pure_sandals> okay, when i think about OO I think about inheritance, encapsulation, overriding methods and hell like this in general. I think about Java classes basically
2024-07-22 21:00:32 +0200 <pure_sandals> clearly your definition is much broader
2024-07-22 21:01:06 +0200 <pure_sandals> what I meant originally is what is the point of progamming software around clases
2024-07-22 21:01:06 +0200 <bwe> pure_sandals: did you have a look at Pharo?
2024-07-22 21:02:23 +0200 <EvanR> pure_sandals, record of functions, possibly recursive in type can emulate object oriented programming
2024-07-22 21:02:29 +0200 <c_wraith> pure_sandals: https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent
2024-07-22 21:02:57 +0200 <EvanR> overriding can technically be done in that case by making a new type building on the old one, but it is very cumbersome
2024-07-22 21:03:44 +0200 <EvanR> but as soon as you start with the monkey patching OOP swerved off the mountainside imo
2024-07-22 21:04:11 +0200 <mauke> I'll patch your monkey
2024-07-22 21:04:54 +0200 <EvanR> monkey is a tetrapod, can you patch it to change the number of limbs?
2024-07-22 21:05:10 +0200 <EvanR> liskov would like a word
2024-07-22 21:06:10 +0200 <monochrom> haha
2024-07-22 21:06:23 +0200skyesoss1(~Thunderbi@128.135.204.35)
2024-07-22 21:10:05 +0200 <pure_sandals> bwe: nope not yet. what would you say is better about it, compared to Haskell?
2024-07-22 21:10:44 +0200 <bwe> hot code reloading
2024-07-22 21:10:57 +0200 <bwe> I didn't try it
2024-07-22 21:11:01 +0200 <pure_sandals> I understand how records can be seen as objects, when you have function types inside
2024-07-22 21:11:13 +0200 <mauke> "C++: an octopus made by nailing extra legs onto a dog."
2024-07-22 21:11:17 +0200ft(~ft@p3e9bc4e7.dip0.t-ipconnect.de)
2024-07-22 21:12:20 +0200 <Hecate> jesus christ
2024-07-22 21:12:56 +0200 <pure_sandals> so OOP is more like a style of programming I get it. In Java it's the only style
2024-07-22 21:13:28 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 21:13:32 +0200 <EvanR> OOP became mainly a section at the barnes and noble bookstore
2024-07-22 21:13:57 +0200 <pure_sandals> :D
2024-07-22 21:14:09 +0200 <EvanR> which doesn't include smalltalk or cardelli's theory of objects
2024-07-22 21:14:26 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 21:14:37 +0200 <EvanR> but we know better!
2024-07-22 21:15:26 +0200 <EvanR> today the legacy of that can still be seen in the elixir community
2024-07-22 21:15:49 +0200 <geekosaur> and objective-c to some extent
2024-07-22 21:16:01 +0200 <geekosaur> although I think that's dying out now
2024-07-22 21:19:20 +0200 <pure_sandals> mauke: shots fired
2024-07-22 21:24:33 +0200 <monochrom> Actually I s/paradigm/style/ too.
2024-07-22 21:38:24 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 21:38:54 +0200euleritian(~euleritia@dynamic-176-006-136-124.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-22 21:39:13 +0200euleritian(~euleritia@ip5f5ad3d7.dynamic.kabel-deutschland.de)
2024-07-22 21:40:28 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 21:41:25 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-07-22 21:43:41 +0200gorignak(~gorignak@user/gorignak)
2024-07-22 22:03:06 +0200tjbc(~tjbc@user/fliife) (Quit: ZNC 1.8.2 - https://znc.in)
2024-07-22 22:04:47 +0200tjbc(~tjbc@user/fliife)
2024-07-22 22:07:22 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 22:11:47 +0200pure_sandals(~pure_sand@84.245.120.100) (Ping timeout: 256 seconds)
2024-07-22 22:12:02 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com)
2024-07-22 22:18:07 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 22:20:43 +0200JuanDaugherty(~juan@user/JuanDaugherty)
2024-07-22 22:21:12 +0200Midjak(~MarciZ@82.66.147.146)
2024-07-22 22:21:33 +0200omentic(~apropos@104.193.135.206)
2024-07-22 22:24:26 +0200ash3en(~Thunderbi@2a03:7846:b6eb:101:7abc:9971:7960:b2c8) (Quit: ash3en)
2024-07-22 22:24:34 +0200euleritian(~euleritia@ip5f5ad3d7.dynamic.kabel-deutschland.de) (Ping timeout: 245 seconds)
2024-07-22 22:25:46 +0200euleritian(~euleritia@dynamic-176-006-136-124.176.6.pool.telefonica.de)
2024-07-22 22:27:44 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
2024-07-22 22:29:49 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 22:34:32 +0200smiesner(b0cf5acf8c@user/smiesner) (Remote host closed the connection)
2024-07-22 22:35:19 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 22:43:29 +0200AlexZenon(~alzenon@94.233.241.102) (Ping timeout: 260 seconds)
2024-07-22 22:48:40 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-07-22 22:51:15 +0200CrunchyFlakes(~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
2024-07-22 22:53:38 +0200AlexZenon(~alzenon@94.233.241.102)
2024-07-22 23:04:21 +0200AlexZenon(~alzenon@94.233.241.102) (Ping timeout: 248 seconds)
2024-07-22 23:12:18 +0200AlexZenon(~alzenon@94.233.241.102)
2024-07-22 23:14:23 +0200michalz(~michalz@185.246.207.221) (Quit: ZNC 1.9.0 - https://znc.in)
2024-07-22 23:14:53 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03)
2024-07-22 23:15:45 +0200tomku(~tomku@user/tomku) (Ping timeout: 276 seconds)
2024-07-22 23:15:58 +0200tomku(~tomku@user/tomku)
2024-07-22 23:17:08 +0200AlexZenon(~alzenon@94.233.241.102) (Ping timeout: 252 seconds)
2024-07-22 23:18:07 +0200gorignak(~gorignak@user/gorignak) (Quit: quit)
2024-07-22 23:18:08 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 272 seconds)
2024-07-22 23:19:39 +0200CiaoSen(~Jura@2a05:5800:2b1:f200:e6b9:7aff:fe80:3d03) (Ping timeout: 260 seconds)
2024-07-22 23:20:48 +0200AlexZenon(~alzenon@94.233.241.102)
2024-07-22 23:31:53 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 23:32:05 +0200misterfish(~misterfis@84.53.85.146) (Ping timeout: 248 seconds)
2024-07-22 23:36:29 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-22 23:36:43 +0200tram(~tram@2a02:587:b43:7300:a89e:683a:2da1:a2ed) (Quit: Leaving.)
2024-07-22 23:39:01 +0200tram(~tram@94.71.169.62)
2024-07-22 23:39:01 +0200krei-se(~krei-se@p5085d24b.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2024-07-22 23:41:06 +0200krei-se(~krei-se@p5085de4b.dip0.t-ipconnect.de)
2024-07-22 23:45:07 +0200JuanDaugherty(~juan@user/JuanDaugherty) (Quit: JuanDaugherty)
2024-07-22 23:47:21 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-22 23:57:18 +0200byte(~byte@149.28.222.189) (Remote host closed the connection)
2024-07-22 23:57:46 +0200byte(~byte@149.28.222.189)