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
MercurialAlchemi has quit [Ping timeout: 258 seconds]
smondet has quit [Ping timeout: 240 seconds]
<Drup> aantron: Lwt is really exactly the same as promises
<Drup> I can't say the same about coroutine, and afaik, corountine are not usually very functional
<aantron> agreed, thanks
rand__ has quit [Quit: leaving]
ryanartecona has quit [Quit: ryanartecona]
_whitelogger has joined #ocaml
sh0t has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
robb_ has joined #ocaml
robb_ has quit [Quit: Page closed]
TarVanimelde has joined #ocaml
fraggle_ has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
malina has quit [Read error: Connection reset by peer]
fraggle_ has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
silver has quit [Quit: rakede]
yomimono has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
yomimono has quit [Quit: Leaving]
tmtwd has quit [Ping timeout: 246 seconds]
zirman has quit [Remote host closed the connection]
d0nn1e_ has quit [Quit: ZNC - http://znc.in]
fraggle_ has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
govg has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
TarVanimelde has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 260 seconds]
zirman has joined #ocaml
<Enjolras> aantron: another widespread term is futures
zirman has quit [Ping timeout: 250 seconds]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jao has quit [Ping timeout: 240 seconds]
vramana has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
copy` has quit [Quit: Connection closed for inactivity]
d0nn1e has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ocaml
gjaldon has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
jonasen has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
gjaldon has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
gjaldon has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
gjaldon has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cheater has quit [Ping timeout: 244 seconds]
vramana has joined #ocaml
maattdd has joined #ocaml
tmtwd has joined #ocaml
MercurialAlchemi has joined #ocaml
maattdd has quit [Ping timeout: 268 seconds]
<theblatte> are there known important OCaml packages that don't work with 4.04? the opam weather service stops at 4.03
MightyJoe has joined #ocaml
cyraxjoe has quit [Ping timeout: 240 seconds]
zirman has joined #ocaml
zirman has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
silver has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
mlly has joined #ocaml
<mlly> Drup: do you maintain sedlex?
tane_ has joined #ocaml
zirman has joined #ocaml
Simn has joined #ocaml
zirman has quit [Ping timeout: 260 seconds]
tmtwd has quit [Ping timeout: 250 seconds]
sillyotter has joined #ocaml
tmtwd has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.4]
cheater has joined #ocaml
mlly has quit [Ping timeout: 260 seconds]
noddy has joined #ocaml
malc_ has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 246 seconds]
maattdd has joined #ocaml
cheater has quit [Ping timeout: 256 seconds]
cheater has joined #ocaml
malc_ has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 260 seconds]
wu_ng has joined #ocaml
govg has quit [Quit: leaving]
fre has joined #ocaml
shinnya has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
vramana has quit [Remote host closed the connection]
Muzer has joined #ocaml
gjaldon has joined #ocaml
cheater has quit [Ping timeout: 260 seconds]
cheater has joined #ocaml
slash^ has joined #ocaml
TarVanimelde has joined #ocaml
malina has joined #ocaml
Sim_n has quit [Read error: Connection reset by peer]
copy` has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
<aantron> copy`: i removed one instance of polymorphic comparison and this sped up markup.ml in my test by about 25% (40ms to 30ms parse)
jnavila has joined #ocaml
zirman has quit [Ping timeout: 258 seconds]
<copy`> Nice!
<aantron> it looks like there are other easy fixes, but i have to switch from Xcode Instruments to rmp to get nicer stack traces i guess :)
vramana has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ocaml
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 248 seconds]
zirman has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
zirman has quit [Ping timeout: 256 seconds]
jnavila has quit [Ping timeout: 260 seconds]
fre has quit [Ping timeout: 268 seconds]
malc_ has joined #ocaml
TarVanimelde has joined #ocaml
troydm has quit [Ping timeout: 248 seconds]
troydm has joined #ocaml
zirman has joined #ocaml
fre has joined #ocaml
wu_ng has quit [Ping timeout: 246 seconds]
jlongster has joined #ocaml
cheater has quit [Ping timeout: 246 seconds]
jonasen has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
nomicflux has joined #ocaml
cheater has joined #ocaml
gjaldon has quit [Remote host closed the connection]
jlongster has quit [Read error: Connection reset by peer]
zirman has quit [Remote host closed the connection]
jlongster has joined #ocaml
jlongster has quit [Read error: No route to host]
zirman has joined #ocaml
zirman has quit [Changing host]
zirman has joined #ocaml
jlongster has joined #ocaml
malina has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jlongster has joined #ocaml
jnavila has joined #ocaml
digiorgi has joined #ocaml
TarVanimelde has quit [Remote host closed the connection]
TarVanimelde has joined #ocaml
TarVanimelde has quit [Client Quit]
zirman has quit [Remote host closed the connection]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 268 seconds]
vramana1 is now known as vramana
zirman has quit [Remote host closed the connection]
osa1 has joined #ocaml
<osa1> how do I compare strings in pre-4.0.3 OCaml ?
<osa1> for equality, I mean
<osa1> pre-4.03*
<Drup> the same as post 4.03 ?
<osa1> String.equal is new in 4.03
<flux> "a" = "b" works in all ocaml versions
<flux> String.equal is probably useful with functors and for people who have a dislike for the polymorphic comparison operator
Aruseus has joined #ocaml
digiorgi has quit [Quit: Leaving]
<Leonidas> or people who come from java *ducks*
osa1 has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
octachron has joined #ocaml
tmtwd has joined #ocaml
ocaml102 has joined #ocaml
<ocaml102> let insert l a = if List.mem_assoc a l then let n = List.assoc a l in (a, n+1)::(List.remove_assoc a l) else (a, 1)::l
<ocaml102> How do I use this code and insert one by one and get the list back ?
zirmann has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
<octachron> ocaml102, if I understand you correctly, you want to go from your function that insert one element to a function that inserts a list of elements?
<ocaml102> I want to send a char and and list and get it back with the new one added.
<ocaml102> I mean get the new list with the char added.
<octachron> is'nt your insert function doing exactly that?
<ocaml102> Yes. I want to call this function and get back the new list. from another function. Couldn't get the return list. Don't know.
<octachron> In other words, your problem is in another function. May I ask what you did to "get the return list"?
<ocaml102> List.iter (printf "%d ") (insert [] a )
tmtwd has quit [Ping timeout: 246 seconds]
<ocaml102> Something like this ?
<ocaml102> let a = insert [] 'a' in List.iter (printf "%d ") a ;;
<octachron> ocaml102, which gives you a type error, isn't it?
<octachron> try replacing "printf" with "(fun (c,n) -> printf "%c,%d" c n)"
<aantron> copy`: it looks like a good proportion of remaining work will be reducing allocations. i'll write some proof of concept tests later, to help check that my hunches about what to do are correct. meantime, can you let me know once rmp is building again?
<aantron> i am tantalized by the call trees it generates :)
noddy has quit [Ping timeout: 245 seconds]
<copy`> Sure
<ocaml102> I have to try that later. Didn't get the meaning. Leaving now. Thanks.
<Drup> aantron: you tried spacetime ?
<aantron> ah, no, should try it
ocaml102 has quit [Ping timeout: 260 seconds]
tane_ has quit [Quit: Leaving]
jao has joined #ocaml
fre has quit [Quit: WeeChat 1.4]
noddy has joined #ocaml
Aruseus has quit [Quit: Leaving]
pierpa has joined #ocaml
jackweirdy has joined #ocaml
zirmann has quit [Remote host closed the connection]
zirman has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Ping timeout: 260 seconds]
infinity0 has joined #ocaml
hunteriam has joined #ocaml
petroav has joined #ocaml
<petroav> Hey! Does anyone know how I can load a file into utop? I don't mean opening a standard module but rather executing all the statements I have written in an .ml file
<petroav> The open directive doesn't work and Google isn't too helpful.
<Drup> petroav: #use "filename.ml" ;;
malc_ has quit [Remote host closed the connection]
<petroav> Drup, Yes! Thanks :)
<petroav> Is there documentation for utop somewhere? I read the man page and this https://opam.ocaml.org/blog/about-utop/ but couldn't find anything more comprehensive.
<Drup> that's a toplevel directive, so http://caml.inria.fr/pub/docs/manual-ocaml/toplevel.html
<xyproto> petroav: #help;; shows some help, but I also struggle to find good documentation for utop specifically
<petroav> xyproto, #help;; for me errors out with "Unknown directive: help"
<nicoo> petroav, xyproto : Interesting to know this is an issue. Are you looking for documentation of utop specifically, or some “utop for beginners” document?
<petroav> xyproto, my utop version is 1.19
<petroav> nicoo, utop for beginners. I guess the link I posted above kind of addresses that but for example there's no way to see what all the possible directives are and what each one does.
jackweirdy has quit [Read error: Connection reset by peer]
<xyproto> nicoo: yes, "utop for beginners" or just a plain old reference or list of what is possible in utop: commands and hotkeys
<xyproto> nicoo: utop is super-nice, but it was just by accident that I found "#help;;"
<xyproto> petroav: weird. utop 1.19.3 here
<xyproto> petroav: did you type in the "#" too?
<copy`> Soon #utop_help will also mention #help
<petroav> nicoo, yea utop is a wonderful tool but like xyproto says there isn't an easy way to see what directives are possible
<nicoo> xyproto: Well, as Drup explained, #help comes from OCaml's toplevel, and you can find its directives there: http://caml.inria.fr/pub/docs/manual-ocaml/toplevel.html#sec275
<nicoo> But, sure, pointing at that document would be useful
<xyproto> #help mentions #utop_help, though, which is what was the key for me
<xyproto> that was the only way to discover the utop hotkeys I could find
zirman has quit [Remote host closed the connection]
<petroav> #utop_help works but #help doesn't
djellemah_ has joined #ocaml
<xyproto> petroav: weird, perhaps there's a difference in the setup? I followed the start of Real World OCaml.
<octachron> petroav, #help is quite recent, your version of OCaml might not have #help
<xyproto> help was added in 2010 according to the utop changelog at https://github.com/diml/utop/blob/d8905336751ab1a3065d128fb4e13bbcf54d0e2e/CHANGES.md
zirman has joined #ocaml
zirman has joined #ocaml
zirman has quit [Changing host]
<xyproto> but that might be just "help for the emacs mode". The changelog is not specific about this.
<octachron> xyproto, the #help directive for the compiler was only added in OCaml 4.03 (so in april 2016)
zirman has quit [Client Quit]
zpe has joined #ocaml
<xyproto> octachron: I see. That explains it, then.
malina has joined #ocaml
jao has quit [Ping timeout: 256 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
xyproto has left #ocaml ["WeeChat 1.6"]
d0nn1e has joined #ocaml
<copy`> aantron: rmp now builds again (also on OSX)
xyproto has joined #ocaml
ygrek has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
djellemah_ has quit [Quit: Leaving]
<xyproto> I'm trying to learn OCaml better by reading some source code. Why is "let pi = acos ~-.1." used here instead of just "let pi = acos @@ -1." or "let pi = acos (-1.)"? https://github.com/tempodox/OCamlRaytracer/blob/master/raytrax.ml#L20
<xyproto> What does ~ do in this context?
<xyproto> And why not "let pi = -1. |> acos"? What is the most liked style, and why?
<Drup> (~-.) is the unary float negation operator, that's all
<Drup> I guess the person who wrote that code doesn't like parens
michbad has joined #ocaml
<xyproto> Drup: I see, thx
kakadu has joined #ocaml
jnavila has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
petroav has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 260 seconds]
<aantron> copy`: cool, thanks
zpe has quit [Ping timeout: 258 seconds]
michbad has quit [Remote host closed the connection]
infinity0 has quit [Ping timeout: 246 seconds]
infinity0 has joined #ocaml
vramana1 has joined #ocaml
petroav has joined #ocaml
vramana has quit [Ping timeout: 260 seconds]
vramana1 is now known as vramana
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
average has quit [Quit: leaving]
minn has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
rwmjones is now known as rwmjones|afk
silver_ has joined #ocaml
silver has quit [Ping timeout: 245 seconds]
petroav has quit [Ping timeout: 246 seconds]
hunteriam has quit [Quit: Connection closed for inactivity]
average has joined #ocaml
kakadu has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 260 seconds]