gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
iago has joined #ocaml
oriba has quit [Quit: oriba]
yroeht has joined #ocaml
iago has quit [Quit: Leaving]
datkin has joined #ocaml
<pippijn> can I somehow get the current state and lookahead token from menhir's parser?
<pippijn> on error
dsheets has quit [Quit: Leaving.]
dsheets has joined #ocaml
twittard has quit [Quit: twittard]
<thelema> pippijn: yes, but that's only because neither is allocated on the heap, so == is just int compare
<pippijn> thelema: so parameterless constructors are always just ints?
<thelema> yes, internally they're represented the same as ints
<pippijn> good
goncalo has quit [Quit: .]
twittard has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
emmanuelux has quit [Ping timeout: 272 seconds]
tnguyen has joined #ocaml
ulfdoz has joined #ocaml
tnguyen has quit [Remote host closed the connection]
twittard has quit [Quit: twittard]
tnguyen has joined #ocaml
tnguyen has quit [Remote host closed the connection]
othiym23 has quit [Ping timeout: 240 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
othiym23 has joined #ocaml
twittard has joined #ocaml
fantasticsid has joined #ocaml
fantasticsid has quit [Client Quit]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
EmmanuelOga has quit [Ping timeout: 244 seconds]
codesnow has joined #ocaml
otk has joined #ocaml
otk_ has quit [Ping timeout: 260 seconds]
pango is now known as pangoafk
_habnabit has quit [Ping timeout: 272 seconds]
_habnabit has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
_habnabit has quit [Changing host]
_habnabit has joined #ocaml
Submarine has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]
silver has joined #ocaml
czro has joined #ocaml
edwin has joined #ocaml
<czro> Anyone experienced with omake? I need to disable the "warning as errors" flga and can't find a way to do it.
_habnabit has joined #ocaml
ftrvxmtrx has joined #ocaml
cago has joined #ocaml
Kakadu has joined #ocaml
djcoin has joined #ocaml
micro has quit [Read error: Connection reset by peer]
micro has joined #ocaml
micro is now known as Guest46620
codesnow has quit [Ping timeout: 248 seconds]
Cyanure has joined #ocaml
czro has quit [Quit: Lost terminal]
decaf has joined #ocaml
thomasga has joined #ocaml
avsm has quit [Quit: Leaving.]
otters has quit [Read error: Connection reset by peer]
otters has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
silver has quit [Ping timeout: 276 seconds]
<Ptival> huh I hate it when a module's content is not indented and there are several modules in the same file =___=
<Ptival> when you jump to a definition, you have no idea whether it's toplevel or inside a module :(
ikaros has joined #ocaml
silver has joined #ocaml
<thomasga> Ptival: use typerex :-)
<Ptival> thomasga: I tried, but something was weird with coloring
<thomasga> you can disable coloring
<Ptival> disable as in fallback or as in black&white?
<thomasga> fallback
<Ptival> oh, cool then
<Ptival> let's try that again
Zedrikov has joined #ocaml
<Ptival> thomasga: are you from the Typerex team?
eikke has joined #ocaml
<Ptival> haha I found a way to trigger the syntax coloring bug
<Ptival> it's quite neat :D
silver has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
<thomasga> Ptival: yes, I'm working at ocamlpro, so if you have complaints about typerex don't hesitate :-)
Qrntz has quit [Ping timeout: 245 seconds]
<thomasga> (well if you are happy about typerex you are aslo welcome to send me some messages)
<Ptival> thomasga: I have one issue that I am currently reporting to the bugtracker
<Ptival> thomasga: also, may I suggest that you add one or two \n at the beginning of emacs.append?
<thomasga> feel free to open a new issue about that as well then :-)
<Ptival> ok
<Ptival> done
silver has joined #ocaml
silver has quit [Read error: Connection reset by peer]
<Ptival> now that I removed this Unicode character, the coloring is really neat :)
silver has joined #ocaml
<cago> There is also a "tuareg like" theme if you prefer
ikaros has quit [Quit: Ex-Chat]
_andre has joined #ocaml
silver has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
<Kakadu> thomasga: hi! should I open a issue about my 3Gb grepping?
<thomasga> I've already opened an issue about it in our private issue tracker, so it is not necessary
<Kakadu> thomasga: ok
codesnow has joined #ocaml
codesnow has quit [Ping timeout: 248 seconds]
iago has joined #ocaml
letrec has joined #ocaml
avsm has quit [Quit: Leaving.]
Cyanure has quit [Remote host closed the connection]
KDr2 has joined #ocaml
Cyanure has joined #ocaml
Julien_T has joined #ocaml
thomasga has quit [Quit: Leaving.]
Julien_T has quit [Quit: Julien_T]
Julien_T has joined #ocaml
Julien__T has joined #ocaml
avsm has joined #ocaml
<pippijn> I have an AST which I want to annotate with source position, type and attributes. the way I see it, there are 3 ways to do that:
<pippijn> - make an "Annotated of annotations * t" node and wrap annotated nodes in that
thomasga has joined #ocaml
<pippijn> - make a type t = { annot : annotations; ast : ast } and ast = all my ast nodes
<pippijn> (wrapping *every* node in that record)
<pippijn> - give every node the annotations as their first argument, like SomeNode of annotations * t * t * ...
<pippijn> any ideas or suggestions?
otters has left #ocaml []
<rixed> pippijn: why not adding a list of annotations to the definition of the AST nodes ?
Julien__T has quit [Quit: Julien__T]
thomasga has quit [Read error: Operation timed out]
thomasga has joined #ocaml
oriba has joined #ocaml
Guest46620 is now known as micro
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
<pippijn> rixed: what do you mean?
<pippijn> rixed: is that my last idea?
<rixed> pippijn: Probably.
<pippijn> so putting annotations into every ast node
<pippijn> that's also my favourite, actually
<rixed> Or you can use the object system and have annotated nodes as an extention to normal nodes.
avsm has quit [Quit: Leaving.]
<pippijn> hmm
<pippijn> rixed: can I still match those?
<rixed> pippijn: probably not. I'm not used to use objects.
<rixed> pippijn: but you can have a method that return your usual tuple and match this.
<pippijn> ah..
<pippijn> no, that's not nice
<rixed> pippijn: I agree
<pippijn> then I can't match with Foo (Foo (_))
emmanuelux has joined #ocaml
KDr2 has quit [Remote host closed the connection]
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 272 seconds]
Cyanure has quit [Quit: Quitte]
Cyanure has joined #ocaml
TeratO has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
Cyanure has quit [Remote host closed the connection]
TeratO has quit []
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Tobu has joined #ocaml
thomasga has quit [Quit: Leaving.]
Kakadu has quit [Quit: Page closed]
ulfdoz has joined #ocaml
smondet has joined #ocaml
oriba_ has quit [Quit: oriba_]
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
krktz has joined #ocaml
<krktz> hi
<krktz> i'd like to make music using ocaml
<krktz> i'd like to be able to load and play samples in a scheduled way
cago has quit [Quit: Leaving.]
<krktz> and use a few effects if that's possible (reverb, high and low pass filter etc.)
<krktz> is there anything i should check for this?
<krktz> (maybe libs?)
<f[x]> krktz, savonet
eikke has quit [Read error: Operation timed out]
Xizor has joined #ocaml
<smondet> krktz: Long time ago I had a project with ocaml + audio: http://code.google.com/p/locoseq/
<smondet> there are some binding to jack-midi API which (try to) respect real-time constraints
<krktz> nice, thanks
<krktz> is it really still under developpment? :D
<krktz> (I'll also give savonet a look :))
<smondet> right not really under development :)
Snark has joined #ocaml
Cyanure has joined #ocaml
thomasga has joined #ocaml
<thomasga> do you have any idea why people never use statically compiled preprocessors ?
<thomasga> (ie, why using dynamic loading when it's slower and when it used to work only in bytecode?)
rixed has quit [Remote host closed the connection]
ftrvxmtrx has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
Submarine has joined #ocaml
<thelema> thomasga: composability - the list of preprocessors to use is often variable within a single project
<f[x]> thelema nailed it
<thomasga> well, I am wondering how variable it is really
<thomasga> I mean, you will have few files with one preprocessor, few with a different one, and that's it
<thelema> I avoid camlp4 in my projects, so I'm not so sure
<thomasga> in my experience, it is no so much variable
<thomasga> do you know if one can use ocamlfind to build statically a preprocessor?
<thelema> hmm, probably not as builtin as the usual camlp4 call methods
<thomasga> yup
<thomasga> but there is maybe a magic invocation to call :-)
<thelema> probably have to override the builtin compile rules
ulfdoz_ has joined #ocaml
<f[x]> moreover it is one less build step - which from my experience more often fail than not
cdidd has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 272 seconds]
ulfdoz_ is now known as ulfdoz
avsm has joined #ocaml
Submarine has quit [Quit: Leaving]
Submarine has joined #ocaml
probst has joined #ocaml
probst has quit [Client Quit]
avsm has quit [Quit: Leaving.]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
thomasga has quit [Quit: Leaving.]
ivan\ has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
EmmanuelOga has joined #ocaml
pangoafk is now known as pango
Cyanure has quit [Ping timeout: 244 seconds]
<pippijn> I'm new to ocaml and I'm wondering about best practices and good formatting rules, so here is some code: http://paste.xinu.at/OMi/
<pippijn> I hope someone can give me some input
thomasga has joined #ocaml
<hcarty> pippijn: As far as formatting goes, the pasted code looks good initially.
ftrvxmtrx has joined #ocaml
<hcarty> pippijn: For best practices - lots of globally open modules is generally frowned on. It makes it more difficult to track down the origin of a function.
<hcarty> Or value
<pippijn> makes sense
twittard_ has joined #ocaml
<pippijn> ok, reduced it to 4
<pippijn> hcarty: the ones I have open now are very frequently used
<pippijn> all the KW_ stuff comes from Cparser, all the node types are in Ast, Lexing is open for the Lexing.position types and record fields and I used List.iter a lot
twittard has quit [Ping timeout: 260 seconds]
twittard_ is now known as twittard
<pippijn> hcarty: is it good to "let iter = List.iter" if I just use 1 or 2 functions from a module?
<hcarty> pippijn: That would be better, yes.
<pippijn> ok, did that
<pippijn> now I have 3 modules open
<pippijn> Ast and Cparser are necessary, Lexing is convenient
<pippijn> http://paste.xinu.at/B7y9b/ <- revised
<hcarty> pippijn: That's getting much more reasonable :-)
<pippijn> oh
<pippijn> I can move open Lexing down
<hcarty> What version of OCaml are you using?
<pippijn> because it's only used near the bottom of the file
<pippijn> 3.12 I think
<hcarty> If you only use it in a function or two then you can use "let open Lexing in" in those functions
<pippijn> The Objective Caml toplevel, version 3.12.1
<hcarty> That limits the scope of the open module
<pippijn> ah
<pippijn> well, I use it in all 3 of the functions at the end of the file
<pippijn> so I can put open lexing before those 3
<hcarty> This syntax was added in 3.12.0, along with Module.(...) which limits the open to within the ( )
<pippijn> the 3 functions there are separate from the upper ones
<pippijn> the upper ones are the mutually recursive code output engine, the bottom ones are entry point + actual printing functions
<hcarty> That or "let open Lexing in" as the first line in all three. It may make things easier to manage if you shift code around.
<pippijn> hmm
<pippijn> ok, did that
twittard has quit [Quit: twittard]
mcclurmc has joined #ocaml
letrec has quit [Ping timeout: 255 seconds]
twittard has joined #ocaml
Zedrikov has quit [Quit: Bye all, see you next time!]
Xizor has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
mal``` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
thomasga has quit [Quit: Leaving.]
<krktz> smondet: http://pastebin.com/V2BEzPxD having some troubles trying to build locoseq, maybe you're interested :)
Submarine has quit [Quit: Leaving]
mal`` has joined #ocaml
decaf has quit [Quit: Leaving.]
Kakadu has quit [Remote host closed the connection]
<smondet> krktz: it seems that the Jack API has changed too much... :(
<krktz> oh :(
<krktz> ok, I'll still read the code :)
avsm has joined #ocaml
czro has joined #ocaml
czro has quit [Read error: Connection reset by peer]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
czro has joined #ocaml
lamawithonel has quit [Ping timeout: 246 seconds]
krktz has quit [Ping timeout: 265 seconds]
krktz has joined #ocaml
NihilistDandy has joined #ocaml
twittard has quit [Quit: twittard]
twittard has joined #ocaml
lamawithonel has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
NihilistDandy has quit []
fraggle_ has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
fraggle_ has joined #ocaml
Tobu has joined #ocaml
Snark has quit [Quit: Quitte]
czro has quit [Read error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 244 seconds]
twittard has quit [Quit: twittard]
twittard has joined #ocaml
decaf has joined #ocaml
edwin has quit [Remote host closed the connection]
Cyanure has joined #ocaml
rgrinberg has joined #ocaml
<rgrinberg> For doing ocaml on archlinux would you guys recommend using godi to manage ocaml + libraries or installing everything from aur?. I've noticed aur has a pretty big collection of ocaml modules. Not sure if it's better than godi though. Any advice?
lamawithonel has quit [Ping timeout: 276 seconds]
avsm has quit [Quit: Leaving.]
<decaf> rgrinberg: archlinux stays at bleeding edge because this is what its target audience wants.
<thizanne> rgrinberg: I personnally prefer using AUR
<thizanne> if a module I want is not on the AUR, I make the package myselg
<thizanne> myself*
<rgrinberg> ya, i think i'll give aur a try. Have mostly used godi before but i'm definitely not a fan
<thizanne> i never used godi
<thizanne> i will try odb when i have the time
<hcarty> rgrinberg: You can take a look at odb as well
<hcarty> thizanne: Beat me to it :-)
<thizanne> in fact i would like to make archlinux support correctly OCaml
<thizanne> for now, debian does is very well
<thizanne> it would be cool if arch could also
<rgrinberg> what's wrong with arch's support?
<thizanne> it's not very developped
<rgrinberg> btw, I remember using ocaml on ubuntu and I think a lot of libs were outdated
<rgrinberg> not sure anymore
lamawithonel has joined #ocaml
<thizanne> I heard about problems in ubuntu
<thizanne> on installing ocsigen mainly
<thizanne> on archlinux, some components of ocsigen do not install correctly
<thizanne> that's why i made the bundle package
<rgrinberg> so how is debian better than arch?
<rgrinberg> hcarty: ya I'll give odb a try as well. It has less stuff than godi but it does seem to have all of what i care about
<thizanne> rgrinberg: what librairies do you need which are not in the aur ?
<rgrinberg> huh?
<rgrinberg> I'm fine with aur it has everything
letrec has joined #ocaml
KDr2 has joined #ocaml
cdidd has joined #ocaml
KDr2 has quit [Remote host closed the connection]
djcoin has quit [Quit: WeeChat 0.3.2]
oriba has joined #ocaml
smondet has quit [Remote host closed the connection]
decaf has quit [Quit: Leaving.]
oriba has quit [Quit: oriba]
Cyanure has quit [Remote host closed the connection]
KDr2 has joined #ocaml
iago has quit [Quit: Leaving]
letrec has quit [Ping timeout: 260 seconds]