adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has quit [Ping timeout: 265 seconds]
smazga has quit [Quit: leaving]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
mahmudov has quit [Remote host closed the connection]
ocaml459 has quit [Client Quit]
ygrek__ has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 265 seconds]
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 268 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Read error: Connection reset by peer]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 260 seconds]
webshinra has joined #ocaml
NSA_Spy has quit [Remote host closed the connection]
NSA_Spy has joined #ocaml
vesper has joined #ocaml
vesper11 has quit [Ping timeout: 265 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
olle has quit [Ping timeout: 265 seconds]
olle has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 268 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
delysin has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
nullifidian__ is now known as nullifidian
mfp has quit [Ping timeout: 272 seconds]
tormen has joined #ocaml
serge has joined #ocaml
tormen_ has quit [Ping timeout: 265 seconds]
serge has quit [Ping timeout: 268 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 268 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
gravicappa has joined #ocaml
wagle has quit [Ping timeout: 268 seconds]
wagle has joined #ocaml
narimiran has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 268 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
vicfred has joined #ocaml
serge has joined #ocaml
Madars has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
serge has joined #ocaml
serge has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
NSA_Spy has quit [Ping timeout: 248 seconds]
serge has joined #ocaml
serge_ has quit [Ping timeout: 240 seconds]
serge has quit [Ping timeout: 265 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
bartholin has quit [Quit: Leaving]
serge has joined #ocaml
kakadu_ has joined #ocaml
betux has joined #ocaml
kakadu has quit [Ping timeout: 260 seconds]
dborisog has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
serge has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
ocaml459 has joined #ocaml
lizzin has quit [Ping timeout: 268 seconds]
ocaml459 has quit [Client Quit]
betux has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #ocaml
nullcone has joined #ocaml
ollehar has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 265 seconds]
kakadu has joined #ocaml
ocaml459 has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ollehar has quit [Remote host closed the connection]
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
malina has joined #ocaml
ocaml459 has quit [Client Quit]
m_oss has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
<m_oss> Hi OCaml! I've only recently started using this language, and I am really into it! However, I stumbled upon a surprising block - the yaml parsing library fails for bigger yaml file. It was a surprise as yaml is quite popular and I'd expect such functionality is bullet proof considering how mature OCaml libraries are. I went after it and found out ocaml-yaml is using libyaml C library in a way that free'd memory is being written on during
<m_oss> parsing. I fixed the bug and posted a PR, I've also sent emails to maintainers listed in opam, but without any response. I want to ask how to escalate this? For one, this is a major language usability problem, two, this could maybe be a security concern (I believe it is not, as freed memory is only read and then allocated again in small chunks, so user provided input is not getting written on this freed memory, but I am not an expert to
<m_oss> exclude that this could be exploitable - for instance by remote attacker who would send a big yaml file as an input to the app).
ocaml459 has quit [Client Quit]
<m_oss> The pull requests are here: https://github.com/avsm/ocaml-yaml/pulls
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
<theblatte> m_oss: you could try posting in the discuss forum to get more eyes on this, not sure how long is considered too long for the PR to sit around without a response
<zozozo> m_oss: you could try posting on the discuss forum ( https://discuss.ocaml.org/ )
mfp has joined #ocaml
<zozozo> oops, wasn't fast enough, XD
ocaml459 has quit [Client Quit]
<theblatte> haha :)
<def`> m_oss: avsm usually handle that kind of tasks quickly. If he didn't answer he is probably not available now but will handle this soon.
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
<m_oss> Okay if he's known to be active then lets wait - I didn't know if this is not an abandoned package, and maybe OCaml people just shun yaml ??
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
<def`> I don't think yaml is very popular.
<def`> here* :P
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
cartwright has quit [Remote host closed the connection]
andreas303 has quit [Write error: Connection reset by peer]
klntsky has quit [Write error: Connection reset by peer]
klntsky has joined #ocaml
bronsen has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
ocaml459 has quit [Client Quit]
ocaml459 has joined #ocaml
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ocaml459 has joined #ocaml
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
<Armael> yea I think people try to avoid using yaml if they can get away with it :p
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ocaml459 has joined #ocaml
<m_oss> Why? definitely nicer then json, which does not even support comments
<m_oss> what would be the ocaml syntax of choice for a structured config file ?
nicoo has quit [Remote host closed the connection]
lizzin has joined #ocaml
lizzin is now known as Guest76223
nicoo has joined #ocaml
* hannes has an opinion here which may be not mainstream (yet?): ASN.1 -- schema is known upfront, extensible, typed tag/length/value encoding (and even available targeting minimal binary encodings) :D
<m_oss> and for human writable config file ?
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<m_oss> say I want to implement kubernetes management tool in ocaml, and need to accept structured data similar to what docker-composer and k8s resource files support
<zozozo> well, some tools in the ecosystem have chosen s-expressions
<zozozo> (e.g. dune)
ocaml459 has joined #ocaml
<hannes> m_oss: i'm curious what that means -- does it mean "i want to allow any garbage in my config file and deal with it"? tbh, i'm not a big fan of allowing anything in a configuration file -> requiring asn.1 means you've tooling for the human-readable/writable to config file part <- and this already checks the syntax :)
<m_oss> I mean I understand the point that you don't want to mess with all the 'a option types...
<m_oss> But there is a culture at least in unix world of human readable/writable config files
<m_oss> And I'm not defending it as something good - just acknowledging it is this way
<Armael> i don't know anything about asn.1, but I thought it was mostly for binary formats, eg network packages and such
<hannes> hmm, turns out there's an orchestration system (for MirageOS unikernels) that actually uses asn.1 encodings https://github.com/hannesm/albatross (and embeds virtual machine images into x509 certificates)
<Armael> is that incorrect?
<m_oss> Well maybe given a good asn.1 editor configuration could be config file in asn.1 + some schema info file in another file
<m_oss> and then the user would do vim-asn --schema /usr/share/webapp/config.schema /etc/webapp.conf
<Armael> wrt config files I think toml is also an ok format, but unfortunately the ocaml library for it was meh last time I checked
<hannes> Armael: it was developed by ITU (telecommunication), and is a general tag/length/value grammar description. it is used for some network protocols, x509 certificates, and snmp (simple network monitoring protocol) in so-called MIB (which are the schema)
<Armael> afaik some people dislike yaml because is a bit of a crazy/overengineered and underspecified format
<hannes> m_oss: yes, exactly
<m_oss> hannes: any editors you know for asn.1 ?
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<m_oss> there must be an emacs plugin... :P
<hannes> m_oss: i have not used any public ones. i have a partial emacs mode for my own usage, and saw some commercial ones...
cartwright has joined #ocaml
<Armael> ah I see how it requires some editor support then
<m_oss> ok sounds like a project for elisp ppl
<m_oss> encoding/decoding on open/save is easy but getting syntax checking and maybe completion working is a bit more of work
<Armael> (one thing I dislike about sexp is that they are somehow "too loose", i.e. there are several ways of encoding records and sum types, and they're by default more ambiguous than more structured formats if you don't provide a schema)
<kvik> only thing worse than a configuration file is a configuration file requiring fancy editor plugins. if you'll excuse me the outflow.
flux has joined #ocaml
<flux> Armael: I agree that that's a problem. usually there remains no space for expansion after the initial setup, unless you've planned ahead.
<m_oss> kvik, hahaha yeah true - XML everywhere was one of the reasons I left Java world
<flux> in that aspect json is nice, because it's easy to go from string to dictionary to array in the format, the parsing end can easily distinguish between the forms
<flux> XML is sort of even better at this. perhaps too good.
<m_oss> XML is suffering
serge has joined #ocaml
<m_oss> completely unrelated: I must say that I was very impressed by the talk on 36c3 on Unikernels and MirageOS, especially the aspect of low resource consumption of such systems. In times when there is a lot of talk about planetary resources vs wastefulness of technology (eg Bitcoin, streaming), seeing OCaml making low-resource usage one of its goals is amazing. And I think this is a great point to advocate for OCaml everywhere.
<Armael> :-)
<hannes> m_oss: thanks :) though I as well still see various improvements to-be-done on that side, and "more fair measurements" (i.e. actual power consumption, not virtual CPU ticks and assuming that a tick equals a concrete energy consumption)
serge has quit [Ping timeout: 260 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
<pablo[m]3> Hey peeps! I just wrote my very first OCaml program! Unfurtunatelly it doesn't work hehe. Could anybody take a look to help me figure out the issue? It's only 70 lines long. Also, let me know how idiomatic the code is and how I could improve it 😁
ocaml459 has joined #ocaml
<pablo[m]3> <pablo[m]3 "Hey peeps! I just wrote my very "> On regards to the program not working, I belive the error has something to do the calls to `Event.send`, `Event.sync` or `Thread.exit`.
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
<m_oss> pablo[m]3, maybe use opportunity to run it with ocamldebug - you can step through the program forward and backwards (which is magic BTW)
<m_oss> (sorry for not answering directly)
RalfJ has quit [Remote host closed the connection]
RalfJ has joined #ocaml
<pablo[m]3> <m_oss "@pablo, maybe use opportunity to"> Thanks for the tip, I'll try it out!
serge_ has joined #ocaml
<octachron> pablo[m]3, you are a missing a Event.sync when sending the thread local result. But anyway, using threads here is pointless since only one thread will run at a time.
serge_ has quit [Ping timeout: 265 seconds]
<octachron> In term of idioms, you should use Arg (the stdlib module) or cmdliner for reading the argument
<octachron> and you don't need to use while loops and references.
<pablo[m]3> <octachron "@pablo, you are a missing a Even"> Ohhhh, I see. Thanks! Why will only one thread run at a time? I understand they won't run in parallel, but I thought they'd run concurrently atleast.
<pablo[m]3> <octachron "In term of idioms, you should us"> Alright.
<octachron> The threads won't run parallely, so you are complexifying the logic for no benefits.
dhil has joined #ocaml
n00by-n00by-doo has joined #ocaml
bronsen has joined #ocaml
<pablo[m]3> <octachron "The threads won't run parallely,"> The fact that there's no parallelism going on does not mean there won't be performance benefits. Arguably it's not worth it, because of the complexit introduced as you said.
decentpenguin has joined #ocaml
<octachron> Except that you are not releasing the runtime lock and the threads set-up and synchronisation has a cost. So there is a performance degradation rather than a benefit.
Haudegen has quit [Quit: Bin weg.]
serge_ has joined #ocaml
spew has joined #ocaml
serge_ has quit [Ping timeout: 240 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
tane has joined #ocaml
ec has quit []
ec has joined #ocaml
l1x has quit []
l1x has joined #ocaml
strmpnk has quit []
strmpnk has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
ygrek__ has joined #ocaml
serge_ has joined #ocaml
mrallen1 has quit []
mrallen1 has joined #ocaml
serge_ has quit [Ping timeout: 260 seconds]
m_oss has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
smazga has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
m_oss has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
jkni has quit []
jkni has joined #ocaml
olle has quit [Ping timeout: 265 seconds]
olle has joined #ocaml
serge_ has joined #ocaml
olle has quit [Ping timeout: 260 seconds]
olle has joined #ocaml
serge_ has quit [Ping timeout: 268 seconds]
serge_ has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
nullcone has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
decentpenguin has quit [Quit: decentpenguin]
jnavila has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
dborisog has quit [Ping timeout: 260 seconds]
narimiran has quit [Ping timeout: 260 seconds]
monad_cat has quit []
monad_cat has joined #ocaml
jmct has quit []
jmct has joined #ocaml
narimiran has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
serge_ has quit [Read error: Connection reset by peer]
Guest76223 has quit [Ping timeout: 260 seconds]
serge_ has joined #ocaml
dhil has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
serge_ has quit [Read error: Connection reset by peer]
nkaretnikov has quit []
nkaretnikov has joined #ocaml
lizzin has joined #ocaml
lizzin is now known as Guest9135
m_oss has quit [Ping timeout: 260 seconds]
jnavila has quit [Ping timeout: 256 seconds]
GreyFaceNoSpace has joined #ocaml
mahmudov has joined #ocaml
Adso_of_Jelq has quit []
Adso_of_Jelq has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
Guest9135 has quit [Ping timeout: 260 seconds]
m_oss has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
strmpnk has quit [Ping timeout: 245 seconds]
mrallen1 has quit [Ping timeout: 252 seconds]
Adso_of_Jelq has quit [Ping timeout: 272 seconds]
nkaretnikov has quit [Ping timeout: 245 seconds]
jmct has quit [Ping timeout: 246 seconds]
monad_cat has quit [Ping timeout: 248 seconds]
l1x has quit [Ping timeout: 248 seconds]
ec has quit [Ping timeout: 245 seconds]
jkni has quit [Ping timeout: 272 seconds]
bartholin has joined #ocaml
nullcone has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
zolk3ri has joined #ocaml
amiloradovsky has joined #ocaml
gravicappa has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
Jesin has quit [Quit: Leaving]
kakadu_ has joined #ocaml
Jesin has joined #ocaml
narimiran has quit [Ping timeout: 265 seconds]
amiloradovsky has quit [Ping timeout: 245 seconds]
m_oss has quit [Ping timeout: 268 seconds]
gareppa has joined #ocaml
n00by-n00by-doo has quit [Ping timeout: 268 seconds]
gareppa has quit [Remote host closed the connection]
gareppa has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 272 seconds]
gareppa has quit [Quit: Leaving]
lizzin has joined #ocaml
lizzin is now known as Guest4791
Haudegen has joined #ocaml
serge has joined #ocaml
tane has quit [Quit: Leaving]
ygrek__ has quit [Ping timeout: 268 seconds]
serge_ has joined #ocaml
serge has quit [Ping timeout: 268 seconds]
sagax has quit [Remote host closed the connection]
serge_ has quit [Ping timeout: 268 seconds]
sagax has joined #ocaml
serge has joined #ocaml
NSA_Spy has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
olle has quit [Ping timeout: 268 seconds]
olle has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
olle has quit [Ping timeout: 260 seconds]
serge has joined #ocaml
strmpnk has joined #ocaml
l1x has joined #ocaml
olle has joined #ocaml
ec has joined #ocaml
mrallen1 has joined #ocaml
monad_cat has joined #ocaml
jmct has joined #ocaml
Adso_of_Jelq has joined #ocaml
serge has quit [Read error: Connection reset by peer]
serge_ has joined #ocaml
jkni has joined #ocaml
nkaretnikov has joined #ocaml
vicfred has quit [Quit: Leaving]
serge_ has quit [Ping timeout: 240 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
serge has joined #ocaml
serge_ has joined #ocaml
serge has quit [Read error: Connection reset by peer]
serge has joined #ocaml
serge_ has quit [Ping timeout: 260 seconds]
kakadu_ has quit [Remote host closed the connection]
serge has quit [Ping timeout: 260 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]