wtetzner has quit [Remote host closed the connection]
cdidd has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
snhmib has joined #ocaml
larhat has quit [Quit: Leaving.]
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
isd has quit [Ping timeout: 256 seconds]
avsej has quit [Ping timeout: 248 seconds]
avsej has joined #ocaml
avsej has joined #ocaml
avsej has quit [Changing host]
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
alienbot has quit [Remote host closed the connection]
govg has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
MercurialAlchemi has joined #ocaml
milodavis has joined #ocaml
<milodavis>
Does anyone know if there is a good way to create a String map in Janestreet's base library? They don't provide documentation yet (AFAIK) and the MLI does not export the same functions as Core or Core_kernel
ygrek has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
snhmib has quit [Ping timeout: 252 seconds]
yomimono has quit [Ping timeout: 256 seconds]
snhmib has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
alienbot has joined #ocaml
zozozo has quit [Remote host closed the connection]
AlfredENeuman has quit [Ping timeout: 240 seconds]
alienbot has quit [Read error: Connection reset by peer]
MercurialAlchemi has joined #ocaml
AlfredENeuman has joined #ocaml
snhmib has quit [Ping timeout: 264 seconds]
jmiven has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
jmiven has joined #ocaml
snhmib has joined #ocaml
ygrek has joined #ocaml
alfredo has joined #ocaml
orbifx has joined #ocaml
Simn has joined #ocaml
atsampso1 has quit [Ping timeout: 256 seconds]
atsampson has joined #ocaml
simon3 has joined #ocaml
<simon3>
If I have a file with contents like "let () = Printf.printf "%s\n" (String.uppercase "hello world")", how could I tell ocamlc to use the String module from core_kernel instead of the OCaml's default String module?
<simon3>
'-package core -package core_kernel' seems not working. It still uses the default String module, hence the deprecated warnings
orbifx has quit [Ping timeout: 248 seconds]
<jerith>
You can "open Core.Std" at the top of your module.
ygrek has quit [Ping timeout: 245 seconds]
<simon3>
Thanks. Is it true that I must "open Core.Std" or use "Core.Std.String". No way to config it in the ocamlc's parameters?
<jerith>
As far as I know, that's correct.
Flerex has joined #ocaml
<simon3>
Thank you very much. I have spent several hours googling.
mengu has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
alienbot has joined #ocaml
AltGr has joined #ocaml
zozozo has joined #ocaml
AlfredENeuman has quit [Ping timeout: 240 seconds]
<freehck>
The main thing is Map.Make(Comparator.Make(M)), where M has module type Core.Std.Comparator.Pre
larhat has joined #ocaml
diphuser has quit [Remote host closed the connection]
jnavila has joined #ocaml
AlexDenisov has joined #ocaml
simon3 has left #ocaml ["ERC (IRC client for Emacs 26.0.50.2)"]
gregoire has quit [Ping timeout: 258 seconds]
mami has quit [Ping timeout: 258 seconds]
gregoire has joined #ocaml
mami has joined #ocaml
zpe has joined #ocaml
frefity has quit [Quit: Ex-Chat]
antkong has quit [Quit: antkong]
fre has quit [Ping timeout: 264 seconds]
silver has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
orbifx-m has joined #ocaml
govg has joined #ocaml
Flerex has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<orbifx-m>
vbmithr: pinning msgpck complains that I don't have package 'ocaml' installed
<orbifx-m>
it's part of the dependencies
<orbifx-m>
is that a dummy package?
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<flux>
I wonder if the msgpack is using some fancypants opam 2.0 opam file where I understand ocaml itself is a package as well?
<flux>
otherwise seems like a stupid dependency?-)
<companion_cube>
I think it's for opam2 indeed
<orbifx-m>
should I upgrade my opam?
<flux>
you could pin it, fix the opam file locally, have it working, and submit an issue to the msgpack package :)
<orbifx-m>
when I pin it, how do I modify its files so that they aren't overwritten by an update?
<orbifx-m>
I tried editing the opam file under packages.dev but it gets reverted when I do opam install msgpck
lucybun has quit [Quit: lucybun]
<companion_cube>
opam2 is not released yet, so you clearly don't have to update
<flux>
orbifx-m, you should git clone a local repository and then pin that
<flux>
orbifx-m, not pin the original git repository
<orbifx-m>
I used pin edit, is that bad?
<flux>
I don't think so
<flux>
I mean it's ok
<flux>
but you did use opam pin add msgpack git://.. or http://, right?
<flux>
if you did then I wouldn't be surprised if it always overwrites your changes
<flux>
unless you do your changes to the pointed git reposiory :)
<orbifx-m>
I did pin add msgpck --dev-repos
<flux>
in other words, it's pinned to a remote version, not to your locally edited version. (I don't know if this is how it works, but it seems so if it's overwriting your changes.)
mfp has joined #ocaml
<orbifx-m>
worked with pin edit
<orbifx-m>
I've also requested a change
<orbifx-m>
thanks flux
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<vbmithr>
yeah, opam2
<vbmithr>
orbifx-m: fixed, sorry.
xorpse has joined #ocaml
FreeBirdLjj has joined #ocaml
<orbifx-m>
thanks vbmithr
shinnya has joined #ocaml
ltadeu has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sepp2k has joined #ocaml
<companion_cube>
hmm, interesting, I have a Stack_overflow in weak.ml :3
FreeBirdLjj has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
Flerex has joined #ocaml
lucybun has joined #ocaml
AlexDenisov has joined #ocaml
ocaml893 has joined #ocaml
<ocaml893>
Anyone knows lablgtk ?
<ocaml893>
General question !backing#set_foregroun
<ocaml893>
What is ! ?
<reynir>
It's to get the value contained in a reference
alienbot has quit [Read error: Connection reset by peer]
<ocaml893>
dereference
<ocaml893>
Right
<reynir>
let x = ref 10 in x := !x + 1; !x (* 11 *)
<dmbaturin>
ersoigj: Well, because there is no binding named 'hello' in your program.
<dmbaturin>
let () = greet "programmer"
<ersoigj>
>.<
<ersoigj>
Oh lord
<ersoigj>
I'm so sorry
<dmbaturin>
And this won't work either.
<ersoigj>
Then it instead complains "This expression has type string but an expression was expected of type\n unit"
agarwal1975_ has joined #ocaml
<dmbaturin>
let greet name = Printf.printf "Hello %s" name
<dmbaturin>
Or "print_endline ("Hello " ^ name)" (^ here is a string concatenation function).
<ersoigj>
dmbaturin: it'd be nice to have greet be a pure function. I'd like to have the side effect only in the "main" function - and be able to do something like `let () = Printf.printf(greet("Programmer"))`
<dmbaturin>
Printf.sprintf then.
agarwal1975 has quit [Ping timeout: 240 seconds]
agarwal1975_ is now known as agarwal1975
<ersoigj>
like this? let () = Printf.sprintf(greet("Programmer"))
<dmbaturin>
let greet name = Printf.sprintf "Hello %s" name ;; let () = print_endline (greet "programmer")
benwbooth has joined #ocaml
<dmbaturin>
Printf.sprintf is pure, it's ... -> string
rand__ has joined #ocaml
<ersoigj>
Cool! How can you know if a function is pure or not? Can the type system take care of that for you?
<dmbaturin>
From the type alone, you don't. You can be pretty certain that it's NOT pure if it evaluates to unit though.
<ersoigj>
I see. Thanks a lot for helping a humble newbie write his first program in Ocaml
ersoigj has quit [Remote host closed the connection]
ygrek has joined #ocaml
slash^ has joined #ocaml
<dmbaturin>
As if any mainstream language type system allows this. ;)
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
infinity0 has joined #ocaml
vicfred has joined #ocaml
tane has joined #ocaml
Flerex has joined #ocaml
wtetzner has joined #ocaml
copy` has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
<infinity0>
in haskell if you have a type constructor with 3 arguments it's usually better to put the type-param that is "more likely" to be fixed on the left, as in "StateT m s a"
<infinity0>
in scala they don't have currying of type constructors, but a few months ago they adopted SI-2712 which also favours the left-hand side
<infinity0>
i'm wondering what the ocaml preference is? it's different from haskell and scala because the params go before the type name