adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
xfbs has quit []
zolk3ri has quit [Quit: Lost terminal]
spew has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
sapristi has quit [Ping timeout: 265 seconds]
sh0t has quit [Remote host closed the connection]
spew has joined #ocaml
cbot has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
pierpa has joined #ocaml
webshinra has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
spew has joined #ocaml
webshinra has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
spew has quit [Read error: Connection reset by peer]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
spew has joined #ocaml
nomicflux has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
silver has quit [Read error: Connection reset by peer]
cbot has joined #ocaml
al-damiri has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
keep_learning has quit [Remote host closed the connection]
keep_learning has joined #ocaml
nomicflux has quit [Quit: nomicflux]
mfp has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
tarptaeya has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
groovy2shoes has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
nomicflux has joined #ocaml
jimmyrcom_ has joined #ocaml
mbuf has joined #ocaml
keep_learning has quit [Quit: keep_learning]
jimmyrcom_ has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
tarptaeya has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
BitPuffin has joined #ocaml
pierpa has quit [Quit: Page closed]
al-damiri has quit [Quit: Connection closed for inactivity]
cbot has quit [Quit: Leaving]
MercurialAlchemi has joined #ocaml
mengu has joined #ocaml
orbifx1 has joined #ocaml
bartholin has quit [Ping timeout: 255 seconds]
orbifx1 has quit [Ping timeout: 260 seconds]
orbifx1 has joined #ocaml
bartholin has joined #ocaml
AltGr has joined #ocaml
FreeBirdLjj has joined #ocaml
Guest40333 has joined #ocaml
cuicui has joined #ocaml
bartholin has quit [Ping timeout: 256 seconds]
tarptaeya has joined #ocaml
orbifx1 has quit [Ping timeout: 240 seconds]
gentauro has quit [Ping timeout: 256 seconds]
gentauro has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Guest40333 is now known as Haudegen
argent_smith has joined #ocaml
silver has joined #ocaml
_andre has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has joined #ocaml
infinity0 is now known as Guest5978
Guest5978 has quit [Killed (niven.freenode.net (Nickname regained by services))]
TarVanimelde has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
sapristi has joined #ocaml
mengu has quit [Ping timeout: 276 seconds]
mengu has joined #ocaml
zpe has joined #ocaml
mk9 has joined #ocaml
mbuf has left #ocaml ["Leaving"]
maattdd has joined #ocaml
kakadu has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mfp has joined #ocaml
dhil has joined #ocaml
FreeBirdLjj has joined #ocaml
zpe has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
tarptaeya has quit [Quit: Leaving]
xfbs has joined #ocaml
xfbs has quit [Client Quit]
maattdd has quit [Ping timeout: 256 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
maattdd has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
TarVanimelde has joined #ocaml
TarVanimelde has quit [Client Quit]
zpe has joined #ocaml
dhil has joined #ocaml
zpe has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
malc_ has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
dakk has joined #ocaml
dhil has joined #ocaml
bartholin has joined #ocaml
MercurialAlchemi has joined #ocaml
Muzer has quit [Ping timeout: 265 seconds]
test9753 has joined #ocaml
tarptaeya has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
shinnya has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
Haudegen has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 255 seconds]
nomicflux has joined #ocaml
test9753 has left #ocaml [#ocaml]
gentauro has quit [Ping timeout: 252 seconds]
gentauro has joined #ocaml
jbrown has joined #ocaml
sz0 has joined #ocaml
mbuf has joined #ocaml
_andre has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
spew has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
Haudegen has joined #ocaml
mbuf has quit [Quit: Leaving]
_andre has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
maattdd_ has joined #ocaml
maattdd has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 256 seconds]
dhil has joined #ocaml
maattdd_ has quit [Read error: Connection reset by peer]
maattdd_ has joined #ocaml
tarptaeya has quit [Quit: Leaving]
jbrown has quit [Quit: Leaving]
maattdd_ has quit [Read error: Connection reset by peer]
maattdd_ has joined #ocaml
andreas_ has joined #ocaml
govg has joined #ocaml
sh0t has joined #ocaml
mbuf has joined #ocaml
tarptaeya has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
mengu has quit [Ping timeout: 256 seconds]
maattdd_ has quit [Read error: Connection reset by peer]
spew has joined #ocaml
maattdd_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
sapristi has quit [Ping timeout: 248 seconds]
jbrown has joined #ocaml
zpe has quit [Read error: No route to host]
mbuf has quit [Quit: Leaving]
sapristi has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
mfp has quit [Ping timeout: 240 seconds]
mk9 has quit [Ping timeout: 248 seconds]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
sapristi has quit [Ping timeout: 240 seconds]
sapristi_ has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
al-damiri has joined #ocaml
tane has joined #ocaml
sh0t has quit [Remote host closed the connection]
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #ocaml
mk9 has quit [Remote host closed the connection]
maattdd has joined #ocaml
maattdd_ has quit [Read error: Connection reset by peer]
maattdd has quit [Ping timeout: 256 seconds]
sapristi_ has quit [Ping timeout: 248 seconds]
maattdd has joined #ocaml
dakk has quit [Remote host closed the connection]
chat__ has joined #ocaml
cuicui has quit [Quit: Lost terminal]
ziyourenxiang has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
dedgrant has joined #ocaml
jbrown has quit [Ping timeout: 268 seconds]
AltGr has left #ocaml [#ocaml]
dhil has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
jbrown has joined #ocaml
nicoo has quit [Ping timeout: 255 seconds]
nicoo has joined #ocaml
dhil has quit [Ping timeout: 265 seconds]
jnavila has joined #ocaml
sz0 has joined #ocaml
kini has quit [Quit: No Ping reply in 180 seconds.]
kini has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
sh0t has joined #ocaml
kini has quit [Quit: No Ping reply in 180 seconds.]
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
kini has joined #ocaml
krypton has joined #ocaml
krypton has quit [Client Quit]
jnavila has quit [Ping timeout: 240 seconds]
cbot has joined #ocaml
gentauro has quit [Ping timeout: 240 seconds]
gentauro has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
mk9 has joined #ocaml
sapristi_ has joined #ocaml
jnavila has joined #ocaml
argent_smith has quit [Ping timeout: 256 seconds]
kakadu has joined #ocaml
_andre has quit [Quit: leaving]
sh0t has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
ygrek has joined #ocaml
sh0t has quit [Ping timeout: 276 seconds]
argent_smith has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
tarptaeya has quit [Quit: Leaving]
sh0t has joined #ocaml
mengu has joined #ocaml
nicoo has quit [Remote host closed the connection]
gpietro has joined #ocaml
sh0t has quit [Remote host closed the connection]
gpietro has quit [Remote host closed the connection]
sapristi_ has quit [Remote host closed the connection]
nicoo has joined #ocaml
sapristi_ has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
tane has quit [Quit: Leaving]
orbifx1 has joined #ocaml
<orbifx1> elo
<companion_cube> world
sapristi_ has quit [Remote host closed the connection]
<orbifx1> indeed
sapristi_ has joined #ocaml
<orbifx1> you are an excellent IDE companion_cube :D
cbot has quit [Ping timeout: 260 seconds]
minn has joined #ocaml
<orbifx1> hows goes it companion_cube ?
<companion_cube> good
<companion_cube> how's it for you?
nadako has joined #ocaml
deba5e12 has joined #ocaml
deba5e12 has quit [Client Quit]
<nadako> hey guys, i have a newbie question. i'm working on a thingy that translates ocaml code into a different language. the goal is to produce readable(-ish) code to automate porting. so what seems correct to me is to produce a Typedtree and then "print" it as the target language and it works good so far
<nadako> now the question is how to deal with `ref`s. the target has mutable locals, so I'd like to generate those if the `ref` doesn't escape the block/function scope, is there some easy way to analyze this in compiler api or do i have to do it manually?
<companion_cube> the compiler doesn't analyze this afaik
jimmyrcom_ has joined #ocaml
<orbifx1> it's going alright companion_cube, procrastinating :)
BitPuffin has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
<nadako> hmm, i wonder how bucklescript does that
<nadako> tho it probably works with a different intermediate representation
<malc_> nadako: are you just aiming for the low hanging fruit with refs? mutables (both in records and objects) are still there after all (in fact ref is just a special case of mutable record with one field)
jnavila has quit [Remote host closed the connection]
<Drup> companion_cube: yes it does
<Drup> for floats and ints, in particular
dmtd has joined #ocaml
<Drup> but it's done much much later in type pipeline
<Drup> nadako: typedtree doesn't seem like a good time to get off, what's your target language ?
<nadako> mutable fields is not a problem, i want to eliminate the "ref" wrapping for locals that doesn't escape their scope
<nadako> Drup, why? i'm targeting Haxe and a lot of things maps pretty well from the typed tree
<Drup> well, the typedtree is just after typing. The language is still very rich. The later compiler IR are much much simpler
<nadako> well, i need the richness in my case
<nadako> the goal is to port ml code for further supporting
<Drup> Oh, ok
<Drup> then why do you even need typing ?
sapristi_ has quit [Remote host closed the connection]
shinnya has joined #ocaml
<nadako> to provide type hints and have more info for deciding how to translate some things
<Drup> Right
sapristi_ has joined #ocaml
<Drup> ok, in that case, typedtree is indeed a good choice
<Drup> I'm affraid you're going to have to write the escape analysis yourself
<Drup> the compiler does that ...2 or 3 IR latter, when the langage looks more like C than anything :p
<nadako> i see, oh well :)
<nadako> not really a high-priority, i just thought there's some nice function for that already :-P
sapristi_ has quit [Remote host closed the connection]
<nadako> another question: what's the actual difference between Path.t and Longident.t? looks like Path is the "typed" Longident, but then why Typedtree structures have both?
<nadako> and thanks for the clarification Drup!
<Drup> So, Longident have idents made of strings
<Drup> Path have idents made of Ident.t, which are unique identifiers that are used in the typing environment
<Drup> In another way: before and after name resolution
<nadako> like, for `not`, longident will be "not", but path will be "Pervasives","not"?
<Drup> path will be <thing>."not", and <thing> will point to Pervasive in the typing environment
mk9 has quit [Quit: mk9]
<Drup> and <thing> is very much not a string :)
<Drup> but yes, you got the basic idea right
<nadako> aha
<nadako> thanks!
jimmyrcom_ has quit [Ping timeout: 256 seconds]
<Drup> ("not", however, is still a string, for lot's of reason that are delicate to convey without explaining the module system, and it's far too late for that x)
<nadako> i mainly need to match on the names anyway, so works for me :)
<nadako> I wonder why `Texp_function` has multiple cases instead of a single expr with `function` translated into a "match" expression
<Drup> nadako: Typedtree is not built for being minimal
<Drup> it's literally a parsetree, with all the types annotated
<nadako> well but in parsetree there's a Pexp_fun/Pexp_function differentiation
<Drup> Ah, well, not everything can be perfect, can it ? :)
<nadako> sure, no biggie :D
<nadako> ocaml compiler api is still one of the best i've seen so far
<Drup> As long as you don't look at the typechecker :D
<nadako> hmm, one of the things i haven't yet thought of is how to extract whitespace/comments
<Drup> Ah.
<Drup> Well, that's going to be a problem
<Drup> the parser only keep documentation comments that starts with (**
<Drup> the rest is thrown away
<nadako> hm, so formatting tools have their own parsers?
<Drup> usually, yes
<octachron> or they go the go's (or reason's) way and provides a canonical representation of the ast
<nadako> i wonder how annoying would it be to take substrings from the source based on location info
kakadu has quit [Remote host closed the connection]
cbot has joined #ocaml
sh0t has quit [Remote host closed the connection]
zolk3ri has quit [Quit: Lost terminal]
navaja has joined #ocaml
spew has quit [Disconnected by services]
navaja is now known as spew
orbifx1 has quit [Ping timeout: 240 seconds]