malvarez has quit [Read error: Connection reset by peer]
rz has quit [Quit: Ex-Chat]
cesar_ has joined #ocaml
cesar_ is now known as Guest2520
rz has joined #ocaml
ollehar1 has quit [Ping timeout: 260 seconds]
jpdeplaix has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
mcclurmc has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
watermind has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
wolfnn has quit [Quit: Leaving.]
jpdeplaix has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manizzle has joined #ocaml
manud_ has joined #ocaml
strobegen has joined #ocaml
manud has quit [Ping timeout: 264 seconds]
manud_ is now known as manud
mcclurmc has quit [Remote host closed the connection]
ggole has joined #ocaml
nikki93 has quit [Remote host closed the connection]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ocaml
kyrylo has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
kyrylo has quit [Ping timeout: 252 seconds]
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
nikki93 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Remote host closed the connection]
osa1_ has joined #ocaml
skchrko has quit [Remote host closed the connection]
dant3 has joined #ocaml
osa1 has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
mcclurmc has joined #ocaml
ygrek has joined #ocaml
frx has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
Guest2520 has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
michael_lee has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 260 seconds]
Simn has joined #ocaml
nikki93 has quit []
snyp has joined #ocaml
snyp has quit [Client Quit]
boogie has joined #ocaml
Arzaga has joined #ocaml
mcclurmc has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
Arzaga has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
dant3 has quit [Remote host closed the connection]
Arzaga has quit [Client Quit]
skchrko has joined #ocaml
dant3 has joined #ocaml
zpe has joined #ocaml
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 246 seconds]
Arzaga has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
<adrien>
morning
jonludlam has quit [Remote host closed the connection]
zpe has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
csakatoku has quit [Ping timeout: 246 seconds]
talzeus_ has joined #ocaml
csakatoku has joined #ocaml
Arzaga has quit [Quit: Computer has gone to sleep.]
zpe has quit [Remote host closed the connection]
cago has joined #ocaml
Arzaga has joined #ocaml
snyp has joined #ocaml
rz has quit [Read error: Operation timed out]
csakatok_ has joined #ocaml
rand000 has joined #ocaml
dant3 has quit [Remote host closed the connection]
csakatoku has quit [Ping timeout: 264 seconds]
Arzaga has quit [Quit: Computer has gone to sleep.]
mcclurmc has joined #ocaml
lloy0076 has joined #ocaml
Arzaga has joined #ocaml
_5kg has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 260 seconds]
<lloy0076>
In ( http://pastebin.com/GfMmvFW3 ) I have in my .ocamlinit 'open Core.Std;;' but I still need to 'open Core.Std;;' in the command prompt in 'utop' for the examole I got from the online Real World OCAML book.
<companion_cube>
where is your .ocamlinit?
<lloy0076>
Err, it's at the top of that pastebin but should I paste it here anyway?
<companion_cube>
oh, here you need ;; at the end of the file
<companion_cube>
I meant on your filesystem ^^
Arzaga has quit [Quit: Computer has gone to sleep.]
<companion_cube>
(I think it's better to use ;; in toplevel-related files)
<lloy0076>
Unfortunately, that doesn't make a difference.
<lloy0076>
I suspect it's something to do with that "Invalid argument: " line that utop is saying but I"m not proficient enough with ocaml to figure out what that means or what would cause it.
<lloy0076>
And google only gives me the source code to the Debug module (iirc).
snyp has quit [Ping timeout: 260 seconds]
Arzaga has joined #ocaml
<companion_cube>
ah, utop is showing you an error
<companion_cube>
this looks like the syntax extension "core.syntax" has failed to load
<companion_cube>
therefore, 'open Core.Std;;' that comes after has just been ignored by utop
<companion_cube>
I don't know much about camlp4 sadly
<companion_cube>
lloy0076: at least, you can try to move the 'open Core.Std' line above '#require "core.syntax"', because I believe the latter is the faulty line
rz has joined #ocaml
mika1 has joined #ocaml
<lloy0076>
companion_cube: Hmmm.
<lloy0076>
I think I might have it...
<lloy0076>
It seems #threads isn't there.
<lloy0076>
Err #thread
<lloy0076>
#use topfind —> works
<lloy0076>
Moment I put in #thread up comes that error.
<lloy0076>
I might attempt to figure out how to install that.
<lloy0076>
(I really can't be much more broken than I am anyway :P)
<companion_cube>
opam install base-threads should do, if you use opam
<lloy0076>
I could have a cooky system. I think I'll just stick with remembering to 'open Core.Std;;' at the moment. I may bring up a fresh debian or other Linux install (I'm actually using OS X Mavericks and I -think- it's using home brew's ocaml)
Arzaga has quit [Quit: Computer has gone to sleep.]
frxx has joined #ocaml
frx has quit [Read error: Connection reset by peer]
zpe has quit [Ping timeout: 245 seconds]
ulfdoz has joined #ocaml
zpe has joined #ocaml
lostcuaz has joined #ocaml
lloy0076 has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
jonludlam has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
boogie has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 260 seconds]
rand000 has joined #ocaml
pminten has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
talzeus_ has joined #ocaml
vbmithr_ has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
BitPuffin has joined #ocaml
ygrek has quit [Remote host closed the connection]
ulfdoz has quit [Read error: Operation timed out]
ygrek has joined #ocaml
kerneis has quit [Ping timeout: 272 seconds]
zpe has quit [Read error: No route to host]
kerneis has joined #ocaml
zpe has joined #ocaml
pippijn has quit [Ping timeout: 272 seconds]
bacam has quit [Ping timeout: 272 seconds]
pippijn has joined #ocaml
bacam has joined #ocaml
mcclurmc has joined #ocaml
talzeus_ has quit [Remote host closed the connection]
mcclurmc has quit [Ping timeout: 250 seconds]
fantasti` has quit [Remote host closed the connection]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
dant3 has quit [Remote host closed the connection]
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
dsheets has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
dant3 has quit [Remote host closed the connection]
ocp has joined #ocaml
dant3 has joined #ocaml
vbmithr has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
rand000 has joined #ocaml
Neros has quit [Remote host closed the connection]
dant3 has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
thomasga has joined #ocaml
avsm has joined #ocaml
watermind has joined #ocaml
thomasga has quit [Client Quit]
snyp has joined #ocaml
dant3 has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
snyp has quit [Quit: leaving]
watermind has quit [Quit: Konversation terminated!]
watermind has joined #ocaml
gargawel has joined #ocaml
gargawel has quit [Client Quit]
gargawel has joined #ocaml
watermind has quit [Ping timeout: 246 seconds]
mcclurmc has joined #ocaml
dant3 has quit [Remote host closed the connection]
dant3 has joined #ocaml
mcclurmc has quit [Ping timeout: 259 seconds]
avsm has joined #ocaml
snyp has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
snyp has quit [Quit: leaving]
rand000 has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
watermind has joined #ocaml
ollehar has joined #ocaml
ulfdoz has joined #ocaml
avsm has joined #ocaml
watermind has quit [Ping timeout: 246 seconds]
avsm has quit [Ping timeout: 246 seconds]
rand000 has joined #ocaml
ygrek has joined #ocaml
avsm has joined #ocaml
watermind has joined #ocaml
watermind has quit [Client Quit]
mcclurmc has joined #ocaml
frx has joined #ocaml
AltGr has left #ocaml []
AltGr has joined #ocaml
frxx has quit [Ping timeout: 265 seconds]
mreca has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
thomasga has quit [Quit: Leaving.]
dant3 has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
dant3 has joined #ocaml
pminten has quit [Remote host closed the connection]
thomasga has joined #ocaml
amirmc has joined #ocaml
talzeus_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
michael_lee has joined #ocaml
q66_ is now known as q66
BitPuffin has quit [Quit: WeeChat 0.4.2]
AltGr has left #ocaml []
shinnya has joined #ocaml
AltGr has joined #ocaml
nlucaroni has joined #ocaml
Arzaga has joined #ocaml
Arzaga has quit [Client Quit]
csakatoku has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
rand000 has quit [Ping timeout: 252 seconds]
dant3 has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
tane has joined #ocaml
dant3 has joined #ocaml
nlucaroni has quit [Quit: leaving]
nlucaroni has joined #ocaml
dant3 has quit [Client Quit]
amirmc1 has joined #ocaml
amirmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
cago has left #ocaml []
AltGr has left #ocaml []
AltGr has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
mchqwerty has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
AltGr has left #ocaml []
AltGr has joined #ocaml
Arzaga has joined #ocaml
Arzaga has quit [Client Quit]
amirmc1 has quit [Quit: Leaving.]
amirmc has joined #ocaml
lopho has quit [Ping timeout: 240 seconds]
ousado has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
kyrylo has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
lopho has joined #ocaml
q66_ has joined #ocaml
amirmc1 has joined #ocaml
amirmc has quit [Read error: Connection reset by peer]
snyp has joined #ocaml
BitPuffin has joined #ocaml
mika1 has quit [Quit: Leaving.]
q66 has quit [Ping timeout: 246 seconds]
ocp has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
Neros has joined #ocaml
q66_ is now known as q66
skchrko has quit [Quit: Leaving]
cesar_ has joined #ocaml
cesar_ is now known as Guest10518
shinnya has quit [Ping timeout: 260 seconds]
vpm has quit [Quit: co'o]
shinnya has joined #ocaml
vpm has joined #ocaml
michael_lee has quit [Ping timeout: 250 seconds]
snyp has quit [Quit: "bbl"]
PM has quit [Ping timeout: 252 seconds]
michael_lee has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
amirmc1 has quit [Quit: Leaving.]
michael_lee has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
PM has joined #ocaml
sgnb has joined #ocaml
nlucaroni has quit [Quit: leaving]
nlucaroni has joined #ocaml
ontologiae has joined #ocaml
skchrko has joined #ocaml
gargawel has quit [Quit: gniah]
gargawel has joined #ocaml
Kakadu has joined #ocaml
dant3 has joined #ocaml
zpe has quit [Remote host closed the connection]
rand000 has joined #ocaml
boogie has joined #ocaml
Puffin has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
Puffin is now known as BitPuffin
zpe has joined #ocaml
jonludlam has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
watermind has joined #ocaml
rand000 has quit [Read error: No route to host]
mchqwerty has quit [Quit: Odcházím]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
rand000 has joined #ocaml
thomasga has quit [Ping timeout: 252 seconds]
cynthia has joined #ocaml
cynthia has quit [Quit: WeeChat 0.3.8]
manizzle has quit [Ping timeout: 252 seconds]
AltGr has left #ocaml []
dsheets has quit [Ping timeout: 246 seconds]
dant3 has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
dant3 has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
malvarez has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
osa1__ has quit [Quit: Konversation terminated!]
manizzle has joined #ocaml
zpe has quit [Remote host closed the connection]
<ddosia>
let rec endless_loop = 1 :: 2 :: 3 :: endless_loop;; (* Why this thing is working? *)
WraithM has joined #ocaml
manizzle has quit [Ping timeout: 250 seconds]
<ddosia>
and hwat more interesting for me when I type this into utop, I see how my memory usage grows, but after awhile this stops and I see val el : int list = [1;2;3;1;2;3...]
<ddosia>
but if I manually envoke this fnction it will never returns
<thizanne>
ddosia: do you know C (or what a pointer is) ?
<ddosia>
yes
<thizanne>
then you can see endless_loop as a pointer to a list
<thizanne>
a list being either an empty list (~ null), or a pair (element, pointer to the tail of the list)
<thizanne>
so in let rec li = 1 :: li, the head is 1, and the tail of the list is the list itself
<thizanne>
pointer-talking, the list points to itself
<thizanne>
it's a cyclic structure, and that's why it works
<ddosia>
thizanne: I could understand that
<thizanne>
but I don't know why your memory usage grows at the point you can notice it
<ddosia>
but what I cant, why during function construction I see how utop prints me a first part of endless datastructure and finish after that
<thizanne>
which function ?
<ddosia>
endless_loop
<thizanne>
it's not a function, it's a list
<ddosia>
it is a function
<ddosia>
or not
<thizanne>
not :)
<ddosia>
I am not sure, sorry =)
<ddosia>
I thought it is
Xenasis has joined #ocaml
<ddosia>
Are you sure?
<thizanne>
no, functions are things which take an argument and return a result (this result possibly being "nothing" like ())
<thizanne>
here you define a list which refers to itself
<thizanne>
even if you write "let rec"
<ddosia>
oh, how interesting
<ddosia>
what a practical purpose of such construction?
<thizanne>
let means you define something (not necessarily a function, see let x = 1), and rec means that the definition may refer to this thing (like let rec li = 1 :: li)
<thizanne>
well, this construction gives you a circular list
<thizanne>
if you can find a practical purpose to a circular list, then you can use it :)
<ddosia>
I even could not construct that
<ddosia>
ah, sorry, actually I can
<ddosia>
I just tried to do List.length endless_loop;;
<thizanne>
indeed, you won't be able to call on this list any function that needs to go through the entire list
<thizanne>
List.map (fun x -> x + 1) endless_list won't work either, even if you could guess the "result" as 2 :: 3 :: 4 :: 2 :: 3 :: 4 :: ...
<ddosia>
what if I invoke some random inside of this list to create infinite list of rnadom integers?
manizzle has joined #ocaml
<thizanne>
try it :)
<thizanne>
(try to guess the result first)
<thizanne>
(fast answer : you can't, because you're not creating an infinite list but a cyclic list)
<smondet>
about the memory usage: utop is trying to display the value, so it is going through the cyclic datastructure
<smondet>
until it stops because of some "max-depth" guard
<thizanne>
deeper than the vanilla ocaml toplevel does ?
nlucaroni has left #ocaml []
nlucaroni has joined #ocaml
<smondet>
I'm not sure, but think the difference there is that the toplevel just prints stuff (tail recursively), utop is communicating with a toplevel (hence buffering stuff?)
mcclurmc has quit [Remote host closed the connection]
Anarchos has joined #ocaml
ocp has joined #ocaml
zpe has joined #ocaml
Kakadu has quit []
ggole has quit []
amirmc has joined #ocaml
talzeus_ has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
ousado has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
wolfnn has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
dant3 has quit [Ping timeout: 246 seconds]
BitPuffin has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
BitPuffin is now known as JoinTheVNUGPuffi
JoinTheVNUGPuffi is now known as VNUGPuffin
milosn_ has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
VNUGPuffin is now known as BitPuffin
malo has joined #ocaml
Anarchos has joined #ocaml
Puffin has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
Puffin is now known as BitPuffn
Anarchos has quit [Ping timeout: 240 seconds]
talzeus_ has joined #ocaml
Anarchos has joined #ocaml
ontologiae has joined #ocaml
amirmc has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
Rc43 has joined #ocaml
<Rc43>
Hello.
<Rc43>
Is there possibility to print arbitrary values in ocamldebug?
<Rc43>
Like in REPL.
<Rc43>
If I try to apply any function to known value I get syntax error.
Znudzon has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
malvarez has quit [Ping timeout: 248 seconds]
lopex has quit [Ping timeout: 260 seconds]
talzeus__ has joined #ocaml
talzeus_ has quit [Ping timeout: 260 seconds]
rz has quit [Ping timeout: 264 seconds]
rz has joined #ocaml
sheijk has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
<nlucaroni>
You have to install a printer.
lopex has joined #ocaml
<Rc43>
nlucarni, are there special printers that allow to print complex expressions?
<Rc43>
nlucarni, not only variables
<Anarchos>
Rc43 "p xyz" ?
kyrylo has quit [Ping timeout: 246 seconds]
darkf has joined #ocaml
<Rc43>
Anarchos, that is what I am talking about
<Rc43>
Anarchos, I can do "print x", but can't "print (f x)".
<nlucaroni>
if x is bound to printer f then that would be what you're doing.
<Rc43>
?
<Rc43>
f is an arbitrary function
<Anarchos>
Rc43 i can't help you further
strobegen has quit [Quit: Leaving.]
ocp has quit [Ping timeout: 245 seconds]
jao has quit [Ping timeout: 260 seconds]
osa1 has joined #ocaml
<nlucaroni>
f isn't arbitrary, it must type-check. :)
zpe has quit [Remote host closed the connection]
<nlucaroni>
what you need to do is "load_printer f.cmo" then "install_printer F.f"
<nlucaroni>
then print x will use f to print x.
w0rm has joined #ocaml
w0rm has quit [Client Quit]
tane has quit [Quit: Verlassend]
talzeus__ is now known as talzeus_
Ptival has quit [Ping timeout: 252 seconds]
Ptival has joined #ocaml
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mcclurmc has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
ollehar has quit [Ping timeout: 265 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
nlucaroni has left #ocaml []
wolfnn has quit [Read error: Operation timed out]
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 260 seconds]
spacun has joined #ocaml
<spacun>
hello
<spacun>
I have a problem using Hashtbl: it looks like that I'm hit really bad by the comparison of strings when used as keys
<spacun>
gprof shows compare_val and camlHashtbl__mem as the offenders (from a performance point view).
<Drup>
Hashtbl doesn't compare anything, so not sure what you are talking about
<spacun>
it will have to compare the keys to know that there is no collision, no?
<Drup>
not really, and it would be the hashed key. And it would certaintly not use the polymorphic comparison for that
<spacun>
what do you mean "it would be the hashed key">
<spacun>
?
<spacun>
for the second part, I agree and yet that what it looks like from gprof
<Drup>
can you show the whole program ?
zpe has joined #ocaml
<spacun>
unfortunately I can - but the gist of it is that I have a dictionary of strings - ints and query often the dictionary asking whether a given string is a member
<spacun>
I also use heavily the module Str. to split strings
<spacun>
but as I said my program spends 20% of the time in compare_val and that seems to be invoked from Hashtbl_mem
<spacun>
it completely makes sense that the 'mem' function calls a comparison function
<spacun>
I am not sure about it using the 'compare_val' one
Simn has quit [Quit: Leaving]
zpe has quit [Ping timeout: 240 seconds]
<maurer>
compare_val is polymorphic compare
<maurer>
Specialize your comparison to be non-polymorphic and it should go faster
<maurer>
but I'm not sure why you're seeing compare occurring in the hashtbl_mem
<Drup>
I just looked at the implementation
<maurer>
I suppose in the last step it would od that
<Drup>
it does use the polymorphic comparison
<maurer>
after it's selected the bucket and is walking the tree
<maurer>
Drup: Can you not pass in a non-polymorphic one to use?
<Drup>
maurer: yes
<Drup>
not afaik
<maurer>
Well that's awkward
<maurer>
I know from some of my code that compare_val has a very bad constant factor
<Drup>
oh, actually, it may be possible with the Make functor
<maurer>
Yeah, looks like
<maurer>
spacun: use Hashtbl.Make()
<Drup>
indeed, you can use a custom equal function