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
Fare has joined #ocaml
Fare has quit [Ping timeout: 276 seconds]
gtrak has quit [Ping timeout: 272 seconds]
gtrak has joined #ocaml
Haudegen has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 272 seconds]
gtrak has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
silver has quit [Read error: Connection reset by peer]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
_whitelogger has joined #ocaml
keep_learning has quit [Ping timeout: 260 seconds]
pierpal has joined #ocaml
Fare has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
malina has quit [Ping timeout: 244 seconds]
pierpa has quit [Quit: Page closed]
malina has joined #ocaml
aggelos__ has quit [Ping timeout: 256 seconds]
aggelos_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
_whitelogger has joined #ocaml
tianon has quit [Quit: brb]
ygrek has joined #ocaml
tianon has joined #ocaml
tianon has joined #ocaml
tianon has quit [Changing host]
tianon has quit [Client Quit]
tianon has joined #ocaml
sophiag has joined #ocaml
sophiag has quit [Client Quit]
malina has quit [Ping timeout: 244 seconds]
kvda has joined #ocaml
keep_learning has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
|jbrown| has quit [Ping timeout: 240 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fare has quit [Ping timeout: 272 seconds]
discord has quit [Remote host closed the connection]
discord has joined #ocaml
Fare has joined #ocaml
jaar has joined #ocaml
Fare has quit [Read error: Connection timed out]
Fare has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
Haudegen has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
freyr69 has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
Jesin has quit [Ping timeout: 276 seconds]
Jesin has joined #ocaml
johnelse has joined #ocaml
maker has quit [Quit: = ""]
rjbou has joined #ocaml
pierpal has quit [Quit: Poof]
kalio has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
kalio has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Fare has quit [Ping timeout: 256 seconds]
ziyourenxiang has joined #ocaml
tobiasBora has quit [Ping timeout: 265 seconds]
kvda has joined #ocaml
johnelse_ has joined #ocaml
johnelse has quit [Ping timeout: 276 seconds]
tobiasBora has joined #ocaml
TheLemonMan has joined #ocaml
mbuf has joined #ocaml
unyu has joined #ocaml
_whitelogger has joined #ocaml
dx has quit [Remote host closed the connection]
dx has joined #ocaml
Fare has joined #ocaml
Remco15 has joined #ocaml
Remco15 has quit [Remote host closed the connection]
Guest9254 has joined #ocaml
Guest9254 has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
unyu has quit [Quit: The end of the world is nigh. Bring as much popcorn as you can!]
unyu has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
silver has joined #ocaml
HALWOPR has joined #ocaml
Haudegen has quit [Remote host closed the connection]
johnelse_ has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnelse has quit [Ping timeout: 260 seconds]
gtrak has quit [Ping timeout: 272 seconds]
johnelse has joined #ocaml
johnelse has quit [Read error: No route to host]
johnelse has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ErrantEgo26 has joined #ocaml
ErrantEgo26 has quit [Remote host closed the connection]
johnelse has quit [Read error: Connection reset by peer]
mbuf has quit [Quit: Leaving]
johnelse has joined #ocaml
johnelse has quit [Read error: No route to host]
johnelse has joined #ocaml
Ceber has joined #ocaml
johnelse has quit [Ping timeout: 260 seconds]
Ceber has quit [Remote host closed the connection]
Haudegen has joined #ocaml
johnelse has joined #ocaml
reynir` has joined #ocaml
cryptocat1094 has joined #ocaml
johnelse_ has joined #ocaml
johnelse has quit [Read error: No route to host]
Haudegen has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
<bartholin> Haskell: https://i.imgur.com/3Y9M6HJ.png
<dmbaturin> bartholin: Really? I won't believe he's pure-bred.
<companion_cube> he's probably very lazy
<companion_cube> (someone should photoshop a blueprint of the dog, and call it "template haskell"
<companion_cube> )
gtrak has joined #ocaml
|jbrown| has joined #ocaml
kakadu has joined #ocaml
spew has joined #ocaml
xorpse has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
_andre has joined #ocaml
Jan\9 has joined #ocaml
mosstemple has joined #ocaml
Jan\9 has quit [Remote host closed the connection]
mosstemple has left #ocaml [#ocaml]
mosstemple has joined #ocaml
Haudegen has joined #ocaml
mosstemple has left #ocaml [#ocaml]
johnelse has joined #ocaml
mosstemple has joined #ocaml
freyr69 has quit [Remote host closed the connection]
johnelse_ has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
loic__ has joined #ocaml
loic__ has quit [Quit: Quitte]
philtor has quit [Ping timeout: 240 seconds]
mosstemple has quit [Ping timeout: 244 seconds]
ollehar has quit [Ping timeout: 256 seconds]
mnemem has joined #ocaml
mnemem has quit [Client Quit]
malina has joined #ocaml
Bronsa has joined #ocaml
rjbou has left #ocaml [#ocaml]
Humbedooh29 has joined #ocaml
Humbedooh29 has quit [Remote host closed the connection]
malina has quit [Ping timeout: 256 seconds]
malina has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
spew has joined #ocaml
Tycale23 has joined #ocaml
Tycale23 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
<pierpal> so, now we know Haskell is an Australian shepherd
<companion_cube> not to be confused with Australian ship hurd
<companion_cube> (which would be unlikely)
<TheLemonMan> *GNU/Hurd
<pierpal> (and btw Australian shepherds have nothing to do with australia...)
<companion_cube> well clearly it won't come from Europe, but from the GNU world
Spaulding has joined #ocaml
Spaulding has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Bronsa has quit [Ping timeout: 244 seconds]
sgnb` has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
sgnb` has joined #ocaml
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sz0 has joined #ocaml
Denommus has joined #ocaml
pmetzger has joined #ocaml
bezirg has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
loli has quit [Quit: WeeChat 2.2]
loli has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
malina has quit [Ping timeout: 260 seconds]
Jesin has quit [Quit: Leaving]
caseypme[m] has quit [*.net *.split]
sven[m] has quit [*.net *.split]
srenatus[m] has quit [*.net *.split]
rjungemann has quit [*.net *.split]
rks` has quit [*.net *.split]
shw has quit [*.net *.split]
kroot_ has quit [*.net *.split]
wickedshell has quit [*.net *.split]
pitastrudl has quit [*.net *.split]
rks`_ has joined #ocaml
kroot_ has joined #ocaml
shw has joined #ocaml
rjungemann has joined #ocaml
srenatus[m] has joined #ocaml
sven[m] has joined #ocaml
mehdib has joined #ocaml
caseypme[m] has joined #ocaml
pitastrudl has joined #ocaml
h11[m] has quit [*.net *.split]
Walter[m] has quit [*.net *.split]
isaachodes[m] has quit [*.net *.split]
drsmkl[m] has quit [*.net *.split]
spectrumgomas[m] has quit [*.net *.split]
jimt[m] has quit [*.net *.split]
l1x has quit [*.net *.split]
r3s1stanc3_ has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
cthuluh has quit [*.net *.split]
apache2 has quit [*.net *.split]
flux has quit [*.net *.split]
runciter has quit [*.net *.split]
flx_ has joined #ocaml
cthuluh has joined #ocaml
apache2 has joined #ocaml
r3s1stanc3 has joined #ocaml
dmbaturin has joined #ocaml
flx_ is now known as flux
l1x has joined #ocaml
isaachodes[m] has joined #ocaml
jimt[m] has joined #ocaml
spectrumgomas[m] has joined #ocaml
Walter[m] has joined #ocaml
drsmkl[m] has joined #ocaml
h11[m] has joined #ocaml
dmbaturin is now known as Guest32136
runciter has joined #ocaml
wickedshell has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pmetzger has quit [Remote host closed the connection]
jnavila has joined #ocaml
macky has joined #ocaml
macky has quit [Remote host closed the connection]
malina has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pmetzger has joined #ocaml
silver has quit [Ping timeout: 240 seconds]
Jesin has joined #ocaml
kakadu has joined #ocaml
bezirg has quit [Ping timeout: 240 seconds]
jack5638 has quit [Ping timeout: 256 seconds]
Jesin has quit [Quit: Leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
jack5638 has joined #ocaml
jao has joined #ocaml
pierpa has joined #ocaml
Jesin has joined #ocaml
copy` has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
theaspiringhacke has quit [*.net *.split]
webshinra has quit [*.net *.split]
quarters has quit [*.net *.split]
chelfi has quit [*.net *.split]
JSharp has quit [*.net *.split]
Leonidas has quit [*.net *.split]
octachron has quit [*.net *.split]
Leonidas has joined #ocaml
octachron has joined #ocaml
Leonidas has quit [Changing host]
Leonidas has joined #ocaml
JSharp has joined #ocaml
quarters has joined #ocaml
regnat[m] has joined #ocaml
JSharp has quit [Changing host]
JSharp has joined #ocaml
theaspiringhacke has joined #ocaml
chelfi has joined #ocaml
copy` has joined #ocaml
webshinra has joined #ocaml
jave has quit [*.net *.split]
gikiam has quit [*.net *.split]
dreamer has quit [*.net *.split]
wagle has quit [*.net *.split]
kandu has quit [*.net *.split]
nore has quit [*.net *.split]
asm89 has quit [*.net *.split]
dinosaure has quit [*.net *.split]
jeroud has quit [*.net *.split]
rseymour has quit [*.net *.split]
Ankhers has quit [*.net *.split]
Drup has quit [*.net *.split]
jave has joined #ocaml
kandu has joined #ocaml
dinosaure has joined #ocaml
gikiam has joined #ocaml
nore has joined #ocaml
jeroud has joined #ocaml
rseymour has joined #ocaml
asm89 has joined #ocaml
asm89 has quit [Changing host]
asm89 has joined #ocaml
jaar_ has joined #ocaml
Ankhers has joined #ocaml
wagle has joined #ocaml
c4rc4s_ has joined #ocaml
c4rc4s_ has quit [Changing host]
c4rc4s_ has joined #ocaml
Drup has joined #ocaml
c4rc4s has quit [Ping timeout: 256 seconds]
rwmjones has quit [Ping timeout: 256 seconds]
strmpnk has quit [Ping timeout: 256 seconds]
c4rc4s_ is now known as c4rc4s
sz0 has quit [Quit: Connection closed for inactivity]
jaar has quit [Ping timeout: 256 seconds]
rwmjones has joined #ocaml
strmpnk has joined #ocaml
catern has quit [Ping timeout: 260 seconds]
catern has joined #ocaml
randomA has joined #ocaml
<randomA> Hi, my binary tree lookup only works for the root node.
<randomA> I don't understand how it would return None
<randomA> the function lookup searches binary tree as defined in by 'a tree and looks for a matching k in its first value
lopex_ has joined #ocaml
<companion_cube> I think you inverted the left and right cases
<spew> randomA: there's a bug in your comparison
<spew> I think you meant k < k'
<randomA> ohhh
<randomA> thanks :)
<spew> try debugging it next time
cbarrett_ has joined #ocaml
<randomA> i did not know of an ocaml debug
<randomA> i have not learned print statements yet
jerith_ has joined #ocaml
AdmWiggin has joined #ocaml
tormen_ has joined #ocaml
<spew> well you should learn them they're not hard
<randomA> the print statements?
<randomA> it does not print when i type into console, it just prints ()
<spew> you can add print statements to your lookup to see where it goes when it is walking the tree
<spew> and then figure out what you did wrong with the comparison
<randomA> right, but the print statements need to have keyword "in" preceding it right?
Drup has quit [*.net *.split]
keep_learning has quit [*.net *.split]
tianon has quit [*.net *.split]
tormen has quit [*.net *.split]
lopex has quit [*.net *.split]
cbarrett has quit [*.net *.split]
bronsen has quit [*.net *.split]
jerith has quit [*.net *.split]
lopex_ is now known as lopex
cbarrett_ is now known as cbarrett
<pmetzger> OCaml's print functions are just functions. Read the manual, look at examples.
Drup has joined #ocaml
<randomA> suppose i have a binary search tree insert and it is deleting elements instead of adding to them. How would I debug this?
silver has joined #ocaml
<pierpa> best is to not put bugs in in the first place :)
<ZirconiumX> Or just use printfs
<ZirconiumX> GDB works, as does ocamldebug
<companion_cube> wait, gdb works now‽
<ZirconiumX> I thought it did, anyway
<randomA> But since ocaml does not let you have multiple statements I would have do like "if k = k ' then Node ((k,v), Leaf, Leaf) in Printf.printf "" in else if k < k' "?
<companion_cube> there are multiple statements
<randomA> but i need to use 'in'?
<companion_cube> if k=k' then ( printf "hello"; Node((k,v),Leaf,Leaf) ) else …
<randomA> oh interesting
<randomA> i know why it doesn't work. but i don't know how to fix it
<randomA> i would only debug if i didn't know why it does not work
<randomA> It is deleting the elements, and I know it is doing that because I replace, for example, the left subtree with insert k v l. But how would I make it so that it does not replace but propogate down until it sees a Leaf?
|jbrown| has quit [Remote host closed the connection]
<randomA> yet it needs to still go down the left subtree
<randomA> interestingly though, even if I insert -1, it still just deletes the previous rightside node
<companion_cube> not sure I see the problem in your snippet
AdmWiggin is now known as tianon
<randomA> companion_cube: in the utop, when I try to insert 3 "three" it deletes the previous 2 "two"
<companion_cube> no, your are just creating a new value
<randomA> i think i need to check for if the left node is a Leaf before I add inser k v l
<companion_cube> from the tree with only 1 in it
<companion_cube> insert 2 "two" mytree <--- this doesn't modify mytree
<companion_cube> it just creates a new tree and displays it
<randomA> oh
cryptocat1094 has quit [Quit: WeeChat 2.2]
<randomA> omg it works
<randomA> thanks
<companion_cube> that's the functional aspect! :)
<companion_cube> you don't modify the old tree, you build a new one, and it's just a normal value
<companion_cube> (like an integer)
ygrek has joined #ocaml
<randomA> it is different than python
<companion_cube> indeed
Fare has joined #ocaml
<Fare> Hi. I have a weird deadlock early in my Lwt program that does not happen when I run my unit tests. I'm a bit stumped and printf-debugging leads me nowhere. How do I debug that?
<Fare> the program is just doing select.
pmetzger has quit [Remote host closed the connection]
<ZirconiumX> Fare: under what conditions?
coventry has joined #ocaml
<Fare> ZirconiumX, early in the beginning, doing something that works in the unit tests (saving a data structure to the DB)
<Fare> I'm obviously doing something very wrong, which is actually likely failing to do something right, and probably is a very stupid omission. Still, debugging in the dark, is, well, challenging.
<ZirconiumX> How many threads are you using?
<coventry> Is there a way to run an ocsigen app under ocamldebug?
<companion_cube> Fare: are you literally using `select`?
<Fare> Nope. I suppose the ocaml runtime is.
<companion_cube> ah ok, lwt does use something like that, yes. I suppose you call `Lwt_main.run` with your main thread as well
<Fare> It's possible that there is a race condition in the initialization of my DB server, that somehow ends up happily in tests but not in the executable.
<companion_cube> I don't know how to easily debug this stuff :/
<Fare> Yes, I run Lwt_main.run and I start the DB server.
<companion_cube> sounds good… sorry I don't have better insights
coventry has quit [Remote host closed the connection]
<Fare> even weirder: thread A prints a message before it puts it in the Lwt_mvar mailbox, thread B prints a message just before it Lwt_mvar.take's the message... but in the executable, it never takes it, even though in test it does it no problem.
<Fare> I made the mailbox a global variable so there's no shadowing or aliasing possible.
<ZirconiumX> Fare: are there any compile flag differences between your environment and the dev environment?
jnavila has quit [Ping timeout: 256 seconds]
<Fare> not that I believe matter. I mean, my executable runs ocsigen, whereas my tests don't.
<Fare> Now I feel like having a Lwt thread in parallel introspect the content of the mvar...
<Fare> or even the contents of the Lwt internal tables.
<Fare> the background thread tells me that the mvar is full...
Grommet has joined #ocaml
<randomA> what does it mean when there are numbers after the error message saying that it expected some tree?
<randomA> This expression has type (int * string) tree/4906975
<randomA> such as this?
<randomA> but an expression was expected of type ('a * 'b) tree/5908159
<companion_cube> it means you redefined the type `tree`
<companion_cube> but that some functions still use the old version
<companion_cube> the numbers are the actual names of the new and old types
<Fare> to make sure the mailbox is the same physical object, how do I get its pointer address?
<Fare> (assuming no gc between the two debugging statements)
<companion_cube> you can't get a pointer address, but you can use `==`
<companion_cube> ah
<Fare> the two objects are in different threads, and the variable is global, but maybe something affects it somehow during initialization.
<companion_cube> I can't find anything to get the address in Obj :/
pmetzger has joined #ocaml
<randomA> oh
<randomA> ok
quarters has quit [Changing host]
quarters has joined #ocaml
quarters has joined #ocaml
<randomA> do you think this function for checking if a tree is a binary search tree works? https://bpaste.net/show/636b42628f00
<randomA> it just checks that every node's left and right value are < or > then the node's value
<randomA> oh i can see why it doesn't actually work
<randomA> wait actually i think it should because of transitive property
<companion_cube> typically I think you need to carry around a lower and upper bound
<randomA> yea that is what the hint said
<companion_cube> these should be options, since you start with neither an upper nor a lower bound
<Fare> companion_cube, (2 * Obj.magic foo) works
<randomA> this would be an invalid bst? https://bpaste.net/show/3cc7de85077f
<companion_cube> Fare: ewww
<randomA> because 5 > 8
<companion_cube> but it must work indeed
<companion_cube> randomA: indeed that's invalid
<randomA> ok
<companion_cube> when you go into the left tree you need to have `Some 3` as an upper bound
<randomA> so the helper function should be returning something lilke Some Max 3 and Some Min 1
spew has quit [Quit: going home]
moei has quit [Quit: Leaving...]
<Fare> in any case, there's no mistaken identity regarding the mvar, so somehow the listener is not getting woken up when the mvar is filled. :( :( :(
<Fare> That smells like a bug in Lwt :( :( :(
<Fare> OK, what the "Right" way to compile and link my own lwt from source?
Denommus has quit [Remote host closed the connection]
<companion_cube> I'd say you should clone the lwt repository and `opam pin` it
kvda has joined #ocaml
silver_ has joined #ocaml
kakadu has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 272 seconds]
randomA has quit [Quit: leaving]
silver has quit [Ping timeout: 240 seconds]
<Fare> companion_cube, thanks!
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
bronsen has joined #ocaml
moei has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
<haesbaert> anyone know the trick to force tuareg to put * on the beggining of multiline comments ?
<haesbaert> I want (*\n * balbal\n * blablabal\n * blablabl\n *)
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Fare> To build lwt from source, I tried upgrading to the newer opam 2.0.0r4, but it fails with: [ERROR] The compilation of ocaml failed at "/home/fare/.opam/opam-init/hooks/sandbox.sh build ocaml unix.cma gen_ocaml_config.ml".
steck has joined #ocaml
<steck> hello
pmetzger has quit []
steck has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
<Fare> steck: hi!
jao has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
gtrak has joined #ocaml
caente has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]