companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
pierpa has quit [Quit: Page closed]
samrat has quit [Ping timeout: 246 seconds]
marcux has quit [Ping timeout: 240 seconds]
snhmib has quit [Quit: WeeChat 1.9.1]
snhmib has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 248 seconds]
jbrown has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 248 seconds]
mfp has quit [Ping timeout: 248 seconds]
enterprisey has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
NaCl has left #ocaml [#ocaml]
mengu has joined #ocaml
silver has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 252 seconds]
enterprisey has joined #ocaml
Muzer has quit [Ping timeout: 255 seconds]
enterprisey has quit [Read error: Connection reset by peer]
enterprisey has joined #ocaml
Algebr has joined #ocaml
snhmib has quit [Quit: WeeChat 1.9.1]
mbuf has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody> Is it possible to change where opam installs to? I'm getting permission errors because it's trying to install to /usr/local
<SomeDamnBody> I don't want that. I want it to install to the bindir
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
govg has joined #ocaml
cbot_ has quit [Quit: Leaving]
enterprisey has quit [Ping timeout: 252 seconds]
mengu has joined #ocaml
enterprisey has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
samrat_ has joined #ocaml
mengu has joined #ocaml
mnemem has quit [Ping timeout: 252 seconds]
mengu has quit [Ping timeout: 252 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Killed (orwell.freenode.net (Nickname regained by services))]
ygrek_ has joined #ocaml
vishesh has joined #ocaml
frefity has quit [Quit: Ex-Chat]
mnemem has joined #ocaml
<rgrinberg> SomeDamnBody: which package in particular? If it's a well behaved package that generates a .install file, it will not write anything /usr/local. Otherwise, opam is just calling some shell script/makefile target that is doing this
AltGr has joined #ocaml
Simn has joined #ocaml
fraya has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
shinnya has joined #ocaml
argent_smith has joined #ocaml
mengu has joined #ocaml
snhmib has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
_whitelogger has quit [K-Lined]
_whitelogger has joined #ocaml
SomeDamnBody has quit [Remote host closed the connection]
shiyaz has quit [Quit: Leaving]
shiyaz has joined #ocaml
mengu has joined #ocaml
mfp has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
zolk3ri has joined #ocaml
TheLemonMan has joined #ocaml
dhil has joined #ocaml
snahor has quit [Quit: snahor]
samrat_ has quit [Ping timeout: 248 seconds]
mengu has joined #ocaml
MercurialAlchemi has joined #ocaml
mengu has quit [Ping timeout: 246 seconds]
shiyas has joined #ocaml
<Khady> theblatte: in the limitations paragraph in the readme, I think it should mention that classes and object are not supported
Algebr has quit [Ping timeout: 240 seconds]
enterprisey has quit [Quit: Leaving]
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
shiyaz has quit [Quit: Leaving]
mengu has joined #ocaml
shiyas has quit [Quit: Leaving]
shiyaz has joined #ocaml
<orbifx[m]> is `opam install . --deps-only` an Opam v2.0 feature?
mnemem has quit [Ping timeout: 252 seconds]
<theblatte> Khady: I think the idea is that this should be an issue instead
<theblatte> and possibly a PR because we have no idea what good formatting for objects looks like ;)
<Drup> orbifx[m]: yes
<Drup> theblatte: that's not very difficult though, isn't it ? Do pretty much what you would do for modules
<Drup> the grammar is very similar
ziyourenxiang has joined #ocaml
<theblatte> Drup: I have no idea what objects in OCaml look like :p
<Khady> I'm not smart enough to provide a PR. But I can open an issue
<Drup> well, from a grammar perspective, pretty much like modules
<theblatte> Khady: thanks!
mengu has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
zelines has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
sepp2k has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
mnemem has joined #ocaml
zelines has quit [Ping timeout: 258 seconds]
sepp2k has quit [Quit: Leaving.]
lgd__ has quit [Read error: Connection reset by peer]
lgd__ has joined #ocaml
sepp2k has joined #ocaml
lgd__ has quit [Ping timeout: 255 seconds]
lgd has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
dhil has quit [Ping timeout: 248 seconds]
mbuf has quit [Quit: Leaving]
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
sepp2k has quit [Quit: Leaving.]
fraya has quit [Quit: Leaving]
sepp2k has joined #ocaml
mbuf has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
lgd_ has joined #ocaml
lgd has quit [Ping timeout: 255 seconds]
john51 has quit [Read error: Connection reset by peer]
john51 has joined #ocaml
dhil has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
luukAntwerp has quit [Quit: Konversation terminated!]
luukAntwerp has joined #ocaml
sh0t has joined #ocaml
zelines has joined #ocaml
milodavis has joined #ocaml
shiyas has joined #ocaml
shiyaz has quit [Ping timeout: 264 seconds]
milodavis has quit [Quit: WeeChat 1.8]
kerrhau has quit [Ping timeout: 248 seconds]
mnemem_ has joined #ocaml
mnemem has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
<reynir> Is there a way to get the number of constructors in a variant?
<reynir> In the toplevel, e.g.
<Drup> reynir: not cleanly ? :D
<reynir> ok, I copy/pasted into vim and did a line count heh
<Drup> that's a much better idea, yes
ylee has joined #ocaml
<reynir> Oh, how about #show my_type;; then (Obj.magic Last_constructor : int) + 1;; ? :P
<ylee> if anyone is active I have a question
* reynir segfaults
<Drup> reynir: only if that's a constant constructor
<reynir> In this case they were :)
<Drup> In this case, yeah, that works
<ylee> I am trying to get CDEG 2.0 to compile, see http://www.unco.edu/NHS/mathsci/facstaff/Miller/personal/CDEG/
<Drup> (you are relying a bit on the memory representation, which is not really defined, but well ...
<ylee> on an Ubuntu linux distro
<Drup> ylee: as a general IRC rule, don't ask to ask, just ask directly :)
<ylee> well i asked
<ylee> i am getting a Error during linking on ocamlopt command in make file
<ylee> i make changes to the file to not use usr/local but use debian stuff
<Drup> Ah, that thing is *not* packaged well
<ylee> also added -cc g++ option
<ylee> and yes I know it is not packaged well lol
<ylee> i have tried lots of changes and always run into the linking error
<ylee> i package stuff for Bodhi linux but never had this muc difficulty, but my interest in this program is personal not Bodhi related
<ylee> know next to nothing about ocaml other than what it is never used it
<reynir> ylee: I don't think I can help, but perhaps pastebin'ing the error might help others help you :)
<Drup> the problem here is not OCaml, it's just really awful packaging and C++ linking
<zolk3ri> yes c++ is awful
<zolk3ri> :P
<reynir> Ah
<Drup> the C++ alone doesn't even compile for me :/
<ylee> I got the c ++ to compile
samrat_ has joined #ocaml
<ylee> but yes I know the issue is not OCaml but the make file
<Drup> do you have a patch ?
<ylee> what is failing to compile for you
<ylee> ok i was having that problem on Bodhi 4.2 so i switched to Bodhi 2.4 and didn't have that issue
<ylee> but let me look in the VM i was using for 4,2 because i think i managed to get that to work also
<ylee> I do too much stuff in VMs but it keeps me from borking my install
zolk3ri has quit [Ping timeout: 248 seconds]
zolk3ri has joined #ocaml
<ylee> ok in the makeMakeFile.config file file i changed compilerCommand = g++ -fpermissive
<ylee> this is yours Drup: https://github.com/Drup/LILiS ?
mnemem has joined #ocaml
mnemem_ has quit [Ping timeout: 248 seconds]
<Drup> ylee: yes
<ylee> way kool i love fractals and IFSs
<ylee> wrote some similar python code I never fully finished and never put online
<Drup> Ok, now I'm at the point where ld can't find -lStdC++ ...
<ylee> ok that is where i changed the makefile in CDEG to add the option -cc g++ to ocamlopt cmd
<ylee> and either remove lStdC++ or change to -lstdc++ either way should work, not a C++ programmer but it is my understanding g++ doesn't need to link stdc++
<Drup> and now it's missing PoolMemoryAllocator :|
zelines has quit [Ping timeout: 260 seconds]
<ylee> hmm i didn't run into that one :(
ygrek_ has quit [Ping timeout: 258 seconds]
<ylee> does installing libstdc++6 help?
<Drup> oh, actually, it's missing "pthread_mutex_trylock"
<Drup> Ok, done
<Drup> it was missing -lpthread
al-damiri has joined #ocaml
<Drup> ylee: here is the modified makefile https://bpaste.net/show/cb9056395b70
<Drup> ylee: and here is the modified ocaml file: https://bpaste.net/show/9a01528c97c7
<Drup> and for good measure: https://bpaste.net/show/1687b2fe5c80
<ylee> wow fantstic it works
<ylee> :D
<ylee> what did you change in the ocaml and cpp files?
<ylee> well it compiles but i am getting an error running
<ylee> exception Stream.Error("Illegal character �")
<Drup> I smell encoding issues
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
<Drup> the ocaml code is ... old, to put it nicely, it just had a small double exception declaration, which is now illegal
<Drup> (and lot's of deprecation warnings)
<Drup> for the C code, I just changed the path for ocaml headers
<ylee> ok i got the path changes for ocaml header files
<ylee> you don't get the encoding error when running?
shinnya has quit [Ping timeout: 240 seconds]
<Drup> Ah, yes I do
<Drup> (I didn't actually tried any command :p)
<ylee> hmm
* Drup sight
<Drup> let's see
<ylee> ok well compiling is a start
mbuf has quit [Quit: Leaving]
<Drup> that ocaml code is terrifying
<ylee> mathematicians are not always the best programmer sadly
FreeBirdLjj has joined #ocaml
freusque has quit [Quit: WeeChat 1.7.1]
<Drup> ok, so 1) the char that is reported as "Illegal" is not always the same 2) running it under valgrind removes the issue
<Drup> I'm not qualified to debug C/C++ memory violations
<ylee> Drup do you know where in the code this error is thrown
<ylee> ?
<Drup> not really
<ylee> weird on valgrind
<Drup> but the illegal chars certainly comes from the C side, given the hints above
<reynir> That sounds like a !!!FUN!!! bug to debug hah
<Drup> yep
<Drup> which is exactly why I'm not going to do it, sorry ylee :D
dhil has quit [Ping timeout: 240 seconds]
<ylee> yeah i suspect somewhere in the OGDF code
<ylee> that code is old compated with the linrary i can find online
<ylee> but NP Drup you got it to compile maybe I will be able to dig thru the code and find what is triggering that error
<Drup> or you can use it under valgrind :3
<reynir> compile valgrind into the executable :P
<ylee> i am not a c++ programmer but i do code in C and am used to trying to debug code in lnaguages I don't know well
<ylee> lol
<ylee> and yes it is working under valgrind here for me
<ylee> i have ran into EFL code (Enlightenment foundation Libray) which worked under valgrind but not otherwise doing stuff for Bodhi linux
<ylee> i usually but not always figured it out
<ylee> thanks for your help Drup
dhil has joined #ocaml
ziyourenxiang has quit [Ping timeout: 260 seconds]
<theblatte> I guess it's more official now :)
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
AltGr has left #ocaml [#ocaml]
govg has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
govg has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
jnavila has joined #ocaml
ylee has quit [Quit: Leaving]
dhil has quit [Ping timeout: 255 seconds]
shiyaz has joined #ocaml
shiyas has quit [Ping timeout: 252 seconds]
jnavila has quit [Ping timeout: 255 seconds]
sh0t has quit [Remote host closed the connection]
sh0t has joined #ocaml
mnemem has quit [Read error: Connection reset by peer]
mnemem has joined #ocaml
jimmyrcom_ has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
mnemem_ has joined #ocaml
kakadu_ has quit [Quit: Konversation terminated!]
mnemem has quit [Ping timeout: 255 seconds]
samrat_ has quit [Ping timeout: 240 seconds]
zolk3ri has quit [Ping timeout: 260 seconds]
zolk3ri has joined #ocaml
Muzer has joined #ocaml
jnavila has joined #ocaml
kakadu has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 252 seconds]
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
zelines has joined #ocaml
_andre has quit [Quit: leaving]
fraya has joined #ocaml
fraya has quit [Client Quit]
<Leonidas> theblatte: cool, I'll try to check it out for work :)
zelines_ has joined #ocaml
sh0t has quit [Ping timeout: 258 seconds]
snhmib has quit [Quit: WeeChat 1.9.1]
xpredator__ has joined #ocaml
zelines has quit [Ping timeout: 255 seconds]
zelines_ has quit [Ping timeout: 240 seconds]
SomeDamnBody has joined #ocaml
<SomeDamnBody> Is there a way to statically compile ocaml code?
<companion_cube> maybe with a +musl switch
<SomeDamnBody> hmm
<def`> hmm, ocaml code is static by default
nightmared has quit [Ping timeout: 264 seconds]
<companion_cube> not entirely
<SomeDamnBody> def`: ldd <my_binary.native> is reporting some dynamic libraries
<def`> if you want to link the glibc too, you can just pass the relevant flags to the host toolchain
<companion_cube> how?
<def`> -ccopt
<companion_cube> I'm interested, what would it look like?
<def`> ocamlopt -o hello_world -ccopt -static hello_world.ml
<def`> ldd hello_world
<def`> not a dynamic executable
<def`> (in my case I get a warning that unix.c uses some dynamic features, but if you don't use dlopen in your code you should be safe :P)
<companion_cube> does it even link glibc‽
<def`> man gcc
<SomeDamnBody> def`: I have CCOpt -static in my _oasis
<SomeDamnBody> but mine didn't get compiled statically
<def`> SomeDamnBody: look at the log to see what line was invoked to link your binary
<def`> then rerun the same line with -verbose to see how the host compiler is called
<def`> OCaml compiler does no magic at this level: it just pass everything to the system toolchain
<SomeDamnBody> I can see ccopt --static getting passed
<def`> Try rerunning this command with just -static
<def`> (manually, bypassing ocamlbuild but at least you can check whether it works or not0
<SomeDamnBody> --static is getting passed in for .ml files but not when it comes to link
<def`> Ah,
<def`> OASIS probably has the a different name for linker options ?!
<SomeDamnBody> def`: possibly?
<def`> but try linking by hand
<def`> to make sure it will solve the issue
<def`> SomeDamnBody: I don't know oasis well enough. It makes the build too complex :P
<companion_cube> wait, what if gcc is never ever invoked?
<companion_cube> does the main linking call (with ocamlopt) involve gcc?
<def`> then you can't get a native binary
<def`> yes
<def`> ocamlopt -verbose
<companion_cube> because with oasis it doesn't work for me either
<def`> it tells you whatever is passed to the host toolchain
<def`> which flags did you use in OASIS?
<companion_cube> CCOpt
<companion_cube> but it's probably NativeOpt: -ccopt -static
<def`> It seems that CCOpt only affects compilation and not linking.
<def`> Yeah, try that
<companion_cube> yeah
<companion_cube> so it fails because I have no libgmp.a (‽) but I think that means you're right ! :)
<def`> good :)
<companion_cube> why don't I have a libgmp.a -_-
superherointj has joined #ocaml
SomeDamnBody has quit [Remote host closed the connection]
superherointj has quit [Ping timeout: 248 seconds]
superherointj has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jnavila has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
shinnya has joined #ocaml
pierpa has joined #ocaml
cbot has joined #ocaml
superherointj has quit [Quit: Leaving]
zolk3ri has quit [Quit: Lost terminal]
sh0t has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
enterprisey has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]