flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
walter|r has quit [Remote host closed the connection]
saruta has joined #ocaml
shinnya has joined #ocaml
malc_` has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<companion_cube> oh well, I should go to sleep
dsheets has joined #ocaml
noethics has quit [Remote host closed the connection]
noethics has joined #ocaml
jeffmo has quit [Quit: jeffmo]
dsheets has quit [Ping timeout: 250 seconds]
walter|r has joined #ocaml
pyon has joined #ocaml
walter|r has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 246 seconds]
pierpa` has joined #ocaml
Sorella has joined #ocaml
pierpa has quit [Ping timeout: 250 seconds]
boegel has quit [Remote host closed the connection]
darkf has joined #ocaml
mistermetaphor has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
Algebr has joined #ocaml
dsheets has joined #ocaml
ismaelga has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 276 seconds]
Algebr has quit [Ping timeout: 250 seconds]
misterme_ has joined #ocaml
SHODAN has quit [Remote host closed the connection]
mistermetaphor has quit [Ping timeout: 246 seconds]
SHODAN has joined #ocaml
rgrinberg has quit [Quit: WeeChat 1.4]
<destrius> if i'm using core, what's the 'right' way of doing unsigned 32-bit integers? should i use stdint?
walter|r has joined #ocaml
scarygelatin has quit [Quit: Leaving]
<struk|desk2> destrius: use Int module and type int . If you really care about them being unsigned vs signed..not sure how to do that in ocaml
<struk|desk2> destrius: for large integer math, use zarith.
struk|desk2 is now known as struk|desk
<pecan> destrius: stdint is (probably) the way to go, assuming there's a reason (C interop?) you need uint32
<pecan> at the very least, it's the path of least resistance ;-)
<struk|desk> pecan: where do you get uint32 ? what module is that in?
<pecan> (Core doesn't have an unsigned type as far as I'm aware—granted, I'm only passingly familiar with Core :( )
<destrius> i need to represent memory addresses, so ideally uint32/uint64 would be good
ismaelga has joined #ocaml
<pecan> struk|desk: https://github.com/andrenth/ocaml-stdint provides native integer types
<destrius> struk|desk: there's a uint32 in stdint
<pecan> destrius: You _probably_ don't want to use integers for that! Are you using Ctypes or something else?
<destrius> anyway i'm generally only using the addresses for lookups, so their signedness doesn't really matter
<destrius> pecan: i'm not actually representing runtime memory addresses, just data that happens to be memory addresses
<struk|desk> pecan: ah never seen that library. I though you meant stdint == whatever is in ocaml std lib
<destrius> disassembly-like stuff, basically
<pecan> ah okay. use Core.Nativeint, it'll be the right size.
<destrius> hmm
<pecan> It is a signed type, however, but it's probably the easiest since it will automatically be the platform's preferred size
badon has left #ocaml ["Leaving"]
ismaelga has quit [Ping timeout: 276 seconds]
<destrius> problem tho is that the data might not necessarily be from the platform; i could be in 32-bit working with 64-bit data
<pecan> though if you're writing a disassembler-ish-thing, you'll be switchign anyway
<destrius> so its best to explicitly represent stuff
<pecan> yeah exactly
<pecan> hm, prolly just use stdint
<destrius> my main problem with stdint is that if i open it, it will replace core's Int32 etc. modules
<destrius> and i'm not sure if that will break anything
<destrius> i guess i could just keep it in it's own namespace
<pecan> If you're not using core's Int32 for anything, nothing will break
<destrius> ok
<destrius> i might do that then, thanks
walter|r has quit [Remote host closed the connection]
johnelse has quit [Ping timeout: 244 seconds]
badon has joined #ocaml
average has quit [Quit: leaving]
johnelse has joined #ocaml
pierpa` is now known as pierpa
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
johnelse has quit [Ping timeout: 250 seconds]
ismaelga has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
johnelse has joined #ocaml
sh0t has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
govg has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
tizoc has quit [Ping timeout: 240 seconds]
dariusc93 has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 250 seconds]
jyc has quit [Ping timeout: 250 seconds]
tizoc has joined #ocaml
cschneid has joined #ocaml
darius93 has joined #ocaml
jyc has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Reshi has quit [Quit: WeeChat 1.4]
govg has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: WeeChat 1.4]
ungz has joined #ocaml
Reshi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
dsheets has joined #ocaml
Harzilein has joined #ocaml
A1977494 has joined #ocaml
<destrius> GADTs are too much fun
dsheets has quit [Ping timeout: 250 seconds]
<destrius> as a side-effect of working with them, i might finally figure out how to read haskell
pierpa has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
jave has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jave has joined #ocaml
FreeBirdLjj has joined #ocaml
myst|fon has joined #ocaml
kushal has quit [Quit: Leaving]
boegel has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 276 seconds]
misterme_ has quit [Remote host closed the connection]
nicholasf has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
Simn has joined #ocaml
Reshi has quit [Ping timeout: 260 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
nicholasf has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
Reshi has joined #ocaml
<reynir> ocamlfind gets an update and basically *every* opam package needs a recompile :o
yegods_ has joined #ocaml
<flux> I wonder how that should be fixed though :)
yegods_ has quit [Remote host closed the connection]
<flux> should there be two version numbers? or should it be an attribute of the dependency?
sspi_ has joined #ocaml
mattg has quit [Ping timeout: 276 seconds]
M-martinklepsch has quit [Ping timeout: 276 seconds]
cschneid has quit [Ping timeout: 276 seconds]
pyon has quit [Ping timeout: 276 seconds]
jkni has quit [Ping timeout: 276 seconds]
seako has quit [Ping timeout: 276 seconds]
cnu_ has quit [Ping timeout: 276 seconds]
johnelse has quit [Ping timeout: 276 seconds]
yegods has quit [Ping timeout: 276 seconds]
lokien has quit [Ping timeout: 276 seconds]
_y has quit [Ping timeout: 276 seconds]
sspi has quit [Ping timeout: 276 seconds]
emmanueloga has quit [Ping timeout: 276 seconds]
chris2 has quit [Ping timeout: 276 seconds]
wolfcore has quit [Ping timeout: 276 seconds]
Madars_ has quit [Ping timeout: 276 seconds]
mattg has joined #ocaml
Jaxan_ has quit [Read error: Connection reset by peer]
seako has joined #ocaml
boegel has quit [Read error: Connection reset by peer]
sfri_ has quit [Read error: Connection reset by peer]
deavidsedice has quit [Read error: Connection reset by peer]
cnu- has joined #ocaml
avsej has quit [Excess Flood]
mattg has quit [Changing host]
mattg has joined #ocaml
seako has quit [Changing host]
seako has joined #ocaml
sfri has joined #ocaml
johnelse has joined #ocaml
jyc has quit [Ping timeout: 276 seconds]
rpip has quit [Ping timeout: 276 seconds]
sz0 has quit [Ping timeout: 276 seconds]
solrize has quit [Ping timeout: 276 seconds]
kalzz has quit [Ping timeout: 276 seconds]
Ninja123_ has quit [Ping timeout: 276 seconds]
jmct has quit [Ping timeout: 276 seconds]
deavid has joined #ocaml
Jaxan has joined #ocaml
_y has joined #ocaml
wolfcore has joined #ocaml
<reynir> I don't know
cschneid has joined #ocaml
<reynir> Isn't it a build-time dependency in most cases?
chris2 has joined #ocaml
Ninja123_ has joined #ocaml
whitequark has left #ocaml [#ocaml]
solrize has joined #ocaml
solrize has quit [Changing host]
solrize has joined #ocaml
<flux> a new ocamlfind could perhaps affect the way how the data should be installed..
<reynir> Hm yea I guess, good point
jyc has joined #ocaml
<flux> though the fact remains in practice it doesn't :)
Madars_ has joined #ocaml
<reynir> Btw I'm not really complaining, I just find it curious
groovy2shoes has joined #ocaml
avsej has joined #ocaml
avsej has quit [Changing host]
avsej has joined #ocaml
<flux> yep. it's rare enough to not to be too annoying.
<flux> also there are only so many ocaml packages :)
sspi_ is now known as sspi
sepp2k has joined #ocaml
<flux> flambda might make those situations a bit more annoying by compiling slower :)
<reynir> Yea. I was a bit surprised to see that I have 209 packages installed though
M-martinklepsch has joined #ocaml
sz0 has joined #ocaml
lokien has joined #ocaml
boegel has joined #ocaml
kalzz has joined #ocaml
jkni has joined #ocaml
emmanueloga has joined #ocaml
jmct has joined #ocaml
boegel has quit [Remote host closed the connection]
<companion_cube> Drup: for a brief moment yesterday, I had an urge to reinvent lwt; luckily it's over now :p
<companion_cube> but debugging is pretty bad :/
rpip has joined #ocaml
<destrius> should i feel bad about resorting to using Obj.magic in my code?
<companion_cube> yes
<companion_cube> :D
<destrius> :(
<companion_cube> unless you really, really know what you do
<companion_cube> (never ever modify a value through Obj, for instance)
<destrius> i'm doing horrible things using GADTs
amnn has joined #ocaml
<destrius> currently i have a wrapped value that i know must be of a certain type, but the compiler doesn't
<companion_cube> erf
<flux> the next step is to rewrite the piece of code in Coq
<flux> and then extract the OCaml code out of it
<flux> that is a permitted case of using Obj.magic :)
<companion_cube> :p
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<destrius> i think i can't do what i really want to do without dependent types of some sort
<destrius> anyway its quite a trivial feature, i should just move on and do more important stuff
<destrius> but its just so infuriating to not be able to express exactly what you want
<maker> oh holy crap
<companion_cube> destrius: I hear you...
<maker> hannes: good morning beuty, there's another small issue when using Nocrypto
pyon has joined #ocaml
<maker> so right now I'm using Z.to_bits to jwk-encode the public key. Basically I am stuffic public exponent an modulus base64-encoded in a json.
<maker> hannes: a correct implementation of this seems to be the following:
<maker> let jwk_encode key =
<maker> let e = rev (Z.to_bits key.Rsa.e) |> base64_urlencode in
<maker> let n = rev (Z.to_bits key.Rsa.n) |> base64_urlencode in
<maker> Printf.sprintf {|{"e": "%s", "kty": "RSA", "n": "%s"}|} e n
myst|fon has quit [Quit: Connection closed for inactivity]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maker> where rev is the string reverse. Yes, I need to reverse the bytes. I don't know if this can be called endianness, but you might want to know that the whole world has a similar function behaving differently (i.e. no need to reverse)
<hannes> maker: this is david's territory... I don't think he's on irc here, please file an issue :)
<reynir> maker: is this for let's encrypt?
<maker> oh no another issue on nocrypto
thizanne has quit [Ping timeout: 276 seconds]
<maker> reynir: yes I'm trying to write an acme client
<reynir> Awesome :-)
<maker> reynir: but it's taking more than expected, I still don't have a functioning command
<maker> but I'll work full-time day and night until the 14th
mettekou has joined #ocaml
<reynir> Nice
* maker steps into david's territory
<reynir> Is it on github?
<maker> not yet, but it's nothing really for now
<maker> I mean this is the response I'm having now {"type":"urn:acme:error:malformed","detail":"JWS verification error","status":400}
<maker> so, yeah, there's still work to do
<hannes> maker: keep in mind, jwe etc should in the end be separate libraries, for now separate modules would be nice to have :)
kushal has joined #ocaml
tane has joined #ocaml
<hannes> and you might run into https://github.com/mirleft/ocaml-x509/issues/69 ... that countryName is utf8 encoded, where some CAs (not sure about let's encrypt) expect a printableString...
<maker> yes, I'm not very familias with this oasis thing but I believe it's possible to create multiple libraries from a single package
<maker> gulp, thanks for the warning
<hannes> maker: if you run into it, please comment on the issue... this is a long-outstanding bug which should be fixed rather sooner than later
nicholasf has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 252 seconds]
mettekou has quit [Ping timeout: 276 seconds]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
sepp2k has quit [Ping timeout: 252 seconds]
boegel has joined #ocaml
yegods has joined #ocaml
amnn has joined #ocaml
boegel has quit [Remote host closed the connection]
boegel has joined #ocaml
sepp2k has joined #ocaml
<Leonidas> whoa, everytime I was like "man, this ocaml syntax is weird", it's nothing compared to Erlang
<Leonidas> at least you get some error
noethics_ has joined #ocaml
noethics has quit [Disconnected by services]
noethics_ is now known as noethics
dsheets has quit [Remote host closed the connection]
Reshi has joined #ocaml
jwatzman|work has joined #ocaml
<pierpa> Erlang's syntax is absolutely normal and sane
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silver has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
dsheets has joined #ocaml
amnn has joined #ocaml
<adrien> incr gasche;
<companion_cube> is this your version of "+1"? :)
<adrien> :)
malc_ has joined #ocaml
tane has quit [Quit: Verlassend]
kushal has quit [Quit: Leaving]
Simn has quit [Ping timeout: 260 seconds]
<maker> mm in this snippet:
<maker> # let modulus k = Z.to_bits (k.Rsa.n);;
<maker> val modulus : Rsa.priv -> bytes = <fun>
<maker> how does ocaml know that it's Rsa.priv and not Rsa.pub?
<maker> both have the same record "n".
<companion_cube> awwwwwwwwwwwwwwwwwwww
<companion_cube> recent version of menhir depend on OCaml 4.02
<maker> fuck it, if I explicit the function signature then it works
kushal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
kushal has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
bba has joined #ocaml
<zaquest> maker, afaik ocaml just chooses the most recent definition of `Rsa.n`, so probably `Rsa.priv` is defined after `Rsa.pub`
Simn has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
<adrien> it can disambiguate
<adrien> but it'll also show a warning
nicholasf has quit [Remote host closed the connection]
fraggle_ has quit [Ping timeout: 260 seconds]
nicholasf has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsheets_ has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
fraggle_ has joined #ocaml
kushal has joined #ocaml
dsheets has quit [Remote host closed the connection]
kolko has quit [Ping timeout: 246 seconds]
kolko has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<maker> well, and how can I make it explicit?
<maker> if I make an interface, the error is still there
<maker> if I add a function using that other one the error is still there
<maker> so the only way to handle it now is to go with let foo : a -> b = function …
<maker> dammit ocaml
nicholasf has quit [Remote host closed the connection]
<lyxia> let foo (k : Rsa.pub) = ...
<maker> \o/
mettekou has joined #ocaml
mettekou has quit [Client Quit]
ggole has joined #ocaml
BitPuffin has joined #ocaml
dsheets has joined #ocaml
toolslive has joined #ocaml
cat5e has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
tane has joined #ocaml
jken has joined #ocaml
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #ocaml
ismaelga has quit [Remote host closed the connection]
yomimono has joined #ocaml
adrien has quit [Quit: leaving]
adrien has joined #ocaml
Algebr has joined #ocaml
govg has joined #ocaml
amnn_ has joined #ocaml
amnn_ has quit [Read error: Connection reset by peer]
<Algebr> Is this a good school? university Paris13 option: informatique
amnn has joined #ocaml
<Drup> level ?
amnn has quit [Read error: Connection reset by peer]
<Algebr> No idea, some student from there emailed me asking for OCaml help..
amnn has joined #ocaml
<Drup> o_o
<_y> :p
<Drup> that's weird
<Algebr> I think its a little odd, yes.
<_y> homework?
<Algebr> probably, said needed help in starting an OCaml project.
<Algebr> That's not too bad i don't think
<gasche> congrats, you're a celebrity now
<Algebr> heh
<gasche> I don't think it is possible to answer your question; french universities generally have average students on average, with a few very bad ones and a few very good ones
<_y> there are a few shameless students to rely on random internet people to do their homework
<gasche> (the very good ones are probably not sending email to random people to get help starting their OCaml project)
<gasche> _y: it depends on the level of effort that one feels the student himself or herself is investing in the work
<Algebr> I didn't think so either, I was trying to get a benchmark, like what is France's equivialent of MIT, etc
<gasche> there is no French equivalent of MIT, because our education system is weird
<_y> (Algebr, as a side note, Paris n with n > n0 means it’s not Paris ^^)
<Algebr> _y: ah, that is new to me and counter intuitive
<_y> well, it should be relatively close to Paris
<gasche> in general, Parisian universities have reasonable students; rather on the weak side at bachelor level (years 1 to 3), usually reasonable at master level (years 4 to 5)
kushal has quit [Quit: Leaving]
<Algebr> Preumably the best schools are around Paris?
<Drup> Not really
<gasche> the best shcools not universities; they're engineering or research schools
<Drup> (and I agree with gasche about the variation depending o the level)
<gasche> (but some of them piggyback on universities at master level, which means that some specific masters are very strong)
rgrinberg has joined #ocaml
<_y> Algebr, in any way, you can redirect your lost students to something like #ocaml or #ocaml-beginners (does that exist?)
<gasche> (the weird thing about the French system is that the state does not trust universities in teaching students, so it fostered many smaller schools that are supposed to have a stronger level, and which are entered through admission contests after a more intensive two-year training period that actually takes place inside high schools -- but is not high school)
<Algebr> I gave him a link to my blog post, will mention #ocaml next time too.
<Drup> "the weird thing about the French system is that the state does not trust universities in teaching students" <- I'm not sure that presentation is correct, at least not anymore
<gasche> well
<Drup> It may used to be correct, several decades ago
<Drup> but, like, several decades, more than 4
<gasche> so
<gasche> about ten years ago, some local rectorats (the administrative office of education) would send letters to anyone having a "good" grade at the final high-school exam, urging them to go to "classe préparatoire" instead of university
<gasche> I don't see a clearer way to indicate distrust
<Algebr> wow
FreeBird_ has joined #ocaml
<gasche> (it happened to a friend of mine in La Rochelle, for example)
<_y> with respect to history, i don’t even know how and when the university was created, as compared to Polytechnique & ÉNS
<gasche> universities have been around for a very long time, more so than these schools
<gasche> but indeed the distrust in universities is what explains the creation of these schools after the French revolution (late 18th century)
<_y> or, maybe more adequately, when it opened to such a big number of people
<Drup> gasche: that kind of advise makes sense for the first two years, though. If you can work well under pressure, the first two years of prepa are quite better than the first two years of (french) university for scientific domains
<Drup> (after that, it gets much more debatable)
<_y> Drup, indeed, but that’s a consequence of the system
<companion_cube> yeah, the third year sucks
<companion_cube> :]
<toolslive> what's wrong with the state distrusting a university? I don't see a problem there (nor with the reverse)
<Drup> toolslive: university are state owned ..
<gasche> (La Sorbonne was created during the 12th century; but it was an elite place))
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<toolslive> drup: all of them ?
<Drup> in france, yes, pretty much
<gasche> (public universities are a very good thing)
<gasche> yeah
<Drup> +1
FreeBird_ has quit [Ping timeout: 276 seconds]
<gasche> I forgot to mention that although the average level is only average, you pay something like $250 a year to attend university
<toolslive> in Belgium, the state only started creating its own universities in the 19th century.
<Algebr> Wow!!! only $250!
<Drup> Algebr: yes, education is affordable in france
<Algebr> The shittiest school here is still $1000 a semester
<gasche> some specialized schools are private-owned and have ridiculous prices (as in, $7k a year), but the best specialized schools are public and equally cheap
<Algebr> affordable, I would say basically free
<toolslive> education is affordable across the whole of Europe, no?
<gasche> (some of them even pay their students)
<Drup> toolslive: yes
<def`> Algebr: and even cheaper if you have help from the state (large families, etc), which happen quite often.
<gasche> not in the UK for example
<Drup> toolslive: well, the UK is starting to take the US's path
<Drup> Algebr: the US is a very weird place, when it comes to education
<toolslive> yes, I fully support the Brexit ;)
<Algebr> =/
<gasche> the US is an amazingly weird place: they pay approximatively as much taxes as in Europe, yet their Health and Education system suck and are ridiculously expensive
<gasche> (well you can get top-grade treatment in both if you are millionaire)
<Algebr> I would say we pay less in taxes, but health/education are good at the top end, okay in the middle.
<gasche> public transporation is also terrible
<Drup> Algebr: top end is the same as in europe
<companion_cube> but the army is awesome
<gasche> :p
<companion_cube> and don't forget the shiny NSA computer
<companion_cube> s
yomimono has left #ocaml ["Leaving"]
<Algebr> public transport could be better
<Drup> middle, as far as I can see, is the same or worse than in france, which is not fabulous
<asmanur> gasche: are you sure they pay as much taxes?
<gasche> I didn't look at the details but yeah, it's in the same ballpark
<Drup> Algebr: one thing US repeatedly top by a large margin, though, is convince that their results are better than the others :3
<companion_cube> also, debt in education is part of what makes the health care so expensive
<asmanur> because you know that in France, your employer pays the equivalent of your salary directly to the state in taxes before you get your wage?
<Drup> (yes, it's from a real study)
<Algebr> public transport won't get better until gas become european priced
<companion_cube> physicians have n×100,000$ in debt
<Algebr> companion_cube: I have an ex-gf in medical school, she already has 150k in debt, will finish med school with 250k
<Algebr> that is insane.
<Drup> one thing I don't understand is: at this point, why there aren't more people emigrating to europe for education ?
<gasche> companion_cube: health care being expensive also makes health care expensive
<gasche> most people don't actually go to the doctors until they get really bad, because they can't predicat healthcare costs
<companion_cube> Algebr: that's truly insane
octachron has joined #ocaml
<gasche> (but all of this is not very OCaml-related)
<companion_cube> my sister is in medical school in france, it's almost free (except housing, ofc)
<gasche> octachron: congrats on the Linuxfr news
<octachron> gasche, thanks.
ismaelga has joined #ocaml
<def`> octachron: merlin support for 4.03 is very experimental
<def`> have you tried with master? It should fix indexing operator problems.
<gasche> octachron: maybe you should send an email to Leo to ask him about index operators, by the way
<gasche> (or a pull request)
<octachron> def`, I have yet to try merlin master, I was just surprised to see some indexing operators' ghosts
<def`> octachron: the typechecker is a few months old.
<def`> It is surprising it doesn't even segfault :P
A1977494 has quit [Ping timeout: 246 seconds]
<rks`> it probably will if you use inline records and such :)
A1977494 has joined #ocaml
<def`> :)
<edwin> btw is there a way to record everything sent to the merlin process so it can be replayed if I want to open a bugreport? Sometimes merlin shows me a type error in emacs which ocamlopt wouldn't, and if I run merlin-restart-process then merlin agrees that all is good as well ... but thats not very useful for a bugreport without an actual reproducible testcase
<def`> edwin: the MERLIN_LOG command
<def`> sorry
govg has quit [Quit: leaving]
<def`> environment variable*
<def`> you set it to some filename merlin can write too and it will record entire communication
<def`> but this is a bit too much for reporting bug, I hope to improve that in the next few months
<edwin> cool, I'll give that a try, maybe when the problem occurs I can spot something in that log
<edwin> is the logfile replayable?
<def`> edwin: it need some postprocessing to be replayable
<def`> i can share that
<def`> but I am afraid that replaying won't help
yegods has quit [Remote host closed the connection]
<flux> how about this? http://rr-project.org/
<def`> In general this bug means that merlin view of the FS is out of date, but restarting a process will always see a clear cache
<flux> how does merlin keep in sync with the fs?
<def`> flux: when answering a query, it checks the mtime, inode, etc of all relevant files
<def`> if those didn't change, it doesn't read from FS for answering
<flux> so how can that become stale?
<edwin> hmm indeed I only see filenames in the log, so I would also need to somehow store all the intermediate files
<def`> edwin: and replay changes at the appropriate times...
<flux> the solution is obviously merlinfs
<octachron> gasche, a pull request on which matter? Anyway you are probably right at least for synchronisation purpose.
<def`> There is a race somewhere, I have to fix that...
<def`> flux: If I knew...
<flux> in fact _build should be a directory that automatically contains whichever build artifacts required.. :)
<def`> I don't have time for that in May, but my plans are to focus on that in June.
<edwin> well not a big deal, I just wanted to write a useful bugreport :)
<edwin> it happens quite rarely
jackweirdy has joined #ocaml
<flux> how about this: a command to suspend and resume merlin
<flux> suspend before ocamlbuild and resume after
<flux> (well, suspend the file system stuff at least)
<flux> in fact you can probably do it right now with SIGSTOP etc :)
<maker> ouch, theres a problem in ocaml-base64: this is what I get <https://clbin.com/MOjPn> but <https://tools.ietf.org/html/rfc7515#appendix-A.1> says I should expect something slightly different
<flux> reminds me of a hack to emacs' auto revert that I disabled whenever rebase was running, because it messed up files with nfs
<maker> it seems to break at the crlf part
<def`> flux: yes, at some point merlin also waited for a SIGUSR1 to refresh fs
<maker> anybody played with base64?
<flux> maker, so what if you encode plain cr, lr and the combination, with the library and with the command line tool?
<def`> but integration was painful... The good fix is making merlin behave well in racy situations
<flux> maker, I guess I can take for granted you're not working in Windows?
ungz has quit [Quit: Page closed]
<maker> $ base64 <<<'{"typ":"JWT",\r\n "alg":"HS256"}'
<maker> eyJ0eXAiOiJKV1QiLFxyXG4gImFsZyI6IkhTMjU2In0K
<maker> flux: yes you can
<maker> flux: but this one is not using the url alphabet I think
<edwin> \0108
<edwin> that has too many digits
<edwin> if you look at the string it has come out as "a\n8\n3\" instead of "alg"
<maker> no way haha
<edwin> cause that is interpreted as \010 followed by the character '8'
<maker> edwin: yes omg it even works now
<maker> sorry for the noice people, I was just sick of working over base64 stuff
<edwin> maybe write them as an int array, and convert to string with a function, reading that many escapes in a string I get lost usually
<maker> edwin: yes I tried but there is no char array -> string function in ocaml
<maker> edwin: and this is only for testing so it seemed an overthinking
<maker> but then I did it all wrong haha
<maker> (again, my apologies, won't happen again.)
<Drup> companion_cube: I'm outraged
<Drup> there is no CCString.implode/explode
<edwin> maker: np
<flux> ..of_chars, to_chars, no them either?
<companion_cube> you mean of_list/to_list?
<edwin> extra pair of eyes helps for things like this
<Drup> oh, there is of/to_array
<Drup> nevermind
Soni has joined #ocaml
<companion_cube> or of_seq/to_seq?
<companion_cube> or to_gen/of_gen? :p
<Drup> maker: CCString.of_array :D
<companion_cube> CCString isn't the best module of containers, but still, there's a bit of stuff :p
<maker> oh what is that module
* maker digs
<Drup> it's companion_cube's fleet of wheels
<companion_cube> it's part of containers, an extension of the stdlib
Soni is now known as cat5e
<Drup> companion_cube: it's called im/explode in batteries, iirc
ismaelga has quit []
myst|fon has joined #ocaml
<companion_cube> yeah, but I find to_list/of_list much clearer
<companion_cube> no special treatment for strings! ^^
<gasche> octachron: for the user-defined indexing operators?
<gasche> (maybe there is already discussion ongoing that I haven't followed, apologies in that case)
<edwin> flux: rr-project is definetely interesting, unfortunately my AMD CPU doesn't support the kind of deterministic counters it requires (https://github.com/mozilla/rr/issues/1552#issuecomment-159998831)
<flux> yep, same issue at home :/, but I have used it at work
<flux> gdb also has reverse debugging, but it of course it much more limited in history and performance
<flux> and that's an understatement.. :)
<def`> so does ocamldebug
<flux> but gdb is otherwise a decent debugger :P
<gasche> yeah, ocamldebug's reverse debugger is ok
<flux> if it were possible to run arbitrary expressions in ocamldebug, it would be super
<flux> you can in gdb, even if a lot of times it ends up with a segfault :)
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
tane has quit [Quit: Verlassend]
<gasche> I remember someone working on that, not sure who
<Drup> mark shinwell
<flux> gdb also has these conditional (on expression) break points with commands
<flux> and to top it all it has the ability to add python extensions
copy` has joined #ocaml
<flux> I guess the latter could be addressed by having a 'mktop'-like approach to the debugger, and have the extension language be ocaml itself
<flux> those things would make ocamldebugger a quite serious debugger I think :-o
<gasche> I think mark was working on gdb support, not on evaluation inside ocamldebug
<Drup> oh, hum, read to fast
<flux> ah, well that's probably quite a reasonable approach as well, though maybe not quite as powerfull in the end
<Algebr> I would it was lldb work
<flux> I guess lldb is pretty much gdb feature-wise
<Algebr> thought it was*
<w1gz> Algebr: for the student from paris, I saw him on the ocaml subreddit too: https://redd.it/4h989z
<w1gz> he doesn't have a ton of success there
<Algebr> ha, oh yea, same person.
<rgrinberg> are module aliases really experimental? https://github.com/gerdstolpmann/omake/issues/23#issuecomment-215691308
<Drup> rgrinberg: as experimental as .mli files without .ml :3
mistermetaphor has joined #ocaml
<flux> so might break at any time?-)
<Algebr> def`: need to make merlin feature request, doing merlin type check of foo in new foo should give me back a signature that say what arguments the class takes rather than the structural type of the class
<rgrinberg> yeah. I think they're experimental by only 1 measure: distinct lack of users
<rgrinberg> But I think that's because of the shoddy build system support...
<Drup> rgrinberg: exactly
jackweirdy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Reshi has quit [Ping timeout: 250 seconds]
<def`> Algebr: open issue, as you can see I am not very responsive these days :)
<Algebr> yea, was thinking out loud
rgrinberg has quit [Ping timeout: 276 seconds]
<Algebr> ahh, merlin vim support is python implemented
<toolslive> I'm moving to a new version of core (and ocaml 4.03) but I get "Error: Unbound module Sign" while compiling. What's the current replacement for that core based module
<toolslive> ?
<Algebr> def`: opened, seems like an easy task, if no one does it in 2 weeks then I'll do it
<def`> Algebr: perfect thanks :)
leyyin has joined #ocaml
<rks`> Algebr: wouldn't asking the type of [a] give what you want?
tane has joined #ocaml
<rks`> (similarly, asking the type of [`Foo ...] will never tell you "some t" but "[> `Foo of ... ]")
wiredsister has joined #ocaml
<Algebr> what
<def`> rks`: it is just that for classes which are functions, parameters are not printed, only the object type.
<def`> rks`: class a = fun x -> object end;;
<Algebr> yes, parameters are more useful to me than the object's type
<rks`> hmm
<rks`> I must have misunderstood the issue then
<rks`> (I jumped on the polymorphic variant comparison)
<Algebr> I think it would be elegant if it had a drilldown, first show me parameters and if I type check it again give me object type
<rks`> to be fair, the issue doesn't parse
<rks`> (« this isn't as useful as knowing the args that foo thats when creating a new object »)
<rks`> thanks for the explanation
<Algebr> sorry, writing issues at 7:40am
Reshi has joined #ocaml
<Algebr> actually that is ambigious as well
rgrinberg has joined #ocaml
<rks`> (much better tough, I actually understood this time)
hcarty1 has joined #ocaml
yegods has joined #ocaml
jackweirdy has joined #ocaml
hcarty1 is now known as hcarty
<Algebr> Drup: I want to use tyxml just for the compile time validation of elements, aka that div and p and span are real elements while foo and bar are not. All I have to use is star, but star is complication, can I use tyxml instead of having to do: type html_elem = [`div | `span | `p]
<Drup> I don't understand your question
<Drup> none of it x)
<Algebr> An html element is for example "div" or "span"
<Algebr> and it could be passed around as strings
<Algebr> but tyxml provided typed xml, so I want to reuse that lib so that I don't have to do let elem_of_string = function `div -> "div" | `span -> "span"
<Algebr> and I could do type foo {html_elem : Tyxml.something; } instead of {html_elem : string}
<Algebr> is that clearer
rgrinberg has quit [Read error: Connection reset by peer]
<Drup> Well, it's clearer, but what's the question ?
<Drup> Yes, you can do that, that's the point of tyxml :D
darkf has quit [Quit: Leaving]
<Algebr> What type would it have to be though, star from tyxml seems complicated
<Algebr> and overkill for what I am asking for
<Drup> "_ Html.elt" ?
kushal has joined #ocaml
<Algebr> okay, elt is an abstract type, this looks hard, will try again later.
<Drup> Algebr: why does it looks hard ?
<Drup> (I still don't really understand your questions ..)
<Algebr> because I just want a simple string_of_elt = function `div -> "div" | `span -> "span"
<Algebr> I want typed html element names rather than people passing strings
<Drup> why don't you want to translate the whole html element at once instead ?
<Drup> is it for your reactJs binding ?
<Algebr> ya
<Algebr> because its not the whole html element, just the name
slash^ has joined #ocaml
<Drup> please show me your API
<Drup> for now, just make a untyped binding with string as element names
<Algebr> that's what I'm doing now, bummer, will have to write out a massive type html_t = [`div | `span]
<Drup> No you won't, but you need an ugly API to be able to make a pretty API :)
<Drup> Algebr: please just show me your API :p
<Algebr> still working on some GADT based ideas, one sec
<Drup> For once Algebr, please stop and trust me
<Drup> do an ugly API, show me, and I'll tell you if/how we can make a pretty one
rgrinberg has joined #ocaml
<struk|desk> Algebr: github syntax highlighter not a fan of react ## operator: https://github.com/fxfactorial/ocaml-reactjs/blob/master/src/react_js.ml#L75
jeffmo has joined #ocaml
<Drup> struk|desk: it's from js_of_ocaml
<Drup> Algebr: no attributes ?
<Algebr> you mean html attributes? No, I think it only takes the name
<Algebr> I am also only getting familiar with it as well
<Algebr> reactjs
<Drup> we need seangrove :p
<struk|desk> Drup: ah
<Algebr> I'll probably be talking to him soon anyway
<Drup> Algebr: shouldn't "content" be a _ elem_arg list
<Drup> ?
<Algebr> no, that's children
dsheets_ has joined #ocaml
<Algebr> I think
<Drup> what's the difference ?
<Algebr> content is just a string
<Algebr> children is other reactjs elements
hay207 has joined #ocaml
<Drup> what about other html elements ?
dsheets has quit [Ping timeout: 252 seconds]
<Algebr> I don't think you deal with html elements, but react elements
<Drup> I'm not sure why there is a distinction between content and children, but ok
<Drup> Algebr: ok, the deal is the following
jken has quit [Quit: Leaving]
<Drup> if you can make me an API that looks like this: https://github.com/ocsigen/tyxml/blob/master/lib/xml_sigs.mli#L23-L69 (so, typical XML stuff, children and attribute). I can give you all the tyxml combinators for free, and they will emit your datatype
<Algebr> this is a bad deal
<Drup> Why ?
<Drup> :(
<Algebr> I don't think everything there is relevant in the context of reactjs, for example: mouse_event_handler_attrib
<Drup> you never attach events ?
<Algebr> I don't think most would make sense because I presume that reactjs will have its own way
<Algebr> this could end up interfering with reactjs
<Drup> if reactjs has its own way, we can use it
<Algebr> I would have to provide some kind of None value for most of these I think
<Drup> that works too
yegods has quit [Remote host closed the connection]
<Algebr> Okay, I don't know if there's big bang for the buck for me there yet, this is learning more types and guts of tyxml, not a bad thing, but want to have reactjs reliabity working first, then refactor
<Drup> Yes, that sounds like a good plan
<Drup> Anyway,as long as your API looks like XML (and I can't see how reactjs couldn't), it's not going to be a lot of trouble to make it fit
yegods has joined #ocaml
<Drup> (by "look like XML", I mean "elements have children and attributes")
wiredsister has quit [Ping timeout: 240 seconds]
<Algebr> right
<Drup> (Side note; this is the 3rd reactJs binding attempt)
<Algebr> I count 5th
hay207 has quit [Read error: Connection reset by peer]
hay207 has joined #ocaml
noethics has quit [Remote host closed the connection]
noethics has joined #ocaml
myst|fon has quit [Quit: Connection closed for inactivity]
Reshi has quit [Quit: WeeChat 1.4]
M-pesterhazy has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
octachron has quit [Quit: Page closed]
mistermetaphor has joined #ocaml
wiredsister has joined #ocaml
wiredsister has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
wiredsister has joined #ocaml
wiredsister has quit [Client Quit]
mistermetaphor has quit [Remote host closed the connection]
wiredsister has joined #ocaml
aantron has quit [Ping timeout: 260 seconds]
nicholasf has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
hay207 has quit [Quit: Konversation terminated!]
sspi has quit [Ping timeout: 260 seconds]
NingaLeaf123 has joined #ocaml
emmanueloga has quit [Ping timeout: 260 seconds]
Guest33283_ has quit [Ping timeout: 260 seconds]
ggherdov has quit [Ping timeout: 260 seconds]
chenglou has quit [Ping timeout: 260 seconds]
sspi has joined #ocaml
NingaLeaf has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 252 seconds]
Guest33283_ has joined #ocaml
srcerer has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0.1/20160315153207]]
chenglou has joined #ocaml
nicholasf has quit [Remote host closed the connection]
emmanueloga has joined #ocaml
dsheets has joined #ocaml
TheLemonMan has joined #ocaml
srcerer has joined #ocaml
thibm has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
struktured has joined #ocaml
govg has joined #ocaml
ggherdov has joined #ocaml
sh0t has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
nicholasf has joined #ocaml
hcarty1 has joined #ocaml
hcarty has quit [Ping timeout: 250 seconds]
kushal has quit [Quit: Leaving]
wiredsister has quit [Ping timeout: 276 seconds]
aantron has joined #ocaml
rgrinberg has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Algebr has quit [Ping timeout: 252 seconds]
BitPuffin has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jmct has quit []
kolko has quit [Ping timeout: 244 seconds]
whitequark has joined #ocaml
* whitequark stares at OCamlMakefile
* whitequark sets it on fire
<whitequark> it doesn't use ocamlfind by default and it doesn't use it ever for building C sources :/ :/
<adrien> it also predates ocamlfind :D
<adrien> but I remembered it in a mostly positive way
<adrien> and it's not too big
<whitequark> it's not literally the worst buildsystem i have seen
<whitequark> (there are many contenders for literally the worst ocaml buildsystem, in my opinion)
<whitequark> but it's actually less helpful than oasis
<whitequark> hm
<whitequark> easier to patch than oasis, too
<whitequark> can you believe i ship in-tree patches to disable dll* generation in oasis that modify generated files? :/
struktured has quit [Ping timeout: 276 seconds]
<adrien> : D
<companion_cube> whitequark: why is patching oasis that hard? the maintainer won't accept changes?
d0nn1e has joined #ocaml
govg has quit [Quit: leaving]
<whitequark> companion_cube: i had to do somewhere between 25 and 75 package ports to windows, android and ios, depending on how you count
<companion_cube> you're crazy
<companion_cube> in a good way, but crazy nonetheless :D
<whitequark> there are only so many levels of yak shaving that i can afford
<whitequark> getting stuff into ocaml buildsystem: yes
<whitequark> fixing buildsystems of individual packages: yes
<whitequark> reworking how flexdll works so you can cross-compile from linux: yes
<whitequark> completely redoing the autodetection code in ctypes: yes
<rgrinberg> companion_cube: will your fork accept patches? :P
<whitequark> fixing oasis so that i can fix packages that use oasis so that i can disable one thing: fuck no
<adrien> iteration time for such things is way too high
<whitequark> and then i upgrade the package to a new version, and some forgot to use ocamlfind somewhere, AGAIN
<whitequark> and i have to ship patches again
<companion_cube> rgrinberg: I'm actaully going to try not to fork
<whitequark> yes. you should pitchfork it instead. and torch
<companion_cube> erf
slash^ has quit [Read error: Connection reset by peer]
<whitequark> and rip off all the no-ocamlfind detection code that thinks it knows how to get $(CC)
<rgrinberg> companion_cube: i'd say to just run ahead with it for now though. I think it's very unlikely your stuff will get merged in the short-medium future anyway
<rgrinberg> and you can ship us a cubeasis with all those missing patches in gh meanwhile :P
<companion_cube> bah :D
govg has joined #ocaml
<whitequark> seriously, most ocaml buildsystem would be improved with some sort of automated mechanism that slaps an author trying to do clever things with a giant pink "JUST USE OCAMLFIND" plushie
<whitequark> today in horrifying discoveries: the ocaml buildsystem tries to figure out if it needs to align doubles by setting a handler for SIGBUS and longjmp'ing out of it
kolko has joined #ocaml
<whitequark> not even siglongjmp!
<whitequark> *sob*
<Drup> whitequark: please give us your notation on a rate from 1 to ω
<whitequark> notation?
<Drup> participants: raw ocamlbuild, oasis, topkg, omake, OCamlMakefile (others ?)
<Drup> (lower is better)
<companion_cube> from ε to 1, you mean
<Drup> whitequark: grading
<whitequark> oasis is, surprisingly, the easiest to cross-compile is
<Drup> companion_cube: either way, crapyness is unbounded, so we must give whitequark the means to express himself
<whitequark> it tries to detect so many clever things but then doesn't actually use any of those
<whitequark> so I can just let it think whatever it wants, put garbage in setup.data, and then run ocamlbuild quietly
<whitequark> close behind it are topkg and raw ocamlbuild, tied, which require slightly more work than oasis for some reason that eludes me right now
<Drup> whitequark: yeah, I noticed that as well, lot's of things are completely unused
<Drup> I had a certain "wat" moment
<whitequark> I think ext_dll is notably missing from topkg whereas with oasis I can just --override it
<whitequark> ext_dll override
<whitequark> but it's a trivial topkg patch so i don't complain a lot. and I think dbuenzli fixed it anyway.
<whitequark> then it's ocamlmakefile. it requires more work than ocamlbuild and it doesn't handle ocamlfind install, but it's not significantly more work than overriding all the things that need to be overridden in oasis
Algebr has joined #ocaml
<whitequark> after a good distance it's handwritten makefiles, almost uniformly of low quality and I think I spent at least 1/3 of time patching badly written handwritten makfeiles
octachron has joined #ocaml
<Drup> Oh, I forgot ocp-build in the participants
<struk|desk> companion_cube: re: gen I added the since tags, but didn't rebase the commit. let me know if you just want one big commit and I'll do so
<whitequark> and somewhere at ω it is omake, because I had to figure out its baroque syntax AND completely rewrite the entire buildsystem inline in the opam script with ocamlc commands
simka has joined #ocaml
<companion_cube> struk|desk: oh, that's fine
<whitequark> "ocp-build" *eyes fill with blood*
govg has quit [Ping timeout: 276 seconds]
<companion_cube> :D
* companion_cube images whitequark as a level boss in Doom
<struk|desk> you never have enough ammo for those bosses
<whitequark> aleph-1
<whitequark> is where ocp-build is
<companion_cube> now I wonder if I could make a system that ranks higher than ocp-build
<companion_cube> aleph-2? challenge accepted!
<companion_cube> if $username == "whitequark" ; do export CC=g++ ; fi
<whitequark> companion_cube: I don't think you are going to achieve aleph-2 unless it is written in a language whose sole compiler runs on System-360
<gasche> rgrinberg: on the contrary, I think it would be very nice for companion_cube to try to send patches to Sylvain
<whitequark> because anything less is not baroque enough. ocp-build sets a high bar
<companion_cube> whitequark: awww
<gasche> Sylvain has been pouring a lot of work into oasis, that is evidently helpful to the community, and hasn't got many thanks for it
<companion_cube> I've been in touch with him, and he seems ok with the idea of refactoring oasis, so it's cool
<whitequark> gasche: frankly I think that oasis would be *more* useful had *less* work gone into it
<gasche> in his stead I would be sad to see someone not even attempt to share work when reusing my tool
<whitequark> it is overengineered outside and even more overengineered inside, which makes contributing particularly painful
<companion_cube> I didn't look at the plugins much yet, but the core is not so bad, really
<whitequark> I've considered that once or twice but making trivial changes required going through multiple layers of superfluois indirection
<adrien> whitequark: well, the ocaml configure script is planned to go away and be replaced with autoconf this year (no trace of automake nor libtool afaiu) so at least the tests should be much beter :P
<companion_cube> except the parser, which should die in a thousand suns
<gasche> well the fact that nobody helped him for a very long while may be related to the current isolated/overcomplicated state
<whitequark> adrien: IMO the tests should be killed entirely
<adrien> they will :P
<whitequark> good
<companion_cube> wait, the compiler tests?
<rgrinberg> gasche: sure he send them upstream, I just wouldn't wait for them to get merged and just continuing iterating
<whitequark> as for the sizeof checks you can do the same as I did for ctypes
<adrien> companion_cube: ./configue
<adrien> companion_cube: ./configure
<companion_cube> ah
<whitequark> there's a somewhat less gross way to achieve the same thing as I did in that PR if you know you have nm or size
<adrien> whitequark: do you know how well libffi actually works on windows?
<whitequark> adrien: it works
<whitequark> e.g. python uses it extensively
<adrien> true
<adrien> but let's not talk about building python (with mingw*)
<whitequark> yes, let's not talk about python
<adrien> :)
<Drup> gasche: unfortunatly, that tends to be a self-reinforcing circle :/
lokien_ has joined #ocaml
Algebr has quit [*.net *.split]
d0nn1e has quit [*.net *.split]
rwmjones has quit [*.net *.split]
hyperbor1ean has quit [*.net *.split]
swistak35_ has quit [*.net *.split]
cross_ has quit [*.net *.split]
ski has quit [*.net *.split]
iosys has quit [*.net *.split]
mehdib has quit [*.net *.split]
destrius has quit [*.net *.split]
artart78 has quit [*.net *.split]
sigjuice has quit [*.net *.split]
picolino has quit [*.net *.split]
octachron has quit [*.net *.split]
jackweirdy has quit [*.net *.split]
ggole has quit [*.net *.split]
sepp2k has quit [*.net *.split]
wolfcore has quit [*.net *.split]
badon has quit [*.net *.split]
cthuluh has quit [*.net *.split]
cow-orker has quit [*.net *.split]
cdidd has quit [*.net *.split]
christoph_debian has quit [*.net *.split]
mhinz has quit [*.net *.split]
djellemah_ has quit [*.net *.split]
tristero has quit [*.net *.split]
jknick has quit [*.net *.split]
Intensity has quit [*.net *.split]
please_help has quit [*.net *.split]
tobast has quit [*.net *.split]
kandu has quit [*.net *.split]
nicoo has quit [*.net *.split]
k1000 has quit [*.net *.split]
mattrepl has quit [*.net *.split]
git-commit has quit [*.net *.split]
gustav___ has quit [*.net *.split]
badon has joined #ocaml
jeffmo has quit [Remote host closed the connection]
M-martinklepsch has quit [Ping timeout: 276 seconds]
M-Illandan1 has quit [Ping timeout: 260 seconds]
jeffmo has joined #ocaml
thibm has quit [Ping timeout: 260 seconds]
<gasche> Drup: precisely, the point is to encourage companion_cube to make it a bit more social
<gasche> (this takes efforts on both sides)
<companion_cube> well, I'm trying to
<gasche> thanks :-)
<companion_cube> for instance, with a nice parser in its own repo ;)
jackweirdy has joined #ocaml
sepp2k has joined #ocaml
cthuluh has joined #ocaml
wolfcore has joined #ocaml
cow-orker has joined #ocaml
christoph_debian has joined #ocaml
cdidd has joined #ocaml
mhinz has joined #ocaml
djellemah_ has joined #ocaml
tristero has joined #ocaml
jknick has joined #ocaml
Intensity has joined #ocaml
please_help has joined #ocaml
tobast has joined #ocaml
kandu has joined #ocaml
nicoo has joined #ocaml
mattrepl has joined #ocaml
k1000 has joined #ocaml
git-commit has joined #ocaml
gustav___ has joined #ocaml
M-martinklepsch has joined #ocaml
Algebr has joined #ocaml
d0nn1e has joined #ocaml
hyperbor1ean has joined #ocaml
rwmjones has joined #ocaml
swistak35_ has joined #ocaml
ski has joined #ocaml
cross_ has joined #ocaml
iosys has joined #ocaml
mehdib has joined #ocaml
sigjuice has joined #ocaml
destrius has joined #ocaml
artart78 has joined #ocaml
picolino has joined #ocaml
pierpa has quit [Ping timeout: 246 seconds]
M-martinklepsch has quit [Changing host]
M-martinklepsch has joined #ocaml
M-Illandan has joined #ocaml
srcerer has quit [Ping timeout: 260 seconds]
Sorella has joined #ocaml
kakadu has joined #ocaml
<struk|desk> sigh..oasis is a PITA..maybe I should finally master ocamlbuild like I've been meaning to the last 3 years
thibm has joined #ocaml
<struk|desk> ha I just realized oasis was defended on here recently...am I being too harsh on it?
<Algebr> I like oasis and welcome improvements to it
<companion_cube> the thing is, ocamlbuild cannot replace everything oasis does
<rgrinberg> well the bandwidth available for oasis patches is microsopic
<companion_cube> ocamlbuild is a build system, oasis manages (almost) the whole project
<rgrinberg> so my crystal balls tells me improvements aren't likely
<companion_cube> Gerd managed to get his support for omake merged!
<rgrinberg> only 8 months later!
<rgrinberg> the 8 months figure is made up..
<struk|desk> I'm probably just not fantastic w/oasis either. I still can't figure out how to optionally build stuff based on presence of packages using opam or ocamlfind as a detection mechanism.
sepp2k has quit [Quit: Leaving.]
<Drup> struk|desk: with oasis ? It's .. quite simple
<Drup> that's eve one of the thing that is explained in the manual
<struk|desk> Drup: have an example on github? I can optionall build stuff, and I can make opam optionally declare some packages..but can't combine the two
<companion_cube> look at Lwt's _oasis
<struk|desk> companion_cube: I see flag(whatever) such as "syntax" and "unix" but how are those flags set?
<Drup> struk|desk: look at the opam file ...
<struk|desk> Drup: oh I see...got it. well that helps.
dsheets has joined #ocaml
<companion_cube> heh :D
<struk|desk> now I can add some heavy dependencies in my current library without caring so much. yay
dsheets has quit [Ping timeout: 250 seconds]
oskarth has joined #ocaml
pyon is now known as mechanical-pyon
mistermetaphor has joined #ocaml
simka has quit [Quit: Page closed]
jackweirdy has quit [Quit: Textual IRC Client: www.textualapp.com]
<nullcatxxx_> i'm glad I have a IRC bouncer so I can read those interesting discussion about 'merica
<nullcatxxx_> (and yeah, I think Europe/UK/Japan are indeed much better than U.S ...)
<struk|desk> Drup, companion_cube: that discover.ml file in lwt is 700 lines..I hope I don't need (all|any|some) of that. assuming you can detect opam package presencee with just opam + _oasis files right?
<nullcatxxx_> ok. please continue ocaml related discussion...
<Algebr> caml caml caml
<companion_cube> struk|desk: hu, I know nothing about discover.ml
<companion_cube> but in my projets, I use opam+_oasis for optional dependencies, and it works fine
thibm has left #ocaml ["WeeChat 1.4"]
<struk|desk> companion_cube: ok
<companion_cube> (look at containers' if you want(
<companion_cube> )
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
nullcatxxx_ has quit [Quit: bye]
obj_magic has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<obj_magic> better nickname
<companion_cube> oh my.
<Drup> struk|desk: I'm not even sure it's still used :x
adelbertc has joined #ocaml
<whitequark> hcarty1: haha, looks like i needed one of your libraries
nicholasf has quit [Remote host closed the connection]
<Algebr> Drup: I some advantage, I can just ask the creator for clarification.
<Algebr> on reactjs
nicholasf has joined #ocaml
nicholasf has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
A1977494 has quit [Remote host closed the connection]
<Algebr> nice npm deprecated message: npm WARN deprecated line-numbers@0.2.0: Copy its ~20 LOC directly into your code instead.
<companion_cube> huhu
<companion_cube> man, 20 LOC, that's hard to maitnain yourself!
<pecan> Algebr: b-but my modularity and c-code reuse!
noethics has quit [Remote host closed the connection]
noethics has joined #ocaml
<Algebr> heh, to be fair, what's the tipping point, 100 LOC?
<companion_cube> depends on how complex the code is
<Algebr> this is like the sorities paradox
<Algebr> exactly, what if that 20 LOC was some crypto shit that I'll never do right
<companion_cube> the, hmm, what?
<pecan> good point about e.g. crypto
<Algebr> companion_cube: take a grain of sand away from a heap of sand, after you keep taking a single grain away when does it stop being a heap of sand
<Algebr> although I don't think "line-numers" is anything special...
<pecan> but otherwise... idk, I think I'd go by function count
wirrbel has quit [Ping timeout: 264 seconds]
<companion_cube> Algebr: yeah, ok
<hcarty1> whitequark: ?
<hcarty1> Oh wow... I didn't think that would ever end up used
<hcarty1> Thanks for the bug report?
<hcarty1> I didn't get a notification from github about the new issue either
hcarty1 is now known as hcarty
<whitequark> (I didn't think that would ever end up used) worrying :O
<mfp> whitequark: do you accept PRs for the opam-cross-windows repository? I've ported a number of packages (atd, batteries, camlp4, cmdliner, cryptokit, csv, extlib, pcre, react, sqlite3, text so far, will tackle curl, ssl and lwt soon)
<whitequark> mfp: yes
<hcarty> whitequark: I didn't think that there was an intersection between OCaml users and the remote sensing/geography-focused folks beyond myself
<whitequark> also wow that's a lot of packages
<whitequark> hcarty: one word: seaiq
cthuluh has quit [Ping timeout: 240 seconds]
cthuluh has joined #ocaml
<mfp> usually the OCAMLFIND_TOOLCHAIN=windows thing in opam is enough, kudos on your cross-compiler work!
nicholasf has quit [Remote host closed the connection]
<whitequark> i'm lazy :p
<whitequark> can't possibly be arsed to do something complex for every single package. had to figure out how to do it simple
<mfp> the hardest one so far was batteries because it interlaced host/target build (myocamlbuild ended up built for the target, and there were 2 pre-processing stages)
nicholasf has joined #ocaml
<whitequark> needs ocamlbuild -just-plugin
<mfp> well, I "solved" it by adding a ["ocamlbuild"] line to opam to build it with the regular toolchain
<Drup> whitequark: isnt't that pretty much "ocamlc myocamlbuild.ml -o myocamlbuild" (with the relevant libraries)
<whitequark> Drup: -just-plugin is more semantically accurate
<Drup> sure
<whitequark> also works with plugin tags
<whitequark> mfp: btw have you seen how I ported camlp4 to opam-cross-android?
<whitequark> hm, looks like I killed that for some reason
<mfp> nope
<whitequark> maybe because I had an especially acute episode of camlp4 hate
<whitequark> sec
<mfp> camlp4 seemed easy to port BUT I haven't really tested the package yet
<_y> Algebr, is that the “dumb package whose sudden withdrawal by the infuriated author caused the whole javascript world to break”?
<whitequark> Algebr: that was left-pad
<whitequark> er _y
<_y> right
<Drup> whitequark: how annoying ppxs are for your stuff ?
<whitequark> basically for a pure ppx you build it with a host toolchain and install into target locations
<whitequark> for a ppx+runtime, like the new ppx_deriving and everything that depends on it... you need some patchwork
<mfp> whitequark: I did this which boils down to the same I guess (but with the extra build) http://paste.debian.net/679853/
<whitequark> right, I prefer not having an additional build to avoid rebuilds
<mfp> indeed, build with host, install install to target
<Drup> whitequark: and for a ppx used internally in the library ? :cringe a bit:
<whitequark> Drup: htm
<whitequark> hrm
<_y> i just started to look at the ppx stuff
<whitequark> Drup: well it should be the same as for ppx+runtime case
<whitequark> you depend on the host package
<Drup> ok
<whitequark> and then you symlink it into wherever you expect to find it
<_y> will the pre-ppx lwt syntax extension be (or already is) deprecated?
<whitequark> and possibly disable building that and/or interpose the dependency
<whitequark> _y: it effectively is, you can't use any new features with camlp4
<whitequark> attributes are almost entirely broken, inline records are entirely broken
<whitequark> mfp: i appreciate your work but expect some review comments :]
<_y> whitequark, because camlp4 parser has not be updated to newer versions of ocaml?
<whitequark> i find that the only way to keep cross-compiling manageable is to make them as elegant as possible. which requires many iterations often...
<whitequark> _y: yes
<whitequark> camlp4 is a living nightmare
<_y> so is camlp4 officially discontinued?
<Algebr> whitequark: how did you get ocamlfind to work with opam-cross-android
<mfp> whitequark: it's fine, the opam syntax is such that the review comments will be about as long as the diff heh
<whitequark> _y: no
<whitequark> it's kept on a sort of life support
<Drup> it's slowly fading into the nether.
<whitequark> it's updated (usually too late) to track new ocaml versions so that it sort of compiles on them
<whitequark> and this only really helps ancient code that wasn't updated to not use camlp4 yet
<whitequark> there's not too much such code anymore anyway
<gasche> that seems a bit excessive; Coq uses camlp{4,5} for example
<gasche> but I would agree with "support codebase already using camlp*" as an overall goal
<_y> both?!
badon has quit [Disconnected by services]
badon_ has joined #ocaml
<whitequark> Algebr: ocamlfind -toolchain
badon_ is now known as badon
<gasche> note that the maintenance model is "you get what you ask for": if you want inline records to be supported in camlp{4,5}, you have to ask the maintainers to add it
<gasche> (with a use-case, presumably)
<whitequark> gasche: I asked for [@@deriving] years ago and got nothing
<gasche> attributes and extensions are another {nest,can} of worms
<gasche> I was thinking of minor surface language changes
<whitequark> well, I am entitled to my opinion. camlp4 is bitrotting, and even more so, it has mostly bitrotted
<gasche> I was pointing out that the claim that there is no more code using camlp* around is not quite correct
<whitequark> oh, yeah
<whitequark> I was more thinking of what a casual ocaml user would encounter
<gasche> it is in the fast-moving work of hype-sensitive early adopters
<gasche> but a lot of the bigger codebases out there move at a slower pace
<whitequark> transitive dependencies of utop no longer include camlp4
<whitequark> many packages that used camlp4 just for #ifdef are now using cppo
<whitequark> etc
<whitequark> more precisely, i was speaking about the more trivial cases, projects that were never heavy users of camlp4 in first place.
<Drup> We should transition js_of_ocaml/eliom too ...
<whitequark> wasn't that done already?
<gasche> given Jérémie's (understandable) unwillingness to pour efforts into camlp4 maintenance, I would agree that moving away is a reasonable choice
<Drup> whitequark: no, because it breaks compat with old versions
<Drup> (js_of_ocaml is still compatible with 4.00)
<whitequark> U+1f525
<Drup> and unlike lwt, you really can't manually expand that one
<Drup> (well you can, but you lose all type safety, so ...)
Simn has quit [Quit: Leaving]
<whitequark> needs an automated tool to migrate code.
<Drup> whitequark: sure, we have that
hcarty has quit [Ping timeout: 276 seconds]
<whitequark> oh
<whitequark> then just U+1f525 it
<Drup> for eliom, probably quite soon yes. For jsoo, we will see how compat goes
<whitequark> companion_cube: nice
sh0t has quit [Remote host closed the connection]
<mfp> huh could we turn this into a trend?
<Drup> mfp: turn what ?
<mfp> showcase every new OCaml lib by building a toy build system with it
<Drup> :D
* whitequark stares at mfp
<companion_cube> :D
<whitequark> no
<Drup> I was going to answer "I could do that with functoria", but oh wait
kakadu has quit [Remote host closed the connection]
<Drup> x)
<companion_cube> Drup: DO IT
<mfp> so Haskell had monad tutorials, well we have N + 1 build systems!
<companion_cube> alternate title for this post: "maki: the build system system"
<Drup> we must go deeper
<Drup> whitequark: duh
<whitequark> you could be as incomprehensible as biology if you make all the build systems depend on each other
<whitequark> preferably in a circular way
tane has quit [Quit: Verlassend]
destrius has quit [Remote host closed the connection]
<whitequark> and rely on a fork of ocp-build that runs on 3.12.1 exclusively
<whitequark> at the same time, some of the build systems should require ppx
<mfp> the salient point of that pic is that it all leads to Alzheimer's
<whitequark> oh, nevermind that part
<whitequark> this is like saying that a malfunction in one of the 10000 linux kernel c files leads to kernel panics
<whitequark> that is, true, but not an especially useful statement
<mfp> but... that's just the expected result of working with circularly dependent build systems
<whitequark> the MAPK pathway governs signal transduction. like... signal transduction *in general*
<whitequark> I'd be surprised if here's a disease where it does *not* play a role
<companion_cube> whitequark: the build systems chain must go through npm
<whitequark> companion_cube: U+1f525
oskarth has quit [Quit: Connection closed for inactivity]
<Drup> (mirage.io refuses to load right now :<)
<whitequark> Drup: github has opinions https://imgur.com/1rWuB1D
<Drup> :D
<struk|desk> Drup: so regarding discover.ml, it is supposed used in a some post conf hook, "PostConfCommand: ocaml discover.ml ..."
<Drup> struk|desk: the fact that it's launched doesn't necessarily mean that we need all of it :D
<Drup> I never really touched that part, tbh
<struk|desk> Drup: fair enough..I suppose what I am really asking is, do you need to write something in ml and invoke it like that, to figure out if an opam / ocamlfind friendly package is installed
<Drup> I'm not even sure what is discover.ml for
<struk|desk> lots of stuff..detected c headers / libraries, generating more ocaml code
<Drup> so, yeah, you usually don't need it
lokien_ has quit [Quit: Connection closed for inactivity]
<Algebr> Drup: how do you usually deal with this from JS in jsoo
<Drup> Algebr: "this" ?
<Algebr> usages of JS's this in JS libraries
<Drup> Oh.
<Drup> Inside object%js or not ?
<Algebr> not
<Algebr> plain Js.Unsafe.variable?
<Drup> No o_o
<Drup> wrap_meth_callback, in particular
<Drup> after that, it depends what you are trying to do
dsheets has joined #ocaml
<Algebr> I need a handle on this
dsheets has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Ping timeout: 260 seconds]
<Algebr> Why can't you do this, I get to the effect that self type cannot escape its class, how can I get what I want, along these lines: class foo (arg: fun foo -> unit) = object(self) method _call = arg self end
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
rgrinberg has joined #ocaml
idegen has joined #ocaml
idegen has quit [Client Quit]
deocmivi has joined #ocaml