adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
silver has quit [Read error: Connection reset by peer]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
neatonk has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
mfp has quit [Ping timeout: 252 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seliopou has quit [Ping timeout: 244 seconds]
seliopou has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 252 seconds]
karlguy has joined #ocaml
neatonk has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
karlguy has quit [Ping timeout: 260 seconds]
JimmyRcom has joined #ocaml
JimmyRcom has quit [Ping timeout: 268 seconds]
JimmyRcom has joined #ocaml
noitakomentaja has joined #ocaml
<xvilka> Leonidas: ah, I see, still too basic example
<xvilka> I have a thing like this https://pastebin.com/RApvbYuk
<xvilka> for some unknown reason it doesn't seem to send or receive something
<xvilka> Before switching to AMQP I was using ZeroMQ and everything worked within similar model
JimmyRcom has quit [Ping timeout: 268 seconds]
Jeanne-Kamikaze has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
igitoor has quit [Ping timeout: 252 seconds]
igitoor has joined #ocaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
noitakomentaja has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
rdivyanshu has joined #ocaml
bartholin has joined #ocaml
orbifx has joined #ocaml
<Leonidas> xvilka: you publish into a queue, which is… not the usual way in AMQP
sagotch has joined #ocaml
<Leonidas> what is 'spawn' in your code?
<xvilka> Amqp.Thread.spawn
<xvilka> I checked example from amqp-client/examples/main.ml and this is exactly what example shown - publishing into the queue
<Leonidas> yeah, that's odd
<xvilka> My model basically like this - I have workers and a few shared queues between them - for example "control" and "query" queues, every worker should be able to publish/consume to them, while rabbitmq performs round robin balancing
<xvilka> and all workers should be able to both publish and consume to these queues simultaneously
<xvilka> this is what I did in zeromq, just without round robin balancing, now I need it thus moving to RabbitMQ
<Leonidas> So in AMQP you usually publish to an exchange and the exchange decides where to put the message, depending on the type of exchange and the routing key
<xvilka> yeah, I will do an exchange later, once I get it working, from what I know if you publish into the queue without exchange it uses the default one
<Leonidas> xvilka: does your code use both Async and Lwt? It seems very confusing.
orbifx has quit [Ping timeout: 260 seconds]
<xvilka> so it shouldn't be a problem
<xvilka> Leonidas: no, it uses only Lwt
<Leonidas> Scheduler.go () on the one hand, but Lwt_io.printf on the other hand?
<Leonidas> oh, Amqp.Thread has a scheduler
<xvilka> Leonidas: but Scheduler.go () is in Amqp_client_lwt too
<Leonidas> true
<Leonidas> My first try would be to avoid all these spawn calls and just compose everything into a single Lwt.t
<Leonidas> and then use Lwt run_main in one single place to evaluate it
<xvilka> aha
<xvilka> it is better now
<xvilka> at least handlers called sometimes
<xvilka> much much better
<xvilka> eliminating them is a good strategy
<xvilka> thank you A LOT
<xvilka> there are some weird things going on, but at least messages passing through
bartholin has quit [Remote host closed the connection]
rdivyanshu has quit [Remote host closed the connection]
themsay has joined #ocaml
<Leonidas> happy to be of some limited help :-)
themsay has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
<kakekongen> Leonidas: thanks for the tip - that's exactly what I need!
rdivyanshu has quit [Ping timeout: 260 seconds]
rdivyanshu has joined #ocaml
<xvilka> Leonidas: one more question - should I run Queue.consume in a loop? Because otherwise it consumes exactly one message and exits. On the other hand if I run it in a loop RabbitMQ shows huge list of consumers and slows down significantly
<xvilka> Because it is also unclear from examples
rdivyanshu has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
rdivyanshu has joined #ocaml
ollehar has joined #ocaml
<xvilka> ah, this Pipe.iter_without_pushback is recursive
<xvilka> but for some reason it doesn't keep going
pierpal has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
themsay has joined #ocaml
kalio has quit [Ping timeout: 272 seconds]
webshinra has quit [Read error: Connection reset by peer]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpal has quit [Read error: Connection reset by peer]
themsay has quit [Ping timeout: 272 seconds]
pierpal has joined #ocaml
kvda has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xvilka> for now I workarounded it by calling Queue.cancel immediatedly after Queue.consume but it is utterly wrong I believ
rdivyanshu has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
<xvilka> no time to investigate how to make it right though
<xvilka> seems this works good enough anyway
pierpal has joined #ocaml
<Drup> Leonidas: use Lwt_fmt.printf, not Lwt_io.printf
<Drup> (it's not deprecated? I should add an annotation ...)
ziyourenxiang has quit [Ping timeout: 252 seconds]
Bronsa has joined #ocaml
pierpal has quit [Ping timeout: 252 seconds]
pierpal has joined #ocaml
cuicui has quit [Ping timeout: 268 seconds]
carlosdagos has quit [Quit: Connection closed for inactivity]
mfp has joined #ocaml
gallais has left #ocaml [#ocaml]
webshinra has joined #ocaml
_whitelogger has joined #ocaml
kalio has joined #ocaml
jao has joined #ocaml
cuicui has joined #ocaml
sagotch has quit [Quit: Leaving.]
cuicui has quit [Ping timeout: 252 seconds]
karlguy has joined #ocaml
cuicui has joined #ocaml
cuicui has quit [Ping timeout: 246 seconds]
Bronsa has quit [Ping timeout: 244 seconds]
ggole has joined #ocaml
karlguy has quit [Ping timeout: 244 seconds]
cuicui has joined #ocaml
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Bronsa has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
al-damiri has joined #ocaml
rdivyanshu has joined #ocaml
sagotch has joined #ocaml
pierpal has quit [Ping timeout: 244 seconds]
rdivyanshu has quit [Ping timeout: 272 seconds]
cuicui has quit [Ping timeout: 252 seconds]
<kakekongen> Ahh, I will move to Lwt_fmt.printf
rdivyanshu has joined #ocaml
tg has quit [Excess Flood]
tg has joined #ocaml
Bronsa has quit [Remote host closed the connection]
cuicui has joined #ocaml
cuicui has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
spew has joined #ocaml
ziyourenxiang has joined #ocaml
<xvilka> What is the best functional way to perform stateful list filtering? I currently use dumb approach - saving the state in the reference, updating it inside List.filter
<xvilka> Are there any better options?
<Armael> you can use List.fold_left but then you need to List.rev the accumulator at the end
<Armael> usually I just write a recursive function
cuicui has joined #ocaml
<xvilka> like "let rec func lst state"?
cuicui has quit [Ping timeout: 252 seconds]
<Armael> yeah
<ggole> You could write a fold_filter easily enough
<ggole> fold_map is useful, too
<Armael> indeed
<Armael> I guess in full generality you want fold_filter_map :)
<xvilka> Armael: make sense to have it in Base
<xvilka> will do PR later
<xvilka> I think it is quite common pattern, can be useful for others
<Armael> I think writing a recursive function might be clearer, because you don't have to remember what is all these arguments you need to pass through
<Armael> are*
neatonk has joined #ocaml
<ggole> Three arguments isn't too bad
pierpal has joined #ocaml
steenuil has quit [Read error: Connection reset by peer]
steenuil_ has joined #ocaml
pepesza has quit [Ping timeout: 268 seconds]
pepesza has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
<ollehar> Three arguments are three too much.
<ollehar> many*
<ollehar> I always program with 0 function arguments.
<ollehar> And use globals instead.
rdivyanshu has quit [Ping timeout: 268 seconds]
pierpal has quit [Ping timeout: 252 seconds]
<zozozo> I use a global hashtable indexed by strings to store my variables, :D
<companion_cube> I only use a hashtable for the capitalized variables
<ggole> Sounds like programming in Python
<ollehar> zozozo: incidentally, that's how built-in functions were named in the beginning (to maximize hash spread).
<ollehar> in PHP
<zozozo> yeah, remember seeing that somewhere, had to be fun when introducing new fonctions, :p
<zozozo> *functions
<ollehar> zozozo: well, it explains the weird, mixed naming schema.
<ollehar> substr, str_pos, ...
<zozozo> ^^
cuicui has joined #ocaml
rdivyanshu has joined #ocaml
piccolo has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
piccolo has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
FreeBirdLjj has joined #ocaml
rdivyanshu has quit [Read error: Connection reset by peer]
TheLemonMan has joined #ocaml
rdivyanshu has joined #ocaml
<copy`> Armael: Armael
<copy`> Sorry, didn't mean to press enter
<companion_cube> copy`: copy`.
piccolo has joined #ocaml
rdivyanshu has quit [Ping timeout: 268 seconds]
jao has joined #ocaml
rdivyanshu has joined #ocaml
noitakomentaja has joined #ocaml
rdivyanshu has quit [Ping timeout: 244 seconds]
JimmyRcom has joined #ocaml
rdivyanshu has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
eagleflo_ has left #ocaml [#ocaml]
eagleflo has joined #ocaml
erkin has joined #ocaml
eagleflo has quit [Client Quit]
eagleflo has joined #ocaml
<Armael> :D
<reynir> reynir: reynir
<Fardale> pika: pika
<ggole> Error: This kind of expression is not allowed as right-hand side of `let rec'
Haudegen has quit [Remote host closed the connection]
bartholin has joined #ocaml
<companion_cube> arf, classic
<companion_cube> these days you can only put records, functions, and lazy, in my experience
djellemah has joined #ocaml
<ggole> You can have applications if they meet some test
<ggole> I *think* it is that they don't mention the rec-bound variables
jao has quit [Ping timeout: 244 seconds]
<companion_cube> which means they could be extracted outside the let rec
<ggole> Yeah
<companion_cube> so it's kind of super restrictive :D
<companion_cube> lazy is generally the way out, for me
roygbiv has joined #ocaml
<ggole> No, that isn't right... let rec x = ref y and y = Some x is fine (if you turn on -rectypes)
<ggole> I guess I don't understand the let rec restrictions properly.
<ggole> Well, you can't *apply* the rec bound variables. Hmm.
<zozozo> well, usually the mention "if you turn on -rectypes" isn't really synonym with well-formed code, :p
<zozozo> iirc, there is a recent github PR that would change the criterion for well-formed right-hand side of let recs
jao has joined #ocaml
<zozozo> ggole: https://github.com/ocaml/ocaml/pull/1942 if you want some discussion about what is allowed (though it might only be for the next release)
<Armael> AFAICT this PR changes the implementation of the recursive check, but its semantics are mostly preserved
<Armael> I don't think there are new things allowed
<companion_cube> again? :o
<Armael> well it's quite nice now
<companion_cube> ggole: -rectypes isn't vanilla OCaml, so… :p
<ggole> All it changes is whether types are allowed inside themselves
<ggole> And dammit, if I want a reference to itself, I'll have one
artart78 has quit [Changing host]
artart78 has joined #ocaml
noitakomentaja has quit [Ping timeout: 252 seconds]
ziyourenxiang has quit [Ping timeout: 268 seconds]
spiegelau has joined #ocaml
<spiegelau> hi all. is there anything like "print" in Python? to dump lists/sets/tuples/etc...
<spiegelau> and prettyprint, if possible
FreeBirdLjj has quit [Read error: Connection timed out]
cuicui has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
<nore> Armael: IIRC the new implementation is less restrictive than the old one
<thizanne> spiegelau: there is no generic function that can prettyprint every single type
<nore> ggole: did you try let rec x = { contents = x }? (With rectypes)
<thizanne> and there are few printing functions in the stdlib
<spiegelau> thizanne: thanks!
<thizanne> but most alternative standard libraries provide the functions to print structures
<spiegelau> thizanne: ... which are...?
<Armael> nore: the only thing I could find is https://github.com/ocaml/ocaml/pull/1922 which ehh, ok, is a relaxation, but for a super edge case (float arrays)?
<thizanne> base, batteries, containers
<spiegelau> thizanne: thanks
<Armael> apart from that they only mention bugfixes
cuicui has joined #ocaml
<ggole> nore: yeah, in fact calling ref works as well
<nore> Hmmm I thought the change in 4.07 made it more general, but I might be wrong
<nore> ggole: oh, interesting
<spiegelau> what can cause "Unbound module Base" even after successful "opam install base"?
<Armael> ah, in 4.07 maybe, but #1942 is in 4.08 I think :)
<thizanne> spiegelau: how are you compiling
<thizanne> and how are you learning ocaml in the first place
<spiegelau> thizanne: just running ocaml filename.ml
<thizanne> well you need to tell ocaml to look for core
<thizanne> base*
<spiegelau> https://pastebin.com/F5453X9V - this is what I'm trying to run
<spiegelau> and how to tell it... path?
ggole has quit [Quit: ggole]
<thizanne> well the easiest way would be to wait for your class to introduce external libraries
<spiegelau> "wait"... how is that? like, minutes, hours?
<thizanne> well I don't know since you didn't answer my question: how are you learning ocaml ?
<spiegelau> thizanne: I'm learning it by trying to run the code snippet I shown...
<spiegelau> how to run it?
dedgrant has joined #ocaml
<spiegelau> can you run it?
<thizanne> you won't get far this way, but ocamlfind ocamlopt -package base foo.ml; ./a.out would probably work
<thizanne> well I can run it mentally and tell you it prints 123
<thizanne> but i'm not sure that makes you learn a lot
<spiegelau> I can run it mentally too
<spiegelau> ocamlfind ocamlc gives "ocamlfind: Package `base' not found"
<thizanne> then your installation of base didn't work
<spiegelau> thizanne: probably not. just can't understand how to check it or repair it or...
<thizanne> that's why reading a proper introduction would probably be a better idea
<thizanne> the monte-carlo method of trying random things until you can make stuff work usually doesn't work really well when learning a programming language
<spiegelau> and there they recommend to run ocamlfind
<spiegelau> so I did, with no success
roygbiv has quit [Quit: ™]
<spiegelau> opam install base
<spiegelau> [NOTE] Package base is already installed (current version is v0.11.1).
<spiegelau> ocamlfind query base
<spiegelau> ocamlfind: Package `base' not found
<thizanne> what does `opam switch` tell you
<spiegelau> -- -- 4.07.0 Official release 4.07.0
<spiegelau> # 223 more patched or experimental compilers, use '--all' to show
<spiegelau> system C system System compiler (4.05.0)
muelleme has joined #ocaml
<thizanne> I guess you're using the system switch
<thizanne> which uses the compiler installed on your distribution
<thizanne> and actually doesnt work really well
<spiegelau> how to install everything then?
<thizanne> you can opam switch install 4.07.0
<thizanne> then opam will tell your to run a command to synchronise your env
<thizanne> then opam install base
<thizanne> and then hope it works
<thizanne> (btw you're also using an old version of opam, you may want to update this)
<thizanne> (that's your os job, so your package manager if you installed opam this way)
<spiegelau> OK...
rdivyanshu has quit [Remote host closed the connection]
sagotch has quit [Quit: Leaving.]
rdivyanshu has joined #ocaml
karlguy has joined #ocaml
rdivyanshu has quit [Ping timeout: 252 seconds]
<spiegelau> did switch, eval, installed base, still ocamlfind query base -> Package `base' not found
<spiegelau> is there a list of commands to run on Ubuntu to install everything?
muelleme has quit [Ping timeout: 268 seconds]
noitakomentaja has joined #ocaml
<thizanne> something probably didn't install properly
<thizanne> but bh I don't really have the time to do guess-based system debugging
<Armael> did you do eval $(opam config env) ?
<spiegelau> yep
<spiegelau> is there an instruction how to get it installed on clean Ubuntu?
<thizanne> yes, that's what you did
karlguy has quit [Ping timeout: 252 seconds]
<spiegelau> this was my mistake: when "opam init" offers to fix .zshrc (or other config), user should do this and reopen shell...
<spiegelau> -y switch skips it...
<thizanne> i'm surprised you didnt get an error message somewhere on the later commands
<thizanne> but I'm glad if that works
spiegelau has quit [Quit: leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
FreeBirdLjj has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 272 seconds]
BitPuffin has joined #ocaml
rdivyanshu has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
rdivyanshu has quit [Ping timeout: 244 seconds]
sagotch has joined #ocaml
Denommus has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
spiegelau has joined #ocaml
<spiegelau> this is me again. I want to install a package from a local dir: https://github.com/Z3Prover/z3/tree/master/src/api/ml - how to do it? "ocamlfind install", but what options?
<thizanne> you want to use opam for that
<thizanne> did you modify the source ? otherwise your best bet is hoping that it has been published on opam repository
<spiegelau> thizanne: this package is unlikely to be registered in the official ocaml repo...
<thizanne> (which is indeed the case here)
<spiegelau> thizanne: yes, I want to install from the latest src...
<thizanne> opam repository is not the "official ocaml repo"
<thizanne> or, more precisely, it's not tied to the official ocaml compiler distribution
<thizanne> it contains a lot of user-defined packages
<spiegelau> like CPAN
<thizanne> it's actually quite easy to publish your own packages
<spiegelau> OK, but how to install from the local dir?
<thizanne> you can use opam pin for this
<thizanne> or another new shiny command of opam 2 which I don't really master
<thizanne> look for documentation on opam's website
<thizanne> (but you're probably asking for trouble here, are you sure you need that ?)
<spiegelau> just want to get into things...
<spiegelau> but thanks!
sagotch has quit [Quit: Leaving.]
pierpal has joined #ocaml
orbifx has joined #ocaml
kakadu has joined #ocaml
djellemah has quit [Quit: Leaving]
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 252 seconds]
neatonk has quit [Quit: neatonk]
neatonk has joined #ocaml
<spiegelau> I want to start at basics and leave everything aside, so far. so I will read Standard ML books and tutos. is it OK? SML is a subset of Ocaml?
<thizanne> no, it's a different language
<thizanne> but you could start at basics and read an OCaml book
<thizanne> what doesn't work with RWO for you ?
<spiegelau> how different? like LISP and Scheme? or Scheme and Racket?
<thizanne> something like Python and Ruby
<thizanne> SML is fine for learning functional programming, and it indeeds shares a lot of concepts with OCaml
<spiegelau> I see, thanks
<thizanne> but that won't teach you programming in OCaml
<thizanne> and as there are fine ocaml books, if that's your objective, I don't see a reason for starting with sml
<spiegelau> thanks!
<spiegelau> just want to reduce amount of information. I've learnt Scheme instead of LISP, because I think the last one is somewhat bloated...
kakadu_ has joined #ocaml
<thizanne> whatever floats your boat...
kakadu has quit [Ping timeout: 244 seconds]
neatonk has quit [Ping timeout: 272 seconds]
jknick has joined #ocaml
_andre has quit [Quit: leaving]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 252 seconds]
rdivyanshu has joined #ocaml
<spew> I don't like the ocaml books
<spew> what's a good ocaml book?
<Leonidas> spiegelau: depends which one, e.g. Elisp vs Racket?
rdivyanshu has quit [Ping timeout: 252 seconds]
<Leonidas> spew: RWO
<spew> I don't like that book
<spew> too dependent on core
<Leonidas> so?
<Leonidas> It's a good stdlib, spew.
<spew> I tell people to get a copy of Ullman's Elements of ML Programming and even though it's in SML just do it in ocaml instead
<spew> I didn't want to learn a bunch of core crap
<Leonidas> I find Core to be very well designed and mostly well thought-out, unlike the random assortment of things OCaml ships with
<spew> if I want to learn ocaml I don't want it to be muddied up with stuff from some company
<spew> if I want to learn core I'll read core documentation
<Leonidas> spew: given how many OCamlers JST is funding directly or indirectly you might then better use a different language?
<spew> why would I use a different language?
<Leonidas> because it has lots of stuff from some company
<spew> I like ocaml and I've already written a lot of ocaml
<spew> core is not ocaml
<spew> I happen to work at a company that has it's own implementation of a business oriented standard library
<Leonidas> Core is a library, so obviously it is not a language
<Leonidas> If your only criticism is about that RWO is using a library you happen not to like I think it is a pretty decent book then.
<thizanne> I don't see why you could learn ocaml with an sml book and "just do it in ocaml instead" but not with an ocaml book and just do it with the stdlib
darktenaibre has joined #ocaml
rdivyanshu has joined #ocaml
<Leonidas> RWO doesn't actually teach that much Core, it just happens to use it. For example it spends way more time teaching Async.
pmetzger has joined #ocaml
<pmetzger> testing
<Leonidas> It *could've* used Lwt there, but the libraries are similar enough that learning the concepts in one applies to the other.
<Leonidas> pmetzger: successful?
<pmetzger> No, the IRC to Discord bridge is down. Or rather it's half up.
<pmetzger> Anyway, I was saying I love RWO, but the documentation for Core is terrible. It seems to be a great library, well designed, but I had to re-learn how to use other standard libraries that actually had docs after reading RWO.
<pmetzger> The "real" stdlib has serious design problems, including a heavy over-reliance on exceptions over optional types.
<Leonidas> Yeah, that is true. Sometimes I implement a think but only later realize that there is a nice way to do the thing within Core.
mihai_gologanu has joined #ocaml
rdivyanshu has quit [Ping timeout: 272 seconds]
spiegelau has quit [Ping timeout: 272 seconds]
<pmetzger> I don't use Core. Typically I use the "real" stdlib or ccube's Containers.
neatonk has joined #ocaml
<Leonidas> Every time I use the "real" stdlib I just end up being angry.
<Leonidas> also every ocaml project I have been on has a file like stdlib.ml which contains "ocaml stdlib: the missing bits"
<spew> Ullman is just a great writer who is actually trying to teach functional programming in the context of SML, and it's close enough to ocaml that it works
<pmetzger> Pretty much every big OCaml project has its own stdlib extension attached, which isn't good.
<spew> I haven't found a better book unfortunately that I could recommend
<pmetzger> I like Ullman's ML book, but SML is not enough like OCaml to make it a good introduction. It's a fine introduction to Milner's language family of course.
<pmetzger> RWO is a good place to start for most people looking at _OCaml_ qua OCaml.
karlguy has joined #ocaml
<spew> that's true. I'm biased since I learned SML first from that book, and then found it really easy to learn ocaml a few years later
<Leonidas> except for due to camlp4 none of the examples work :-(
<pmetzger> The languages are cousins, as are, of course, Haskell and many other similar ones.
<pmetzger> Leonidas: camlp4 is used neither in Ullman's book nor in RWO.
<spew> ocaml and sml are a lot lot lot closer to each other than they are to haskell
<Leonidas> pmetzger: RWO uses `with sexp`
<pmetzger> look at dev.realworldocaml, not the old edition.
<pmetzger> The new one has been online for a long time now and is considerably modernized.
<Leonidas> pmetzger: I'm aware of it, but that's not what is printed and the dev version is not complete yet.
<Leonidas> so if you see it in a store, buy it, then you have to do the mental gymnastics yourself, which is not a great out of the box experience
<Leonidas> (actually I couldn't find an example `with sexp` but there is `with fields`, but less than I anticipated)
<Leonidas> I still think it is a very good book because it doesn't bore you with 50 pages of introduction, explains the concepts pretty well and even goes into depth on how e.g. the runtime works.
bartholin has quit [Remote host closed the connection]
mihai_gologanu has quit [Quit: Page closed]
spew has quit [Quit: going home]
bacam has quit [Quit: reboot]
bacam has joined #ocaml
<Leonidas> anyone knows how the Haskell concurrency story looks like and can explain it to me in ML terms?
pmetzger has quit []
<Drup> IIRC, the main concept is that they have a primitive combinator `par` that allows to run two things in parallel,
<Drup> and everything is kinda based on that
<emily> that's the GHC parallelism for pure code story; it also supports concurrent multicore imperative programming with async IO using forkIO and has a full software transactional memory implementation
<emily> sadly GC latency is not ideal with highly concurrent programs with huge heaps IIRC but that might be better these days
<emily> (er, with async IO under the hood but an imperative non-callbacky programming model on top, that is)
kvda has joined #ocaml
Guest353 has joined #ocaml
neatonk has quit [Ping timeout: 244 seconds]
erkin has quit [Ping timeout: 245 seconds]
kakadu_ has quit [Remote host closed the connection]
err0ne has quit [Remote host closed the connection]
orbifx has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
erkin has joined #ocaml
spiegelau has joined #ocaml
Guest353 has quit [Remote host closed the connection]
erwanou has quit [Ping timeout: 252 seconds]
erkin has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 244 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
spiegelau has quit [Ping timeout: 268 seconds]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 268 seconds]
cuicui has quit [Ping timeout: 245 seconds]