<DidierMedichon>
I'm confused by the Parsing module and how it interacts with the generated parsers (menhir), I'm trying to reproduce how ocaml stores input file information in the parsetree, here's what I have so far
<DidierMedichon>
woops, i pasted parser.mly as lexer.mll, it's a dumb integer/"+" lexer though
snowcrshd has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
nomicflux has joined #ocaml
orbifx1 has quit [Ping timeout: 258 seconds]
orbifx has quit [Ping timeout: 264 seconds]
sbstp has joined #ocaml
infinity0 has joined #ocaml
infinity0 is now known as Guest69091
infinity0 has joined #ocaml
Guest69091 has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
mengu_ has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
jlongster has joined #ocaml
tristero has quit [Quit: WeeChat 1.6]
govg has quit [Ping timeout: 260 seconds]
mengu_ has quit [Quit: Leaving...]
yomimono has joined #ocaml
rgrinberg has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 276 seconds]
govg has joined #ocaml
<DidierMedichon>
after further investigation it appears $startpos and $endpos are the menhir keywords... still doesn't seem to update the Lexing.position
mfp has quit [Ping timeout: 240 seconds]
larhat has joined #ocaml
_whitelogger has joined #ocaml
wtetzner has quit [Remote host closed the connection]
rgrinberg has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
nomicflux has quit [Quit: nomicflux]
larhat has quit [Quit: Leaving.]
nomicflux has joined #ocaml
oschwald has quit [Quit: Leaving.]
nomicflux has quit [Client Quit]
yomimono has joined #ocaml
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
f[x] has quit [Ping timeout: 260 seconds]
vtomole has joined #ocaml
larhat has quit [Quit: Leaving.]
MercurialAlchemi has joined #ocaml
lucasem has joined #ocaml
lucasem has quit []
lucasem has joined #ocaml
philtor has quit [Ping timeout: 255 seconds]
lucasem has left #ocaml [#ocaml]
fre has joined #ocaml
vtomole has quit [Ping timeout: 260 seconds]
fre2 has joined #ocaml
fre has quit [Ping timeout: 276 seconds]
jlongster has joined #ocaml
jlongster has quit [Ping timeout: 240 seconds]
fre2 has quit [Ping timeout: 252 seconds]
Mercuria1Alchemi has joined #ocaml
chetshah has joined #ocaml
<chetshah>
Hello all, I'm an Ocaml beginner.
<chetshah>
Was wondering functions being first class values in Ocaml, one can't pattern match on them ?
<chetshah>
e.g. match (fun i -> i * i) with (fun i -> i * i) -> true;;
<flux>
chetshah, correct, you cannot pattern match them
<flux>
chetshah, you could do smoething similar to simple expressions though if you wanted
<flux>
ie. type op = Mul of (int * int) let ( * ) a b = Mul (a, b) match (i * i) with Mul (a, b) -> ..
<chetshah>
flux, so what it seems is that patterns cannot have function values? only combination of constants,costructors and variables.
<flux>
that is correct
<flux>
functions are not stored as syntax trees but as program code
freusque has quit [Ping timeout: 276 seconds]
chetshah has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
chetshah has joined #ocaml
chetshah has quit [Quit: Page closed]
\h has quit [Read error: Connection reset by peer]
\h has joined #ocaml
Simn has joined #ocaml
orbifx-m has joined #ocaml
alfredo has joined #ocaml
freusque has joined #ocaml
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 240 seconds]
jimt_ is now known as jimt
pyx has joined #ocaml
pyx has quit [Client Quit]
ocalm has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
ia0 has quit [Quit: reboot]
ia0 has joined #ocaml
larhat has joined #ocaml
obadz has quit [Ping timeout: 252 seconds]
sz0 has joined #ocaml
obadz has joined #ocaml
freusque has quit [Ping timeout: 264 seconds]
snhmib has quit [Ping timeout: 258 seconds]
freusque has joined #ocaml
orbifx-m has quit [Ping timeout: 256 seconds]
f[x] has joined #ocaml
obadz has quit [Ping timeout: 258 seconds]
obadz has joined #ocaml
zpe has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 255 seconds]
snowcrshd has joined #ocaml
govg has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
frefity has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
snhmib has joined #ocaml
FreeBirdLjj has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
orbifx-m has joined #ocaml
f[x] has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
ocalm has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<ocalm>
"module zone missing" when corebuild. How to include it?
<ocalm>
utop is OK when #use the file.
silver has joined #ocaml
mfp has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
sepp2k has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
vramana1 has joined #ocaml
larhat has quit [Quit: Leaving.]
vramana has quit [Ping timeout: 248 seconds]
ocalm has quit [Ping timeout: 240 seconds]
vramana has joined #ocaml
vramana1 has quit [Ping timeout: 248 seconds]
jlongster has joined #ocaml
ziyourenxiang has joined #ocaml
ocalm has joined #ocaml
jlongster has quit [Ping timeout: 255 seconds]
frefity has quit [Ping timeout: 264 seconds]
jao has joined #ocaml
MasseR has quit [Ping timeout: 240 seconds]
frefity has joined #ocaml
dhil has joined #ocaml
binobi_ has joined #ocaml
binobi_ is now known as binobi
SpaceSheep has joined #ocaml
Leo` has joined #ocaml
<ocalm>
Solved it. I had to open Core.Std.Time
jao has quit [Ping timeout: 240 seconds]
larhat has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
frefity has quit [Ping timeout: 264 seconds]
frefity has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
nomicflux has joined #ocaml
ziyourenxiang has joined #ocaml
rpcope has quit [Ping timeout: 256 seconds]
Bluddy[m] has quit [Ping timeout: 255 seconds]
rpcope has joined #ocaml
aspiwack[m] has quit [Ping timeout: 255 seconds]
Bluddy[m] has joined #ocaml
snowcrshd has quit [Ping timeout: 240 seconds]
SpaceSheep has quit [Quit: WeeChat 1.6]
aspiwack[m] has joined #ocaml
zpe has quit [Remote host closed the connection]
hnrgrgr has quit [Ping timeout: 256 seconds]
hnrgrgr has joined #ocaml
nomicflux has quit [Quit: nomicflux]
octachron has joined #ocaml
ocaml817 has joined #ocaml
Flerex has joined #ocaml
agarwal1975 has joined #ocaml
Flerex has quit [Client Quit]
vramana1 has joined #ocaml
sepp2k has quit [Ping timeout: 248 seconds]
vramana has quit [Ping timeout: 256 seconds]
vramana1 is now known as vramana
sepp2k has joined #ocaml
zpe has joined #ocaml
oschwald has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
ocaml817 has quit [Ping timeout: 260 seconds]
snowcrshd has joined #ocaml
freusque has quit [Quit: WeeChat 1.6]
freusque has joined #ocaml
yomimono has joined #ocaml
silver_ has joined #ocaml
snowcrshd has quit [Ping timeout: 240 seconds]
silver has quit [Ping timeout: 264 seconds]
snowcrshd has joined #ocaml
snowcrshd has quit [Ping timeout: 260 seconds]
<frefity>
If i switch to 4.04.0+flambda do my programs automatically use flambda optimisation or do I need to pass compiler flags?
ocaml172 has joined #ocaml
sh0t has joined #ocaml
<ocaml172>
I have 4 functions to fill up 4 values in a list. Is there a OCaml functional to approach this ?
<ocaml172>
The results of the functions will be in filled up in the list.
<ocaml172>
Put the function refs in the list and evaluate.I get the results. Is that possible ?
silver_ is now known as silver
freusque has quit [Quit: WeeChat 1.6]
yomimono has quit [Ping timeout: 264 seconds]
freusque has joined #ocaml
zpe has quit [Remote host closed the connection]
<chelfi>
ocaml172: do you mean something like: let results = [fun1 arg1; fun2 arg2; fun3 arg3; fun4 arg4] ? Or do you need to programatically match the functions with their arguments ?
yomimono has joined #ocaml
<ocaml172>
Don't want to match. Any order is fine.
<ocaml172>
Just looking for the functional approach. I can do this imperatively.
<chelfi>
if by functional, you mean constructing the list in one go rather than initialising a list and mutating to populate it, then I guess in this simple example what I wrote earlier should be ok
<chelfi>
if I did not misunderstand, this example is a bit simple though to demonstrate a difference between functional and imperative programming
<ocaml172>
Oh! That's all.
<ocaml172>
Didn't know it evaluates automatically.
jlongster has joined #ocaml
jao has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 276 seconds]
snowcrshd has joined #ocaml
gjaldon has joined #ocaml
MasseR has joined #ocaml
snowcrshd has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #ocaml
<reynir>
frefity: My impression is you have to pass flags, but I haven't looked into it much
<Onemorenickname>
I get "out of memory" using "mem", and it does not matter if the structure is already added or no
<Onemorenickname>
I found I have to use the functorial Hashtbl and physical equality
<Onemorenickname>
(I really don't like polymorphic equality)
orbifx1 has joined #ocaml
<justin_smith>
shouldn't it be able to prove two items are not equal without using physical equality? I guess a depth first could be pathological - if two items have the same recursive structure but other data is different...
<Onemorenickname>
justin_smith, i'm guessing performance issues or stuff like this
<justin_smith>
one approach is to first check physical equality (since it's cheap), and if that is false, then check structural equality
<justin_smith>
that doesn't help with structurally identical recursive values though
<Onemorenickname>
yep
<Onemorenickname>
hence performacne issues and stuff like this
fre2 has quit [Ping timeout: 240 seconds]
nahra has quit [Read error: Connection reset by peer]