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
pkrnj has quit [Ping timeout: 272 seconds]
pkrnj has joined #ocaml
xorpse has quit [Ping timeout: 258 seconds]
pkrnj has quit [Client Quit]
xorpse has joined #ocaml
pkrnj has joined #ocaml
marynate has joined #ocaml
sheijk has quit [Quit: .]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zRecursive has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
zRecursive has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
pkrnj has quit [Ping timeout: 260 seconds]
hausdorff has quit [Remote host closed the connection]
artagnon has joined #ocaml
<artagnon> whitequark: The bindings don't have a create_mcjit, no?
ontologiae has joined #ocaml
starless has quit [Quit: Leaving]
srcerer has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
pkrnj has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
pkrnj has joined #ocaml
rand000 has joined #ocaml
rand000 has quit [Client Quit]
laheadle has joined #ocaml
girrig has quit [Ping timeout: 255 seconds]
badkins has joined #ocaml
girrig has joined #ocaml
claudiuc has quit [Remote host closed the connection]
pharpend_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
badkins has quit []
samrat has joined #ocaml
pharpend_ has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
WraithM has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
pharpend_ has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
samrat has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
pkrnj has quit [Ping timeout: 250 seconds]
pkrnj has joined #ocaml
divyanshu has joined #ocaml
axiles has joined #ocaml
mariusae has joined #ocaml
mariusae has quit [Client Quit]
pkrnj has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
pkrnj has joined #ocaml
pharpend_ has quit [Quit: WeeChat 0.4.3]
pharpend_ has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
ontologiae has quit [Ping timeout: 244 seconds]
pyon has quit [Remote host closed the connection]
zpe has joined #ocaml
pyon has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
pharpend_ has quit [Ping timeout: 272 seconds]
pharpend_ has joined #ocaml
pharpend_ has quit [Ping timeout: 245 seconds]
manud has joined #ocaml
Submarine has joined #ocaml
ysz has joined #ocaml
laheadle has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
zpe has joined #ocaml
morphles has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
ysz has quit [Remote host closed the connection]
<ebzzry> what should i put in _tags to make my build work. the contents of my _tags file is https://transfer.sh/y1YdK/-tags and the error message is https://transfer.sh/2dYV8/message.txt
Simn has joined #ocaml
manud has quit [Quit: manud]
morphles has quit [Ping timeout: 244 seconds]
slash^ has joined #ocaml
waneck has joined #ocaml
marynate has quit [Quit: Leaving]
girrig has quit [Ping timeout: 260 seconds]
girrig has joined #ocaml
lordkryss has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
hhugo1 has joined #ocaml
NoNNaN has joined #ocaml
manud has joined #ocaml
pyon has quit [Ping timeout: 240 seconds]
_andre has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
tane has joined #ocaml
<ebzzry> or, how can I simulate the use of the `-I' switch of ocamlc/ocamlopt in an _oasis file?
hhugo1 has quit [Quit: Leaving.]
ggole has joined #ocaml
pyon has joined #ocaml
tani has joined #ocaml
tane is now known as Guest44995
Guest44995 has quit [Killed (morgan.freenode.net (Nickname regained by services))]
tani is now known as tane
tane has quit [Quit: Verlassend]
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
<flux> ocaml-top, seems pretty nice concept for someone learning/playing around with ocaml (available in opam)
<flux> simply split-screen where program is on the left and toplevel on the right; play-button sends everything after to topmost modification to the toplevel and restarting toplevel is simple
<flux> too bad it probably won't be too easily be able to make use of annotation files
<ggole> Hmm, I have a bunch of emacs hacks that do most of that
<ggole> Because the workflow of getting updated definitions into the toplevel with the regular tools is anything but smooth
zpe has joined #ocaml
Submarine has quit [Remote host closed the connection]
<whitequark> artagnon: hm, what are you doing?
<whitequark> oh, right, mcjit is not directly exposed in bindings
<whitequark> however, old jit is dead
<whitequark> its interface is a shim around mcjit
morphles has joined #ocaml
hhugo1 has joined #ocaml
tane has joined #ocaml
ysz has joined #ocaml
ysz has quit [Remote host closed the connection]
oscar_toro has joined #ocaml
manud has quit [Quit: manud]
samrat has quit [Ping timeout: 250 seconds]
hhugo1 has quit [Quit: Leaving.]
<Leonidas> hmm, someone should maybe add the new docs: http://ocsigen.org/lwt/api/Pa_lwt
samrat has joined #ocaml
<Leonidas> this still says 2.4.3 is the latest stable
adi__ has joined #ocaml
ysz has joined #ocaml
<Leonidas> mfp: it requires signup to watch, if I see that correctly.
<mfp> Leonidas: indeed, and it's a bit of a PITA. It accepts mailinator addresses though...
ysz has quit [Remote host closed the connection]
hhugo1 has joined #ocaml
<Unhammer> ebzzry, looks like you need "true: thread" in your _tags
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
rwmjones has quit [Ping timeout: 258 seconds]
dav_ has quit [Ping timeout: 244 seconds]
rwmjones has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
divyanshu has quit [Ping timeout: 255 seconds]
hhugo1 has quit [Ping timeout: 250 seconds]
zpe has quit [Remote host closed the connection]
pii4 has quit [Excess Flood]
adi__ has quit [Quit: Page closed]
pii4 has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
dav has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
larhat has joined #ocaml
elfring has joined #ocaml
bfn has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
<bfn> Hello there, I’ve found a security issue with ocamlfind, does anyone knows where to report it?
<whitequark> to the ocamlfind author: info@gerd-stolpmann.de
<bfn> thanks!
<whitequark> I wonder what kind of security issues can ocamlfind have...
<whitequark> if you don't mind, can you cc whitequark@whitequark.org?
<bfn> ha sorry, it’s ocamlbuild, not ocamlfind
<whitequark> oh
<whitequark> then mantis: http://caml.inria.fr/mantis/bug_report_page.php, select "view status": private
<bfn> thanks!
<adrien> meh, ocaml has .ocamlinit
<adrien> noone cares
<ggole> Security issue? Surely ocamlbuild can't be expected to operate safely on untrusted input.
<bfn> if you create an x.ml file, then chmod go-rwx on it, then run `ocamlbuild x.native` it’ll copy that x.ml file into _build and change its permissions, so anyone with access to the current directory (other than the owner) can’t read x.ml but can read _build/x.ml, thanks to ocamlbuild
<ggole> Ah, I see
<adrien> yay for calls to 'cp'
<mrvn> 1) stupid mode, 2) missing option in cp
<whitequark> that's not very serious, but I see how that can be problematic...
<mrvn> 'chmod go-rwx .', problem solved
<bfn> yes, minor issue
<bfn> just submitted it as issue #6627
rand000 has joined #ocaml
_whitelogger has joined #ocaml
divyanshu has joined #ocaml
hhugo1 has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
bfn has quit [Quit: Textual IRC Client: www.textualapp.com]
michipili has joined #ocaml
michipili has left #ocaml [#ocaml]
michipili has joined #ocaml
divyanshu has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
tac_ has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
divyanshu has quit [Ping timeout: 265 seconds]
ollehar has joined #ocaml
divyanshu has joined #ocaml
mcclurmc has joined #ocaml
ollehar has quit [Ping timeout: 258 seconds]
slash^ has joined #ocaml
shallow is now known as tupelolo
michipili has left #ocaml [#ocaml]
ysz has joined #ocaml
divyanshu has quit [Ping timeout: 272 seconds]
morphles has quit [Ping timeout: 244 seconds]
divyanshu has joined #ocaml
Intensity has joined #ocaml
tac_ has quit [Ping timeout: 260 seconds]
BitPuffin has joined #ocaml
BitPuffin has left #ocaml [#ocaml]
Hannibal_Smith has quit [Quit: Sto andando via]
BitPuffin has joined #ocaml
hugomg has joined #ocaml
zpe has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
<artagnon> whitequark: The shim will soon be removed, no?
<artagnon> Can I help with create_mcjit? What should I do?
zpe has joined #ocaml
<whitequark> artagnon: no, it won't
<whitequark> hmmm
<whitequark> artagnon: look at include/llvm-c/ExecutionEngine.h
<whitequark> go to bindings/Ocaml/llvm_executionengine.ml
* artagnon looks
<whitequark> remove all usage of deprecated C functions, implement all missing functions
<whitequark> the overall ExecutionEngine interface is nearly same for JIT/MCJIT, however MCJIT adds a few functions
<whitequark> essentially the only things you will need is to handle LLVMMCJITCompilerOptions
<whitequark> and also possibly mcjit memory managers, though I'm not sure if you can implement those in OCaml (probably not)
<artagnon> Do you have a small task you can give me first?
<whitequark> make a binding for LLVMCreateMCJITCompilerForModule.
<artagnon> Ok.
<whitequark> it should accept a record with the same file as struct LLVMMCJITCompilerOptions contains and convert the record to struct LLVMMCJITCompilerOptions.
<whitequark> don't bother exposing LLVMInitializeMCJITCompilerOptions separately.
ontologiae has joined #ocaml
tane has quit [Quit: Verlassend]
sheijk has joined #ocaml
Thooms has joined #ocaml
mcclurmc has quit [Ping timeout: 258 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
<artagnon> whitequark: Is this the right prototype? >> llvm_ee_create_mcjit(LLVMModuleRef M, LLVMMCJITCompilerOptions Options)
<whitequark> no
<artagnon> Oh.
<whitequark> as I've said, it should accept a record
<artagnon> So value?
ysz has quit [Remote host closed the connection]
<whitequark> yes
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
vogler has joined #ocaml
vogler has quit [Client Quit]
Simn has quit [Ping timeout: 260 seconds]
voglerr has joined #ocaml
vogler has joined #ocaml
ontologiae has quit [Ping timeout: 258 seconds]
voglerr has quit [Client Quit]
vogler has quit [Client Quit]
mcclurmc has joined #ocaml
voglerr has joined #ocaml
ysz has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
<artagnon> whitequark: I have to construct LLVMCodeModel and LLVMBool structs from the fields in the block by hand?
<artagnon> And LLVMMCJITMemoryManagerRef?
divyanshu has joined #ocaml
<artagnon> I'm not able to find the corresponding struct declarations ~:
araujo has quit [Ping timeout: 256 seconds]
araujo has joined #ocaml
<whitequark> artagnon: hm
<whitequark> yes, you do
<whitequark> LLVMMCJITMemoryManagerRef, hm
<whitequark> you should accept an optional argument, ?memory_manager:llmcjitmemorymanager
<whitequark> and if it's not provided, just pass NULL, and LLVM will use some default memory manager
<whitequark> the *Ref things in LLVM are just opaque pointers.
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 255 seconds]
mcclurmc has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
samrat has quit [Ping timeout: 245 seconds]
SomeDamnBody has joined #ocaml
AlexRussia has joined #ocaml
samrat has joined #ocaml
everyonemines has joined #ocaml
<reynir> why does ppx_tool.0.99.2 require 4.02.1 now :o
<def`> Because one shouldn't use 4.02
<def`> 4.02.0*
<reynir> weak
<whitequark> reynir: because it was broken on 4.02.0
<whitequark> some of the interfaces inside the compiler have changed
SomeDamnBody has quit [Ping timeout: 255 seconds]
<artagnon> whitequark: What Ocaml type should I assign to the compiler option?
<artagnon> I know what it looks like, but I don't know what to name it or where to put it.
<whitequark> artagnon: you need to make a new record type. type llmcjitcompileroptions = { mcjit_code_model : ... }
<whitequark> put it into Llvm_executionengine
<artagnon> Cool.
zpe has joined #ocaml
Arsenik has joined #ocaml
<reynir> Sorry, I'm just a bit frustrated. I have 4.02.0 installed on my system, and I had ppx_tools 0.99.2 installed earlier.
<whitequark> reynir: hmm
<whitequark> O_o
<whitequark> it builds on 4.02.1 but not 4.03+trunk
<artagnon> whitequark: How bad is this? http://pastie.org/9675065
<whitequark> reynir: ok, I will fix it now
<whitequark> sorry for commotion
<artagnon> (and sorry for the delay; I'm at a conference)
<whitequark> artagnon: the record on the OCaml side should have the proper types
<reynir> whitequark: wow, thanks!
<whitequark> bool, and codemodel should be a variant
zpe has quit [Ping timeout: 250 seconds]
<artagnon> Oh, okay.
<whitequark> llcodemodel
<whitequark> the C side code actually can be unchanged, since the representaton is the same
<artagnon> Will it serialize to an Int?
<artagnon> A variant ie.
<artagnon> s/serialize to/be represented as/
<whitequark> yes
SomeDamnBody has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
<artagnon> whitequark: Better? http://pastie.org/9675083
<whitequark> yes, but the names are all wrong, the binding uses different conventions elsewhere
<artagnon> Oh.
<artagnon> Where can I find the conventions?
<whitequark> eg in Llvm module
<artagnon> type t?
<artagnon> module = struct which contains a type t?
shinnya has quit [Ping timeout: 260 seconds]
<artagnon> I think the ll prefix should be dropped.
<artagnon> Because these are not opaque pointers to values in llvm.
pharpend_ has joined #ocaml
<artagnon> They're OCaml values.
<pharpend_> Good morning, everyone
<pharpend_> or, I guess, really late morning
<pharpend_> anyway
<whitequark> artagnon: yep, module CodeModel = struct type t = | Default | JIT_default | Small | Kernel | ... end
* artagnon nods
<pharpend_> Let me preface this by saying that I have no intention of starting a flame war. I'm reading through Real World OCaml. I already know Haskell pretty well. Would someone care to explain some of the differences between OCaml and Haskell? So far, OCaml just seems like Haskell with simpler syntax and less type safety.
<whitequark> artagnon: and record files should be under_scored
<whitequark> opt_level, code_model, etc
<whitequark> record fields*
<artagnon> Okay.
<whitequark> you also should write a test in test/Bindings/Ocaml
<artagnon> Will do.
<whitequark> after that I'll be able to commit it, most likely
divyanshu has quit [Quit: Computer has gone to sleep.]
dav has quit [Remote host closed the connection]
divyanshu has joined #ocaml
ysz has quit [Remote host closed the connection]
<artagnon> whitequark: There's no existing test for create_interp or create_jit?
<hugomg> @pharpend_: Ocaml has some neat features Haskell doesnt have, like the module system / functors and row-polymorphic variants. For example, check out the tyxml library for something thats quite tricky to write in Haskell.
<pharpend_> row-polymorphic variants sound nice
<whitequark> artagnon: there is, executionengine.ml / test_executionengine
<pharpend_> how are functors in ocaml different from those in Haskell?
<whitequark> maybe parameterize the test functions with the jit creation function
<pharpend_> I don't see how tyxml is different than blaze-html (I'm fairly certain there's an XML analog)
<hugomg> they only have the name in common. Ocaml functors are module-level functions (writing a module that abstracts over another module's interface). Haskell functors are a type class (something ocaml lacks for now)
<artagnon> Okay, but who will call them with the right arguments?
<whitequark> see the bottom of the file
<artagnon> Oh, let _ =
ygrek has joined #ocaml
<pharpend_> i see
<hugomg> in a way, Ocaml functors kind of do the same things Type classes do, but in a different way. There are pros and cons to both approaches
<pharpend_> I can sort of imagine
<pharpend_> I'm almost to the functor chapter in RWO
<whitequark> in fact, implicits in OCaml, which are an experimental feature that may or may not be merged, are based off functors
<whitequark> implicits ~ typeclasses
<pharpend_> OCaml's implicit sum types have better naming conventions
<whitequark> implicit sum types?
<pharpend_> Umm
<pharpend_> Haskell has the Maybe type, which is analogous to OCaml's option
<pharpend_> with option, you can have Some x or None
<pharpend_> with Maybe, you can have Just x or Nothing
<hugomg> ADTs work pretty similar in Haskell and Ocaml (other than lazyness)
<whitequark> oh, you mean builtin types
<ggole> OCaml simply took SMLs
<pharpend_> hugomg: even then, you can force strictness in Haskell
<ggole> Dunno why Haskell changed things around
<hugomg> yeah, but its a pita to add !s everywhere :) And you can use lazyness in Ocaml if you want too but its a bit verbose
<pharpend_> hugomg: if you want to talk about pitas, I'd be happy to discuss ;;
<pharpend_> on colemak, that's a very annoying key to type
<whitequark> you don't ever need ;; except in toplevel
<pharpend_> Maybe I'm too used to Haskell, where like 20% of your work is in the REPL.
<whitequark> ... and you get what you deserve for using weird layouts for programming, too. ; is one of the most used symbols in the majority of languages
<reynir> whitequark: thanks a lot :)
<pharpend_> I'm well aware
<artagnon> whitequark: How do I run only that test?
<hugomg> eh, after dealing with "=" in the Lua toplevel, Ocaml's ;; is nothing :)
<pharpend_> hugomg: never used lua, but I have yet to hear anything good about it
<whitequark> artagnon: oh, it's a bit of a pain, hang on
<ggole> I found the ;; in toplevel pretty annoying until I taught emacs how to enter it for me
<artagnon> :\
<pharpend_> ggole: i should do that, would you mind sharing the script?
<hugomg> lua is awesome, its just that until very recently you needed to type "=" at the start of every toplevel expression
hhugo1 has joined #ocaml
<pharpend_> i see
<hugomg> I mean, as far as the dynamic languages go, its pretty simple and reasonable. it even has tail recursion!
<ggole> It's pretty much binding RET to (insert ";;") (tuareg-interactive-send-input)
<pharpend_> ah okay
<pharpend_> that's not too bad
<whitequark> hugomg: huh, it does?
<whitequark> guaranteed?
<whitequark> since when?
martintrojer has quit [Read error: Connection reset by peer]
<pharpend_> I can't find an Emacs mode to get the indentation right
<pharpend_> Merlin just gets it plain wrong
<artagnon> Yeah, Tuareg is bad too
<pharpend_> tuareg does no indentation
<ggole> Maybe ocp-indent
<pharpend_> OCaml's syntax is really simple, it shouldn't be too hard to get the indentation right
<whitequark> artagnon: try make check-lit TESTSUITE=Bindings/Ocaml
martintrojer has joined #ocaml
* artagnon tries that
<pharpend_> Haskell has the weirdest rules for indentation, so I don't blame the haskell-mode maintainers for not having indentation
<ggole> I use tuareg, but it doesn't really do what I want.
<pharpend_> before I learned Haskell, i did most of my programming in Lisp
<pharpend_> so, not having something like paredit mode was a bit annoying
<hugomg> yep, Lua has proper tail calls: http://www.lua.org/pil/6.3.html
Arsenik has quit [Remote host closed the connection]
<artagnon> whitequark: All tests fail due to some link error.
<pharpend_> lisp editing in emacs is just awesome
<hugomg> since as long as I know
<whitequark> artagnon: what error exactly?
<ggole> Yeah, slime is a lot slicker than the ocaml tools :(
<artagnon> ld: symbol(s) not found for architecture x86_64
<whitequark> that's not the entire error.
<Drup> pharpend_: blaze-html is just a dsl to emit html
<Drup> it doesn't prevent you to build invalid html
<Drup> you were talking about typesafety ... :)
<pharpend_> I don't see how you could build invalid html with blaze
<pharpend_> oh oh oh I see you could nest non-working things
<Drup> yes, that's exactly "invalid html" :p
<pharpend_> like <p><div><td><table></table></td></div></p>
<pharpend_> that could be fixed by adding some type tetris, though
<Drup> ahah
<Drup> "easy, just add type tetris"
<Drup> yeah
<Drup> look at the type tetris in tyxml
<Drup> you will see it's not "easy"
<Drup> and it's impossible to encode in haskell, you need polymorphic variant
<pharpend_> hmm
<pharpend_> I'll have to learn more about ocaml
<pharpend_> anyway, I need to go
<pharpend_> nice talking to y'all
pharpend_ has quit [Quit: WeeChat 0.4.3]
<artagnon> whitequark: What I could paste: http://pastie.org/9675143
<whitequark> wow
<whitequark> what the hel
<artagnon> It's many more pages long.
<artagnon> Can you just try my patch on your system?
<artagnon> ... but I need to un-hose my system for further development anyway :\
<whitequark> well, yes
<artagnon> When I run all tests, some of them run fine.
<artagnon> Acutally, all of them except the ocaml ones run fine.
badon_ has joined #ocaml
SomeDamnBody has quit [Ping timeout: 245 seconds]
badon has quit [Disconnected by services]
badon_ is now known as badon
zpe has joined #ocaml
tac_ has joined #ocaml
<whitequark> artagnon: it's building.
tac_ has quit [Client Quit]
zpe has quit [Ping timeout: 265 seconds]
<whitequark> ... still building ...
<whitequark> okay, the tests actually compile for me
<whitequark> what is your platform and how did you configure LLVM?
laheadle has joined #ocaml
<whitequark> artagnon: ok, your patch is broken for two reasons
<whitequark> first, create_jit takes two arguments
<whitequark> second, you did not expose your additions in the .mli file
hausdorff has joined #ocaml
laheadle has left #ocaml [#ocaml]
<whitequark> I will fix it for you
<def`> pharpend: merlin does no indentation, tuareg does indentation
ysz has joined #ocaml
<Unhammer> <pharpend_> I can't find an Emacs mode to get the indentation right
<whitequark> does it work on 4.02 yet?
morphles has joined #ocaml
<Drup> I'm not sure it was adapted for 4.02-only syntax, but otherwise ...
<Drup> in particular, it works quite fine with ppxs.
<Drup> oh and, Unhammer, def`: I'm pretty sure he's gone, he was talking with another nick and left :p
<Unhammer> doh
<Unhammer> probably just as well, I notice the page I linked to gives out-dated instructions for emacs
ousado has quit [Remote host closed the connection]
ousado has joined #ocaml
samrat has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
<artagnon> whitequark: I'm rebuilding llvm with a simple ./configure and make
<artagnon> I'll fix those two problems.
<whitequark> artagnon: I already fixed them
everyonemines has quit [Quit: everyonemines]
<whitequark> and others
<artagnon> Okay.
<artagnon> Oh, thanks :)
<artagnon> Have you applied it as well to the tree?
hhugo1 has quit [Quit: Leaving.]
<whitequark> no, the tests don't pass
<artagnon> Oh.
<whitequark> somehow it doesn't link the JIT native target
<artagnon> Can you post the new patch?
<artagnon> I'll work on it.
<whitequark> oh god, such idiocy
<artagnon> ?
<whitequark> LLVMInitializeNativeTarget returns 0 when successful, which gets converted into false in OCaml.
<artagnon> Oh.
<whitequark> LLVM ERROR: Target does not support MC emission!
<whitequark> whaaaat
<ggole> Encoding options into ints, always fun
<whitequark> ggole: it's just a boolean
<whitequark> I mean, LLVMBool.
<whitequark> C doesn't have real booleans.
<artagnon> C89 doesn't.
<ggole> LLVMBool chooses *0* for true? O_o
Thooms has quit [Quit: WeeChat 1.0.1]
zpe has joined #ocaml
<whitequark> it doesn't say that 0 or 1 are true or false.
<whitequark> but functions return (LLVMBool)1 on error.
<ggole> ...
WraithM has joined #ocaml
<Drup> aah, the delight of enforced abstractions.
ysz has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 256 seconds]
<def`> <3 awesome
<whitequark> </3 awesome, <3 i3
AlexRussia has quit [Quit: WeeChat 1.1-dev]
<def`> hmm, same here actually.
spip has joined #ocaml
AlexRussia has joined #ocaml
spip has left #ocaml ["Konversation terminated!"]
kakadu has joined #ocaml
hhugo1 has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
nicoo has quit [Write error: Broken pipe]
hausdorff has quit [Remote host closed the connection]
<whitequark> I want to cry.
<whitequark> Llvm_executionengine.initialize_native_target *never* worked.
hausdorff has joined #ocaml
<whitequark> you could not possibly have successfully used it, ever.
r0ok has quit [Quit: leaving]
* adrien hands whitequark a tissue
<whitequark> oh, it worked before MCJIT migration, I think.
hausdorff has quit [Ping timeout: 255 seconds]
<whitequark> ... MCJIT cannot pass arguments to functions.
<whitequark> like, at all.
<whitequark> unless it's main(), then sure.
<whitequark> what.
<def`> pass arguments?? you can't call anything :p?
<whitequark> you can, as long as it has no arguments
<whitequark> you'll even get the return value back.
rand000 has quit [Ping timeout: 240 seconds]
rand000 has joined #ocaml
<ggole> Wow, luxurious
Submarine has joined #ocaml
Submarine has joined #ocaml
<def`> you generate a nullary function callng your n-ary functions withbhardcoded arguments :'
<whitequark> no, you get a pointer to function and use libffi on it, basically
<whitequark> ... except OCaml bindings don't actually expose that functionality
<whitequark> haha this is so broken
<whitequark> all of it
<whitequark> I made tests pass ...
<whitequark> ... essentially by commenting them out ;_;
<whitequark> begin match engine with
<whitequark> | `MCJIT -> () (* Currently can only invoke 0-ary functions *)
<whitequark> | `JIT -> () (* JIT is now a shim around MCJIT, jokes on you *)
AlexRussia has quit [Ping timeout: 245 seconds]
<Drup> meh
tane has joined #ocaml
<Drup> I want to use [@depreacated] but i need to stay compatible with previous versions :(
mcclurmc has quit [Remote host closed the connection]
<whitequark> artagnon: r220619 r220620
<whitequark> see backlog; this is actually not enough to run meaningful code
AlexRussia has joined #ocaml
<whitequark> what you need to do now is to expose LLVMAddGlobalMapping
<whitequark> and LLVMGetPointerToGlobal
<whitequark> then I think you could actually run the functions using ctypes
ollehar has joined #ocaml
mcclurmc has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
samrat has quit [Quit: Computer has gone to sleep.]
hhugo1 has quit [Quit: Leaving.]
Hannibal_Smith has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
NoNNaN has joined #ocaml
axiles has quit [Remote host closed the connection]
michipili has joined #ocaml
michipili has quit [Client Quit]
nicoo has joined #ocaml
hhugo1 has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
rand000 has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 260 seconds]
pharpend has quit [Quit: WeeChat 0.4.3]
pharpend has joined #ocaml
<flux> nice, on ocsigen.org the big four links don't work (ie. for eliom) if you don't have cookies enabled :/
<flux> if someone is new to ocaml and would like to start with web applications, what's the best way to go? I'm thinking not ocsigen..
<adrien> Drup: quick!
<Drup> yeah, I was testing without js
<Drup> and it works
<Drup> so i'm not sure what to say.
<flux> well, I have js enabled, but not cookies, except on select sites
<flux> and ocsigen.org is now one of the select sites :)
<Drup> this is slightly weird
<Drup> flux: which browser ?
<flux> firefox (debian iceweasel 31.2.0)
<flux> I removed the cookie, blocked it again, and now again stops working
<flux> in fact, it's all links that don't work
<Drup> indeed. I suppose someone assumed that if js was enabled, cookies were enabled too
<Drup> the bug is triggered only if you have js but not cookies
<flux> tried disabling cookies while still having the one from the site. doesn't work either. but could be it's the same as if I had just removed the cookie.
araujo has quit [Ping timeout: 272 seconds]
araujo has joined #ocaml
<Drup> flux: I just need to check if it's only for ocsimore or for every eliom app using the shiny client reloading stuff
<Drup> yeah, ok, it's for the shiny client reloading stuff
<flux> I love these automatic irc-to-bugtracking-systems!
<Drup> well, this one is a big one, it should be fixed. Some people took quite a great care of preserving the history and stuff like this even with partial page reloading.
<Drup> it's a bit sad everything breaks just by disabling cookies x)
<flux> too much magic error ;-)
<flux> what does the stuff do? in this case probably not that much?
axiles has joined #ocaml
<flux> hmm, that graph viewer is pretty nice demo and relevant to my interests
<Drup> in case of ocsimore (which is the wiki/CMS/... used by ocsigen.org) it's probably not used all that much
<Drup> Basically, it preserves the state of the js across link clicking
<Drup> and reload the page only partially, by fetching the necessary html
<Drup> (you can disable this whole thing, of course)
<flux> pretty nice if it works without much effort from the application writer, though
sheijk has quit [Quit: .]
<Drup> It's quite painless from the application writer point of view, yes
<Drup> (mostly, you don't realize it)
<Drup> as for the original question
zpe has joined #ocaml
<flux> I suppose there is no book learning OCaml with Ocsigen ;-)
<Drup> eliom uses lot's of feature that are considered "advanced" in OCaml, and is quite ""rich". So it can be a bit daunting
<Drup> and no, there is no ocsigen book. The tutorials are actually good now, but could certainly use some improvements
<Drup> flux: how new to ocaml is the person, and how long do you have ?
<Drup> and what do you want to do
zpe has quit [Ping timeout: 250 seconds]
rand000 has joined #ocaml
<flux> well, I'm just wondering if I were to suggest learning ocaml to someone currently doing web development in the dynamic languages, what would be the way to go, or if there is a way
<Drup> ah, right
<Drup> ocsigen would probably a quite violent choc :D
<flux> I'm thinking the same as well ;)
<Drup> flux: if it's a front end guy, you can start by making him use js_of_ocaml
<Drup> baby steps, all that :p
ollehar has quit [Ping timeout: 255 seconds]
jonludlam has joined #ocaml
<Drup> flux: if you want something very light, there is opium. I'm a bit reluctant to advise it, because I mostly consider it a circumcised eliom.server
<Drup> it's only server side and it's quite small
<Drup> I wonder if we could do a baby-interface for eliom.server that would look like opium
araujo has quit [Ping timeout: 255 seconds]
araujo has joined #ocaml
Unhammer has quit [Remote host closed the connection]
araujo has quit [Excess Flood]
araujo has joined #ocaml
<rand000> Hello - I'm having an error when installing a dependency, ppx_tools, after upgrading opam to 1.2.0; from stderr > http://paste.in.ua/9969/
WraithM has quit [Ping timeout: 265 seconds]
<rand000> .. someone who has a quick fix? - utop, lambda-term, lwt, sqlexpr fails to install because of it :/
Hannibal_Smith has quit [Quit: Sto andando via]
<rand000> ah ok - so I guess I'll wait a bit
bytbox has quit [Remote host closed the connection]
<rand000> how would I pull into opam if thats what youre suggesting?
<rand000> sorry, confused (;
<Drup> whitequark: is the llvm freeze passed ?
hhugo1 has quit [Quit: Leaving.]
<whitequark> Drup: freeze?
<Drup> feature freeze
<whitequark> they released like 3.5 a few months ago
<whitequark> *like a
<whitequark> so you're *way* too late
<Drup> the one for 3.6
<whitequark> trunk is never frozen
<whitequark> oh, gotcha
<whitequark> no.
<Drup> right
<Drup> do you when ?
<Drup> +know*
<whitequark> no clue
<whitequark> I don't think anyone knows yet
<Drup> that means plenty of time, then
<whitequark> you're going to miss 3.6 as well, I guess
<Drup> ahah, I hope not
<Drup> well, I could do it know, I guess
<Drup> :motivation:
<Drup> the missing functions were float_of_const and fcmp_predicate
<whitequark> yes
elfring has quit [Quit: Konversation terminated!]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
<Drup> and something to get operands of a branch wouldn't hurt too
axiles has quit [Remote host closed the connection]
morphles has quit [Ping timeout: 272 seconds]
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
tane has quit [Quit: Verlassend]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
hausdorff has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
<Drup> whitequark: in all my patches, I was very careful not to stage all the whitespace changes, I see that I shouldn't have =')
ggole has quit []
<whitequark> oh, crap.
<whitequark> I should just clean whitespace in the whole binding and be done with it. this is generally discouraged, but hell, I'm the maintainer anyway
<Drup> oh, yes, please
jonludla` has joined #ocaml
jonludlam has quit [Ping timeout: 240 seconds]
Unhammer has joined #ocaml
badon_ has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
jonludlam has joined #ocaml
badon has quit [Disconnected by services]
jonludla` has quit [Ping timeout: 244 seconds]
badon_ is now known as badon
hugomg has quit [Ping timeout: 255 seconds]
hausdorff has quit [Remote host closed the connection]
pharpend has quit [Quit: WeeChat 0.4.3]
pharpend has joined #ocaml
larhat1 has quit [Quit: Leaving.]
hugomg has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
Submarine has quit [Remote host closed the connection]
hausdorff has joined #ocaml
voglerr has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
voglerr has joined #ocaml
voglerr has quit [Client Quit]
voglerr has joined #ocaml
pyon has quit [Quit: brb]
pyon has joined #ocaml
<whitequark> rand000: reynir: ppx_tools is fixed now
<artagnon> whitequark: Thanks :)
<whitequark> artagnon: note that you can't actually run any code with llvm_executionengine right now.
<whitequark> run_function will assert if you try to pass any arguments at all
<artagnon> Oh, why is that?
<rand000> whitequark: super (:
<whitequark> artagnon: you'll need to expose LLVMAddGlobalMapping and LLVMGetPointerToGlobal
<artagnon> Okay, I'll do that.
<whitequark> cast the result of LLVMGetPointerToGlobal to whatever type ctypes uses to represent functions to pointers
<whitequark> using, uhhh, Obj.magic
<whitequark> then use ctypes to call it.
<artagnon> Wait, why is this necessary?
<whitequark> because you can't run any code otherwise
<whitequark> there is no API that will let you to.
<artagnon> How was the old jit running then?
<whitequark> it used to implement run_function
zpe has joined #ocaml
<artagnon> So the "normal" run_function requires initialize_native_target first?
<artagnon> (which is failing currently?)
<whitequark> no, it simply does not allow you to pass any arguments to the function
<whitequark> ever
<Drup> whitequark: llvm define "FIRST_FCMP_PREDICATE = FCMP_FALSE" but I don't see it exposed on the C api, should I do - FCMP_FALSE (considering it's 0) or I don't care ?
<whitequark> Drup: do it like icmp does it
<Drup> oh, btw, fcmp_predicate was not exposed in the C side either.
<whitequark> yes, add it.
<Drup> yep, that's what I'm doing
zpe has quit [Ping timeout: 255 seconds]
araujo has quit [Quit: Leaving]
araujo has joined #ocaml
jordjordjord has joined #ocaml
<artagnon> whitequark: Any clue why my ocaml tests won't run?
<whitequark> no idea
<whitequark> they run for me
<artagnon> I managed to clip the top portion of the error: http://pastie.org/9675687
<artagnon> Are the commands right?
ralf1 has joined #ocaml
ralf1 has quit [Client Quit]
vogler has joined #ocaml
mcclurmc has joined #ocaml
vogler has quit [Client Quit]
mcclurmc has quit [Ping timeout: 258 seconds]
bytbox has joined #ocaml
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
zpe has joined #ocaml
<Drup> whitequark: a ConstantFP can be either a float or a double and they don't seem to be any test function to verify if it will fit in a float
<Drup> there*
zpe has quit [Ping timeout: 244 seconds]
<Drup> oh, nevermind, found the test function
<Drup> if it's a double, what do I do in ocaml ? just return None and say sorry ?
<mrvn> Drup: ocaml floats are doubles
<Drup> oh, right
<Drup> :c noob:
ontologiae has joined #ocaml
<Drup> whitequark: Am I authorized to use http://llvm.org/docs/doxygen/html/ConstantFolding_8cpp.html#a0587d3c69db7b6bbc3ff0ba987e205ef directly in Core.cpp or should I move it to a more appropriate file (or just copy it, meh) ?
<Drup> it's pretty much exactly what I want, and it has pretty much nothing to do in ConstantFolding.
ontologiae has quit [Ping timeout: 255 seconds]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
<reynir> whitequark: thank you!
jonludlam has quit [Quit: Coyote finally caught me]
hausdorff has quit [Remote host closed the connection]
jonludlam has joined #ocaml