Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,391 events total
2021-08-23 17:58:31 <fresheyeball> cpp-options: -DTEST
2021-08-23 17:58:36 <fresheyeball> in the suite is all that is needed
2021-08-23 17:58:41 <fresheyeball> but I wish it was built in
2021-08-23 18:00:20 <aegon> https://stackoverflow.com/questions/30026843/haskell-data-instance-for-opaque-data-type found this for opaque types but having trouble finding things on passing / parsing structs across the ffi
2021-08-23 18:02:29 pbrisbin joins (~patrick@174-081-116-011.res.spectrum.com)
2021-08-23 18:02:30 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
2021-08-23 18:03:28 Erutuon joins (~Erutuon@user/erutuon)
2021-08-23 18:04:06 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-08-23 18:04:07 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-08-23 18:04:07 wroathe joins (~wroathe@user/wroathe)
2021-08-23 18:05:16 <pavonia> aegon: Have you read the wiki page on the FFI? https://wiki.haskell.org/Foreign_Function_Interface#Marshalling_data
2021-08-23 18:05:52 <aegon> pavonia: nope, and that looks like it has everything i'm pondering spelled out
2021-08-23 18:06:23 neo joins (~neo3@cpe-292712.ip.primehome.com)
2021-08-23 18:07:04 fendor_ is now known as fendor
2021-08-23 18:08:17 × Adran quits (adran@botters/adran) (Quit: Este é o fim.)
2021-08-23 18:08:28 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2021-08-23 18:10:38 Adran joins (~adran@botters/adran)
2021-08-23 18:10:47 defanor joins (~defanor@tart.uberspace.net)
2021-08-23 18:14:22 × keutoi quits (~keutoi@223.238.95.231) (Quit: leaving)
2021-08-23 18:15:27 <maerwald> do we have some fuzzy function/class to determine if a list is null-ish? like ["", ""]
2021-08-23 18:15:31 × drd quits (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) (Ping timeout: 250 seconds)
2021-08-23 18:15:57 <maerwald> I'm not striving for clear semantics, since the input isn't
2021-08-23 18:16:16 <monochrom> I think no one has thought of it before.
2021-08-23 18:16:51 × azeem quits (~azeem@176.201.15.223) (Read error: Connection reset by peer)
2021-08-23 18:17:28 <monochrom> My understanding is that this is a job more suitable for humans, in particular some of my weaker students who conflate 0, the empty set, the empty list, and the non-empty list that contains the non-empty set that contains the empty list.
2021-08-23 18:18:15 vysn joins (~vysn@user/vysn)
2021-08-23 18:18:52 azeem joins (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it)
2021-08-23 18:19:07 <monochrom> s/weaker/very weak/
2021-08-23 18:19:36 <maerwald> I can imagine this working with a class that just gets called recursively. As with `Default`, of course it's subject to heavy abuse
2021-08-23 18:20:27 <monochrom> If you ever codify something into code, then unless there is non-determinism, you will end up with one clear semantics.
2021-08-23 18:20:51 <monochrom> This is why for fuzzy things I would refer to weak humans.
2021-08-23 18:21:51 <maerwald> you mean plug in your students neural network into my binary?
2021-08-23 18:22:09 <aegon> maerwald: imo that type of problem points to bad data parsing / sanitizing, I'm trying to think of a place where this would be benificial to do in the middle of a computation as apposed to during injestion. If it's happening in the middle of a computation couldn't you use Maybe to signify possible failure or some other thing to be more explicit about the meaning of "nullish"
2021-08-23 18:22:33 <maerwald> aegon: yes, I don't control the data
2021-08-23 18:22:35 <monochrom> For example I wouldn't be against a simple recursive algorithm "is_nullish xs = every element of xs is_nullish". At the same time, I have zero confidence that this agrees with your user's expectation.
2021-08-23 18:23:16 <aegon> maerwald: can you sanity check it at the IO layer where your consuming it? in that case you could write the sanity check into the parser
2021-08-23 18:23:38 <maerwald> aegon: why would I sanity check? I want to accept as much junk as possible
2021-08-23 18:23:54 <aegon> why do you want junk?
2021-08-23 18:23:58 <maerwald> this is about supporting as many curl versions as possible and their funky output
2021-08-23 18:24:33 betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be)
2021-08-23 18:24:49 <maerwald> so I'm doing half-assed parsing, not proper parsing
2021-08-23 18:26:38 <maerwald> the real fix would have been to use `--suppress-connect-headers`, but of course, not all versions have it
2021-08-23 18:29:21 <[exa]> maerwald: what about `not . any isAlphaNum . show` ? (might save time)
2021-08-23 18:30:04 <[exa]> (counter-example: `map (flip replicate "" . ord) "oh hello there"`)
2021-08-23 18:30:22 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
2021-08-23 18:30:54 <maerwald> yeah, for my use case T.stripEnd is enough with a later filter on `not . null`
2021-08-23 18:32:23 × juri_ quits (~juri@178.63.35.222) (Remote host closed the connection)
2021-08-23 18:33:12 <maerwald> until a new curl version does something new :p
2021-08-23 18:33:25 <[exa]> \o/
2021-08-23 18:33:41 <maerwald> wget seems much more stable
2021-08-23 18:33:44 <maerwald> although a lot slower too
2021-08-23 18:34:05 <[exa]> wget's got some internal machinery to make stuff faster, you can pipe URLs to it
2021-08-23 18:34:39 <maerwald> wget performs REALLY bad with etags
2021-08-23 18:34:46 <[exa]> whats etags
2021-08-23 18:35:07 <maerwald> https://en.wikipedia.org/wiki/HTTP_ETag
2021-08-23 18:35:27 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
2021-08-23 18:36:07 <maerwald> compare: wget -q -S --header 'If-None-Match: "612388b3-1bc72"' https://www.haskell.org/ghcup/data/ghcup-0.0.6.yaml
2021-08-23 18:36:17 <maerwald> curl -H 'If-None-Match: "612388b3-1bc72"' https://www.haskell.org/ghcup/data/ghcup-0.0.6.yaml
2021-08-23 18:36:25 × sim590 quits (~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 252 seconds)
2021-08-23 18:36:27 <maerwald> curl is twice as fast
2021-08-23 18:36:32 <maerwald> at least here
2021-08-23 18:37:56 <[exa]> hm interesting, right ~600ms curl vs ~800 for wget here
2021-08-23 18:38:08 <maerwald> curl is 480ms here
2021-08-23 18:38:24 <[exa]> +- a lot, σ~=100ms I'd say
2021-08-23 18:38:32 <maerwald> but noticable
2021-08-23 18:38:43 <[exa]> what does Dr. Strace say?
2021-08-23 18:39:23 <maerwald> he's too chatty :p
2021-08-23 18:41:29 <[exa]> well let's see actually, I'm interested
2021-08-23 18:41:50 <[exa]> chances are that wget is doing something for free for some vaguely userfriendly reason
2021-08-23 18:43:27 × Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds)
2021-08-23 18:44:28 <maerwald> wouldn't be surprised if it makes a full download and then decides to show 304
2021-08-23 18:44:51 <maerwald> but that's quick to test
2021-08-23 18:45:57 × derelict quits (~derelict@user/derelict) (Quit: WeeChat 3.2)
2021-08-23 18:46:45 <maerwald> doesn't seem so... I'm also having vastly different timings to downloads.haskell.org compared to www.haskell.org
2021-08-23 18:46:56 × frtdlteo^ quits (~frtdlteo@12.16.129.111) (Remote host closed the connection)
2021-08-23 18:47:04 lavaman joins (~lavaman@98.38.249.169)
2021-08-23 18:48:03 <[exa]> so, wget loads faster by like 20ms here
2021-08-23 18:49:40 <maerwald> comparsion: wget -q -S --header 'If-None-Match: "61140ad8-3cbea20"' https://downloads.haskell.org/~ghcup/0.1.16.2/aarch64-apple-darwin-ghcup-0.1.16.2
2021-08-23 18:49:43 sim590 joins (~simon@modemcable090.207-203-24.mc.videotron.ca)
2021-08-23 18:49:45 <maerwald> this finishes in 200ms here
2021-08-23 18:49:59 <maerwald> seems like a configuration issue
2021-08-23 18:50:12 <maerwald> both should be cached
2021-08-23 18:54:29 <[exa]> strace says the difference is really just in waiting for the replies from the server, guess there's something ugly in the headers
2021-08-23 18:57:19 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
2021-08-23 18:57:37 × hrdl quits (~hrdl@mail.hrdl.eu) (Ping timeout: 248 seconds)
2021-08-23 18:57:46 × maerwald quits (~maerwald@user/maerwald) (Quit: gone)
2021-08-23 18:57:51 hrdl joins (~hrdl@mail.hrdl.eu)
2021-08-23 18:58:02 Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net)
2021-08-23 18:58:04 maerwald joins (~maerwald@mail.hasufell.de)
2021-08-23 18:58:21 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2021-08-23 18:58:32 chexum joins (~quassel@gateway/tor-sasl/chexum)
2021-08-23 18:58:36 × lisq quits (~quassel@lis.moe) (Remote host closed the connection)
2021-08-23 18:58:54 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 244 seconds)
2021-08-23 18:59:18 × maerwald quits (~maerwald@mail.hasufell.de) (Changing host)
2021-08-23 18:59:18 maerwald joins (~maerwald@user/maerwald)
2021-08-23 18:59:32 ChaiTRex joins (~ChaiTRex@user/chaitrex)
2021-08-23 18:59:44 <maerwald> [exa]: odd
2021-08-23 18:59:45 lisq joins (~quassel@lis.moe)
2021-08-23 19:00:38 <[exa]> maerwald: curl uses http/2
2021-08-23 19:02:10 × jacks2 quits (~bc8167eb@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))

All times are in UTC.