adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Emmanuel` has quit [Client Quit]
Emmanuel` has joined #ocaml
<Algebr> hannes: I'm trying to translate this python: hashlib.sha256(seed_str.encode('ascii')).hexdigest() to OCaml, with Nocrypto.Hash.digest `SHA256 (Cstruct.of_string date_stamp) |> Hex.of_cstruct |> Hex.to_string |> print_endline
<Algebr>
<Algebr> but that isn't corresponding to what python's is giving back
<hannes> Algebr: does it work for static values between hashlib.sha256("foo") and Nocrypto.Hash.digest `SHA256 (Cstruct.of_string "foo") ?
deko-pyon has quit [Quit: Loops are hard, let's GOTO shopping!]
<Algebr> okay got it: hashlib.sha256("foo").hexdigest() is Nocrypto.Hash.digest `SHA256 (Cstruct.of_string "foo") |> Hex.of_cstruct
pyon-kan has joined #ocaml
idegen has joined #ocaml
idegen has left #ocaml [#ocaml]
please_help has quit [Ping timeout: 264 seconds]
please_help has joined #ocaml
sh0t has quit [Ping timeout: 268 seconds]
seangrove has joined #ocaml
<Algebr> Okay, so my confusion was on Hex's to_string.
<mrvn> is that a to_byte?
sh0t has joined #ocaml
struk|desk is now known as struk|desk|away
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<Algebr> What is the most efficient way to get an int 5 from char '5'?
struk|desk|away is now known as struk|desk
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<Drup> Char.code x - 48
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
hnagamin has quit [Quit: さようなら]
<Algebr> thanks
Kakadu has quit [Remote host closed the connection]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
spacekit1eh has quit [Ping timeout: 276 seconds]
spacekitteh has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
silver has quit [Read error: Connection reset by peer]
Emmanuel` has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
struk|desk is now known as struk|desk|away
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
dhil has quit [Ping timeout: 244 seconds]
struk|desk|away is now known as struk|desk
tennix has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
FreeBirdLjj has joined #ocaml
struktured has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
spacekitteh has quit [Ping timeout: 268 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
spacekitteh has joined #ocaml
seangrove has joined #ocaml
struk|desk is now known as struk|desk|away
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
aantron_ has joined #ocaml
tcpc has left #ocaml ["WeeChat 1.2"]
aantron has quit [Ping timeout: 248 seconds]
darkf has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
aantron has joined #ocaml
aantron_ has quit [Ping timeout: 260 seconds]
aantron has quit [Ping timeout: 276 seconds]
zRecursive has joined #ocaml
struktured has joined #ocaml
<pierpa> does the compiler inline and nullifies Char.code?
tennix has joined #ocaml
aantron has joined #ocaml
AltGr has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<mrvn> pierpa: that is verry likely %identity
<mrvn> pierpa: extracting a char from a string though needs to tag it, but that might get optimized away if you use it in some expression.
<pierpa> I was thinking, if Char.code 'x' becomes a no-op, then one can write Char.code '0', which is better then the magic number 48
<pierpa> but I'm not sure if the compiler does this transformation
<zRecursive> [ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".\n #=== ERROR while installing conf-ncurses.1 ====================================# # opam-version 1.2.2 # os cygwin # command pkg-config ncurses => which causes `opam install ocamlfind` failed !
<zRecursive> FYI, it is on Windows XP
<zRecursive> If i run `pkg-config ncurses` directly in terminal, nothing is displayed.
struk|desk|away is now known as struk|desk
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
tokik has quit [Quit: leaving]
tokik has joined #ocaml
struk|desk is now known as struk|desk|away
<Algebr> Drup: This would be nice if jsoo played nicely with it: https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview#heading=h.xuvxhsd2bp05
seangrove has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
__rlp_ has quit [Ping timeout: 246 seconds]
__rlp has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
keep_learning has joined #ocaml
aantron has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 240 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
aantron has joined #ocaml
sh0t has joined #ocaml
kushal has joined #ocaml
spacekitteh has quit [Ping timeout: 244 seconds]
spacekitteh has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
ygrek_ has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
MercurialAlchemi has joined #ocaml
aantron has quit [Remote host closed the connection]
spacekitteh has quit [Ping timeout: 252 seconds]
wiredsister has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
seangrov` has joined #ocaml
ygrek_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
seangrov` has quit [Read error: Connection reset by peer]
wiredsister has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
antkong_ has quit [Quit: antkong_]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
spacekitteh has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
sfri has quit [Read error: Connection reset by peer]
wolfcore has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
wolfcore has joined #ocaml
spacekitteh has quit [Ping timeout: 246 seconds]
spacekitteh has joined #ocaml
sfri has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
malc_ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
jgjl has joined #ocaml
struk|desk|away is now known as struk|desk
Algebr has quit [Ping timeout: 248 seconds]
Haudegen has quit [Ping timeout: 244 seconds]
johnf has quit [Remote host closed the connection]
johnf has joined #ocaml
Haudegen has joined #ocaml
struk|desk is now known as struk|desk|away
kushal has quit [Quit: Leaving]
spacekitteh has quit [Ping timeout: 240 seconds]
slicefd has joined #ocaml
antkong_ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
ontologiae has joined #ocaml
ygrek_ has quit [Ping timeout: 244 seconds]
zRecursive has quit [Remote host closed the connection]
kushal has joined #ocaml
kushal has quit [Changing host]
kushal has joined #ocaml
pierpa has quit [Read error: Connection reset by peer]
Simn has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
warp has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
jwatzman|work has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
larhat has joined #ocaml
pyon-kan has quit [Quit: Loops are hard, let's GOTO shopping!]
martintrojer has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
pyon has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
pierpa has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
silver has joined #ocaml
dhil has joined #ocaml
AltGr has left #ocaml [#ocaml]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
_andre has joined #ocaml
Reshi has joined #ocaml
orbifx has joined #ocaml
antkong_ has quit [Quit: antkong_]
ggole has joined #ocaml
<orbifx> What libraries do you recommend I use low level serial network programming. Handling bits and marshaling?
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
<orbifx> So far I'm looking at bitstring
<flux> that's probably fine. I think the most sad thing about bitstring is that it requires the complete buffer up-front, otherwise it's pretty cool.
chindy has joined #ocaml
Kakadu has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
jwatzman|work has joined #ocaml
antkong_ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<tennix> if i compiled myprogram.ml under linux to get myprogram.byte, can i use myprogram.byte on other platforms?
<ggole> Yeah, bytecode is machine independent (but *not* version independent).
<Drup> Beware of 32/64 bits issues with constants, though. There is a warning for that
<malc_> tennix: what everyone else said + custom might pose a problem
<malc_>
TheLemonMan has joined #ocaml
Haudegen has joined #ocaml
<tennix> ok, i just tried that. I build a hello.ml in vagrant under mac, and copied hello.byte to host machine, then run `ocamlrun hello.byte`, it runs correctly
<tennix> ./hello.byte cannot run because of ocaml installation path
<pierpa> maybe the option -use-runtime option to ocamlc can fix this? (I never tried)
<pierpa> -option
<Drup> It's mostly expected. You just have to launch it with ocamlrun
<flux> you can edit the first line of the file to make it work? actually there should be an option to use #!/usr/bin/env ocamlrun, i-use-runtime doesn't do exactly that ;)
kushal has quit [Ping timeout: 250 seconds]
<tennix> ocamlrun is good enough
icicled has joined #ocaml
<orbifx> flux: is bitstring abandoned?
kushal has joined #ocaml
chindy has quit [Remote host closed the connection]
<orbifx> And how does the bitstring approach compare against using printf and records?
<Drup> You can use cstruct too
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
<haesbaert> just use cstruct I'd say
<orbifx> Hmm ok let me check it out.. Does it get any brownie points for linguistic purity?! :-P
Reshi has quit [Quit: WeeChat 1.4]
manizzle has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<orbifx> Drup & haesbaert: looking at cstructs make me think it's targeted towards C interfaces. Maybe the examples are targeted towards that. Any tutorials?
kushal has quit [Ping timeout: 244 seconds]
<haesbaert> orbifx: hmm not really
<haesbaert> 1s
<haesbaert> cstruct is more about serializing/unserializing data
<haesbaert> it revolves around a Cstruct.t which is a buffer
kushal has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
<haesbaert> so you get BE.get16 BE.put32 and stuff like that
Emmanuel` has joined #ocaml
<companion_cube> is a Cstruct.t just a bigarray, or are there more information?
<Drup> companion_cube: a bit more, but it's mostly a bigarray
<haesbaert> IRC it's a collection of bigarrays
<haesbaert> orbifx: you can use the special syntax to generate getters/setters for a data format, and the syntax is derived from C
<haesbaert> but it's really just candy, it has nothing to do with interfacing with interfacing with C.
<haesbaert> I started using after reading the pcap in lib-test
<haesbaert> it's pretty simple
<orbifx> Got you ok. I've been wanting to avoid ppx, but what the heck :-P
Emmanuel` has quit [Client Quit]
<Drup> bitstring is an extension too
<orbifx> One last proposition: what about Batteries' bitset?
<hannes> a cstruct.t is a bigarray with an offset and length pointer... subsequence operations etc. do not copy the data, but adjust the offset/length information..
Emmanuel` has joined #ocaml
<companion_cube> but... bigarray already provides that ability
<haesbaert> I think Cstruct is more about being handy than doing something new
<orbifx> Drup: true, it is.
<companion_cube> Drup: new release of sequence, with your changes, incoming
pyon has quit [Quit: fix config]
<orbifx> haesbaert: Batbitset vs cstructs?
pyon has joined #ocaml
<haesbaert> dunno batbitset
<Drup> isn't batbitset a data structure ?
<haesbaert> never used bat* myself
<Drup> It's ... not really related
kushal has quit [Quit: Leaving]
<Drup> companion_cube: I don't even remember why I needed them :D
<companion_cube> pffff
<Drup> It was so long ago !
<companion_cube> oh come on
<Drup> :3
<companion_cube> it also gives me an excuse to remove deprecated functions in the next release
<Drup> Ah, yes
<Drup> it was for the shuffling visualisation
<Drup> You don't really need to open Bigarray anymore
<orbifx> Drup, I know, but it could be used to set all the bits and then send them through the serial.
<orbifx> Brb
BitPuffin has joined #ocaml
TheLemonMan has quit [Ping timeout: 248 seconds]
tennix has quit [Ping timeout: 240 seconds]
<flux> tried to send email to the caml-list a while back, but yquem.inria.fr didn't want to accept the smtp connection :(
troydm has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
Emmanuel` has quit [Client Quit]
Emmanuel` has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
<sspi> if I use Exp.open_ within a PPX to open an external module, how should I provide the module?
<Drup> With it's longident
<Drup> its*
<sspi> currently doing this {txt = Longident.Lident "Yojson.Basic.Util"; loc = Location.none}
<sspi> perhaps I need to do more with the loc?
<Drup> No, that's not the issue
<sspi> I get the following error: Unbound module Yojson.Basic.Util
<Drup> open you terminal and use Longident.parse in it
<Drup> it should clarify things
uris77 has joined #ocaml
<Drup> your toplevel*
<sspi> Drup: I haven't used the toplevel a lot yet (actually almost not), how do I add longident support there?
<Drup> #require "compiler-libs.common" ;;
<sspi> awesome thanks
Emmanuel` has quit [Quit: Konversation terminated!]
<sspi> Drup: yes that definitely helped! :-) thanks
Emmanuel` has joined #ocaml
<orbifx> Back
kaustuv has joined #ocaml
<kaustuv> I am getting the following error in the *Messages* buffer on merlin-locate on 4.03.0+beta1. The command is also not doing anything. Is this known/expected?
<kaustuv> Merlin failed with exception: Cmt_format.Error(_)
Mandus has quit [Ping timeout: 260 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Mandus has joined #ocaml
Emmanuel` has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
uris77 has quit [Ping timeout: 276 seconds]
tane has joined #ocaml
uris77 has joined #ocaml
profan has quit [Ping timeout: 276 seconds]
antkong_ has quit [Ping timeout: 244 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Mandus has quit [Ping timeout: 248 seconds]
antkong has joined #ocaml
tennix has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Mandus has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
pierpa` has joined #ocaml
copy` has joined #ocaml
pierpa has quit [Ping timeout: 276 seconds]
<orbifx> Drup: so could the bitset be used for representing a packet?
<Drup> No idea
sh0t has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
pierpa`` has joined #ocaml
pierpa` has quit [Ping timeout: 276 seconds]
kaustuv has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
aantron has joined #ocaml
<jgjl> orbifx: care to explain what you are working on? I have been thinking about packet processing in Ocaml for some time and would like to hear what others are doing..
<companion_cube> I suppose the mirage people use cstruct for network protocols
<jgjl> yep
<orbifx> That's reassuring.
<orbifx> jgjl: I want to compose binary packets which are sent over a serial stream.
AlexRussia has quit [Ping timeout: 276 seconds]
<jgjl> ok
pierpa`` has quit [Remote host closed the connection]
<orbifx> Any suggestions jgjl? And what are you working on?
<jgjl> I want to work with mirage and tinkered on a mirage switch
<jgjl> Unfortunately I did not have the time yet to get much further than a basic prototype
<jgjl> Then I found that there already was an switch, which IIRC even does OpenFlow, so I was now thinking if there was something more useful to work on
sepp2k has joined #ocaml
hxegon has joined #ocaml
struk|desk|away is now known as struk|desk
<jgjl> cstruct seems to work for mirage. However, I have not completely understood how it works and what its properties are, performance wise
<orbifx> Ok
<orbifx> Any cstructs tutorials?
<jgjl> Not that I know of..
antkong has quit [Quit: antkong]
antkong has joined #ocaml
antkong has quit [Read error: Connection timed out]
<Algebr`> orbifx: Hex is probably an easy to understand package that uses cstruct, That should be my next tutorial using cstruct
MercurialAlchemi has joined #ocaml
<Algebr`> seangrove: Ah sorry, I meant to say use any C function that you bind to OCaml with and inside that function do your objective-C logic. By Cocoa API, that's kind of iOS knowledge. What would you like to do?
AlexRussia has joined #ocaml
sz0 has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
shinnya has joined #ocaml
slash^ has joined #ocaml
<orbifx> Algebr`: just thrown my self at it, see how it goes.
jwatzman|work has quit [Quit: jwatzman|work]
<pyon> Does OCaml have a div_mod function somewhere?
<pyon> s/OCaml/the standard library/
seangrove has joined #ocaml
<malc_> pyon: no
<orbifx> How can I get cstructs ppx? Opam search only shows cstructs camlp4 extension
<aantron> what does ocamlfind list | grep cstruct show?
<seangrove> Algebr`: Are you doing office hours tonight?
<hannes> orbifx: get ppx_tools and cstruct..
<Algebr`> Not tonight, my brother arrived from nyc and will spend time with him + I don't have my macbook, apple store punted on repair
<Algebr`> But can still answer qs
<orbifx> hannes: i got ppx tools
<orbifx> Ant
<hannes> Algebr`: when are you arriving in marrakesh?
<Algebr`> I think thursday
<hannes> orbifx: then you should have .opam/bla/bin/ppx_cstruct ..
<orbifx> aantron: it's in thr list, but its version is 1.7.0, whereas everything else is 1.9.0
<aantron> orbifx: thats just an oversight
<aantron> i think they forgot to bump the version number manually in their META file
<hannes> (and yes, you'll need 1.9.0)
<orbifx> So what do I do to get 1.9.0?
<aantron> it should be 1.9.0, just mislabeled, does it not work?
<orbifx> New to ppx btw. It says error while running external processor.
<orbifx> Sh: cstruct: command not found
pyon has quit [Quit: fix config]
<aantron> do you have a file "cstruct" in your bin/ directory in the current switch, or in `ocamlfind query cstruct`?
<orbifx> I need: -ppx ppx_cstruct.. Right?
pyon has joined #ocaml
<aantron> hmm interesting i odnt have one in either
<aantron> orbifx: what are you using to trigger the build? ocamlfind?
<orbifx> Ocamlopt
<seangrove> Algebr`: Got it, thanks! Daniel and I are trying to get things prepped so we can build a mini-iOS/mirage app this coming weekend
<aantron> you need to run ppx_cstruct
<aantron> so yes
<orbifx> I think I fixed it.. No error now.. Looking for outputs
<aantron> ok yeah. it will be located in your opam bin/ directory
<Algebr`> seangrove: sure and I want to provide whatever help I can, send questions whereever
<orbifx> It compiled now. Didn't know I needed both ppx flag and ppx prefix
<orbifx> hannes: opening it now.
<aantron> orbifx: it should be much easier to use ocamlfind opt than ocamlopt directly. just pass -package cstruct.ppx and it should supply the necessary flags
<aantron> and, orbifx, do you want to PR cstruct to fix the description and version number? or i will do it :)
<aantron> not to mention ocamlfind will take care of including flags for dependencies for you
<orbifx> Where do I file it? Going to be a good netizen
<orbifx> I use ocamlfind as an argument to ocamlopt
<orbifx> Is ocamlfind better as the main interface?
<Algebr`> ocamlfind wraps ocamlopt
<aantron> yes, ocamlfind provides annoying flags for you to your compilers
<Algebr`> so you use less annoying ocamlfind flags instead of more annoying compiler flags
<aantron> much less annoying, because it will also provide flags for dependnecies, so you just list -packages for things you actually want to use, and ocamlfind should take care of everything else
<hannes> aantron: but is ocamlfind -package cstruct.ppx sufficient? (I ended with the commandline mentioned above in test.sh)
<aantron> well ocamlfind opt (or c) -package cstruct.ppx.. sufficient for what?
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hannes> to run the ppx..
<orbifx> Will try out ocamlfind now.
<orbifx> As primary frontend
<aantron> hannes: it should be, but i havent tried it
<aantron> are you worried about ppx_tools?
<hannes> aantron: I couldn't find the magic runes to get it to work (thus the ocamlfind ppx_tools/rewriter ppx_cstruct.native _and_ ocamlopt)...
<orbifx> aantron: is pull/88 food enough or have I missed something?
struk|desk is now known as struk|desk|away
<aantron> orbifx: you should also tell them to update their OPAM descr, because it's misleading
<aantron> but i am not sure where that string is coming from.. so if you cant find it easily, just mention it in the PR i guess
<aantron> "access C structures via a camlp4 extension" <--
<orbifx> Got you
<aantron> hannes: well, i am not sure why you had to do that. maybe cstruct has some problems with packaging, but i guess orbifx should be able to confirm soon (or now?) whether -package cstruct.ppx is enough
<orbifx> Aantron what's your nick so I can credit-reference you?
<aantron> orbifx: it's @aantron, but no need :)
mort___ has joined #ocaml
<mort___> hi! naive ocamlbuild user question — am getting an error "Error: Unbound module Ocamlbuild_js_of_ocaml", and no idea why. any suggestions how to fix?
<hannes> aantron: it works in other packages depending on cstruct.ppx, but it might be due to ocaml.ppx not being installed while testing, but using the pieces which just have been built
<Drup> mort___: where, why, how ? :D
<mort___> trying to build documentation for dbuenzli's jsont
<Drup> (well, mostly where)
<Drup> Ah, well, you need js_of_ocaml
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
<aantron> hannes: that might explain it
<mort___> is installed according to opam
<mort___> drup: ^^
<Drup> mort___: "ocamlfind | grep -i js_of_ocaml" ?
<orbifx> aantron: done
<aantron> alright, cool :)
<mort___> drup: : mort@greyjay:jsont#master *= $; ocamlfind query js_of_ocaml | grep -i js_of_ocaml
<mort___> /Users/mort/.opam/system/lib/js_of_ocaml
<hannes> aantron: (using the cstruct.ppx in here https://github.com/hannesm/ocaml-otr/blob/master/_tags#L12)
<mort___> hm. no `deriving` installed. trying that now...
<aantron> ah
<aantron> hannes: sick avatar :)
<Drup> mort___: No, ocamlfind list
<hannes> aantron: pffff
<mort___> drup: messaged directly as will probably get channel limited or stg :)
<mort___> js_of_ocaml.ocamlbuild is listed
<Drup> "js_of_ocaml.ocamlbuild" is the one that interests us
<Drup> You seem to have it, so I don't know, look at jsont's opam instruction
<mort___> i did, cut'n'paste to run
sh0t has quit [Ping timeout: 240 seconds]
Algebr` has quit [Remote host closed the connection]
<Drup> Then I don't know, ask him.
<mort___> ta
struk|desk|away is now known as struk|desk
shinnya has quit [Ping timeout: 240 seconds]
warp has quit [Quit: I'll.. be back... https://i.imgur.com/KYU8vSO.gif]
Haudegen has quit [Ping timeout: 252 seconds]
Algebr has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 264 seconds]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
murphy- has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
sh0t has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
shinnya has joined #ocaml
ygrek_ has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Emmanuel` has quit [Client Quit]
Emmanuel` has joined #ocaml
<mrvn> My Qt5 segfaults. The first 100 or so events work but then it crashes.
<Kakadu> Maybe something GC-related?
<mrvn> verry likely.
<mrvn> kakadu: do you know what the cost is of registering a generational root or removing it?
<Kakadu> not really
<malc_> the cost of walking a list and inserting a node? then again haven't touched this part of ocaml in a decade or so.
orbifx2 has joined #ocaml
<mrvn> so twice the memory of the value but little cpu time?
<Algebr> malc_: do you have any notes that you wrote to yourself about OCaml runtime over those years? Maybe somethign nice to share
orbifx4 has joined #ocaml
<companion_cube> there is the blog of rwjones
<malc_> Algebr: i believe i have something related to functor specialization and maybe something regarding roots (object bounds), but finding it will be difficult
<Algebr> yea, read that, but getting more notes always is nice
<malc_> I've spent good part of today trying to find a DVD... not a Sherlock Holmes apparently
<Algebr> malc_: oh man that sounds great! would be greatly appreciated if you could find it
orbifx has quit [Ping timeout: 260 seconds]
<malc_> Algebr: lasciate ogni esperanza - i suck at documenting things
orbifx2 has quit [Ping timeout: 240 seconds]
<Algebr> what does the first part mean, the words before -
<malc_> 'All hope abandon'
<malc_> Dante
* malc_ removes veneer of sophistication and goes for a smoke
<Algebr> lol
Haudegen has quit [Ping timeout: 260 seconds]
<seangrove> Algebr: Trying to figure out how to translate Obj-c to OCaml and call into the libraries. Would you be able to flesh this out (included the SO link in the likely case that you need more context) https://gist.github.com/sgrove/3ab3bfcd3ded72274b34?
BitPuffin has quit [Read error: Connection reset by peer]
<Algebr> seangrove: you want to call those NSURL objects from OCaml?
<Algebr> this way would require some wrapping of those objc objects, would probably be easier to do all the connection logic in Objc and give OCaml the final result, like a plain string or something, I
<Algebr> I haven't wrapped objective-c objects in OCaml yet, but it would presumbaly be like making a class that wraps a raw pointer from objc, like in initializer
<Algebr> download the source of psello's example apps, Jeffrey did a lot of that, wrapping objc objects in OCaml
<Algebr> as ocaml objects
<Algebr> Something nice would be if we could auto generate the wrapped objects
<seangrove> Algebr: Yeah, I've been looking through `Portland` to get a sense of it, but there's a bit too much there. Trying to figure it out incrementally.
<seangrove> And I agree about doing more in obj-c, but as a way of learning, I'd like to know how to do it ML
<mrvn> would be nice if ctypes would support c++ (and obj-c)
<Algebr> seangrove: yes, would need to wrap the objc object, somethign like: class nsview = object(self) initializer hidden = [[foo alloc] init] end something liek that
<Algebr> yes would be great
<Algebr> objc would be easier, c++ would be hard it hink
<Algebr> think
mort___ has quit [Quit: Leaving.]
orbifx4 has quit [Quit: AtomicIRC: The nuclear option.]
orbifx has joined #ocaml
<mrvn> would require stub generation for c++, esspecially for templates.
<seangrove> Algebr: Is this an example of wrapping an objc object? https://gist.github.com/sgrove/0da407b73f2de745d581
<Algebr> I couldn't get stub generation to work for ctypes for plain C either :(
<Algebr> seangrove: yea, looks like on right track
<Algebr> just Cocoa is huge
<seangrove> What're the rules for the name translations?
<seangrove> What's the heuristic behind setText -> _setText_ ?
<Algebr> actually not a heuristic in cocoa
<Algebr> setText is like a method that assumes there's an instance variable of _text
Haudegen has joined #ocaml
<Algebr> also be aware that it might be somewhat hard to debug...because if you call the incorrect method, aka typo, then nothing will happen rather than exception. (mostly sure about that, this is how objc is)
<seangrove> Algebr: but the ml code references it as _setText_
<seangrove> I see, if the object doesn't respond to a message, it's just dropped?
<seangrove> How would I know what to refer to initWithBoardandName in an ml file?
<Algebr> I think it might be another method its also calling, or maybe a prefix. Objc object will just not do anything. not sure. That would be up to you, you can call it whatever you want in an ML file, more important is that the external call is set up correctly. one thing I could imagine doing is making one dispatch function in OCaml, aka an external declartion that takes some arguments and calls appropriate object, or somethign like
<Algebr> that. (Admittedly this is the first time I'm seriously thinking about wrapping Objc objects in OCaml)
murphy- has quit [Ping timeout: 246 seconds]
troydm has joined #ocaml
<Algebr> although dsheets is doing a lot of OCaml + OS X, https://github.com/dsheets/ocaml-osx-cf, i imagine it would work mostly fine on iOS as well
<seangrove> Ah, looks interesthing, thanks
<Algebr> yes, but it uses ctypes and is much lower level than cocoa itself, I was kind of just thinking outloud
<Algebr> I am not sure if ctypes can be compiled with the cross compiler
tennix has quit [Ping timeout: 248 seconds]
yunxing has joined #ocaml
<malc_> Algebr: deep within mounts upon mounts of dumps I've found the hodgepodge of haphazard snippets of my thought process at the time, formless...
<Algebr> Okay, I'll take that, could clean it up, how would you like to share them
manizzle has quit [Remote host closed the connection]
<malc_> it's basically code only
<malc_> not text
<malc_> corner case and the like
<malc_> *cases
<Algebr> specfun right
aantron has quit [Read error: Connection reset by peer]
<malc_> and I don't think I have anything w.r.t scaml than what's on the site or in webarchive
aantron has joined #ocaml
<Algebr> this is nice, thank you
<malc_> though I vividly remember creating ascii diagrams of what points where, don't think that survived though, scuzzi
<malc_> you are welcome
<Algebr> I like apc a lot too :)
dhil has joined #ocaml
<malc_> hah :)
<malc_> i abandoned it in favor of a watt-meter
<Algebr> lol
freehck has quit [Ping timeout: 260 seconds]
<seangrove> Algebr: Haven't made much progress, but seeing how some of the pieces come together at least https://www.dropbox.com/s/y725oupg0xa47wd/Screenshot%202016-03-07%2011.45.38.png?dl=0
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
<malc_> your ignore-ance is alarming
tennix has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
wagle has quit [Remote host closed the connection]
wagle has joined #ocaml
yunxing has quit [Ping timeout: 268 seconds]
<Algebr> seangrove: you're saying that such a C function is to be expected in the binary, UILabel_setBounds_ but this symbol does not exist
<Algebr> I assume that in that example that you looked for then that source code also contains some C code that starts something like: CAMLprim value UILabel_setBounds_(value...)
<Algebr> this function must exist somewheer and presumably you need to provide it
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<seangrove> Algebr: Yup, looks like you were pretty close!
<seangrove> That definitely looks like a lot of work on both ends to get OCaml/ObjC working together
<mrvn> Damn, this can't work. The Qt5 class needs a pointer to the ocaml class wrapping it. So it has a "value ml_obj;" and registers that as root. But then the ocaml object will never be garbage collected and the Qt5 class will never be freed.
<mrvn> Can I register a value as weak?
<Algebr> seangrove: yea, well it is if you want to wrap Cocoa in ML land
<Algebr> hence I was hoping it could be autogenerated or somethnig
<seangrove> Algebr: I want it all!
<seangrove> ;)
<Algebr> Just heard Freddie Mercury in my head, "...and I want it now!"'
sh0t has quit [Ping timeout: 248 seconds]
<Algebr> totally doable, just time needed.
<mrvn> and a chicken. Don't forget the chicken.
_andre has quit [Quit: leaving]
ggole has quit []
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
sh0t has joined #ocaml
<seangrove> Crazy, got it working!
hxegon is now known as hxegon_AFK
<seangrove> Able to set label text from OCaml-land
<seangrove> phew
<Algebr> !! Nice!
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
hxegon_AFK is now known as hxegon
seangrove has joined #ocaml
seangrov` has joined #ocaml
seangrov` has quit [Remote host closed the connection]
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<flux> do bigarrays always need to be allocated with the ocaml bigarray support or can they be allocated separately?
<flux> oh, enver mind, found the correct documentation ;-) http://caml.inria.fr/pub/docs/manual-ocaml/libbigarray.html
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
<mrvn> flux: they don't.
<Algebr> seangrove: also open up one for wrapping objc object
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<seangrove> Algebr: A lot of tutorials to write, I think :)
nicholasf has joined #ocaml
murphy- has joined #ocaml
murphy- is now known as Guest17526
Guest17526 has left #ocaml [#ocaml]
murphy- has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
keep_learning has quit [Quit: This computer has gone to sleep]
yunxing has joined #ocaml
lobo has joined #ocaml
lobo is now known as Guest85555
Guest85555 has quit [Ping timeout: 252 seconds]
lobo has joined #ocaml
slicefd has quit [Quit: WeeChat 1.4]
apache2_ is now known as apache2
Haudegen has quit [Ping timeout: 240 seconds]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<mrvn> Has anyone used a Weak.t in C code and called that from a finaliser? Somehow during the finaliser the object stored in the Weak.t has a tag of 144 instead of 248 (Object_tag). Ideas?
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
yunxing has quit [Ping timeout: 268 seconds]
murphy- has quit [Quit: Saindo]
Haudegen has joined #ocaml
data_hope has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
yunxing has joined #ocaml
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
manizzle has joined #ocaml
yunxing has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Verlassend]
profan has joined #ocaml
profan has quit [Client Quit]
profan has joined #ocaml
yunxing has joined #ocaml
data_hope has quit [Quit: leaving]
ygrek_ has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
Kakadu has quit [Remote host closed the connection]
<aantron> does anyone know how (how often) the OPAM archive gets updated from the OPAM repo? a package of mine was merged in yesterday, yet is still not available, and the OPAM website shows the latest packages were added on Mar. 3, though there clearly has been activity since
<Algebr> opam update? Usually it takes like 6/7 hours in my experience
<aantron> actually i noticed another package from before the weekend is still not there, so it seems the archive is stale for days now
<Algebr> this would be bad
<Drup> It used to be very quick, but it has gotten slower since a few weeks,
<aantron> does somebody have to run a script for it to happen?
<Drup> Pretty sure it's automatic
<aantron> then maybe the cron job or daemon is unreliable? ...
<Algebr> cron unreliable, you don't say
<aantron> :p
<aantron> who should be bugged about this?
<Drup> opam-repository
<aantron> ok will open an issue
<companion_cube> ah, I was wondering, too
<companion_cube> maybe Travis has a lot of work to do
Nahra has joined #ocaml
<Drup> travis always has a lot of work to do, but it's usually a few hours late, not days
Emmanuel` has quit [Quit: Konversation terminated!]
lobo has quit [Quit: leaving]
Emmanuel` has joined #ocaml
<hannes> Drup: but opam-repository -> opam.ocaml.org is not done by travis, but by some cron script somewhere..
<aantron> +1 this to draw attention: https://github.com/ocaml/opam-repository/issues/5899
<aantron> not sure if it's necessary..
yunxing has quit [Remote host closed the connection]
<Drup> +1ing is usually completely useless :p
<hannes> +1 *scnr*
<j0sh> how do you build jsoo from source? pinning opam to master gives me a weird unsatisfiable dependency on ocamlnet 3.6.0 and ocaml < 4.01.0
<j0sh> 'make build', Error: Unbound type constructor Html5_types.main
<Drup> you need dev tyxml
<j0sh> got it
yunxing has joined #ocaml
jeffmo has joined #ocaml
uris77 has quit [Quit: leaving]
t4nk750 has joined #ocaml
t4nk750 has left #ocaml [#ocaml]
kamog has joined #ocaml
Emmanuel` has quit [Quit: Konversation terminated!]
Emmanuel` has joined #ocaml
Nahra has quit [Quit: leaving]
GeorgeHahn has joined #ocaml
pyon is now known as quater-nyan
yunxing has quit [Remote host closed the connection]
<Algebr> looking for confirmation, expressions in a match <expr> with will be done from left to right, correct?
ygrek has quit [Ping timeout: 260 seconds]
<Drup> what ?
<Algebr> match (f "hello", Unix.sleep 1, g "bar")