adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
darkf has quit [Quit: Leaving]
jwatzman|work has joined #ocaml
badkins has joined #ocaml
darkf has joined #ocaml
zpe has joined #ocaml
serge has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
ljs has joined #ocaml
serge has quit [Ping timeout: 256 seconds]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
manud has joined #ocaml
hugomg has quit [Quit: Leaving]
NoNNaN has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
NoNNaN has joined #ocaml
manud has quit [Quit: manud]
BitPuffin has joined #ocaml
parcs has left #ocaml ["WeeChat 1.1-dev"]
struktured has quit [Ping timeout: 244 seconds]
claudiuc has quit [Remote host closed the connection]
hausdorff has quit [Remote host closed the connection]
zpe has joined #ocaml
hausdorff has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
zpe has quit [Ping timeout: 272 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
manud has joined #ocaml
hausdorff has quit [Remote host closed the connection]
robink has quit [Ping timeout: 258 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
robink has joined #ocaml
BitPuffin has joined #ocaml
struktured has joined #ocaml
ontologiae has joined #ocaml
manud has quit [Quit: manud]
BitPuffin has quit [Remote host closed the connection]
manud has joined #ocaml
BitPuffin has joined #ocaml
serge has joined #ocaml
thmslld has quit [Ping timeout: 260 seconds]
manud has quit [Quit: manud]
manud has joined #ocaml
serge has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
badkins has quit []
zpe has quit [Ping timeout: 244 seconds]
BitPuffin has quit [Ping timeout: 250 seconds]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
serge has joined #ocaml
zz_anildigital is now known as adgtl
adgtl is now known as anildigital
anildigital is now known as adgtl
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
lemongrabjo has joined #ocaml
taion809 has quit [Remote host closed the connection]
manud has quit [Quit: manud]
samrat has joined #ocaml
manud has joined #ocaml
siddharthv_away is now known as siddharthv
bytbox has quit [Remote host closed the connection]
manud has quit [Quit: manud]
ljs has quit [Quit: None]
adgtl is now known as zz_adgtl
ygrek has joined #ocaml
zpe has joined #ocaml
larhat has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
WraithM has joined #ocaml
zz_adgtl is now known as adgtl
adgtl is now known as anildigital
mcc has joined #ocaml
samrat has quit [Ping timeout: 258 seconds]
WraithM has quit [Ping timeout: 265 seconds]
dzhulk has joined #ocaml
larhat has quit [Quit: Leaving.]
WraithM has joined #ocaml
anildigital is now known as zz_anildigital
<mcc> Hi… I wanna do some simple lexer / token-parser stuff, for reasons I think I wanna do it in ocaml, I haven't written any ML in years...
<whitequark> sedlex as lexer and menhir as LALR(1) parser if you prefer those
<mcc> Where is a sensible place to start with doing tokenization / parsing / string manip like this in ocaml? I'm looking at this tutorial in writing a language with LLVM on llvm.org and it is using camlp4/camlp5... that seems like a real big thing tho
<whitequark> please don't use camlp4 and especially not camlp5
<whitequark> I will be rewriting that tutorial in close future because it has really really bad advice
<whitequark> (you're not the first one to be burned by that)
<mcc> haha thank you for the advice
<mcc> sedlex is a lexer or a lexer generator?
<whitequark> it's a lexer syntax extension
<mcc> ok.
<whitequark> essentially, it's a lexer generator, but you don't see the generated code
<mcc> good enough for me
<whitequark> you're using os x right? you'll need https://github.com/Homebrew/homebrew/pull/33645
WraithM has quit [Ping timeout: 245 seconds]
<mcc> oh my
<mcc> heh i'm looking at this and going "i should show this to misty--" and then she's in the thread
<mcc> hmm. i'm a little confused by this.
<mcc> i'm installing opam right now via brew, actually
<mcc> should i back it out and wait for this to go in?
dzhulk has quit [Quit: Leaving.]
<whitequark> let me see
<mcc> cuz this looks like something that will be resolved in short order.
<whitequark> yes, probably best to wait for a bit.
<whitequark> camlp4 is deprecated and the ecosystem is slowly migrating from it--I myself sent three or four PRs making camlp4 optional just previous week--but it's not happening quickly enough.
<whitequark> so a lot of things still depend on it and break in sad ways.
<mcc> so it says here https://github.com/alainfrisch/sedlex that sedlex is not a camlp4.
ggole has joined #ocaml
<whitequark> it's a bit complicated because camlp4 can refer to two things at once: 1) it is a generic extensible parser technology, 2) it also was/is used to extend OCaml syntax
<mcc> i— oh, god *damn* it
<mcc> ==> Installing dependencies for opam: boost, cmake, re2c, scons, bison, g
<mcc> i see.
<whitequark> so sedlex is not a camlp4-based syntax extension
<whitequark> but if you really want, you can still use it as a lexer for camlp4-based parsers
<whitequark> (I'm not sure why would anyone want that)
<mcc> what i mean is, you're suggesting i need this patch to support camlp4 in opam, but i don't see anything on the github page suggesting camlp4 is in fact a dependency?
<whitequark> oh, it's not a dependency of sedlex
<mcc> you just think i'll want it overall?
<whitequark> it is a dependency of, for example, utop, which is a REPL which is usable
<mcc> i see.
<whitequark> transitively via a bunch of commonly used libraries.
<whitequark> I've removed camlp4 dep from three of them, but for the fourth it's a 2kloc diff that's pending review (https://github.com/ocsigen/lwt/pull/95)
<whitequark> mcc: btw, I'm not sure why opam repends on re2c, that sounds odd to me
ontologiae has quit [Ping timeout: 272 seconds]
<whitequark> or rather, I look at its source and it doesn't, this seems like a formula bug to me
<mcc> brew is often aggressive on dependencies. si it possible one of those other dependencies requires it? idk what re2c even is
<whitequark> google's regexp library
<mcc> also: i typed ocaml -help and saw this in one place:
<mcc> -drawlambda (undocumented)
<mcc> wtf
<whitequark> -d* switches (from -debug) show the compiler's internal representaiton at various phases
<whitequark> so, textual source, AST, typed AST, IR, uhhh some other form of IR, bytecode (instr)
<whitequark> lambda is an untyped representation that looks sort of like lambda calculus, hence the name
lemongrabjo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<whitequark> mcc: oh, aspcud wants re2c.
zz_anildigital is now known as adgtl
adgtl is now known as anildigital
<mcc> i am so terrified about adding any dependencies to my project at this point
<whitequark> why?
<mcc> cuz everything gets these big trees and so i'm afraid i'll have a situation where i use sedlex so to build my thing people have to get re2c because it's a dependency of a dependency of the package manager you need to download one of my dependencies
tnguyen has joined #ocaml
<mcc> i mean, i expect it'll be pretty hard to build anything without using opam, but this is a general problem
<whitequark> I agree that this is an issue.
<mcc> i tried playing with that clasp thing, i never even got it to build
<whitequark> it's less pronounced on *nix systems, where you generally have binary packages for aspcud
<whitequark> there was some work to provide aspcud-as-a-service
samrat has joined #ocaml
tnguyen has quit [Client Quit]
tnguyen has joined #ocaml
<mcc> urrrg i'm really looking forward to getting the linux laptop i'm planning to get this winter
<mcc> also wow
axiles has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
<whitequark> cool, the cudf-solvers thing actually works
<whitequark> just ran it
<whitequark> it's not even slow, you just wait a few more seconds for dependency resolution
<mcc> well, since i'm usually hitting the network anyway for this stuff...
zpe has joined #ocaml
<mcc> alright, i'm gonna just let everything slowly spend all night installing , thanks for the help! :D
<whitequark> o/
zpe has quit [Ping timeout: 256 seconds]
oscar_toro has joined #ocaml
dzhulk has joined #ocaml
anildigital is now known as adgtl
AlexRussia has quit [Ping timeout: 256 seconds]
adgtl has quit [Quit: ZNC - http://znc.in]
struktured has quit [Ping timeout: 272 seconds]
samrat has joined #ocaml
serge has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
serge has joined #ocaml
darkf_ has joined #ocaml
tnguyen has quit [Ping timeout: 255 seconds]
darkf has quit [Ping timeout: 265 seconds]
darkf has joined #ocaml
darkf has quit [Changing host]
darkf has joined #ocaml
darkf_ has quit [Ping timeout: 265 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
jao has quit [Ping timeout: 256 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
ggole has quit [Ping timeout: 244 seconds]
Intensity has quit [Ping timeout: 240 seconds]
dzhulk has left #ocaml [#ocaml]
ggole has joined #ocaml
arj has joined #ocaml
samrat has quit [Ping timeout: 272 seconds]
samrat has joined #ocaml
zpe has joined #ocaml
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
hhugo1 has joined #ocaml
nop0x07bc has joined #ocaml
marynate has joined #ocaml
samrat has quit [Ping timeout: 258 seconds]
larhat has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
raichoo has joined #ocaml
oscar_toro has quit [Ping timeout: 240 seconds]
sinelaw has joined #ocaml
oscar_toro has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
Simn has joined #ocaml
Thooms has joined #ocaml
zpe has joined #ocaml
Submarine has quit [Remote host closed the connection]
raichoo has quit [Ping timeout: 265 seconds]
badon has joined #ocaml
pgomes has joined #ocaml
samrat has joined #ocaml
sgnb has joined #ocaml
cago has joined #ocaml
huza has joined #ocaml
raichoo has joined #ocaml
dsheets has joined #ocaml
Guest39355 is now known as Haudegen
ikaros has joined #ocaml
huza has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ocaml
ddosia has quit [Quit: Leaving.]
AlexRussia has quit [Ping timeout: 256 seconds]
raichoo has quit [Ping timeout: 258 seconds]
AlexRussia has joined #ocaml
samrat has quit [Read error: Connection reset by peer]
hooplahoops has joined #ocaml
AlexRussia has quit [Ping timeout: 250 seconds]
ddosia has joined #ocaml
rand000 has joined #ocaml
_andre has joined #ocaml
avsm has joined #ocaml
huza has joined #ocaml
serge has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 244 seconds]
zpe has quit [Remote host closed the connection]
raichoo has joined #ocaml
bezirg has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
zpe has joined #ocaml
samrat has joined #ocaml
sinelaw has quit [Ping timeout: 245 seconds]
toolslive has joined #ocaml
<toolslive> am I correct to observe that opam 1.2 can only use ${HOME}/.opam ? (no longer arbitrary directories)
hooplahoops has quit [Ping timeout: 265 seconds]
<dsheets> toolslive, root?
<flux> I have opam 1.2 (well some prerelease) and I don't have ~/.opam
<flux> I do have environment variable OPAMROOT exported to point elsewhere
<toolslive> right. I glanced over that option....
<toolslive> I'm in a total mess: I have an opam 1.1 root and I cannot install ppx_deriving because of ppx_tools constraints.... upgrade only works half because some packages use the 1.2 definition format and my 1.1 cannot parse that.
<flux> start from scratch, not that big a deal 8-)
<flux> with some sed magic you can extract the list of installed packages and reinstall them with another opam..
<flux> or maybe there's even an option allowing export/import
<MercurialAlchemi> well, yeah, you can export your universe
<toolslive> ok. starting from scratch...
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
jpdeplaix has quit [Ping timeout: 250 seconds]
ddosia has quit [Ping timeout: 256 seconds]
raichoo has quit [Quit: Leaving.]
sinelaw has joined #ocaml
serge has joined #ocaml
tupelolo is now known as shallow
jpdeplaix has joined #ocaml
<toolslive> ok. most things work.... but ppx_deriving seems to falter somewhere...'Cannot locate deriver Show' prolly an API change...
_5kg has quit [Ping timeout: 265 seconds]
hooplahoops has joined #ocaml
robink has quit [Ping timeout: 244 seconds]
pharpend has quit [Quit: WeeChat 0.4.3]
robink has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
ddosia has joined #ocaml
oscar_toro has quit [Ping timeout: 250 seconds]
pharpend has joined #ocaml
arj has quit [Quit: Leaving.]
kakadu has joined #ocaml
oscar_toro has joined #ocaml
_5kg has joined #ocaml
huza has joined #ocaml
bytbox has joined #ocaml
jonludlam has joined #ocaml
tnguyen has joined #ocaml
pgomes has left #ocaml [#ocaml]
hooplahoops has quit [Ping timeout: 245 seconds]
sinelaw has quit [Ping timeout: 245 seconds]
arj has joined #ocaml
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
oscar_toro has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
sepp2k has joined #ocaml
tnguyen has quit [Ping timeout: 260 seconds]
eizodo has joined #ocaml
<toolslive> still some things completely wrong: "opam list | grep lwt yields": "lwt 2.4.6 A cooperative threads library for OCaml" but: "ocamlfind list | grep lwt" yields ""
Thooms has joined #ocaml
<def`> toolslive: eval `opam config env`
struktured has joined #ocaml
<def`> try evaluating this in your shell
<toolslive> it's not that..... I installed lwt.2.4.5 and now ocamlfind finds the packages
<Drup> flux: "opam switch export/import"
tnguyen has joined #ocaml
bytbox has quit [Remote host closed the connection]
badkins has joined #ocaml
tnguyen has quit [Ping timeout: 245 seconds]
<flux> drup, nice
<flux> (though I didn't expect it to be under switch)
<flux> last time I did it with some opam list | sed
AlexRussia has joined #ocaml
shinnya has joined #ocaml
huza has quit [Quit: WeeChat 0.3.8]
sinelaw has joined #ocaml
eizodo has quit [Ping timeout: 246 seconds]
<toolslive> "|xargs opam install "
mcc has quit [Quit: This computer has gone to sleep]
struktured has quit [Ping timeout: 265 seconds]
Thooms has quit [Ping timeout: 255 seconds]
siddharthv has quit [Ping timeout: 245 seconds]
siddharthv has joined #ocaml
sinelaw has quit [Ping timeout: 258 seconds]
siddharthv is now known as siddharthv_away
<flux> toolslive, well, there was a file in between :)
darkf has quit [Quit: Leaving]
<toolslive> yes, I realised that after I wrote it....
eizodo has joined #ocaml
tnguyen has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
SethTIsue has joined #ocaml
dsheets has quit [Ping timeout: 258 seconds]
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
mort___ has joined #ocaml
pharpend_ has joined #ocaml
pharpend_ has quit [Client Quit]
toolslive has joined #ocaml
ysz has joined #ocaml
BitPuffin has joined #ocaml
rossberg has quit [Ping timeout: 265 seconds]
ysz has quit [Remote host closed the connection]
chris2 has quit [Ping timeout: 272 seconds]
<Drup> whitequark: "const_of_int64 : lltype -> Int64.t -> bool -> llvalue" this boolean, *why* ?!
<Drup> whitequark: how do I run only the ocaml tests ?
dsheets has joined #ocaml
nlucaroni has joined #ocaml
sinelaw has joined #ocaml
rossberg has joined #ocaml
dsheets has quit [Ping timeout: 258 seconds]
lordkryss has joined #ocaml
avsm has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
thmslld has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
BitPuffin has joined #ocaml
toolslive has joined #ocaml
mort___ has quit [Quit: Leaving.]
chris2_ has joined #ocaml
chris2_ is now known as chris2
oscar_toro has joined #ocaml
<whitequark> Drup: make lit TESTSUITE=Bindings/Ocaml
<whitequark> the boolean is something like "zero-extend"
<Drup> yeah, I noticed
<whitequark> put a label on it and I will accept the patch
<Drup> can I put an optional label on it ? =')
shinnya has quit [Ping timeout: 245 seconds]
<Drup> (I'll have to move it in the arguments, so breaking compat)
SethTIsue has quit [Quit: SethTIsue]
<whitequark> yes
<Drup> fabulous.
<reynir> Hm, I had this bug when doing "opam switch install 4.02.1" with -j 0 http://lpaste.net/113327
<reynir> worked fine without
<whitequark> please report it
yomimono has joined #ocaml
hooplahoops has joined #ocaml
ygrek has joined #ocaml
arj has quit [Quit: Leaving.]
ysz has joined #ocaml
<Drup> whitequark: are you *sure* to test a llvmbool, it's "if (b)" and not supidly reversed or something ?
olauzon has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
<whitequark> it's not stupidly reversed, you just need to look at what exactly true or false means in that context
<Drup> ARG, nevermind
mcc has joined #ocaml
<mcc> whitequark: ok are you there?
sinelaw has quit [Ping timeout: 244 seconds]
<reynir> Done, thanks
<reynir> opam with -j 0 is supposed to use as many threads as there are cores, right?
<Drup> whitequark: so, yes, it was reverse
<mcc> whitequark: i'm gonna be honest i'm looking at ppx_deriving and i do not understand *what* it does.
<Drup> or llvm is calling a boolean "losesInfo" which is true only if you don't lose any info.
<Drup> =')
jako has joined #ocaml
jako has left #ocaml [#ocaml]
NoNNaN has quit [Remote host closed the connection]
<reynir> opam help doesn't exactly say that, dunno how I got that idea...
<Drup> mcc: to be honest, you shouldn't start by that
<Drup> get back to ocaml slowly, you'll need it later, it's not important.
<toolslive> I just upgraded to ppx_deriving 1.0 and I have some issues with this change: "Remove Findlib+dynlink integration. All derivers must now be explicitly required."
<whitequark> mcc: here
<toolslive> what exactly does "explicitly required" entail?
<Drup> toolslive: you need to require ppx_deriving.show if you want the Show deriver
<whitequark> toolslive: before 1.0, ppx_deriving would automagically locate and load deriver plugins based on the name you supply
<whitequark> this was removed, so now you need to say beforehand which derivers to you want to use
<whitequark> by requiring the corresponding package
<toolslive> I understand that but I have troubles with making ocamlbuild understand
<whitequark> what derivers do you use right now?
<toolslive> well, show and enum
ysz has quit [Ping timeout: 245 seconds]
<whitequark> ok, you need to replace package(ppx_deriving) with package(ppx_deriving.std)
<toolslive> that's it?
<mcc> drup: haha, for context, whitequark out of band suggested i bookmark it for later
<mcc> but, yes, good advice
<whitequark> toolslive: yep
<toolslive> well, your project's ocamlbuild.ml suggests otherwise....
<whitequark> toolslive: ppx_deriving's ocamlbuild itself? it cannot use -package, because it itself provides that package
<toolslive> now I understand it's different for when you're inside the project....
<whitequark> myocamlbuild.ml rather
<jpdeplaix> whitequark: by the way, did you take a look at ollvm ?
<whitequark> jpdeplaix: it's the thing that generates textual IR, right?
<whitequark> this is explicitly discouraged by the LLVM docs.
<whitequark> you can infer how high an opinion I have about it
<toolslive> @whitequark you might want to add some line in the documentation somewhere as you will not be around to help out all the time....
<toolslive> meanwhile, it works....
<whitequark> toolslive: I wrote that in README and in the caml-list mail
ysz has joined #ocaml
<whitequark> well, that being said, you're not the first with this issue. perhaps I was unclear
<toolslive> "For every plugin, you need to require the corresponding package, e.g. ppx_deriving.show for the show deriver."
<toolslive> problem is that "require" is not clear
<jpdeplaix> whitequark: no, it aims to be « An higher-level LLVM binding for OCaml » It doesn't generates textual IR
<whitequark> toolslive: oh I see! I will expand the README on that part
<toolslive> people get wrongfooted with the other advise: ocamlfind c -ppx 'ocamlfind ppx_deriving/ppx_deriving src/ppx_deriving_foo.cma'
<toolslive> I was already chaning the dispatch in myocamlbuild.ml
<toolslive> ...changing...
dsheets has quit [Ping timeout: 245 seconds]
<whitequark> it's broken, broken, broken. (* FIXME: support metadata strings and struct. Parsed as identifier here. *)
<whitequark> the lexer is entirely wrong
<whitequark> the parser is also broken and super outdated
<whitequark> this is like the poster child for the reason why you should not parse textual IR
<whitequark> it's true that existing bindings don't allow to read back the IR in its entirety, as Drup discovered, but the right approach is to fix the bindings
<jpdeplaix> yes, but you can also only use the Llvm_ez module
<whitequark> Llvm_ast and Llvm_ez should be imported inside the bindings
<whitequark> well, an equivalent of
<Drup> tbh, an ast is useless for llvm's IR
<Drup> it's not a tree.
<whitequark> Drup: not sure, haskell's LLVM-General uses it alright
<whitequark> oh also, I have like a ton of patches that bring in-tree almost all functions that LLVM-General defines privately
<whitequark> they would allow to read the entire IR
<Drup> whitequark: they're building, not reading
<Drup> to build, sure, use anything, it almost doesn't matter
<whitequark> Drup: bidirectional
avsm has quit [Quit: Leaving.]
tane has joined #ocaml
<Drup> anyway, I don't understand what's happening in APFloat.convert
<whitequark> what's the issue?
<Drup> it always returns the same boolean, both with 2 and 1e400
<Drup> :|
<whitequark> how do you get that 1e400?
avsm has joined #ocaml
<Drup> "const_float_of_string fp128_type "1e400" "
<whitequark> hm.
<whitequark> can you print it?
samrat has quit [Ping timeout: 250 seconds]
<Drup> 0xLF3CB1CCF26FBC178452FB4EC7F91973F
<whitequark> what
<whitequark> is this what dump_value gave you ;_;
<Drup> that's llvm's fp128 representation
<whitequark> I'm so excited.
<whitequark> well.
<Drup> =')
<whitequark> get out gdb, single-step through APFloat
<Drup> T____T
dsheets has joined #ocaml
ysz has quit [Remote host closed the connection]
serge has quit [Ping timeout: 245 seconds]
<whitequark> oh
<whitequark> you check both losesInfo and return value, right?
<Drup> and btw, if you get a big FP back as double/float, you simply get inf
<Drup> not sure how usefull this is, but anyway.
<Drup> whitequark: the return value is a double, what should I check ?
<whitequark> no, it's APFloat::opStatus
<Drup> oh, this return value
<Drup> no, I don't look at it, should i?
<whitequark> ... yes.
<whitequark> yes, you should.
<Drup> why ? Isn't everything in losesInfo already ?
<whitequark> nope
<whitequark> the comment above APFloat::convert says that you need to check both
samrat has joined #ocaml
<Drup> that's now how I understand it. I understand it as "losesInfo is a bit more precise than fsOk"
<whitequark> well
<whitequark> based on the source, that does seem to be the case
<Drup> s/now/not/"
<whitequark> which brings us back to gdb
<Drup> never used gdb :(
<whitequark> oh.
<whitequark> well, you're in for some more pain
<Drup> T___T
<Drup> is there a gdb tutorial for the ocamlist ?
<whitequark> I don't think so
<whitequark> I also don't know of a good gdb tutorial. I learned gdb so long ago, I don't even remember how I did it
<Drup> or at least for the non-C/C++-ist
<Drup> adrien ?
<whitequark> ... gdb is a program for debugging C/C++
<adrien> Drup: p
<adrien> r
<adrien> b
<adrien> c
<whitequark> packed red blood cells?
<adrien> print
<adrien> run
<adrien> break
<adrien> continue
bezirg has quit [Ping timeout: 245 seconds]
<adrien> and build with -g3 -ggdb3
<whitequark> oh well. I liked my variant better
<adrien> and you can build with -O2 most of the time
<adrien> :)
<adrien> l too
<adrien> bt
<whitequark> that last part is already taken care of LLVM's Debug builds
<adrien> frame to change frame from backtrace
<adrien> tada, that's it
<whitequark> (also, -ggdb3 is deprecated for like a decade)
<adrien> been using -g3 -ggdb until someone told me it was -g -ggdb3
<adrien> so now I use both
<whitequark> it's just -g today.
<whitequark> no semantical difference on any modern gcc or clang
<adrien> "man gcc" clearly states there are several debug levels
<whitequark> hm.
<whitequark> oh I see, -g3 includes macro expansion
<Drup> let's start by the simple things. How do I give a fucking argument to my program ? =')
keen________ has joined #ocaml
zpe has quit [Remote host closed the connection]
<whitequark> gdb ./foo, then inside gdb: run arg
<whitequark> or gdb ./foo --args arg
bytbox has joined #ocaml
<Drup> ah, --args, right.
keen_______ has quit [Ping timeout: 250 seconds]
<whitequark> $ gdb --aaarrrrrghh
mcc has quit [Quit: /quit]
<Drup> yeah, that too.
hausdorff has joined #ocaml
<whitequark> Drup: on a second thought I don't want to break interface of const_int
cago has left #ocaml [#ocaml]
<whitequark> it will be a very bad thing to do to any downstream code that attempts to use pre- and post-3.6
<whitequark> so, just put a label there, as documentation
<whitequark> could put it on all bare booleans while you're at it
burgobianco has quit [Max SendQ exceeded]
burgobianco has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
toolslive has quit [Ping timeout: 260 seconds]
bytbox has quit [Remote host closed the connection]
<hooplahoops> Is the OCaml the same as the ML module system, or is it different in some regards?
ygrek has joined #ocaml
<Drup> I found the issue
<Drup> (didn't gdb, in the end)
<companion_cube> hooplahoops: I think it's pretty similar
<whitequark> what was it?
<flux> hooplahoops, I'm not familiar with the ML system, but I think the basic idea is very much the same, OCaml has somewhat extended it
<Drup> <insert lot's of swearing about C and C++>
* whitequark grins
<whitequark> I am waiting
<flux> hooplahoops, for example, OCaml now has generative functors and first class modules
<Drup> whitequark: well, mostly the fact that I have no idea how to code in C
<flux> possibly othe rdifferences
<hooplahoops> companion_cube: flux cool, ok
<whitequark> did you forget & when passing the flag inside or what?
govg_ has joined #ocaml
<Drup> whitequark: I'll let the diff un-squash, so you can see
<hooplahoops> flux: what are generative functors compared to regular functors?
govg_ has quit [Quit: leaving]
<flux> hooplahoops, this explains it better than I can ;-) https://blogs.janestreet.com/ocaml-4-02-everything-else/ (search for "Generative")
<flux> the text suggests that SML used generative functors already, not sure how it used to be different
<hooplahoops> flux: cool, thanks!
govg has joined #ocaml
<flux> hooplahoops, from the usage point of view, OCaml has local open and local module alias syntax, not sure if SML had those
<flux> but they are pretty convenient
<Drup> whitequark: representation of 2 as a fp128: 0xL00000000000000004000000000000000
<Drup> yum.
toolslive has joined #ocaml
<Drup> so, hum :|
<whitequark> hah
<whitequark> yes, I wasn't even far off.
<hooplahoops> flux: yeah, that's a really cool feature
<Drup> yeah, it was that *and* something else
<Drup> this is soo annoying
<hooplahoops> flux: so a normal functor, when I instantiate it twice with the same argument module, it will return the same module?
<hooplahoops> flux: does it have a cache for that at runtime?
<hooplahoops> flux: because I can instantiate a functor F with module M from two different modules A and B
<hooplahoops> flux: and I'd still get the same module returned at runtime, with the same reference cell (in the example)?
<whitequark> I think generative functors are only about types
<hooplahoops> Oh I see, so it'd have the same type, but different cells then
<Drup> hooplahoops: it's not the same module, it's the same type
<hooplahoops> Right, ok
<Drup> (well, maybe it's the same module, but it doesn't really matter)
toolslive has quit [Ping timeout: 260 seconds]
<hooplahoops> Well, it matters since I'd get different reference cells, or the same one
zpe has joined #ocaml
<Drup> yes, that's my point, does it matter ? :)
toolslive has joined #ocaml
<Drup> you're basically never using the physical equality on this things, and you shouldn't, it's subject to compiler optimisations
elfring has joined #ocaml
SethTIsue has joined #ocaml
koderok has joined #ocaml
<hooplahoops> Hm, what I mean is that if I get the same module, it breaks the properties of the module since the cell would be shared unexpectedly
<Drup> which properties ?
<hooplahoops> Well, let's say that 't' was exposed, and the cell stores the last value I write into it, and I can query it
<hooplahoops> I wouldn't want M1's writes to be shared with M2's writes
<Drup> ah, you mean statefull modules
<hooplahoops> Yeah :)
<Drup> or modules with a state
<Drup> yes, you should use generator functors precisely for those.
<Drup> generative*
<hooplahoops> As in, take an additional (dummy) value argument, right?
<Drup> no, there is a special syntax
<Drup> which is add () as argument
<Drup> but it's not really an argument, it's just syntax
<hooplahoops> Oh, you don't pass in () when you instantiate it?
<Drup> I don't think so, need to check
<Drup> but I'm sure it doesn't translate to anything at runtime anyway, it's really only typing stuff
Intensity has joined #ocaml
<hooplahoops> Ah, ok
<hooplahoops> Does that not surmount to a sort of whole-program compilation?
<hooplahoops> E.g. I could make all modules a functor, that take a module argument Config or something, that's passed in all the way from the "main" part
<hooplahoops> So now all modules will be specialized to this Config module?
avsm has quit [Quit: Leaving.]
<Drup> yeah, except it has not much to do with compilation
<Drup> it's more like dynamic linking, if you want
<hooplahoops> Ah, so the type checking and compilation are entirely modular?
<Drup> hum ?
<Drup> what do you mean ?
<hooplahoops> as in, I can compile my functor entirely independently of its users, and its users can be compiled independently of my functor
slash^ has joined #ocaml
<ggole> Yep.
<hooplahoops> Ah, cool :)
<ggole> The only wrinkle is inlining, which breaks that a bit.
WraithM has joined #ocaml
<hooplahoops> Yeah, but I suppose that's an optional feature
ygrek has quit [Ping timeout: 272 seconds]
<Drup> whitequark: I'm done for now
<Drup> whitequark: I'm doing a final rebuild after clean, just to be sure, but it's pushed, you can look at it.
<Drup> I have enough C++ for at least a year.
WraithM has quit [Ping timeout: 265 seconds]
<whitequark> lol k
larhat has quit [Quit: Leaving.]
ygrek has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
<reynir> pattern matching on 3 nested records /o\
marynate has quit [Quit: Leaving]
bjorkintosh has quit [Ping timeout: 255 seconds]
hooplahoops has quit [Ping timeout: 256 seconds]
hooplahoops has joined #ocaml
* ggole has been there
Hannibal_Smith has joined #ocaml
bezirg has joined #ocaml
dsheets has quit [Ping timeout: 265 seconds]
yomimono has quit [Quit: Leaving]
NoNNaN has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
artagnon has quit [Changing host]
artagnon has joined #ocaml
artagnon has joined #ocaml
avsm has joined #ocaml
hooplahoops has quit [Ping timeout: 260 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
NoNNaN has quit [Ping timeout: 246 seconds]
malo has joined #ocaml
hausdorff has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 245 seconds]
avsm has quit [Ping timeout: 265 seconds]
kakadu has quit [Quit: Page closed]
<Drup> whitequark: re, it builds, test passes, you can merge if you're happy with it.
ygrek has quit [Ping timeout: 265 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
WraithM has joined #ocaml
<reynir> I could use something like Lwt_stream.from, but with type (unit -> 'a list option Lwt.t) -> 'a t
<whitequark> Drup: ugh.
<whitequark> oh, nevermind
cody__ has joined #ocaml
* reynir could use a rubber duck
<whitequark> Drup: oh, haha, you missed a fun thing in the OCaml glue code
<whitequark> it deliberately omits CAMLparam and friends when there are no OCaml objects on stack between allocations
<whitequark> because speedz
bjorkintosh has joined #ocaml
<whitequark> anyway, you don't need to change anything
rand000 has quit [Ping timeout: 255 seconds]
<ggole> That'll never go wrong during maintainence.
jwatzman|work has joined #ocaml
<adrien> :)
malo has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
kakadu has joined #ocaml
toolslive has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
_andre has quit [Quit: leaving]
<whitequark> fuck.
<whitequark> LLVM's x86 buildbots use cmake.
<whitequark> OCaml bindings can only be built with autoconf.
<whitequark> yes, it has two mostly overlapping buildsystems.
<whitequark> (╯°□°)╯︵ ┻━┻
zpe has quit [Ping timeout: 244 seconds]
rand000 has joined #ocaml
<adrien> nah, they don't overlap
<adrien> autoconf configures
<adrien> cmake builds
sinelaw has joined #ocaml
<adrien> it's definitely unable to do the configure step
<adrien> (I wish that were a mere troll but seriously, cmake _sucks_ at the configure step)
bytbox has joined #ocaml
<adrien> (by design)
<adrien> (does it look like I don't feel like writing the code I need to write?)
<whitequark> well, I dunno, it works for LLVM
<whitequark> but now I have to somehow add OCaml support to cmake
<def`> hehehe
<adrien> what does llvm depend on? :]
<adrien> and, good luck
<whitequark> adrien: LLVM can be configured and built with either cmake or autoconf
<whitequark> I don't know what godawful reasons led to this situation, honestly
samrat has quit [Quit: Computer has gone to sleep.]
toolslive has joined #ocaml
<adrien> autoconf is more portable probably
<adrien> so some people want to use something else
<adrien> but it turns out auto* is still needed
<adrien> so it's maintained in parallel
<adrien> I've seen that several times
<whitequark> I have a feeling like one of the main reasons autoconf is still there is that OCaml bindings depend on it
<Drup> whitequark: why is this an issue only know ?
<def`> adrien: I quite like ccmake to adjust config options that failed
zpe has joined #ocaml
<adrien> and cmake's support for cross-compilation is in line with its ability to do the configure step
<whitequark> Drup: I can't parse that sentence
<adrien> basically for it to work, you provide each and every value that it's supposed to find by itself
<adrien> whitequark: s/know/now/
<whitequark> oh
<whitequark> because I want OCaml bindings to be properly tested
<def`> It's much easier to fix a broken cmake than a broken autoconf, and I must be unlucky because they are really often broken
<adrien> yeah, horrible french people can't speak english
<Drup> whitequark: oh, right
<whitequark> right now they are only built on a hexagon buildbot
<adrien> def`: :)
<whitequark> hexagon is some obscure DSP architecture from TI
<adrien> def`: my cmake invocations look like
<whitequark> I have no clue why does it actually build the OCaml bindings
<whitequark> it's completely useless, ocaml doesn't even run on hexagon
<adrien> cmake ... -DCMAKE_FOO_BAR=$(pkg-config foo_bar)
<Drup> arg, "now", I didn't even saw it when re-reading >_>
<adrien> it's sad
<whitequark> oh god pkg-config and cross-compiling
<whitequark> did they finally merge the fucking patch?
<whitequark> it was something to make PKG_CONFIG not look into host /usr/lib when searching for target packages
<adrien> def`: and you need to know about config.log, it has all the data needed to fix issues
<def`> adrien: my autotool invocation looks like… ergh, it seems this macro existed only in 2.16.3, let's google this specific version
<adrien> def`: but then it's also possible to write crap code like in every language
<adrien> at some point also, you need to kick the maintainer
<adrien> whitequark: pkg-config works perfectly for cross
<adrien> set PKG_CONFIG_LIBDIR, unset PKG_CONFIG_PATH
<adrien> done
<def`> I have nothing against autotools maintainer, I mean… he's already maintaining THAT, poor him
<adrien> I meant
<adrien> the maintainer of the configure.ac and Makefile.am in the project you're using
jao has quit [Ping timeout: 245 seconds]
hausdorff has joined #ocaml
yomimono has joined #ocaml
malc_ has joined #ocaml
hausdorf_ has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 260 seconds]
hausdorff has quit [Ping timeout: 265 seconds]
tnguyen has quit [Ping timeout: 256 seconds]
tnguyen has joined #ocaml
koderok has quit [Ping timeout: 256 seconds]
bezirg has quit [Ping timeout: 255 seconds]
<reynir> Lwt_stream isn't nice to use if the next result depends on the previous, or is it just me? It seems you have to use mutable variables
<whitequark> adrien: I recall it was broken and I had to ship a patch to pkg-config
<whitequark> it was about the time it was at 0.11, I think
<whitequark> oh, no, 0.22
<adrien> not sure, I always fully set its env vars and I've never had any issue with it
hausdorf_ has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has joined #ocaml
hausdorff has joined #ocaml
<whitequark> Drup: File "/home/whitequark/Work/LLVM/build/test/Bindings/Ocaml/Output/vmcore.ml.tmp.builddir/vmcore.ml", line 1201, characters 12-22:
<whitequark> Error: Unbound value successors
<whitequark> Hint: Did you mean successor?
<whitequark> and you told me tests pass
<whitequark> -_-'
<def`> reynir: if you produce items by batch, you can use map_list to flatten your stream
<def`> otherwise, yes lwt_stream is a bit cumbersome for producers, I enjoyed async.pipe much more, though they fulfil a slightly different role
<reynir> What I'm using it for is getting paginated elements w/ http. I get the 'next' url in the response
<adrien> clearly made up
<whitequark> wtf
<reynir> So I don't think I can use map_list, unfortunately :/ I ended up writing my own type and a converter to Lwt_stream.t
<Drup> and there is a function called "successors"
<Drup> whitequark: did you missed a patch ?
<whitequark> that's possible
Simn has joined #ocaml
<reynir> In order to keep the mutable variables in as few places as possible :)
slash^ has quit [Read error: Connection reset by peer]
<whitequark> I did miss a patch indeed
<Drup> .
<whitequark> it's a bit tricky, because of git-svn
<reynir> This is the code http://lpaste.net/113350
<whitequark> I need to edit all your patches and add attribution to them, as they will be committed under my name
<Drup> I know, hence the question :)
<whitequark> and a few other issues as well
<Drup> other issues ?
Sim_n has quit [Ping timeout: 260 seconds]
<reynir> Not sure if it's ideal, though
<whitequark> I fixed a few style issues as well
<Drup> show me, so I can not do them next time
hausdorff has quit [Remote host closed the connection]
martintrojer has quit [Ping timeout: 272 seconds]
<whitequark> space before ;, {} for single-line ifs, single-letter variable names
serge has joined #ocaml
<Drup> oh, C++ syntax issues.
<whitequark> indeed
martintrojer has joined #ocaml
<Drup> yeah, I must say it's a language which I don't know the best practice
<Drup> well, except "Don't."
<whitequark> I also squashed some commits and edited commit messages and the like
<Drup> k
<Drup> you usually ask me to be very atomic for llvm, so I was :D
mcclurmc has quit [Remote host closed the connection]
<whitequark> sure, it's not a problem. you don't have to know exact stylistic conventions, I'll edit them alright
<whitequark> it's easier to squash than unsquash, too
<Drup> indeed
serge has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Quit: WeeChat 1.1-dev]
sinelaw has quit [Ping timeout: 256 seconds]
Sim_n has joined #ocaml
hausdorff has joined #ocaml
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
Simn has quit [Ping timeout: 260 seconds]
hooplahoops has joined #ocaml
AlexRussia has joined #ocaml
<whitequark> Drup: ok, all committed
<Drup> wooo
manud has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
cody__ has quit [Quit: Leaving]
avsm has joined #ocaml
<nicoo> whitequark: « I had to ship a patch to pkg-config » -> The baroque freedesktop implementation or pkgconf, the ANSI C reimplementation from GSoC 2011 ?
<whitequark> it was pre-2011
<adrien> .22 is definitely older than 2011
<adrien> I'm never going to complain about pkg-config because...
<adrien> % ls /usr/bin/*-config | wc -l
<adrien> 75
<adrien> and these fail _hard_ for cross-compialtion
<adrien> compilation*
tnguyen has quit [Ping timeout: 265 seconds]
tnguyen has joined #ocaml
Sim_n has quit [Ping timeout: 260 seconds]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hooplahoops has quit [Quit: leaving]
manud has quit [Quit: manud]
avsm has quit [Quit: Leaving.]
WraithM has quit [Ping timeout: 240 seconds]
tnguyen has quit [Ping timeout: 256 seconds]
sepp2k has quit [Quit: Konversation terminated!]
NoNNaN has joined #ocaml
<Drup> whitequark: oh crap
<Drup> "@see llvm::ConstantFP::getDoubleValue"
<Drup> we didn't add it in the end.
hausdorff has quit [Remote host closed the connection]
<whitequark> ok, I will fix a bit later
manud has joined #ocaml
sepp2k has joined #ocaml
hausdorff has joined #ocaml
sepp2k has quit [Client Quit]
tinaj1234_ has joined #ocaml
pela has joined #ocaml
<tinaj1234_> I'm working on this file, which has both parts of ocaml and coccinelle script. I'm getting a error around line 61 of https://dpaste.de/sgmU . Seems like I've a syntax error. Can anyone please look into this?
pela has quit [Client Quit]
ggole has quit [Ping timeout: 250 seconds]
<Drup> you forgot a ;
<adrien> end of line 60, what Drup said
<tinaj1234_> a semicolon at end of line 60?
<Drup> yes
<Drup> it shouldn't be a syntax error, though
lordkryss has joined #ocaml
<Drup> it doesn't give you the location ?
<Drup> what sort of crappy preprocessor is that :x
<tinaj1234_> File "/home/tina/iteration.cocci", line 66, characters 0-3:
<Drup> ah !
<Drup> so, yes, it was indeed the ";"
<Drup> (just tried, it does give a syntax error, which is slightly surprising, but ok)
<tinaj1234_> let me run it again
<tinaj1234_> anything wrong with if synatax?
<Drup> no, why ?
<tinaj1234_> nothing just wondering
<tinaj1234_> hi
<tinaj1234_> sorry, wrong window
<tinaj1234_> it's the semicolon after end on line 62
<Drup> (22:00:48) adrien: end of line 60, what Drup said
<tinaj1234_> um, end on line 62
fraggle_ has quit [Remote host closed the connection]
axiles has quit [Quit: Quitte]
nop0x07bc has quit [Quit: WeeChat 1.0.1]
fraggle_ has joined #ocaml
<whitequark> @$(ECHOPATH) s=@OCAMLOPT@=$(OCAMLOPT) -cc $(subst *,'\\\"',*$(subst =,"\\=",$(CXX_FOR_OCAMLOPT))*) -cclib -L$(LibDir) -I $(LibDir)/ocaml=g >> lit.tmp
<whitequark> the hell is this supposed to do.
<whitequark> oh my god why *_*
<whitequark> CC_FOR_OCAMLOPT := $(shell $(OCAMLOPT) -config | grep native_c_compiler | sed -e 's/native_c_compiler: //')
<whitequark> CXX_FOR_OCAMLOPT := $(subst gcc,g++,$(CC_FOR_OCAMLOPT))
<whitequark> it gets the compiler ocamlopt uses
<whitequark> globally substitutes gcc to g++
<whitequark> and puts it back
Submarine has quit [Remote host closed the connection]
<whitequark> leading to funny bugs like http://llvm.org/bugs/show_bug.cgi?id=14727
<whitequark> because the guy had gcc located in /mnt/sdb8/sergei/AFSWD_debug/20121021/gcc-4.5.4
<Drup> ahah XD
mcclurmc has joined #ocaml
badon has quit [Quit: Leaving]
ygrek has joined #ocaml
hausdorff has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 265 seconds]
hausdorff has joined #ocaml
olauzon has quit [Quit: olauzon]
tane has quit [Quit: Verlassend]
SethTIsue has quit [Quit: SethTIsue]
bytbox has quit [Remote host closed the connection]
elfring has quit [Quit: Konversation terminated!]
tnguyen has joined #ocaml
shinnya has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 258 seconds]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
tnguyen has quit [Ping timeout: 245 seconds]
malc_ has quit [Remote host closed the connection]
ygrek_ has quit [Remote host closed the connection]
thmslld has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
manud has quit [Quit: manud]
tnguyen has quit [Ping timeout: 255 seconds]
badon has joined #ocaml
tnguyen has joined #ocaml
NoNNaN has left #ocaml ["PART ##fsharp :PING 1414538696"]
hausdorff has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
thmslld has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 244 seconds]
toolslive has quit [Ping timeout: 260 seconds]
struktured has joined #ocaml