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
maattdd_ has quit [Ping timeout: 272 seconds]
typedlambda has quit [Ping timeout: 252 seconds]
typedlambda has joined #ocaml
inr has joined #ocaml
studybo__ has joined #ocaml
studybo__ has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
WraithM has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
typedlambda has quit [Ping timeout: 252 seconds]
Eyyub has quit [Quit: WeeChat 0.4.1]
typedlambda has joined #ocaml
ygrek has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
studybot_ has joined #ocaml
dant3_ has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
penglingbo has joined #ocaml
ebzzry has quit [Ping timeout: 272 seconds]
jpdeplaix has quit [Ping timeout: 260 seconds]
q66 has quit [Quit: Leaving]
rgrinberg has joined #ocaml
typedlambda has quit [Ping timeout: 252 seconds]
typedlambda has joined #ocaml
jpdeplaix has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
Jaood has joined #ocaml
Jaood has left #ocaml [#ocaml]
yacks has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
yacks has joined #ocaml
gereedy has quit [Ping timeout: 240 seconds]
gereedy has joined #ocaml
poindontcare has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
ygrek has joined #ocaml
tlockney is now known as tlockney_away
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
<ygrek> forge still down??
divyanshu has joined #ocaml
axiles has joined #ocaml
bbarker has quit [Quit: Connection closed for inactivity]
WraithM has joined #ocaml
<weykent> so i wrote a memcached library for ocaml, but i'm not sure how to write tests for lwt code exactly
<weykent> https://paste.weasyl.com/show/79seLXF2VnG2dZukt3zr/ here's what i have, at least
hhugo has joined #ocaml
<weykent> .89
<weykent> oops
hhugo has quit [Quit: Leaving.]
racycle has quit [Quit: ZZZzzz…]
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
<adrien> ygrek: seems to be down again; it was fine for me not long ago
huza has joined #ocaml
t4nk276 has joined #ocaml
t4nk276 has quit [Client Quit]
ygrek has quit [Ping timeout: 245 seconds]
Arsenik has joined #ocaml
claudiuc has joined #ocaml
Arsenik has quit [Remote host closed the connection]
SethTisue has joined #ocaml
Puffin is now known as BitPuffin
rand000 has joined #ocaml
BitPuffin has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
<ygrek> argh
WraithM has quit [Ping timeout: 264 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
Simn has joined #ocaml
ustunozgur has joined #ocaml
testcocoon has joined #ocaml
avsm has joined #ocaml
rand000 has quit [Read error: Connection reset by peer]
rand000 has joined #ocaml
AltGr has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
SethTisue has quit [Quit: SethTisue]
cago has joined #ocaml
maattdd_ has joined #ocaml
WraithM has joined #ocaml
BitPuffin has joined #ocaml
penglingbo has quit [Ping timeout: 264 seconds]
penglingbo has joined #ocaml
ddosia has quit [Quit: Leaving.]
maattdd_ has quit [Ping timeout: 245 seconds]
BitPuffin has quit [Quit: WeeChat 0.4.3]
BitPuffin has joined #ocaml
ustunozgur has joined #ocaml
ustunozgur has quit [Read error: No route to host]
ddosia has joined #ocaml
<BitPuffin> anyone know an open source daemon program that uses async that I can try compiling in to bytecode and see if I can run it on every platform?
gmorozec is now known as shallow
<adrien_oww> you should be able to do a hello world async program in under 5 lines
lostman has joined #ocaml
<adrien_oww> (yeah, I know, but I'm not aware of any)
alpounet has joined #ocaml
<lostman> hello! does anyone have experience installing ocaml/opam on nixos? the problem I'm facing is that the linker can't find ncurses because (as pretty much everything on nix) it lives in some weird place. how can I tell opam to look into other lib directories?
<BitPuffin> adrien_oww: well I mean something that does something a little bit interesting :P
<BitPuffin> maybe opens a network connection or something I dunno
<BitPuffin> or takes messages
<avsm> lostman: ld_library_path should do the trick as usual
<avsm> lostman: although that ought to be set by the nix env — a lot of other stuff will break if not
<avsm> BitPuffin: you can try cohttp, which includes an async http daemon
maattdd_ has joined #ocaml
<BitPuffin> avsm: yeah that's what I was thinking maybe doing
<BitPuffin> you mean the one in examples?
<avsm> yes, it should be built by default if async is available
<lostman> avsm: LD_LIBRARY_PATH is not set at all by default so comping anything is rather challenging (I just started with nix)
<BitPuffin> yeah
<BitPuffin> Let's figure out how to build this shit then
<lostman> still getting 'ld: cannot find -lncurses'... with both LD_LIBRARY_PATH and CAML_LD_LIBRARY_PATH set
<adrien_oww> (strace)
ygrek has quit [Ping timeout: 255 seconds]
hhugo has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: Leaving.]
thomasga has joined #ocaml
ygrek has joined #ocaml
ollehar has quit [Ping timeout: 244 seconds]
huza has quit [Ping timeout: 272 seconds]
alpounet has quit [Read error: Connection reset by peer]
alpounet has joined #ocaml
Thooms has joined #ocaml
Hannibal_Smith has joined #ocaml
<BitPuffin> do I need to modify the _oasis file in order to make it bulid bytecode intsead of native code?
Kakadu has joined #ocaml
maattdd has joined #ocaml
maattdd_ has quit [Ping timeout: 264 seconds]
skchrko has joined #ocaml
dsheets has joined #ocaml
ebzzry has joined #ocaml
thomasga has quit [Quit: Leaving.]
<Drup> BitPuffin: if it's on "best" in the _oasis, no you don't
<Drup> if it's on "native", there is probably a very good reason for it
<BitPuffin> Drup: guess I need to rtfm for oasis
ebzzry has quit [Ping timeout: 240 seconds]
<BitPuffin> is the ocaml interpreter written in C?
<BitPuffin> because how am I supposed to cross compile the interpreter if not
<Drup> ocamlrun is in C, yes
<BitPuffin> ah okay cool
<Drup> BitPuffin: the compiler is bootstraped, you know :)
<BitPuffin> will compile that for every god damn mobile platform in the world then :P
<BitPuffin> Drup: ah so that's how you bootstrap for all the different operating systems
<BitPuffin> then it shouldn't be hard getting ocaml working on haiku etc
<Drup> you can bother adrien, he's the cross compilation guy
* Drup points and shames.
<BitPuffin> :P
<BitPuffin> although I can't mess with haiku now while at work
<BitPuffin> haha
rand000 has quit [Ping timeout: 252 seconds]
freling has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
Kakadu has quit [Ping timeout: 246 seconds]
freling has joined #ocaml
ustunozgur has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
ggole has joined #ocaml
maattdd has joined #ocaml
avsm has quit [Quit: Leaving.]
_andre has joined #ocaml
rand000 has joined #ocaml
thomasga has quit [Quit: Leaving.]
studybot_ has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 0.3.8]
ustunozgur has joined #ocaml
lordkryss has joined #ocaml
arj has joined #ocaml
hhugo has quit [Quit: Leaving.]
avsm has joined #ocaml
penglingbo has quit [Ping timeout: 255 seconds]
<BitPuffin> Drup: okay so it is set to be "best" how can I make it interpreted instead
<BitPuffin> without modifying the file
ygrek has quit [Ping timeout: 272 seconds]
<BitPuffin> hmm, configue outputs is_native = true
<BitPuffin> alright I overrode it to false
<BitPuffin> let's see
<BitPuffin> aight
<BitPuffin> seems like it worked
<BitPuffin> weird, I can run the .byte file like ./bla.byte but with ocamlrun bla.byte it whines about unknown C primitive
ebzzry has joined #ocaml
hhugo has joined #ocaml
ebzzry has quit [Client Quit]
rand000 has quit [Ping timeout: 252 seconds]
<dsheets> BitPuffin, "Moreover, the "custom runtime" mode
<dsheets> enables linking OCaml code with user-defined C functions."
thomasga has joined #ocaml
<dsheets> and "Arrange for the C shared library dlllibname.so to be loaded dynami‐
<dsheets> cally by the run-time system ocamlrun(1) at program start-up time.
<BitPuffin> dsheets: where are you reading this?
<dsheets> BitPuffin, man ocamlc
ebzzry has joined #ocaml
<BitPuffin> dsheets: ahh
<BitPuffin> well
sgnb has quit [Remote host closed the connection]
<BitPuffin> that makes the bytecode non portable
<BitPuffin> so what's the point of that? xD
<adrien> if your bytecode uses C, you cannot be portable than the C it depends on :)
<adrien> BitPuffin: but for your current problem, if you install the executable and its files properly on the system, it'll just work (tm)
<BitPuffin> well it's not my bytecode
<BitPuffin> it's cohttp :P
<BitPuffin> but yeah I know, but C I can compile for all the various platforms, and I can't cross compile for all the platforms with ocamlc.opt
<BitPuffin> or I mean ocamlopt.opt
<adrien_oww> if you cross-compile the C stubs you'll be fine
<BitPuffin> adrien: the point is, why would you use the custom runtime over compiling with ocamlopt
<adrien_oww> what is not portable is cross to windows because the Unix module has different symbol names on win32 and unix
<BitPuffin> Unix in Core?
dant3_ has joined #ocaml
<adrien_oww> Unix, the module from the non-standard-lib-standard-lib from the compiler
<BitPuffin> fi_fi
<BitPuffin> the compiler has its own standard lib? xD
<companion_cube> kind of
<adrien_oww> yes, used to implement the compiler and its tools
<companion_cube> it has the "stdlib" and some other libs
<BitPuffin> I thought that was the standardlib
<BitPuffin> anyways
<companion_cube> many people only use the stdlib provide with the compiler
<BitPuffin> how can I override the custom field of an Executable in oasis?
cago has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
<BitPuffin> companion_cube: yeah well isn't that the "stdlib" core is just one stdlib
<BitPuffin> well I decided to just set Custom to be false in the _oasis file and I still can't run the .byte file with ocamlrun
<companion_cube> Core is an alternative standard library, yes
<BitPuffin> Fatal error: unknown C primitive `unix_waitpid'
<companion_cube> but the "stdlib" usually designates the compiler's one
<BitPuffin> yeah
<BitPuffin> well then I don't have it wrong at least
<BitPuffin> I thought there was like one more stdlib that wasn't in the compiler and wasn't core :P
studybot_ has joined #ocaml
<companion_cube> BitPuffin: there are 3 "standard libraries", mainly: the one that ships with the compiler, Core, and batteries-included
<BitPuffin> yeah
<companion_cube> also, many people have their own collection of utils
* companion_cube coughs
<BitPuffin> there is probably some bastard out there with his or her own proprietary stdlib
<BitPuffin> anyways
<BitPuffin> I need to build this in a way that isn't tied to unix
<BitPuffin> hrm
remyzorg has joined #ocaml
<BitPuffin> or what's up with the async_extra lib
<BitPuffin> I mean
<BitPuffin> async_unix
<companion_cube> core_kernel, maybe ?
<BitPuffin> hmm?
<BitPuffin> you mean async_kernel
<BitPuffin> ?
<companion_cube> no idea, but yeah, _kernel are designed for use without Unix, I believe
<BitPuffin> both core_kernel and async_kernel?
cago has joined #ocaml
<adrien> 14:37 BitPuffin : I need to build this in a way that isn't tied to unix
<adrien> Unix is the module name
<adrien> it works on Windows
<BitPuffin> adrien: how silly
<adrien> it's for OS-level bindings
<adrien> historical reasons
<BitPuffin> gotcha
<BitPuffin> do you think it will work on the phones?
<BitPuffin> I'd like to build it in the most portable way possible
<adrien> should, it's not very demanding
<BitPuffin> okay neat
<BitPuffin> I'm still confused as to why setting Optional to false did nothing in terms of letting me run with ocamlrun though
<BitPuffin> It needs to be built with just bytecode for me to be able to move it around
<BitPuffin> oh hang on
<BitPuffin> mabye I forgot to regenerate setup.ml
<BitPuffin> not sure
<BitPuffin> yaaay
<BitPuffin> now both work
<BitPuffin> sweet
<BitPuffin> by the way, someone said that our bytecode interpreter is faster than swift, is there any benchmarks someone can link to?
<Hannibal_Smith> Swift seems pretty difficult to beat performance wise with all the optimization on
SethTisue has joined #ocaml
SethTisue has quit [Client Quit]
<adrien_oww> looking around, it seems swift is fairly slow actually
<Hannibal_Smith> Really depend on what compiler option do you pass
<BitPuffin> that being said, swift has been around for like a week
<BitPuffin> :P
<ggole> It's slow if you leave the checking on
<ggole> (And that will probably change given a bit of time.)
<Hannibal_Smith> It can be competitive even with C++ with all optimization on
<adrien> ggole: sure, given enough time...
<ggole> Turning bounds checking off is not an optimization
<adrien> ocaml runs with it usually
<adrien> and you cannot turn them off locally
<adrien> (in swift)
<Hannibal_Smith> ggole, Swift check any arithmetic operation for overflow and underflow
avsm has joined #ocaml
<adrien> ouch
<Hannibal_Smith> Yes, it can be disabled with the right compiler options
<ggole> Anyway, we have a safe language which performs overflow and bounds checking already, with respectable performance (SML). There's no reason the safe part of the language can't perform fairly well.
ousado_ has joined #ocaml
SethTisue has joined #ocaml
<flux> swift also has overflowing arithmetic operations
<flux> I could see that reducing more dangerous attacks into plain DoS attacks
ustunozgur has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
ousado has quit [Ping timeout: 260 seconds]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
maattdd has joined #ocaml
SethTisue has quit [Ping timeout: 252 seconds]
metasyntax has quit [Quit: Leaving]
shinnya has joined #ocaml
<BitPuffin> well okidoki
<BitPuffin> let's figure out how to build the interpreter for every mobile platform ever :P
* companion_cube coughs
<companion_cube> javascript ? :D
<BitPuffin> companion_cube: well I mean building it natively
<BitPuffin> I am worried about performance enough as it is with compiling to bytecode :P
<companion_cube> sounds unfeasible
<adrien_oww> well, you build several versions
<BitPuffin> and now I should run the interpreter as js?
<BitPuffin> you cray cray :P
<adrien_oww> you could
<BitPuffin> adrien_oww: Yeah I know, I just need to find the actual interpreter project thing
<adrien_oww> it's not necessarily slower
<adrien_oww> js_of_ocaml :P
<BitPuffin> I beg to doubt it
<adrien_oww> javascript is a war playground for apple and google
<BitPuffin> plus the interpreter is written in C, so had to be emscripten
<Hannibal_Smith> Is not iOS js restricted for anything that is not the builtin browser?
<adrien_oww> BitPuffin: oh, sorry
<adrien_oww> BitPuffin: js_of_ocaml takes javascript bytecode and emits javascript
<BitPuffin> adrien_oww: you mean ocaml bytecode
<adrien_oww> err, yeah
penglingbo has joined #ocaml
<BitPuffin> so byterun is buildable both as a lib and as an exe I presume?
<adrien_oww> C library you mean?
<BitPuffin> yeah
<adrien_oww> think you can :P
thomasga has quit [Quit: Leaving.]
<BitPuffin> uhm
<BitPuffin> Performance of the bytecode interpreter is *much* improved
<BitPuffin> ### if Gnu CC version 2 is used.
<BitPuffin> hahahahaha
<BitPuffin> wat
<BitPuffin> is that old as hell?
<BitPuffin> or is 2 faster than 4
<adrien_oww> 2 probably added computed gotos
dsheets has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
Moataz-E has joined #ocaml
<Drup> BitPuffin: js_of_ocaml code is faster than bytecode.
<BitPuffin> Drup: at runtime?
<Drup> what else could it be than runtime ?
<Drup> of course, "at runtime" x)
<companion_cube> it is faster if you use v8
<companion_cube> it obviously depends on which JS interpreter is used
olauzon has joined #ocaml
<BitPuffin> Drup: well maybe compilation time is shorter or something xD
<BitPuffin> so
<BitPuffin> I do get libocamlrun
<BitPuffin> but not ocamlrun
<BitPuffin> wat bi hast me doing wrong
Hannibal_Smith has quit [Quit: Sto andando via]
<BitPuffin> albeit
<BitPuffin> on ios I won't be able to use anything but ocamlrun
<Drup> (compiler time can't be shorter, since it's compiling *from* bytecode)
<BitPuffin> so I guess time to stuff
<BitPuffin> yeah I know
<adrien_oww> BitPuffin: read the documentation
<adrien_oww> it's "make world", not "make all"
<Drup> (note that the benchmark may be outdated)
<adrien_oww> congrats, you can restore the files in boot/ from another place
<BitPuffin> adrien_oww: ah, usually it's make all :P
<BitPuffin> adrien_oww: that said, if make all doesn't work you've got a bug in your make file
<BitPuffin> or rather
<BitPuffin> if any target doesn't work there is a bug in the makefile
<adrien_oww> BitPuffin: it works
<adrien_oww> it just doesn't do what you think it does
<adrien_oww> and usually it's "make", not "make all" :)
<BitPuffin> well it fails, because a missing dependency no?
<BitPuffin> yeah that's true
<BitPuffin> but make usually means make all xD
<adrien_oww> restore boot from somewhere else
<BitPuffin> restore boot?
<adrien_oww> the boot directory
<BitPuffin> well what do you mean restore
<adrien_oww> extract it again or git checkout the directory or...
<BitPuffin> but why?
<adrien_oww> because apparently you've lost valuable files which are needed by the bootstrap
<BitPuffin> ah
<BitPuffin> hmm
<BitPuffin> how do I make it configure for armv7?
metasyntax has joined #ocaml
<adrien_oww> you need to set verbose something
<adrien_oww> and you'll get a more complete error message
<ggole> def`: ping
<def`> ggole: pong
<adrien_oww> BitPuffin: set ld too?
<adrien_oww> BitPuffin: view configure, scroll a bit
<ggole> def`: I was grubbing through the guts of merlin, and I think it could be a bit more helpful when it comes to responses
<ggole> eg, if you try to locate a keyword, it just returns not found
<BitPuffin> adrien_oww: partialld?
<ggole> And if you try to locate a module-qualified identifier, and .merlin does not exist, it will also just return not found. A little message would be helpful to new users.
<ggole> What do you think about adding some cases for those?
<BitPuffin> added -partialld "xcrun -sdk iphoneos ld -r" still getting the same error message basically
Moataz-E has quit [Quit: Leaving]
<adrien_oww> BitPuffin: no, partialld is only a flag
<adrien_oww> like -r
<adrien_oww> not -r
<adrien_oww> actually, yeah, -r
<def`> ggole: sure
<adrien_oww> another one
<BitPuffin> well the variable in the configure script is ld -r adrien_oww
<def`> Locate has not yet been ported to the "new merlin", so it's the right time to reconsider the interface
<adrien_oww> can't look at it right now but there's something
<BitPuffin> on line 41
<BitPuffin> partialld="ld -r"
<ggole> def`: the "new merlin"? Is looking at (the ocaml part of) this one a waste of time?
<def`> ggole: the "new merlin" can be found on ocaml-402 branch. It's a complete redesign of the parser, but the rest of the code is shared.
<ggole> Hmm, ok
<adrien_oww> BitPuffin: ok, try
<adrien_oww> sh -x ./configure ...
<adrien_oww> pastebin the same
<def`> ggole: the protocol has also been simplified, so while not straightforward, porting code from the old one should not take much time
remyzorg has quit [Quit: WeeChat 0.4.3]
<BitPuffin> adrien_oww: ^
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
ustunozgur has joined #ocaml
<adrien_oww> BitPuffin: dunno; replay what it does around line 120
<adrien_oww> can try to get debug infos from that runtest script (not sure why verbose didn't take care of that)
<BitPuffin> adrien_oww: which directory should I be in?
<adrien_oww> + cd config/auto-aux
<BitPuffin> that doesn't output anything
<BitPuffin> Isaks-MacBook-Pro% sh ./runtest ansi.c
<BitPuffin> Isaks-MacBook-Pro%
<adrien_oww> yeah
<adrien_oww> same :
<adrien_oww> sh -x ./runtest ansi.c
<BitPuffin> + test '' = yes
<BitPuffin> + -o tst ansi.c
<BitPuffin> + exit 100
<adrien_oww> you need
cago has quit [Quit: Leaving.]
<adrien_oww> cc='xcrun -sdk iphoneos clang' sh -x ./runtest ansi.c
<BitPuffin> identical output
<def`> ggole: which part are you looking at actually? :)
<BitPuffin> except it's "xcrun -sdk iphoneos clang -o tst ansi.c"
<BitPuffin> in the middle
maattdd has quit [Ping timeout: 240 seconds]
<adrien_oww> and if you run that by hand?
<BitPuffin> ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
<BitPuffin> however
<BitPuffin> if I add -arch armv7 it works
<BitPuffin> to the clang command
<adrien_oww> :)
racycle has joined #ocaml
cago has joined #ocaml
thomasga has joined #ocaml
<BitPuffin> adrien_oww: whic I already tried with the configure script but that doesn't work
<adrien_oww> you have the output of that? (as sh -x ./configure ...)
<BitPuffin> on the way
<ggole> def`, the response bits
<adrien_oww> ah, I've understood
<ggole> (Although now I'm poking around in merlin.el.)
<adrien_oww> BitPuffin: well, edit the runtest file and make it not try to run the executable it has generated
<def`> ggole: ok good. Protocol, IO and Command almost didn't change if that was what you were concerned about
<def`> but the protocol is simpler, especially for synchronization now
<BitPuffin> adrien_oww: got further, but not all the way https://gist.github.com/BitPuffin/525be8c94d56349498d0
<adrien_oww> BitPuffin: add your case at https://github.com/ocaml/ocaml/blob/trunk/configure#L500
<ggole> def`: well, the response code mostly just passes things through from Track_definition.from_string
<ggole> Which is a touch hairy
<adrien_oww> you don't really fit in the cross-compilation case though since it works by prepending $TOOLSPREF and that's not compatible with how you run the compiler
<adrien_oww> (yes, that sucks, no I haven't had the choiceà
<adrien_oww> )
dant3_ has quit []
maattdd has joined #ocaml
<BitPuffin> adrien_oww: yeah I guess this stuff will be fixed when the cross compilation shit gets better
<BitPuffin> adrien_oww: well what's my case?
<adrien_oww> well
<adrien_oww> for the sizes of ints, you need to provide input
<adrien_oww> for the others, we'll see :P
<adrien_oww> read from line 500 to 513 in my link
<BitPuffin> yeah I know
<BitPuffin> but I don't know the value of my $target
<BitPuffin> x86_64-apple-darwin13.2.0
<BitPuffin> that's not right
<adrien_oww> go the dirty way
<adrien_oww> prepend *) ... ;;
<adrien_oww> to the list there
<BitPuffin> haha
<adrien_oww> and give us the values you use
<BitPuffin> that's naughty
<adrien_oww> I prefer to call it "efficient"
<adrien_oww> or
<adrien_oww> "result-driven approach"
slash^ has joined #ocaml
<BitPuffin> yeah
<Drup> (hack-driven engineering)
<adrien_oww> but I'm happy
<BitPuffin> I don't really know about set 4 4 4 2 8
<adrien_oww> this gives me a case against TOOLPREF
arj has quit [Quit: Leaving.]
<BitPuffin> now it looks like this
<BitPuffin> but I still get the same error
ustunozgur has quit [Remote host closed the connection]
topher has joined #ocaml
<adrien_oww> if test "$?" -eq 0; then
<adrien_oww> replace with
<adrien_oww> if ! test "$?" -eq 0; then
<adrien_oww> (reverse condition)
<BitPuffin> ** OCaml configuration completed successfully **
<BitPuffin> \o/
<adrien_oww> :)
<adrien_oww> so, make world
<BitPuffin> doing it already :P
<adrien_oww> it will fail but only after you've gotten the interpreter
<BitPuffin> yeah it failed, but I do have ocamlrun
<adrien_oww> :)
<adrien_oww> run "file" on it just to be sure
<BitPuffin> however what I need is libocamlrun.a
<BitPuffin> boot/ocamlrun: Mach-O executable arm
<BitPuffin> sweet
<BitPuffin> it's macho even
<adrien_oww> don't remember when it's built
<BitPuffin> make all adds it
<BitPuffin> for some ungodly reason
<adrien_oww> check it's the right file type
<BitPuffin> or maybe not
tlockney_away is now known as tlockney
<BitPuffin> ah
<BitPuffin> it's in byterun
<BitPuffin> % file byterun/libcamlrun.a
<BitPuffin> byterun/libcamlrun.a: current ar archive random library
<adrien_oww> mkdir t
<adrien_oww> cd t
<adrien_oww> ar x ../byterun/libcamlrun.a
<adrien_oww> file *.o
<BitPuffin> Mach-O object arm
<adrien_oww> good
<BitPuffin> sweet
<BitPuffin> now
<BitPuffin> where is the header for this
cago has quit [Quit: cago]
hhugo has quit [Quit: Leaving.]
<adrien> caml/
<BitPuffin> doesn't exist
<adrien> that's where it gets after installation :P
<adrien> look for "memory.h"
<BitPuffin> it's in byterun
hhugo has joined #ocaml
<BitPuffin> do I only need memory.h?
<adrien_oww> no, you need all of them
<adrien_oww> well
<BitPuffin> woop
<adrien_oww> probably
<adrien_oww> but it's difficult to say without knowing exactly how you'll use everything
<BitPuffin> well right now what I wanna do is to just do something like
<BitPuffin> camlExecute("cohttp-hello-world.byte");
<BitPuffin> altohugh it's probably not that easy :)
<adrien_oww> you might be interested in that
<adrien_oww> and near the bottom
<adrien_oww> "The provided set of test programs can be used..."
<adrien_oww> actually
<adrien_oww> better take a look at the source of ocamlrun itself
<def`> ggole: for catching keywords, just testing "Hashtbl.mem Lexer.keyword_table request" should be enough, no ?
topher has left #ocaml [#ocaml]
<ggole> def`: yeah, that's pretty easy
<ggole> And for the .merlin thing, I guess you'd stick some state in Global_state.project indicating whether a .merlin was found and whether it had any errors
<def`> this is the kind of things that were cleaned up in the new merlin
maattdd has quit [Ping timeout: 244 seconds]
<def`> tries to expose an API wrapping all stateful things
<adrien_oww> BitPuffin: was busy; it's better to look at that link, yeah
<adrien_oww> BitPuffin: and in particular, "An alternative is to embed the bytecode in the C code. The -output-obj option to ocamlc is provided for this purpose. It causes the ocamlc compiler to output a C object file (.o file, .obj under Windows) containing the bytecode for the OCaml part of the program, as well as a caml_startup function."
<BitPuffin> adrien_oww: yeah, but that makes it platform dependent right?
<adrien_oww> hmmm
<BitPuffin> adrien_oww: by the looks of byterun main.c it actually is as easy as I hoped for
<BitPuffin> caml_main(argv)
<BitPuffin> ;
<adrien_oww> but you need to point to the bytecode file
divyanshu has quit [Quit: Computer has gone to sleep.]
<BitPuffin> adrien_oww: yeah it's a string with the path to the bytecode file rigth?
<adrien_oww> argv?
<ggole> def`: hmm, it seems to assume than an empty .merlin and no .merlin are the same state, which would make reporting suggestions a bit tricky
<BitPuffin> yeah
<adrien_oww> argv is the array of the command-line arguments
<adrien_oww> _but_
<adrien_oww> the first one will be the bytecode file
<BitPuffin> yeah
<adrien_oww> so it's not impossible that caml_startup() piggybacks on that
<BitPuffin> so I could pass it {"path/to/bytecode/file"}
<adrien_oww> actually, second
<adrien_oww> first is path to the current executable
<BitPuffin> ah
<BitPuffin> does it care?
<adrien_oww> and caml_startup() skips it
<adrien_oww> well
<BitPuffin> or could I just put ""
<adrien_oww> if it strips the first argument and you only have one...
philtor has joined #ocaml
<adrien_oww> and it looks like it might be a NULL-terminated array
<adrien_oww> better check the doc on the exact format
<BitPuffin> yeah I'll read through the whole interfacing with C part later
<def`> ggole: no, the config.dot_merlins field list all files that contributed to the configuration
<BitPuffin> I guess what I've accomplished today is compiling the libcamlrun.a for arm (ios)
<def`> so, checking if the list is empty should be enough for your purpose
<BitPuffin> which is a step forward
mort___ has joined #ocaml
<def`> except, that there is no way to observe this at the moment in the API, it's write-only if I am not mistaken :)
<adrien_oww> :)
<BitPuffin> did take longer than I had hoped
<BitPuffin> but I think now that I've done it for ios it will be faster for android and all them jazz
<BitPuffin> Gonna try basically as much as I can
<adrien_oww> yeah, should
<BitPuffin> everything from ios to sailfish and ubuntu touch if possible
<def`> never seen what sailfish looks like, is it nice ?
Hannibal_Smith has joined #ocaml
maattdd has joined #ocaml
<BitPuffin> it looks nice
<BitPuffin> I've tried it in a vm
<BitPuffin> pretty cool
shinnya has quit [Ping timeout: 240 seconds]
<adrien_oww> \o/
<adrien_oww> to be honest I didn't expect it to work :D
<BitPuffin> what?
<BitPuffin> I meant tried sailfish :P
<adrien_oww> ah :D
<BitPuffin> unless you're talking about something else
<BitPuffin> haha
<BitPuffin> well I'm really scared it won't work
<adrien_oww> I meant the bytecode stuff
<BitPuffin> and that I'll have to abandon ocaml for this project :(
<adrien_oww> if it works that quickly it's great
<adrien_oww> I'm not usually very optimistic
<adrien_oww> ='(
<BitPuffin> yeah I'm really pessimistic about this but I want it to work :)
<adrien_oww> hehe :)
<BitPuffin> otherwise I'll have to start working in C
<BitPuffin> yuck
<adrien_oww> *shivers*
<BitPuffin> HaXe might be a possibility but I don't like that either
<whitequark> BitPuffin: I've been thinking of using OCaml and writing the UI in whatever is the natural for the target desktop environment
<whitequark> and then communicating them via zmq
<BitPuffin> whitequark: that's basically what we're hopefully doing, without the zmq part
<BitPuffin> well time to head home and play with ocaml for personal shit instead of this work shit
<BitPuffin> I like how I am potentially wastincg days on getting ocaml working for the most stressful assignment ever haha :D
Nuki has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
yomimono has joined #ocaml
<whitequark> well the zmq part is what makes it easy :p
fantasticsid has joined #ocaml
studybot_ has quit [Remote host closed the connection]
divyanshu has joined #ocaml
pminten has joined #ocaml
<pyon> Is there any difference between "let foo = object ... end" and "class foo = object ... end", other than the fact the former cannot be inherited while the latter can?
<mrvn> pyon: the first is a value, the other not
<pyon> ah!
penglingbo has quit [Ping timeout: 272 seconds]
<pyon> the second one would have to be explicity instantiated, right?
<def`> yep
<mrvn> let foo = object end is short for for class foo = object end let foo = new foo
<pyon> ah makes sense :-)
<mrvn> -for
stevej has joined #ocaml
Arsenik has joined #ocaml
rgrinberg has joined #ocaml
penglingbo has joined #ocaml
fantasticsid has quit [Remote host closed the connection]
jknick has joined #ocaml
Nuki has quit [Ping timeout: 272 seconds]
BitPuffin has joined #ocaml
Nuki has joined #ocaml
AltGr has left #ocaml [#ocaml]
pminten has quit [Remote host closed the connection]
Nuki has quit [Remote host closed the connection]
SethTisue has joined #ocaml
SethTisue has quit [Ping timeout: 255 seconds]
lordkryss_ has joined #ocaml
lordkryss has quit [Ping timeout: 240 seconds]
mort___ has quit [Ping timeout: 272 seconds]
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
penglingbo has quit [Ping timeout: 272 seconds]
hhugo has quit [Quit: Leaving.]
rand000 has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: Leaving.]
WraithM has joined #ocaml
rgrinberg has joined #ocaml
q66 has joined #ocaml
thomasga has quit [Ping timeout: 272 seconds]
shinnya has joined #ocaml
<weykent> so i wrote a memcached library for ocaml, but i'm not sure how to write tests for lwt code exactly. https://paste.weasyl.com/show/79seLXF2VnG2dZukt3zr/ is what i have, at least
arjunguha has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
lordkryss_ has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Quit: Leaving.]
thomasga has joined #ocaml
Kakadu has joined #ocaml
contempt has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
lordkryss has joined #ocaml
contempt has joined #ocaml
contempt has quit [Ping timeout: 244 seconds]
contempt has joined #ocaml
rz has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
slash^ has left #ocaml [#ocaml]
BitPuffin has quit [Ping timeout: 272 seconds]
avsm has quit [Quit: Leaving.]
hhugo has joined #ocaml
claudiuc has quit [Remote host closed the connection]
ollehar has joined #ocaml
BitPuffin has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasga has quit [Quit: Leaving.]
mcclurmc has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
arjunguha has joined #ocaml
mcclurmc has joined #ocaml
alpounet has quit [Remote host closed the connection]
diginux has quit [Ping timeout: 245 seconds]
alpounet has joined #ocaml
diginux has joined #ocaml
alpounet has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 272 seconds]
BitPuffin has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuc has joined #ocaml
WraithM has quit [Ping timeout: 252 seconds]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
WraithM has joined #ocaml
ollehar1 has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
axiles has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
<ggole> def`: ping
<def`> ggole: pong
<ggole> Another PR
<def`> ping asmanur :)
<ggole> Oh yeah, you aren't emacs flavoured :(
<asmanur> ggole: could you work on top of the branch ocaml-402 ?
<ggole> Yeah, is that where dev is going atm?
<ggole> Wait, will this require ocaml 4.02?
<asmanur> ..yeah
<ggole> Hmm. Hopefully opam will make that easy.
<def`> ggole: if that can help you work on the emacs mode, I can try to have support for 4.01 at the end of the week
<asmanur> the thing is, we're going to dump master at some point and although this one is ok, i'd rather not have to merge dozens of patch from master to this branch
arjunguha has joined #ocaml
<ggole> My opam doesn't list 4.02 :(
thomasga has quit [Quit: Leaving.]
lordkryss has quit [Ping timeout: 244 seconds]
<def`> 4.02.0+trunk
<ggole> Hmm, is this just a matter of which repos I have set up?
<def`> no this should be here by default
<asmanur> (you might want to opam update)
arjunguha has quit [Client Quit]
<def`> (and opam --version should be 1.1.1)
<ggole> 0 [http] default https://opam.ocaml.org
<ggole> I've opam updated, and opam --version is 1.1.1
<def`> opam switch --all ?
<def`> by default not all versions are printed, especially unstable ones :è)
<ggole> Oh, I see
<ggole> And off it goes
<weykent> hm, trying to figure out how to use bisect with ocamlbuild
<weykent> i'm trying to avoid writing a myocamlbuild.ml file
WraithM has quit [Ping timeout: 255 seconds]
<weykent> oh! i just needed -syntax camlp4o
<ggole> "Failure: ocamlfind not found on path, but -no-ocamlfind not used." So switch swaps out all of that stuff: I only need to opam install it? (As well as merlin's depdencies?)
<ggole> (Sorry for the silly questions, I'm new to the operation of opam switch.)
divyanshu has quit [Quit: Computer has gone to sleep.]
<def`> ggole: what are you doing?
<ggole> Trying to build merlin
<def`> (merlin dependencies: yojson & ocamlfind)
<ggole> With the shiny new 4.02
<def`> start from a clean clone
<Anarchos> ggole oh 4.02 is out ?
<adrien> no
<def`> redo configure etc
<ggole> Hmm, ok
<Anarchos> ggole my version is 4.03+dev0 :)
<ggole> (./configure could well be it.)
avsm has joined #ocaml
arjunguha has joined #ocaml
WraithM has joined #ocaml
_andre has quit [Quit: leaving]
shinnya has quit [Ping timeout: 264 seconds]
tnguyen has quit [Quit: tnguyen]
shinnya has joined #ocaml
alpounet has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
tnguyen has joined #ocaml
WraithM has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
alpounet has quit [Remote host closed the connection]
WraithM has quit [Ping timeout: 245 seconds]
olauzon has quit [Ping timeout: 272 seconds]
jao has quit [Ping timeout: 245 seconds]
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
araujo has quit [Ping timeout: 245 seconds]
tlockney is now known as tlockney_away
araujo has joined #ocaml
Eyyub has joined #ocaml
ggole has quit []
ustunozgur has joined #ocaml
SethTisue has joined #ocaml
<Drup> weykent: I looked at the code, I don't really have any idea of what it's supposed to do. Do you have a (documented) interface ?
<weykent> Drup, not yet; i should write a .mli file for it
ggole has joined #ocaml
<Drup> indeed, you shout ;)
<Drup> should*
<weykent> i started writing some tests, though i'm not sure this is the best way of going about it
Arsenik has quit [Remote host closed the connection]
ggole has quit [Client Quit]
Kakadu has quit [Quit: Konversation terminated!]
tlockney_away is now known as tlockney
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
BitPuffin has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
Hannibal_Smith has quit [Quit: Sto andando via]
avsm has joined #ocaml
thomasga has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasga has quit [Client Quit]
rgrinberg has quit [Quit: Leaving.]
jonludlam has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
jonludlam has joined #ocaml
rand000 has quit [Quit: leaving]
shinnya has quit [Ping timeout: 240 seconds]
Eyyub has quit [Ping timeout: 252 seconds]
maattdd has quit [Ping timeout: 255 seconds]
ollehar1 has quit [Ping timeout: 245 seconds]
Eyyub has joined #ocaml
maattdd has joined #ocaml
Eyyub has quit [Ping timeout: 264 seconds]
racycle has joined #ocaml
Eyyub has joined #ocaml
arjunguha has joined #ocaml
SethTisue has quit [Quit: SethTisue]
ustunozgur has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
thomasga has quit [Quit: Leaving.]
rs0 has quit [Ping timeout: 252 seconds]
rs0 has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkf has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
arjunguha has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vervic has quit [Quit: Leaving...]
thomasga has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
avsm has quit [Quit: Leaving.]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
philtor has quit [Ping timeout: 245 seconds]
tlockney is now known as tlockney_away