kvda has quit [Read error: Connection reset by peer]
pioneer42 has joined #ocaml
cbot has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
jbrown has joined #ocaml
Jesin has joined #ocaml
moei has joined #ocaml
pierpal has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 268 seconds]
shinnya has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
silver has quit [Read error: Connection reset by peer]
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 248 seconds]
pierpal has joined #ocaml
mfp has quit [Ping timeout: 264 seconds]
mrvn has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
pierpa has quit [Quit: Page closed]
tormen_ has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
tormen has quit [Ping timeout: 264 seconds]
picolino has quit [Ping timeout: 264 seconds]
picolino has joined #ocaml
picolino has quit [Ping timeout: 244 seconds]
picolino has joined #ocaml
unyu has quit [Quit: The end of the world is nigh. Bring as much popcorn as you can!]
unyu has joined #ocaml
hdon has quit [Ping timeout: 264 seconds]
hdon has joined #ocaml
hdon has quit [Ping timeout: 244 seconds]
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
mbuf has joined #ocaml
tarptaeya has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
sveit has quit [Ping timeout: 276 seconds]
jerith has quit [Ping timeout: 276 seconds]
dinosaure has quit [Ping timeout: 276 seconds]
shakalaka_ has quit [Ping timeout: 276 seconds]
clockish has quit [Ping timeout: 276 seconds]
nullifidian_ has quit [Ping timeout: 276 seconds]
_habnabit has quit [Ping timeout: 276 seconds]
sheijk has quit [Ping timeout: 276 seconds]
cow-orker has quit [Ping timeout: 276 seconds]
gtrak has quit [*.net *.split]
picolino has quit [*.net *.split]
mrvn has quit [*.net *.split]
pioneer42 has quit [*.net *.split]
_whitelogger has joined #ocaml
nullifidian_ has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GreyFaceNoSpace has joined #ocaml
mcspud has joined #ocaml
xa0 has joined #ocaml
wickedshell has joined #ocaml
Geekingfrog has joined #ocaml
lynn has joined #ocaml
adi_____ has joined #ocaml
jeroud has joined #ocaml
leah2 has joined #ocaml
bjs has joined #ocaml
chenglou has joined #ocaml
mattg has joined #ocaml
banjiewen has joined #ocaml
dx has joined #ocaml
sspi__ has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
reynir has quit [Quit: WeeChat 2.1]
letoh has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
hdon has joined #ocaml
tarptaeya has quit [Ping timeout: 240 seconds]
hdon has quit [Ping timeout: 265 seconds]
tarptaeya has joined #ocaml
tarptaeya has quit [Remote host closed the connection]
sagotch has joined #ocaml
tarptaeya has joined #ocaml
tarptaeya has quit [Ping timeout: 260 seconds]
tarptaeya_ has joined #ocaml
hdon has joined #ocaml
TarVanimelde has joined #ocaml
jao has joined #ocaml
tarptaeya_ has quit [Remote host closed the connection]
tarptaeya_ has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
freyr69 has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jerith_ is now known as jerith
reynir has quit [Quit: reboot...]
kakadu has joined #ocaml
reynir has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
dhil has joined #ocaml
Haudegen has joined #ocaml
xa0 has quit [Excess Flood]
xa0 has joined #ocaml
kvda has joined #ocaml
hdon has quit [Ping timeout: 244 seconds]
argent_smith has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
yaewa has joined #ocaml
moei has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
<Leonidas>
hmm, how can I build a function which has the same behaviour as Printf.sprintf with taking a number of arguments but then postprocess the result? I tried https://gist.github.com/Leonidas-from-XIV/ef1d7e931c7bc1a28fe239a6e1916c7e but it only works as long as I use a single argument, `hest "foo"` works but more complicated format strings don't.
<octachron>
aka the continuation version of sprintf: the first argument of ksprintf is the continuation called after all arguments of sprintf have been processed
<companion_cube>
Leonidas: sooner or later you'll want Format.kfprintf ;-)
<Leonidas>
the proliferation of prefix letters to printf reminds me of erratique libraries ;-)
<companion_cube>
it makes a lot of sense though
<companion_cube>
`k` for `kontinuation` (weird, but classic), `f` for `fprintf`, the generalist version
pierpal has joined #ocaml
<Drup>
Leonidas: Fmt.{pf,pr,pe,kpf} ?
<Drup>
"f" is for "format, actually
<Drup>
as in "this version works on a formatter"
<companion_cube>
or it's just to be consistent with fprintf… come on
<Drup>
:p
tarptaeya_ has quit [Quit: Konversation terminated!]
<Leonidas>
companion_cube: what does the `a` in `asprintf` stand for?
<companion_cube>
"actually (correct)"
dhil has quit [Ping timeout: 264 seconds]
<companion_cube>
it's just that `sprintf` was wrong…
<companion_cube>
(the signature wasn't general enough)
<Leonidas>
yeah, `k` I am aware of. I was very confused about some code in a compiler until I realized I could use continuations there which solved the problem in a nice way.
<Drup>
Leonidas: "a" is just "fuck, we made "s" the version wrong, let's add a random letter before the "s""
* Leonidas
:D
<Drup>
(that's why it's just Fmt.strf, not astrf)
<reynir>
"ahh shit printf"
<companion_cube>
Format.kfprintf is incredibly useful for debug/log stuff
zolk3ri has joined #ocaml
steenuil_ is now known as steenuil
<steenuil>
ah, so the k was for continuation
<companion_cube>
it's relatively common, afaict
<companion_cube>
I've been using `k` for continuations quite often, as well
<steenuil>
it's the metasyntactic variable (I think that's the name) that's generally used for continuations, yeah
<steenuil>
I just never linked it to kprintf
<Leonidas>
I am not sure `i` and `k` would be considered metasyntactic variables
<Drup>
k definitely is definitely the common choice for continuations
<companion_cube>
the kommon choice
mfp has joined #ocaml
tarptaeya has joined #ocaml
ben_____ has joined #ocaml
<dmbaturin>
KKKK (Kall with Kurrent Kontinuation Klan ;)
<dmbaturin>
Seriously though, I still wonder how this orthographic mutation happened.
<reynir>
c was already used for the constant for the speed of light in vacuum
* reynir
ducks
<companion_cube>
I think it's indeed that `c` is not unique enough
mk9 has joined #ocaml
<dmbaturin>
But there are no *cprintf functions.
silver has joined #ocaml
Fardale has quit [Ping timeout: 260 seconds]
mk9 has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
mk9 has joined #ocaml
tobiasBora has quit [Ping timeout: 244 seconds]
tarptaeya has quit [Ping timeout: 256 seconds]
tarptaeya_ has joined #ocaml
tarptaeya_ is now known as tarptaeya
dhil has joined #ocaml
ryyppy has joined #ocaml
andrewalker has joined #ocaml
jao has joined #ocaml
<ZirconiumX>
reynir: so what happens when you use OCaml on a warp drive? Do you need ftlprintf?
Fardale has joined #ocaml
tobiasBora has joined #ocaml
<Drup>
"k" is really old though
<Drup>
the usage as metavariable for continuations is more than 30/40 years old
ryyppy has quit [Read error: Connection reset by peer]
<companion_cube>
ZirconiumX: :D
<ZirconiumX>
You're welcome
mk9 has quit [Quit: mk9]
sagotch has quit [Ping timeout: 240 seconds]
<reynir>
Drup: Do you think maybe the origin could have been from German or some other language?
<Drup>
reynir: that was my first instinct, but no
<Drup>
the german word is completely different, and nobody uses it
<Drup>
(dixit germans)
<reynir>
I think I would say "kontinuering" in Danish if I for whatever reason wasn't using the English word :)
<hannes>
Drup: would you have a minute or two to look into this 4.07+mirage failure (due to include module type of struct include Functoria_key.Arg end) ?
<Leonidas>
reynir: I'd have thought people would say fortsætte, just like in german.
<reynir>
oh yea, fortsættelse
letoh has joined #ocaml
ryyppy has joined #ocaml
<rgr[m]>
kakadu: congrats on the dune port of lablqml
DrWhax_ has joined #ocaml
DrWhax has quit [Quit: leaving]
DrWhax_ is now known as DrWhax
FreeBirdLjj has joined #ocaml
<ELLIOTTCABLE>
hm. I need to produce a sorted container from the contents of a Hashtbl
hdon has quit [Ping timeout: 264 seconds]
<ELLIOTTCABLE>
i’ve dug through Core and the stdlib a bit, and it looks like i don’t really have any series of builtins to make this easy? tentatively about to basically 1. manually build the equivalent of `Hashtbl.to_array` with a for-loop and refcel (ugh), 2. sort over that array a few times to obtain the lexicographic sort i need, and 3. `Array.to_list` said sorted array
<ELLIOTTCABLE>
can’t help feeling like some of this should be something i find, not write
<ELLIOTTCABLE>
:+1: for all the polymorphics in the stdlib to be moved under Yolo
_andre has joined #ocaml
<ELLIOTTCABLE>
any particular reason Containers wouldn't be JavaScript-friendly? (I'm workin' in Bucklescript here)
<Drup>
ELLIOTTCABLE: containers is javascript friendly
<companion_cube>
it should be js friendly, but maybe not BS-friendly
* ELLIOTTCABLE
nods
<companion_cube>
because BS doesn't like Format, or something like that…
<ELLIOTTCABLE>
god knows if anything is BS friendly -_-
hdon has joined #ocaml
<Drup>
companion_cube: do they really remove it from the stdlib or simply advise not to use it ?
<ELLIOTTCABLE>
I can feel a ranty blogpost approaching in my intermediate distance, more with every passing day
aciniglio has joined #ocaml
<companion_cube>
Drup: I think that's the part they initially forked containers to remove
<companion_cube>
didn't like the pretty printers
<companion_cube>
nowadays I have no idea if it works but bloats, or if it fails
<ELLIOTTCABLE>
or "companion-cube" because I’m a megalomaniac lolololol
<companion_cube>
?
<Drup>
ELLIOTTCABLE: fwiw, the belt library (that is pretty much standard, iirc) is a fork of containers
<ELLIOTTCABLE>
companion_cube: in your README
<ELLIOTTCABLE>
Drup: news to me. possibly excellent news.
<octachron>
Drup, they stronly advise to not use Format and recommand BS's broken string interpolation mechanism
<companion_cube>
ahhh the readme, it's been a while
<companion_cube>
Format might be slow on JS, tho, I have no idea
<ELLIOTTCABLE>
man where the hell *is* Belt, Google's got nothing
mk9 has quit [Quit: mk9]
<companion_cube>
it's a medieval instrument
<Drup>
ELLIOTTCABLE: it's an aggressive heavily modified fork, though
<companion_cube>
type-safety belt
<companion_cube>
yeah, they prefer UglyCase
<companion_cube>
oops()
mk9 has joined #ocaml
<reynir>
how is it broken?
<Drup>
companion_cube: I think Format leads to very unidiomatic js code :3
<Drup>
(I doub't it's very unneficient, also the code bloat might be significant)
<companion_cube>
yeah…
<octachron>
reynir, BS string interpolation? It is essentially untyped (e.g. it expands variants to their memory representation) and the variable syntax only works on identifier and not expressions
<reynir>
oh
<Drup>
(I have to refrain myself in this conversation to not answer "that is bullshit" every 3 sentences)
mk9 has quit [Quit: mk9]
<companion_cube>
just use "this is BS"
<companion_cube>
ambiguity will be in the eye of the reader
ryyppy has quit [Quit: Lost terminal]
xa0 has quit [Ping timeout: 244 seconds]
<reynir>
heh
xa0 has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
hdon has quit [Changing host]
hdon has joined #ocaml
dhil has joined #ocaml
be_______ has quit []
eagleflo_ is now known as eagleflo
gtrak has joined #ocaml
DrWhax has quit [Quit: leaving]
jbrown has quit [Quit: Leaving]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
dhil has quit [Ping timeout: 245 seconds]
<freyr69>
How to define a module with `type t = Supermodule.t`?
<freyr69>
type t = t does not work, since the compiler considers it recursive
<companion_cube>
type nonrec t = t
<companion_cube>
or `type t_ = t` followed by `type t = t_`
<companion_cube>
ugly, but has worked for a long time
<freyr69>
Oh, thanks
shinnya has quit [Ping timeout: 248 seconds]
xa0 has quit [Excess Flood]
<discord>
<Perry> I didn't know about "nonrec"
<companion_cube>
it's relatively new (a few versions?)
xa0 has joined #ocaml
freyr69 has quit [Remote host closed the connection]
<discord>
<octachron> 4.02.2 so three years ago
<companion_cube>
oh, that old? neat
<discord>
<Perry> I really wish the manual was better. I'm happy working on it personally but I feel a bit burned. 😦
<discord>
<Perry> Probably my own fault.
<octachron>
Perry, if you want to remove the taste of your last manual PR, I have some work-to-be-done on my manual todo list which should go without a hitch
mbuf has quit [Quit: Leaving]
<discord>
<Perry> I wouldn't mind. Send me some email to coordinate it.
FreeBirdLjj has joined #ocaml
dhil has joined #ocaml
<octachron>
Perry, done.
mbuf has joined #ocaml
GreyFaceNoSpace has quit [Quit: Ex-Chat]
kakadu has quit [Quit: Konversation terminated!]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
FreeBirdLjj has quit [Remote host closed the connection]
<ELLIOTTCABLE>
`Warning: 4 states have an end-of-stream conflict.` and `Warning: production doc -> rev_records is never reduced.` (the main production)
tarptaeya has quit [Quit: Konversation terminated!]
<Leonidas>
there is no `never` in Lwt which would never resolve?
dhil has quit [Ping timeout: 245 seconds]
<flux[m]>
surely there must be.. ?
<zozozo>
ELLIOTTCABLE: there should probably be an EOF after "it" at line 12 of the parser
malina has joined #ocaml
cow-orke1 has quit [Remote host closed the connection]
<ELLIOTTCABLE>
zozozo: I thought that would be consumed by the rev_records case
<ELLIOTTCABLE>
did I screw that recursive declaration up?
<ELLIOTTCABLE>
line 18
<ELLIOTTCABLE>
| rest = rev_records; re = record; NL { re :: rest }
<ELLIOTTCABLE>
| (* base-case: empty *) { [] }
<ELLIOTTCABLE>
| rest = rev_records; re = record; EOF { re :: rest }
<zozozo>
yeah, just saw that, but somehow, I'd expect the EOF te be in the "doc" declaration
<zozozo>
notably because your current rules allow multiple EOF tokens in the same file, :p
<zozozo>
also, shouldn't the NL token occur beetween the rev_recors and the record in the rules ?
vadeen has joined #ocaml
vadeen has quit [Client Quit]
Han has joined #ocaml
<ELLIOTTCABLE>
zozozo: I was matching the position of the EOF
<ELLIOTTCABLE>
i.e., recursively, a record is <other terminated records> followed by a new record terminated in a newline, or followed by a new record terminated by EOF
<zozozo>
right, maybe I'm too used to going the other direction when parsing lists
<zozozo>
anyway, having EOF inside a list of records seems weird
<zozozo>
and probably the reason why you have a conflict: how does the parser know when to stop aprsing a list ? since the rev_records list can continue after the EOF token
jbrown has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 240 seconds]
<discord>
<Perry> ELLIOTCABLE: have you read the Menhir manual? It explains end of stream conflicts.
ygrek has joined #ocaml
<discord>
<Perry> (The manual is very good. It's important to read...)
<Leonidas>
if I understand correctly, cohttp does not support multipart/form-data, does it?
<Leonidas>
hannes: I am looking for the creation part of it, but that's nice, a place I can contribute what I would write anyway
<hannes>
Leonidas: do I understand correctly, this is the server side, and you need the client side?
<Leonidas>
hannes: exactly
<Leonidas>
it is not very hard though, which is probably why the cryptosense library doesn't do it
<hannes>
I'd assume they'd be happy to accept a PR which implements the client side as well (it should be nice for e.g. testing to shortcut server parser and client unparser)
<Leonidas>
yep!
<Leonidas>
fortunately this particular project uses Lwt :|
<Leonidas>
this split is so annoying
picolino has quit [Ping timeout: 240 seconds]
octarin has joined #ocaml
picolino has joined #ocaml
picolino has quit [Ping timeout: 245 seconds]
picolino has joined #ocaml
cow-orker has joined #ocaml
Han has left #ocaml [#ocaml]
malina has quit [Ping timeout: 276 seconds]
yomimono has joined #ocaml
jack5638 has quit [Ping timeout: 244 seconds]
jack5638 has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
zolk3ri has quit [Ping timeout: 260 seconds]
kakadu has joined #ocaml
zolk3ri has joined #ocaml
jnavila has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
malina has joined #ocaml
ben_____ has joined #ocaml
ben_____ has quit [Client Quit]
pierpa has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<ELLIOTTCABLE>
I did! Cover to cover! I seem to have forgotten just about everything, though -_-
<dmbaturin>
ELLIOTTCABLE: The home-made CSV parser?
<ELLIOTTCABLE>
taking a look now — but I didn't think the end-of-stream conflict was the real problem? it's more that somehow, I can't fathom how, `| it = rev_records { it } | EOF { [] }` fails to reduce to `rev_records`
<ELLIOTTCABLE>
dmbaturin: yeah still on this nonsense -_-
<ELLIOTTCABLE>
dmbaturin: send spoons. and tylenol. v.v
<dmbaturin>
Spoons and lighters are required for a whole different class of analgesic drugs. ;)
ben_____ has quit [Remote host closed the connection]
ben_____ has joined #ocaml
<dmbaturin>
ELLIOTTCABLE: I would think it = rev_records EOF ; would be equivalent and would reduce, but I can't see why yours isn't reduced. Sometimes carefully reading the automaton dump helps though.
ben_____ has quit [Remote host closed the connection]
ben_____ has joined #ocaml
ben_____ has quit [Client Quit]
<zozozo>
ELLIOTTCABLE: as I have saif above (but it may ahve been lost in the backlog), the problem is when does the parser know when to stop waiting for a token to contine the list of records, and when to stop ?
<zozozo>
ELLIOTTCABLE: EOF cannot be used, since according to your definition of rev_records, EOF can occur between records and not just at the end of the list
<ELLIOTTCABLE>
welp turned out the error messages weren't even related to my actual problems -_-
<ELLIOTTCABLE>
reviewing the EOF-conflict section cleared that up, you were totally right, needed to shift the EOF consumption “up” the grammar
<zozozo>
^^
<ELLIOTTCABLE>
but still failing to parse. More investigation to do …
<ELLIOTTCABLE>
zozozo: <#
<ELLIOTTCABLE>
<3 *
<zozozo>
haha, parsing "simple" formats with menhir can actually sometimes be more difficult than writing a handmade parser, :p
ben_____ has joined #ocaml
<zozozo>
particularly if there are some comments, and semantically significant newlines (yes, I've had to write one such parser in menhir, :D )
<ELLIOTTCABLE>
definitely the life I'm living right now, yeah
neatonk has quit [Remote host closed the connection]
yomimono has quit [Quit: leaving]
neatonk has joined #ocaml
<dmbaturin>
zozozo: We can start a support group for people who had to handle semantically significant newlines then. :)
<zozozo>
dmbaturin: :D
<ELLIOTTCABLE>
god
<ELLIOTTCABLE>
effing,
<ELLIOTTCABLE>
I forgot the `+` on my character-class for the value
<ELLIOTTCABLE>
why is it always a g/d typo that costs you two days
mikey_ has quit [Ping timeout: 256 seconds]
<ELLIOTTCABLE>
the _really_ hard stuff takes a month to suss out; the medium-hard problems you solve in like an hour and then feel like a badass … and the trivial stuff somehow takes halfway between Hard and Middling
<ELLIOTTCABLE>
thanks for all y'all's putting up with my noobery muchlovethx
<dmbaturin>
ELLIOTTCABLE: It is related to the question why people tend to avoid touching formal grammars. :)
neatonk has quit [Ping timeout: 276 seconds]
zolk3ri has quit [Quit: Lost terminal]
aciniglio has quit [Ping timeout: 255 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
argent_smith has quit [Quit: Leaving.]
haesbaer1 has quit [Read error: Connection reset by peer]
haesbaert has joined #ocaml
picolino has quit [Ping timeout: 240 seconds]
picolino has joined #ocaml
kakadu has quit [Remote host closed the connection]
malina has quit [Ping timeout: 255 seconds]
eikke has quit [Ping timeout: 260 seconds]
bronsen has quit [Remote host closed the connection]
bronsen has joined #ocaml
moei has quit [Quit: Leaving...]
al-damiri has quit [Quit: Connection closed for inactivity]