ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
RossJH has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<j0sh> it seems to be picking up some other ocaml indentation file by default. i dont have anything else installed, maybe its bundled with the vim installation... does this have to be explicitly disabled?
<def`> j0sh: ocp-indent-vim is an alternative plugin to bind ocp-indent to vim, with interactive indentation
<j0sh> def`: yeah, i have some other indentation thing going, looks like its bundled with my vim installation. not sure how to disable that in favor of ocp-indent-vim
nojb has quit [Quit: nojb]
AlexRussia has quit [Ping timeout: 246 seconds]
BitPuffin has quit [Ping timeout: 245 seconds]
Hannibal_Smith has quit [Quit: Leaving]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<j0sh> def`: ah, figured it out. can manually set indentexpr=ocpindent#OcpIndentLine() in the vimrc and it works
enitiz has quit [Ping timeout: 264 seconds]
endiruna has quit [Ping timeout: 265 seconds]
AlexRussia has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
boogie has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
MrScout has quit [Ping timeout: 245 seconds]
<pippijn> rks`: where is Gerd's code?
<pippijn> rks`: http://svn.metaprl.org/viewvc/mojave/omake-branches/ <- last commit 7 months ago
AlexRussia has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
enitiz has joined #ocaml
enitiz has quit [Read error: Connection reset by peer]
enitiz has joined #ocaml
tnguyen has joined #ocaml
<pippijn> is ubuntu precise no longer supported by opam?
<pippijn> oh it is
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
jao has quit [Remote host closed the connection]
rock_neurotiko has quit [Ping timeout: 276 seconds]
rock_neurotiko has joined #ocaml
jao has joined #ocaml
mahem1 has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
MotorMe has joined #ocaml
struktured has joined #ocaml
manizzle has quit [Ping timeout: 246 seconds]
struktured has quit [Ping timeout: 265 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
tnguyen has quit [Quit: tnguyen]
kapil__ has joined #ocaml
darkf has joined #ocaml
chinglish has joined #ocaml
struktured has joined #ocaml
keen__________35 has joined #ocaml
keen__________34 has quit [Ping timeout: 245 seconds]
vanila has joined #ocaml
psy_ has quit [Quit: Leaving]
struktured has quit [Ping timeout: 244 seconds]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
psy_ has joined #ocaml
struktured has joined #ocaml
chinglish has joined #ocaml
lostman_ has joined #ocaml
<lostman_> hi all. I'm playing with Lwt and trying to use Lwt_io.make; one of the parameters is (Lwt_bytes.t -> int -> int -> int Lwt.t) and I can't find any documentation what those ints are... I have a rough idea but only that
<lostman_> where does one look for docs?
<lostman_> or do I have to look at the sources?
<whitequark> it's called perform_io
<whitequark> and the ints...
<whitequark> look at Lwt_unix.write for example
<whitequark> an out channel could be made with Lwt_io.make (Lwt_unix.write fd), I think.
q66 has quit [Quit: Leaving]
<lostman_> so this is useful for creating an output_channel from something. can I create an 'empty' oc and write to it later?
araujo has quit [Ping timeout: 256 seconds]
<lostman_> there's a write function
<lostman_> oh wait hmm, I'm misunderstanding how it works.
ygrek has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
<pippijn> I wonder if jane street has internal docs about jenga
ygrek has quit [Ping timeout: 245 seconds]
shinnya has quit [Quit: ZNC - http://znc.in]
jneen has joined #ocaml
<jneen> hello friends
<jneen> i am embarking on an ocaml adventure
<jneen> wish me luck
struktured has quit [Ping timeout: 240 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
yaewa has joined #ocaml
moei has quit [Ping timeout: 245 seconds]
yaewa has quit [Read error: Connection reset by peer]
moei has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
Pepe_ has joined #ocaml
badkins has quit [Remote host closed the connection]
kapil__ has quit [Quit: Connection closed for inactivity]
<vanila> good luck!
Rebelion has quit [Quit: Saliendo]
badkins has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
badkins has quit [Ping timeout: 255 seconds]
<jneen> dang it i always forget what's the magic things i have to do to get ocamlfind to find camlp4
rgrinberg has joined #ocaml
<jneen> opam knows about it until it tries to build something and then can't find it
<whitequark> system install?
<whitequark> try `opam switch 4.02.1`
<jneen> yeah
<jneen> hm ok
enitiz has quit [Ping timeout: 252 seconds]
<jneen> ok that still doesn't bring in camlp4 though
<whitequark> opam install camlp4
<jneen> right ok and that'll actually work this time
<jneen> sweet
<jneen> thanks whitequark
nullcat has joined #ocaml
slash^ has joined #ocaml
<jneen> and now i've got a utop, but it spits out a lot of Unbound value Time_ns.*
<jneen> even though those values are there
mearnsh has quit [Ping timeout: 272 seconds]
moei has quit [Read error: Connection reset by peer]
mearnsh has joined #ocaml
moei has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
shinnya_ has quit [Ping timeout: 255 seconds]
dsheets has quit [Ping timeout: 264 seconds]
_um has joined #ocaml
ggole has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
_um has quit [Quit: Leaving...]
dsheets has joined #ocaml
kapil__ has joined #ocaml
MercurialAlchemi has joined #ocaml
rwmjones_on_hols is now known as rwmjones
testcocoon has joined #ocaml
eikke has quit [Ping timeout: 255 seconds]
<jneen> is there an obvious way to print an arbitrary variant that i'm missing
<jneen> printf doesn't seem to have any general "show" functionality
<MercurialAlchemi> well, no
<MercurialAlchemi> you would need typeclasses for that
<jneen> right
<MercurialAlchemi> What you often do is to have your type in a module with an associated to_string function
<MercurialAlchemi> then you feed (YourModule.to_string your_structure) to printf
<jneen> got it
<MercurialAlchemi> (sort-of typeclasses are in the works, which would let you do what you want as long as the correct function is available, but it's not finished yet)
<ggole> Or you could generate one with ppx
testcocoon has quit [Quit: Coyote finally caught me]
<MercurialAlchemi> well, one thing is sure, there is no equivalent to Data::Dumper in OCaml, so there isn't a generic way of dumping a data structure for printing
testcocoon has joined #ocaml
<ggole> There's generic marshalling, but that doesn't work for printing
<ggole> (It's unsafe, too.)
<vanila> what about the s-expression thing?
<ggole> Er, what about it?
larhat has quit [Quit: Leaving.]
<jneen> ok and finally, is there a decent parser combinator lib out there
<jneen> one that supports unicode and recursive rules would be extra nice
<jneen> i've had it up to here with ocamllex
<jneen> and really i only need LL(1)
<ggole> sedlex and menhir, probably
<ggole> (Although menhir is more of an improvement to ocamlyacc.)
<jneen> yeah i guess i'm just really not used to working with separated lexer/parser stacks
<jneen> where you can't just write functions that transform parsers
<jneen> hell i might just do rec descent manually
govg has quit [Ping timeout: 245 seconds]
<jneen> also there are like 4 unicode libraries apparently?
tane has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
<ggole> Yeah. Bit of a mess, really.
testcocoon has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat has joined #ocaml
nullcat has quit [Client Quit]
AltGr has left #ocaml [#ocaml]
Simn has joined #ocaml
<rks`> pippijn: I must have been dreaming
jonludlam has quit [Quit: Coyote finally caught me]
<jneen> yeah i found that
<jneen> it seems to be out of date
<rks`> what do you mean, out of date?
<rks`> oh
<jneen> last commit about a year ago
<rks`> well, sorry
<jneen> no worries :)
<rks`> you could try emailing him
<jneen> i'm still trying to get sedlex to work
<jneen> it's uh
<rks`> he started reappearing in the caml world recently
<jneen> not finding the module?
<jneen> despite it being installed?
<rks`> how do you compile?
rgrinberg has quit [Quit: Leaving.]
<jneen> idk i'm confused and disoriented
<jneen> i've been trying a number of ways
<jneen> is there like
<jneen> one true build system
<rks`> :D
<jneen> oh boy
<jneen> but the latest has been with oasis
<jneen> ocaml setup.ml -build
<jneen> but as i could not understand the documentation for oasis
<jneen> i've been kind of guessing at the fields
<jneen> so idk i might have done that wrong too
<companion_cube> :(
rgrinberg has joined #ocaml
<jneen> do i have to like, add it as a dependency or something?
<jneen> or is it just magically picked up?
<jneen> all i want is a parser :[
<jneen> i can write it myself if i need to
<companion_cube> the cleanest way in ocaml is really installing menhir, then writing a lexer with ocamllex and parser with menhir
<jneen> but ocamllex has encoding issues
<jneen> iirc
<companion_cube> oh
<companion_cube> I think you can use sedlex with menhir, right, but I never tried
<companion_cube> sorry
<jneen> yeah i think so too
mort___ has joined #ocaml
<jneen> i mean
<jneen> i can also manually parse a token stream that's ok
<jneen> i just want to be able to like
<jneen> import modules from sedlex?
<jneen> and like, use it?
<jneen> at all?
<jneen> anyways i'm pretty discouraged at this point so i should like
<jneen> sleep on it
<jneen> and decide whether to just scrap the whole thing
<companion_cube> ah, sedlex is based on *ppx*
<jneen> ?
<companion_cube> it's not really a module, I think
<companion_cube> it's a preprocessor
<jneen> right
<jneen> since there's like, no docs
<companion_cube> so, the [% ...] stuff is ppx-rewriting
<companion_cube> it's not ocaml code per se, it's annotations to the code that will be used by sedlex to generate the actual lexer code
<jneen> right
<jneen> precompile macros essentially
<jneen> but the part where it says
<jneen> Sedlexing.Latin1.stuff
<jneen> first of all, i'm probably not interested in latin-1
<companion_cube> there's unicode too :)
<jneen> Sedlexing.UTF8 or something?
<jneen> i mean
<jneen> i don't have Sedlexing.Anything
<companion_cube> in your toplevel, you mean? You need #require "sedlex";;
<jneen> oh nice
<jneen> so ok i think i get it
<companion_cube> if it's in your project, you need to add the package sedlex to dependencies ("BuildDepends: sedlex" in oasis, there are ways with ocamlbuild too)
<jneen> Sedlexing doesn't exist as a module
<jneen> but
<jneen> Sedlexing.Latin1 and Sedlexing.Utf8 do
<companion_cube> it exists if you link against the library sedlex, actually
<companion_cube> and Sedlexing.Latin1 is a submodule
<jneen> huh
<jneen> ok
<companion_cube> are you trying in a toplevel right now?
<jneen> yeah in a utop
<jneen> weird, i have BuildDepends: sedlex
<jneen> but it still errors on `open Sedlexing`
<jneen> do i have to tell oasis to link stuff?
<companion_cube> try "oasis setup" again?
<companion_cube> it doesn't update automatically by itself
<companion_cube> in utop, you can load a library using #use "topfind";; (load ocamlfind) then #require "sedlex";;
<companion_cube> the # is not the prompt, it's part of the command
<jneen> now it's telling me unbound module Core
<companion_cube> #require "core";; ?
<jneen> ok i added core to BuildDepends and now it's complaining about -thread and -vmthread switches
RossJH has joined #ocaml
<jneen> progress!
<companion_cube> ^^
<companion_cube> add "threads" to the BuildDepends list
nojb has joined #ocaml
<companion_cube> you might want to look at some existing _oasis files, to see how it works (e.g. https://github.com/ocsigen/lwt/blob/master/_oasis)
<jneen> File "_none_", line 1:
<jneen> Reference to undefined global `Core'
<jneen> uh
lordkryss has joined #ocaml
<jneen> ah ok got it
<jneen> huh weird so with sedlex i have to manually send tokens to a channel it looks like
<jneen> :shrug:
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
jonludlam has joined #ocaml
ebzzry has joined #ocaml
mort___ has quit [Quit: Leaving.]
ingsoc has joined #ocaml
vanila has quit [Quit: Leaving]
endiruna has joined #ocaml
ingsoc has quit [Quit: Leaving.]
<endiruna> are there any modules for matrix multiplications and linear algebra mathematical operations?
jonludlam has quit [Ping timeout: 252 seconds]
<endiruna> i have installed lacaml with opam install lacaml but when i do open Lacaml.D it gives me unbounded operation
<ggole> endiruna: how are you compiling or running the code?
hhugo has joined #ocaml
keen__________35 has quit [Read error: Connection reset by peer]
keen__________35 has joined #ocaml
Submarine has joined #ocaml
Kakadu has joined #ocaml
endiruna has quit [Ping timeout: 265 seconds]
pgomes has joined #ocaml
rand000 has joined #ocaml
Submarine has quit [Ping timeout: 245 seconds]
Submarine has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
govg has joined #ocaml
testcocoon has joined #ocaml
endiruna has joined #ocaml
<endiruna> ggole: i see your point. is it possible to lacaml eanbled in utop.
<ggole> I imagine so. Use #require rather than just open.
tnguyen has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
MotorMe has quit [Remote host closed the connection]
Haudegen has joined #ocaml
keen__________36 has joined #ocaml
keen__________35 has quit [Ping timeout: 256 seconds]
Hannibal_Smith has joined #ocaml
yaewa has joined #ocaml
moei has quit [Ping timeout: 264 seconds]
BitPuffin has joined #ocaml
rock_neurotiko has quit [Read error: Connection reset by peer]
mbac has joined #ocaml
<Drup> you can do simpler now with the new menhir API, I can show you tonight.
badkins has joined #ocaml
<Drup> BatParse being a parser combinator library in batteries
<Drup> that could please you more
<Leonidas> mahem1: ok, the patch to missinglib was merged into opam-repository, your issue should be solved.
Thooms has joined #ocaml
rock_neurotiko has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
q66 has joined #ocaml
testcocoon has joined #ocaml
leowzukw has joined #ocaml
AlexRussia has quit [Ping timeout: 245 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
shinnya has joined #ocaml
nojb has quit [Ping timeout: 240 seconds]
vanila has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
AlexRussia has joined #ocaml
larhat has joined #ocaml
badon has joined #ocaml
booly-yam-116 has joined #ocaml
kapil__ has quit [Quit: Connection closed for inactivity]
booly-yam-9484 has joined #ocaml
booly-yam-116 has quit [Remote host closed the connection]
booly-yam-9484 has quit [Remote host closed the connection]
booly-yam-5649 has joined #ocaml
tane has quit [Quit: Verlassend]
enitiz has joined #ocaml
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
darkf has quit [Quit: Leaving]
_um has joined #ocaml
lostman_ has quit [Quit: Connection closed for inactivity]
rgrinberg has joined #ocaml
waneck has joined #ocaml
samrat has joined #ocaml
boogie has quit [Remote host closed the connection]
waneck has quit [Quit: Leaving]
hhugo has quit [Quit: Leaving.]
cojy has quit [Ping timeout: 245 seconds]
divyanshu has quit [Ping timeout: 245 seconds]
vanila has quit [Remote host closed the connection]
n1ftyn8 has quit [Ping timeout: 272 seconds]
<pippijn> does anybody have a good idea on how to get jenga to write the stdout from a process to a file as action?
msch has quit [Ping timeout: 252 seconds]
<pippijn> http://www.xinutec.org/~pippijn/files/up/jenga/Action.html <- Action.process doesn't allow to specify an output file for stdout
_um has quit [Remote host closed the connection]
<pippijn> I can use bash, but that's ugly
<MercurialAlchemi> there is nothing in Action.run for that?
<pippijn> MercurialAlchemi: 1) Action.run doesn't return an action, it returns a deferred
<pippijn> MercurialAlchemi: 2) Job.Output has ignore, stdout and none
<MercurialAlchemi> it doesn't return it, but it takes one
<MercurialAlchemi> process just looks like a constructor
<MercurialAlchemi> (without reading the doc)
<pippijn> (there is no doc)
<pippijn> yes, but you need to pass it to Rule constructors
<pippijn> the Action
<pippijn> these expect actions
<pippijn> actions are always processes
<pippijn> anything else is done within the Dep monad
<pippijn> it seems there is no way
<pippijn> so if I want it, I need to fork jenga
<pippijn> it's a slightly uncommon thing to want
<MercurialAlchemi> well, it depends
<pippijn> but things like sed don't have an output file
<pippijn> or grep
<pippijn> it would be neat to be able to specify pipelines in jenga
<pippijn> instead of using intermediate files
<pippijn> I think ocamlbuild also doesn't have support for process pipelines
<pippijn> this sucks, I don't want to fork jenga
* pippijn goes with bash for now
<MercurialAlchemi> that's annoying
<Leonidas> file a feature request?
<pippijn> Leonidas: will do
<MercurialAlchemi> well, maybe they'd take a patch
<pippijn> right now
<Leonidas> maybe it is possible and they can point you to it => win-win :)
<MercurialAlchemi> still working on a build system, then?
<pippijn> MercurialAlchemi: no, again
hhugo has joined #ocaml
<pippijn> I like jenga
<pippijn> it's small and clean code
<pippijn> very understandable, even without documentation
<MercurialAlchemi> they have an interesting coding style
<pippijn> I kind of like it
<MercurialAlchemi> I like the way they specify the type signature
<pippijn> function at the end of the argument list
<pippijn> means less ()
* pippijn removes superfluous @@
Simn has quit [Quit: Leaving]
<MercurialAlchemi> well, I guess they have enough institutional knowledge
booly-yam-5649 has quit [Ping timeout: 240 seconds]
endiruna has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Quit: Leaving.]
hhugo has quit [Quit: Leaving.]
<MercurialAlchemi> looks like the entire stdout and stderr end up in the job summary
<pippijn> right
<MercurialAlchemi> this is where the magic happens
<pippijn> yeah
rgrinberg has joined #ocaml
<MercurialAlchemi> I think I like it too
<MercurialAlchemi> the code is clear and easy to follow
<pippijn> yes
<pippijn> small, specific modules
<MercurialAlchemi> named arguments
<MercurialAlchemi> with punning
<pippijn> punning?
<MercurialAlchemi> well, if you have a function f with an argument ~foo, and you have a variable foo of the right type, you can go 'f ~foo'
<pippijn> right
<pippijn> yeah
<MercurialAlchemi> works the same with records
<pippijn> I usually do that
<pippijn> with records
<pippijn> I like { foo with field }
<MercurialAlchemi> yep
<MercurialAlchemi> OCaml has the best compromise between terseness and readability, IMHO
<MercurialAlchemi> on that, I need to jet
cojy has joined #ocaml
n1ftyn8 has joined #ocaml
divyanshu has joined #ocaml
cthuluh has quit [Ping timeout: 252 seconds]
dsheets has quit [Ping timeout: 256 seconds]
Thooms has quit [Quit: WeeChat 1.0.1]
msch has joined #ocaml
rfv has joined #ocaml
dsheets has joined #ocaml
endiruna has joined #ocaml
<ousado> pippijn: and?
<ousado> any news regarding your evaluation of haxe?
<pippijn> ousado: a little verbose, and I really think that it could implement more types as emulation
<pippijn> ousado: if I want an Int8, I need to write a class
<ousado> you'd write an abstract, probably
<pippijn> ousado: other than that, I haven't looked much further, because now I'm reworking my build system
rgrinberg has quit [Quit: Leaving.]
<pippijn> ousado: I might use haxe as the build description language
rand000_ has joined #ocaml
rand000 has quit [Ping timeout: 240 seconds]
endiruna has quit [Quit: WeeChat 1.1]
<ousado> pippijn: that'd be very nice
<pippijn> ousado: right now, I'm using S-expressions
<pippijn> but that's the initial step
<pippijn> later I want a nicer syntax
<pippijn> haxe could provide that
<ousado> I thought about (what you said about) your build system, and it'd be a very interesting addition to the haxe ecosystem
<pippijn> ousado: it's going to take a while
tane has joined #ocaml
<ousado> maybe I'll steal your design and make an all-haxe version of it
<pippijn> I'm rewriting it from scratch using jenga
<pippijn> no problem
<pippijn> I'll gladly help understanding/documenting the design
<ousado> so many good things to write..
rgrinberg has joined #ocaml
<pippijn> MercurialAlchemi: there is Dep.action_stdout which may do what I want
<pippijn> but then I don't know how to write the data to the file
<pippijn> because Actions need to be processes and can't be ocaml code
marynate has joined #ocaml
<MercurialAlchemi> hmm
<pippijn> but Dep.action_stdout is probably very inefficient
<MercurialAlchemi> I don't think it does what you want
<pippijn> because it makes the build depend on the output text
<pippijn> so it will cache the entire file in the db
<MercurialAlchemi> looks it caches the content of stdout
<pippijn> right
<pippijn> I'll need it for ocamldep
marynate has quit [Client Quit]
samrat has quit [Quit: Computer has gone to sleep.]
zyla has joined #ocaml
ygrek has joined #ocaml
cthuluh has joined #ocaml
booly-yam-4706 has joined #ocaml
<pippijn> and again, I find that ocaml compilation is a pain
<pippijn> 1) input files may be ModuleName.ml or moduleName.ml
slash^ has quit [Read error: Connection reset by peer]
<pippijn> 2) if ModuleName/moduleName.mli exists, then .cmi is generated from .mli, and the rest (cmo, cmx, o) from .ml, and the rules that produce the rest depend on the cmi; if .mli does not exist, then .cmi and the rest are all generated from .ml
<seliopou> hey anybody know the best way to get patches to zarith accepted?
<seliopou> I submitted one via ocamlforge but that doesn't exactly look like a... well-trafficked site
slash^ has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
_twx_ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
leowzukw has quit [Ping timeout: 246 seconds]
leowzukw has joined #ocaml
contempt has quit [Ping timeout: 244 seconds]
contempt has joined #ocaml
hhugo has joined #ocaml
boogie has joined #ocaml
boogie has quit [Client Quit]
Thooms has joined #ocaml
tani has joined #ocaml
<Drup> seliopou: I don't think there are other choices
<seliopou> Drup: figured, but thought I'd check. Thanks.
tane has quit [Ping timeout: 245 seconds]
nullcat has joined #ocaml
martintrojer has quit [Ping timeout: 264 seconds]
martintrojer has joined #ocaml
leowzukw has quit [Ping timeout: 244 seconds]
leowzukw_ has joined #ocaml
cthuluh has quit [Ping timeout: 245 seconds]
cthuluh has joined #ocaml
leowzukw_ has quit [Quit: Lost terminal]
Thooms has quit [Ping timeout: 245 seconds]
Thooms has joined #ocaml
struktured has joined #ocaml
ggole has quit []
slash^ has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pippijn> jenga doesn't seem to like that ocamlopt overwrites .cmi, since it depends on that .cmi
tani has quit [Quit: Verlassend]
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
bugabinga has joined #ocaml
lu324_ has joined #ocaml
lu324 has quit [Read error: Connection reset by peer]
<badkins> Just listened to Anil talk about OCaml and Mirage on a podcast. Is anyone here deploying something via Mirage OS ?
<jneen> hm so batteries has ParserCo but it looks like it's geared towards latin-1 :\
<jneen> is there something that makes that magically work with utf8 streams instead
<Drup> jneen: doesn't seem to care about encoding
<Drup> it's polymorphic on the type of token and *you* define the token you want to use
<Drup> only the lexer care about encoding and sedlex handle utf8
<Drup> I like "This library is vastly more powerful than Lexing, Str, Parsing or Scanf. It is also considerably slower. "
<Drup> at least, for once, it doesn't pretend to be of reasonable speed.
<jneen> heh
nullcat has joined #ocaml
<jneen> ok but
<jneen> anything that lets me actually specify strings to lex
<jneen> is in CharParser
<jneen> which is all latin-1
<jneen> i mean i suppose i could write a mountain of glue code to use it with sedlex or something? but then i may as well just use menhir
pgomes has quit [Ping timeout: 252 seconds]
<jneen> i just want something that works without having to like, baby it ;_;
pgomes has joined #ocaml
<Drup> I don't understand why you need CharParser.
<Drup> sedlex is already doing that
<Drup> (and CharParser, despite the name, is a lexer)
<jneen> hrm
<jneen> i was trying to do it without sedlex
<Drup> I even linked you a gist of how to use sedlex+ParserCo.
<jneen> yeah i saw that
<jneen> it seemed like it was reimplementing sedlex
<jneen> but anyways the stuff i want to do is gonna be hard with sedlex so...
<Drup> jneen: also, you don't seem to understand that "the idiomatic way" to do a parser in OCaml is clearly menhir
<jneen> ah, is it
<jneen> i wasn't able to get that set up
<jneen> i followed the instructions from rwo and the compiler built my mly file with ocamlyacc
<Drup> yes, that's the default
<Drup> but "true: use_menhir" in your _tags file
<Drup> and that should be it.
<jneen> true: use_menhir
<jneen> ok
<jneen> i also wasn't able to find docs of that particular setup step :\
<jneen> oh do i need to do something different if the _tags file was generated with _oasis
<Drup> you just need to add it out of the oasis section
<jneen> ok
anemator has joined #ocaml
anemator has quit [Client Quit]
<jneen> right but that doesn't have the use_menhir flag init...
<jneen> *in it
<Drup> sure, it's not a tutorial about menhir.
<jneen> right
<Drup> but it should answer some other question you seem to be having.
<jneen> yep
rgrinberg has quit [Quit: Leaving.]
<Drup> jneen: https://github.com/pyrocat101/opal was posted on reddit yesterday too, if you want to try.
<Drup> at least it's small.
<Drup> (and no mli, which makes me cringe a lot)
<jneen> yeah it looks interesting, although i'm not sure what the win over Bat.CharParser is
<Drup> I'm just linking you stuff
<jneen> ah yeah
<jneen> i want to parse utf8 strings is the thing... unless i'm missing something that's all char lists
<Drup> I consider parser combinators a stupid idea that is doomed to be ridiculously slow and that, except for natural language processing, every language should be LL(k) or LR(1).
<jneen> if they're done right they should be LL(k) without explicit backtracking iirc
<Drup> jneen: you do realize the parser doesn't care about encoding, only about tokens ?
<jneen> so
<jneen> the abstract definition of the parser doesn't care about encoding, yes
<jneen> it's an abstract stream of stuff (tokens, chars, w/e)
<Drup> and that lexing an utf8 string is as easy as "\"" [^"]* "\"" -> ...
<jneen> sedlex?
<Drup> with pretty much anything, in fact
<jneen> ?
<Drup> you don't even need to handle utf8 explicitely to "accept anything utf8"
<Drup> (that's why you can have utf8 in strings and comments in ocaml while ocamllex doesn't handle utf8 explicitely)
<jneen> hm ok so i don't have to worry about e.g. getting stuck in the middle of multibyte glyphs?
<Drup> I don't really see how that could happen
rgrinberg has joined #ocaml
<jneen> i mean
<jneen> if it's string's assumption that every character takes 8 bytes
<jneen> uh i mean a byte
<Drup> you're overcomplicating this so much :D
<jneen> then it's gonna split some characters in half, right?
<Leonidas> splitting charachters in half might happen anyway
<jneen> ?
* Leonidas goes to check if UTF-8 has surrogate pairs
<pippijn> Leonidas: surrogate pairs?
<jneen> i'm just not used to hearing "eh don't worry about encoding you're probably fine"
<pippijn> Leonidas: surrogate pairs are the utf-16 word for "multi-byte" (or in its case, multi-short)
<Leonidas> oh, apparently not.
<Leonidas> what I meant was the decomposition of charachters
<Leonidas> e.g. of é into e and ´
<Leonidas> not sure how this is named
<jneen> ah yeah idk if it has that
<jneen> but yeah there are multibyte glyphs for sure
<pippijn> Leonidas: utf-8 has that of course
<pippijn> Leonidas: combiner characters are just code points that can be encoded in any unicode transfer format
<Leonidas> yeah, so you might still cut characters in half, even if you assume multi-byte characters
<pippijn> yes
<jneen> sure, i'd have to deal with combining chars
<jneen> which is still doable with the right lexing states
<Drup> there are utf8 libraries already
<Drup> "opam search uu" should give you the list :p
<jneen> Leonidas: 404
<Leonidas> jneen: browse harder!
<jneen> heh
<jneen> ok so i could for example
<jneen> grab something like uh
<Leonidas> Drup: camuumile?
<jneen> uutf?
<jneen> to get a stream of unicode glyphs from a utf-8 stream
<Drup> jneen: I think you want uunf for decoding.
<jneen> and... plug that into menhir somehow?
<Drup> It's not at menhir lever, I told you already =')
<jneen> or
<pippijn> uutf -- Non-blocking streaming Unicode codec for OCaml
<jneen> right
<pippijn> non-blocking?
<pippijn> so it spawns a thread to encode a code point and returns a promise?
<jneen> into opal or BatParse or something
<Leonidas> non-blocking as in nodejs, I guess
Hannibal_Smith has quit [Quit: Leaving]
<whitequark> pippijn: no threads
<jneen> weird
<whitequark> it just returns either "here's a codepoint" or "give me more data"
<jneen> yeah that was my guess
<pippijn> ah
<Leonidas> that's rather neat
<Drup> whitequark: do you have some bit of code to plug uu** with sedlex (to normalize before lexing, for example) ?
<Drup> It's probably not hard, I just wonder if you have that already
<pippijn> jenga is hard :(
<Drup> pippijn: not unexpected.
<pippijn> *** jenga: src/devel/baselib/core/stringMap.cmi changed
<pippijn> I don't even know what this means
<pippijn> it changed? well that's good! I wanted it to..
<whitequark> Drup: yes
<whitequark> although i eventually decided not to normalize, you know why? source locations
<Drup> ah, right
<Drup> that's a good argument.
<jneen> yeah i don't want to normalize glyphs out of parsed code
<jneen> that could be a pretty effective footgun
nslater has joined #ocaml
pgomes has quit [Quit: Leaving]
nslater has left #ocaml [#ocaml]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
kmicinski has joined #ocaml
<kmicinski> How do I pass a -I path in for ocamlbuild to use?
<kmicinski> z3/z3_stubs.c:14:10: fatal error: 'caml/camlidlruntime.h' file not found
<kmicinski> I need to point ocamlbuild at the proper place for my camlidlruntime
<whitequark> -cflag '-I path'
<Drup> camlidl for z3 ?
<kmicinski> Drup: it's not z3 proper, but the ocaml stubs iirc
<Drup> yes sure, but the last version doesn't use caml_idl
<kmicinski> ah, then perhaps the repo I'm working with is just using an outdated version
<Drup> ah, maybe you're not using ml-ng, nevermind hten
<kmicinski> where is my typical camlidlruntime.h located, I have looked this up before but don't currently know
<kmicinski> I thoguht it was lib/ocaml/std-lib/caml
<whitequark> camlidlruntime is not a part of stdlib