lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
zpe has joined #ocaml
<Drup> yes
<Drup> the code is quite convoluted
foocraft has quit [Quit: the gay science]
<ThatTreeOverTher> Hey guys, I'm getting a syntax error on this piece of code: http://pastebin.ca/2700400
<ThatTreeOverTher> File "lexer.ml", line 7, characters 2-3:
<ThatTreeOverTher> Error: Syntax error
<Drup> yes, you need the syntax extension for parsers
<Drup> for streams*
<tab1293> Drup if I am passing an evaluted function as a parameter to another function can I call that evaluted function something that I define?
<Drup> what is an "evaluated function" ?
<tab1293> So can I do let func2 ((func1 x) as y) z
<tab1293> so within func2 I can reference (func1 x) as y
<Drup> that doesn't make any sense
<tab1293> Drup: how so?
<Drup> ocaml is call by value, you can't have an argument (f x)
<Drup> it's evaluated before being given to the function
<tab1293> in that code it is done successfully on line 34
<tab1293> *line 30
<Drup> it's a call
<Drup> not a declaration
<ThatTreeOverTher> Drup, how do I get this?
<ThatTreeOverTher> "syntax extension"
<Drup> ThatTreeOverTher: it's part of camlp4
<Drup> tab1293: what is line 30 is no more complicated than (2 + (3 + 5))
<tab1293> Drup: yes I see now, silly question
studybot_ has quit [Read error: Connection reset by peer]
WraithM has quit [Ping timeout: 276 seconds]
iorivur has quit [Ping timeout: 265 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
zpe has quit [Ping timeout: 276 seconds]
nojb has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 265 seconds]
tab1293 has quit [Quit: Page closed]
q66 has quit [Quit: Leaving]
lostcuaz has joined #ocaml
iorivur has joined #ocaml
Derander_ has quit [Quit: ZNC - http://znc.sourceforge.net]
zpe has joined #ocaml
studybot has joined #ocaml
divyanshu has joined #ocaml
justinfront has joined #ocaml
WraithM has joined #ocaml
Derander has joined #ocaml
Derander has quit [Excess Flood]
manizzle has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
<ThatTreeOverTher> Drup, how do I install camlp4? I've tried everything. I'm on Arch Linux
zpe has quit [Ping timeout: 252 seconds]
boogie has quit [Remote host closed the connection]
Derander has joined #ocaml
iorivur has quit [Ping timeout: 265 seconds]
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
<smondet> ThatTreeOverTher: with ocaml up to 4.01.0 camlp4 should be there by default
<ThatTreeOverTher> smondet, how do I check if it's there?
iorivur has joined #ocaml
<smondet> camp4o in the path?
<smondet> what version of OCaml?
Derander has joined #ocaml
<ThatTreeOverTher> smondet, it appears to exist `file /usr/bin/camlp4` /usr/bin/camlp4: a /usr/bin/ocamlrun script executable (binary data)
<ThatTreeOverTher> so why isn't my thing compiling?
<ThatTreeOverTher> smondet, ^
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
zpe has joined #ocaml
<smondet> i don't know :)
<smondet> you're still on that parser thing? what is the compilation command?
malo has quit [Quit: Leaving]
<ThatTreeOverTher> ocamlbuild toy.byte where toy.ml looks like http://pastebin.ca/2700433
<smondet> and that's all? no `_tags` file or ocamlbuild plugin?
<smondet> waht's the error?
iorivur has quit [Ping timeout: 255 seconds]
<ThatTreeOverTher> it was """File "lexer.ml", line 7, characters 2-3:
<ThatTreeOverTher> Error: Syntax error""" but I now get a different error after borrowing a _tags file from someone else
<ThatTreeOverTher> which looks like this for the record https://github.com/danluu/ocaml-llvm-tutorial/blob/master/_tags
<ThatTreeOverTher> now it looks like this http://pastebin.ca/raw/2700441
<ThatTreeOverTher> the error I mean
<smondet> where does the module Token come from?
<ThatTreeOverTher> never mind, gotta go
<ThatTreeOverTher> thanks for the help
<smondet> welcome
ThatTreeOverTher has quit [Remote host closed the connection]
Derander has joined #ocaml
boogie has joined #ocaml
csakatoku has joined #ocaml
tlockney_away is now known as tlockney
zpe has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
manizzle has joined #ocaml
nrlucaroni has joined #ocaml
manizzle has quit [Ping timeout: 252 seconds]
philtor has joined #ocaml
tab1293 has joined #ocaml
<tab1293> Drup, can you please explain what the Some constructor does?
zpe has joined #ocaml
<tautologico> Some builds a value of an option type
<tab1293> What is an option type?
<tautologico> an option type is used in situation where an expression may not have a valid value
<tautologico> like, say you write an integer division function
<tautologico> div 6 3 will return Some 2
<tautologico> but div 6 0 returns None
<tautologico> None is the constructor that indicates "no valid value"
<tautologico> in this case the return type of div is int option
<tab1293> So is it always either the type you have after Some or None?
<tautologico> yes
boogie has quit [Remote host closed the connection]
<tautologico> let div x y = match y with 0 -> None | _ -> Some (x/y);;
<tab1293> So will this line: "let accept_all derivation string = Some (derivation, string)" return either a tuple containing derivation and string or None?
<tautologico> in this case it will always return Some and a tuple
<tautologico> Some is a constructor, the type is option
<tab1293> What do you mean return Some and a tuple?
<tab1293> I thought it would return a tuple or None
rgrinberg1 has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
boogie has joined #ocaml
<tab1293> tautologico, ^
<tautologico> the function always returns Some tuple
<tautologico> look at my example of integer division: it may return None or Some number:
<tautologico> let div x y = match y with 0 -> None | _ -> Some (x/y);;
<tautologico> the function
<tautologico> let accept_all derivation string = Some (derivation, string)
<tautologico> always return Some tuple, there's no other possibility
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
philtor has quit [Read error: Operation timed out]
cesar_ has joined #ocaml
venk has quit [Remote host closed the connection]
cesar_ is now known as Guest48404
michel_mno_afk is now known as michel_mno
rgrinberg1 has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
yacks has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
divyanshu has joined #ocaml
csakatoku has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
mcclurmc has joined #ocaml
tab1293 has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 240 seconds]
racycl___ has quit [Quit: ZZZzzz…]
zpe has joined #ocaml
<tautologico> how do I refer to a module type inside a signature?
<tautologico> module type X = sig module type Y = sig val x : int end end
<tautologico> how can I refer to Y? X.Y does not work because X is not a module
csakatoku has joined #ocaml
mcclurmc has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
<ygrek> where do you want to refer to it from?
<ygrek> actually it is strange..
<ygrek> module type in module type
mcclurmc has quit [Ping timeout: 252 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tautologico> to implement X for example
csakatoku has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
michel_mno has left #ocaml []
rgrinberg has quit [Quit: Leaving.]
kig has joined #ocaml
kig has quit [Client Quit]
kig has joined #ocaml
nojb has joined #ocaml
zpe has joined #ocaml
axiles has joined #ocaml
Kakadu has joined #ocaml
justinfront has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140417185217]]
nojb has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
tab1293 has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
tab1293 has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
ygrek has quit [Ping timeout: 252 seconds]
tab1293 has joined #ocaml
alex_nx has quit [Ping timeout: 250 seconds]
amiller has quit [Remote host closed the connection]
amiller has joined #ocaml
alex_nx has joined #ocaml
clan has quit [Quit: clan]
Simn has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
kig has quit [Quit: kig]
dsheets has joined #ocaml
boogie has quit [Remote host closed the connection]
iorivur has joined #ocaml
Guest48404 has quit [Remote host closed the connection]
ygrek has joined #ocaml
Kakadu has joined #ocaml
iorivur_ has joined #ocaml
iorivur has quit [Ping timeout: 265 seconds]
Nuki has joined #ocaml
tab1293 has quit [Ping timeout: 255 seconds]
iorivur_ has quit [Ping timeout: 276 seconds]
kig has joined #ocaml
tab1293 has joined #ocaml
clan has joined #ocaml
mcclurmc has joined #ocaml
<Kakadu> .ощшт утпдшыр
<Kakadu> sorry
sgnb` has quit [Read error: Connection reset by peer]
csakatoku has quit [Remote host closed the connection]
sgnb has joined #ocaml
mcclurmc has quit [Ping timeout: 276 seconds]
csakatoku has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
tautologico has quit [Quit: Connection closed for inactivity]
dsheets has quit [Ping timeout: 245 seconds]
mrvn has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
divyanshu has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
iorivur has joined #ocaml
dsheets has joined #ocaml
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
Kakadu_ has joined #ocaml
nrlucaroni has quit [Ping timeout: 264 seconds]
Kakadu has quit [Ping timeout: 240 seconds]
Kakadu_ has quit [Ping timeout: 240 seconds]
kig has quit [Quit: kig]
tab1293 has quit [Ping timeout: 255 seconds]
ollehar has quit [Ping timeout: 264 seconds]
marr has joined #ocaml
acieroid` has joined #ocaml
acieroid has quit [Read error: Connection reset by peer]
def-lkb has quit [Ping timeout: 245 seconds]
deavid has joined #ocaml
def-lkb has joined #ocaml
yroeht2 has quit [Ping timeout: 240 seconds]
bnwr has quit [Ping timeout: 252 seconds]
deavidsedice has quit [Ping timeout: 240 seconds]
bnwr has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
vbmithr has quit [Ping timeout: 276 seconds]
brederlo has joined #ocaml
vbmithr has joined #ocaml
ikaros has joined #ocaml
clan has quit [Quit: clan]
acieroid` is now known as acieroid
yroeht2 has joined #ocaml
jonludlam has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
kig has joined #ocaml
csakatoku has quit [Ping timeout: 252 seconds]
csakatoku has joined #ocaml
ollehar has joined #ocaml
f[x] has joined #ocaml
csakatoku has quit [Ping timeout: 252 seconds]
ygrek_ has quit [Ping timeout: 252 seconds]
csakatoku has joined #ocaml
eizo has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
divyanshu has joined #ocaml
AltGr has joined #ocaml
Kakadu has joined #ocaml
marr has quit [Ping timeout: 240 seconds]
rand000 has joined #ocaml
alinab has quit [Quit: leaving]
nojb has joined #ocaml
adrien_oww has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 255 seconds]
maattdd has joined #ocaml
patronus has quit [Read error: Connection reset by peer]
csakatok_ has joined #ocaml
patronus has joined #ocaml
csakatoku has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
ggole has joined #ocaml
AltGr has left #ocaml []
thomasga has quit [Quit: Leaving.]
marr has joined #ocaml
Nuki has quit [Ping timeout: 276 seconds]
maattdd has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
skchrko has quit [Ping timeout: 240 seconds]
<brederlo> "The Earth rotates,[citation needed] which means its midsection is being flung outward by centrifugal force." :)
Nuki has joined #ocaml
<whitequark> I wonder if open_types branch is ever going to be merged
AltGr has joined #ocaml
thomasga has joined #ocaml
skchrko has joined #ocaml
thomasga1 has joined #ocaml
<brederlo> is it on github?
thomasga1 has quit [Client Quit]
thomasga has quit [Ping timeout: 265 seconds]
tianon has quit [Ping timeout: 245 seconds]
tianon has joined #ocaml
f[x] has quit [Ping timeout: 255 seconds]
<brederlo> whitequark: That wasn't my question. I'm wondering if some has submittetd it to the experimental github codereview process.
<whitequark> ah.
<brederlo> Also why isn't the snytax something like: type bar = foo | NewConstructor of type?
<whitequark> that would be a different feature
<brederlo> Then I don't get what the feature is.
<brederlo> is "open type foo" the same as [> ... ]?
<whitequark> no, [> ... ] doesn't allow you to pattern-match on variants not listed
<whitequark> whereas with open types, you can match on any variant in scope
f[x] has joined #ocaml
<brederlo> you would pattern match on [< ... ]
<brederlo> or [<> ]
maattdd has joined #ocaml
michael_lee has joined #ocaml
<whitequark> how?
<Drup> brederlo: the idea is really the same as exceptions
<Drup> or, more exactly, as the "exn" type
<whitequark> # let f (x:[< `B]) = match x with `A -> true;;
<whitequark> Error: This pattern matches values of type [< `A ] but a pattern was expected which matches values of type [< `B ] These two variant types have no intersection
claudiuc has quit [Remote host closed the connection]
<brederlo> whitequark: let f (x:[< `A | `B ]) = match x with `A -> true | `B -> false;;
<brederlo> type bar = [ `A ];;
<brederlo> f (`A : bar);;
<brederlo> You can't match something that isn't in the type.
yacks has quit [Ping timeout: 252 seconds]
<whitequark> hm.
<brederlo> open types seems to be a reduced form of polymorphic variants in that a constructor can only have one type.
<brederlo> And they can be GADTs.
<whitequark> it still differs from the open types proposal. with polymorphic variants, you have an implicit type variable
<whitequark> as in, you can't cast [< `A] to [< `A | `B]
<brederlo> you don't have to. a value of [< `A] can be used where [< `A | `B] is expected
michael_lee has quit [Quit: Ex-Chat]
<brederlo> type foo = .. type foo += A module M = struct type foo += B end Do I then have to use: let list = [ A; M.B; ]?
<brederlo> Is that then a foo list or M.foo list?
<whitequark> foo list
<brederlo> But I need M.B and not just B, right?
<ggole> Yep.
<brederlo> Ok, that differs from `
<ggole> Just like with exception constructors.
<brederlo> And any match of an open type must have a _ -> clause.
f[x] has quit [Ping timeout: 255 seconds]
<ggole> How could it be otherwise?
<brederlo> polymorphic variant types can be closed
<brederlo> Say I have 2 files. One has type foo += Foo of int and the other type foo += Foo of float. What then happens? An error at link time?
<ggole> And open types can't be closed. It's right there in the name. :)
<companion_cube> brederlo: guess the two Foo are different
<brederlo> ggole: polymorphic variants allow specifying [<], [>] or [ ]
<companion_cube> same as exceptions
<whitequark> brederlo: no, you would have M1.Foo and M2.Foo
<ggole> Those are different constructors with the same unqualified name: no problem
<brederlo> The comments on the patch mention runtime costs. Isn't it just using "M1.Foo" to generate a hash and uses that as tag for the constructor?
<ggole> No, it's like exception constructors
<ggole> Similarly named constructors are not equal.
<brederlo> ggole: iirc exceptions use the hash
<ggole> That's polymorphic variants afaik.
<ggole> Exceptions need a bit more machinery.
<brederlo> ahh, no: "the exception identifier is dynamically allocated by the OCaml program"
<ggole> That's to support first class modules, I think
<brederlo> if you define an exception in a first class module or functor you get a different one for each aplication.
<brederlo> SO even using the full path to the exception isn't good enough.
<ggole> Oh yeah, that would be problematic
kig has quit [Quit: kig]
thomasga has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
claudiuc has joined #ocaml
Enjolras has quit [Changing host]
Enjolras has joined #ocaml
claudiuc_ has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
Kakadu has quit [Ping timeout: 240 seconds]
claudiuc has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
csakatoku has joined #ocaml
Simn has quit [Ping timeout: 265 seconds]
Simn has joined #ocaml
iorivur has quit [Ping timeout: 252 seconds]
rand000 has quit [Ping timeout: 252 seconds]
Enjolras has left #ocaml []
ocp has joined #ocaml
studybot has quit [Remote host closed the connection]
Simn has quit [Ping timeout: 265 seconds]
Simn has joined #ocaml
rand000 has joined #ocaml
jo` has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
csakatoku has quit []
adrien_oww has joined #ocaml
Kakadu has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
cesar_ has joined #ocaml
cesar_ is now known as Guest77209
Guest77209 has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
studybot has joined #ocaml
studybot has quit [Remote host closed the connection]
studybot has joined #ocaml
Hannibal_Smith has joined #ocaml
rgrinberg has joined #ocaml
Thooms has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
divyanshu has joined #ocaml
tlockney is now known as tlockney_away
f[x] has joined #ocaml
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
jo` has left #ocaml []
Nuki has quit [Ping timeout: 252 seconds]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
tautologico has joined #ocaml
elfring has joined #ocaml
yacks has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nuki has joined #ocaml
lostcuaz has joined #ocaml
philtor has joined #ocaml
mcclurmc has joined #ocaml
kig has joined #ocaml
tlockney_away is now known as tlockney
kig has quit [Ping timeout: 264 seconds]
NoNNaN has quit [Remote host closed the connection]
elfring has quit [Quit: Konversation terminated!]
NoNNaN has joined #ocaml
kig has joined #ocaml
elfring has joined #ocaml
lostcuaz has quit [Ping timeout: 252 seconds]
tlockney is now known as tlockney_away
<elfring> A document mentions four configurations for Windows with different consequences on the generated executable files.
<elfring> How do you think about to clarify implementation details around the Cgywin interface?
lostcuaz has joined #ocaml
lostcuaz_ has joined #ocaml
<adrien> like?
Rota has joined #ocaml
<Rota> A question about int64 in Ocaml: why I get 0L==0L is false? Any specific equal comparator for int64?
<Kakadu> Rota: is 0L=0L true?
<Rota> yes.
<adrien> Rota: (==) is not the "typical" comparison function
AltGr has left #ocaml []
<Rota> ok
<adrien> you should have a look at the documentation for the exact meanng of (==)
lostcuaz has quit [Ping timeout: 276 seconds]
<Rota> yes
<Rota> I am reading it .
<elfring> adrien: How does the configuration variant "Cygwin-based native Win32 port" achieve executable files which do not require Cygwin to run them?
<adrien> it's cross-compilation
<Rota> Thanks. I got it.
reynir is now known as mocxy
mocxy is now known as reynir
<elfring> adrien: How do you select which configuration variant will be applied for Cygwin?
<adrien> if you run ./configure, it will target cygwin; if you copy the files under config/ as mentioned in README.win32, it will target native windows
tane has joined #ocaml
brederlo has quit [Quit: Lost terminal]
<elfring> adrien: How do you think about to make the Cygwin variant selection a bit more explicit by an option in the configuration script?
tnguyen_ has quit [Quit: Leaving]
divyanshu has quit [Ping timeout: 265 seconds]
<adrien> I'm not sure of its usefulness since it is currently the only possibility
kig has quit [Quit: kig]
divyanshu has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
mort___ has joined #ocaml
kig has joined #ocaml
nojb` has joined #ocaml
tlockney_away is now known as tlockney
Eyyub has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
<elfring> Is the software component "FlexDLL" only used for the configuration variants "MinGW" and "Cygwin-based native Win32 port" so far?
<adrien> I think so
<adrien> and it will stay that way
jwatzman|work has joined #ocaml
Nuki has quit [Remote host closed the connection]
<elfring> How do you think about to fiddle with the software component "FlexDLL" by cross-compilation from other Unix build environments?
angerman has joined #ocaml
<adrien> flexdll is needed too for cross-compilation from other environments
claudiuc_ has quit [Remote host closed the connection]
Nuki has joined #ocaml
rand000 has quit [Ping timeout: 240 seconds]
jonludlam has quit [Remote host closed the connection]
rand000 has joined #ocaml
racycle_ has joined #ocaml
Eyyub has quit [Ping timeout: 276 seconds]
lpw25 has joined #ocaml
Kakadu has quit [Quit: Page closed]
Eyyub has joined #ocaml
boogie has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
nojb`` has joined #ocaml
nojb` has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
Eyyub has quit [Ping timeout: 255 seconds]
mrvn has quit [Client Quit]
mrvn_ has joined #ocaml
mrvn_ is now known as mrvn
eizo has quit [Quit: Page closed]
malo has joined #ocaml
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
Eyyub has joined #ocaml
f[x] has quit [Ping timeout: 276 seconds]
kig has quit [Quit: kig]
thomasga has quit [Read error: Operation timed out]
ikaros has quit [Quit: Ex-Chat]
Kakadu has joined #ocaml
berke_durak has joined #ocaml
<berke_durak> hi there... anyone noticed that codeload.github.com is down?
<mrvn> 19:45 < paultag> is this 503ing for anyone else
<mrvn> not just codeload
<berke_durak> yeah 503 for me too
<berke_durak> sucks my opam build is stuck. and no oasis package for fedora!
marr has quit [Read error: Operation timed out]
<adrien> considering how much downtime costs to github, I'd expect it to get back soon
<berke_durak> maybe opam should be modified so that it can have more than one url to try
<mrvn> don't you have a local clone?
<adrien> and clearly this is because of all the gentoo users rebuilding their world following the recent release of GCC 4.9
<berke_durak> mrvn: a local clone of what?
<mrvn> whatever git repository you are trying to install
f[x] has joined #ocaml
<berke_durak> mrvn: yes I do; opam got stuck on lwt so I cloned a copy and made a tar and changed the url to a file:/// under opam and fixed the md5 but that didn't work,
tautologico has quit [Quit: Connection closed for inactivity]
<berke_durak> it would be to long to do that for every dependency of oasis... I'd rather go grab a coffee and wait for codeload to get back up
maattdd has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
<berke_durak> does anyone have an up-to-date tuareg patched for lwt?
nojb`` has quit [Ping timeout: 240 seconds]
claudiuc has joined #ocaml
thomasga has quit [Quit: Leaving.]
maattdd has joined #ocaml
Eyyub has quit [Ping timeout: 252 seconds]
maattdd has quit [Ping timeout: 252 seconds]
Eyyub has joined #ocaml
_alephlambda has joined #ocaml
<_alephlambda> Hi, I'm a student working with OCaml. I'm using Map.Make and am getting a Not_found exception. I use the Map.find function a lot in my code. Is there a way to figure out which line raised the error?
<_alephlambda> Short of going back and manually surrounding each .find, that is.
<_alephlambda> is #trace what i'm looking for?
<Drup> sed is what you are looking for ;)
<Drup> (no, not really, it's a bit annoying, I agree with you)
<_alephlambda> sed...as in the GNU tool?
<Drup> just rewrite a new find function that catch the exception and report a more sensible error message
<_alephlambda> Drup: Well, will that give the line number?
<ggole> You can compile with -g, that'll give you line numbers
<whitequark> um, how about OCAMLRUNPARAM=b ?
<ggole> (It won't for the internals of Map, but your wrapper should work.)
<whitequark> and -g, yes
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<ggole> Unfortunately it doesn't work in the toplevel.
<Drup> _alephlambda: well, s/Map.find/my_personnal_find/
<_alephlambda> Drup: Ah, I guess that would work..
<_alephlambda> ggole, whitequark: I'm already compiling with -g. I've been trying to use ocamldebug, but I'm not very good at using that tool.
<Drup> you need -g *and* OCAMLRUNPARAM=b to have backtraces, iirc
<ggole> In that case, run your program something like OCAMLRUNPARAM="b1" ./prog args
<ggole> And you should get a (somewhat crude) backtrace with line numbers
maattdd has joined #ocaml
<_alephlambda> ggole: Hm...I must be doing something wrong
rand000 has quit [Ping timeout: 255 seconds]
<_alephlambda> let me try the wrapper
dsheets has joined #ocaml
maattdd has quit [Client Quit]
<adrien> wrapper?
<adrien> if you refer to
<adrien> VAR=val prog args
<adrien> then it's a syntax which sets the environment variable "VAR" to the value "val" inside the program "prog" (and only inside that program instance)
rand000 has joined #ocaml
<_alephlambda> Drup: the wrapper worked.
<_alephlambda> thanks guys!
<_alephlambda> i ended up doing :%s/XX/\=line(".
<_alephlambda> ")
<Drup> generally speaking, you should create a function "find_opt" that will return an option type
<Drup> (instead of throwing an exception)
<Drup> it would force you to handle the case where what you are looking for is not present, which is a good thing :p
<_alephlambda> Drup: Map.Make(String).find doesn't return an option
<_alephlambda> it just fails
<adrien> that or remember to use try...with
<Drup> _alephlambda: exactly what I'm saying, write a new function that returns an option, and use it instead of the regular version :)
<_alephlambda> Drup: Ah, okay. That seems like good practice though; can't go building good habits...then where will I be :P
<_alephlambda> Drup: I can do that though
_alephlambda has left #ocaml []
Eyyub has quit [Ping timeout: 276 seconds]
<mrvn> Drup: or have an exn and opt submodule
angerman has quit [Quit: Gone]
<Drup> if you are going to define you own modules on top of Map.make, just use Batteries/Core/Extlib
<mrvn> .oO(Not today)
<Drup> tss, NIH. :)
<adrien> it's spelled "companion_cube_ism"
<Drup> :D
dsheets has quit [Ping timeout: 245 seconds]
marr has joined #ocaml
ollehar has joined #ocaml
zpe has quit [Remote host closed the connection]
clan has joined #ocaml
<companion_cube> hey
reynir is now known as Membeer
* companion_cube feels like being the victim of calomny
tane has quit [Quit: Verlassend]
<adrien> :P
tane has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
mcclurmc has joined #ocaml
Eyyub has joined #ocaml
angerman has joined #ocaml
ThatTreeOverTher has joined #ocaml
angerman has quit [Client Quit]
Anarchos has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
tautologico has joined #ocaml
f[x] has quit [Ping timeout: 264 seconds]
elfring has quit [Quit: Konversation terminated!]
ocp has quit [Ping timeout: 245 seconds]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
ollehar has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
Simn has quit [Quit: Leaving]
freling has quit [Ping timeout: 246 seconds]
freling has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
oriba has joined #ocaml
thomasga has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
clan has quit [Quit: clan]
axiles has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
tane has quit [Quit: Verlassend]
nojb`` has joined #ocaml
zpe has quit [Remote host closed the connection]
ikaros has joined #ocaml
clan has joined #ocaml
racycle_ has quit [Read error: Connection reset by peer]
racycle__ has joined #ocaml
oriba has quit [Quit: Verlassend]
oriba has joined #ocaml
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lostcuaz has joined #ocaml
waneck has joined #ocaml
ggole has quit []
lostcuaz has quit [Client Quit]
Thooms has joined #ocaml
Eyyub has quit [Ping timeout: 240 seconds]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zpe has joined #ocaml
<ThatTreeOverTher> #llvm
Rota has quit [Ping timeout: 265 seconds]
<Drup> what's happening there ? :)
thomasga has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
Eyyub has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
<philtor> I'm using 4.02.0dev+trunk and I notice that I get an error when I start the REPL:
<philtor> File "/home/phil/.ocamlinit", line 8, characters 0-1: Syntax Error
<philtor> Line 8 is:
<philtor> #camlp4o
<philtor> So now that camlp4 is in a separate lib does this have to be specified differently?
rand000 has quit [Quit: leaving]
<Drup> camlp4 has not yet been adapted to trunk
<Drup> so, for now, it's just broken, don't use it on trunk
clan has quit [Quit: clan]
lpw25 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
clan has joined #ocaml
freling has quit [Ping timeout: 246 seconds]
freling has joined #ocaml
nojb`` has quit [Ping timeout: 240 seconds]
Thooms has quit [Quit: WeeChat 0.3.8]
<ThatTreeOverTher> hey guys, can anyone tell me why running `ocamlbuild toy.byte` on this repo (https://github.com/danluu/ocaml-llvm-tutorial) causes the error "File "codegen.ml", line 5, characters 0-9: Error: Unbound module Llvm"?
<Drup> you have llvm's ocaml binding installed, I presume ?
<ThatTreeOverTher> Drup, installed with `opam install llvm`, correct?
<Drup> yes
<ThatTreeOverTher> ok, yeah
<ThatTreeOverTher> I did that
<Drup> huum, try something like "ocamlbuild -use-ocamlfind -package llvm toy.native"
madroach has quit [Ping timeout: 252 seconds]
<ThatTreeOverTher> Drup, I got this http://pastebin.ca/raw/2701100
madroach has joined #ocaml
<Drup> oh, you have an installation issue
<Drup> did you run "eval `opam config env`" ?
<ThatTreeOverTher> I tried it now
<ThatTreeOverTher> and then tried the compile command and it didn't do anything
<ThatTreeOverTher> er, it had the same error as I first had
<Drup> the "Unbound module Llvm" ?
NoNNaN has quit [Remote host closed the connection]
<ThatTreeOverTher> yes
NoNNaN has joined #ocaml
testcocoon has quit [Ping timeout: 240 seconds]
<Drup> are you sure ? with -package llvm ?
<Drup> I have a different error :D
<Drup> I think it's outdated
<Drup> ping whitequark, does TargetData still exists ?
<ThatTreeOverTher> I have that error too
<ThatTreeOverTher> didn't know I needed -package llvm
<Drup> this is oudated anyway
<Drup> you're not going to be able to build it
<ThatTreeOverTher> sooo what do I do
<ThatTreeOverTher> LLVM is kinda low on documentation sometimes
ollehar has quit [Ping timeout: 252 seconds]
<Drup> you try to bother whitequark
<Drup> :D
clan has quit [Quit: clan]
<Drup> (he's the official maintainer, he can be officially bothered for documentation)
testcocoon has joined #ocaml
rgrinberg has joined #ocaml
<ThatTreeOverTher> I officially bother you, whitequark, for the purpose of understanding the OCaml bindings to LLVM
clan has joined #ocaml