adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has joined #ocaml
ziyourenxiang has quit [Ping timeout: 276 seconds]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
ctrlsbstr has quit [Client Quit]
ctrlsbstr has joined #ocaml
marxS has quit [Quit: Leaving]
spew has quit [Ping timeout: 245 seconds]
cobreadmonster has quit [Quit: Connection closed for inactivity]
dedgrant has quit [Ping timeout: 245 seconds]
madroach has quit [Ping timeout: 265 seconds]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_berke_> this oasis/ocamlbuild compile time is killing me... by the time it's done I've already reddited and forgot what I just did.
madroach has joined #ocaml
<Enjolras> _berke_: have you tried C++ or even rust 😀
hdon has quit [Ping timeout: 260 seconds]
<_berke_> enjolras: hahahaha... yes I know that with C++ it would take hours
<_berke_> it's really an oasis/ocamlbuild problem. the ocaml compiler itself is superfast. but, for some reason, with my oasis/ocamlbuild setup it recompiles a lot of unrelated stuff every time I make a change.
<Enjolras> yes, it's not as good as dune
<_berke_> I know I want to switch to dune but I need to figure out how to compile & link a few bits of fortran
<Enjolras> i'm still using ocamlbuild because i've no idea how to do this kind of stuff with dune too :)
<_berke_> so we're in the same boat. what is it that you need to do with dune?
hdon has joined #ocaml
<Enjolras> _berke_: i need it to list files, like .proto files for protobuf, and generate stuffs, then use it to compile the binary
<Enjolras> right now i don't know how to do that without listing all files manually and copy pasting rules
zmt00 has quit [Read error: Connection reset by peer]
zmt00 has joined #ocaml
<_berke_> I was reading the docs and that sounds like it might be covered, there is support for running preprocessors or code generators. did you check?
pierpa has quit [Quit: Page closed]
al-damiri has quit [Quit: Connection closed for inactivity]
spew has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 264 seconds]
zlsyx has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
eikke has joined #ocaml
pierpal has joined #ocaml
zlsyx has quit [Quit: Leaving...]
spew has quit [Quit: Leaving]
malina has quit [Ping timeout: 248 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
cobreadmonster has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
hdon has joined #ocaml
hdon has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
bairui has quit [Ping timeout: 260 seconds]
pierpal has quit [Ping timeout: 256 seconds]
bairui has joined #ocaml
<rgr[m]> def`: my use case is that I'm trying to get the statistical memprof working with dune and I can't use ocamlfind to create a dune binary :). Porting things to dune is the easiest way.
pierpal has joined #ocaml
<rgr[m]> _berke_: dune is indeed windows friendly :)
hdon has joined #ocaml
muelleme has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
gtrak has quit [Ping timeout: 248 seconds]
gtrak has joined #ocaml
muelleme has quit [Ping timeout: 240 seconds]
jimmyrcom has quit [Ping timeout: 260 seconds]
<discord2> <khady> > berke: it's really an oasis/ocamlbuild problem. the ocaml compiler itself is superfast. but, for some reason, with my oasis/ocamlbuild setup it recompiles a lot of unrelated stuff every time I make a change.
<discord2> <khady> This is weird. ocamlbuild is supposed to be pretty good at finding what needs to be recompiled
mbuf has joined #ocaml
muelleme has joined #ocaml
tarptaeya has joined #ocaml
muelleme has quit [Ping timeout: 245 seconds]
muelleme has joined #ocaml
<def`> It was improved in recent versions, but when merlin was using ocamlbuild, it sometime spent 10 secondes doing "nothing".
<def`> That is, just checking that there was nothing to rebuild took a long time.
<def`> That plus the lack of parallelism killed the performance.
xuanrui has joined #ocaml
muelleme has quit [Ping timeout: 252 seconds]
Guest46886 is now known as awal
<Enjolras> i guess i've different expectations. For me 10s is fast :>
<Enjolras> but it is true that ocamlbuild/ocamldep is very conservative if you don't have a .mli
<Enjolras> most of the times it rebuilds all the chain even if it looks like nothing changed semantically
sz0 has quit [Quit: Connection closed for inactivity]
xuanrui has quit [Quit: Leaving]
JimmyRcom_ has quit [Ping timeout: 252 seconds]
_berke_ has quit [Remote host closed the connection]
argent_smith has joined #ocaml
JimmyRcom_ has joined #ocaml
hdon has quit [Ping timeout: 260 seconds]
JimmyRcom_ has quit [Ping timeout: 248 seconds]
sagotch has joined #ocaml
muelleme has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
muelleme has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
jaar has joined #ocaml
pierpal has joined #ocaml
pierpal has joined #ocaml
hdon has joined #ocaml
Guest38857 has quit [Ping timeout: 264 seconds]
muelleme has joined #ocaml
hdon has quit [Ping timeout: 256 seconds]
muelleme has quit [Ping timeout: 248 seconds]
salc has joined #ocaml
rtb has joined #ocaml
<Leonidas> Enjolras: We're compiling .proto files with dune just fine. It is a little bit of boilerplate but not that bad
<Enjolras> last time i tried to use dune with jbuild syntax only to do such things i ended up with a shell script generating a 350lines jbuild
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
dario9 has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
gtrak has quit [Ping timeout: 252 seconds]
gtrak has joined #ocaml
keep_learning is now known as keep_away
<discord2> <loxs> I have a nested module, how can I abstract a type from the nested module so that is not hidden to the parent module, but hidden to the modules that use the parent module? I can't seem to define something like MyNested.type in the signature of the parent module?
zolk3ri has joined #ocaml
<discord2> <rizo> Hm, if you hide the type in the parent's signature (for the nested module) it shouldn't be visible to the outside world, even if the type is not abstract inside the module.
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
<discord2> <rizo> In other words: don't give a signature to the nested module inside parent, define the signature for the entire parent.
<discord2> <loxs> thanks
pierpal has quit [Ping timeout: 268 seconds]
jaar has quit [Remote host closed the connection]
<discord2> <loxs> what I was missing is to define the module one more time in the parent module like type my_type = Nested.t
jaar has joined #ocaml
<discord2> <loxs> Also, can I expose the nested module somehow, so that I can use its Map comparator witness?
hdon has joined #ocaml
<octachron> loxs, "module A: sig module Nested:sig ... end ... end" should work.
<discord2> <loxs> thanks
hdon has quit [Ping timeout: 240 seconds]
<greenbagels> ocaml is a pretty language
<greenbagels> I'm gonna try to see if I can start using it for hpc code :p
pierpal has joined #ocaml
rtb has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
silver has joined #ocaml
dario9 has quit [Quit: Konversation terminated!]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 276 seconds]
Guest89064 has joined #ocaml
spew has joined #ocaml
ziyourenxiang has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<Leonidas> hmm, looks like Jane Street bought/hired uJamJar Ltd :D
<discord2> <Bluddy> yeah I've avoided JS's ocaml-to-hardware talks, but I guess it makes sense if you're looking for the lowest latency possible
FreeBirdLjj has joined #ocaml
Guest80739 is now known as dmbaturin
dmbaturin is now known as Guest91988
bairui has quit [Ping timeout: 260 seconds]
bairui has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 268 seconds]
hannes has quit [Remote host closed the connection]
shinnya has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 260 seconds]
gtrak has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
mbuf has quit [Read error: Connection reset by peer]
Guest89064 has quit [Remote host closed the connection]
gtrak has joined #ocaml
pierpal has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
Haudegen has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<discord2> <Perry> I went to their OCaml to Hardware talk. It was interesting, but I was expecting that they were going to have done something more BlueSpec-y.
tobiasBora has quit [Quit: WeeChat 1.6]
sh0t has joined #ocaml
tobiasBora has joined #ocaml
mbuf has joined #ocaml
tobiasBora has quit [Client Quit]
<discord2> <Bluddy> Don't make me google it...
tobiasBora has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Remote host closed the connection]
<discord2> <mars0i> When my app raises an exception, what always comes out is Exn.handle_uncaught could not print; exiting anyway. I don't catch exceptions because I only use them when the problem should not have happened, so the app should die. But I'd like to know where it failed, so I make sure the exception message tells me. Except that I don't see the message. It sounds like something is trying to print the exception message (to stderr, I assume), but
<discord2> can't. Does this sound familiar? Any ideas what I should look at?
<discord2> <mars0i> Works in utop, just not in the exe.
FreeBirdLjj has joined #ocaml
mk9 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
emias has quit [Quit: Reboot.]
emias has joined #ocaml
BitPuffin has joined #ocaml
emias has quit [Client Quit]
<discord2> <mars0i> OK, this seems to have something to do with using Core.Command. That's probably enough for me to figure out what the problem is.
JimmyRcom_ has joined #ocaml
al-damiri has joined #ocaml
_berke_ has joined #ocaml
mk9 has quit [Quit: mk9]
mbuf has quit [Quit: Leaving]
hdon has joined #ocaml
FreeBirdLjj has joined #ocaml
hdon has quit [Ping timeout: 245 seconds]
emias has joined #ocaml
Haudegen has quit [Remote host closed the connection]
sagotch has quit [Quit: Page closed]
sajuuk1 has joined #ocaml
dedgrant has joined #ocaml
sajuuk1 has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
exarkun has quit [Ping timeout: 252 seconds]
BitPuffin has quit [Ping timeout: 260 seconds]
pierpal has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
cobreadmonster has joined #ocaml
hdon has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
hdon has quit [Ping timeout: 252 seconds]
jjmeyer0 has joined #ocaml
ziyourenxiang has quit [Ping timeout: 245 seconds]
jaar has quit [Quit: Leaving]
jnavila has joined #ocaml
hdon has joined #ocaml
sajuuk1 has joined #ocaml
hannes` has joined #ocaml
larhat has joined #ocaml
hannes` is now known as hannes
larhat has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
malina has joined #ocaml
<Guest91988> In ocamllex, how do I return more than one token?
<Guest91988> I want to inject a virtual token in certain cases for a lexer hack.
FreeBirdLjj has quit [Ping timeout: 252 seconds]
jnavila has quit [Ping timeout: 240 seconds]
sajuuk1 has quit [Ping timeout: 252 seconds]
<def`> the right-handside of a lexer is any expression of your choice
<def`> you can return a list of tokens
<def`> then you can implement a wrapper on top of it to return these tokens one by one
<Guest91988> def`: Yes, that's the confusing part to me. How do I return them one by one?
Guest91988 is now known as dmbaturin
dmbaturin is now known as Guest32517
sajuuk1 has joined #ocaml
sajuuk1 has quit [Client Quit]
sajuuk1 has joined #ocaml
<Guest32517> Finally I've regained my nick.
<Guest32517> Or did I? :)
<flux> you sure did, Guest32517
<Guest32517> Ghost doesn't work somehow. "dmbaturin is not online". Well, whatever.
sajuuk1 has quit [Ping timeout: 268 seconds]
<discord2> <Bluddy> Guest32517, it's you!
<companion_cube> discord2, it
<companion_cube> it's you!
<discord2> <Bluddy> So happy I've regained my nick as well
hdon has quit [Changing host]
hdon has joined #ocaml
kolko has joined #ocaml
pierpal has joined #ocaml
Guest32517 has quit [Quit: When two people dream the same dream, it's multicast dream routing.]
dmbaturin_ has joined #ocaml
jnavila has joined #ocaml
snhmib has joined #ocaml
FreeBirdLjj has joined #ocaml
jnavila has quit [Ping timeout: 245 seconds]
exarkun has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
<dmbaturin_> def`: Ok, I feel stupid. How does it fit in the lex format of rule ... | <regex> -> <expr>?
<def`> dmbaturin_: in the lexer, you just return a list rather than a single token
<dmbaturin_> def`: Oh, and every parser rule will have to be modified accordingly?
<dmbaturin_> Along with all lexer rules.
<discord2> <Perry> Another possibility: wrap the lexer in a stateful function that maintains a queue of lexemes.
<rgr[m]> def`: i'm trying to make dune do nothing a little faster now :)
<def`> rgr[m]: <3
<def`> dmbaturin_: you cannot modify parser rules
<def`> but you wrap the lexer with the function I provided before passing it to parser rules
<rgr[m]> It takes around 2 seconds for dune to do nothing for a project with ~1000 modules
<def`> Perry: this is what my code is doing precisely :P
al-damiri has quit []
jimmyrcom has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<discord2> <Perry> Ah, sorry, I lost track. Distracted. Apologies.
<Drup> rgr[m]: that's a lot of modules
benizac has joined #ocaml
octarin has joined #ocaml
jnavila has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 264 seconds]
tarptaeya has quit [Quit: Konversation terminated!]
mk9 has joined #ocaml
shinnya has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
baboum has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
kakadu has joined #ocaml
jnavila has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
<dmbaturin_> def`: Ok, I've done it in a worse way: added a bool ref to the prologue and code to set or reset it in other rules, plus the rule for the token in question that emits it conditionally.
<dmbaturin_> That state sadly has to be kept somewhere since the condition is a bit more complex than I initially wanted. All FP community probably hates me now, but by now I don't care, I just want that thing to do what I want it to do.
Guest67422 is now known as theglass
<dmbaturin_> It's already an improvement compared to the thing it's going to replace, which was in perl and from there it only gets worse since it could not even handle the grammar correctly and the fact it ever worked is a lucky coincidence. :)
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 245 seconds]
letoh has quit [Ping timeout: 252 seconds]
baboum has quit [Ping timeout: 252 seconds]
baboum has joined #ocaml
jnavila has quit [Remote host closed the connection]
campesino has joined #ocaml
letoh has joined #ocaml
ctrlsbstr has joined #ocaml
octarin has quit [Remote host closed the connection]
<discord2> <Perry> Is it just me, or has activity in discuss.ocaml.org been slowing down?
<dmbaturin_> It definitely could be more active I think.
kolko has quit [Quit: ZNC - http://znc.in]
sz0 has joined #ocaml
<discord2> <Perry> Not my point. Six months ago I think it was more active. I'm wondering if a lot of discussions are now happening on discord. (The IRC crowd is probably unaware but a lot of chatter is happening on discord.)
<Drup> I don't think so, no
<Drup> I could probably draw the graph of email in my discord inbox, but I'm too lazy right now :)
<Drup> discuss*
<Drup> or is it discourse ? Too many dis*
gtrak has quit [Ping timeout: 240 seconds]
<discord2> <Perry> I could very well be wrong.
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sh0t has quit [Remote host closed the connection]
al-damiri has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
<Leonidas> dmbaturin_: fwiw, you need to call /msg nickserv release if you can't get your nick back. ghost doesn't work, because the user is not online. I have no idea why ghost does not just do both release and ghosting.
pierpa has joined #ocaml
dmbaturin_ is now known as dmbaturin
<dmbaturin> Leonidas: Ah, I see. Seems to have worked.
baboum has quit [Ping timeout: 248 seconds]
argent_smith has quit [Quit: Leaving.]
baboum has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Remote host closed the connection]
larhat has joined #ocaml
ziyourenxiang has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
kakadu has quit [Remote host closed the connection]