<_habnabit>
maybe it's only necessary in other parsers, but it seems odd to me that you have the shortest match first in a lot of places
<_habnabit>
e.g. ID before ID COMMA ids
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
lggr has joined #ocaml
<Ptival>
ok menhir helped, I have a proper error message now
<Ptival>
thanks for the comments though :)
<_habnabit>
well, what was it?
avsm has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 244 seconds]
ankit9 has joined #ocaml
lggr has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
Cyanure has quit [Remote host closed the connection]
lggr has joined #ocaml
djcoin has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
lggr has joined #ocaml
cago has joined #ocaml
eilyx has quit [Remote host closed the connection]
theplanet has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
theplanet is now known as elixey
avsm has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
elixey has quit [Remote host closed the connection]
elixey has joined #ocaml
lggr has joined #ocaml
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
avsm has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
GnomeStoleMyBike has joined #ocaml
lggr has joined #ocaml
mcclurmc_away is now known as mcclurmc
avsm has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
sepp2k has joined #ocaml
yezariaely has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
<yezariaely>
Can I achieve the following somehow: data t1 = EInt of int | EFloat of float;; data t2 = EString of string;; data exp = t1 | t2;; without the necessity to label t1 and t2 in exp again? I just want it to be the union
<yezariaely>
any ideas?
Yoric has joined #ocaml
<yezariaely>
I tried with poly. variants but did not succeed
lggr has quit [Ping timeout: 256 seconds]
<adrien>
what have you tried?
<yezariaely>
type union = [`ET1 of t1 | `ET2 of t2];; But when I define let x : union = EInt(1) this does not work
<madroach>
hi, can I rely on the order of evaluation in the :: operator? I.e. prerr_endline "2" :: [prerr_endline "1"] will output first 1, then 2.
lggr has quit [Ping timeout: 248 seconds]
<fx_>
do you expect every reader of your code to figure that out too?
lggr has joined #ocaml
Yoric has joined #ocaml
<madroach>
fx_: yes, I do. like in let rec read_linewise () = if empty () then [] else read_line () :: read_linewise () its quiet obvious what I want to do, isn't it?
<madroach>
fx_: hmm, now that I look at it, you're right, it isn,t.
<madroach>
still, just out of curiosity. Is this order of evaluation fixed or bound to change sometimes?
<flux>
I personally wouldn't write code that depends on the evaluation order of expressions, other than for well-defined operators (such as ;)
avsm has joined #ocaml
<flux>
although practically I doubt it is going to ever change. because it would probably break code :P
<pippijn>
and on most systems, right to left is faster
lggr has quit [Ping timeout: 256 seconds]
<flux>
I could see that in some scenarios it could be faster to do it the other way round. for example, if your registers already contain the stuff you need to evaluate the left-hand expression.
<fx_>
I am almost sure it is not fixed anywhere in the docs
<pippijn>
yes
<pippijn>
flux: I was thinking of function calls
chambart has quit [Ping timeout: 260 seconds]
<flux>
pippijn, and how about inlined function calls..
<pippijn>
actually, scratch the "most systems" and replace it with x86
<flux>
and still, you pass arguments as registers to function calls, if they are in their place it might be faster.
lggr has joined #ocaml
<madroach>
ok, thanks for the info :) I'll make the code unambiguous.
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
avsm has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 240 seconds]
Neros_ has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
ontologi1e has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
Kakadu has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
larhat has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
avsm has joined #ocaml
fraggle_ has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
avsm has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 255 seconds]
chturne has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
|jbrown| has joined #ocaml
<|jbrown|>
hi, any opam users/devs here?
lggr has quit [Ping timeout: 256 seconds]
<|jbrown|>
I'm getting 'Error: in project "opam-lib", the source filename / "src/opamGlobals.ml" does not exist' with the current git head.
<Kakadu>
|jbrown|: They appear sometimes
<|jbrown|>
someone forgot to git add? :-)
lggr has joined #ocaml
<|jbrown|>
a fresh checkout works though, yay. Hrmm.
<|jbrown|>
looks like it's just git being weird. Oh well.
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
avsm has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
<flux>
I think I would blame the build system in that situation..
<yezariaely>
adrien: well my code is now half of the size and less annoying. I hope that the disadvantages of polymorphic variants will not destroy the benefit. =)
lggr has joined #ocaml
larhat has joined #ocaml
<yezariaely>
I am still looking for something similar to the "show" in haskell. is there something like that which automatically infers a my_data_type_to_string function?
<flux>
well, there is Batteries/ExtLib Std::dump, but it isn't very good. perhaps for debugging.
<flux>
and then there are a few camlp4-based function generators
<flux>
and then there are a few compiler patches..
<flux>
there is nothing as effortless as the toplevel for converting values into strings
milosn_ has joined #ocaml
Neros_ has quit [Ping timeout: 246 seconds]
<flux>
I wonder if gadts would be any helpful for this problem
<flux>
probably not, if the data isn't constructed with gadts in mind
<flux>
(but then you could use more traditional approaches, such as bundling a show-function along your data)
milosn has quit [Ping timeout: 244 seconds]
avsm has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
<yezariaely>
flux: ah there are compiler patches for that? I will have a look than
lggr has quit [Ping timeout: 276 seconds]
<flux>
not sure if for _that_ but for some more general concepts that can be used for that
<flux>
you must seriously need them if you're looking to patch your compiler for them :). but of course, it's great that people try them out and find what's good and what's bad in them.
<flux>
IIRC it was described as being relatively low-impact change, though
lggr has joined #ocaml
<yezariaely>
flux: I am writing a 3 transformers from languages to languages and I am annoyed that I have to implement a pretty-printer for the AST all the time...
<yezariaely>
-a
<flux>
yezariaely, I would probably go with the generator-based ones
<flux>
but ymmv :)
<yezariaely>
so you meant the camlp4 based?
<yezariaely>
when you are talking about "generators"?
<flux>
yes
<yezariaely>
thx for the discussion. this channel is alwys very inspiring.
<flux>
but talking of geenrators, what is the current best library for those? I haven't been really tracking..
<flux>
not relly asking you but someone lurking around :)
<adrien>
and the old habit of asking chanserv to do it :P
lggr has joined #ocaml
<pippijn>
adrien: you can use libffi to allocate closures on the heap
<adrien>
pippijn: I know :-)
<adrien>
pippijn: I went that way at some point for bindings
<adrien>
I'm not doing it again if I can avoid it ;p
<adrien>
it's also not perfect
<pippijn>
I used it for a C language extension for curried functions
<pippijn>
and anonymous functions that capture their lexical environment
<pippijn>
which are basically the same
avsm has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
<Kakadu>
Let concept A can contain concepts ot type B. Also there is concept C which can be contained by both A and B. Concept C has property `prop` which meaning depends if C is stored in A or B. It seems to create good type system I should remove `prop` from C and contain set of prop*C in A and B?
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
avsm has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
<Kakadu>
btw, What do u think: is it possible to explain emacs how to fold top-level value definitions?
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
avsm has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
smondet has joined #ocaml
lggr has joined #ocaml
thomasga has quit [Quit: Leaving.]
avsm has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
cdidd has quit [Ping timeout: 252 seconds]
pngl has joined #ocaml
cdidd has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
avsm has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
sepp2k has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
iago has joined #ocaml
lggr has joined #ocaml
jamii has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
zzz_ has joined #ocaml
lggr has joined #ocaml
ontologiae has joined #ocaml
ontologi1e has quit [Read error: Connection reset by peer]
fraggle_laptop has quit [Ping timeout: 256 seconds]
samposm_ has joined #ocaml
hcarty_ has joined #ocaml
bacam_ has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
julm` has joined #ocaml
zzz_` has quit [*.net *.split]
julm has quit [*.net *.split]
hcarty has quit [*.net *.split]
bacam has quit [*.net *.split]
samposm has quit [*.net *.split]
lggr has quit [Ping timeout: 246 seconds]
ankit9 has quit [Read error: Connection reset by peer]
lggr has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
tufisi has quit [Ping timeout: 276 seconds]
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
ontologi1e has quit [Ping timeout: 248 seconds]
tufisi has joined #ocaml
lggr has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
fraggle_laptop has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ankit9 has joined #ocaml
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
Kakadu has quit [Quit: Konversation terminated!]
rixed has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
chturne has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
rixed has joined #ocaml
avsm has joined #ocaml
tufisi has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
tufisi has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
thomasga has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
bacam_ is now known as bacam
djcoin has quit [Quit: WeeChat 0.3.7]
lggr has quit [Ping timeout: 255 seconds]
cago has quit [Quit: Leaving.]
Kakadu has joined #ocaml
lggr has joined #ocaml
tac has joined #ocaml
thelema has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
lggr has joined #ocaml
julm` is now known as julm
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
avsm has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
avsm1 has joined #ocaml
thelema has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
fraggle_laptop has quit [Remote host closed the connection]
fraggle_laptop has joined #ocaml
chturne has quit [Ping timeout: 276 seconds]
chambart has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
chturne has joined #ocaml
tac is now known as tac[meeting]tics
tac[meeting]tics has quit [Quit: Page closed]
lggr has quit [Ping timeout: 260 seconds]
chturne has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
mcclurmc is now known as mcclurmc_away
tac-tics has joined #ocaml
lggr has joined #ocaml
tac-tics has quit [Client Quit]
Neros has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
ankit9 has quit [Quit: Leaving]
mnabil has quit [Read error: Operation timed out]
Jeaye has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
gl has left #ocaml []
rwmjones has joined #ocaml
lggr has joined #ocaml
GnomeStoleMyBike has joined #ocaml
answer_42 has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 276 seconds]
pangoafk is now known as pango
lggr has joined #ocaml
smondet has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 252 seconds]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
ontologi1e has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
ontologiae has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
iago has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
EzeQL has joined #ocaml
EzeQL has left #ocaml []
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
tac has joined #ocaml
ontologiae has joined #ocaml
lggr has joined #ocaml
ontologi1e has quit [Ping timeout: 276 seconds]
emmanuelux has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
iago has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
danishman has joined #ocaml
avsm1 has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
Snark has quit [Quit: Quitte]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
Submarine has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
<wmeyer>
Kakadu: of course. Outline mode is the simpliest case, narrowing is another, and there are other options: http://emacswiki.org
lggr has quit [Ping timeout: 260 seconds]
<wmeyer>
pippijn: great stuff. I'm going to commit the lousy ast (C0) thing today.
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
danishman has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
ontologiae has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
avsm has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
Simn has quit []
Yoric has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
jamii has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
chturne has joined #ocaml
Submarine has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
lggr has joined #ocaml
sepp2k1 has quit [Remote host closed the connection]
cdidd has quit [Remote host closed the connection]
Zerker has joined #ocaml
<Zerker>
Anyone know how to say "clojure.core/reductions" in OCaml? The best I could come up with was writing it from scratch :/
lggr has quit [Ping timeout: 255 seconds]
avsm has quit [Quit: Leaving.]
<wmeyer>
Zerker: what is it?
avsm has joined #ocaml
<thelema>
Zerker: is it something similar to Enum.reduce in batteries or *.fold(_left/right)?
_andre has quit [Quit: leaving]
<Zerker>
Basically foldl/reduce, except it keeps intermediate values.
<thelema>
Zerker: yes, it looks exactly like *.Fold
<thelema>
val scanl : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t
<thelema>
A variant of fold producing an enumeration of its intermediate values. If e contains x0, x1, ..., scanl f init e is the enumeration containing init, f init x0, f (f init x0) x1... Lazy.
<thelema>
Zerker: out of curiosity, what are you using it for? I've only needed scanl once, and that was for recording the state trace of a DFA traversal
<Zerker>
Yup, exactly what I'm looks for, thanks. Using it to generate a bunch of values for a harmonic oscillator simulation function.
<Zerker>
looking*
jamii has joined #ocaml
Cyanure has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
fxrstor has joined #ocaml
lggr has joined #ocaml
mnabil has joined #ocaml
fxrstor has left #ocaml []
lggr has quit [Ping timeout: 240 seconds]
iago has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
<wmeyer>
Zerker: in fact I just asked some very devoted Camlp4 developer if the Necula iterators would be possible.
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<Zerker>
Sounds like a last name which I should be familiar with, but am not *has failed in googling*