adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
kakadu_ has quit [Ping timeout: 260 seconds]
mahmudov has quit [Remote host closed the connection]
sagax has quit [Remote host closed the connection]
serge_ has joined #ocaml
serge_ has quit [Ping timeout: 260 seconds]
zgasma has quit [Quit: leaving]
kleisli_ has quit [Ping timeout: 260 seconds]
jave has quit [Ping timeout: 265 seconds]
olle has quit [Ping timeout: 240 seconds]
olle has joined #ocaml
sagax has joined #ocaml
mfp has quit [Ping timeout: 268 seconds]
serge_ has joined #ocaml
serge_ has quit [Ping timeout: 268 seconds]
zmt00 has joined #ocaml
zmt01 has quit [Ping timeout: 248 seconds]
andreas303 has quit [Ping timeout: 240 seconds]
cartwright has quit [Ping timeout: 240 seconds]
RalfJ has quit [Quit: No Ping reply in 180 seconds.]
RalfJ has joined #ocaml
kvik has quit [Ping timeout: 260 seconds]
kvik has joined #ocaml
kleisli_ has joined #ocaml
ehirdoy has quit [Ping timeout: 265 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 272 seconds]
ehirdoy has joined #ocaml
andreas303 has joined #ocaml
kleisli_ has quit [Ping timeout: 260 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 272 seconds]
dborisog has joined #ocaml
gravicappa has joined #ocaml
vesper has quit [Ping timeout: 240 seconds]
vesper11 has joined #ocaml
vicfred has quit [Quit: Leaving]
nopf has quit [Ping timeout: 260 seconds]
nopf has joined #ocaml
NSA_Spy has quit [Ping timeout: 240 seconds]
narimiran has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
malina has quit [Ping timeout: 265 seconds]
<nicolaus> Hi, I am basing my implementation of maps in here: https://ocaml.org/learn/tutorials/map.html
<nicolaus> i just want to ask how can i get the max key value and it's pair
<vsiles> not sure about this particular implementation, but they do provide a max_binding / max_binding_opt operation that could be just what you want
mbuf has joined #ocaml
<nicolaus> yes, I tried that also, but I don't understand the usage
<nicolaus> i want to be able to get the key
<nicolaus> it returns a MyUsers.key * string but I want a string return which is the key
serge has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
ggole has joined #ocaml
Haudegen has joined #ocaml
<vsiles> nicolaus: can you show me how you created your map ? It should return a key/value pair. Probably MyUsers.key is just an alias to string
<vsiles> nicolaus: https://pastebin.com/sNxy9fLK as expected it's just an alias
arbipher has quit [Remote host closed the connection]
mfp has joined #ocaml
Wojciech_K has joined #ocaml
jave has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
<nicolaus> module Float = struct
<nicolaus> type t = float
<nicolaus> let compare = Pervasives.compare
<nicolaus> end
<nicolaus> ;;
<nicolaus> module MyUsers = Map.Make(Float);;
<nicolaus> I want to be able to do this: print_float (MyUsers.max_binding m);;
<nicolaus> or get the float key
<vsiles> max_binding returns a pair
<vsiles> you have to extract your key from this pair
<vsiles> you can use the `fst` function which does just that
<vsiles> or use a destructive let like `let (x, _) = Myusers.max_binding m in ...`
<vsiles> so for your example, you can do `print_float (fst (MyUsers.max_binding m))`
<nicolaus> damn, spent most of my hours today dealing with that. thank vsiles
<nicolaus> got it
<vsiles> you're welcome :D
<vsiles> I know using merlin helped me a lot
<vsiles> you can query for the type of expressions
<vsiles> and if you query multiple times, it can unfold aliases, so you know what's what
<nicolaus> yeah, like depending on the comiler is difficult because the errors are sometimes vague
<vsiles> the compiler is fine by me, but having to recompile just to get a type error is time wasting
<vsiles> merlin rocks
serge has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
<nicolaus> thanks again vsiles
nullcone has quit [Quit: Connection closed for inactivity]
kvik has quit [Changing host]
kvik has joined #ocaml
dmiles has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
zmt01 has joined #ocaml
zmt00 has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
dmiles has joined #ocaml
ocaml459 has joined #ocaml
webshinra has joined #ocaml
bartholin has quit [Quit: Leaving]
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ocaml459 has joined #ocaml
kleisli_ has joined #ocaml
pierpal has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
infinity0 has joined #ocaml
freyr69 has joined #ocaml
<freyr69> I'm trying Ocamlformat, and while it's nice, it indents differently from what Tuareg does out of the box
<freyr69> Do people usually tune Tuareg or you just apply ocamlformat on save?
<freyr69> Does anybody have Tuareg indentation configs similar to what Ocamlformat does with ``conventional'' or ``ocamlformat'' profiles?
Haudegen has quit [Quit: Bin weg.]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kleisli_ has quit [Ping timeout: 260 seconds]
pierpal has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
kleisli_ has joined #ocaml
<smondet> freyr69: I think there is an option to ocamlformat to behave similaryly to ocp-indent but tuareg not that I know of. (I think I've had tuareg indentation disabled for more than 8 years now :) )
serge has joined #ocaml
serge has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
freyr69 has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
pierpal has joined #ocaml
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
kleisli_ has quit [Quit: Leaving]
Wojciech_K has quit [Remote host closed the connection]
kleisli has joined #ocaml
serge has joined #ocaml
kleisli has quit [Client Quit]
kleisli has joined #ocaml
malina has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
serge has joined #ocaml
arbipher has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
ygrek__ has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
h11 has quit [Quit: The Lounge - https://thelounge.chat]
h11 has joined #ocaml
pierpal has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
olle has quit [Ping timeout: 260 seconds]
olle has joined #ocaml
mbuf has quit [Quit: Leaving]
vicfred has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
vicfred has quit [Remote host closed the connection]
vicfred has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 272 seconds]
ggole has quit [Quit: Leaving]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
bartholin has joined #ocaml
mahmudov has joined #ocaml
ocaml459 has joined #ocaml
dborisog has quit [Ping timeout: 240 seconds]
serge has joined #ocaml
jnavila has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
Nahra has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
pierpal has joined #ocaml
Nahra has quit [Quit: leaving]
Nahra has joined #ocaml
Tsukimaru has joined #ocaml
Nahra has quit [Quit: leaving]
Haudegen has joined #ocaml
Tsukimaru has quit [Client Quit]
arbipher has quit [Remote host closed the connection]
Nahra has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
_whitelogger has joined #ocaml
Hrundi_V_Bakshi has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 260 seconds]
kakadu_ has joined #ocaml
nullcone has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
olle has joined #ocaml
malina has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
Nahra has quit [Quit: leaving]
olle has quit [Ping timeout: 260 seconds]
olle has joined #ocaml
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pierpal has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
ocaml459 has joined #ocaml
malina has joined #ocaml
ocaml459 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
serge has joined #ocaml
serge has quit [Ping timeout: 272 seconds]
pierpal has quit [Ping timeout: 260 seconds]
kleisli has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
kakadu_ has quit [Ping timeout: 240 seconds]
kakadu_ has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
jnavila has quit [Ping timeout: 272 seconds]
kakadu__ has joined #ocaml
kakadu_ has quit [Ping timeout: 265 seconds]
Serpent7776 has quit [Quit: leaving]
pierpal has joined #ocaml
ygrek__ has quit [Ping timeout: 268 seconds]
kakadu__ has quit [Remote host closed the connection]
NSA_Spy has joined #ocaml
serge_ has joined #ocaml
serge_ has quit [Ping timeout: 260 seconds]
ocaml459 has joined #ocaml
ocaml459 has quit [Client Quit]
Hrundi_V_Bakshi has quit [Ping timeout: 260 seconds]
mahmudov has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 268 seconds]