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 joined #ocaml
NoNNaN has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
oscar_toro has quit [Ping timeout: 255 seconds]
hausdorff has joined #ocaml
waneck has quit [Remote host closed the connection]
jonludlam has quit [Quit: Coyote finally caught me]
WraithM has joined #ocaml
SHODAN has quit [Remote host closed the connection]
SHODAN has joined #ocaml
badkins has joined #ocaml
jordjordjord has quit [Remote host closed the connection]
badon_ has joined #ocaml
badon has quit [Disconnected by services]
marynate has joined #ocaml
badon_ is now known as badon
ontologiae has joined #ocaml
rand000 has quit [Quit: leaving]
zpe has joined #ocaml
_tca is now known as cojy
badkins has quit [Remote host closed the connection]
shinnya has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
divyanshu has joined #ocaml
manud has joined #ocaml
hausdorff has quit [Remote host closed the connection]
BitPuffin has quit [Ping timeout: 255 seconds]
taion809 has joined #ocaml
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
zpe has joined #ocaml
badkins has joined #ocaml
manud has quit [Quit: manud]
hausdorff has quit [Ping timeout: 255 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
jabesed has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 256 seconds]
hugomg has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 250 seconds]
hausdorff has joined #ocaml
jabesed has joined #ocaml
hausdorff has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
serge has joined #ocaml
koderok has joined #ocaml
zpe has joined #ocaml
r0ok has joined #ocaml
r0ok has joined #ocaml
koderok has quit [Read error: Connection reset by peer]
manud has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
divyanshu has joined #ocaml
manud has quit [Client Quit]
badkins has quit []
<Pepe_> I'm having difficulties with opam and core still.
<Pepe_> I got core to build correctly with the "patch" I got on their issue tracker, but they updated and now when I want to update core it fails
<Pepe_> I can compile their git version though, which is fixed, but the opam repo isn't up-to-date yet
<Drup> so, hum, what's the question ? :p
<Pepe_> hmmm
<Pepe_> I'm not sure
<Pepe_> how do I fix everything?
<Pepe_> wait a second, I'll get the exact error
taion809 has quit [Remote host closed the connection]
<Pepe_> https://bpaste.net/show/40f7a1d11728 ; though let me take a look at the last error
<Drup> do a make clean in your project and re-pin.
<Drup> you might want to pass "-k git" to opam pin
<Pepe_> make clean in what project?
<Drup> core
<Pepe_> it's janestreet's repo
<Pepe_> that I'm directly pinning
<Drup> "/home/ppjet/.opam/system/build/core.pinned"
<Drup> That's not :p
<Pepe_> ah
<Pepe_> make clean didn't make it
<Pepe_> same error
<Pepe_> also I repinned with -k
<Drup> can you post with --verbose ?
<Pepe_> sec
pharpend has quit [Quit: WeeChat 0.4.3]
pharpend has joined #ocaml
ygrek has joined #ocaml
<Drup> hum
<Drup> did you have "eval `opam config env`" in your .bashrc (or whatever you have)
<Drup> ?
ygrek has quit [Remote host closed the connection]
<Pepe_> I do have that in my zshrc
<Drup> make distclean ? =')
<Drup> twice.
<Drup> and pin again after
<Drup> :oasis:
<Drup> oh and since you're on opam 1.1, opam update after re-pinning
<Pepe_> I updated like 15minutes ago
<Pepe_> or you mean system update?
<Drup> I mean "opam update"
<Drup> you can compile your modified core directly, can you ?
ygrek_ has joined #ocaml
WraithM has quit [Quit: Lost terminal]
<Pepe_> it's not modified at all
<Pepe_> I can git clone and build it myself, but opam doesn't manage to
<Drup> something seems to me mangled in your instalation between the system's findlib and opam's findlib
zpe has joined #ocaml
<Pepe_> opam tells me everything is up-to-date
<Drup> hence the directives I gave to 1) check env variables are in place 2) nuke an eventual old ./configure
<Drup> Pepe_: what is the result of "which ocamlfind" ?
ontologiae has quit [Ping timeout: 255 seconds]
<Pepe_> /home/ppjet/.opam/system/bin/ocamlfind
zpe has quit [Ping timeout: 255 seconds]
<Drup> which distrib are you running ?
<Pepe_> Archlinux
<Drup> remove everything system managed except the compiler
<Pepe_> Ah, there's a 1.2 version for opam
<Drup> yeah
<Drup> but that's not the issue here
<Pepe_> ok
<Drup> at least, I doubt so
<Drup> (but you should upgrade)
<Drup> Pepe_: tbh, the simplest method is probably just not use the system switch
<Pepe_> https://bpaste.net/show/04019c6cf006 let me remove the libraries
<Pepe_> heh
<Pepe_> though there's no 4.02 atm right?
<Drup> of course there is
<Pepe_> or maybe because system is 4.02 it doesn't appear in my switches
<Pepe_> Ah, it does
<Pepe_> It didn't 2 weeks ago iirc
<Pepe_> or 3 maybe
<Drup> that's just by lack of update/upgrade :D
<Pepe_> :)
<Pepe_> Well then let me switch to 4.02
<Pepe_> btw, when you pin a package, apparently it doesn't take into account the version anymore, and I got some dependency issues because of that "you are using a pinned version [..]"
<Pepe_> it's fine for now though
<Pepe_> I'll also update opam to 1.2
<Drup> the situation is better in 1.2 for pinned things
<Pepe_> ok
araujo has quit [Quit: Leaving]
<Pepe_> ah, it failed building camlp4
<Drup> "Cannot allocate memory" ? :D
<Drup> Are you running on a potato ? :3
<Pepe_> vps
<Pepe_> 512 or 256MB
<Pepe_> I don't remember exactly
<Drup> indeed, that's quite a potato. :D
<Pepe_> :)
<Drup> I can't do much for that, sorry.
<Pepe_> :(
<Pepe_> Ah, maybe that's why I used the arch package instead :p
keen_____ has joined #ocaml
<Pepe_> since it's already built
<Drup> or maybe just put /tmp on your hard drive temporally
keen____ has quit [Ping timeout: 245 seconds]
<Drup> and get a bigger swap
<Pepe_> ah, wtf I forgot about that
<Pepe_> fk systemd
<Pepe_> I guess it'll have to wait until I get home, gateone needs /tmp and that's the only accesspoint I have for now :/
<Pepe_> Drup: btw, do you think it'd be easily feasible to add a mingw-ocaml compiler to the list?
<Pepe_> (opam switch)
<Drup> you mean, a cross compiler to windows ?
<Drup> :]
<Drup> I'll let you discuss that with adrien and whitequark.
<Pepe_> I know fedora has mingw32-ocaml, and I remember I was using it a few years ago (or maybe we recompiled ocaml from there, not sure)
axiles has joined #ocaml
<Pepe_> (from there, I mean from mingw)
<Pepe_> at the beginning of 3.11
<Pepe_> or .10 :/
<Drup> I'm incompetent in windows matters, and I'm quite happy about it, so I can't and won't say anything ^^'
mcclurmc has joined #ocaml
<Pepe_> probably more competent than I am anyway :P
serge has quit [Remote host closed the connection]
serge has joined #ocaml
hbar has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
koderok has joined #ocaml
serge has quit [Ping timeout: 255 seconds]
zpe has quit [Ping timeout: 260 seconds]
samrat has quit [Ping timeout: 245 seconds]
demonimin has quit [Ping timeout: 260 seconds]
samrat has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
ggole has joined #ocaml
serge has joined #ocaml
slash^ has joined #ocaml
Submarine has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
zpe has joined #ocaml
MercurialAlchemi has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
koderok has quit [Ping timeout: 245 seconds]
koderok has joined #ocaml
koderok has quit [Read error: Connection reset by peer]
jpu has joined #ocaml
koderok has joined #ocaml
manud has joined #ocaml
<jpu> Hello there, I want to use camlp5 to translate expression "dbg_begin x1;x2 dbg_end" to "()". It works fine for most of my file. But it fails when the file contains "let (<<) = (lsl)"
<jpu> Error message says Lexing error: quotation not terminated
<jpu> I got really confused
<Drup> I didn't know anyone except coq people was using camlp5 ^^'
<jpu> oh no
<jpu> what am I supposed to use in this situation?
<Drup> I would tend to say ppx
<Drup> but at least, camlp4 is more common that camlp5
<jpu> I tried camlp4 first, wow camlp4 wiki really....sucks....
<Drup> oh yes
<Drup> not only the wiki.
<jpu> And then I turned to camlp5....
<ggole> Is camlp4 still basically undocumented?
<Drup> ggole: basically yes
<Drup> jpu: I would advise ppx, you can start your journey by http://whitequark.org/blog/2014/04/16/a-guide-to-extension-points-in-ocaml/
<jpu> code on official one does not work anymore.
<Drup> do not be afraid by the introduction, it's in the last *stable* ocaml (4.02.1) now :3
<jpu> Drup: Thanks. I just found I visited the site today.
<jpu> I thought it was about camlp4
samrat has joined #ocaml
<jpu> Great. Thanks! Drup
WraithM has joined #ocaml
kakadu has joined #ocaml
Submarine has quit [Ping timeout: 265 seconds]
Submarine has joined #ocaml
jpu has quit [Quit: Page closed]
sivoais has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
<Drup> whitequark: ok enough llvm for today https://github.com/Drup/llvm/compare/llvm-mirror:master...master
<adrien> it's only 8am
<adrien> work more!
jao has quit [Ping timeout: 240 seconds]
<Drup> and with my termination checker, which uses the successor stuff and the new float functions (both comparison and constants)
<Drup> adrien: calm down, I've written C++ today, I deserve rest.
<adrien> you need to do more ocaml to compensate
<adrien> like
<adrien> make Filename.split :P
<Drup> I did wonder why it was not there, when doing some stuff with filenames
<def`> Filename.split ?
<def`> Filename.dirname &&& Filename.basename ?
<adrien> split a path into its components so you can List.fold_left Filename.concat on it
<adrien> it's not trivial :P
<def`> ah yeah
hbar has joined #ocaml
<adrien> right now I'm tempted to give the task to a thousand monkeys
<adrien> it should eventually work
<def`> tested with success under unices & windows
<adrien> hmmmmmmmmm
zpe has joined #ocaml
<def`> (but I agree that weird cases like in your issue are not tested :-), waiting for bug reports :_D)
<adrien> doesn't seem to work for "C:\\a\\b\\c"
<adrien> on Windows
<adrien> unless my environment is dirty, I get
<adrien> # split_path s [];;
<adrien> - : string list = ["."; "C:\\a\\b\\c"]
<adrien> oh, crap
<adrien> too early in the morning
manud has quit [Ping timeout: 255 seconds]
zpe has quit [Ping timeout: 265 seconds]
morphles has joined #ocaml
<def`> # split_path "C:\\a\\b\\c" [];;
<def`> - : string list = ["C:\\"; "a"; "b"; "c"]
<adrien> yeah, I was trying to understand why my own code wasn't working; I had forgotten the "dir ::" at some point =/
<adrien> ='(
<adrien> thanks
<def`> however, canonicalize_filename fails with drive specific relative directory
<def`> this is because of the test on line 76 which doesn't assume drive specifier in front of current_dir, and line 77 where I have no idea how to get a relative directory on a specific drive
<def`> get the cwd on specific drive I mean*
<def`> … this should just disappear
contempt has quit [Ping timeout: 250 seconds]
serge has quit []
<adrien> depends, the output doesn't have to be pretty
manud has joined #ocaml
anddam has joined #ocaml
<anddam> hello, I just ran "opam init" and got several "[ERROR] Your version of OPAM (1.1.2) is not recent enough to read <skip> Upgrade OPAM to a more recent version (at least 1.2) to read this file correctly." still opam seems to be able to search and show packages' info
<anddam> I never ran a newer version, were the 1.2 format downloaded when running the 'init' action?
WraithM has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Ping timeout: 265 seconds]
<Drup> it tried to fetch the repository, saw some package it couldn't read and skiped them
<Drup> so, you can't install them, but you can install the rest
<anddam> thanks, that was just out of curiosity
<anddam> I was upgrading the opam port to 1.1.2 and noticed 1.2.0 just came out
<Drup> time to upgrade again, then :p
<anddam> doing already
samrat has quit [Quit: Computer has gone to sleep.]
larhat has joined #ocaml
<anddam> ok got just a "[WARNING] Recommended external solver aspcud not found."
<Drup> you should package aspcud too, it's really a big improvement
larhat has quit [Quit: Leaving.]
<anddam> "aspcud is a solver for CUDF instances based on ASP tools developed within the potassco project. It utilizes the preprocessor cudf2lp that rewrites CUDF specifications into ASP facts. These facts together with an ASP program are then passed to grounder gringo and are finally solved by solver clasp."
<anddam> I don't have the slightest idea about what that line means
<Drup> :D
<anddam> ASP as in MS's ASP?
<Drup> it solves package dependencies.
<Drup> no
<anddam> Answer Set Programming developed at the University of Potsdam
<anddam> been there
<anddam> I mean Potsdam
<anddam> I'll see if I can package aspucd, I'm not an ocaml user myself (yet), but it's on the list
<adrien> def`: looks correct to me; what probably won't be handled is UNC paths (i.e. \\server\resource) but that's because of Filename
<anddam> thanks again for the info
<anddam> see you
<adrien> # MyFilename.Win32.dirname "\\\\server";;
<adrien> - : string = "\\"
<adrien> (and I don't think it's correct)
anddam has left #ocaml ["WeeChat 1.0"]
contempt has joined #ocaml
larhat has joined #ocaml
oscar_toro has joined #ocaml
shinnya has joined #ocaml
zpe has joined #ocaml
sinelaw has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
Submarine has quit [Quit: Leaving]
serge has joined #ocaml
marvin-hh has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
hhugo1 has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
tane has joined #ocaml
hhugo1 has quit [Quit: Leaving.]
hhugo1 has joined #ocaml
oscar_toro has quit [Ping timeout: 244 seconds]
lordkryss has joined #ocaml
marvin-hh has joined #ocaml
Simn has joined #ocaml
samrat has joined #ocaml
manud has quit [Quit: manud]
hhugo1 has quit [Quit: Leaving.]
slash^1 has joined #ocaml
slash^ has quit [Ping timeout: 272 seconds]
ggole has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
marvin-hh has quit [Ping timeout: 240 seconds]
marvin-hh has joined #ocaml
Anarchos has joined #ocaml
marynate has quit [Quit: Leaving]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
Thooms has joined #ocaml
morphles has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
Simn has quit [Ping timeout: 260 seconds]
BitPuffin has left #ocaml [#ocaml]
_robbins has quit [Quit: Leaving]
koderok has quit [Ping timeout: 255 seconds]
oscar_toro has joined #ocaml
<dinosaure> It's possible to use sedlex with menhir ?
rand000 has joined #ocaml
sheijk has joined #ocaml
marvin-hh has quit [Ping timeout: 256 seconds]
marvin-hh has joined #ocaml
<whitequark> yes
<Leonidas> so, if I have a function that converts string -> topic (an opaque string type with a limitation of 250 characters), should this have a string -> token signature and throw an exception or better string -> token option?
<dinosaure> how to use :} ? Interface of Sedlexing is not same as Lexing :d
<Leonidas> I tend toward the latter, but unwrapping options all the time makes for an annoying API.
Simn has joined #ocaml
malc_ has joined #ocaml
<ggole> Provide both? foo: thing -> t option and foo_exn: thing -> t?
<whitequark> dinosaure: one moment
<dinosaure> no problem
<sheijk> does anyone know why the package for opam 1.2 in os x/homebrew suddenly requires xquartz? the version is "0.0.0" so this looks like a mistake to me
<whitequark> dinosaure: Lexer in this example is ulex, I think, but it's the same with sedlex
<dinosaure> yes, I see
<dinosaure> thx
dsheets has joined #ocaml
marvin-hh has quit [Ping timeout: 255 seconds]
nico12 has joined #ocaml
koderok has joined #ocaml
nico12 has quit [Ping timeout: 244 seconds]
divyanshu has quit [Ping timeout: 265 seconds]
koderok has quit [Read error: Connection reset by peer]
koderok has joined #ocaml
girrig has quit [Ping timeout: 260 seconds]
esden has quit [Ping timeout: 260 seconds]
bytbox has quit [Ping timeout: 260 seconds]
ggherdov has quit [Ping timeout: 260 seconds]
Simn has quit [Ping timeout: 260 seconds]
ggole has quit [Ping timeout: 260 seconds]
pii4 has quit [Ping timeout: 260 seconds]
fraggle_ has quit [Ping timeout: 260 seconds]
kaustuv has quit [Ping timeout: 260 seconds]
asmanur has quit [Ping timeout: 260 seconds]
gustav___ has quit [Ping timeout: 260 seconds]
kalzz has quit [Ping timeout: 260 seconds]
xorpse has quit [Ping timeout: 260 seconds]
Nahra has quit [Ping timeout: 260 seconds]
Leonidas has quit [Ping timeout: 260 seconds]
gperetin has quit [Ping timeout: 260 seconds]
dinosaure has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
whitequark has quit [Ping timeout: 260 seconds]
contempt has quit [Ping timeout: 260 seconds]
jzelinskie has quit [Ping timeout: 260 seconds]
n0v has quit [Ping timeout: 260 seconds]
sinelaw has quit [Ping timeout: 260 seconds]
olasd has quit [Ping timeout: 260 seconds]
Plazma has quit [Read error: Connection reset by peer]
Plazma has joined #ocaml
esden has joined #ocaml
gperetin has joined #ocaml
freling has quit [Ping timeout: 260 seconds]
Sim_n has joined #ocaml
Hannibal_Smith has joined #ocaml
Nahra` has joined #ocaml
asmanur_ has joined #ocaml
Leonidas_ has joined #ocaml
dinosaure1 has joined #ocaml
gustav__1 has joined #ocaml
OnkV has joined #ocaml
whitequa1k has joined #ocaml
contempt has joined #ocaml
jzelinskie_ has joined #ocaml
ggole_ has joined #ocaml
pii_4_ has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
andreypopp_ has quit [Ping timeout: 260 seconds]
olasd has joined #ocaml
n0v has joined #ocaml
cdidd has joined #ocaml
_andre has quit [Ping timeout: 260 seconds]
_andre has joined #ocaml
whitequa1k is now known as whitequark
kalzz has joined #ocaml
sinelaw has joined #ocaml
Guest67269 has joined #ocaml
xorpse has joined #ocaml
dsheets has joined #ocaml
fraggle_ has joined #ocaml
girrig has joined #ocaml
freling has joined #ocaml
samrat has joined #ocaml
ggherdov has joined #ocaml
marvin-hh has joined #ocaml
BitPuffin has joined #ocaml
darkf has quit [Quit: Leaving]
elfring has joined #ocaml
ontologiae has joined #ocaml
Leonidas_ is now known as Leonidas
ontologiae has quit [Ping timeout: 255 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
larhat1 has joined #ocaml
cago has joined #ocaml
jpdeplaix` has joined #ocaml
AdmWiggin has joined #ocaml
larhat has quit [*.net *.split]
pharpend has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
jpdeplaix has quit [*.net *.split]
milosn_ has quit [*.net *.split]
tianon has quit [*.net *.split]
NoNNaN has quit [*.net *.split]
nicoo has quit [*.net *.split]
dsheets has quit [Ping timeout: 245 seconds]
bjorkintosh has joined #ocaml
milosn has joined #ocaml
pharpend has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
badon_ has joined #ocaml
reventlo1 has joined #ocaml
reventlov has quit [Quit: leaving]
badon has quit [Ping timeout: 244 seconds]
reventlo1 has quit [Client Quit]
badon_ is now known as badon
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
reventlov has joined #ocaml
Asmadeus_ has joined #ocaml
Asmadeus has quit [Read error: Connection reset by peer]
vincom2 has quit [Remote host closed the connection]
vincom2 has joined #ocaml
bytbox has joined #ocaml
ft_ has joined #ocaml
ggole_ is now known as ggole
ft_ has quit [Quit: leaving]
panini has joined #ocaml
martintrojer has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
martintrojer has joined #ocaml
pii_4_ is now known as pii4
pii4 has quit [Changing host]
pii4 has joined #ocaml
n1ftyn8 has quit [Ping timeout: 272 seconds]
jzelinskie_ has quit [Ping timeout: 265 seconds]
cojy has quit [Read error: Connection reset by peer]
rfv has quit [Ping timeout: 272 seconds]
zpe has quit [Ping timeout: 240 seconds]
msch has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
vogler has joined #ocaml
voglerr has quit [Ping timeout: 255 seconds]
AdmWiggin is now known as tianon
dinosaure1 is now known as dinosaure
vogler has quit [Ping timeout: 244 seconds]
hhugo1 has joined #ocaml
samrat has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
hhugo1 has quit [Quit: Leaving.]
hhugo1 has joined #ocaml
cojy has joined #ocaml
jzelinskie_ has joined #ocaml
panini has quit [Quit: Leaving]
sinelaw has quit [Ping timeout: 258 seconds]
<Drup> whitequark: ping ?
serge has quit [Remote host closed the connection]
n1ftyn8 has joined #ocaml
serge has joined #ocaml
serge has quit [Ping timeout: 258 seconds]
slash^ has joined #ocaml
slash^1 has quit [Ping timeout: 272 seconds]
msch has joined #ocaml
rfv has joined #ocaml
morphles has joined #ocaml
AlexRussia has quit [Quit: WeeChat 1.1-dev]
steshaw has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
morphles has quit [Ping timeout: 244 seconds]
<artagnon> whitequark: If I understand correctly, LLVMAddGlobalMapping and LLVMGetPointerToGlobal will have to be used by the OCaml user, right?
<artagnon> What is the "new" API to initialize ee and call run_function?
pharpend has quit [Quit: WeeChat 0.4.3]
pharpend has joined #ocaml
<artagnon> Is this describing ctypes? Because it doesn't mention it anywhere. http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html
<artagnon> sheijk: For the UI libraries, I guess.
jgjl has joined #ocaml
<Drup> artagnon: no, ctypes is https://github.com/ocamllabs/ocaml-ctypes
<artagnon> I wonder why whitequark asked me to use that.
<artagnon> The standard solution is good enough, right?
pharpend_ has joined #ocaml
<Drup> I don't know. I though it was about libffi
koderok has quit [Ping timeout: 255 seconds]
pharpend has quit [Ping timeout: 265 seconds]
pharpend_ is now known as pharpend
BitPuffin has quit [Ping timeout: 240 seconds]
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
jgjl has joined #ocaml
<whitequark> artagnon: there is none.
<whitequark> there is no way to call functions via Llvm_executionengine right now.
<whitequark> it's broken, essentially.
<whitequark> and it is your job to fix it, at least if you want it to work
<artagnon> Huh? How did it break?
<artagnon> Yeah, but I need help.
<whitequark> it broke after the JIT→MCJIT migration.
<artagnon> Ah.
<artagnon> Okay, so why ctypes?
<whitequark> because it's a binding to libffi
<whitequark> any binding to libffi will work, but I only know about ctypes
divyanshu has joined #ocaml
<artagnon> Why do you need to bind to libffi?
<artagnon> What's wrong with the existing functions?
nicoo has joined #ocaml
<whitequark> well, how are you going to call functions that LLVM compiled for you?
<whitequark> given that run_function is broken and will not be fixed.
<whitequark> you can get the address of the function using LLVMGetPointerToGlobal
<artagnon> "will not be fixed"?
<whitequark> yup
<artagnon> Why not?
<whitequark> it's deprecated
<artagnon> I want it.
<artagnon> Oh.
<artagnon> What's the alternative?
<whitequark> libffi/
<artagnon> I see.
<artagnon> So libffi provides a common interface for various languages? They must represent their data in libffi types for interop?
<whitequark> basically
<whitequark> the Llvm_executionengine.GenericValue is essentially a homegrown version of libffi inside LLVM
<artagnon> Interesting.
<whitequark> it was deprecated, I guess, specifically because libffi exists separately
<artagnon> Right.
<artagnon> Okay, what happens to the existing CAMLPrim functions?
<artagnon> The ones that don't bind to libffi?
<whitequark> what?
<artagnon> Functions like create_mcjit?
ygrek has joined #ocaml
<artagnon> I didn't use ctypes for that.
<whitequark> no, you don't need libffi to call LLVM itself.
<whitequark> you need libffi to invoke the code you've just JIT-compiled
<artagnon> Ah, okay.
<artagnon> Things like AsmPrinter have been ported to libffi so they can access JIT'ted code?
<whitequark> ... no?
<whitequark> LLVM itself is not involved with libffi in any way whatsoever
<artagnon> Slightly unrelated, but I have a question about how AsmPrinter works.
<whitequark> it compiles you a function and gives you a pointer to it.
<whitequark> after that, it doesn't care in the slightest what are you going to do with it.
<artagnon> But it has stack crawlers and frametable dumpers?
<whitequark> I'm not sure what are you talking about
<artagnon> Okay, that's internal to LLVM's generation operation; never mind.
<artagnon> About GCMetadataPrinter: when and where does it print the information?
<artagnon> When I'm JIT'ting functions, only when they're being executed is the stack frame available.
<whitequark> I actually think it doesn't work with JIT at all
<artagnon> ! >_<
<whitequark> but you'll need to ask on #llvm.
<artagnon> That channel is almost dead :(
<whitequark> it's not
<whitequark> er
<whitequark> #llvm at irc.oftc.net
<whitequark> not at freenode.net
<artagnon> Oh!
<artagnon> Thanks again; I'll try to work on exposing those two functions on my long flight today.
Asmadeus_ is now known as Asmadeus
ygrek has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
WraithM has joined #ocaml
morphles has joined #ocaml
vogler has joined #ocaml
hhugo2 has joined #ocaml
hhugo1 has quit [Ping timeout: 260 seconds]
vogler has quit [Ping timeout: 255 seconds]
dav has joined #ocaml
WraithM has quit [Ping timeout: 244 seconds]
<sheijk> meh, how do i debug ocamlfind/opam. made a package and after installation it doesn't show up in "ocamlfind list" and i've no idea what to check
<sheijk> https://github.com/sheijk/ppx_string_interpolate <- current state is here. will install fine using opam, puts a bunch of files into ~/.opam/4.02.1/lib/ppx_string_interpolate/ (META, ppx_string.native), but ocamlfind list won't show the package
serge has joined #ocaml
<Leonidas> oh, that's a nice package :-)
<sheijk> if i could get it to work :)
Hannibal_Smith has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
serge has quit [Ping timeout: 255 seconds]
voglerr has joined #ocaml
fraggle-boate_ has quit [Quit: Quitte]
fraggle-boate has joined #ocaml
vogler has joined #ocaml
morphles has quit [Ping timeout: 258 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
voglerr has quit [Ping timeout: 245 seconds]
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
ygrek has joined #ocaml
morphles has joined #ocaml
WraithM has joined #ocaml
BitPuffin has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
<Drup> sheijk: your package seem to be broken on latest ppx_deriving
<Drup> and also, please, use a proper build system. You could argue that "my library is very simple" but apparently it's not simple enough.
<reynir> his email on caml-list ended up in my spam folder in gmail. Seems to happen a lot lately w/ caml-list mails for me at least
vogler has quit [Ping timeout: 255 seconds]
<Drup> sheijk: https://github.com/sheijk/ppx_string_interpolate/blob/master/src/ppx_string.ml#L50-L64 you can probably simplify that with Ast_convenience.list
vogler has joined #ocaml
<Drup> sheijk: https://github.com/sheijk/ppx_string_interpolate/blob/master/src/ppx_string.ml#L33 this doesn't handle nested parentheses (for example "bla $(string_of_int (f x))")
<Drup> also, I'm not sure why you're using latin1
samrat has quit [Ping timeout: 250 seconds]
WraithM has quit [Ping timeout: 255 seconds]
reynir has quit [Quit: brb]
reynir has joined #ocaml
samrat has joined #ocaml
vogler has quit [Ping timeout: 244 seconds]
NoNNaN has joined #ocaml
<sheijk> Drup: it's only handling a single identifier in the parentheses. using the ocaml lexer to parse a balanced expression is planned for sometime in the future
<sheijk> and ppx_deriving seems to have changed it's interface. will need to adapt that
ygrek has quit [Ping timeout: 240 seconds]
manud has joined #ocaml
<sheijk> the build system won't change, though. ocamlbuild is usually causing more trouble for me than it's worth. there are just no "nice" build systems :\
<sheijk> Drup: latin1 is what i think what ocaml uses for identifiers
<sheijk> but that might be mistaken, didn't actually check the docs :)
<Drup> for identifiers, yes, not for strings.
<Drup> let x = "λ" is valid
<sheijk> oh, nice. so is it using utf8?
<Drup> yes
<Drup> it's just that the set of char allowed in identifiers is restricted to ascii chars
zpe has quit [Remote host closed the connection]
<Drup> (usage of latin1 char in identifiers is deprecated)
zpe has joined #ocaml
<Leonidas> interesting, now that many languages go the other way
<Drup> (tips: you can write utf8 in comments. Very usefull for math)
<ggole> Comment parsing difficulties aside -_-
vogler has joined #ocaml
pharpend has quit [Quit: WeeChat 0.4.3]
pharpend has joined #ocaml
<sheijk> Drup: yep. utf8 for source file encoding + restricting identifiers to ascii is imho the sane way to go for most languages
zpe has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
vogler has quit [Read error: Connection reset by peer]
vogler has joined #ocaml
manud has quit [Quit: manud]
WraithM has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
Sim_n has quit [Read error: Connection reset by peer]
WraithM has quit [Ping timeout: 272 seconds]
marvin-hh has quit [Read error: Connection reset by peer]
serge has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
marvin-hh has joined #ocaml
serge has quit [Ping timeout: 250 seconds]
<sheijk> Drup: ok, should work now (removed ppx_deriving dependency)
<sheijk> well, should work means it won't break due to ppx_deriving's api change but now the actual problem with opam/ocamlfind will show up :)
<Leonidas> I suppose to get the length of an string in UTF-8 I need Uutf or Camomile, right?
<Drup> yes
Guest10125 has quit [Quit: leaving]
<Leonidas> Uutf is kinda barebones, seems like I need to implement my own length based on Uutf.String.fold_utf_8 because there is no such operation in Uutf.
<Drup> Leonidas: there is also uunf, uucd and uucp
<Drup> I have no idea which one contains a length function, but I'm sure it's somwhere ^^'
vogler has quit [Read error: No route to host]
vogler has joined #ocaml
<Leonidas> okay, I thought these weren't relevant, since I don't want characteristics of the codepoints
Armael has quit [Ping timeout: 245 seconds]
<Leonidas> actually, it it is utf8, I could probably just make a function myself.
engil has quit [Ping timeout: 255 seconds]
Khady has quit [Ping timeout: 255 seconds]
dinosaure has quit [Ping timeout: 258 seconds]
<Drup> ahah, it always starts like that.
srax has quit [Ping timeout: 255 seconds]
mort___ has joined #ocaml
<Drup> next things you know, you have successfully re-implemented yet another home grown utf8 library. :p
zpe has joined #ocaml
hausdorff has joined #ocaml
Khady has joined #ocaml
engil has joined #ocaml
Armael has joined #ocaml
srax has joined #ocaml
dinosaure has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
elfring has quit [Quit: Konversation terminated!]
<Leonidas> Drup: yeah, possibly :D
<companion_cube> please don't publish it :>
<Leonidas> but camomile is dead, and I don't trust ucorelib :p
<Leonidas> companion_cube: ok, deal :D
<companion_cube> you could try submitting a patch to Uutf
<companion_cube> (not easy)
<companion_cube> doesn't it even provide a iter function?
<Leonidas> companion_cube: I'm not sure this would even fit into Uutf, since it only seems to care about streaming utf data, not doing any processing on it.
<Leonidas> companion_cube: why isn't it easy?
<companion_cube> because Daniel Bünzli doesn't always accept patches ^^
<Leonidas> (already second time I read this about dbunzli projects,)
<companion_cube> in Uutf.String: val fold_utf_8 : 'a folder -> 'a -> string -> 'a
<companion_cube> doesn't it fit?
<Leonidas> companion_cube: yes, that's exactly what I said above.
<Leonidas> but adding an external dependency on a library that doesn't even provide the exact functionality to be called once in a validation function seems overkill.
<companion_cube> you will really only need to compute the length of strings?
<Leonidas> yes.
<Leonidas> if I happen to need more, I'll use a library, no worries.
<companion_cube> just copy the code from Uutf :>
* Leonidas not completely insane
<Leonidas> I just implemented it in a rather efficient way in 6 lines, no need to copy stuff, really.
hhugo2 has quit [Quit: Leaving.]
q66[lap] has joined #ocaml
tane has quit [Quit: Verlassend]
<Leonidas> The stdlib does not disappoint in being disappointing. There is no String.to_list or similar? :-(
Thooms has joined #ocaml
<companion_cube> the stdlib is quite minimalistic
<companion_cube> if you don't want to use batteries or Core, I have a lighter solution
<Leonidas> indeed it is
<Leonidas> my current solution is "copy code from stackoverflow"
<Leonidas> though batteries has String.explode which is exactly what I want
<companion_cube> or you can take a look at "containers" on opam
<companion_cube> disclaimer: it's my library :p
girrig has quit [Ping timeout: 250 seconds]
<whitequark> I would certainly try to get a patch into Uutf
<whitequark> oh, it already has that
<companion_cube> the problem is more about having one more dependency apparently
<whitequark> I don't think a dependency on Uutf is an issue.
<whitequark> a dependency on any simple pure-OCaml library is generally not
girrig has joined #ocaml
axiles has quit [Remote host closed the connection]
morphles has quit [Ping timeout: 255 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
ggole has quit [Ping timeout: 255 seconds]
jonludlam has joined #ocaml
ontologiae has joined #ocaml
<whitequark> Drup: okay, can review LLVM patches now
<whitequark> you were too early closing the workspaces, *far* too early
cago has quit [Remote host closed the connection]
<Drup> arg :(
serge has joined #ocaml
AlexRussia has joined #ocaml
AlexRussia has quit [Client Quit]
AlexRussia has joined #ocaml
<whitequark> Drup: okay, my main gripe is as follows
serge has quit [Ping timeout: 255 seconds]
<whitequark> int_of_const asserts if the constant is wider than Int64.t
MercurialAlchemi has quit [Ping timeout: 265 seconds]
<whitequark> in fact, do you know that?
<Drup> yes
<whitequark> float_of_const should assert as well.
<whitequark> if the constant is wider than double, that is
<Drup> I agree, how do I ask that to APFloat ?
malc_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<whitequark> just replace APF.convertToDouble with an assertion failure
<Drup> (also, I didn't created the code, I took it from ConstantFolding directly)
<whitequark> yes, I've seen that
<Drup> huum, the precision level could be smaller than a double
<whitequark> in this case I think it is fine to return a double, as it is a lossless conversion
<whitequark> there could be a separate set of functions to dissect APFloat exactly as it is
<Drup> I find it weird to necessarily assert false only based on the precision level, not on the value, but if you think it's better.
Hannibal_Smith has quit [Quit: Sto andando via]
<whitequark> huh? imagine if the APFloat contained 10**400.
<whitequark> the "double" APFloat can't contain that, but "long double" APFloat? sure.
<Drup> that's my point: look at the value
<whitequark> hm, well, I'll accept either version
<Drup> can you commit it directly ? It's in the C++ api
<whitequark> "post-commit review"
<Drup> right
<Drup> ah !
<Drup> "losesInfo records whether the transformation lost information"
<Drup> just need to assert it then, easy.
<whitequark> yup.
<Drup> no remarks on the rest ?
<Drup> I used poly variant because it seems overkill to define a real type, but I don't mind adding one
<whitequark> "num_successors"
<whitequark> oh, num_operands
<Drup> yeah, I took the same naming scheme
<whitequark> Drup: get_branch doesn't handle switch opcode
<whitequark> though
<whitequark> Switch is not a BranchInst so it's fine
<Drup> it's supposed to handle only branch opcode.
<Drup> it could be extended, maybe.
<whitequark> ok, everything else seems to be fine
<Drup> =)
<whitequark> fix the float_of_const and rebase it on master, and it should be fine
<Drup> should I fix float_of_const or getDoubleValue ?
<whitequark> don't change the behavior of ConstantFolding, obviously
<Drup> yeah.
<Drup> but I need to expose the boolean, some way or another
<whitequark> hm?
<whitequark> why do you need to expose it?
<Drup> to check if there was a loss of information
<Drup> the boolean called "unused" in the current code
<whitequark> well, can't you just assert on it?
<whitequark> APFloat already exposes it
<Drup> but I only have access on it inside getDoubleValue
WraithM has joined #ocaml
oscar_toro has quit [Ping timeout: 244 seconds]
<Drup> except if you want me to duplicate the code :>
<whitequark> why inside getDoubleValue?
jonludlam has quit [Ping timeout: 265 seconds]
<whitequark> APFloat::convert is a public member
<Drup> ok, I think I'm missing something, how am I supposed to assert anything on APFloat on the C code in llvm_float_of_const ?
<Drup> it's C++, and it's not in the C Api
<whitequark> huh? no, do it in LLVMRealGetdouble
<Drup> okay, so I don't use getDoubleValue then ?
<whitequark> nope
<Drup> so I duplicate the code.
<Drup> ok.
<whitequark> you do unwrap<ConstantFP*>(v)->getValueAPF()->convert()
<whitequark> it's duplicating like three lines
<whitequark> and not even identically
<Drup> sure, I just didn't understood *where* you wanted the modification
<whitequark> in the function which first returns double, of course
<Drup> yeah, and that's "getDoubleValue" in my book, and LLVMRealGetdouble in yours :p
<Drup> hum, it means the C Call has a different semantic than the C++ one
<whitequark> forget about the C++ function
<whitequark> it was some random internal function you pulled out for the reason I don't even comprehend
<Drup> well, I pulled it out because 1) it fits my need 2) It's consistent with the function available in ConstantInt
<whitequark> it's not consistent though, specifically because it doesn't assert
<Drup> well, I could define a version that asserts, that's fine with me >_>
<Drup> (I would prefer that, in fact, it's less ad hoc and ugly than just modify the C version)
<whitequark> that would work, yes
<whitequark> but then you'll have to leave ConstantFolding in peace
<Drup> okay
<Drup> that's precisely why I made two commits :)
<Drup> I would argue that the silent loss of information is a potential bug in ConstantFolding, but that's not by business
jao has joined #ocaml
<Drup> s/by/my/
jao has quit [Changing host]
jao has joined #ocaml
nze` has joined #ocaml
hausdorff has quit [Remote host closed the connection]
<Drup> whitequark: http://llvm.org/docs/doxygen/html/APInt_8h_source.html#l01306 is that the right way of doing asserts ?
<Drup> (I don't really understand how that works, typing wise ...)
<Drup> well, execution wise too. =')
<adrien> nicoooooooooo
<adrien> #define INOSIZE (8*sizeof(ino_t)) /* 32 */
<adrien> /* Transform 64-bits ino into 32-bits by hashing. * You do not forget that really unique number size is 64-bits. */
<adrien> et tu te plains d'ocaml
<adrien> ULARGE_INTEGER ino64;
<adrien> ino64.QuadPart = ub->st_ino;
<adrien> /* I don't know this hashing is correct way */
<adrien> return ((ino_t)(ino64.LowPart ^ (ino64.LowPart >> INOSIZE)));
<Drup> adrien : not the -fr chan :p
<adrien> oh, sorry :)
<whitequark> Drup: yep
<whitequark> it's a funny trick
<nicoo> adrien: I going to drink some more
<Drup> whitequark: I don't understand what it is doing.
<whitequark> the preprocessor turns the stuff between () into a string and then also adds a condition around it
<whitequark> so it becomes something like
<adrien> nicoo: glad to provide you with yet another excuse to do so
<whitequark> if(!(x && "Desc")) assert_failure("x && \"Desc\"");
<whitequark> thus providing you with a description
<whitequark> when it fails
<whitequark> typing-wise, if x returns a falsey value (aka zero), && returns zero
<Drup> This is horrible.
<whitequark> and if it's a truthy value, aka not zero, it returns the address of the string constant
<whitequark> which is also not zero
<nicoo> adrien: Know that I drink mate too
* nicoo so enjoys torturing adrien's mate dependency
<Drup> This. is. fucking. horrible.
<whitequark> lol
<Drup> there was literally billions of ways to do that correctly
<adrien> but they would imply additional code in the output even when asserts are disabled
<Drup> whitequark: I will not test tonight
<Drup> whitequark: do you want unit tests too ?
<whitequark> yes, definitely
<Drup> okay, that will be for tomorrow.
<whitequark> ok
<Drup> I didn't remove the patch on ConstantFolding, I'll let you decide if you throw it away or not, don't really care :p
<Drup> whitequark: where are the tests for the c bindings ?
<whitequark> just test the OCaml ones, the C bindings are considered tested transitively
<whitequark> well
<whitequark> there's test/Bindings/llvm-c
<whitequark> but I have a feeling you don't want to use that
<nicoo> Drup: What is so awful ?
<Drup> whitequark: indeed, I don't.
rand000 has quit [Quit: leaving]
diethyl has joined #ocaml
<Drup> whitequark: I just realized, I can't capture the assert failure to return a None in OCaml, can I ?
<whitequark> you can't
<Drup> . . .
<whitequark> it's the same way as integer API, though
<Drup> no it's not, it tests the width
<whitequark> hmmm
<whitequark> I'm fairly sure I checked
<Drup> but I can't test the size of a float in the C api
<Drup> (at least, not without adding more stuff)
<Drup> you know what, I'll see this tomorrow, I was in the middle of dominating the world, and I'll get back to that. :)
<whitequark> okay
<whitequark> I will also look at integer API one more time
manud has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
mort___ has quit [Remote host closed the connection]
mort___ has joined #ocaml
WraithM has quit [Ping timeout: 258 seconds]
shinnya has joined #ocaml
bytbox has quit [Remote host closed the connection]
serge has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
serge has quit [Ping timeout: 255 seconds]
araujo has joined #ocaml
araujo has joined #ocaml
araujo has quit [Changing host]
darkf has joined #ocaml