ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
<dmbaturin> Drup: Yep. The thing I want a list of lists for is rules with alternation (foo ::= <bar> "baz" | <bar> "quux").
<Drup> well, then "nonterminal = symbol list list"
* artagnon nods
<dmbaturin> I think I'll start with implementing it without alternation first and get back with it in a bit.
<Drup> This presentation is going to be a bit akward to manipulate
<Drup> because it's weirdly recursive
* whitequark shudders
<whitequark> your phrasing just reminded me of CRTP
<dmbaturin> Yeah, I don't like it either. I don't see a better solution yet though. If you do, please tell.
<Drup> in your place, I would use something more along of an associative table
<Drup> you have some representation of non-terminals
<dmbaturin> Associative table?
<Drup> and you have a map from non-terminals to rhs of rules
rgrinberg has quit [Quit: Leaving.]
badon has quit [Ping timeout: 263 seconds]
<Drup> (the representation in question could be string or int, it doesn't matter much)
<dmbaturin> Ah, well. Is there a built-in dictionary type, or something in a standard library?
ontologiae has quit [Ping timeout: 240 seconds]
<Drup> sure, either Map for functionnal maps and Hashtbl for persistent ones
<Drup> whitequark: who is CRTP ?
philtor_ has quit [Ping timeout: 240 seconds]
<whitequark> Drup: "curiously recurring template pattern"
<whitequark> before googling it, you should prepare a bucket
<Drup> my internet is not ready to google anything right now
<Drup> I have IRC, and that's all
<whitequark> it's a pattern in C++ where a derived class inherits from a template base class and passes itself as a template argument
<whitequark> hence "curiously recurring"
<Drup> type-level open recursion ?
<Drup> well, template-level*
<whitequark> well, templates themselves are untyped
<whitequark> there is no such thing as a "class type" in C++
<Drup> right
<Drup> the important was more the "open recursion"
<whitequark> no, it's a form of statically dispatched polymorphism
<Drup> it's indeed "curiously recurring"
<whitequark> you replace a pure virtual function in the base class with a call through the template argument
<whitequark> so that an indirection is removed
thomasga has quit [Quit: Leaving.]
oriba_ has quit [Quit: oriba_]
maattdd has joined #ocaml
rgrinberg has joined #ocaml
<artagnon> I've inserted the necessary build_ret for the basic blocks for the cases.
<artagnon> But I still get Basic Block in function '' does not have terminator!
<artagnon> label %entry
<artagnon> entry is my toplevel label.
<whitequark> toplevel label?
<whitequark> basic blocks aren't nested
<artagnon> Oh.
<Drup> artagnon: do you have any notion of SSA ?
<artagnon> Not really.
<Drup> then you should start by reading about that
<Drup> before trying to use a compiler library which SSA is the most basic (and central) notion :)
fold has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
* whitequark recounts the amount of times he asked artagnon to read LangRef, which explains SSA in great detail
<Drup> a 30 minutes read on wikipedia would have avoided basically all your questions until now.
<def`> Thinking about CRTP, I just realised that template are kinded (which is a very weak form of typing)
<whitequark> def`: are they?
<whitequark> I mean, it's not like it detects the signature mismatch on substitution, it just blindly continues and hits an error later
<def`> typename T is a base-kinded template parameter
<def`> while... wait I need a keyboard
<artagnon> I'm reading the Wikipedia entry.
<dmbaturin> Is there a way to use libraries in the top level loop?
<Drup> dmbaturin: sure : #require "thelibrary"
<def`> whitequark: template<typename T> typename T has kind * -> *, and so on.
rgrinberg has quit [Quit: Leaving.]
<def`> and this will be type-checked before substitution
<whitequark> def`: wait, what? what does that even mean?
<def`> (has substitution is not possible with wrong kinds)
<artagnon> Ah, so I need a phi at the end of control.
<def`> whitequark: template <typename T> -> base-kinded template
<Drup> artagnon: No.
<def`> whitequark: template <template <typename T> typename T> -> * -> *
<artagnon> :(
<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.
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
tac has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
maattdd has joined #ocaml
<Drup> whitequark: will check as you as I can open webpages
maattdd has quit [Ping timeout: 250 seconds]
<Drup> (I suppose you've seen that you are reddit-famous, btw)
<whitequark> am I?
<Drup> there is a post about ppx_import on r/ocaml
rgrinberg has quit [Quit: Leaving.]
<Drup> (I saw it just before my internet connection exploded)
<whitequark> I see
rgrinberg has joined #ocaml
tautologico has joined #ocaml
hausdorff has quit [Remote host closed the connection]
pyon has quit [Ping timeout: 244 seconds]
<Drup> how do I test if a char is ascii, with camomile ? Can't seem to find the function for that :/
<Drup> (an UChar.t*)
rgrinberg has quit [Quit: Leaving.]
pyon has joined #ocaml
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
rishabhjain has joined #ocaml
hausdorff has quit [Ping timeout: 264 seconds]
<Drup> whitequark: @polyprinter ?
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
<dmbaturin> If I want to initialize a dictionary from e.g. user input, can I use a reference to a map?
<dmbaturin> Or I need a hashtbl?
<Drup> you can do a ref to a map
<Drup> but every time you do a reference to a map, you must ask yourself if an Hashtbl wouldn't be more suited :p
<dmbaturin> Is there a rule of thumb?
<Drup> maybe if you use it only for init ? :/
<Drup> (I would tend to say "just don't use a reference to a map" but ...)
<dmbaturin> Well, ideally I want to return the grammar map from a function that read it from file.
<dmbaturin> And then use it in the function that does the term rewrites.
<dmbaturin> Right now I'm initialzing it manually before return of course.
<Drup> just pass it along
philtor_ has quit [Ping timeout: 250 seconds]
mcclurmc has joined #ocaml
fraggle_laptop has quit [Ping timeout: 250 seconds]
NoNNaN has quit [Remote host closed the connection]
q66 has joined #ocaml
q66 has quit [Quit: Leaving]
NoNNaN has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
samrat has joined #ocaml
samrat has quit [Client Quit]
jbrown has quit [Ping timeout: 240 seconds]
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mcclurmc has quit [Remote host closed the connection]
jbrown has joined #ocaml
fraggle_laptop has joined #ocaml
samrat has joined #ocaml
hausdorff has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
pyon has quit [Quit: Fiat justitia ruat caelum.]
pyon has joined #ocaml
rishabhjain has quit []
philtor has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
alinab has quit [Ping timeout: 250 seconds]
alinab has joined #ocaml
bjorkintosh has quit [Ping timeout: 255 seconds]
maattdd has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
maattdd has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 250 seconds]
samrat has joined #ocaml
bjorkintosh has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
philtor_ has joined #ocaml
maattdd has joined #ocaml
mcclurmc has joined #ocaml
<whitequark> Drup: basically, @printer is a printer for the type
<whitequark> and @polyprinter is a printer for the type schema
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
<dmbaturin> whitequark: Printer for a type? So there's a way to define a function that is used for making a type representation in string?
hausdorff has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
hausdorff has joined #ocaml
Simn has joined #ocaml
hausdorff has quit [Remote host closed the connection]
Hannibal_Smith has joined #ocaml
<dmbaturin> whitequark: Looks nice. I should build (or install opam) and try.
<whitequark> note you need 4.02
<dmbaturin> Seems opam is not in the repos, so I'll need to find out how to install it first.
<dmbaturin> Hhm, I have 4.00 here.
hausdorff has joined #ocaml
philtor_ has quit [Ping timeout: 250 seconds]
hausdorff has quit [Ping timeout: 255 seconds]
tac has quit [Quit: Leaving]
skchrko has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
tane has joined #ocaml
<whitequark> dmbaturin: OS?
<dmbaturin> whitequark: Linux. Specifically, Fedora 20.
<whitequark> hmmm
<whitequark> you can download an opam binary if your glibc is new enough (I think it is)
<dmbaturin> Ah, so there's a statically linked version? I should try that.
<whitequark> all OCaml binaries are statically linked
Submarine has quit [Ping timeout: 260 seconds]
<dmbaturin> whitequark: Those from the packages from the repos are certainly not.
<dmbaturin> /usr/bin/ocamlc.opt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs)
<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.
elfring has quit [Quit: Konversation terminated!]
<tobias_> My code: http://pastebin.com/nusfSW19
<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
<jerith> Specifically https://travis-ci.org/jerith/ypotryll/jobs/31543442 at the moment.
<s_kilk> yup, on ubuntu 14.04
<Drup> s_kilk: either install camlp4-extra or (if that doesn't work) do "opam switch 4.01.0"
<jerith> I'm pretty sure it's something to do with record fields (I had a similar problem earlier) but I'm not sure what.
<def`> s_kilk: just opam switch 4.01.0
<def`> so that you have the "standard config" and don't have to tweak with potential ubuntu setup
<def`> specific* setup
Thooms has joined #ocaml
<Drup> jerith: since 4.01, there is the "record disambiguation" feature
<s_kilk> Ah, that's what I was missing. thanks!
<jerith> Drup: That's why I think it's record-related.
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
leowzukw has joined #ocaml
<Drup> jerith: you can just follow the compiler warnings under 4.01
leowzukw has quit [Client Quit]
<Drup> it will tell you where it disambiguates
mekaj has joined #ocaml
tac has joined #ocaml
travisbrady has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
travisbrady has quit [Quit: travisbrady]
mcclurmc has quit [Remote host closed the connection]
<jerith> Doh!
<jerith> I've just spent the past hour debugging the wrong Travis build.
<Drup> :D
<jerith> That explains why I can't reproduce it locally.
maattdd has joined #ocaml
yacks has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 240 seconds]
<jerith> Is there a way to switch opam just for the current shell?
<whitequark> `opam config env --switch=4.02.0+trunk"
<Drup> and exec, if you just want to fire a command
<jerith> Thanks.
* jerith should probably write some shell scripts around that at some point.
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
ggole has quit []
mcclurmc has joined #ocaml
thomasga has quit [Quit: Leaving.]
englishm has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
englishm has joined #ocaml
tac has quit [Quit: Leaving]
tac has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
Algebr has joined #ocaml
maattdd has joined #ocaml
Simn has quit [Quit: Leaving]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
milosn_ has quit [Remote host closed the connection]
philtor_ has joined #ocaml
milosn has joined #ocaml
<Algebr> What's the proper way to use -I for ocaml? is this just ocaml foo.ml -I../OtherDirect/
<Kakadu> with space
<Kakadu> in g++ without
<Drup> (I would tend to say that the proper way is to let your build system do it for you :D)
<Algebr> This is just for testing
tobias_ has quit [Ping timeout: 246 seconds]
<Algebr> hmm, ocaml foo.ml -I ../OtherDirect/ Doesn't work...
<whitequark> try placing foo.ml after -I
thomasga has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
<Algebr> I want to do if Sys.argv > 1 then Sys.argv.(1) else exit 1. How can I achieve that? I think in haskell I would have used Control.Monad.when
s_kilk has quit [Quit: Leaving]
<whitequark> exactly like that
<whitequark> Array.length Sys.argv > 1, maybe
<Algebr> ah, yea forgot to write the Array.length
<Algebr> but I tried that and got an return values differ issue
<Algebr> Since one is giving back () and the other a string.
<whitequark> it works for me
<whitequark> exit is int -> 'a
axiles has quit [Remote host closed the connection]
<Algebr> oh wow, it does work, hmm, merlin was complaining but now isn't.
<Algebr> how can I do something like if Array.length Sys.argv > 1 then open_in Sys.argv.(1) else print_endline "needed a file";exit 1?
<Kakadu> parentheses
<Algebr> around the print_endline and exit?
<Kakadu> yep
<Algebr> but I still need the ;, correct?
<Kakadu> or begin/end if you like Pascal
<Kakadu> each, with colon
<Algebr> never had the pleasure of pascal
tane has quit [Quit: Verlassend]
<Algebr> Do strings get a free concat across lines like C?
<Kakadu> no, AFAIK
mcclurmc has joined #ocaml
<whitequark> Algebr: you can use \ for that
<whitequark> "fooo \
<whitequark> bar"
<whitequark> would result in "fooo bar"
<Algebr> was C's string concat across lines considered bad or something?
<whitequark> I dunno
<def`> I don't think so, but it's not accross lines, its just that consecutive string tokens are concatenated.
<def`> This is especially useful given the behavior of CPP
<def`> But in ocaml cases, there is no lexical preprocessor and strings are expression and consecutive expressions are applications
<def`> So it would be ambiguous to have such behavior in OCaml.
<Algebr> ha, so if I did "foo" "bar", it would appear as If I'm "calling" "foo" with "bar"?
<def`> yes
<def`> and if you did f "foo" "bar"
<def`> it would appear as if you called f with two arguments, not with one "foobar"
Nahra has quit [Remote host closed the connection]
zpe has joined #ocaml
tac has quit [Ping timeout: 250 seconds]
Nahra has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: Leaving.]
Algebr has quit [Ping timeout: 255 seconds]
philtor_ has quit [Ping timeout: 250 seconds]
rand000 has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
q66_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
englishm has quit [Remote host closed the connection]
q66 has quit [Ping timeout: 260 seconds]
girrig has quit [Quit: leaving]
girrig has joined #ocaml
thomasga has joined #ocaml
q66_ is now known as q66
rand000 has joined #ocaml
marvin-hh has joined #ocaml
tac has joined #ocaml
thomasga has quit [Quit: Leaving.]
travisbrady has joined #ocaml
zpe has joined #ocaml
eikke__ has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
zpe has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
_whitelogger_ has joined #ocaml
thomasga has joined #ocaml
tac has joined #ocaml
darkf has joined #ocaml
Algebr has joined #ocaml
tobiasBora has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
zpe has quit [Ping timeout: 255 seconds]
tobiasBora has joined #ocaml
q[mrw] has quit [Quit: ircII EPIC4-2.10.5 -- Are we there yet?]
q66_ has joined #ocaml
curius43 has joined #ocaml
q66 has quit [Ping timeout: 260 seconds]
curius43 has quit [Client Quit]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
thomasga has quit [Quit: Leaving.]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
thomasga has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
rand000 has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
travisbrady has joined #ocaml