adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<Leonidas> flux: are you sure it is possible to inject commands programmatically into the toplevel without writing .ocamlinit files?
johnelse has quit [Quit: leaving]
<Leonidas> Looks like findlibs Topfind can actually do that.
psacrifice has joined #ocaml
psacrifice has quit [Ping timeout: 265 seconds]
silver_ has joined #ocaml
octarin has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
Sorella has joined #ocaml
silver has quit [Ping timeout: 265 seconds]
nomicflux has quit [Quit: nomicflux]
sz0 has quit [Quit: Connection closed for inactivity]
infinity0 has quit [Remote host closed the connection]
<Leonidas> The way the Toploop and Topfind modules work is rather mysterious. They don't seem to exist outside of the toplevel. Anyone knows how it works?
infinity0 has joined #ocaml
silver_ has quit [Quit: rakede]
infinity0 has quit [Remote host closed the connection]
nahra` has joined #ocaml
nahra has quit [Remote host closed the connection]
infinity0 has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
xorpse has quit [Ping timeout: 248 seconds]
xorpse has joined #ocaml
smondet has quit [Ping timeout: 252 seconds]
moei has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
wtetzner has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
scitesy has joined #ocaml
wu_ng has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
LACampbell has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
<LACampbell> is there a platform independent newline constant?
trepta has quit [Ping timeout: 264 seconds]
wtetzner has joined #ocaml
zirman has quit [Remote host closed the connection]
infinity0 has quit [Ping timeout: 245 seconds]
jao has quit [Ping timeout: 252 seconds]
ryanartecona has quit [Quit: ryanartecona]
infinity0 has joined #ocaml
noddy has joined #ocaml
ryanartecona has joined #ocaml
infinity0 has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 246 seconds]
infinity0 has joined #ocaml
wtetzner has quit [Remote host closed the connection]
infinity0 has quit [Ping timeout: 264 seconds]
noddy has quit [Ping timeout: 245 seconds]
infinity0 has joined #ocaml
nomicflux has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
pierpa has quit [Ping timeout: 245 seconds]
rpcope- has quit [Quit: ZNC - http://znc.in]
rpcope has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Ping timeout: 248 seconds]
ryanartecona has quit [Quit: ryanartecona]
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
FreeBirdLjj has joined #ocaml
snhmib has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
scitesy has quit [Quit: AtomicIRC: The nuclear option.]
scitesy has joined #ocaml
snhmib has joined #ocaml
nomicflux has quit [Quit: nomicflux]
snhmib has quit [Ping timeout: 264 seconds]
snhmib has joined #ocaml
ziyourenxiang has joined #ocaml
freusque has joined #ocaml
psacrifice has joined #ocaml
Algebr has joined #ocaml
freusque has quit [Quit: WeeChat 1.4]
zirman has joined #ocaml
psacrifice has quit [Remote host closed the connection]
zirman has quit [Ping timeout: 250 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
psacrifice has joined #ocaml
snhmib has quit [Ping timeout: 260 seconds]
freusque has joined #ocaml
larhat has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
Algebr has quit [Ping timeout: 258 seconds]
snhmib has joined #ocaml
ygrek_ has joined #ocaml
<zozozo> LACampbell: in ocaml program you can use '\n', it will automatically be translated to '\r\n' if your program is compiled/run under windows if I recall correctly
trepta has joined #ocaml
jnavila_ has joined #ocaml
snhmib has quit [Ping timeout: 258 seconds]
trepta has quit [Ping timeout: 258 seconds]
freusque has quit [Ping timeout: 256 seconds]
snhmib has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
freusque has joined #ocaml
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has quit [Ping timeout: 246 seconds]
Simn has joined #ocaml
jao has joined #ocaml
jnavila_ has quit [Ping timeout: 260 seconds]
jnavila_ has joined #ocaml
ygrek_ has quit [Ping timeout: 248 seconds]
_andre has joined #ocaml
LACampbell has quit [Ping timeout: 245 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
jnavila_ has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 258 seconds]
mfp has joined #ocaml
snhmib has quit [Quit: WeeChat 1.4]
snhmib has joined #ocaml
jnavila_ has joined #ocaml
jnavila_ is now known as jnavila__
jnavila__ is now known as jnavila
kakadu has joined #ocaml
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
silver has joined #ocaml
AlexDenisov has joined #ocaml
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freusque has quit [Ping timeout: 264 seconds]
wu_ng has quit [Ping timeout: 248 seconds]
psacrifice has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 260 seconds]
psacrifice has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
freusque has joined #ocaml
cdidd has quit [Ping timeout: 246 seconds]
cdidd has joined #ocaml
Muzer has joined #ocaml
AlexDenisov has joined #ocaml
xorpse has quit [Ping timeout: 264 seconds]
xorpse has joined #ocaml
sh0t has joined #ocaml
zirman has joined #ocaml
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
scitesy has quit [Ping timeout: 258 seconds]
psacrifice has quit [Remote host closed the connection]
pote_ has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has joined #ocaml
AlexDenisov has joined #ocaml
al-damiri has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
rgrinberg has joined #ocaml
xorpse has quit [Ping timeout: 264 seconds]
xorpse has joined #ocaml
nomicflux has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
Flerex has joined #ocaml
octachron has joined #ocaml
Simn has quit [Ping timeout: 265 seconds]
freusque has quit [Ping timeout: 248 seconds]
freusque has joined #ocaml
fraggle-boate has joined #ocaml
wtetzner has joined #ocaml
chindy has joined #ocaml
pierpa has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
<Leonidas> flux: no promises but it looks like the code to load #requires from merlin automatically is mostly in place, so I'm writing a bit of glue code.
<flux> leonidas, !
ziyourenxiang has quit [Quit: Leaving]
<Leonidas> as often, fighting with build systems is probably the biggest issue
jnavila has joined #ocaml
psacrifice has joined #ocaml
Flerex has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
smondet has joined #ocaml
jnavila has quit [Read error: No route to host]
jnavila has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psacrifice has quit [Ping timeout: 246 seconds]
spion has quit [Ping timeout: 260 seconds]
spion has joined #ocaml
psacrifice has joined #ocaml
marsam has joined #ocaml
clockish has quit [Ping timeout: 260 seconds]
clockish has joined #ocaml
psacrifice has quit [Ping timeout: 258 seconds]
groovy2shoes has joined #ocaml
larhat has quit [Quit: Leaving.]
xorpse has quit [Ping timeout: 258 seconds]
clog has quit [Ping timeout: 265 seconds]
psacrifice has joined #ocaml
<Leonidas> def`: what is the easierst way to get the PKG of a .merlin file?
freusque has quit [Ping timeout: 256 seconds]
<Leonidas> def`: looks like Merlin_project.get is the way to get a project value and from there I can retrieve a lot of things but no PKG files?
<Leonidas> s/files/names/
Flerex has joined #ocaml
<Leonidas> but merlin does not seem to expose any findlib package
xyproto has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
chindy has quit [Remote host closed the connection]
orbitz has quit [Quit: leaving]
orbitz has joined #ocaml
clog has joined #ocaml
noddy has joined #ocaml
johnf_ has joined #ocaml
jnavila has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
psacrifi_ has joined #ocaml
psacrifice has quit [Ping timeout: 256 seconds]
infinity0 has quit [Remote host closed the connection]
igt0_ has quit [Quit: Connection closed for inactivity]
infinity0 has joined #ocaml
jao has joined #ocaml
ygrek_ has joined #ocaml
igt0 has joined #ocaml
trepta has joined #ocaml
StatelessCat has joined #ocaml
StatelessCat has joined #ocaml
StatelessCat has quit [Changing host]
jlongster has joined #ocaml
<StatelessCat> help
Algebr has joined #ocaml
* lyxia helps StatelessCat.
<lyxia> Did that help
<StatelessCat> lyxia: ^^
<StatelessCat> thanks
<StatelessCat> yes
<StatelessCat> I oubviously wanted to write «/AMSG --help»
<StatelessCat> But weechat got «AMSG help»
<StatelessCat> wich produce a funny result
<StatelessCat> sorry
<lyxia> oh.
<StatelessCat> And I'm not an Ocaml user.
<StatelessCat> lyxia: (lyxia say: oh.)
<StatelessCat> ^^
<StatelessCat> but I LOVE Ocaml
<StatelessCat> It was my first programming langage
<lyxia> I'm glad you do.
<StatelessCat> Now, I only search time to write again stuffs in Ocaml.
<StatelessCat> And with my Ph.d work...
<StatelessCat> no time...
<StatelessCat> so... Java... Node.js... Bash...
<StatelessCat> And a little of Scala, because FP rox
<StatelessCat> But Scala ir too complex
jlongster has quit [Read error: No route to host]
<StatelessCat> even more than C++ ^^
<StatelessCat> -ir+is
<StatelessCat> so, Off topic
jlongster has joined #ocaml
<Leonidas> anyone knows how I can skip over input in angstrom until a parser matches?
shortCircuit__ has joined #ocaml
<shortCircuit__> hello
<shortCircuit__> I need some help
<shortCircuit__> I was trying to learn ocaml by implementing a simple compiler.. so, I have made a variant called token, where I have this list of tokens like plus minus start percentage eof
psacrifi_ has quit [Ping timeout: 264 seconds]
<shortCircuit__> now while tokenizing I guess in terms of C I would need a stuct with lineIndx colIndx type(of token variant) and character to hold the original character
<shortCircuit__> so is that done using struct in ocaml as well?
kakadu has joined #ocaml
manizzle has quit [Remote host closed the connection]
<shortCircuit__> :( I only hear the sound of connection closed when I come in
copy` has joined #ocaml
<Leonidas> I mean, you can use records just fine…
<Leonidas> or you take a look how compilers in ocaml are usually written
<Leonidas> most people I think adhere to whatever ocamllex does for parsing a grammar
freusque has joined #ocaml
Algebr has quit [Ping timeout: 258 seconds]
AlexDenisov has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Flerex has quit [Quit: Textual IRC Client: www.textualapp.com]
<Leonidas> companion_cube: there is no CCPervasives, is there? :)
* Leonidas wants CCPervasives.read_a_fucking_file_dammit_how_hard_can_it_be
<companion_cube> :D
Flerex has joined #ocaml
<companion_cube> CCIO.with_in CCIO.read_all
<companion_cube> well, `CCIO.with_inCCIO.with_in "/tmp/foo" CCIO.read_all;;
<companion_cube> I dislike pervasives, so it's in the IO module instead
<copy`> Or CCIO.File.read_exn
<copy`> Kinda hard to miss that module
<shortCircuit__> ok
<shortCircuit__> will look into ocamllex
<copy`> *easy to miss that module
<companion_cube> ah right, forgot it myself
<companion_cube> that's nice, I wonder who had this brilliant idea :]
<companion_cube> honestly I'm pretty happy with CCIO
FreeBirdLjj has joined #ocaml
noddy has quit [Ping timeout: 265 seconds]
<Leonidas> companion_cube copy`: thanks :)
FreeBirdLjj has quit [Ping timeout: 258 seconds]
<Leonidas> yeah, I was wondering why there was no with_in in the stdlib
Algebr has joined #ocaml
<companion_cube> there's a PR
<Leonidas> I'll just give up writing code without containers, it's way too enraging
<companion_cube> didn't seem that it interested that many people
<companion_cube> :D
<companion_cube> \o/ victory for containers \o/
<companion_cube> (but I agree, those IO functions are hard to do without)
<Leonidas> well, victory for a stdlib which contains tedious functionality, really. Though so far I greatly prefer containers to batteries, so there's that.
ygrek_ has quit [Ping timeout: 265 seconds]
<companion_cube> BatIO is a bit over-designed to my taste, they dropped compatibility with standard channels :/
Algebr has quit [Ping timeout: 268 seconds]
<Leonidas> yes and I also dislike their use of custom data types like Enum.t which interop with… noone
<companion_cube> heh
<companion_cube> well it was designed as a replacement to the stdlib
octarin has quit [Quit: leaving]
jlongster has joined #ocaml
_andre has quit [Quit: leaving]
<Leonidas> does anyone know how #require works?
<companion_cube> it's something added by #use "topfind";; which is part of ocamlfind
Flerex has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Leonidas> I want my cma to be #load'ed after requiring its dependencies, but I don't know what I need to write in my META to actually do the magic
<Leonidas> something like https://gitlab.camlcity.org/gerd/lib-findlib/blob/master/src/findlib/topfind.ml.in#L66 happens, but it's quite complex
<companion_cube> erf
agarwal1975 has joined #ocaml
<Leonidas> yeah, pretty much
Algebr has joined #ocaml
ygrek_ has joined #ocaml
Algebr has quit [Ping timeout: 245 seconds]
shortCircuit__ has quit [Read error: Connection reset by peer]
xorpse has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube> for local projects, I tend to write a .ocamlinit that load deps before the .cma
<orbitz> What are the hashes that ocamlobjinfo prints out/
<orbitz> For "Interfaces imported"
<companion_cube> every .cmi has a hash (md5 of the signatures)
<companion_cube> it's used to quickly check API compatibility
<orbitz> Do you know how the md5 is calculated?
<orbitz> What does it mean if two modules make inconsistent assumptions over an interface?
<orbitz> I can see that theyt hink the md5 is different
<orbitz> But I'm not sure how they would come to that conclusion
<companion_cube> you get the exact message "inconsistent interfaces" blabla
<companion_cube> it means one was compiled against the old .cmi (with old hash)
<companion_cube> but the current .cmi has another hash
NJBS has joined #ocaml
<companion_cube> (probably because it was compiled again after changing)
<companion_cube> so the linker complains
<companion_cube> also works for dynamic linking, I think
NJBS has quit [Client Quit]
<orbitz> Hrm. In this case I have a makefile for compiling and I'm getting it while running a parallel build in a heavy loop.
<orbitz> So i'm not changing the file at all
<orbitz> Unless...
<companion_cube> maye you got the dependencies wrong
NJBS has joined #ocaml
<companion_cube> it's a bit intricate
<companion_cube> (why not just use ocmalbuild?)
<orbitz> hrm, but even then i'm not sure how that would happen.
calculemus has quit [Quit: WeeChat 1.6]
<orbitz> I don't liek ocalmbuild\
<companion_cube> it's still much better than a manual makefile, imho :/
<orbitz> Cue "at least it builds" etc.
<orbitz> It's not a manual makefile, I have a program that generates makefiles for me
<companion_cube> :s
<orbitz> But this isn't a case of deps, this is 1 .ml file beign compiled and another .ml file beign compiled
<orbitz> so it's not an ordering problem
<companion_cube> the second one might use the .cmi of the first one
<orbitz> I'm deleting the .cmi's between executions though...
<orbitz> It's inconsistent too, it takes running gmake -j2 in a loop for several minutes to hit it
<companion_cube> :D
<companion_cube> -j2? interesting
<orbitz> I'm doing while gmake -j2; do gmake clean; done
<orbitz> and eventually I hit it
<orbitz> I'd expect any intermediate state of a .cmi to be created from an invalid file which is what confuses me!
calculemus has joined #ocaml
xorpse has quit [Ping timeout: 268 seconds]
<companion_cube> I don't know, maybe submit a bug report?
<companion_cube> I'm not sure I see the use case, but well
calculemus has quit [Quit: WeeChat 1.6]
<orbitz> companion_cube: I just checked, the .cmi has a different hash than the .cmo!
<companion_cube> hence the error message, I guess?
<companion_cube> but it sounds like a weird race condition to me
<orbitz> Yeah
<orbitz> thanks for the tip
<orbitz> companion_cube: as far as I can tell the errors are deterministic too. The cmi is always wrong in the same way
<orbitz> (so far)
alex_________ has joined #ocaml
<orbitz> Hrm, I have a theory. Couldn't have done this without you!
<orbitz> I have to sleep, good night!
<companion_cube> good night!
<alex_________> hi there, I've just read 'real word ocaml', could you point me to some well-written github repos / ideas for small projects I could write to practice?
alex_________ has quit [Quit: Page closed]
AlexDenisov has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
calculemus has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
AlexDenisov has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
Simn has joined #ocaml
cdidd has quit [Ping timeout: 245 seconds]
ocaml549 has joined #ocaml
etc has joined #ocaml
ocaml549 has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
octachron has quit [Quit: Leaving]
Algebr has joined #ocaml
etc has left #ocaml [#ocaml]
infinity0 has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 256 seconds]
infinity0 has joined #ocaml
cheater has joined #ocaml
<cheater> hi
<cheater> does ocaml have something like haskell's $ operator?
xorpse has joined #ocaml
marsam has quit [Read error: Connection reset by peer]
nomicflux has joined #ocaml
<dmbaturin> cheater: @@
<cheater> thanks
<cheater> if i do g @@ f x is it the same as g ( f x ) ?
<dmbaturin> Yep.
<cheater> ok (asking because the example in the doc is a bit more complex)
zirman has quit [Ping timeout: 258 seconds]
<Leonidas> cheater: yeah, it was added 4.02
<cheater> thanks guys
<Leonidas> cheater: keep in mind that unlike Haskell it does not work with cobstructors
<cheater> obstructors?
<cheater> oh constructors
<cheater> ok yeah sure
<cheater> thanks
<Leonidas> yeah, I was on a phone
<companion_cube> Leonidas: 4.01 I think
<Leonidas> companion_cube: you're right.
wtetzner has quit [Remote host closed the connection]
infinity0 has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
zirman has joined #ocaml
infinity0 has joined #ocaml
AlexDenisov has quit [Remote host closed the connection]
noddy has joined #ocaml
AlexDenisov has joined #ocaml
zirman has quit [Ping timeout: 268 seconds]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
kakadu has quit [Remote host closed the connection]
<cheater> hey guys i've noticed _ gets ignored in int literals, is this unique to numbers? also do number literals have other funny features like that?
<companion_cube> it's only in integers, I think
<companion_cube> you can write 1_000_000, which is quite readable
<cheater> yup
nomicflux has joined #ocaml
<cheater> or 1_000_000_00 if you're doing cents
<companion_cube> :D
<companion_cube> damn, that's tricky
<cheater> or 1_000_000_00_000_000 if you're doing microcents
<cheater> :D
<cheater> that last one is just pure evil though
<Armael> :D
<Armael> took me some time to notice
<cheater> that's why it's evil :D
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
infinity0 has quit [Remote host closed the connection]
wtetzner has joined #ocaml
<smondet> it also works with other kinds of literals: 0x42_e3_44L, 1_000.001, 0b1001_0100__1010_0001_l
<cheater> hmm what's the difference between ocaml's @@ and haskell's . ?
<cheater> smondet: yeah i expected that
<Drup> cheater @@ is like $, not .
<cheater> ok
<cheater> is there something like . in ocaml?
<cheater> there isn't, is there?
<Drup> not in the stdlib
<cheater> hmm
<cheater> in lwt?
<Algebr> no
freusque has quit [Ping timeout: 246 seconds]
<Drup> lwt is only concerned by asynchronous tasks, it's not an extension of the standard library :)
<aantron> yeah i don't think . would belong in lwt, unless its lack was a complete emergency :)
<cheater> yeah, but it's a huge lib, so i thought maybe they would have something :))
<aantron> ok lwt is not that big.. hopefully better docs will clarify this in the future :)
<Algebr> I'd say its medium sized
<aantron> plus i hope to trim it down over time
<Algebr> thankfully it doesn't offer . since that's not really relevant to async
<cheater> lwt has the appropriate number of shrubberies