flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
chrisdotcode has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
chrisdotcode has joined #ocaml
bkpt has quit [Quit: Leaving]
csakatoku has joined #ocaml
<rgrinberg> has anyone given Ohm a try?
<rgrinberg> it looks nice but also very strange
<rgrinberg> with a little too many syntax extensions in a web framework for my taste
ollehar has quit [Read error: Operation timed out]
<Drup> last time I looked, there was so little documentation I didn't even really try. did that get any better ?
m-r-r has joined #ocaml
m-r-r has quit [Client Quit]
m-r-r has joined #ocaml
m-r-r has left #ocaml []
<rgrinberg> Drup: there's enough docs to get started
emmanuelux has quit [Remote host closed the connection]
<rgrinberg> ohm-framework.com
<troydm> interesting
<troydm> why ohm isn't on opam
<troydm> ?
<Drup> rgrinberg: that's not a documentation for me
<rgrinberg> Drup: i did not say it's satisfactory; only improved ;D
<Drup> (and it was exactly the same the last time I looked, last year, including the "documentation coming soon part)
zRecursive has joined #ocaml
<rgrinberg> Drup: I must have not noticed the tutorial before then
Yoric has joined #ocaml
<rgrinberg> anyway ever since I started using ocaml my personal standards for documentation have sharply dropped.
<rgrinberg> so I'm relatively content with that
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
<MarcWeber> value dyn_loader = ref (fun []);
<MarcWeber> fun [] ? What does it mean? I've found this in Camlp4Bin.ml
JcGood has joined #ocaml
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rgrinberg> MarcWeber: i believe it's the revised syntax for pattern matching
<MarcWeber> So it means: new function which does not expect anything and does not return anything?
<MarcWeber> About [] for revised syntax you're right, but its also used for empty array AFAIK.
<MarcWeber> and .val is also a revised syntax to access refs !?
<rgrinberg> i think it's a function that raises matche failure for any paramater
<rgrinberg> don't trust me though
<MarcWeber> If there is no rule I'd expect such, too.
<MarcWeber> :)
pootler_ has quit [Ping timeout: 264 seconds]
pootler__ has quit [Ping timeout: 276 seconds]
BlueProtoman has joined #ocaml
BlueProtoman has left #ocaml []
<Drup> Is there a way to generate a common documentation for two library in oasis ?
darkf has joined #ocaml
JcGood has quit [Ping timeout: 248 seconds]
breakds has quit [Quit: Konversation terminated!]
Watcher7 is now known as Watcher7|off
talzeus has joined #ocaml
<Drup> (nvm, I found out)
chrisdotcode__ has joined #ocaml
chrisdotcode has quit [Ping timeout: 246 seconds]
weie_ has joined #ocaml
introom has joined #ocaml
jtbt has quit [Ping timeout: 252 seconds]
Watcher7|off is now known as Watcher7
weie has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 264 seconds]
TaXules has quit [Ping timeout: 248 seconds]
TaXules has joined #ocaml
<MarcWeber> Drup: You told me about -bin-annot. Is it possible to compile ocaml with this option, so that those libraries also get .cmt files?
<Drup> yes, but you will have to modify the build system of the library >_>
<Drup> for some, it's easy, for other, not so
zRecursive has left #ocaml []
<MarcWeber> Drup: Maybe its easier to patch the compiler to accept BIN_ANNOT env var then ..
<MarcWeber> Or I'll just make it always write those files ..
<Drup> the guy who did ocamlspot wrote a patch to do that
<MarcWeber> Drup: Why isn't it enabled by default? Isn't it very useful to devs?
<Drup> .annot are also disbabled by default, I have no idea why. Also the -bin-annot option is very young (and tools that use it still lack a bit of polish)
davekong has joined #ocaml
<davekong> Can anyone tell me what the syntax error is in this code entered in a REPL? http://pastie.org/8089963
<Drup> davekong: change fun to function
<Drup> function is for a function declaration with pattern matching but with only one argument. fun can take multiple arguments but can't do patern matching.
breakds has joined #ocaml
<davekong> Drup: thanks!
breakds has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
JcGood has joined #ocaml
JcGood has quit [Ping timeout: 240 seconds]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
jcao219 has quit [Ping timeout: 276 seconds]
chrisdotcode__ has quit [Remote host closed the connection]
chrisdotcode has joined #ocaml
pootler_1 has joined #ocaml
pootler_2 has joined #ocaml
pootler__ has quit [Ping timeout: 264 seconds]
pootler_ has quit [Ping timeout: 264 seconds]
pootler_2 has quit [Remote host closed the connection]
pootler_1 has quit [Remote host closed the connection]
pootler has joined #ocaml
ggole has joined #ocaml
ttamttam has joined #ocaml
yacks has quit [Quit: Leaving]
ttamttam has left #ocaml []
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
introom has quit [Remote host closed the connection]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 246 seconds]
<adrien> wmeyer: great!, thanks a lot :-)
<adrien> wmeyer: do you have the project page for this android stuff? is it https://sites.google.com/site/keigoattic/ocaml-on-android ?
Drup has quit [Quit: Leaving.]
ygrek has joined #ocaml
Watcher7 is now known as Watcher7|off
mcclurmc has quit [Ping timeout: 264 seconds]
weie has joined #ocaml
weie_ has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
ttamttam has joined #ocaml
walter|r has quit [Quit: This computer has gone to sleep]
walter|r has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
Snark has joined #ocaml
ygrek has joined #ocaml
djcoin has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
csakatok_ has quit [Remote host closed the connection]
raichoo has joined #ocaml
cago has joined #ocaml
mika1 has joined #ocaml
Snark has quit [Quit: leaving]
Snark has joined #ocaml
structuralist has quit []
djcoin has quit [Ping timeout: 264 seconds]
ontologiae_ has joined #ocaml
introom has joined #ocaml
csakatoku has joined #ocaml
ontologiae_ has quit [Ping timeout: 264 seconds]
ontologiae_ has joined #ocaml
ollehar has joined #ocaml
dtg has quit [Ping timeout: 256 seconds]
dtg has joined #ocaml
djcoin has joined #ocaml
chrisdotcode has quit [Ping timeout: 268 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
q66 has joined #ocaml
csakatoku has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
csakatoku has quit [Ping timeout: 252 seconds]
ttamttam1 has joined #ocaml
Kakadu has joined #ocaml
dtg has quit [Ping timeout: 246 seconds]
ttamttam has quit [Ping timeout: 268 seconds]
<adrien_oww> could you all look up "lablgtk" on your favorite search engine?
<adrien_oww> how far is http://lablgtk.forge.ocamlcore.org/ in the results?
dtg has joined #ocaml
Simn has joined #ocaml
<thomasga> adrien_oww: that's the first result
<mathieui> adrien_oww: not in the results
<adrien_oww> thanks
<adrien_oww> mathieui: which search engine are you using?
<mathieui> DDG
<mathieui> the url gets mentionnent in the summary for the gentoo ebuild, though
<adrien_oww> ok, same here and I don't have it either in the results
<adrien_oww> on yahoo and bing, the first result is the old page
<adrien_oww> which means there are more (or roughly as many) pages pointing to the old one
<adrien_oww> which is pretty bad
<vpm> afaik, ddg results are the same for everyone
<adrien_oww> not necessarily
<adrien_oww> I purposefuly make ddg tailor its results to my searches because I tend to look up specific things :-)
<adrien_oww> but it's been a looooong time I last looked up lablgtk stuff
<gasche> thomasga: if you participate to setting up OUPS, and/or Fabrice is around, could you mention to the next talkers the fact that it would be better if their slides were in english?
<gasche> while I don't think that should be a requirement, it would make the content much easier to diffuse to the wider OCaml community
csakatoku has joined #ocaml
<gasche> (I think that would be a good "soft policy" to mention on the website (if it exists))
<adrien_oww> (slides, but not necessarily speaking in english)
<gasche> of course
<gasche> I think speaking in French makes much more sense
<gasche> and if the occasional non-francophone comes to attend, he/she can read the slides
dsheets has joined #ocaml
<gasche> in computer science research, doing english slides (and then speaking in whichever language a large majority understands) is the norm
<thomasga> gasche: I'm don't participate to settings up OUPS, I'm in Nice :p
<thomasga> (so I should create OUNS I guess)
mathieui is now known as MATHIEUI
<Kakadu> I forget again: if I add some ocaml function to yacc file is it possible to see their signatures automatically in mli file?
<gasche> Kakadu: apparently not
<gasche> that's one of the conclusion of the discussion with pippijn yesterday
<gasche> you should put those in a separate module
<Kakadu> TT
ygrek has quit [Ping timeout: 248 seconds]
MATHIEUI is now known as mathieui
<Kakadu> gasche: Very sad that it is available with custom Makefile but not with ocamlbuild
mcclurmc has joined #ocaml
ollehar has quit [Read error: Operation timed out]
dsheets has quit [Ping timeout: 256 seconds]
<Kakadu> Can somebody remember me why ocamllex raises exception when Eof?
<Kakadu> And why it sometimes catched by ocamlyacc and sometimes not?
<Simn> You can define a token rule for eof, no?
<Kakadu> yeah but in examples they raise exception and everything workd
<Kakadu> works*
<Kakadu> anyway. with token EOF it works
<Kakadu> I'm sure that parser-combinators if they are slow they aren't so mistical
dsheets has joined #ocaml
<gasche> Kakadu: what do you mean "available with custom Makefile but not with ocamlbuild"?
<gasche> ocamlbuild has a -use-menhir option
<Kakadu> gasche: ocamlyacc generates two files: .ml and .mli
<Kakadu> in my Makefile I do ocamlc -i file.ml>file.mli
<Kakadu> that's why I see my definitions in mli
<Kakadu> ocamlbuild doesn't overwrite .mli
tane has joined #ocaml
ollehar has joined #ocaml
csakatoku has quit [Remote host closed the connection]
ttamttam1 has quit [Quit: ttamttam1]
justdit has joined #ocaml
<gasche> Kakadu: I see; you should be able to pull that off by having some more code in your myocamlbuild.ml
<Kakadu> ah, I forget about it
<gasche> to be fair, I don't know what this mini-plugin would look like
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
ollehar has quit [Read error: Operation timed out]
Yoric has joined #ocaml
_andre has joined #ocaml
ollehar has joined #ocaml
ttamttam has joined #ocaml
Drup has joined #ocaml
mort___ has joined #ocaml
ocp has joined #ocaml
tane has quit [Quit: Verlassend]
osa1 has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
tianon has quit [Ping timeout: 260 seconds]
mort___ has left #ocaml []
<pippijn> gasche: did you see the short document?
bastian__ has joined #ocaml
<bastian__> hi. is there any guide available on how to setup a project to get started? already installed opam and i'd like to use it
breakds has joined #ocaml
ttamttam has quit [Quit: ttamttam]
<orbitz> bastian__: opam install foo
<bastian__> orbitz: i understand how to use opam, i'm trying to figure out how to create the infrastructure for a simple project
<bastian__> e.g., howto specify dependencies, use them in code, compile the code, and run it
beckerb has joined #ocaml
<orbitz> bastian__: dependencies are sepcific in opam packages which are distinct from your project
<bastian__> orbitz: sure, each libraries specifies other dependencies. just want to write a simple program using libraries I installed using opam
<orbitz> bastian__: setup a OcamlMakefiel project or oasis or build your own, whichever
<orbitz> Use ocamlfind during compilation though
dezzy has quit [Quit: leaving]
<gasche> pippijn: looking at it, thanks
<pippijn> it's a little rough, I was very tired yesterday
<whitequark> hmm, is Core expected to work with js_of_ocaml?
<adrien_oww> I don't think so
<adrien_oww> it relies on C libraries
<whitequark> I only have -package core, and open Core.Std; js_of_ocaml reports a slew of unknown identifiers and dies with "unix_inet_addr_of_string is not defined"
<whitequark> I see.
<thomasga> whitequark: that's the purpose of core_kernel
<orbitz> There was a thread about this this month or last
<thomasga> but I think that is not fully working yet
<orbitz> I think sebastian did some tricks to get subsets of it working
tianon has joined #ocaml
<pippijn> gasche: actually the program itself is also quite rough, I made it for a very specific use case, and it is part of my first ocaml project
<gasche> so pippijn if I understand correctly
<orbitz> thomasga: A CUFP talk proposal doesn't require an abstract?
dezzy_ has joined #ocaml
<gasche> you (1) did some work to automatically tell the user would allow to go further in the parse (instead of the last wrong token given) (2) provide a framework for overriding that with hand-crafted error messages for some specific (error state, erroneous token read) pairs?
dezzy_ is now known as dezzy
<pippijn> yeah
<pippijn> I think you're missing a word in that sentence, but yes
<pippijn> and the token match is optional
<gasche> I don't really like the fact that you're changing the existing syntaxes for fairly minor reasons
<pippijn> you can have a specific message for each token at a state
<pippijn> gasche: you mean the nested function?
<gasche> hm
<gasche> I hadn't noticed that, do you rely on indentation for bracketing? urgh
<pippijn> no
<gasche> you present "%s" as syntactic sugar
<pippijn> it's unambiguous
<gasche> because of _ ? urgh
<pippijn> well
<pippijn> like I said
<pippijn> I started ocaml a year ago
<pippijn> and this is about the second thing I did
<pippijn> after (during) the C parser
<pippijn> so it's far from perfect, but demonstrates the ideas
<pippijn> looking at the code and behaviour while writing this readme, I noticed many things I would have done differently now
<gasche> I think it would be better if you didn't make any change to the syntax
<gasche> I mean you could probably compile the error-overriding file as a regular OCaml file, with only minor change to what you write right now
<gasche> and give it the right semantics
<pippijn> I had a specific use case for which I wanted the easiest and shortest way
<bastian__> orbitz: is oasis what most projects use?
<pippijn> so, you would be less unhappy if the syntax didn't look like ocaml, at all?
Simn is now known as Simn|gone
<gasche> I don't think there are benefits to using a specific parser and processor for sample files
<gasche> while the OCaml semantics already allows to express all that just fine
<pippijn> ok
<gasche> if I understand correctly the semantics
<gasche> you could use
<pippijn> you could write it as data structure
<pippijn> because that's what this is, of course
<pippijn> it's no code, it's a nested data structure
<gasche> [ "open", (fun tok -> function EOF -> "..." | tkIDENT -> sprintf "expected ident %s" tok | ...); "open Foo ..", (fun tok -> function ...)]
<pippijn> and then you could compile the data structure as code and somehow load it into the message generator
<gasche> is the inner layer data as well?
<pippijn> ok, wait
<pippijn> oops
dezzy has quit [Changing host]
dezzy has joined #ocaml
<pippijn> that's the dummy
<pippijn> the main point of the merr program is to translate "open Foo let message" to 10
<gasche> could you use abstract symbols instead of integers, eg. define a (type message = OpenFoo | TypeConstructor | ...)?
<gasche> which just the code you give (thanks, it's clearer indeed) I don't understand how Libmerr.Make can actually *produce* one of those 'state' values
<pippijn> and who would translate the state number from the parser to those symbols?
<gasche> oh
<gasche> I thought those were just consecutive integers
<pippijn> there is no 16
<gasche> but they're not, they correspond to parser-generator-generated state numbers, ok
<pippijn> besides that, I did, in merr, try to be exhaustive
<pippijn> which is simple, because the grammar is very simple
<gasche> but why do you have to specify that (state = int) then?
<gasche> ah
<pippijn> hmm
<pippijn> I don't remember :) let me check
<gasche> I think I remember reading in somewhere that "state" is an abstract datatype from the generated parser point of view
<gasche> that's probably related
<pippijn> yes
<gasche> (yeah, when looking at menhir-generated code yesterday to investigate someone's feature request)
<pippijn> I tried to make most of the code agnostic to what the actual type of state is
<pippijn> but here, I need to match it
wmeyer` has joined #ocaml
<pippijn> so I need to use the fact that it is in fact int
<pippijn> but I didn't want libmerr (which is 40 loc, btw) to know that
<gasche> ok
<pippijn> https://paste.xinu.at/fFef/ <- libmerr
<gasche> ok
<gasche> so you do edition-distance-based typo correction on the lexemes
<gasche> that's a good idea
<pippijn> I think that idea is quite common these days
<pippijn> git does it
wmeyer has quit [Ping timeout: 268 seconds]
<gasche> OCaml does it now
<gasche> but for the user-defined identifiers
<gasche> not for syntactic keywords
<pippijn> yeah, that's more useful
<gasche> you think?
<gasche> yeah
<pippijn> yes
<pippijn> keywords are highlighted in editors
<gasche> code highlighting provides typo-related feedback
<gasche> exactly
<pippijn> less likely to make a mistake there
<gasche> that's a good point
osa1 has quit [Ping timeout: 246 seconds]
<pippijn> but
<pippijn> I can still do that, but not in this part of the parser
<gasche> indeed
<pippijn> the parser doesn't know the a concept of "identifiers"
<gasche> I think it's better after-parsing anyway
<pippijn> it just knows tokens
<gasche> in OCaml it's done in the type-checker
<pippijn> right
<gasche> which is helpful to get the 'identifier classes' that are more precise that just lexical classes
<pippijn> in C, I would still be doing it inside the parser
<gasche> (eg. it will only suggest class names where a class name is expected)
<orbitz> bastian__: I don't know, I've never used it. For a simple thing I'd suggest just starting with OcamlMakefile
<pippijn> while building the symbol table
<pippijn> actually, that could indeed be done in the type check
<gasche> orbitz: for simple things I use ocamlbuild and it's perfect
introom has quit [Remote host closed the connection]
<gasche> pippijn: looking at your handwritten error messages
<gasche> where there is an EOF, you say what should be written
<gasche> and where there is a token, you say that the token is wrong
<gasche> isn't the EOF information actually more useful?
<gasche> ah sometimes you say both
<pippijn> :)
<pippijn> room for improvements
<pippijn> I didn't think anybody would be interested in it last year
<pippijn> and indeed nobody was
<pippijn> I tried to promote it here
<gasche> I had the luck of not being on IRC last year
<gasche> I don't like IRC.
<gasche> regarding "not quite the OCaml syntax"
<gasche> in retrospect I think it's not bad that your tool uses a dedicated parser, because it makes it self-describing in a sense
<gasche> you are your own use-case
<gasche> so in that persective, indeed I would recommend to use a dedicated syntax that looks like a structured markup for data, and *not* nearly-but-not-quite OCaml source
<pippijn> ok
<pippijn> I thought it was a good idea, because it can be seen as a source to source translation
<gasche> (though I do think that just writing plain OCaml syntax, that would be slightly less convenient but not by much, would actually be a better engineering choice in an absolute sense for users; but eating your own dogfood is a good maintainer-side methodology)
<pippijn> the only thing the program does is replace sample text with state numbers
<pippijn> I didn't know of camlp4 at that time
<pippijn> besides that it could give me sexplib
<pippijn> maybe I can use camlp4 or compiler libs and have actual ocaml syntax with just a source filter
introom has joined #ocaml
<pippijn> but then merr would no longer be its own use case :)
<gasche> yes
<pippijn> I still have 2 others, though
<gasche> camlp4 quotations, or the current experiments in the extension_points branch, would both be suitable
<pippijn> quotations are not necessary
<pippijn> just a source filter is enough
<gasche> I don't like source filters when their input source is a valid OCaml program
<gasche> I think that having code that looks like valid OCaml code but actually has a different semantics is a terrible idea
<pippijn> ok
<gasche> the very point of quotation is that the foreign parts in the semantics are also foreign in the syntax
<pippijn> that's ok, it can just be <:code<open Foo let message = function>> instead of ""
<gasche> in that case you would eg. use <<type constructor>> instead of "type constructor"
<gasche> and the user would know that something weirds happen here that requires him/her to read the documentation
jbrown__ has quit [Read error: Operation timed out]
<pippijn> right
<pippijn> that's better
jbrown__ has joined #ocaml
talzeus has quit [Remote host closed the connection]
<pippijn> actually it wouldn't be so bad to let merr not be its own use case
<gasche> (I'm not quite sure what's the best way to make sure that making a typo inside the quotation results in the appropriate error message at preprocessing time)
<pippijn> for me :)
<pippijn> a typo?
<gasche> if you write <<type constructo>> instead
<gasche> well I guess you check with the .mly on the other hand
<pippijn> uhm
osa1 has joined #ocaml
<gasche> to find the right state number anyway
<MarcWeber> Is anybody in here knowing camlp4 and filters well I could pay for getting a small task done? The task would be about "write a tracing line for each ocaml command which gets executed, like what ocamldebug writes to stdout pressing step only"
<pippijn> but that's the point of code samples
<pippijn> have erroneous code
<pippijn> which may involve typoes
<pippijn> also, I don't read the mly
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<gasche> yeah your mly-esque token description file
<pippijn> ah
<pippijn> that still doesn't know what the actual tokens look like
<gasche> MarcWeber: what's an "ocaml command"?
<pippijn> you can write anything for TkPIPE for instance
<MarcWeber> (a; b; c) or if true then a else b
<gasche> in the syntax you've shown me
<pippijn> %token TkPIPE "a pipe/or sign"
<MarcWeber> in this case I mean a,b,c
<gasche> hm
<gasche> branching to MarcWeber's question
<gasche> MarcWeber: I thought you were happing with Camlp4SomethingSomething of the official distribution
<gasche> what's the trouble?
<gasche> s/happing/happy/.
<MarcWeber> http://dpaste.com/1273971/ @ gasche
<MarcWeber> gasche: The trouble is ocamlc behaving differently than ocamlopt
<MarcWeber> I want to know why.
<pippijn> that's just to produce the "expected" function
<pippijn> exclusively for that (at the moment)
<pippijn> it can be used to provide a default string_of_token
<gasche> you want the source location instead of "." there?
<MarcWeber> gasche: line 50 ff has to match the right parts, then everything is done.
ollehar has quit [Read error: Operation timed out]
<gasche> MarcWeber: so you want a line-by-line trace of the control-flow of your OCaml program
<gasche> to compare ocamlc and ocamlopt
<MarcWeber> gasche: I want a trace "main.ml line 1\nmain.ml line 2; main.ml line 3" on code like 3 lines "print_string "A";;"
<MarcWeber> Yes.
<MarcWeber> If there are many commands in one line it would be nice to have the col. But probably line granularity is enough.
<gasche> you should look at Xavier Clerc's coverage analysis tool
<gasche> it doesn't do *exactly* what you want, but close
<orbitz> what could a camlp4 do to an expression taht will guarnatee you get the output in the same order that it is executed without the camlp4?
<gasche> well translate (e) into (action; translation of e)
<MarcWeber> orbitz: Do you have a better idea?
<gasche> Bisect, that's the name
<orbitz> I'm not sure what the overall problem you're trying to solve is
<gasche> it does quite exactly what you want
<gasche> hm
<gasche> I did an extension_points code of Bisect
<gasche> s/code/port/
<gasche> orbitz: get an execution trace for the program
<gasche> to compare an ocamlc and an ocamlopt run
<gasche> to see where the control-flow diverges
<gasche> seems legit
<gasche> Bisect http://bisect.x9c.fr/manual.html does annotate each expression with an action
<orbitz> what's the overall reason for that though (why not sufficeint to trust they respect the same semantics)?
<gasche> they don't, because some parts of the semantics are unspecified
<orbitz> you could also poke around the ASM :)
<gasche> MarcWeber: so Bisect does instrument any subexpression of the program with an instruction to "mark the point as visited"
<gasche> it is exactly what you want, but for the fact that this set of marks is *not* ordered by program time
<gasche> you want a chronology of visited program points, Bisect's base implementation only collects the time-insensitive set
<MarcWeber> gasche: Thank you very much.
<gasche> hm
<pippijn> wouldn't that just be a change in the support library of the filter?
<gasche> it seems that the implementation internally does keep them ordered
<MarcWeber> What is ppx vs pp? Does it mean ocaml loads the extensions?
<gasche> pippijn: yes, but adding the feature to bisect would be even nicer
skchrko has joined #ocaml
<gasche> MarcWeber: clone the bisect sources with a darcs get http://bisect.x9c.fr/
raichoo has quit [Quit: leaving]
<gasche> then the fun stuff happens in src/syntax
<gasche> specifically, instrumentCamlp4 and instrumentState
<MarcWeber> gasche: I've already done so. Even though I'm an ocaml noob I'm not new to programming.
<gasche> of course
Yoric has joined #ocaml
<gasche> instrumentState keeps an ordered collection of points, and allows you to get them back : exactly what you need
<gasche> but then instrumentCamlp4 has some logic to not re-record already-visited points
<gasche> which needs to be disabled for your use-case
<MarcWeber> gasche: Why keep a list? print_string is enough.
<gasche> well it's more flexible in the long run
<gasche> you are fine with diffing a text output, but having a list opens the door to all sort of automated treatment that doesn't have to re-parse the output
<gasche> my advice would be to do whatever ugly hack you need to make bisect do what you personally do
<gasche> and then send the patch to Xavier Clerc, in case it inspires him to re-implement that properly
<gasche> (Xavier Clerc does very nice things, but he is also extremely busy and chances are he will never do anything.)
pootler has quit [Ping timeout: 268 seconds]
ygrek has joined #ocaml
raichoo has joined #ocaml
justdit has quit [Ping timeout: 264 seconds]
pootler has joined #ocaml
ollehar has joined #ocaml
bholst_ is now known as bholst
<pippijn> gasche: I implemented a compression like you suggested.. and it's 50% increase :\
<pippijn> but I know why
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<pippijn> it's terrible
<pippijn> gasche: the dictionary takes so much space that it doesn't help
<pippijn> better use huffman
<pippijn> gasche: I split up the words in the character names, hashconsed them, and replaced them with their id
dsheets has quit [Ping timeout: 246 seconds]
<pippijn> gasche: then, I serialised a string array * Codepoint.t array
<pippijn> gasche: and in the codepoints, the "character name" part got an indirection: Name of string | Compressed of int list
osa1_ has joined #ocaml
<pippijn> gasche: then, I guessed that of course, compressing every single word in e.g. CAPITAL LATIN LETTER A (note the "A")
osa1 has quit [Ping timeout: 264 seconds]
<pippijn> gasche: is not going to help, so I added another indirection: Compressed of compressed_part list where type compressed_part = CompressedPart of int | UncompressedPart of string
<pippijn> gasche: even worse :)
<pippijn> gasche: I added a threshold for part length to be compressed, and I found that the best compression rate was if I don't compress at all
ygrek has quit [Remote host closed the connection]
hkBst has quit [Quit: Konversation terminated!]
ygrek has joined #ocaml
osa1_ has quit [Read error: Operation timed out]
osa1_ has joined #ocaml
jcao219 has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
<ggole> Hmm
<ggole> There must be a german word for the mixture of frustration and delight when you finally find the cause of a problem and it is quite trivial
<pippijn> what about the feeling you get when you think a problem has a simple solution, and you only found a hard solution, then spend a day researching the topic to find a better solution, and in the end you find that your solution was the best already?
cago has left #ocaml []
<ggole> Dunno. German has words for lots of things.
<ggole> English is terrible for describing thought.
mika1 has quit [Quit: Leaving.]
<MarcWeber> pippijn You never know that your solution was best - because you never know what you've missed.
<pippijn> MarcWeber: except when the solution is mathematically proven or at least widely believed to be the best
pootler has quit [Ping timeout: 240 seconds]
<ggole> There's no general method for knowing something is optimal though
<pippijn> not in general, no
justdit has joined #ocaml
ocp has quit [Read error: Operation timed out]
gasche has quit [Read error: Connection reset by peer]
bkpt has joined #ocaml
djcoin has quit [Quit: WeeChat 0.4.0]
raichoo has quit [Quit: leaving]
<hcarty> Does someone have easy access to a recent 4.01.0 OCaml install with findlib? I think I found a bug in 4.00.1's ocamlbuild + ocamlfind and I'd like to check if it's fixed in 4.01.0 before reporting.
<hcarty> To test: http://vpaste.net/G5F4r
<ygrek> you mean trunk? 4.01 is not released, isn't it?
<ygrek> * is it?
<hcarty> On 4.00.1 this gives "ocamlfind: Error from package `threads': Missing -thread or -vmthread switch"
<hcarty> ygrek: Not released but it's been branched from trunk
ttamttam has joined #ocaml
<ygrek> nice to hear
redfire has joined #ocaml
ttamttam has left #ocaml []
<adrien_oww> wmeyer`: hi, heard anything from the CI? is it publicly readable?
mort___ has joined #ocaml
Watcher7|off is now known as Watcher7
justdit has quit [Ping timeout: 264 seconds]
justdit has joined #ocaml
Simn|gone is now known as Simn
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
gasche has joined #ocaml
<hcarty> The threads bug still exists in 4.01.0+dev. Bug report filed. With luck (where luck = someone who knows what they're doing has time to fix it) a fix will make it into 4.01.0.
zpe has joined #ocaml
dsheets has joined #ocaml
darkf has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 256 seconds]
mort___ has left #ocaml []
chrisdotcode has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 246 seconds]
raichoo has joined #ocaml
introom has quit [Remote host closed the connection]
<pippijn> 18:20 < teotwaki_> Also, Qt is off topic.
<pippijn> in ##c++
* pippijn wanders off back into #ocaml
<adrien> well, Qt is not C++ :P
<adrien> different matter and using the Qt library makes some things very Qtish
Kakadu has quit [Quit: Konversation terminated!]
<pippijn> it's also not ocaml, but it is still being discussed here
<whitequark> there's also ##c
ollehar has joined #ocaml
<adrien> pippijn: as a library, not as a framework
<pippijn> it was about QList
<adrien> well, it's difficult to handle the questions about all the reimplementations
<pippijn> *shrug*
<adrien> a Qt question is probably better suited at #qt where people will actually know Qt (and not only some of them)
<pippijn> if two people in #ocaml discuss implementations of dynamic arrays in whatever language, I don't care
<pippijn> I'll probably read it and maybe join in
<pippijn> it wasn't a question
<pippijn> people were discussing it
<adrien> yeah, no reason to be an ass but it's also a matter of scale
<pippijn> and other people telling them to stop it
<pippijn> I think it's just some kind of allergy
pootler has joined #ocaml
<pippijn> when Qt is mentioned, people go all "omg don't want"
<pippijn> they were comparing std::vector and QList
<pippijn> I think that's a valid topic in a C++ channel
<adrien> yeah, I definitely agree on that
<adrien> my point was that some questions, while possibly appropriate, were better suited for another channel
<adrien> but people on some channels are really pissy
<pippijn> it's also an excuse not to need to answer when they don't know the answer
<companion_cube> iirc ##c++ is full of pedantic people, discussions about anything but the standard are on ##c++-general
<companion_cube> or something like this
<whitequark> they were invoked with -pedantic -Wall -Werror
pootler_ has joined #ocaml
pootler has quit [Ping timeout: 252 seconds]
justdit has quit [Ping timeout: 276 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
redfire has quit [Quit: WeeChat 0.4.0]
breakds has joined #ocaml
ontologiae_ has quit [Ping timeout: 264 seconds]
<pippijn> I wonder what is more efficient in java: a branch or a virtual method lookup
<pippijn> I'm going for the virtual method, because it's cleaner in this case, but I'm still wondering
<pippijn> in my application, it's never going to be noticable, anyway
<whitequark> pippijn: I'd say about same, if on JRE7
<whitequark> (I'm assuming that your virtual method lookup can be transformed to a branch.)
ulfdoz has joined #ocaml
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
Simn is now known as Simn|gone
<whitequark> menhir's conflict explanations are completely awesome.
<MarcWeber> http://dpaste.com/1274215/ @ gasche Do you have another live changing tip?
mcclurmc has quit [Ping timeout: 246 seconds]
tianon has joined #ocaml
<pippijn> whitequark: it's probably going to be a vtable lookup
<pippijn> whitequark: and it won't be statically bound
<whitequark> pippijn: remember: JIT.
<whitequark> if it's bimorphic in practice, it will be optimized to a branch
<whitequark> over, I guess, vtable pointer.
<pippijn> ok, it's unlikely to be statically bound
<whitequark> what do you mean by "statically"?
<pippijn> devirtualising
<whitequark> ok
<pippijn> but yeah, it's bimorphic
<pippijn> so I guess that will be a branch
<pippijn> doesn't matter anyway
<pippijn> it's not being called often
<whitequark> you'd need to have a method called 10k-20k times (depending on flags) for it to be optimized
<pippijn> in what timeframe?
<adrien> two fortnights
<pippijn> heh
<whitequark> lol. I think JVM doesn't restrict timeframe
<pippijn> because it's a potentially long-running server
<pippijn> so eventually, things get optimised
<whitequark> that'd need syscalls and so on. it just counts method calls.
<whitequark> yes
<whitequark> JVM is tailored for long-running servers.
<whitequark> in theory it has a -client mode, but since most desktops these days are x86_64 and have tons of RAM... JVM switches itself to -server anyway.
<pippijn> on my old laptop, eclipse was very slow one day (something to do with the graphics driver, I think), but I have enough ram, so I set the compiler threshold to 50 calls
<pippijn> eclipse took 5 minutes to boot, but after that it was on fire
<whitequark> graphics driver?
<whitequark> it's unlikely that forcing JVM to optimize code would fix *that*.
<pippijn> nvidia sometimes suddenly makes gtk slow
<whitequark> ugh. don't wanna know.
<whitequark> :D
<pippijn> after some week/months, it's back to normal
<pippijn> Qt is never affected
jsvgoncalves has joined #ocaml
yacks has joined #ocaml
thomasga1 has quit [Quit: Leaving.]
beckerb has quit [Ping timeout: 245 seconds]
jsvgoncalves has quit [Read error: Operation timed out]
<pippijn> my work
<whitequark> @NonNull :/
<pippijn> whitequark: why?
<whitequark> pippijn: fixing what's fundamentally broken
<pippijn> I found that extremely useful
<pippijn> I have to use java at work
<whitequark> sure, but _if it wasn't the case that all references are nullable by default_
<pippijn> @NonNull has reduced the number of bugs in new code considerably
<pippijn> this is the first project I've used that with
<whitequark> I'm not saying you should not use it
<pippijn> and the only null-bugs that happened were in my colleague's code
ollehar has quit [Ping timeout: 264 seconds]
<pippijn> being aware of nullability makes you think about code in other ways, too
<whitequark> I want to make a rule like this in menhir: "operator: Tk_PLUS | Tk_MINUS", but menhir wants an action there
<adrien> yes, triggers paranoïa
<whitequark> can I make it just return the token? they all have compatible types
<pippijn> whitequark: unfortunately not
<whitequark> uh
<pippijn> I'm working on a parser generator that does this
<pippijn> used to work on
<pippijn> it does not yet accept files in menhir syntax
<pippijn> but that would just be a front-end thing
<pippijn> anyway, you don't want to use it :)
<whitequark> why?
<pippijn> I believe it's broken
<pippijn> I'm not sure..
<whitequark> >_<
<pippijn> parsing works, but I think there is something wrong with the semantic values
<pippijn> and I'm not sure it was always broken or I "recently" broke it
<pippijn> where "recently" is half a year ago, when I last touched it
<pippijn> by the way, whitequark
<pippijn> if you add functions to Unicode, make sure they operate on all 3 formats
<pippijn> like iteration, search, fold, etc.
<whitequark> oh, sure
<pippijn> well, I'm very busy now, I'm going to continue working, and maybe in the weekend I'll add some functions there
<pippijn> are you against GPL?
<whitequark> I'm working on my parser yet
<whitequark> pippijn: yes
<pippijn> ok
<whitequark> especially for core components "just because freedom"
<whitequark> GPL should be a conscious decision
<whitequark> if you want to just slap something, slap MIT.
<pippijn> I would really like to have something that requires changes to the code itself to be open source
<pippijn> but allow it to be used in closed source code
<whitequark> LGPL?
<pippijn> ah
<whitequark> the problem is, I'm not sure how ocaml's linking relates to LGPL, or if ever
<whitequark> this needs a lawyer
<pippijn> LGPL with linking exception, then
<Drup> the "LGPL + ocaml linking exception" is quite common in the caml community
<whitequark> oh I see
<adrien> LPLG + le is "best we could find (for now)"
<pippijn> I'll have that, then
<whitequark> I'm OK with it
<Drup> there is a version of the lgpl v2 with this on the ocaml website
<whitequark> the emitted code of ocamllex is unwieldy.
<pippijn> I wonder
<pippijn> how about QPL?
<pippijn> menhir is QPL with an exception
<whitequark> pippijn: never used it before
<pippijn> me neither
<Drup> pippijn: http://caml.inria.fr/ocaml/license.en.html. I don't know if the licence in your link is the same because I'm totally incapable to read any GPL stuff
<whitequark> ah, trolltech's QPL
<whitequark> TT switched to LGPL
<Drup> (that's the precise reason why I don't use it)
<whitequark> well, it's Digia now
ygrek has joined #ocaml
<pippijn> Drup: my link describes the licencing conditions
<pippijn> licensing*
<Drup> pippijn: yes but the LGPL text is linked
tane has joined #ocaml
<Drup> I'm quite surprised, I was expecting the svg to be an horrible mess but it seems quite doable.
Kakadu has joined #ocaml
Simn|gone is now known as Simn
ollehar has joined #ocaml
ggole has quit []
osnr has quit [Quit: Leaving.]
ttamttam has joined #ocaml
emmanuelux has joined #ocaml
ttamttam has left #ocaml []
wmeyer has joined #ocaml
<wmeyer> hello
<Kakadu> hey
<wmeyer> hey Kakadu!
<adrien> o/
<wmeyer> \o
<Kakadu> Have you ever seen parser generating combinators? (i.e. parser combinators return description (ast-like) of parser, after some transformation this description is compiled (in runtime) into parser-functions which are executed
<pippijn> hi wmeyer
<wmeyer> hi pippijn
<pippijn> parser combinators are not AST
<pippijn> they are functions that do actual parsing
<wmeyer> Kakadu: your description made my brain burn :-)
osa1_ has quit [Remote host closed the connection]
<wmeyer> after pippijn it's a start "closure compilation scheme"
<wmeyer> s/start/standard/
osa1_ has joined #ocaml
<wmeyer> you can of course build AST and then build an evalutor
<Kakadu> wmeyer: yeah, I already thought about evaluator
<wmeyer> but it will be even slower
ontologiae_ has joined #ocaml
<wmeyer> it has some advantages, first of all you can perform deconstruction and matching
<Kakadu> what about factorization using this AST and detecting left recursion in simple cases?
<wmeyer> you can do it, usually that's what standard packrat generators do on the level of AST
<Kakadu> wmeyer: have u seen something like this? (in Haskell maybe?)
<pippijn> in C++, with its massive inlining (or even better, haskell), parser combinators make sense
ygrek has quit [Ping timeout: 256 seconds]
* wmeyer will have an apple
osa1_ has quit [Remote host closed the connection]
osa1_ has joined #ocaml
* wmeyer is impressed by Idris
<adrien> what is it?
<wmeyer> it's a dependently typed language
<wmeyer> the good thing about it is that, gives a really good and clean syntax for dependently typed programming, but performance of the EDSLs is really good, due to partial evaulation
ontologiae_ has quit [Ping timeout: 276 seconds]
<pippijn> and nat is a linked list
<wmeyer> pippijn: please :-)
<wmeyer> it compiles to C though
<wmeyer> you don't need number in the compiler don't you?
<wmeyer> most often only for the optimisations of the target language
<pippijn> hm?
<wmeyer> how often you add and multiply big numbers in your code
<wmeyer> in numerical, yes, but then don't use nat! use z or positive
<wmeyer> or floats
<pippijn> yeah
<pippijn> not often, I think
<wmeyer> nats are only useful for dependently typed data types, for indexing something
<wmeyer> not for generic calculations :-)
<pippijn> so it's written in haskell
<wmeyer> pippijn: yes, it's haskell
* wmeyer ++ shower
<pippijn> interesting
<pippijn> javascript?
<pippijn> compileEpic f t = fail "Epic backend disabled"
<pippijn> haha
mlh has quit [Read error: Connection reset by peer]
<adrien> wmeyer: enjoy :D
<adrien> wmeyer: I'm a bit tired so I hope I haven't forgotten or messed up something
mlh has joined #ocaml
* whitequark almost done with source parser
<whitequark> then, it's IR parser and dumper... hrmpf
<whitequark> pippijn: how would you model typical SSA IR in ocaml? mainly use lists
wmeyer has quit [Ping timeout: 240 seconds]
osa1_ has quit [Read error: Operation timed out]
nlucaroni has quit [Quit: leaving]
osa1_ has joined #ocaml
<wmeyer`> whitequark: you are doing a compiler?
<whitequark> wmeyer`: yeah
<whitequark> already wrote a prototype in Ruby, now doing it proper way in OCaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
introom has joined #ocaml
introom has quit [Ping timeout: 240 seconds]
<wmeyer`> whitequark: nice!
Snark has quit [Quit: leaving]
<whitequark> wmeyer`: any comments on the design for SSA IR?
<whitequark> I've modelled it after LLVM when I was doing it in Ruby... I can duplicate that with OCaml's classes, but not sure if it is a good idea
wmeyer` has quit [Ping timeout: 248 seconds]
osa1__ has joined #ocaml
osa1_ has quit [Read error: Operation timed out]
UncleVasya has joined #ocaml
_andre has quit [Quit: leaving]
wmeyer has joined #ocaml
<wmeyer> adrien: thanks, I'm looking in Mantis
osa1__ has quit [Remote host closed the connection]
dsheets has joined #ocaml
<wmeyer> dsheets: ho!
<dsheets> hello
<Drup> http://adambard.com/blog/learn-x-in-y-minutes/ if someone has the motivation :]
<wmeyer> :-)
<wmeyer> Drup: the title already sounds dismotivating me :|
<wmeyer> :D
<Drup> I know =')
<wmeyer> learn x in y minutes :P
thomasga has joined #ocaml
<dsheets> i want to learn x in y years
<wmeyer> this would not be a finite number of minutes in my case
<dsheets> then build x++
<wmeyer> it's not me!
<wmeyer> anyway, I got to get back to my code =)
<wmeyer> dsheets: yes, but that's not OCaml operator!
<wmeyer> that's C++
<dsheets> incr x
<wmeyer> yet much better
<Drup> hey, incr doesn't return the value !
<dsheets> bind x (fun a -> return (a + 1))
<wmeyer> it does
<wmeyer> Inductive incr nat -> Type := incr : forall x, x -> incr (S x).
<wmeyer> errors errors errors!
<wmeyer> Inductive Incr : nat -> Type := incr : forall x, x -> Incr (S x).
<wmeyer> adrien: I hope to see the patches at some point tomorrow, maybe even when I'll be in Makespace
<wmeyer> dsheets: you tomorrow in Makespace?
<dsheets> erm perhaps
<dsheets> not a member so need to make sure someone else is there before i go
<wmeyer> give me a ring
<dsheets> have to do chores, too
<wmeyer> before
<dsheets> ok
Kakadu has quit [Ping timeout: 246 seconds]
snearch has joined #ocaml
<wmeyer> ah sorry. I always remembered to close a bracket in C, but somewhat not today
* wmeyer - tea time
thomasga has quit [Quit: Leaving.]
jcao219 has quit [Ping timeout: 264 seconds]
malo has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
UncleVasya has quit [Read error: Connection reset by peer]
UncleVasya has joined #ocaml
gautamc has quit [Ping timeout: 256 seconds]
mcclurmc has joined #ocaml
tane has quit [Quit: Verlassend]
Neros has joined #ocaml
malo has quit [Quit: Leaving]
raichoo has quit [Quit: leaving]
jcao219 has joined #ocaml
gautamc has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
jcao219 has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 264 seconds]
chrisdotcode has quit [Read error: Connection reset by peer]
breakds has joined #ocaml
ulfdoz has quit [Ping timeout: 256 seconds]
snearch has quit [Quit: Verlassend]
whitequark is now known as WHITEQUARK
WHITEQUARK is now known as whitequark
<MarcWeber> What does this 'a mean here exactly? Are those all polymorphic functions?
gautamc has quit [Read error: Connection reset by peer]
<MarcWeber> If so how does the type annotation look like for the find_all function in the implemntation file?
gautamc has joined #ocaml
<whitequark> it is not necessary to annotate implementations
<MarcWeber> whitequark: http://dpaste.com/1274215/ line 32
<MarcWeber> After the filter adds this tracing line it is.
<Drup> those underscore in the type means it has to be a monomorphic type
<MarcWeber> values don't match:
<MarcWeber> || val find_all : ('_a -> bool) -> '_a array -> '_a array
<MarcWeber> || val find_all : ('a -> bool) -> 'a array -> 'a array
<Drup> so it's *not* polymorphic, as soon as the compiler can specialized a '_a type, it will do it
<Drup> (not sure what you're doing however, so I can't really help)
<MarcWeber> Drup: I'm running a filter on the code to trace every step which can be executed.
<Drup> I understood that, I meant for this error specifically
<MarcWeber> http://dpaste.com/1274571/ line 213
<MarcWeber> And that does no longer compile (giving the error above)
<MarcWeber> ignore the type annotation, it was an attempt by me to make it compile.
<MarcWeber> Adding parameters fixes it ..
<Drup> I was going to propose just that :)
<MarcWeber> but that does not work in the empty case.
<MarcWeber> In that case adding the type helped.
<MarcWeber> I just don't understand why.
<Drup> what is the error with empty ?
<MarcWeber> I can no longer reproduce it?
<Drup> MarcWeber: about the find_all/filter problem, this is because of a limitation in caml (and in the ML family in general, I think) : For a type variable to be generalized, it must appears in a binding, so the type checker can not generalized type variables in an expression like "let f = g"
<Drup> This is called the value restriction, the reason are quite technical and I'm not the best person to explain you that, so I will let you ask more competent people if you want details
<MarcWeber> A workaround is good eonugh .. :)
<Drup> the workaround is basically "add all the arguments", it's often enough.
<Drup> I guess forcing polymorphism with a type annotation is not enough ? :x
<MarcWeber> adding 'a 'b. to the .ml file:
<MarcWeber> Error: This definition has type 'b. ('a, 'b) t which is less general than 'b 'a0. ('a0, 'b) t
jbrown__ has quit [Remote host closed the connection]
<MarcWeber> val empty : 'a 'b. ('a, 'b) t
<MarcWeber> syntax error ?
<Drup> did you add it in th .ml or the .mli ?
<MarcWeber> both
<MarcWeber> First .ml, then .mli
<MarcWeber> but the .mli causes the syntax error
<MarcWeber> contains Makefile, m.ml and m.mli
<MarcWeber> Because I don't know I should ask the mailinglist eventually.
<Drup> the syntax error is normal
<Drup> about the type, I don't know, sorry :/
<MarcWeber> Don't feel sorry. You've tried and offered me everything you have: your time.
<mfp> MarcWeber: doing cmp : 'k. 'k -> 'k -> int; makes it type (here)