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/
<wmeyer> pippijn: how to build that? You changed the build system.
<pippijn> oh
<pippijn> well
<pippijn> I don't know :)
<wmeyer> it's funk how your ecosystem works :D before I start working on my codebase I will need to install whole bunch of single man developments :D
<pippijn> wmeyer: do you want to build it now?
<wmeyer> it would be great if I could, but no real press!
<pippijn> ok
<pippijn> let's try it
<pippijn> get pippijn/obuild
<pippijn> don't get the submodules
<pippijn> tell me when you did that
<wmeyer> are you aware that there is another project called obuild?
<pippijn> no
<pippijn> but it doesn't matter
<pippijn> it's not a fixed name
<pippijn> it's just a collection of omakefiles
<wmeyer> ok what next?
<pippijn> delete all subdirs in src/
<pippijn> and put treematch in it
* pippijn tries this
<pippijn> wmeyer: don't delete the OMakefile in src/
<wmeyer> ok i have done that, is symlinking OK?
<pippijn> maybe
<wmeyer> ok i copied
<pippijn> no, I don't think so
<pippijn> if you symlink, you need to change the OMakefile
<pippijn> because it traverses directories
<pippijn> actually I don't know
<pippijn> try it :)
<wmeyer> too late :)
<pippijn> ok
n06rin has joined #ocaml
<wmeyer> shall I just type omake
<pippijn> then you also need baselib
<wmeyer> what will happen
<pippijn> not much
<pippijn> it will fail
<pippijn> get pippijn/baselib
<pippijn> put it next to treematch
<pippijn> then omake
<wmeyer> should I drop it somewhere
<wmeyer> in src?
<pippijn> yes
<pippijn> next to treematch
<pippijn> $ ls src
<pippijn> baselib/ treematch/ OMakefile
<wmeyer> Ok
<wmeyer> i did that
<pippijn> then omake
Neros has quit [Quit: No Ping reply in 180 seconds.]
Neros has joined #ocaml
<wmeyer> this is what happened: http://pastebin.com/r342d2z9
<pippijn> you have no noweb
<wmeyer> seems like many packages are missing
<wmeyer> but do I need noweb?
<pippijn> the programs are not needed
<pippijn> "yes"
<pippijn> but
<wmeyer> I will install it with a pleasure
<wmeyer> maybe i will convert treematch to noweb
<pippijn> I can give you a tangled version of levenshtein.ml
<pippijn> or just install it then :)
<wmeyer> does vim can develop with noweb
<pippijn> yes
<wmeyer> sorry can you develop with noweb in vim
<wmeyer> that's what I meant
<pippijn> I got it
<pippijn> wmeyer: 1) https://paste.xinu.at/36PQwj/
<wmeyer> stull fails
<pippijn> wmeyer: 2) https://paste.xinu.at/i6DU/
<wmeyer> that's really nice
<pippijn> wmeyer: same error?
<pippijn> omake --configure
<wmeyer> leventhein hasn't been tangled
<wmeyer> oh now it can build parser.cmo that means menhir is required
<wmeyer> (it would be good to have more sane error messages)
<pippijn> sure
dsheets_ has joined #ocaml
<pippijn> unfortunately, making build systems is not my main interest
<wmeyer> I though you love it
<wmeyer> (:
<pippijn> hehe
<wmeyer> sorry, joke, your omake stuff is really neat!
<wmeyer> now i am installing sexplib via opam
<pippijn> sorry, baselib depends on that and deriving-ocsigen
<pippijn> corelib (in baselib) can be used in js_of_ocaml
<wmeyer> <wmeyer> this is what happened: http://pastebin.com/r342d2z9 [01:15]
<wmeyer> <pippijn> you have no noweb
<wmeyer> <wmeyer> seems like many packages are missing [01:16]
<wmeyer> <wmeyer> but do I need noweb?
<wmeyer> <pippijn> the programs are not needed
<wmeyer> <pippijn> "yes"
<wmeyer> <pippijn> but
<wmeyer> <wmeyer> I will install it with a pleasure
<wmeyer> <wmeyer> maybe i will convert treematch to noweb
<wmeyer> <pippijn> I can give you a tangled version of levenshtein.ml
<wmeyer> <pippijn> or just install it then :)
<wmeyer> <wmeyer> does vim can develop with noweb [01:17]
<pippijn> oops?
<wmeyer> <pippijn> yes
<wmeyer> <wmeyer> sorry can you develop with noweb in vim
<wmeyer> <wmeyer> that's what I meant
<wmeyer> <pippijn> I got it [01:18]
<wmeyer> <pippijn> wmeyer: 1) https://paste.xinu.at/36PQwj/
<wmeyer> <wmeyer> stull fails
<wmeyer> <pippijn> wmeyer: 2) https://paste.xinu.at/i6DU/
<wmeyer> <wmeyer> that's really nice [01:19]
<wmeyer> <pippijn> wmeyer: same error?
<wmeyer> <pippijn> omake --configure
<wmeyer> <wmeyer> leventhein hasn't been tangled
<wmeyer> <wmeyer> oh now it can build parser.cmo that means menhir is required [01:20]
<wmeyer> <wmeyer> (it would be good to have more sane error messages)
<wmeyer> <pippijn> sure
<wmeyer> *** dsheets_ (~dsheets@216.9.110.9) has joined channel #ocaml
<wmeyer> <pippijn> unfortunately, making build systems is not my main interest
<wmeyer> <wmeyer> I though you love it
<wmeyer> <wmeyer> (:
<wmeyer> <pippijn> hehe
<wmeyer> <wmeyer> sorry, joke, your omake stuff is really neat! [01:23]
<wmeyer> <wmeyer> now i am installing sexplib via opam
<wmeyer> <pippijn> sorry, baselib depends on that and deriving-ocsigen [01:25]
<wmeyer> <pippijn> corelib (in baselib) can be used in js_of_ocaml
<wmeyer> ERC> <wmeyer> this is what happened: http://pastebin.com/r342d2z9 [01:15]
<wmeyer> <pippijn> you have no noweb
<wmeyer> <wmeyer> seems like many packages are missing [01:16]
<wmeyer> <wmeyer> but do I need noweb?
<wmeyer> <pippijn> the programs are not needed
<wmeyer> <pippijn> "yes"
<wmeyer> <pippijn> but
<wmeyer> <wmeyer> I will install it with a pleasure
<wmeyer> <wmeyer> maybe i will convert treematch to noweb
<wmeyer> <pippijn> I can give you a tangled version of levenshtein.ml
<wmeyer> <pippijn> or just install it then :)
<wmeyer> <wmeyer> does vim can develop with noweb [01:17]
<wmeyer> <pippijn> yes
<wmeyer> <wmeyer> sorry can you develop with noweb in vim
<wmeyer> <wmeyer> that's what I meant
<wmeyer> <pippijn> I got it [01:18]
<wmeyer> <pippijn> wmeyer: 1) https://paste.xinu.at/36PQwj/
<wmeyer> <wmeyer> stull fails
<wmeyer> <pippijn> wmeyer: 2) https://paste.xinu.at/i6DU/
wmeyer has quit [Remote host closed the connection]
wmeyer has joined #ocaml
dsheets_ has quit [Read error: Operation timed out]
breakds has quit [Quit: Konversation terminated!]
<wmeyer> yoohoo trematch build
<wmeyer> built
<wmeyer> it was almost flawless pippijn
<wmeyer> just need for your librarires
<pippijn> and the c++ flag
<wmeyer> yes and the c++ flag
<pippijn> someday I'll have flag compatibility detection
<pippijn> easy to do, I'm just lazy
<wmeyer> OK looks good
Drup has quit [Quit: Leaving.]
<wmeyer> pippijn: what is stopping you at the moment?
<pippijn> stopping me?
<pippijn> nothing
<pippijn> I'm coding
<wmeyer> no no, i mean in treematch, what would be a feature you want, i ran ditz and it helps. From what I think would be good is to make treematch closer to k-framework
n06rin has quit [Quit: Leaving.]
<pippijn> yeah
<pippijn> I don't know what treematch needs now
<pippijn> I want to declaratively specify C semantics
<pippijn> static semantics first
<pippijn> treematch is supposed to help in compiler construction
<pippijn> what does a compiler need?
<pippijn> - parser (got it already)
<pippijn> - semcheck (treematch?)
<pippijn> - transformations and IRs
<pippijn> - codegen
<wmeyer> well we both know it what we need
<wmeyer> I can take treematch, but I don't expect having too much time on the rest :)
* wmeyer sneaks silently to bed.
<pippijn> :)
<wmeyer> but thanks I am going to look at the semantics part
<wmeyer> the idea is to make it as declarative as K-framework but with few extrans and performance
<pippijn> yes
<pippijn> that would be awesome
tchell has quit [Ping timeout: 264 seconds]
tchell has joined #ocaml
<wmeyer> plus this build a compiler so so don't need full semantics
<wmeyer> for an interpreter you need full semantics, for the compiler just enough to make the transformation possible
<pippijn> sure
<pippijn> but
<pippijn> what about constant evaluation?
<wmeyer> still not full semantic
<wmeyer> semantics*
<pippijn> not in C
<pippijn> but consider this:
talzeus has quit [Remote host closed the connection]
<pippijn> int square (int a) { return a * a; } char buf[square (3)];
<pippijn> if you want to allow arbitrary computations in constant functions, you need a pretty large part of the semantics
<wmeyer> not really, as this can be done at init when the program is executed
<pippijn> no
<wmeyer> you want this to be static?
<pippijn> sizeof is a compile time operator
<wmeyer> at compile time?
<pippijn> yes
<wmeyer> well, the declaration of the array tells me that
<wmeyer> and I though you want this to be static
<wmeyer> however I'd then advise to do such thing
<wmeyer> int square (int a) { return a * a; } char buf[$square (3)$];
<wmeyer> to ensure that the stages are separated
<wmeyer> and don't depend on the syntax
<pippijn> why $$?
<pippijn> why does it need to be special?
<wmeyer> it tells to force the chunk of code to be evaulated in the level before
<pippijn> but we already know that
<wmeyer> because then, how do the frontend knows that it has to be evaulauted
<wmeyer> it knows from the syntax
<wmeyer> user probably too
<pippijn> because array bounds require compile time constant expressions
<wmeyer> so I'd suggest something better than macros
<wmeyer> of course I do understand it
<pippijn> no need for $$
<wmeyer> but it's hardcoded and not syntacticaly districtive
<wmeyer> what if we have something like this
<wmeyer> char * p = new char[ square(3) ];
<wmeyer> now it's less clear if you want to force square(3) :)
<pippijn> you know it from the syntax
<wmeyer> however the compiler will probably inline this anyway
<pippijn> NewDeclarator does not require compile time constants
<pippijn> it's a simple match to find out
<wmeyer> I understand it, but it's not clear for somebody who learns C++ :)
<wmeyer> that's what I think
<wmeyer> if you put it into $ $ it becomes immediately clear
<pippijn> is that your rationale?
<wmeyer> yes, that's my rationale
<pippijn> there is no other reason?
<wmeyer> C++ is full of flowers like this
<wmeyer> (I did understand on the first glance what you meant, but in this case I'd rather be explicit)
<pippijn> ok
<pippijn> but
<pippijn> we could specify the semantics to be dynamic, always
<pippijn> and simply perform as much static evaluation as possible
<wmeyer> oh you want partial evaulator
<wmeyer> like MLton
<wmeyer> well, yes that's nice
<wmeyer> but in this case, you have to do this
<wmeyer> what if you have
Neros_ has joined #ocaml
<wmeyer> int x; char buf[ sqrt(x) ];
<wmeyer> or
Neros has quit [Ping timeout: 264 seconds]
<wmeyer> int x; <object that updates in the constructor x>; char buf[ sqrt(x) ];
<pippijn> right
<wmeyer> it becomes blurry!
<pippijn> I think
<pippijn> constant functions should be constant
<pippijn> pure
<pippijn> even if they have side effects inside
<pippijn> but no globally visible side effects
<wmeyer> that's fine, then all the arguments should be constant?
<pippijn> hmm
<wmeyer> then it's quite limited but still nice
<pippijn> no
<pippijn> it can modify pointers
<pippijn> but no global variables can be passed
<pippijn> then it's no longer a constant call
<wmeyer> what could be nice in C++ is to depend on template arguments and enums :)
<wmeyer> and consts
<pippijn> basically a generalised constexpr
<pippijn> D has cool compile time stuff
<wmeyer> I'd rather remove need of static stuff in C++, let's say in ocaml you say
turnersr has joined #ocaml
<wmeyer> let array = let a = Array.create 42 "foo" in Array.iteri (fun x i -> a.(i) <- x ^ bar) a; a;;
<wmeyer> and this will be inited at runtime
<wmeyer> no static bss section no fear
<wmeyer> it has penalty
<wmeyer> of course
<wmeyer> but then again compiler can do some trick to make it faster
<wmeyer> so the source of the problem is not static <-> dynamic interaction, but rather that the arrays should have compile time known size in C
<pippijn> partial evaluation would be nice
<pippijn> you can evaluate everything up to the point where non-deterministic input comes into the picture
<pippijn> argv/IO
<wmeyer> yes
<wmeyer> but that's a different storry
<wmeyer> I can ensure that you can't do it in C++ to large extent
<wmeyer> ad the semantics are unspecified in many cases
<pippijn> type-checking C++ requires a data model
<pippijn> so you need to specify unspecified semantics, anyway
<wmeyer> I don't think you can partially evaulate C++ programs to the extent you would be happy :)
<wmeyer> design your C subset so it's possible!
mfp has quit [Ping timeout: 246 seconds]
<wmeyer> I am going to bed now pippijn (being sceptical from many angles about this to be honest)
madroach has quit [Ping timeout: 264 seconds]
<pippijn> hehe
<pippijn> wmeyer: don't worry about it
<pippijn> static semantics are more interesting
<wmeyer> pippijn: i try not to be worried at the moment :)
<pippijn> to me
<pippijn> I don't need a partial evaluator
<wmeyer> OK, let's see what we can squeze from treematch
madroach has joined #ocaml
* wmeyer wishes everybody good night
<pippijn> good night
<pippijn> wmeyer: still there?
<wmeyer> yes
<wmeyer> nice
<pippijn> I was getting tired of the discrepancies between cpapa and the glr test parsers (arith, ambig, scannerless)
<pippijn> it's the new Easy module
<pippijn> Frontend
<pippijn> so now improvements to that will go to all parsers that use the Frontend module
Neros_ has quit [Remote host closed the connection]
<pippijn> also, I just updated Cmdline.run with an optional args list
<pippijn> so that code can prepend some default arguments to the user provided arguments in Sys.argv
<pippijn> for example to enable some things in baselib etc.
talzeus has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
<wmeyer> I like that it's all functorised
<wmeyer> and I wish Caml compiler could do more optimisations
<pippijn> yes
<pippijn> would be nice
<pippijn> this is weird
<pippijn> I get memory corruption
<pippijn> from the untyped ptree
oriba has quit [Quit: oriba]
q66 has quit [Quit: Leaving]
<pippijn> wmeyer: ok, I like your document
<pippijn> too bad I can't check it with valgrind
<pippijn> oh, I know why
<pippijn> this is kind of dangerous.. that's not nice
<pippijn> my code is unsafe :\
pkrnj has quit [Quit: Computer has gone to sleep.]
weie has quit [Quit: Leaving...]
mrvn has quit [Ping timeout: 260 seconds]
mrvn has joined #ocaml
<pippijn> wmeyer: didn't you have some JIT thing for ocaml?
<pippijn> maybe I can use hlvm
<pippijn> ok, hlvm can't call back into ocaml
darkf has joined #ocaml
tov has joined #ocaml
csakatoku has joined #ocaml
venk` has joined #ocaml
venk`` has joined #ocaml
venk has quit [Ping timeout: 245 seconds]
venk` has quit [Ping timeout: 245 seconds]
venk``` has joined #ocaml
venk`` has quit [Ping timeout: 245 seconds]
tianon has quit [Read error: Operation timed out]
void64 has quit [Ping timeout: 246 seconds]
tianon has joined #ocaml
contempt has joined #ocaml
yacks has quit [Read error: Operation timed out]
yacks has joined #ocaml
ggole has joined #ocaml
Arsenik has joined #ocaml
cyanure__ has joined #ocaml
yacks has quit [Quit: Leaving]
ollehar has joined #ocaml
ousado has joined #ocaml
weie has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
<adrien> morning
turnersr has quit [Quit: Leaving]
csakatok_ has joined #ocaml
Simn has joined #ocaml
ttamttam has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
skchrko has joined #ocaml
pkrnj has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
cago has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
djcoin has joined #ocaml
Arsenik has quit [Quit: Quitte]
cyanure__ has quit [Remote host closed the connection]
Arsenik has joined #ocaml
Arsenik has quit [Remote host closed the connection]
thomasga has joined #ocaml
eikke has joined #ocaml
tobiasBora has joined #ocaml
mort___ has joined #ocaml
<gasche> I'm just back from one week without a laptopt or internet access
<gasche> (but apparently I still automatically complete "op" into "opt")
<gasche> the flood of emails and other news is exhausting
<gasche> I was expecting an OCaml release to have happened last week, but apparently it's yet to come -- very soon
penryu has joined #ocaml
<gasche> def-lkb: I just saw that you changed the Merlin protocol implementation to use a GADT internally
<gasche> it's nice, and it's something I've been planning to do myself for a few weeks now
<gasche> (but I hadn't because there was no good rationale for the change, except "it looks nicer", which is no good reason to touch code that works)
<rks`> well, we had been talking about it as well
<rks`> but didn't do it because the protocol was still changing a lot
<rks`> but since more people start to have a look at merlin, it seemed like a thing we should do to make the thing more accessible
<gasche> agreed
<gasche> and the code mixing JSON parsing and request handling was ugly
<gasche> hm
<gasche> for a little story, when my girlfriend asked me to explain what GADTs are, I used precisely the merlin protocol use-case as a good usage case
<rks`> :D
<penryu> reading through RWO, what is the significance of explicitly labelling and using the ~f label for List.map and friends, even when the func argument always appears in the same place it would anyway?
<def-lkb> gasche: Thanks. This typed version is not yet perfect, the tell command need slightly more expressivity than what current gadt type allows
<penryu> ie, why "List.map -f:foo xs" instead of "List.map foo xs"?
<adrien_oww> you can do
<adrien_oww> List(Labels).map list ~f:(fun e -> ...)
<penryu> right. and when I first picked up some ocaml a year or so ago, this was the common practice.
mfp has joined #ocaml
<adrien_oww> and ~f can be on multiple lines
<penryu> but in RWO, ~f: appears everywhere. I'm just wondering what the reasoning behind the extra, apparently superfluous typing is.
Kakadu has joined #ocaml
<penryu> adrien_oww: I'm not sure I understand your last statement
<ggole> It's a convention to indicate a function argument.
<penryu> a convention of Core? since without Core.Std, it's an error?
<ggole> The convention is wider than that: it's in the stdlib, at least.
<adrien_oww> penryu: with it you can write:
<adrien_oww> ListLabels.map your_list ~f:(fun e ->
<adrien_oww> start_doing some action with_e;
<adrien_oww> that does not fit on only one line;
<adrien_oww> and_other things
<adrien_oww> )
<adrien_oww> at least, that's how I use it
<penryu> ggole: the ~f label is defined in stdlib?
<rks`> same as well adrien_oww.
<adrien_oww> in ListLabels
<adrien_oww> (instead of List)
<penryu> ah
<ggole> penryu: the stdlib has various labelled modules, and they all use that convention
<penryu> ok. I've nothing against being explicit, and f makes a great deal of sense as a label.
<ggole> I would prefer pred or test in cases where that would make sense
<penryu> but adrien_oww's example is the best practical advantage I've seen
<ggole> But that's nitpicking.
<penryu> is it Core that backports the ListLabels to List module, and others?
<ggole> Core attaches labels in more places, yes.
<penryu> cool. thanks.
<ggole> I'm not sure if would be classified as a 'backport', as Core adds a bunch of other stuff too.
<penryu> I see
zpe has joined #ocaml
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
void64 has joined #ocaml
ivan\ has joined #ocaml
Kakadu has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
_andre has joined #ocaml
q66 has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
talzeus has quit [Remote host closed the connection]
n06rin has joined #ocaml
ben_zen has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
void64 has quit [Ping timeout: 245 seconds]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
chambart has joined #ocaml
skchrko has quit [Quit: Leaving]
void64 has joined #ocaml
Drup has joined #ocaml
csakatoku has quit [Remote host closed the connection]
skchrko has joined #ocaml
AltGr has joined #ocaml
ggole has quit [Ping timeout: 249 seconds]
chambart has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
chambart has joined #ocaml
ben_zen has joined #ocaml
n06rin has quit [Read error: Connection reset by peer]
n06rin has joined #ocaml
talzeus has joined #ocaml
turnersr has joined #ocaml
darkf has quit [Quit: Leaving]
chambart has quit [Ping timeout: 240 seconds]
cago has left #ocaml []
yacks has quit [Ping timeout: 260 seconds]
void64 has quit [Ping timeout: 260 seconds]
hkBst has quit [Quit: Konversation terminated!]
<pippijn> wmeyer: you there?
yacks has joined #ocaml
ben_zen has quit [Quit: leaving]
ollehar has joined #ocaml
shinnya has joined #ocaml
void64 has joined #ocaml
chambart has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
thomasga has quit [Quit: Leaving.]
ttamttam has quit [Quit: ttamttam]
ollehar has joined #ocaml
mcsquiggedy has quit [Ping timeout: 268 seconds]
talzeus has quit [Remote host closed the connection]
transfinite has joined #ocaml
mcsquiggedy has joined #ocaml
AltGr has quit [Quit: Konversation terminated!]
zpe has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 246 seconds]
tane has joined #ocaml
mcsquiggedy has quit [Read error: Connection reset by peer]
mcsquiggedy has joined #ocaml
ygrek has joined #ocaml
tane has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 264 seconds]
mcsquiggedy has quit [Read error: Connection reset by peer]
tane has joined #ocaml
palomer has joined #ocaml
madroach has joined #ocaml
<palomer> what's the most used public key cryptography library in ocaml?
<adrien_oww> cryptokit?
n06rin has quit [Quit: Leaving.]
thomasga has joined #ocaml
mort___ has quit [Ping timeout: 245 seconds]
hcarty has quit [Ping timeout: 248 seconds]
zpe has joined #ocaml
hcarty has joined #ocaml
hcarty has quit [Ping timeout: 245 seconds]
hcarty has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<wmeyer> pippijn: yep
<pippijn> better? :)
<pippijn> that's what you asked for, right?
derek_c has joined #ocaml
derek_c has quit [Client Quit]
derek_c has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
Kakadu has quit [Quit: Page closed]
zpe has quit [Ping timeout: 245 seconds]
<palomer> what's the simplest utf8 library for ocaml?
<pippijn> palomer: what does it need to do?
<pippijn> and what does "simple" mean?
<pippijn> the simplest is probably ucslib
<pippijn> but it's not finished
<pippijn> then, BatUTF8
<palomer> I just need things like string equality and stripping (which I'm willing to implement myself)
<pippijn> string equality is highly non-trivial
<palomer> that's what worries me
<pippijn> you need to decode it and perform combiner collapsing
<pippijn> for example
<pippijn> ä = ä
<pippijn> but bytewise comparison yields false
<palomer> ah yes, I'll need to normalize the strings fo search
<pippijn> # "ä" = "ä";;
<pippijn> - : bool = false
<palomer> guess I'll have to use camomile
<pippijn> yes
<palomer> which hasn't been updated since 2011 :/
<pippijn> it's fine
<pippijn> I would like to advertise ucslib, but you need something bigger
<pippijn> you're not asking for utf8, you're asking for unicode
derek_c has quit [Ping timeout: 260 seconds]
<palomer> doesn't let you collapse?
<pippijn> ucslib is actually utflib for now (only implementing transfer formats), it doesn't have case folding etc. yet
<pippijn> no, it doesn't do that yet
<ggole> Unicode :(
<pippijn> but that support is planned
<pippijn> ggole: unicode is crap
<palomer> I'm scared of using batteries because it seems huge
<pippijn> it's a failed standard
derek_c has joined #ocaml
<pippijn> palomer: don't be afraid of it
<ggole> But there's nothing else.
<ggole> So that's what we get.
<pippijn> yeah
<pippijn> it's basically useless in china and japan
<palomer> pippijn: how so?
<ggole> They don't use it. They have their own character sets.
<pippijn> exactly
<pippijn> and why?
<pippijn> because it's useless
<palomer> how is it an inferior choice for japanese?
<ggole> With a dash of political reasons, but yeah.
<pippijn> palomer: because you still need to know what language you're displaying
<pippijn> you need language tags
yacks has quit [Ping timeout: 245 seconds]
derek_c has quit [Client Quit]
<pippijn> it's great for western languages, cyrillic etc.
<pippijn> palomer: I suppose it's not really inferior, it's just useless and a waste of space
watermind has joined #ocaml
yacks has joined #ocaml
zpe has joined #ocaml
ben_zen has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
<whitequark> calling unicode failed is... uh... a bit of stretch
<adrien> pippijn: and how do they mix several encodings in a single document?
<adrien> because that's the main reason for unicode
palomer has quit [Ping timeout: 245 seconds]
yacks has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
zpe has joined #ocaml
Neros has joined #ocaml
Arsenik has joined #ocaml
yacks has quit [Ping timeout: 245 seconds]
Arsenik has quit [Ping timeout: 240 seconds]
cyocum has joined #ocaml
<cyocum> hi does anyone here know much about pgocaml?
yacks has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
<ggole> Are there facilities to print a Unix.tm?
<adrien> you can define your own function fairly easily
<adrien> or do you want a specific format?
<adrien> if you want to do fancy stuff with dates, look at the Calendar library
<ggole> Hmm, ok
<ggole> I was expecting something like a little wrapper around asctime
<cyocum> I was wondering in pgocaml if you have a monad how do you get your information out of the monad?
Arsenik has joined #ocaml
<cyocum> does anyone know how to downgrade a package on opam?
<Drup> opam install the_thing.13.3.7
<cyocum> ok
<cyocum> thanks
zpe has joined #ocaml
carleastlund has joined #ocaml
yacks has quit [Read error: Operation timed out]
zpe has quit [Ping timeout: 240 seconds]
Arsenik has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
<pippijn> adrien: did you read the q/a I posted?
<adrien> yes, I don't understand how that makes unicode a failure though
<pippijn> well
<pippijn> it does what it was made for
<pippijn> encode characters
<mrvn> that it doesn't uniquely encodes text sucks majorly.
<pippijn> right
<pippijn> if you have a website written in japanese
Arsenik has joined #ocaml
<pippijn> and the language setting is chinese, then the japanese person can't read it
<adrien> how does that differ from usual?
<mrvn> Why would a japanese person set language to chinese?
<pippijn> mrvn: he could be using a public computer
<pippijn> the point is: he needs to set the language
<pippijn> adrien: it would be like, if you set the language to german, then suddenly all "p" in your english text become "pf"
<mrvn> the point of unicoide is that he can set the language
<pippijn> mrvn: and if you set the language, then suddenly all the characters look different
<pippijn> that's the point of unicode?
<mrvn> pippijn: oehm, no. they shouldn't.
<pippijn> they do
<mrvn> pippijn: at least in utf-8 or ucs32 encoding.
<pippijn> no
<pippijn> they do
<pippijn> western characters don't, but han characters do
<Obfuscate> The site should be setting the language anyways: not the user.
<mrvn> Obfuscate: wrong
<pippijn> still missing the point
<mrvn> pippijn: I thought only ucs16 had those stupid mode pages.
<pippijn> mrvn: it's better now, but http://www.unicode.org/faq/han_cjk.html#3
milosn has joined #ocaml
<pippijn> character != glyph
<flux> 4.01.0 sure has many fixes
<pippijn> you need a japanese font to display japanese text properly
<flux> (RC1 that is)
<flux> who would think ocaml even has so many bugs?-)
<pippijn> and a lot of chinese characters are not in the japanese font, so when you display a text and don't know what language it is, you'll find that a lot is missing
<Obfuscate> mrvn: What's a reason why a site should not be sending language information in the headers?
<mrvn> pippijn: That is a bit like different fonts though.
<pippijn> so then you start guessing the language and find, oh, it's probably chinese
<pippijn> so we need to switch fonts
<mrvn> Obfuscate: The site should use the language the user requested.
<pippijn> mrvn: why would you need different fonts in the first place?
<mrvn> pippijn: because even 32bit aren't enough to include every font in existance, not to mention future fonts.
<pippijn> you should need different fonts for making the same thing look different, for aesthetic reasons
<Obfuscate> mrvn: That's not an answer to my question, although it might have been a valid response to a misinterpretation of my first statement.
<pippijn> but han characters look different with different meanings
<mrvn> pippijn: that isn't what your url says.
<pippijn> making it hard or impossible to read
<flux> cool, http://caml.inria.fr/mantis/view.php?id=5864 will allow more uses of Set
<pippijn> ok
<pippijn> I'll boil it down to this point
<flux> although it's not quite perfect for that use, as you now need a fake object to search (which can be difficult to construct)
<pippijn> it should be possible to produce one font that allows you to print text readable to anyone who knows the language it's written in
zpe has joined #ocaml
<pippijn> so if you have a japanese text, you can print it with that font, and a chinese text which you can print with the same text
<mrvn> pippijn: your url says the han charachters are the same just drawn differently depending on local customes but people will understand the char even if drawn differently. So it's like Time New Roman vs Courrier.
<pippijn> ok
<pippijn> then the url is wrong
<mrvn> pippijn: possible. You need a different one to support your argument then.
<pippijn> I don't have another url
<pippijn> only own and other people's experience
<mrvn> "Han Unification is designed to preserve legibility. Documents typically can be simply displayed in the font preferred by the user." But maybe that has failed.
<pippijn> (educated) japanese people who can't read a japanese text because the text mode was chinese
<pippijn> the font was chinese
<pippijn> consider Times New Roman, which is readable to everyone who knows latin characters and arabic numerals
<mrvn> well, don't use that font then. If I use a greek font to display my ascii text I can't read it too.
<pippijn> exactly
<mrvn> I don't quite see how you make that a fault of unicode.
<pippijn> so if a is displayed as α
<pippijn> that's bad :)
<pippijn> mrvn: the point is, there is *no* font that can display a text in chinese *and* a text in japanese
<Drup> mrvn: the point he is trying to make is that the differienciation between the (apparently) different set of character should be at the encoding level, not at the font one.
<pippijn> that's what I thought the point of unicode is
<mrvn> Drup: the character is the same, the glyph differs.
<pippijn> so that you don't need to select an english font
<pippijn> if you want to read an english document
<mrvn> Only problem I see is that sometimes you want both glyphs in the same text. E.g. in the text describing the differences of the glyph in japanses and chinese rendering.
<pippijn> if the glyph is sufficiently different that people can't read it, I consider it different
<pippijn> I don't know examples of this personally, just from japanese people
<mrvn> Personally I would throw away all those chinese and japanese glyphs and stick with latin.
<pippijn> :)
<mrvn> utf8/ucs32 is such a pain to deal with.
<pippijn> ucs4*
<adrien> I'd throw away the germans too :P
<mrvn> wastes tons of memory, is dead slow and 99.999999999999% I don't need it.
<pippijn> utf8 doesn't waste memory on latin texts
<pippijn> it does on german texts
<pippijn> ä
<mrvn> pippijn: you need to store the number of bytes and chars of a string. wastes memory.
<pippijn> c3 a4 or something
<pippijn> mrvn: why do you need to do that?
<mrvn> or compute it every time. same difference.
<mrvn> see dead slow
<pippijn> utf8 works fine as null-terminated
zpe has quit [Ping timeout: 245 seconds]
<mrvn> pippijn: then please replace the 3rd char in the string
<pippijn> that's an O(n) thing, yes
<mrvn> it's O(1) in latin
<pippijn> if you want O(1) indexing in utf8, that's sad
<pippijn> you need to store offsets
<mrvn> or use ucs32
<pippijn> and at that point you might as well store ucs4
<mrvn> but wait, even that isn't enough
<pippijn> mrvn: utf32 or ucs4
<pippijn> right, that's not enough
<pippijn> welcome combiners
<mrvn> and then you can't simply compare to utf-8 strings. you have to normalize them first
<pippijn> same for ucs4
<pippijn> 19:24 < pippijn> # "ä" = "ä";;
<pippijn> 19:24 < pippijn> - : bool = false
<mrvn> is that "a and ä?
<pippijn> yes
<mrvn> Seriously. Who thought "a was a good idea if you already have ä?
<pippijn> maybe for p̈
<mrvn> If there is a "p then make a char for it
<pippijn> I don't know
<pippijn> I think I disagree
<pippijn> they did that to korean
<mrvn> or if you allow "a then don't make a Ä
<pippijn> and indic
<pippijn> korean characters could be a base character and combiners
<pippijn> very easily
<pippijn> but no, they put in every single combination
<mrvn> having both just means equal utf-8 can fail to compare in non utf-8 aware code.
<pippijn> most code is not unicode-aware
<pippijn> even when using utf-8 strings
<mrvn> and will fail,. like ocaml above
<pippijn> does camomile normalise?
ollehar has quit [Quit: ollehar]
<mrvn> I wonder, what is the longest utf8 char you can make with combines?
<pippijn> infinite
<pippijn> you can add the same combiner over and over
<pippijn> # String.length "a̢̡͓͍̱̺͉͙̪͔̰̮̭̘̹̲ͭ̐̿̌̀͌͢";;
<pippijn> - : int = 59
<mrvn> the fun continues
<mrvn> "a???"
<pippijn> "a̢̡͓͍̱͓̺͉͉͙̪͔̰̮̺̭̘̹͉̲̪ͭ̐̿̌̿̀͌͢"
<mrvn> looks like 4 to me
<Drup> mrvn: bad font :)
<pippijn> a + lots of crap
<mrvn> transscribed to latin-1
<Drup> pippijn: you should do art pieces with that
<mrvn> a???
<pippijn> # String.iter (fun c -> Printf.printf "%d;" (Char.code c)) "a̢̡͓͍̱̺͉͙̪͔̰̮̭̘̹̲ͭ̐̿̌̀͌͢";;
<pippijn> 97;205;173;204;144;204;191;204;140;204;191;204;128;205;140;205;162;204;162;204;161;205;147;205;141;204;177;205;147;204;186;205;137;205;137;205;153;204;170;205;148;204;176;204;174;204;186;204;173;204;152;204;185;205;137;204;178;204;170;- : unit = ()
<pippijn> yeah
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
walter|r has joined #ocaml
ggole has quit []
cyocum has quit [Quit: Leaving]
testcocoon has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
Simn has quit [Quit: Leaving]
tani has joined #ocaml
tane has quit [Ping timeout: 260 seconds]
thomasga has quit [Ping timeout: 246 seconds]
palomer has joined #ocaml
zpe has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
wmeyer has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
testcocoon has joined #ocaml
milosn has joined #ocaml
milosn_ has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 245 seconds]
wmeyer has joined #ocaml
_andre has quit [Quit: leaving]
<wmeyer> hi all
<pippijn> hi
<wmeyer> hi pippijn \o
<pippijn> did you see the obuild thing?
tani has quit [Quit: Verlassend]
<pippijn> ok, I guess you really don't want to see it :P
<wmeyer> pippijn: I love to :P no, really I want :-)
dsheets_ has joined #ocaml
<wmeyer> hi dsheets_
<wmeyer> pippijn: I will build it with ocamlbuild anyway
<wmeyer> I want this to be detached from your build system
zpe has joined #ocaml
<wmeyer> because most users will not have this infrastructure
<wmeyer> that means I have to prep a script that fetches your dependencies
<wmeyer> or create an OPAM repo
<pippijn> feel free to add an ocamlbuild thing
<wmeyer> you are probably the most advanced user of omake on the planet
<pippijn> probably, and it's sad
<pippijn> I'm so advanced that I had to completely ditch the omake standard library
<pippijn> luckily it wasn't that much work
<pippijn> there is one thing I don't know how to do properly with omake
<pippijn> I'm not sure how to detect whether .y produces only .c or both .c and .h
<pippijn> I have some ideas, but couldn't be bothered to try, yet :)
<technomancy> http://p.hagelb.org/ctypes-segfault.html <- I'm trying to wrap a C function that could possibly return a null pointer using ctypes
<technomancy> if I use ptr_opt, it works in the null pointer case, but segfaults when a real string is provided
<technomancy> if I don't use ptr_opt, it works with a real string but not a null pointer
<wmeyer> pippijn: :)
<technomancy> for some reason ptr_opt wraps the return value in both a ptr *and* an option, which seems redundant
<technomancy> what I really want is a string option, but I get a string ptr option which segfaults when I try to deref it even though I know the underlying function is returning a proper string
<wmeyer> oh ctypes, hot stuff!
<wmeyer> :)
<technomancy> wmeyer: it'd be cool if there were docs thou
<technomancy> (I found ctypes-tutorial, but it doesn't cover this topic)
zpe has quit [Ping timeout: 245 seconds]
<technomancy> it's probably obvious what's going on if you know C, but it's got me stumped
<pippijn> did you try gdb?
<technomancy> I've never used gdb; are there docs on how to use it with ocaml?
<technomancy> I think it's pretty clear what's going on; it's obviously dereferencing a null pointer
<technomancy> but it doesn't make sense why ctypes is returning a null pointer
<technomancy> because when I remove ptr_opt it works great
<pippijn> ok, can you tell me how to build and run this?
<pippijn> can you produce a testcase that I can feed to ocamlopt?
palomer has quit [Ping timeout: 264 seconds]
chambart has quit [Ping timeout: 263 seconds]
<technomancy> https://github.com/technomancy/grenchman <- it's the "repl" branch here; you can compile with `opam install core async ocamlfind && ocamlbuild -use-ocamlfind grench.native` and repro with `LEIN_REPL_PORT=0 ./grench.native repl`
<technomancy> erhm; add ctypes to the opam install list
<pippijn> :\
<pippijn> yeah, I'm not going to do that
<rks`> :D
<pippijn> good luck
<technomancy> yeah, putting together a smaller repro case; hang on
<pippijn> wmeyer: I'm still amazed at how subtly I broke the GLR core
<pippijn> in two ways
<wmeyer> hi rks` \o
<pippijn> and I'm still thinking about how it can be made faster
<pippijn> I don't know anymore :\
<technomancy> http://p.hagelb.org/crashy.ml.html here we go; just needs ctypes installed
<pippijn> a *lot* of time is spent in mutating the stack and path queue
<rks`> hi wmeyer :-)
<pippijn> it's more than 50% if I disable the GC and skip caml_modify and assign directly
<wmeyer> pippijn: <- you have to come with more imperative implementation
<pippijn> technomancy: Error: Unbound module Ctypes
<pippijn> wmeyer: hm?
<pippijn> more imperative?
<wmeyer> pippijn: I think you have optimised this quite heavily
<technomancy> pippijn: ah; needs #require "ctypes.foreign";; in the toplevel
<pippijn> wmeyer: yes
<wmeyer> it's pretty nice it's just slower than Bison and not asymptotically slower, given your purely functional implementation
<pippijn> huh?
<pippijn> I don't have a purely functional glr core
<pippijn> my LR core is purely functional
<pippijn> except for the sval array
<pippijn> (which does cost a lot)
<pippijn> technomancy: how to do that in ocamlbuild?
<pippijn> I want to make a .native
<pippijn> something with _tags
ollehar has joined #ocaml
<technomancy> pippijn: `ocamlbuild -use-ocamlfind crashy.native && ./crashy.native` works for me after doing `opam install ctypes`
<pippijn> you don't have a _tags there?
<technomancy> oh my bad
<technomancy> yeah this is in an existing project
<pippijn> <*.ml>: package(ctypes)
<pippijn> then it compiles
<technomancy> true:package(ctypes.foreign),thread,annot,debugging should do it
<pippijn> but doesn't link
<pippijn> oh
<pippijn> there we go
<pippijn> just ctypes.foreign
<pippijn> it doesn't crash
<pippijn> technomancy: how to make it crash?
<technomancy> running it will prompt for input
<technomancy> it should crash with any input
<pippijn> I typed "3"
<pippijn> it exits with status 0
<pippijn> pippijn@osiris crash $ ./crashy.native
<pippijn> > 3
<pippijn> pippijn@osiris crash $ echo $?
<pippijn> 0
<technomancy> =\
<wmeyer> pippijn: it might crash on his machine, might be corrupted stack
<technomancy> what OS and ocaml version?
<wmeyer> or 64/32 bit differences
<pippijn> Linux osiris 3.9-1-amd64 #1 SMP Debian 3.9.8-1 x86_64 GNU/Linux
<wmeyer> or something different
<pippijn> The OCaml toplevel, version 4.00.1
<wmeyer> pippijn: you upgraded your installation thanks to OPAM, you deserve a hug \o
<wmeyer> sorry beer
<pippijn> wmeyer: uselessly
<wmeyer> i meant
<pippijn> I can't use GADTs for what I wanted to use them for
<technomancy> I'm on the same OCaml version but an older Debian (3.2.46)
<technomancy> 64-bit
<pippijn> ok
<pippijn> I have this: Linux ra.xinutec.org 2.6.32-5-amd64 #1 SMP Mon Jan 9 20:49:59 UTC 2012 x86_64 GNU/Linux
<pippijn> I'll try it on that
* pippijn installs libreadline-dev
<pippijn> yep
<pippijn> crashes
<technomancy> aha
<technomancy> good to know; thanks
<technomancy> I guess I'll file this as a ctypes bug
<pippijn> but
<pippijn> it's supposed to echo my input, right?
<pippijn> it doesn't do that on my 3.9 laptop, either
<technomancy> it should
<pippijn> so either way it's broken
<technomancy> huh; so it must be returning None
<technomancy> yeah, curious
<technomancy> it could be returning an empty string I guess
<pippijn> it crashes at src/type_info_stubs.c:173
<pippijn> 0x00000000004272db in raw_read_char (_=0x7ffff7106c20, p=0x7ffff74a0033) at src/type_info_stubs.c:173
<pippijn> 173 make_primitive_interface(Val_int, Int_val, signed char, char, ffi_type_schar)
<pippijn> that's dumb
<pippijn> it's a macro
<pippijn> and it's huge :\
<pippijn> ah no
<pippijn> it's fine
<pippijn> $2 = 0x7ffff74a0033 <Address 0x7ffff74a0033 out of bounds>
<pippijn> technomancy: it's not a null pointer, but it's garbled or something
<pippijn> oh look, now it also crashes on my laptop
<pippijn> reliably, too
zpe has joined #ocaml
Obfuscate has quit [Remote host closed the connection]
<pippijn> technomancy: did you try the code with C?
<pippijn> char *
<pippijn> readline (const char *prompt);
<pippijn> technomancy: I think your code is wrong
<technomancy> I don't really know how to write C
<pippijn> technomancy: it doesn't return a pointer to string
<pippijn> it returns a pointer to char
Obfuscate has joined #ocaml
<technomancy> OK, altogether possible I misunderstood the readline docs
<pippijn> that pointer may be null
<technomancy> oh, because in C that's enough to get the whole contents?
<technomancy> because it's null-terminated
<pippijn> C strings are just pointers to char
<pippijn> ocaml strings are, too
<pippijn> but ocaml strings have a length stored in them
<pippijn> technomancy: you need to get a ptr_opt void and cast it if it's not null
<technomancy> huh; ok
<technomancy> that sorta makes sense
<technomancy> it's just a bit more awkward since it doesn't fit nicely into what ctypes expects
<technomancy> thanks
<technomancy> is that casting a ctypes operation or a more general ocaml one?
zpe has quit [Read error: Connection reset by peer]
<pippijn> ctypes
<pippijn> from_voidp
<pippijn> but I don't know anything about ctypes :)
<pippijn> I just read the api docs once
zpe has joined #ocaml
<technomancy> better than me =)
Arsenik has quit [Remote host closed the connection]
<pippijn> hmm
<technomancy> when you say "cast it if it's not null", that would be done by checking for None?
<pippijn> technomancy: let it return a ptr_opt char
<pippijn> yes
<pippijn> but then you need to convert the char ptr to ocaml string
zpe has quit [Ping timeout: 264 seconds]
<pippijn> I don't know if that is the right way
<technomancy> the from_voidp approach was still segfaulting
<technomancy> so I suspect the char ptr way is right
<technomancy> but yeah, no idea how to turn that into a string
<pippijn> oh, there is string_of_char_ptr
<pippijn> but it's not exported?
<technomancy> I'm not seeing that function in my utop
<pippijn> $ ./crashy.native
<pippijn> > 300ohho
<pippijn> 300ohho
<pippijn> technomancy: it's in the ctypes implementation
<technomancy> aha!
<technomancy> thanks, you're a champ =)
<technomancy> totally in over my head here; I come from a lisp background and have never needed FFI
<pippijn> ctypes is nice
<pippijn> but I think I'll keep on using normal stublibs for now
<wmeyer> pippijn: Y?
<pippijn> because I know that if I actually do start using ctypes, I'll need more than it provides and I'll end up writing a library around it
<wmeyer> not nesercaily
<pippijn> wmeyer: technomancy just gave me an example
<wmeyer> you can submit a bug, and submit pull requests
<pippijn> ctypes has the internal functionality to turn char ptr into ocaml string
<pippijn> but doesn't export it
<pippijn> I don't actually understand why they chose to hide it
<wmeyer> because it's declarative
<wmeyer> so you should not do it by hand, but build a signature I suppose
<pippijn> ok
<pippijn> so, how should technomancy solve his problem?
<wmeyer> I don't know.
<companion_cube> a
<companion_cube> oops
<wmeyer> companion_cube: <O_o>
<companion_cube> /o\
<companion_cube> this is a proof I need to go to bed now
<wmeyer> go to bed!
<companion_cube> good night
<bernardofpc> You follow goto ?
<wmeyer> night!
<bernardofpc> ('night)
ollehar has quit [Ping timeout: 246 seconds]
<wmeyer> bernardofpc: follow goto ?I don't know what you mean
<pippijn> goto bed;
<wmeyer> /o\
<bernardofpc> sorry, it's late as well, and I'm procrastinating a Distributions seminar presentation
<pippijn> what does /o\ mean?
<bernardofpc> a french sad person ?
<technomancy> FWIW I'm using ctypes just because it's what's in the book
<technomancy> but it got me fairly close to what I needed from 2 weeks of OCaml experience and zero weeks of C experience
<bernardofpc> (contrary to \o/ which is a happy one, ref to "La Cité de la Peur", as far as I understood)
<technomancy> but its behaviour around char pointers vs strings is indeed boggling
kanibe has joined #ocaml
<pippijn> hm
kanibe has quit [Client Quit]
<pippijn> well
<pippijn> I'm just wondering where the person's joints are in /o\
<pippijn> because in \o/, his shoulders are under the head
<pippijn> in /o\, the head is where the chest should be
<wmeyer> you are maundering pippijn, too much omake
<pippijn> :P
<pippijn> no, 3 days of staring at https://paste.xinu.at/pRGUzR/
<wmeyer> but you fixed it
<wmeyer> that's good
<pippijn> actually this is the screenshot that led me to the solution
<pippijn> if you look closely :)
<wmeyer> queue
<wmeyer> is wrong
<pippijn> indeed
<pippijn> the one on the left is correct
<pippijn> 15,5 should be at the front, but is in the middle
<pippijn> at first, I didn't print the "new queue" part
<pippijn> I couldn't have found it without that
<pippijn> because in the next iteration, the queue looks fine again
<pippijn> just in the meantime, something bad happened
walter|r has quit [Read error: Connection reset by peer]
walter|r has joined #ocaml
walter|r has quit [Read error: Connection reset by peer]
<wmeyer> pippijn: it's hard to debug such alorithms
<pippijn> it's amazing how much more complex GLR is than LR
<pippijn> did you see my LR(1) core?
<pippijn> it's less than 100 lines of code
<technomancy> http://p.hagelb.org/readline.ml.html <- is using let-bound helper functions like this considered good style?
<pippijn> sure
<pippijn> at least by me :)
palomer has joined #ocaml
<pippijn> technomancy: https://paste.xinu.at/SpT8R/#n67
<technomancy> cool. opinions are pretty divided on that in lisp-land
<pippijn> well, this is just my opinion
<technomancy> but I think it's a nice way to visually indicate that they're used in a limited scope
<pippijn> yes
palomer has quit [Client Quit]
<pippijn> but it's easy to accidentally turn them into closures and then they become a lot slower
<wmeyer> technomancy: nothing agains local functions, after pippijn
<pippijn> but that doesn't matter for readline
<technomancy> huh; good thing to keep in mind though
<technomancy> I've found in some cases needing mutual recursion it was required to do that as a closure
<pippijn> that happens if you capture anything from the lexical environment
<pippijn> oh?
<pippijn> mutual recursion is usually done with let rec ... and
<pippijn> when do you need a closure?
<technomancy> aha; I hadn't read about `and'
<Drup> pippijn: aren't this kind of closure usually optimised to non-closure thing ?
<pippijn> Drup: no
<pippijn> Drup: look at my code
<technomancy> (read loop for an async repl client)
<pippijn> Drup: if I don't pass svalArray, it's slower
<pippijn> ocamlopt doesn't optimise a lot :\
<Drup> oh, I though the compiler did that
<pippijn> unfortunately there are a bunch of things the compiler does that are bad and doesn't that would be good
<pippijn> wmeyer: how about that new preprocessor thing?
<pippijn> it could be used to perform some optimisations on the AST
<pippijn> typed AST
<wmeyer> Drup: hi
<Drup> hi wmeyer :)
<wmeyer> or hi Drup
<pippijn> or even with camlp4, but you would have to do the scope binding
<wmeyer> you choose Drup
<wmeyer> :D
<pippijn> I choose you, Drup
<Drup> wmeyer: I commute happily with hi :D
<wmeyer> :D
<pippijn> Drup used WATER GUN
<Drup> pippijn: the new AST thingy is before type checking
<pippijn> oh
<pippijn> ppx?
<wmeyer> pippijn: what pre-processor thing?
<Drup> yes
<pippijn> ok
<wmeyer> ah -ppx
<wmeyer> it's useful
<Drup> but you can do what you want with compiler libs, I read a blog post about that
<pippijn> it suggests using {{ }} for quotations
<pippijn> oh well
<wmeyer> pippijn: the new extension branch is completely different
<wmeyer> (merged to trunk)
<pippijn> wmeyer: what does it do?
<wmeyer> annotated AST nodes with few types of constructs
<wmeyer> annotates
<pippijn> flux: what does it fix?
<pippijn> flux: oh, the Set thing is something I have actually wanted several times
<pippijn> and I ended up using a Map, as well
<wmeyer> sorry, i am going to bed, see you tommorow, and good night.
<pippijn> good night
thomasga has quit [Quit: Leaving.]
<Drup> not this one, but this seems to be the same technique
thomasga has joined #ocaml
<pippijn> is there documentation on compiler-libs?
venk``` is now known as venk
carleastlund has quit [Quit: carleastlund]