adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ollehar1 has joined #ocaml
m4b has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 244 seconds]
ollehar1 is now known as ollehar
<m4b> are there any resources/tutorials/etc for generating a function based on attributes at the correction location in the post-processed source using ppx?
MrScout has joined #ocaml
<m4b> *correct
damason has quit [Ping timeout: 240 seconds]
damason has joined #ocaml
emmanueloga has quit [Ping timeout: 256 seconds]
emmanueloga has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
keen__________11 has joined #ocaml
swgillespie has joined #ocaml
keen__________10 has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 264 seconds]
tautologico has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
clog has joined #ocaml
not_tfl has joined #ocaml
damason has quit [Ping timeout: 255 seconds]
damason_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnf_ has quit [Read error: Connection reset by peer]
MrScout has quit [Ping timeout: 244 seconds]
MrScout has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
reynir1 has joined #ocaml
reynir has quit [Ping timeout: 252 seconds]
tmtwd has joined #ocaml
bendiken has quit []
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
not_tfl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mcc has quit [Quit: Connection closed for inactivity]
mcclurmc has joined #ocaml
johnf_ has joined #ocaml
ollehar has joined #ocaml
<Drup> m4b: not sure I understand the question
jao has quit [Ping timeout: 240 seconds]
ollehar has quit [Remote host closed the connection]
browncodes has joined #ocaml
not_tfl has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
lambdahands has quit [Read error: Connection reset by peer]
lambdahands has joined #ocaml
Pepe_ has quit [Ping timeout: 244 seconds]
tianon has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 244 seconds]
Pepe_ has joined #ocaml
segmond has quit [Ping timeout: 246 seconds]
tennix has joined #ocaml
tianon has joined #ocaml
tmtwd has joined #ocaml
segmond has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
not_tfl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
not_tfl has joined #ocaml
MercurialAlchemi has joined #ocaml
darkf has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
samrat has joined #ocaml
mcclurmc has joined #ocaml
tmtwd has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
samrat has quit [Ping timeout: 240 seconds]
BhavyaM has joined #ocaml
BhavyaM is now known as BhavyaM_afk
BhavyaM_afk is now known as BhavyaM
<m4b> Drup: so I have 47 slightly different records which I want to: (1) annotate each field with a size, (2) auto generate creator functions at compile time which fill up field values from bytes; so, just wondering what resources there are for ppx, specifically for the latter, creating the compile time function/creator which makes the records, given a bytes parameter
maurer is now known as UrGilgamesh
UrGilgamesh is now known as maurer
<Drup> m4b: write a ppx_deriving plugin
Guest38 has joined #ocaml
Guest38 has quit [Client Quit]
psy_ has quit [Read error: Connection reset by peer]
<m4b> Drup: well so i was asking for a resource/tutorial; I've looked at the source for ppx_deriving_show but still scratching my head. I'd also like to introduce no compile-time dependencies either... so was hoping to build something from scratch
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
native_killer has joined #ocaml
<m4b> hehe, yea, read that one; but it only gives [%<whatever>] example; i was hoping for something like `type t = {one: int [@size 4]; two: int [@size 8]; name: string [@size 16];} [@@create]` and have the ppx extension auto-create a function like: `let create_t bytes = .. {one; two; string}`
<Drup> it's pretty much the same, really
<m4b> yea but I'm confused about how to generate a function like create_t
<Drup> (and ppx_deriving is made for what you want)
moei has joined #ocaml
<m4b> yea i also know ppx_deriving has a similar approach, but it looked like it would add a dependency if i used it; ideally I would write a simple ppx and have it be a simple internal dependency
<Drup> *shrug*
dsheets has joined #ocaml
<m4b> mostly i'd like to just learn how to do it, but i can't really find anything that goes in depth...
swgillespie has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dsheets has quit [Read error: Connection reset by peer]
obadz has quit [Ping timeout: 244 seconds]
swgillespie has joined #ocaml
obadz has joined #ocaml
not_tfl has quit [Ping timeout: 264 seconds]
ygrek has joined #ocaml
tibor has quit [Ping timeout: 246 seconds]
tokik_ has quit [Quit: leaving]
tokik has joined #ocaml
Snark has quit [Ping timeout: 264 seconds]
Snark has joined #ocaml
m4b has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 246 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
kushal has joined #ocaml
johnf_ has joined #ocaml
native_killer has quit [Ping timeout: 255 seconds]
BitPuffin|osx has quit [Ping timeout: 250 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeffmo has joined #ocaml
damason_ has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
huza has joined #ocaml
raichoo has joined #ocaml
huza has quit [Ping timeout: 252 seconds]
johnf_ has quit [Read error: Connection reset by peer]
johnf has joined #ocaml
ely-se has joined #ocaml
obadz has quit [Ping timeout: 250 seconds]
obadz has joined #ocaml
crocket has joined #ocaml
<crocket> Does ocaml return memory to OS?
jeffmo has quit [Quit: jeffmo]
Haudegen has quit [Ping timeout: 272 seconds]
mort___ has joined #ocaml
<ia0> it does so at compaction
jimt has joined #ocaml
browncodes has quit [Remote host closed the connection]
Haudegen has joined #ocaml
brendan has quit [Ping timeout: 255 seconds]
brendan has joined #ocaml
Submarine has joined #ocaml
mengu has joined #ocaml
<crocket> What is compaction?
mengu has quit [Remote host closed the connection]
<companion_cube> sometimes, the GC "compacts" the heap, by moving live values contiguously
johnf has quit [Read error: Connection reset by peer]
<companion_cube> the result is a smaller heap with only live values (right after the GC), afaik
mort___ has quit [Quit: Leaving.]
<crocket> Does haskell do compaction as well?
raichoo has quit [Remote host closed the connection]
mengu has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
shinnya has quit [Ping timeout: 244 seconds]
mengu has quit [Remote host closed the connection]
reynir1 is now known as reynir
mort___ has joined #ocaml
tane has quit [Quit: Verlassend]
Intensity has quit [Remote host closed the connection]
Kakadu has joined #ocaml
Intensity has joined #ocaml
picachu has joined #ocaml
<crocket> Oh, it does.
crocket has left #ocaml ["Leaving"]
<tomboy64> would someone be able to attempt to debug this build-failure of lwt with me? https://559352.bugs.gentoo.org/attachment.cgi?id=410798
<tomboy64> (it's a build.log)
ely-se has quit [Quit: leaving]
mengu has joined #ocaml
yomimono has joined #ocaml
rand000 has joined #ocaml
ely-se has joined #ocaml
ely-se has quit [Client Quit]
ely-se has joined #ocaml
mea-culpa has quit [Read error: Connection reset by peer]
picachu has quit [Read error: Connection reset by peer]
mea-culpa has joined #ocaml
BhavyaM has quit [Ping timeout: 244 seconds]
BhavyaM has joined #ocaml
ely-se has quit [Quit: leaving]
grouzen has quit [Ping timeout: 265 seconds]
mort___ has left #ocaml [#ocaml]
grouzen has joined #ocaml
_andre has joined #ocaml
kushal has quit [Ping timeout: 268 seconds]
mengu has quit []
chris2 has quit [Ping timeout: 250 seconds]
chris2 has joined #ocaml
<tomboy64> never mind, fixed it
kushal has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
BhavyaM has quit [Quit: Quit the channel]
picachu has joined #ocaml
Enjolras has quit [Remote host closed the connection]
ely-se has joined #ocaml
cmtptr has joined #ocaml
contempt has quit [Ping timeout: 260 seconds]
BitPuffin has joined #ocaml
Submarine has quit [Quit: Leaving]
contempt has joined #ocaml
tane has joined #ocaml
Kakadu has quit [Quit: Page closed]
Kakadu has joined #ocaml
picachu has quit [Ping timeout: 256 seconds]
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
ollehar has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
ely-se has quit [Ping timeout: 264 seconds]
ely-se has joined #ocaml
ely-se has quit [Quit: leaving]
jtfmumm has joined #ocaml
freehck has joined #ocaml
<freehck> hello people
yomimono has quit [Ping timeout: 250 seconds]
<freehck> I've just found in the documentation to Unux module that "open_process_full" returns "in_channel * out_channel * in_channel". I wonder why the 3rd channel that is for STDERR is specifically in_channel?
<freehck> I thought that STDERR should be out_channel like STDOUT.
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<asmanur> freehck: you get (stdout, stdin, stderr)
<asmanur> so like stdout, you want to read the contents of it
<freehck> aaaaah!
<freehck> gotcha, thx.
<flux> once again, type system saves the day.. :)
jao has joined #ocaml
<cmtptr> seems like it should have been out * in * in
<asmanur> yes, I guess it's to be consistent with the other functions
<flux> or, dare I say it, { stdin; stdout; stderr } :-)
igoroliveira has joined #ocaml
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
jtfmumm has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Client Quit]
ely-se has joined #ocaml
<zozozo> would it be possible, one day, to have record without declaring them (in the same way as polymorphic variants need not to be defined) ?
<rks`> it's possible, but it probably won't happen
<rks`> you can already use objects in that way
<zozozo> except that with objects, you need to explicit the access methods
<zozozo> i.e you can't access the 'fields' (or rather values) inside an object directly
<rks`> indeed
octachron has joined #ocaml
<flux> but you can have similar effect with let a = ref 42 in object methdo a = a end
<rks`> zozozo: you might be interested in https://github.com/cryptosense/records (but probably not)
<zozozo> right, yet, not exactly as practical as on the fly record would be I think
<rks`> (ok nevermind my last link, not what you want)
<zozozo> actually, what I'd like, is the type declaration for records to be inferred for simple cases
<flux> I don't think ocaml is ever going to have that kind of records.
<flux> it would be less efficient and not backwards-compatible, in particular with the C interface.
<zozozo> flux: how would it be lesse efficient ?
<zozozo> s/lesse/less
<flux> well, I imagine it would work much like objects do now?
<flux> and it involves some dynamic operations instead of fixed record offsets
<zozozo> basically, the idea would be to be able to write : let a = 5 in let b = 42 in {a; b }, and have type something = { a :int; b: int}, inferred and automatically added
<flux> ok, so how about if you have function like: let foo a = a.a
<flux> what would be its type?
<rks`> :)
<zozozo> same as usual
<zozozo> actually, my idea only serves as syntactic sugar
<zozozo> in order to not have to write record type declaration yourself
<flux> let foo () = { a = 42; b = 0 } let bar () = { b = 44; c = 55 } let baz x = x.b
<flux> compiling error?
<zozozo> flux: well, it would be the same as : type _t1 = { a: int; b: int} let foo () = {a = 42; b = 0; } type _t2 = {b : int; c : int; } ...
<zozozo> but now that I think more about it, it wouldn't really be that useful, except for internal use so as to avoid n-uples
<zozozo> flux: you it would have 'val bar : _t2 -> int'
<zozozo> s/bar/baz
keen__________12 has joined #ocaml
<zozozo> sorry for all the typos
<flux> zozozo, well, as long as it's restricted to what 'type' can do, it would be doable :)
<flux> but I'm not sure if such hidden activity would be a boon after all
<flux> I don't think it would break any existing ocaml programs, so that's a plus :)
<flux> it might move type errors resulting from mistyped field names
<flux> or actually convert them from non-type errors to type-errors in place other than where the original error would've been at
ely-se has quit [Quit: leaving]
<flux> but hey, it sounds like a nice compiler hacking project ;-)
<zozozo> ^^
<zozozo> maybe I'll try it someday
keen__________11 has quit [Ping timeout: 264 seconds]
<octachron> zozozo, it sounds quite dangerous if you end up generating all the 2^k record type for a record with k labels
<zozozo> octachron: why would you need to generate all of them ?
<octachron> you wouldn't need to, however you could do it by accident
<zozozo> automatically defined records would have their field names ordered by an arbitrary order on strings
<zozozo> so that {a; b} and {b; a} (in the same context), define the same record
<octachron> which let {a}; {b}; {a;b} as subrecord (ie 2^k - 1)
<flux> constructing {a}, {b}, and {a; b} would create exactly three records
<flux> and {a; b} would create one
<flux> so there are no subrecords being generated at all
<flux> and no additional polymorphism etc. actually that could be a problem, should the records be polymorphic?
<zozozo> that'as actually a good question
<flux> I suppose the most flexible way would be to have them always be polymorphic for their all fields
<octachron> for two labels, it is fine, but for a record with more than 5 labels, this already means potentially more than 31 automatically generated types
<zozozo> the type definitions inferred could indeed look like : ('a, 'b) _t = { a : 'a; b : 'b; }
ggole has joined #ocaml
<flux> it would be an 'almost' pure syntactic extension: when discovering constructor {a ..; b...; c..}, it would create a matching ploymorphic record type (and place it on top the module?), _unless_ a record type with matching fields already exists.
<zozozo> flux: right, type definition would either be inserted at the top, or right before its use
<zozozo> don't know if anyone would use that extension, though
bendiken has joined #ocaml
<flux> actually..
<flux> merlin could do that
<flux> manually
<flux> over constructor press magic key -> record definition appears
<flux> but I guess the benefits would likely be marginal :)
<flux> maybe you can do it already with merlin and its emacs interface
ely-se has joined #ocaml
<zozozo> how unfortunate that I use vim, :p
<octachron> zozozo, ah got it, you were speaking of generating the type only on construction not construction and access
MercurialAlchemi has joined #ocaml
<zozozo> octachron: right
<flux> zozozo, well write it in C then :-)
<octachron> question, could your use case be covered by a kind of local type definition? i.e something like let type r = {a: ..} in ..
<flux> I think he wants them to work in the complete module, not just within one function
<flux> let type would be cool though, no need to produce a local module for it ;)
adg has joined #ocaml
<zozozo> as flux said, it would most likely be used for types in a module
<zozozo> but I agree that local types would be nice
slash^ has joined #ocaml
<zozozo> flux: I don't understand what you mean by "write it in C"
<adg> Hi there. Has somebody else had problems getting emacs tuareg and utop to work together? Specifically, when I open an *.ml file tuareg mode starts with utop minor mode. But C-c C-e still is bound to tuareg-eval-phrase whereas C-c C-b is bound to utop-eval-buffer.
<flux> zozozo, I assume that's the way to extend vim ;-), but of course you could write the same in the executable part vim calls (in ocaml)
johnf has joined #ocaml
<zozozo> I am not nearly motivated enough to extend vim, :p
ely-se has quit [Quit: leaving]
<flux> someone.. such as satan.. should make a proof-of-concept on how to extend vim in elisp.. preferably running the elisp in emacs
<ggole> I don't think it would be hard, just tedious
<ggole> Open a socket, talk to comint, etc
<ggole> Figure out a bunch of really boring serialisation issues
ely-se has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
grouzen has joined #ocaml
Cardoe has joined #ocaml
<MercurialAlchemi> flux: vim supports eg python as scripting language
<MercurialAlchemi> judging by the stack traces I get, this looks like what merlin uses for glue
<MercurialAlchemi> and I think neovim runs plugins out-of-process and uses json for serialization
<MercurialAlchemi> I don't think anybody sane wants to touch vim's code
ely-se has quit [Quit: leaving]
RichN has quit [Quit: WeeChat 1.0]
RichN has joined #ocaml
<adg> \quit
adg has quit []
<companion_cube> plugins in OCaml... might be nice
ely-se has joined #ocaml
ely-se has quit [Client Quit]
jeffmo has joined #ocaml
<MercurialAlchemi> companion_cube: with neovim, you should be able to make plugins in whatever
jao has quit [Remote host closed the connection]
<MercurialAlchemi> asm plugins for the people
browncodes has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
jao has joined #ocaml
samrat has joined #ocaml
frawgie has quit [Ping timeout: 246 seconds]
xet7_ has quit [Ping timeout: 246 seconds]
xet7_ has joined #ocaml
browncodes has quit [Remote host closed the connection]
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
johnf has quit [Read error: Connection reset by peer]
c74d has quit [Remote host closed the connection]
c74d has joined #ocaml
Guest38 has joined #ocaml
systmkor has quit [Ping timeout: 272 seconds]
systmkor has joined #ocaml
MrScout has joined #ocaml
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tennix has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
jtfmumm has joined #ocaml
JuggleTux has joined #ocaml
tennix has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
tennix has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
ygrek has quit [Remote host closed the connection]
jtfmumm has quit [Quit: Textual IRC Client: www.textualapp.com]
tennix has quit [Ping timeout: 250 seconds]
grouzen has quit [Ping timeout: 264 seconds]
pyon has quit [Quit: F...ix you, Emacs.]
pyon has joined #ocaml
browncodes has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 264 seconds]
browncodes has quit [Remote host closed the connection]
tennix has joined #ocaml
<apache2> PL/i here I come!
tennix has quit [Ping timeout: 250 seconds]
<dmbaturin> apache2: Have you found a PL/I implementation already? :)
tennix has joined #ocaml
<apache2> good point. ah well, there's openrexx at least
<apache2> to cover the exoticism
tennix has quit [Ping timeout: 272 seconds]
<dmbaturin> apache2: There's GNU Cobol. And also there's GNU Simula-67.
jeffmo has joined #ocaml
<dmbaturin> I wanted to revive CLU, but one surviving implementation targets VAX, and the other that targets C is the embodiment of "fails to build", producing more screens of errors than I'd care to read.
<apache2> gnu cobol, haha
MrScout_ has joined #ocaml
MrScout has quit [Ping timeout: 264 seconds]
tennix has joined #ocaml
adg has joined #ocaml
adg has quit [Client Quit]
tennix has quit [Ping timeout: 240 seconds]
tennix has joined #ocaml
segmond has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 246 seconds]
segmond has joined #ocaml
_andre has quit [Quit: leaving]
_andre has joined #ocaml
_andre has quit [Client Quit]
_andre has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
_andre has quit [Client Quit]
tennix has joined #ocaml
_andre has joined #ocaml
browncodes has joined #ocaml
Kakadu has quit [Quit: Page closed]
tennix has quit [Ping timeout: 244 seconds]
browncodes has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
tennix has joined #ocaml
ggole has quit []
srcerer has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.2/20150812163655]]
tennix has quit [Ping timeout: 250 seconds]
srcerer has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
tennix has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
pgomes has joined #ocaml
tennix has joined #ocaml
moei has quit [Quit: Leaving...]
MrScout_ has quit [Remote host closed the connection]
octachron has quit [Quit: Leaving]
MrScout has joined #ocaml
tennix has quit [Ping timeout: 256 seconds]
tennix has joined #ocaml
MrScout has quit [Ping timeout: 268 seconds]
mcclurmc has quit [Ping timeout: 255 seconds]
NingaLeaf has joined #ocaml
NingaLeaf has left #ocaml [#ocaml]
mcclurmc has joined #ocaml
tennix has quit [Ping timeout: 264 seconds]
samrat has quit [Ping timeout: 250 seconds]
Kakadu has joined #ocaml
LnL has joined #ocaml
MrScout has joined #ocaml
kushal has quit [Quit: Leaving]
BitPuffin|osx has joined #ocaml
NingaLeaf has joined #ocaml
rpg has joined #ocaml
klj has joined #ocaml
freehck has quit [Ping timeout: 246 seconds]
ollehar has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
_andre has quit [Quit: leaving]
pgomes has quit [Quit: Leaving]
swgillespie has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
ollehar1 is now known as ollehar
Haudegen has quit [Ping timeout: 240 seconds]
moei has joined #ocaml
<Leonidas> heh, building ocaml on scaleway
<Leonidas> seems to be progressing fine
Haudegen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<Leonidas> nope, ocamlgraph segfaults
<companion_cube> awwww
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> Leonidas: segfault ? really ?
<Leonidas> Drup: make[3]: *** [graph/src/gml.ml] Segmentation fault
tennix has joined #ocaml
<Leonidas> I should add I am using Alpine Linux on armhf, so it might be a bit exotic.
<Drup> I see
<Leonidas> but a 3€ semi-dedicated box is quite an interesting deal
<dmbaturin> Leonidas: What company is it that provides armfh boxes with alpine?
kolko has quit [Read error: Connection reset by peer]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Leonidas> Scaleway, a french company that supposedly designed their own server rack with arm socs
<Leonidas> also, took me less than an hour to break my instance :-)
mcclurmc_ has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
NingaLeaf has quit [Quit: Leaving.]
NingaLeaf has joined #ocaml
ivan\ has joined #ocaml
ivan\ has quit [Remote host closed the connection]
ivan\ has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 265 seconds]
ollehar1 is now known as ollehar
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
swgillespie has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
tnguyen has quit [Remote host closed the connection]
larhat has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
NingaLeaf has quit [Quit: Leaving.]
Haudegen has joined #ocaml
NingaLeaf has joined #ocaml
Wickoo has joined #ocaml
tg has quit [Ping timeout: 240 seconds]
<Wickoo> Hi, I want to parse some OCaml files using Camlp5. I'm new to OCaml and was looking around. This is what I found that may do the job: let parse s = Grammar.Entry.parse exp (Stream.of_string s)
<Wickoo> however, I get the error Error: Unbound module Grammar
<Wickoo> which module should I load?
tg has joined #ocaml
tane has quit [Quit: Verlassend]
Haudegen has quit [Ping timeout: 268 seconds]
LnL has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
MrScout has quit [Remote host closed the connection]
swgillespie has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
Cardoe has quit [Quit: Cardoe]
swgillespie has left #ocaml [#ocaml]
<dmbaturin> Wickoo: Camlp5 is very dead.
<Wickoo> dmbaturin: alternatives? camlp4?
<dmbaturin> Camlp4 is going to die out soon as well. Well, maybe not very soon, but it's doomed.
Haudegen has joined #ocaml
<Drup> depends what you want to do ?
<Drup> Wickoo: what's your objective ?
<dmbaturin> If you want to parse ocaml files in your external tool... There are some ready to use ocaml parsers, but I can't remember the names offhand.
<Drup> dmbaturin: like, the actual ocaml parser :D
<Wickoo> dmbaturin: just to parse OCaml. It may sound weird, but I'm doing some sort of research and OCaml is a beast to parse. I could manage to use ocamlyacc via API to parse ocaml, but I wanted to also try Camlp4/5
<Drup> Wickoo: just use the parser from the compiler.
<dmbaturin> Drup: Yeah, but I seem to recall there were some that don't even need to be taken out of anywhere. :)
<Drup> you don't need to take it out
<Drup> you just call the compiler
<Wickoo> Drup: I could do that, that was rather straightforward, although my knowledge of Ocaml is very limited. Thought may be a similar way via API for camlp4
<Drup> there is a module "Parse" exposed by the compiler libs
<Wickoo> Drup: let parse s = let lexbuf = Lexing.from_string s in Parser.implementation Lexer.token lexbuf
<Wickoo> Drup: this worked for me and it connects to the compiler parser
<Wickoo> Drup: I wanted to to the same with these camlp4/5 parsers, but don't know how to load the grammar thingy
<Drup> why doesn't this satisfy you ? They are strictly more complicated and less correct
<Drup> (and slower)
<Wickoo> Drup: that's a very good question! actually I'm happy with the compiler parser, but it's sort of research like thingy. A reviewer nagged last time why we don't compare camlp4!!!
<Wickoo> Drup: Finally, camlp4 has a general way of specifying associativity and precedence (including NONA, non-associativity) -- which scales to the full OCaml. Unlike authors' system, camlp4 deals with the 100% of OCaml. It's better to look at the old camlp4 (now called camlp5). For
<Wickoo> Drup: this is what he wrote
<Wickoo> Drup: first, I'm not sure if it can parse 100% ocaml! and I'll be very happy if it be slower, just need to compare it with the compiler
MrScout has joined #ocaml
<dmbaturin> Drup: Ah, you mean through compiler-libs. Good point.
<Drup> Wickoo: I see
<Drup> so you really want to compare the various approach
<Drup> might I ask what's your paper ? :3
rpg_ has joined #ocaml
<Drup> (pure curiosity)
rpg_ has quit [Client Quit]
Kakadu has quit [Remote host closed the connection]
<Wickoo> Drup: sure, the previous version is published despite these complaints is: http://homepages.cwi.nl/~jurgenv/papers/SLE2013-1.pdf
<Drup> I can't really help you with camlp4/5, it's really a bit complicated to use. Both approach (camlp4/5) are indeed capable of parsing all of ocaml ... very slowly
<Drup> they are very flexible
<Wickoo> Drup: but the approach we proposed will not be practical and we are now working on some newer stuff, and thought to really compare with existing systems
<Drup> cool :)
rpg has quit [Ping timeout: 240 seconds]
<Wickoo> Drup: these stuff will never replace ocamlyacc ;-) that's blazingly fast. Our research is sort of targeting genreal parsers which are more suitable for prototyping/dsls, etc. Anyway it would be good to see how camlp4/5 works with ocaml itself. It's very interesting that they can deal with all OCaml. then we need to figure it out how! Thanks anyway
<Drup> I think you are better off reading the papers
larhat has quit [Quit: Leaving.]
<Wickoo> Drup: that's the problem! there is basically nothing documented about camlp4/5
<Wickoo> Drup: It looks like an engineering effort that works like magic, but pretty hard to explain why
<Drup> Eh.
<Wickoo> Drup: I mean it's documented of course, but not in an academic manner, it's more like a user manual
<Wickoo> Drup: but it's understandable, OCamlp4 was not meant to be a paper, rather a tool being used by people
<Drup> I knew what you mean, but I disagree on the fact that it's documented :3
destrius has quit [Remote host closed the connection]
<Wickoo> Drup: :-)
<tautologico> camlp4 and documentation in the same sentence only make sense if it's to say that it's awful
MrScout has quit [Remote host closed the connection]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
ollehar1 is now known as ollehar
Wickoo has quit [Ping timeout: 246 seconds]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
ollehar1 is now known as ollehar
damason has joined #ocaml
JuggleTux has quit [Ping timeout: 250 seconds]
NingaLeaf has quit [Quit: Leaving.]
tennix has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Denommus has quit [Quit: going home]
klj has quit [Max SendQ exceeded]
ollehar has quit [Quit: ollehar]