infinity0 has quit [Remote host closed the connection]
ahf has quit [Ping timeout: 268 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 276 seconds]
sgronblo has joined #ocaml
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
ahf has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 246 seconds]
copy_ has quit [Quit: Connection closed for inactivity]
jlam_ is now known as jlam
spew has joined #ocaml
rdutra has quit [Ping timeout: 276 seconds]
mrkgnao has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 260 seconds]
agravier has joined #ocaml
snowcrshd has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
rdutra has joined #ocaml
rdutra has quit [Client Quit]
FreeBirdLjj has joined #ocaml
moei has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
spew has quit [Ping timeout: 276 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 255 seconds]
fraggle_ has quit [Ping timeout: 255 seconds]
fraggle_ has joined #ocaml
mfp__ has quit [Ping timeout: 268 seconds]
ryanartecona has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
agravier has quit [Quit: agravier]
_whitelogger has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
jao has joined #ocaml
samrat has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
agravier has joined #ocaml
kevinqiu has joined #ocaml
sgronblo has joined #ocaml
kevinqiu has quit [Ping timeout: 240 seconds]
raphaelss has joined #ocaml
agravier has quit [Quit: agravier]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 260 seconds]
agravier has joined #ocaml
MercurialAlchemi has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
olibjerd has joined #ocaml
sgronblo has quit [Read error: Connection reset by peer]
sgronblo has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
ryanartecona has quit [Quit: ryanartecona]
mrvn has quit [Ping timeout: 268 seconds]
mrvn has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 246 seconds]
enterprisey has joined #ocaml
MercurialAlchemi has joined #ocaml
maarhart has joined #ocaml
maarhart has quit [Client Quit]
vicfred has joined #ocaml
_whitelogger has joined #ocaml
manizzle has quit [Ping timeout: 255 seconds]
enterprisey has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
ryanartecona has quit [Ping timeout: 240 seconds]
kevinqiu has joined #ocaml
alfredo has joined #ocaml
Simn has joined #ocaml
kevinqiu has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
mrkgnao has quit [Ping timeout: 260 seconds]
sepp2k has joined #ocaml
agravier has quit [Quit: agravier]
ygrek_ has joined #ocaml
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfredo has joined #ocaml
foocraft has joined #ocaml
andreas_ has joined #ocaml
kevinqiu has joined #ocaml
kevinqiu has quit [Ping timeout: 258 seconds]
Aaylor has quit [Quit: WeeChat 1.0.1]
agravier has joined #ocaml
ryanartecona has joined #ocaml
frefity has joined #ocaml
ewanas has joined #ocaml
Aaylor has joined #ocaml
foocraft has quit [Ping timeout: 246 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
agravier has quit [Quit: agravier]
nullifidian has quit [Ping timeout: 268 seconds]
<kyod>
I'm looking for a way (ppx extension ?) to turn a string containing a valid ocaml expression like {quote| let x = 42 in x + x |quote} into actual ocaml code
<kyod>
Does that ring a bell to anybody ?
<companion_cube>
no, and it doesn't sound easy
<kyod>
it seems to be a fairly standard transformation that one would like to do with metaprogramming...
<kyod>
well I can always just use sed before compiling... but it's not exactly integrated with the rest of the ocaml toolchain
zpe has joined #ocaml
<Armael>
could you call the parser from a ppx...?
<Armael>
it doesn't sound easy indeed
<kyod>
Armael: Actually I was hoping that someone would have written wrappers to do that for me
<Armael>
:)
<reynir>
Is the string known at compile time?
<kyod>
reynir: yes
<reynir>
Why does it have to be a string?
kevinqiu has joined #ocaml
<kyod>
because I'm generating an ocaml AST with some subfragment which are strings containing ocaml code and I don't know any better way to inject the string subfragment in the AST
<companion_cube>
ffs, build systems
kevinqiu has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
AltGr has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
nicoo has joined #ocaml
nullifidian has joined #ocaml
mfp__ has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
<Drup>
kyod: you should really look at metaocaml if you are generating the AST dynamically
<kyod>
well I'm generating ocaml code from another compiler
<Drup>
you're generating an ocaml program that contains another ocaml program ? ^^'
<kyod>
...well It's much more tortured and hackish than that but yes
<Drup>
go on :]
<kyod>
The compiler is in ocaml and we want to extract to ocaml and dynlink some code at compile time while giving access to the internal ocaml representation of some terms...
olibjerd has joined #ocaml
<Drup>
yeah, that's precisely the purpose of metaocaml
<kyod>
Drup: Indeed but I don't have the same source language as metaocaml...
clog has quit [Ping timeout: 240 seconds]
<kyod>
otherwise it is exactly an implementation of a quote/antiquote mechanism
<Drup>
your compiler is written in OCaml and you generate an OCaml program. what the program is generated from doesn't matter
ryanartecona has quit [Ping timeout: 260 seconds]
jlouis has joined #ocaml
<kyod>
Drup: That seems reasonable. Do you know if there is a way in metaocaml to turn a Parsetree.expression into a 'a code ? it seems that the underlying type of 'a code is the Parsetree.expression but I have trouble finding an entrypoint for generated ASTs
<Drup>
there is one, but I don't remember where it is
agravier has quit [Quit: agravier]
<Drup>
kyod: it's in Print_code
<kyod>
Drup: thx !
<Drup>
well, and Trx
<Drup>
I would build ast using metaocaml's syntax, though, it's the same, except it'll already be typechecked
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
agravier has joined #ocaml
kevinqiu has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
olibjerd has quit [Quit: olibjerd]
FreeBirdLjj has joined #ocaml
kevinqiu has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
frefity has quit [Ping timeout: 240 seconds]
snowcrshd has joined #ocaml
zpe has joined #ocaml
silver has joined #ocaml
zpe has quit [Remote host closed the connection]
agravier has quit [Quit: agravier]
tormen has quit [Remote host closed the connection]
tormen has joined #ocaml
_andre has joined #ocaml
tormen has quit [Client Quit]
tormen has joined #ocaml
tormen has quit [Quit: Lost terminal]
tormen has joined #ocaml
kevinqiu has joined #ocaml
samrat has quit [Ping timeout: 268 seconds]
kevinqiu has quit [Ping timeout: 260 seconds]
vicfred has quit [Quit: Leaving]
tormen has quit [Quit: Lost terminal]
rdutra has joined #ocaml
tormen has joined #ocaml
clog has joined #ocaml
spew has joined #ocaml
ryanartecona has joined #ocaml
mrkgnao has joined #ocaml
spew has quit [Quit: foobar]
ryanartecona has quit [Ping timeout: 276 seconds]
jbrown has joined #ocaml
zpe has joined #ocaml
sgronblo has joined #ocaml
kevinqiu has joined #ocaml
tormen has quit [Quit: Lost terminal]
tormen has joined #ocaml
snowcrshd has quit [Remote host closed the connection]
frefity has joined #ocaml
mengu has joined #ocaml
freusque has quit [Ping timeout: 240 seconds]
freusque has joined #ocaml
agravier has joined #ocaml
tormen has quit [Quit: Lost terminal]
tormen has joined #ocaml
eagleflo_ is now known as eagleflo
zpe_ has joined #ocaml
tormen has quit [Quit: Lost terminal]
zpe has quit [Ping timeout: 240 seconds]
tormen has joined #ocaml
kevinqiu has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
shinnya has joined #ocaml
kevinqiu has joined #ocaml
tane has joined #ocaml
jlam has joined #ocaml
ewanas has quit [Quit: Leaving]
snowcrshd has joined #ocaml
jlam__ has joined #ocaml
agravier has quit [Quit: agravier]
sh0t has joined #ocaml
jlam__ has quit [Read error: Connection reset by peer]
jlam__ has joined #ocaml
jlam__ has quit [Read error: Connection reset by peer]