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
mehitabel has quit [*.net *.split]
rjohnson has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
mehitabel has joined #ocaml
rjohnson has joined #ocaml
hnrgrgr has joined #ocaml
Cyanure has quit [Remote host closed the connection]
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
albacker has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Cyanure has quit [Remote host closed the connection]
datkin has joined #ocaml
datkin has quit [Remote host closed the connection]
datkin has joined #ocaml
<thelema> Drakken: polymorphic variant type
<thelema> (for pattern matching
<Drakken> thelema it's right at the start of the file, at the top level.
<Drakken> created by ocamllex, if that helps.
<thelema> ah, toplevel directives
<thelema> #load, #use
<thelema> ?
<thelema> just paste the line, plz
<Drakken> # 2 "lex.mll"
<thelema> ok, line number directive
<thelema> this tells the lexer that it is parsing "lex.mll" line 2
philtor has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<Drakken> very good. thank you :)
<Drakken> This is why the manual should have a complete index, including punctuation.
philtor has quit [Ping timeout: 248 seconds]
datkin has quit [Read error: Connection reset by peer]
datkin has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
ski has quit [Ping timeout: 244 seconds]
wtetzner has quit [Remote host closed the connection]
<_habnabit> how can you return an int from a C function?
<_habnabit> caml int, that is
<_habnabit> I only see options for returning ing32/int64/nativeint
<thelema> _habnabit: there's a value_of_int macro
<_habnabit> oh, Val_int ?
<_habnabit> okay cool that did it
oriba_ has quit [Quit: oriba_]
KDr2 has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
datkin has quit [Ping timeout: 245 seconds]
twittard has quit [Quit: twittard]
letrec has joined #ocaml
bzzbzz has quit [Quit: leaving]
MaskRay has quit [Quit: leaving]
asdfhjkl has joined #ocaml
philtor has joined #ocaml
datkin has joined #ocaml
twittard has joined #ocaml
datkin has quit [Ping timeout: 246 seconds]
KDr2 has quit [Remote host closed the connection]
twittard has quit [Quit: twittard]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
<pippijn> can I put -menhir into my _tags file?
<pippijn> if I try menhir(...) it says: Warning: tag "menhir" does not expect a parameter, but is used with parameter "menhir --no-stdlib --external-tokens Ctokens --explain --dump"
<thelema> pippijn: just add the tag menhir by itself
<thelema> no ()
<pippijn> how can I pass parameters?
<pippijn> arguments
<thelema> the tag explain will turn on --explain
<pippijn> how about --external-tokens? that's the most important one
<pippijn> --dump is also important
<thelema> probably anything else will require modifying myocamlbuild.ml
<pippijn> --explain is not needed, because I don't currently have any conflicts
<pippijn> I'm using oasis
<pippijn> well, trying to
<thelema> flag ["ocaml"; "menhir"; "ctokens"] & S[A"--external-tokens"; A"Ctokens"];
<thelema> using oasis doesn't mean you can't modify the myocamlbuild file it generates (outside the generated section)
<pippijn> ok
<thelema> maybe similar for --dump
Submarine has quit [Ping timeout: 252 seconds]
<thelema> and then add the tags ctokens and dump (and menhir, of course) to whatever files you want menhir-processed
<pippijn> thelema: thanks, works
datkin has joined #ocaml
datkin has quit [Ping timeout: 265 seconds]
<pippijn> can oasis build custom targets?
<pippijn> I want to build a .js file and install it
<pippijn> installing it is optional, I just want to build it
<pippijn> I can do it with ocamlbuild directly
fantasticsid has joined #ocaml
asdfhjkl has quit [Quit: Leaving]
jimmyrcom has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Remote host closed the connection]
twittard has joined #ocaml
Cyanure has joined #ocaml
cyphase has quit [Ping timeout: 246 seconds]
ulfdoz has quit [Ping timeout: 244 seconds]
cyphase has joined #ocaml
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
Cyanure has quit [Remote host closed the connection]
KDr2 has joined #ocaml
<adrien> hi
makkron has joined #ocaml
<makkron> hi
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
Submarine has joined #ocaml
<adrien> hi makkron
<adrien> if you've been wondering why I'm making a web browser; another reason is that when downloading a single file at 600KB/s, firefox can eat 20 to 25% of my cpu
Tobu has quit [Ping timeout: 260 seconds]
<ousado> adrien: wow
<ousado> that's quite a project. you build one "from scratch" ?
<xenocons> adrien: writing it in ocaml?
<ousado> i.e. not based on webkit or something?
* xenocons please say ocaml please say ocaml
<ousado> hehe
<adrien> ousado: based on webkit-gtk
<adrien> unfortunately, I can't make an engine which would draw on screen, parse html4, 5, xhtml, do svg, javascript, css 1, 2, 3, all the other standards and more ;-)
<ousado> yes, tha's what I would use, too
<ousado> well, who knows :)
Tobu has joined #ocaml
<adrien> I've been wondering if it had not been faster
<adrien> I made a binding generator for C libs
<adrien> made it work for webkit-gtk in particular
<adrien> had to develop ways to work in the FRP fashion
<adrien> and I sometimes (often) disagree on how things are done in webkit-gtk
<xenocons> i want and ocaml browser now heh
avsm has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
<ousado> adrien: is it open source?
djcoin has joined #ocaml
<ousado> the binding generator, I mean
datkin has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
<adrien> ousado: "cowboy" on the ocaml forge
<adrien> "cowboy/glib" for the bits specific to it
<adrien> it can do more than just webkit-gtk (other glib-based libs should be easy)
<adrien> (mostly easy)
<ousado> cool
<ousado> I also have one in the making, but based on libclang, and there are quite some rough edges
<adrien> mine is using yacfe (the parser in coccinnelle)
<ousado> .. and looking at ocaml is a form of meditation, as opposed to C/C++ :)
<adrien> yacfe is in ocaml
<adrien> heh :-)
<ousado> I'll check it out
<ousado> adrien: how hard would it be to adopt for other languages?
<adrien> you mean, adapt yacfe to other languages?
<ousado> no, your bindings generator, although asking that question in #ocaml is almost rude :)
<ousado> (I assume it generates bindings for ocaml right now)
<adrien> yes, it generates bindings for ocam
<adrien> l
<adrien> plus the build system
<adrien> and godi packages (even though that is slightly broken right now)
<adrien> basically, the process goes through: header files (with annotations) -> simpler in-memory representation -> ocaml/c code generation + build system
<adrien> changing the last step is not hard but we're still talking about C bindings so it's usually not trivial either
<ousado> oh, does someone know how to make git not complain about failing certificates?
Snark has joined #ocaml
<ousado> ah export GIT_SSL_NO_VERIFY=1
<mrvn> fix the certificate
<ousado> the ocaml forge cert?
<adrien> less bad: "GIT_SSL_NO_VERIFY=1 $your_git_command"
<adrien> add the cert
letrec has quit [Ping timeout: 255 seconds]
<ousado> thanks
datkin has quit [Ping timeout: 265 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
albacker has quit [Read error: No route to host]
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
zerbob has joined #ocaml
avsm has joined #ocaml
<makkron> i need some help making an untyped lambda calculus interpreter
avsm has quit [Client Quit]
avsm has joined #ocaml
<makkron> When i try to evaluate a factorial function my interpreter freezes, and strangely i have an "equal" term that gives me strange result
<makkron> I wasn't even able to find where the problem could appear
zerbob has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
<mrvn> you might show some source or be more specific
djcoin has quit [Quit: WeeChat 0.3.2]
emmanuelux has joined #ocaml
stephane__ has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
emmanuelux has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
emmanuelux has joined #ocaml
MaskRay has left #ocaml []
rwmjones has quit [Ping timeout: 255 seconds]
cdidd has quit [Ping timeout: 244 seconds]
zorun has quit [Ping timeout: 272 seconds]
zorun has joined #ocaml
rwmjones has joined #ocaml
ulfdoz has joined #ocaml
Submarine has quit [Ping timeout: 246 seconds]
<makkron> ok
<makkron> here is the code doing the evaluation:
testcocoon has quit [Quit: Coyote finally caught me]
<thelema> makkron: eval1 tt -> eval1 tt?
<thelema> I might rewrite eval1 as: let tt = eval2 t in if v t or t = tt then t else eval1 tt
testcocoon has joined #ocaml
<thelema> makkron: eval2 (Apply (non-v, non-v)) ->
<thelema> Can line 8 lead to inifinite loop if t1 hits line 9?
Kakadu has quit [Ping timeout: 264 seconds]
Kakadu has joined #ocaml
jimmyrcom has joined #ocaml
Xizor has joined #ocaml
<makkron> If t1 hits line 9, shoudln't the evaluation be terminated at eval1?
<thelema> oops, you're right, there's not a recursive call there.
<thelema> and everything else decomposes, so as long as your original object graph doesn't have loops...
<thelema> s/loops/cycles/
<thelema> I wonder if it's possible for eval2 to switch the representation between two forms, so that eval1 goes: eval1 a -> eval1 b -> eval1 a
<thelema> If I had to figure out what was going on, I'd use the 'poor-man's debugger trick
stephane__ has quit [Ping timeout: 244 seconds]
<makkron> ok thx, i'll try it
KDr2 has quit [Remote host closed the connection]
letrec has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
Drakken has quit [Ping timeout: 250 seconds]
Drakken has joined #ocaml
stephane__ has joined #ocaml
ulfdoz has joined #ocaml
Submarine has joined #ocaml
Kakadu has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
mnabil has joined #ocaml
Submarine has quit [Ping timeout: 244 seconds]
lorill has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
oriba has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
andreypopp has joined #ocaml
ski has joined #ocaml
mjonsson has joined #ocaml
djcoin has joined #ocaml
lorill has quit [Quit: Ex-Chat]
NaCl has quit [Ping timeout: 248 seconds]
letrec has quit [Ping timeout: 276 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
avsm has quit [Quit: Leaving.]
philtor has joined #ocaml
oriba has quit [Quit: oriba]
detys has joined #ocaml
<detys> Hi
<detys> I'm trying to do a generic module, but I can't get an int list output like i'd like http://pastebin.com/G8nx3gtM
<detys> any tips?
<detys> here's a more complete paste with the module definition: http://pastebin.com/tnzSAkTu
detys is now known as dfezfe
dfezfe is now known as dfzepfoez
Transformer has joined #ocaml
tomprince has quit [Ping timeout: 260 seconds]
tomprince has joined #ocaml
Transformer has quit [Excess Flood]
clog has quit [^C]
clog has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
cdidd has joined #ocaml
lorill has joined #ocaml
Snark has quit [Quit: Quitte]
Guest64639 has quit [Quit: Lost terminal]
Tobu has quit [Ping timeout: 272 seconds]
pdhborges1 has joined #ocaml
pdhborges has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
stephane__ has quit [Ping timeout: 244 seconds]
pdhborges1 has left #ocaml []
KDr2 has joined #ocaml
stephane__ has joined #ocaml
stephane__ has quit [Remote host closed the connection]
smondet has quit [Remote host closed the connection]
albacker has quit [Quit: Leaving]
KDr2 has quit [Remote host closed the connection]
oriba has joined #ocaml
makkron has quit [Remote host closed the connection]
Xizor has quit []
<jave> hello
<thelema> hi
<jave> i have a noob issue. im trying to call a function in one file from another file. this is an existing codebase.
<adrien> Filename.function_name
<adrien> file "foo.ml" defines a module "Foo"
<jave> yes, but it doesnt work for this one particular file
<adrien> and you can call the functions inside foo.ml by prefixing them with "Foo."
<adrien> ok
<adrien> is there "foo.mli"
<jave> no
<adrien> what's the exact error message?
<jave> Error: Unbound module BTInteractive
<thelema> jave: is there a file BTInteractive.cmi?
<adrien> file is "bTInteractive.ml" or "BTInteractive.ml"?
<jave> hmm yes
<jave> bTInteractive.ml
<jave> bTInteractive.cmi
<jave> bTInteractive.cmx
<jave> i assumed those were compiled
<adrien> and no .mli? remove the .cmi
<adrien> .cm* files are compiled
<adrien> (as are ".a", ".o", ".so")
lorill has quit [Quit: Ex-Chat]
<thelema> ok, now where is the bTInteractive.* files (relative to where you're compiling)?
<jave> ok, now i get another error, later when linking
<jave> Error: No implementations provided for the following modules:
<jave> BTInteractive referenced from build/core.cmxa(BTClients)
<jave>
<thelema> jave: you have to link in the bTInteractive.cmx file
<jave> i dont quite get it. the unmodified project builds an links. the btinteractive module functions are accessible from the resulting binary. so why must i then add this file to linking?
<jave> okay im starting to dimly see whats happening
gnuvince has joined #ocaml
<thelema> module functions are available when a .cmi file is found. This allows the compiler to know enough about the other code to be able to compile itself
<thelema> but to actually produce an executable, it needs the implementation of everything
<jave> I think whats happening is that the build system doesnt link the cmx file but it does link the object file so the functions will be private to the module. since it contains some static initialization code the functions are still available through a dynamic interface, but not at link time.
<jave> does that sound reasonable?
<thelema> static initialization code isn't relevant; all modules are is static initialization code. (even the functions they define) (well, except modules that just declare types)
<thelema> if you make a core.cmxa module that includes libraries that depend on BTInteractive, you should include BTInteractive in the core.cmxa
<thelema> otherwise when you link against core, you'll have to also include BTInteractive
<jave> ok
milosn has joined #ocaml
milosn_ has quit [Ping timeout: 244 seconds]