adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
zpe has quit [Ping timeout: 256 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
Hannibal_Smith has quit [Quit: Sto andando via]
hausdorff has quit [Remote host closed the connection]
hhugo2 has quit [Quit: Leaving.]
hausdorff has joined #ocaml
cody__ has joined #ocaml
martintrojer has quit [Ping timeout: 255 seconds]
AltGr has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
_whitelogger has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
vanila has joined #ocaml
<vanila> hi
<vanila> any idea how to solve Reference to undefined global `Unix'
<Drup> how did you compile ?
<vanila> ocamlc un.ml
<Drup> "ocamlfind ocamlc -package unix un.ml"
manud has joined #ocaml
<Drup> (and if you don't have ocamlfind, which is unlikely, install it :p)
<vanila> I do have ocamlfind, but i get the same error with that command
<Drup> ah, yeah, add "-linkpkg"
<vanila> ah thanks a lot!
<Drup> (keep forgetting this one ...)
manud has quit [Quit: manud]
zpe has joined #ocaml
q66 has quit [Quit: Leaving]
<vanila> tuareg mode in emacs is hurting me :(
<vanila> do you knwow hy it's indenting my stuff weirdly?
<Drup> probably because your code is not correct ocaml code, and it doesn't like it
<vanila> soirry yeah that was a really bad example, here's one from good code http://lpaste.net/113725
zpe has quit [Ping timeout: 256 seconds]
<Drup> I don't know :)
<Drup> you can use ocp-indent, it indents better and is customizable
<vanila> thanks ill try it out!
manud has joined #ocaml
<Drup> whitequark: I took a look at the haskell's llvm bindings
<Drup> I don't like the explicit naming
<Drup> I understand why they did (they basically can't do otherwise in haskell without monad hell), but I *really* don't like it
lordkryss has quit [Quit: Connection closed for inactivity]
sheijk has quit [Ping timeout: 245 seconds]
MrScout has joined #ocaml
martintrojer has joined #ocaml
manud has quit [Quit: manud]
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
bytbox has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
ontologiae has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
<vanila> howdo I write to a file descriptor?
<vanila> 'write' seems way too lowl level
sheijk has joined #ocaml
MrScout has quit [Ping timeout: 264 seconds]
sheijk has quit [Ping timeout: 240 seconds]
axiles has quit [Read error: Connection reset by peer]
boogie has quit [Remote host closed the connection]
zpe has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 265 seconds]
bytbox has joined #ocaml
thomasga has quit [Quit: Leaving.]
axiles has joined #ocaml
<vanila> ocaml seems excruciatingly difficult to use for a simple thing like running a subprocess and communicating with it
hausdorff has quit [Remote host closed the connection]
<vanila> does anyone have code that does this?
rwmjones has quit [Ping timeout: 244 seconds]
manud has joined #ocaml
claudiuc has quit [Remote host closed the connection]
rwmjones has joined #ocaml
yomimono has joined #ocaml
<vanila> http://ocaml.github.io/ocamlunix/pipes.html this is making me want to cry, would anyone help me get it working? :(
robink has joined #ocaml
<vanila> i just want to run a subprogram and be able to pass it lines of text, and read lines of its output
<vanila> through channels or something
<tangentstorm> does the ocaml side really need to be the controlling side, vanila ?
<vanila> tangentstorm, I want to use ocaml to write a program that calls tar -xvf basically
badkins has quit []
<tangentstorm> what's troubling you about the link you just posted?
<tangentstorm> it seems pretty comprehensive?
<vanila> yeah it looks great but i've been reading it and trying things out for the last hour and can't do it
MrScout has joined #ocaml
robink has quit [Ping timeout: 258 seconds]
<tangentstorm> http://ocaml.github.io/ocamlunix/processes.html looks like it covers more basic things.
sheijk has joined #ocaml
<vanila> yeah this is the stuff i've been using as well as the ocaml manuals
<vanila> just can't get it to do what i actually want
<manud> vanila: look at ocaml pleac maybe… http://pleac.sourceforge.net/pleac_ocaml/processmanagementetc.html
robink has joined #ocaml
koderok has joined #ocaml
sheijk has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
serge has quit [Remote host closed the connection]
serge has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
axiles has quit [Ping timeout: 264 seconds]
axiles has joined #ocaml
boogie has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
pharpend has joined #ocaml
vanila has quit [Quit: Leaving]
samrat has joined #ocaml
ontologiae has joined #ocaml
Submarine has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
sheijk has joined #ocaml
sheijk has quit [Ping timeout: 240 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
manud has left #ocaml [#ocaml]
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
cody__ has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
siddharthv_away is now known as siddharthv
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
MrScout has quit [Ping timeout: 258 seconds]
boogie has joined #ocaml
sheijk has joined #ocaml
psy_ has quit [Remote host closed the connection]
sheijk has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
hausdorff has joined #ocaml
samrat has joined #ocaml
misv has quit [Ping timeout: 255 seconds]
misv has joined #ocaml
koderok has quit [Quit: koderok]
nojb has joined #ocaml
boogie has quit [Remote host closed the connection]
pharpend has left #ocaml ["WeeChat 0.4.3"]
ontologiae has quit [Ping timeout: 256 seconds]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
sheijk has joined #ocaml
hausdorff has quit [Ping timeout: 245 seconds]
hausdorff has joined #ocaml
sheijk has quit [Ping timeout: 265 seconds]
psy_ has joined #ocaml
zpe has joined #ocaml
tnguyen has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
tnguyen has quit [Client Quit]
serge has quit [Ping timeout: 255 seconds]
hyperbor1ean has joined #ocaml
evert_ has joined #ocaml
rwmjones has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
hyperboreean has quit [*.net *.split]
keen_________ has quit [*.net *.split]
cdidd_ has quit [*.net *.split]
evert has quit [*.net *.split]
NoNNaN has quit [*.net *.split]
nicoo has quit [*.net *.split]
rwmjones has joined #ocaml
cdidd_ has joined #ocaml
AlexRussia has joined #ocaml
MercurialAlchemi has joined #ocaml
keen_________ has joined #ocaml
sheijk has joined #ocaml
nojb has quit [Quit: nojb]
sheijk has quit [Ping timeout: 272 seconds]
nojb has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
<Leonidas> whitequark: oh neat, there's another build system on hacker news today: https://github.com/mkpankov/qake/blob/master/README.md
nojb has quit [Quit: nojb]
nojb has joined #ocaml
hyperbor1ean has quit [Quit: leaving]
hyperboreean has joined #ocaml
hyperboreean has quit [Changing host]
hyperboreean has joined #ocaml
nojb has quit [Client Quit]
nojb has joined #ocaml
nojb has quit [Client Quit]
koderok has joined #ocaml
hsuh has quit [Remote host closed the connection]
oscar_toro1 has quit [Ping timeout: 256 seconds]
hsuh has joined #ocaml
hhugo1 has joined #ocaml
ggole has joined #ocaml
<reynir> haha
<reynir> eh oops
zpe has joined #ocaml
serge has joined #ocaml
sheijk has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
sheijk has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
hhugo1 has quit [Quit: Leaving.]
michipili has joined #ocaml
govg has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
nojb has joined #ocaml
Thooms has joined #ocaml
thomasga has joined #ocaml
nojb has quit [Client Quit]
<whitequark> Leonidas: wow that's terrible
axiles has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.1-dev]
thomasga has quit [Quit: Leaving.]
sheijk has joined #ocaml
jgjl has joined #ocaml
sheijk has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
zpe has joined #ocaml
thomasga has quit [Quit: Leaving.]
govg has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
WhatElse has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
psy_ has quit [Remote host closed the connection]
zpe has joined #ocaml
axiles has joined #ocaml
WhatElse has left #ocaml [#ocaml]
axiles has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
thomasga1 has joined #ocaml
AlexRussia has joined #ocaml
thomasga1 has quit [Client Quit]
thomasga has quit [Ping timeout: 240 seconds]
vogler has joined #ocaml
ingsoc has joined #ocaml
psy_ has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.1-dev]
q66[lap] has quit [Read error: Connection reset by peer]
AlexRussia has joined #ocaml
q66[lap] has joined #ocaml
lordkryss has joined #ocaml
sheijk has joined #ocaml
<Leonidas> is there a ppx port of bitstring somewhere?
sheijk has quit [Ping timeout: 240 seconds]
<whitequark> no
hausdorff has quit [Remote host closed the connection]
WhatElse has joined #ocaml
<WhatElse> hi guys
<whitequark> Drup: sure, I don't care about explicit naming
<whitequark> I'm not asking you to write a direct port of Haskell bindings
<WhatElse> I have this statement: let (ses,typ, deco, cstr, (x_b, x_c)) = List.assoc (ag, stName) tabCstr that raises a “exception Not_found”
<WhatElse> how is possible? I can’t get where this exception is thrown
<whitequark> execute your program with OCAMLRUNPARAM=b in the environment to see the backtraces
<WhatElse> ok, another question, how can I print the values contained in: tabCstr if I don’t know what type is?
<ggole> List.assoc will raise Not_found if it doesn't, uh, find the thing.
dsheets has joined #ocaml
<WhatElse> okay, and what about printing values?
ousado has quit [Ping timeout: 255 seconds]
sheijk has joined #ocaml
<ggole> You can't really do that.
<WhatElse> any workaround? Like get the type and use a custom printer?
<ggole> If you mean #install_printer, that works, but it requires that you know the type.
<whitequark> only in the toplevel though...
<ggole> Right.
<companion_cube> ah, those C files of 14,000 lines
<companion_cube> so neat
<whitequark> companion_cube: the entire Ruby lexer and parser is a single 11469-line file: http://rxr.whitequark.org/mri/source/parse.y
<whitequark> also contains a few GC hacks and whatnot
<companion_cube> 11,000 lines of ruby? wow
<companion_cube> oh, ok
<whitequark> no, of C.
<whitequark> also featured: 90 (ninety) goto statements
<ggole> I start feeling disgusted with myself around about 1.5k
<companion_cube> if they are forward gotos, that sounds ok
<whitequark> no, most of them aren't used for error handling
<companion_cube> https://github.com/lonsing/depqbf/blob/master/qdpll.c <--- the 14,000 lines file
<whitequark> rather to make an ad-hoc lexer state machine
<ggole> (Unless it is something very repetitive like a big LUT.)
<companion_cube> whitequark: ah, much more fun :D
<whitequark> ‘fun’
<michipili> bonus points for parse.y if there is less than fourteen functions :)
<WhatElse> if you don’t know what is inside a variable how can you debug your code? Please help me just to get this, otherwise I don’t know how to proceed :D
<WhatElse> I mean how do you do?
hausdorff has joined #ocaml
<companion_cube> WhatElse: I tend to debug with printf
<companion_cube> whitequark: btw didn't you have a debugger project?
<whitequark> companion_cube: yes
<WhatElse> it is what I’m doing right now, but if I don’t know the type of something how can I print if with printf?
<michipili> You can get the type of an expression by purposedly introducing a type error in the program. But while you are at recompiling, you can *eprintf*.
<michipili> It is best to define a custom printer, because you can reuse this work.
<michipili> Usually, you delete debug-printf statements.
<companion_cube> WhatElse: oh, you should know the types of expressions :3
<companion_cube> assuming it compiles of course
<michipili> So you basically throw-away your work.
<companion_cube> you can use merlin to help
hausdorff has quit [Ping timeout: 244 seconds]
<companion_cube> michipili: or you comment them
jpdeplaix has quit [Ping timeout: 244 seconds]
<WhatElse> can you give me a link? I expect something like: if typeof xxx = yyy then printf …
ebzzry has quit [Remote host closed the connection]
<michipili> Dead code in comments goes out of sync and after a while nobody can use it nor fix it, and it remains here standing as a Greek ruin. Do not do that! ☺
<WhatElse> but I really don’t know how to implement something like this
<whitequark> WhatElse: there is nothing like typeof.
<whitequark> you need to know the type of the expression.
<michipili> Does typerex helps for the type problem?
<whitequark> if you want to learn the type, the simplest method is to introduce a type error, so that the compiler will tell you what it wants.
gnzh has joined #ocaml
<michipili> whitequark: ditto
<whitequark> e.g. print_int expr;;
<whitequark> Error: This expression has type bytes but an expression was expected of type int
<whitequark> also you could use an editor plugin like ocamlmerlin, if you use vim, emacs or sublimetext
<whitequark> they all can tell you the type of an expression under cursor.
larhat has joined #ocaml
gnzh has quit [Client Quit]
govg has quit [Quit: leaving]
<WhatElse> whitequark: ok I’ll try merlin thank you
<WhatElse> introducing a type error I had: This expression has type string but an expression was expected of type ((string * string) * 'a) list
<WhatElse> so the type is ((string * string) * ‘a)
<whitequark> list
<WhatElse> it is a list of ((string * string) * 'a)
<whitequark> yep
<WhatElse> now I have to define a recursive function (for example) that with pattern matching prints that values
<WhatElse> there isn’t anything already written to print it, right?
jpdeplaix has joined #ocaml
<whitequark> does this library use camlp4? do you use OCaml >=4.02? if the answers are "no" and "yes", there is something that can write the function for you
<whitequark> otherwise you'll have to do it yourself
<WhatElse> the answer is: idk and yes
<whitequark> grep it for camlp4 :)
<WhatElse> I have it in makefile
<whitequark> then you'll have to write the printer yourself
<WhatElse> bad news :(
<WhatElse> but what I had to do if I didn’t use camlp4?
<whitequark> opam install ppx_deriving; -package ppx_deriving.std in the buildsystem; [%show: ((string * string) * _) list] would give you the function you want
<WhatElse> ok thank you :)
Thooms has quit [Quit: WeeChat 1.0.1]
nicoo has joined #ocaml
<WhatElse> I’ve written this printer: http://pastebin.com/Mu4qZzJr but it doesn’t print anything.. what could be the reason?
<flux> depending on where you use it, you might want to flush the print at the end by adding %! after "\nempty list"
<WhatElse> I’ve added ‘ %!’ in both and it still doesn’t print anything
<WhatElse> yes
<whitequark> is it actually called?
_whitelogger has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
<ggole> How are you calling it?
<WhatElse> print_list tabCstr;
<ggole> Looks fine.
<WhatElse> ://
<whitequark> fairly sure it's not called.
<whitequark> put failwith "die" inside
<WhatElse> ?
<ggole> Try it in the toplevel, it works fine (odd printing, but it type checks and produces output).
<whitequark> WhatElse: it raises an exception
<whitequark> so if it's called, you'll see the program exit
<WhatElse> it’s strange because just the line before I print another string that is actually printed
<WhatElse> hust ‘die’ ?
<whitequark> oh.
<WhatElse> *just
<whitequark> failwith "die"
<whitequark> failwith is a function
<WhatElse> ah okay
govg has joined #ocaml
<whitequark> so it's not called.
<WhatElse> [] ->failwith "die"; Printf.printf "\n empty list \n %!"; print_newline; ()
<WhatElse> I’ve put it before “empty list"
<WhatElse> and it doesn’t die!
<whitequark> show us the code around the call to print_list
<WhatElse> let rec build_formulaFI formula trace sub execOrd tabCstr tabAtoms : t_formula =
<WhatElse> Printf.printf "\n[F] build_formulaFI (start)";
<WhatElse> print_list tabCstr;
<WhatElse> (sorry for the 3 lines)
<WhatElse> that string: "\n[F] build_formulaFI (start)"; is printed
<ggole> How are you compiling and running this code?
<WhatElse> I simply use ‘make’
<ggole> Oh, it isn't your codebase
<WhatElse> the makefile was already in the project
<WhatElse> no
<ggole> Hmm.
<ggole> My guess is that something is being left stale, but I'm not sure why that would be.
<WhatElse> what do you mean with stale?
<ggole> Not up to date
<ggole> Try putting print_string "TEST\n"; after the printf and see if it gets printed.
<WhatElse> I compile with make clean && make
<WhatElse> ok
<ggole> (That's just to verify that your changes are actually running.)
siddharthv is now known as siddharthv_away
<WhatElse> no, you’re right
<WhatElse> they are’nt
<WhatElse> *aren't
<WhatElse> how is that possible?
<ggole> Good question. :)
<ggole> Hard to say since the problem isn't with the ocaml you've just written
<ggole> Maybe a broken makefile
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ggole> Check that you are running the right binary, etc
<WhatElse> ok thank you
jgjl has joined #ocaml
bernardo1pc has quit [Remote host closed the connection]
jgjl has quit [Ping timeout: 256 seconds]
hausdorff has joined #ocaml
tane has joined #ocaml
Thooms has joined #ocaml
psy_ has quit [Ping timeout: 265 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
axiles has joined #ocaml
psy_ has joined #ocaml
hausdorff has quit [Ping timeout: 258 seconds]
AltGr has left #ocaml [#ocaml]
serge has quit [Remote host closed the connection]
serge has joined #ocaml
koderok has quit [Quit: koderok]
thomasga1 has joined #ocaml
sheijk has quit [Ping timeout: 244 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
axiles has quit [Read error: Connection timed out]
axiles has joined #ocaml
ingsoc has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 258 seconds]
NoNNaN has joined #ocaml
vogler has quit [Quit: WeeChat 1.0.1]
vogler has joined #ocaml
psy_ has quit [Remote host closed the connection]
jonludlam has joined #ocaml
axiles has quit [Ping timeout: 264 seconds]
jgjl has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
thomasga1 has quit [Quit: Leaving.]
axiles has joined #ocaml
psy_ has joined #ocaml
hausdorff has joined #ocaml
oscar_toro has joined #ocaml
hausdorff has quit [Ping timeout: 264 seconds]
_whitelogger has joined #ocaml
thomasga has quit [Quit: Leaving.]
larhat has quit [Ping timeout: 250 seconds]
larhat has joined #ocaml
<troydm> let's say I have a function that is int -> string -> string type
<troydm> I'm sorry it's int -> string -> string -> ()
<troydm> I want to get a function int -> () from it by providing it with two strings
<troydm> how can I do it?
shinnya has joined #ocaml
<reynir> fun n -> my_function n some_string some_other_string
<MercurialAlchemi> troydm: you can't curry backwards
<troydm> can't i do something like let apply23 f a b c = f c a b
<MercurialAlchemi> however, you could use a named parameter for your int, that should work
<troydm> I think it's quite possible
<troydm> yup, it worked
<troydm> just like in Haskell
nojb has quit [Quit: nojb]
<companion_cube> anyone knows how I can express if $ocaml_version >= 4.02 in _oasis ?
<companion_cube> it doesn't look like it knows ">=" :(
<whitequark> you can't.
<whitequark> I've looked into oasis' parser/expression evaluator
<whitequark> there is no way to do that
<companion_cube> can I write XOCamlbuildExtraArgs: 'pp "cppo -D OCAMLVERSION=$ocaml_version"' ?
<companion_cube> I'd like oasis to expand $ocaml_version
<whitequark> that I don't know
<companion_cube> :/
<whitequark> can you just use myocamlbuild.ml?
<whitequark> it has a plugin
<companion_cube> oh god
<whitequark> come on, oasis is far worse than ocamlbuild
<companion_cube> not worse than myocamlbuild.ml
<whitequark> no, it is much worse.
<whitequark> myocamlbuild.ml works.
<whitequark> oasis fucking doesn't, as indicated by your very case
<companion_cube> it works for everything else :(
<whitequark> replace begin..end with Ocamlbuild_cppo.dispatcher
<whitequark> done
<companion_cube> does this define useful variables in cppo?
<whitequark> or let me set this up for you
<companion_cube> I want to #if depending on whether ocaml>=4.02
<whitequark> frankly, I'd rather just send a PR than listen to you complain about myocamlbuild
<whitequark> what's the project?
<companion_cube> (and the plugin looks like it only works for >= 4.01)
<companion_cube> containers :p
<whitequark> you need to support pre-4.01?
<companion_cube> I'd like to support 4.0, es
<companion_cube> yes
<companion_cube> before 4.0 is prehistory
<whitequark> ok, that doesn't have -plugin-tag
dsheets has joined #ocaml
michipili has quit [Ping timeout: 244 seconds]
triskiii has joined #ocaml
michipili has joined #ocaml
<whitequark> wow, the output of your ./configure is annoying.
<companion_cube> it's oasis' configure
<companion_cube> at least I don't have to write it
<whitequark> talking about this
<whitequark> Build the misc library, containing everything from the rotating kitchen sink to automatic banana distributors: ... false
<whitequark> Build modules related to FastCGI, depending on CamlGI: ........................................................... false
<companion_cube> oh, line is too long?
<whitequark> yes
<companion_cube> ok, I'll change it ^^
nojb has joined #ocaml
<troydm> any ocamlyacc experts here?
<whitequark> maybe
hausdorff has joined #ocaml
larhat1 has joined #ocaml
<troydm> well I have some expression list seperated by comma and i want parser to evaluate first expression and only after it evalutes it evalute second
<troydm> for example i have f(a+1,b+3)
<Drup> whitequark: speaking of ocamlyacc, do you started working on the llvm tutorial ?
<whitequark> troydm: don't evaluate expressions in the parser
<whitequark> Drup: not yet
<flux> I think trusting the parser to work in a certain - undocumented - order could be a recipe for unexpected and fragile results ;)
<Drup> whitequark: where is the repository for this tutorial
darkf has quit [Quit: Leaving]
<whitequark> it's the LLVM repository
<Drup> ok
<whitequark> docs/tutorial/OCamlLangImpl*
hausdorff has quit [Ping timeout: 265 seconds]
<troydm> whitequark: are you going to rewrite the llvm tutorial into ocamllex and menhir?
<whitequark> and examples/OCaml-Kaleidoscope
<whitequark> troydm: Drup and sedlex, but yes
larhat has quit [Ping timeout: 244 seconds]
<whitequark> and make it use MCJIT as well
<Drup> whitequark: I'm not sure if an AST is a good idea in the end
<companion_cube> whitequark: do I need to tag files with "cppo" to use your PR? (thansk btw)
<Drup> yes you do
<Drup> the plugin is documented
<whitequark> nope
<whitequark> companion_cube: the idea is that you rename files to .cppo.ml
<Drup> (well, didn't saw the plugin)
<companion_cube> oh, right.
<Drup> the PR*
<Drup> grrr
<Drup> ok, I'll stop multitasking and saying bs >_>
<whitequark> Drup: what about AST?
<Drup> whitequark: it's duplicated work to do an AST *and* a well typed interface
<companion_cube> ok, awesome
<companion_cube> whitequark: many thanks, you really are awesome
<Drup> companion_cube: the plugin is still well documented, though
<whitequark> Drup: oh.
<companion_cube> well I don't exactly use the plugin, but yes, indeed
<whitequark> Drup: yes, but there are several concerns
<whitequark> hm
<Drup> I know, hence why I'm asking your opinion on it
<whitequark> I don't have a strong opinion, but this is what I'd consider:
<whitequark> 1) manipulating pure OCaml values is very fast. going through the C bindings, not even marked with noalloc... not that much
<whitequark> and I know that, say, P/Invoke did become a bottleneck, though it's quite slower than OCaml stubs
<Drup> speed is not the main concern
<whitequark> 2) having an AST would allow to serialize the IR and send it somewhere else without ever linking to LLVM itself
<whitequark> such as when aborting the current process is not an option at all
<Drup> like llvm-general-pure, yes
<Drup> I agree
<whitequark> 3) you can pattern-match over the AST
<whitequark> which would make writing passes in OCaml *massively* easier
badkins has joined #ocaml
<Drup> indeed
<Drup> but I also want to be able to keep the "user" feature of llvm
<flux> implementing useful passes can be slow even in C++
<flux> I have no doubt that if similar ocaml code would need to go via noalloc calls, it could be annoyingly slow
<troydm> okey say I have rule: expr comma expr { action }
<whitequark> flux: actually most of the LLVM stubs can be marked noalloc, it's just not done
<troydm> how can I defer the evaluation of second expression only after action has been executed
<whitequark> troydm: build an AST in the parser, then evaluate it however you like
<Drup> troydm: don't, build a datastructure and iter on it
<Drup> whitequark: I'm not sure how to keep the user feature, except by using a graph
<Drup> (which I think is a good idea anyway)
<whitequark> Drup: I think that's ok
<whitequark> RAUW is a cornerstone of SSA, it must stay
<whitequark> so, just make it mutable I guess
<Drup> RAUW ?
<whitequark> replace all uses with
<Drup> ah, yes
<Drup> oh yes clearly, the graph should be mutable
<whitequark> you do need smart constructors and mutators in this case, but it's a small cost to pay
<Drup> yes
<whitequark> companion_cube: you don't need ocamlbuild_more_args I think
<Drup> it would be quite easier with inline records, I think
<whitequark> Drup: use them.
<Drup> ahah
<Drup> so edgy, very bleeding
<whitequark> I'm serious, I have no objections to that, considering that gives a nice benefit
<Drup> well, all that wouldn't help for reverse use, it would only help with one way
<whitequark> by the time 3.6 is released, 4.03 will be halfway there
<whitequark> or maybe just there
<companion_cube> whitequark: right, I can remove it
<companion_cube> I want to deal with bytes properly, and also with |>
rossberg has quit [Ping timeout: 265 seconds]
<Drup> whitequark: I have to go, but we need to think of a nice way to implement the bi-directional uses in OCaml
<whitequark> Drup: well, I did that in foundry
<Drup> ok
<whitequark> it's a clone of LLVM IR structures, basically
<whitequark> adapted to OCaml
<Drup> ok
<Drup> (the other solution being to fit everything in ocamlgraph and use it like that :D)
<whitequark> uhhh, I'm not sure I like this
<Drup> it would probably not be very different in the end
<whitequark> hm
<Drup> you would have a "user" directed graph
<Drup> which is a strict subgraph of the basicblock graph
<Drup> not sub, bigger*
<whitequark> super?
<Drup> yes, super, thanks
<Drup> yeah, I have to try some various interfaces
rossberg has joined #ocaml
<companion_cube> ugh, I get 'Error: Unbound module MyOCamlbuildBase' now
<whitequark> huh?
<whitequark> oasis/ocaml versions?
<companion_cube> might be an old oasis, it's on my jenkins
sheijk has joined #ocaml
<companion_cube> ok, the pb is that at some place I call ocamlbuild by hand
<MercurialAlchemi> ugh
<MercurialAlchemi> I was unfortunately looking at calendar in the hope of experimenting with timezones
<MercurialAlchemi> and then I see it offers you a way to change the timezone for your entire program by side-effect
thomasga has joined #ocaml
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nlucaroni has joined #ocaml
hausdorff has joined #ocaml
boogie has joined #ocaml
jgjl has joined #ocaml
ebzzry has joined #ocaml
hausdorff has quit [Ping timeout: 258 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
thomasga has quit [Quit: Leaving.]
samrat has joined #ocaml
Thooms has joined #ocaml
vfoley has joined #ocaml
Thooms has quit [Client Quit]
<vfoley> Hey, I remember reading about an easier syntax to manipulate number types such as floats and int32. Something like let y = Float.(x + 4.0) in ... Anyone know where I could find more information on that topic?
<nlucaroni> that's locally opening a module
<nlucaroni> 7.10 in the manual.
<flux> actually it's not
<flux> hmm, actually that is :-)
<flux> but I think pa_do did other things as well
<flux> triskiii is a spammer
<Drup> vfoley: just this example, it's possible without a syntax extension, however I remember something done by ocamlpro about that.
<Drup> MercurialAlchemi: yeah, I think it's the pain point of calendar, that and the heavyness of the interface :/
<Drup> MercurialAlchemi: there is odate too, but I never really took a look at it
<whitequark> somehow all ocaml libraries that indicate their ocamlness by a single leading 'o' are terrible
<Drup> whitequark: what is your sample ?
<companion_cube> \o/ fixed containers at least
<companion_cube> soon I'll have CCBytes
shinnya has quit [Ping timeout: 245 seconds]
<whitequark> omake, ocurl, orakuda, ollvm, ounit, obuild
yomimono has joined #ocaml
<Drup> x)
<vfoley> Drup: I think the example I have in mind requires Core
<whitequark> wait, obuild
<whitequark> is that *another* cabal clone
<vfoley> Int64.(x + y / 2L), something like that
<whitequark> holy crap, so OCaml has *nine* buildsystems and not eight as previously thought
<Drup> vfoley: ok, that's really only local open
<companion_cube> whitequark: please write a tenth one that works well
<Drup> please don't.
<Drup> x)
<companion_cube> why not? :)
<Drup> vfoley: I don't have Core installed, I suppose it will work with Int64's Core module, but it also works with Batteries' BatInt64
<whitequark> companion_cube: I guess I'm not annoyed by ocamlbuild enough
<nlucaroni> could this 10th build system setup any of those 9. :)
<companion_cube> let's just write something that makes configuring oasis easier!!
<whitequark> companion_cube: NO
<companion_cube> just kidding
<whitequark> don't even joke like that.
<Drup> :D
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
thomasga has joined #ocaml
ontologiae has joined #ocaml
sh1ken has quit [Remote host closed the connection]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgjl has joined #ocaml
larhat1 has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
jgjl has quit [Client Quit]
oscar_toro has quit [Ping timeout: 245 seconds]
jgjl has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
Thooms has joined #ocaml
<MercurialAlchemi> Drup: I'll have to look at it
hausdorff has joined #ocaml
boogie has quit [Remote host closed the connection]
zpe has joined #ocaml
roelof has joined #ocaml
<roelof> Are there more exercises I can make then the 99 ocaml problems ?
<vfoley> ProjectEuler.net maybe?
lordkryss has quit [Quit: Connection closed for inactivity]
<jbalnit> have you completed the 99???
<whitequark> I'd be very bored after solving 99 exercise-type problems
<jbalnit> yes, i skipped to real work quickly, but they didnt seem doable in a reasonable amount of time. several weeks I guess
<jbalnit> unless you are really dedicated
jgjl has quit [Ping timeout: 240 seconds]
<roelof> whitequark: and how did you deal after solving all ???
<whitequark> I didn't solve them
<whitequark> in fact, I don't think I solved any programming exercises in my life
jwatzman2 has joined #ocaml
<roelof> oke, how did you ckeck if you understand the theory. The biggest problem for me is using the theory into real problems
jwatzman2 has quit [Client Quit]
MrScout has joined #ocaml
jwatzman|work has joined #ocaml
Hannibal_Smith has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
larhat has joined #ocaml
<whitequark> I never really cared whether I did, I just tried to solve some actual problem I had
<roelof> whitequark: oke,that can also be a way
<roelof> another question : Does anyone know a good book for a beginner to learn Ocaml prefferly with some exercises ?
boogie has joined #ocaml
slash^ has joined #ocaml
pyon has quit [Ping timeout: 265 seconds]
<Denommus> oh, an update for workgroups2! Finally!
<Denommus> wait, I'm on the wrong channel
yomimono has quit [Ping timeout: 255 seconds]
tane has quit [Quit: Verlassend]
<roelof> No one who has a better idea then reading this book (real ocaml book) and doing the 99 problems ??
samrat has quit [Quit: Computer has gone to sleep.]
<nojb> roelof: IMHO it would be much better to forget about all that and just find a problem/project that would like to do using OCaml and try to do it.
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<roelof> nojb: then I have a problem. I have at this moment not a project in mind
<ggole> There are tons of exercise/problem sites if that's what floats your boat
<dsheets> roelof, maybe browse packages in opam which all have source code available and note anything that looks interesting and follow up with that project
<nojb> roelof: then your poroblem has nothing to do with ocaml :)
<roelof> dsheets: I can do that but I think I first have to learn the basics
nojb has quit [Quit: nojb]
zpe has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
xaimus has quit [Ping timeout: 245 seconds]
<roelof> last questions : I come from Rails . Does Ocaml have such a tool like rspec ?
xaimus has joined #ocaml
<whitequark> ounit
vogler has quit [Ping timeout: 240 seconds]
<roelof> whitequark: can Ounit do acceptance testing. I thought it was a unit testing tool
<whitequark> what exactly do you mean by "acceptance testing"?
zpe has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<flux> ounit cannot emulate user interaction with the software
<flux> but I'm not sure if rspec can..
<roelof> I mean for example something like this : http://pastebin.com/ST47MKrK
<roelof> flux . yes, rspec can
<Drup> roelof: how is that different than unit testing ?
<whitequark> rspec cannot
<flux> well, that thing is just a list of assertions written in a different way
<whitequark> other libraries that you can use with rspec can
Thooms has quit [Quit: WeeChat 1.0.1]
<roelof> oke, then I use the wrong name
govg has quit [Ping timeout: 245 seconds]
<roelof> but can I do something like that in Ocaml ?
<Drup> yes, ounit
<roelof> oke, thanks all for the info
roelof has quit [Quit: Page closed]
hausdorff has quit [Remote host closed the connection]
samrat has joined #ocaml
q66 has joined #ocaml
govg has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
ggole has quit []
hausdorff has joined #ocaml
claudiuc has joined #ocaml
michipili has left #ocaml [#ocaml]
thomasga has quit [Quit: Leaving.]
rossberg has quit [Ping timeout: 265 seconds]
lordkryss has joined #ocaml
thomasga has joined #ocaml
WhatElse has quit [Quit: WhatElse]
keen__________ has joined #ocaml
keen_________ has quit [Ping timeout: 245 seconds]
elfring has joined #ocaml
dch has left #ocaml [#ocaml]
<reynir> hm, can't find the cohttp documentation right now
dsheets has joined #ocaml
axiles has quit [Ping timeout: 258 seconds]
<companion_cube> can't wait for opam-doc
<dsheets> companion_cube, tell me your wishes
<dsheets> other than "it exists and doesn't suck"
<companion_cube> 1/ works for all opam packages (with little config within opam files) 2/ cross references between packages 3/ global doc somewhere on the web for every package 4/ possibility to build doc locally and access it without a server
<companion_cube> basically, I want to find in the same place on the web, the doc for zarith, re, react, ocamlnet and lwt (say)
manud has joined #ocaml
<companion_cube> and if I have my own package on my computer, I'd like to be able to generate its doc and access it without launching a webserver first
<dsheets> companion_cube, yes, this is coming
<companion_cube> \o/
<dsheets> but it will probably be close to year-end
samrat has quit [Quit: Computer has gone to sleep.]
<whitequark> it does?
<whitequark> zero commits in opam-doc for months
<dsheets> whitequark, the repository has scattered
<dsheets> check out opam-doc-base and doc-ock-lib and ocamlary
<MercurialAlchemi> companion_cube: a bit like Hackage?
<companion_cube> MercurialAlchemi: I guess so
<companion_cube> dsheets: will there be a possibility of using opam-doc locally too?
<dsheets> companion_cube, yes, this is the next milestone that has an alpha set for friday
<MercurialAlchemi> hm, global variables in ocaml-doc?
<MercurialAlchemi> er, opam-doc
<MercurialAlchemi> is this idiomatic, really?
<companion_cube> dsheets: awesome.
sh1ken has joined #ocaml
sh1ken has quit [Client Quit]
Anarchos has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
hausdorff has quit [Remote host closed the connection]
MrScout has quit [Ping timeout: 244 seconds]
<reynir> Is there a way to "open a functor"? I'd like to write »open Make(Arg)«, but it gives a syntax error
<whitequark> module X = Make(Arg); open X
<reynir> Yea, that's what I'm doing. I'm just not too fond of introducing a new name I won't use :)
<reynir> thanks
<Anarchos> let module X = (...) in open X
<whitequark> that won't work
<companion_cube> don't use open, your life will be better
<reynir> heh
<reynir> I *just* rewrote it to not use open :D
Hannibal_Smith has quit [Quit: Sto andando via]
hausdorff has joined #ocaml
rand000 has joined #ocaml
<MercurialAlchemi> local opens are not that bad
<Anarchos> whitequark i thought there was a syntax for modules as first class values
<whitequark> yes
<whitequark> but you can't use structure open in expression context no matter what
<whitequark> you can do let module X = ... in let open X in ...
nojb has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<Anarchos> whitequark ok
<companion_cube> local opens are ok
<MercurialAlchemi> but yeah, you don't want to pollute the namespace if you can avoid it
<MercurialAlchemi> I tend to alias module names when they're too long and use that instead, unless I need an operator
davine has joined #ocaml
<MercurialAlchemi> in that case, I local-opan
<MercurialAlchemi> open
Arsenik has joined #ocaml
MrScout has joined #ocaml
MrScout has quit [Ping timeout: 245 seconds]
sheijk has quit [Ping timeout: 255 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
<Leonidas> damn, I forgot to sacrifice a goat and now building core fails.
zpe has quit [Remote host closed the connection]
lordkryss has joined #ocaml
zpe has joined #ocaml
MrScout has joined #ocaml
MrScout_ has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
MrScout has quit [Ping timeout: 250 seconds]
MrScout_ has quit [Read error: No route to host]
MrScout has joined #ocaml
nojb has quit [Quit: nojb]
mrvn has quit [Ping timeout: 260 seconds]
Unhammer has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
manud has quit [Quit: manud]
hausdorff has quit [Remote host closed the connection]
Submarine has quit [Ping timeout: 255 seconds]
hausdorff has joined #ocaml
q66[lap] has quit [Remote host closed the connection]
sheijk has joined #ocaml
yomimono has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
davine is now known as francis
francis is now known as francis_pancetta
q66[lap] has joined #ocaml
<reynir> Core wouldn't build for me for like a month after a kernel upgrade \o/
manud has joined #ocaml
paddymahoney has joined #ocaml
ontologiae has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
MrScout has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 255 seconds]
sepp2k has quit [Quit: Konversation terminated!]
MrScout has joined #ocaml
<Leonidas> seems like everything is somehow broken
<Leonidas> possibly due to a libc change
Submarine has joined #ocaml
<Drup> in case of doubt, reboot.
elfring has quit [Quit: Konversation terminated!]
<Drup> (works much better in french, btw)
Arsenik has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 250 seconds]
kchrobak has joined #ocaml
kchrobak is now known as twarog
Plazma has quit [Remote host closed the connection]
manud has quit [Quit: manud]
manud has joined #ocaml
Plazma has joined #ocaml
shinnya has joined #ocaml
enquora has joined #ocaml
manud has quit [Quit: manud]
francis_pancetta has quit [Ping timeout: 245 seconds]
jao has quit [Ping timeout: 258 seconds]
mrvn has joined #ocaml
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
enquora has quit [Remote host closed the connection]
enquora has joined #ocaml
MrScout has quit [Ping timeout: 272 seconds]
hausdorff has quit [Remote host closed the connection]
sheijk_ has joined #ocaml
araujo has quit [Ping timeout: 250 seconds]
sheijk has quit [Ping timeout: 250 seconds]
hausdorff has joined #ocaml
paddymahoney has quit [Ping timeout: 244 seconds]
patojo has joined #ocaml
boogie has quit [Read error: Connection reset by peer]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
twarog has quit [Ping timeout: 244 seconds]
kakadu has quit [Remote host closed the connection]
triskiii has quit []
zpe has quit [Ping timeout: 256 seconds]
yomimono has quit [Ping timeout: 264 seconds]
dmbaturin has quit [Ping timeout: 250 seconds]
sheijk_ has quit [Ping timeout: 245 seconds]
dmbaturin has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
sheijk has joined #ocaml