<def`>
it's a template expecting another template as argument
<whitequark>
ooooh
<whitequark>
right
rgrinberg has joined #ocaml
<dmbaturin>
Drup: Unknown directive `require'.
<whitequark>
def`: #use "topfind"
<whitequark>
errr dmbaturin ^
Submarine has quit [Ping timeout: 264 seconds]
<artagnon>
So what happens when I have an entry: label starting the function and other labels for the switch-case -- when should the "entry" terminate?
philtor_ has joined #ocaml
<artagnon>
switch is the terminator instruction for the entry basic block.
<whitequark>
dmbaturin: they're only dynamically linked with the OS libraries, not OCaml libraries
<whitequark>
and in opam's case (as is with most binaries, anyway) that's a very minimal set
<whitequark>
glibc and sometimes other things you depend on, like libmysql (for example)
tac has joined #ocaml
<whitequark>
so it is a rule rather than exception that you can just drop in an OCaml binary and run it
<dmbaturin>
Well, not sure if it should be called statically linked. :)
<whitequark>
statically linked with OCaml, I should have said
<whitequark>
with OCaml libraries
<dmbaturin>
Yeah, I get it now.
maattdd has joined #ocaml
slash^ has joined #ocaml
maattdd has quit [Ping timeout: 244 seconds]
<dmbaturin>
whitequark: Speaking of that, do bytecode files run on any system that has ocaml?
<whitequark>
ocaml of the same version
<whitequark>
but, yes, they're statically linked too
<dmbaturin>
Exact same or same or newer?
<dmbaturin>
That is, is there stable ABI for bytecode files.
<whitequark>
no, there is not
<dmbaturin>
Good to know.
<dmbaturin>
Can ocamlc.opt produce statically linked binaries in strict sense (link libc etc.)?
<whitequark>
you can't statically link to glibc because of nsswitch
<whitequark>
but, you can statically link to musl-libc if you build ocamlopt with it
<whitequark>
there's an opam switch for doing that with 4.01
yacks has quit [Read error: Connection reset by peer]
axiles has joined #ocaml
Nahra has quit [Remote host closed the connection]
Kakadu has joined #ocaml
hausdorff has joined #ocaml
yacks has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
Nahra has joined #ocaml
hausdorff has quit [Ping timeout: 260 seconds]
BitPuffin has joined #ocaml
bbarker has quit [Quit: Connection closed for inactivity]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
j__ has joined #ocaml
hhugo has joined #ocaml
tac has quit [Ping timeout: 244 seconds]
koderok has joined #ocaml
ygrek has joined #ocaml
pminten has joined #ocaml
pango has quit [Quit: Client exiting]
robink has quit [Ping timeout: 264 seconds]
robink has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
ggole has joined #ocaml
koderok has quit [Quit: koderok]
koderok has joined #ocaml
Derander has quit [Excess Flood]
koderok has quit [Remote host closed the connection]
koderok has joined #ocaml
Derander has joined #ocaml
maattdd has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
zpe has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
thomasga has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
koderok has quit [Quit: koderok]
koderok has joined #ocaml
ontologiae has joined #ocaml
contempt has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
koderok has quit [Quit: koderok]
koderok has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
contempt has joined #ocaml
koderok has quit [Quit: koderok]
koderok has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
contempt has quit [Remote host closed the connection]
contempt has joined #ocaml
koderok has quit [Quit: koderok]
koderok has joined #ocaml
contempt has quit [Ping timeout: 240 seconds]
contempt has joined #ocaml
tobias_ has joined #ocaml
eikke__ has joined #ocaml
<tobias_>
Hello !
ygrek has joined #ocaml
<tobias_>
I installed WODI in order to install libraries that I need to compile my program for Windows users, but I can't manage to install some basic tools such as SVN (I want to use SVN to install apt-cyg)
<tobias_>
Do you know how I can install SVN under the cygwin base of WODI ?
<adrien>
run cygwin's setup.exe
<dmbaturin>
What is wrong with native SVN?
<adrien>
won't handle symlinks, perms, ...
<adrien>
if the goal iis to use svn from inside cygwin, it's probably much saner to use the cygwin svn
<adrien>
(wooo, lag)
<tobias_>
adrien: I can't find the cygwin's setup.exe, in C:\wodi64 I don't have this file...
<tobias_>
But I found a solution
<tobias_>
Hopefully wget was installed, so I downloaded apt-cyg with wget and now I install git and it seems to work !
koderok has quit [Quit: koderok]
koderok has joined #ocaml
<adrien>
tobias_: download the one on cygwin.coim
<adrien>
you'll need it sonsooner or later
<adrien>
and actually, that setup.exe changes fairly often (as often as there are minor cygwin releases)
contempt has quit [Ping timeout: 240 seconds]
<tobias_>
adrien: And how can you tell to this exec file where is cygwin ?
<tobias_>
Because by default shouldn't it go to C:\cygwin ?
lordkryss has joined #ocaml
contempt has joined #ocaml
<adrien>
tobias_: it will ask you what the path is
<tobias_>
adrien: I just tried, I change the path to C:\wodi64 but I can read "downloading and installing files" and I'm afraid it remove the wodi instalation to install a new cygwin... How does the program know if it must install a new cygwin package or update/install cygwin ?
samrat has quit [Quit: Computer has gone to sleep.]
<adrien>
setup.exe is the way to update cygwin
<adrien>
it does both installation and updating
<adrien>
unless wodi replaces some files it shouldn't matter much
<adrien>
(and I don't think it does but I might be wrong)
<tobias_>
adrien: There is something I don't understand... I want to install a new package, not updating cygwin, so how setup.exe could help me ?
<tobias_>
and if I update cygwin, will it remove every files I've already installed ?
<Kakadu>
Why do you think so?
ygrek_ has joined #ocaml
leowzukw has joined #ocaml
ygrek has quit [Remote host closed the connection]
<adrien>
setup.exe is the default cygwin package manager
<adrien>
oconsider this:
<adrien>
on windows you cannot replace files that are in-use
<adrien>
if you the package manager was a cygwin application running from inside cygwin there would be no way to change files that are in-use all the time (typically, cygwin1.dll)
<adrien>
so it's an external program which you should run when you've closed cygwin (but you don't have to and it will handle it fairly well)
<adrien>
but apart from that, it's capable of adding packages and updating and removing them
<tobias_>
So if I want to add a package I need to keep cygwin open and I will be prompt during the install to know which package I want to install ? Pretty strange !
thomasga has quit [Quit: Leaving.]
* tobias_
come back after eating, thank you for your help I will read any answer when I come back !
<tobias_>
*comes
<adrien>
you can simply try it, it shouldn't break anything
<dmbaturin>
Makes me think, it's been too long since I used windows or SVN.
<def`>
too* :D ?
<Kakadu>
lucky gnome!
mhi^ has joined #ocaml
<dmbaturin>
Well, too long to remember the details of how to use SVN, or SVN or windows. :)
ygrek has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
elfring has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Remote host closed the connection]
mhi^ has quit [Quit: Lost terminal]
axiles has quit [Ping timeout: 244 seconds]
axiles has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
<tobias_>
Ok thank you ! Now I've a strange error which explains that my installed version is 32 bits, but I installed 64bits... But I will solve it by myself
ygrek has joined #ocaml
<tobias_>
I have just a little problem: I'm trying to compile the library camlpdf under Cygwin but I have the error
<tobias_>
$ ocamlc -c -cc "cc" -ccopt "-fPIC -D__MINGW32__ -D__MINGW32__ \ -DPIC -DNATIVE_CODE \ -o flatestubs.o " flatestubs.c 'cc' n'est pas reconnu en tant que commande interne ou externe, un programme ex▒cutable ou un fichier de commandes.
<adrien>
do you have a C toolchain available?
<adrien>
try running "gcc"
<tobias_>
adrien: I installed gcc-core, mingw64_gcc-core...
<tobias_>
And when I run gcc I have "fatal error : no input file"
<tobias_>
(same error with 'cc')
<adrien>
ah
<adrien>
gcc and cc are going to be cygwin compilers
<adrien>
which target cygwin
<adrien>
what you need to run is i686-w64-mingw32-gcc (or s/i686/x86_64/ for 64b)
<adrien>
that's basically cross-compilation
<adrien>
don't know if the build system of camlpdf lets you specify another value for -cc
<tobias_>
adrien: Hum... It's based on OcamlMakefile so maybe there is a way to do that
<tobias_>
I looked in Makefile and I can't find it, I will see in OcamlMakefile
<tobias_>
Ok great I did make --eval="CC=x86_64-w64-mingw32-gcc" and it seems to work, thank you !
<tobias_>
Do you know if it's possible to easily cross-compile Ocaml from Linux to Windows or MacOsX binaries when you have lot's of dependencies ?
<tobias_>
(for example by installing in opam a kind of transparent toolchain and switch to it with the OPAM switch function)
darkf has quit [Quit: Leaving]
<adrien>
you probably don't need to go through --eval
<adrien>
make CC=x86_64-w64-mingw32-gcc
<adrien>
should be enough
<adrien>
it's not trivial but it's doable nowadays
<dmbaturin>
What is the easiest way to pick a random element from a list?
<adrien>
hopefully thomas braibant will make a tutorial on that soon
<tobias_>
Great !
<tobias_>
Can you tell me when this tuto is released ?
<adrien>
no idea :P
<tobias_>
I mean if you heard that the tuto is done and if you see me on IRC just tell me ;)
<adrien>
afaiu he was setting that up recently and he promised that if he got things right he'd make a blog post about it
<adrien>
sure
mhi^ has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
rand000 has joined #ocaml
pminten has quit [Quit: Leaving]
j__ has quit [Read error: Connection reset by peer]
tane has quit [Quit: Verlassend]
slash^ has left #ocaml [#ocaml]
BitPuffin has joined #ocaml
Hannibal_Smith has joined #ocaml
maattdd has joined #ocaml
ygrek has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
artagnon has left #ocaml [#ocaml]
<tobias_>
Do you know if in Batteries the function BatFile.write_lines is supposed to close the file ?
<tobias_>
Because under Linux and Mac it works, but under windows I can't remove the file with Sys.remove and I wonder if it's not because the file hasn't been closed.
<tobias_>
The error:Sys.error("page.html: Permission denied")
<adrien>
check with Process Monitor
<ggole>
Anything called write_lines that closes a file is so badly named as to be broken imo.
<adrien>
alternatively, poke companion_cube until he tries on linux and checks with strace or proc
<adrien>
ggole: depends on who opens it :P
<ggole>
Yeah, I guess if you pass a filename to be opened/written to/closed that's reasonable.
<ggole>
...and that's what it seems to do
* ggole
/o\
tane has joined #ocaml
<ggole>
Hmm, isn't taking a filename argument considered error prone because of the risk of race conditions?
q66 has joined #ocaml
Submarine has quit [Remote host closed the connection]
<tobias_>
adrien: How could I check that with Process Monitor ? I can't see what are the open files !
<tobias_>
ggole: How do you know that it's what is seems to do ?
<ggole>
It takes a string argument, not a channel.
<tobias_>
How yes. So the problem should come from else where .
<adrien>
tobias_: does it show the closing?
<ggole>
Does explicitly opening the file work?
<tobias_>
I don't understand what you mean
samrat has joined #ocaml
<ggole>
As in BatFile.open_in "filename" or whatever the batteries code to open a file is.
<tobias_>
And in fact the removed file is ggole
<tobias_>
*
koderok has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
<ggole>
Uh
<tobias_>
And is fact the removed file is open with BatFile.lines_of file_in, but the doc say that it's supposed to be close when the last line is read.
<tobias_>
I will try with explicit openning
<ggole>
Ah, you are looking at the implementation of BatFile.write_lines?
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Client Quit]
dsheets has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
thomasga1 has joined #ocaml
Sim_n has joined #ocaml
thomasga has quit [Ping timeout: 244 seconds]
<tobias_>
Hum...
Simn has quit [Ping timeout: 240 seconds]
<tobias_>
The problem is even stranger, I've the error even if I don't open any file, just remove it
thomasga1 has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
<ggole>
So just opening it gives the error?
<ggole>
I imagine you've got an open handle sitting around somewhere
<tobias_>
No removing it. Opening doesn't gives me any error... I don't have the time to search longer, but I'll come back on it this evening.
<tobias_>
Thank you for your help !
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
travisbrady has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
leowzukw has quit [Ping timeout: 260 seconds]
leowzukw has joined #ocaml
hhugo has joined #ocaml
artagnon has joined #ocaml
<artagnon>
whitequark: I found out that it's impossible to build a phi unifying different types from different codepaths.
oriba has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
<artagnon>
I essentially have to execute the rest of the program from within the switch statement.
thomasga has quit [Client Quit]
Sim_n is now known as Simn
<ggole>
A phi accepting different types doesn't really make sense
<artagnon>
I see.
<ggole>
Do you have a conversion between the types you want to "unify"?
<artagnon>
Is it impossible to handle variable length vectors, or is there some trick I'm missing?
<artagnon>
They're vectors of different sizes.
<artagnon>
I'm bitcasting a pointer to a vector of a dynamic size.
thomasga has joined #ocaml
<artagnon>
There seems to be no way to proceed from there.
<ggole>
You might be able to insert casts/conversions at the end of each block that is a predecessor of the phi
<ggole>
(I'm familiar with SSA but not LLVM.)
<artagnon>
Casting it back to a pointer of unknown size would defeat the whole point.
hhugo has quit [Quit: Leaving.]
<artagnon>
I want an <N x i64> back from the function, so I can perform vector operations on it.
thomasga has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<ggole>
I don't see how that makes sense.
<ggole>
My guess is that you need to pass this thing in memory.
waneck_ has joined #ocaml
waneck has quit [Ping timeout: 240 seconds]
hausdorff has joined #ocaml
thomasga has quit [Quit: Leaving.]
jbrown has quit [Remote host closed the connection]
thomasga has joined #ocaml
travisbrady has joined #ocaml
<oriba>
how to set a font in labltk?
mhi^ has left #ocaml [#ocaml]
maattdd has joined #ocaml
samrat has joined #ocaml
shinnya has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
maattdd has quit [Ping timeout: 256 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 245 seconds]
hhugo has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Ping timeout: 245 seconds]
<oriba>
any labltk-users here?
leowzukw_ has joined #ocaml
leowzukw has quit [Ping timeout: 264 seconds]
artagnon has left #ocaml [#ocaml]
izaak has joined #ocaml
pminten has joined #ocaml
thomasga has joined #ocaml
hausdorff has joined #ocaml
George_ has joined #ocaml
hausdorff has quit [Remote host closed the connection]
slash^ has joined #ocaml
leowzukw_ has quit [Quit: leaving]
izaak has quit [Ping timeout: 260 seconds]
pminten has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
rgrinberg has joined #ocaml
rishabhjain has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
maattdd has joined #ocaml
pango has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
rishabhjain has quit [Remote host closed the connection]
rgrinberg has quit [Quit: Leaving.]
hhugo has quit [Quit: Leaving.]
fold has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
rishabhjain has joined #ocaml
rishabhjain has quit [Client Quit]
hhugo has joined #ocaml
artagnon has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
wieczorek has joined #ocaml
wieczorek has quit [Client Quit]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
tautologico has joined #ocaml
hausdorff has joined #ocaml
rgrinberg has joined #ocaml
Nahra has quit [Remote host closed the connection]
zpe has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
Natch has quit [Ping timeout: 256 seconds]
hhugo has quit [Quit: Leaving.]
Nahra has joined #ocaml
Tamae has joined #ocaml
fold has joined #ocaml
George_ has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 255 seconds]
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 260 seconds]
<Drup>
dmbaturin: get the length, random an int in the interval, use List.nth
<Drup>
(assuming you want uniform distribution)
<artagnon>
How do I generate intrinsic instructions from the OCaml LLVM bindings?
<artagnon>
Like memcpy?
ousado_ has quit [Ping timeout: 255 seconds]
hausdorff has quit [Remote host closed the connection]
s_kilk has joined #ocaml
ousado_ has joined #ocaml
englishm has joined #ocaml
ontologiae has quit [Quit: WeeChat 0.4.0]
oriba_ is now known as oriba
maattdd has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
alinab_ has joined #ocaml
<s_kilk>
hi all. I'm having a lot of trouble installing an ocaml environment for the first time. I can't get `core` and `utop` to install
alinab_ has quit [Client Quit]
samrat has quit [Quit: Computer has gone to sleep.]
<s_kilk>
anyone willing to help?
<def`>
what happens?
rgrinberg has joined #ocaml
<s_kilk>
ERROR while installing type_conv.111.13.00 ---- ocamlfind: Package `camlp4.quotations' not found
<s_kilk>
then it just bails out.
<s_kilk>
i'll put the whole thing in a paste-bin just now...
<def`>
what is your switch ? (opam switch) ?
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<s_kilk>
switch shows compiler 4.01.0
artagnon has left #ocaml [#ocaml]
* jerith
finally makes 4.00.1 compile on his computer.
<Drup>
jerith: why would you use 4.00.1 ?
<jerith>
Drup: I want to make my code work with 4.00 and 4.01.
<Drup>
let travis test that for you :)
<s_kilk>
actually, looking back at the log, nothing seems to install correctly, the first one to fail is camomile with "configure: error: Cannot find camlp4o."
<Drup>
(or any CI, for that matter)
<jerith>
Drup: Travis does test that, but I'm struggling to debug.
<Drup>
jerith: oh, right
<Drup>
s_kilk: you are on a debian-based system and you are using the system switch