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
<aantron> ty. thinking of an HTML validator?
<Algebr``> yea, quick command line tool
<Algebr``> will use at work
<aantron> yeah, i was thinking of something like that. next step, make a web UI over it :) without forgetting to mention on the page its written in OCaml.
<aantron> though markup.ml is going to need a performance upgrade eventually
<Algebr``> why doesn't this say anything? http://pastebin.com/8KkSrPbV (I thought that something was lazy so added that signals/pretty_print thinking that it would force some computation)
<aantron> pretty_print just gives you a lazy signal stream
<aantron> you need to either iter over it using signal_to_string to see the signals
<aantron> or do |> write_html |> to_string
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<aantron> in fact that code does no computation (iirc) beyond composing the functions :)
<Algebr``> okay, at least I had the right intuition
<aantron> in markup.ml functions that result in streams typically dont do anything immediately, while functions that result in values force their stream arguments
<aantron> other values*
<Algebr``> yep, works
<Algebr``> now looking to get string or info out hte Markup.location
<aantron> its just an int pair, but if all you need to do is print it with the error message, you can pass it as ~location to Error.to_string
<Algebr``> ah, dummy, didn't see the ~location
aantron has quit [Quit: Leaving...]
aantron has joined #ocaml
teknozulu has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
hxegon is now known as hxegon_AFK
Emmanuel`_ has joined #ocaml
d0nn1e has quit [Ping timeout: 252 seconds]
Vintila has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 268 seconds]
hxegon_AFK is now known as hxegon
d0nn1e has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
<Reshi> Hi, I am trying to use Tuareg-mode in emacs, trying to load my file into the toplevel: My foo.ml file has a line: module B = Bar, and I have a bar.ml & bar.mli file in the same directory. When I load foo.ml into the toplevel I get an Error: Reference to undefined global `Bar'.
<Algebr``> can do: #use "bar.ml";;
Emmanuel`_ has joined #ocaml
<Reshi> Algebr``: I did, it loads the contents of bar.ml, but the reference to the Module name Bar in foo is still listed as undefined.
<Algebr``> when you say top level do you mean plain ocaml or utop
jeffmo has quit [Quit: jeffmo]
<Reshi> plain ocaml
<Algebr``> hmm, it might be easier to just use utop in emacs instead, I have all the elisp you need posted here to make an awesome emacs ocaml coding experience http://hyegar.com/2015/10/20/so-youre-learning-ocaml/
d0nn1e has quit [Ping timeout: 248 seconds]
<Algebr``> (sorry I don't know how to fix the problem you're having)
<Reshi> When a file `bar.ml' exists and has some types and all defined in it, but has no .mli file, and no module declaration, is that file considered as a Module Bar?
d0nn1e has joined #ocaml
<Algebr``> bar.ml makes a module Bar
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<seangrove> aantron: The html ppx extension stuff is still several weeks away for tyxml, right?
<aantron> seangrove: i think this depends mostly on Drup at this point. i have to fix a few bugs i know about, but otherwise Drup needs time to review it
<aantron> i think he has a busy schedule at the moment, though i heard march 16 mentioned as a starting point once :)
* seangrove waves a hand slow at Drup
<seangrove> "You are not busy, you have nothing else to do..."
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Reshi has quit [Ping timeout: 264 seconds]
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
tg has quit [Ping timeout: 250 seconds]
Vintila has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
<Leonidas> Algebr``: also, I think this is probably the simplest introduction into effects: http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multicore/
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
struk|desk|away is now known as struk|desk2
tennix has quit [Ping timeout: 264 seconds]
jimt has quit [Remote host closed the connection]
jimt has joined #ocaml
jimt has quit [Client Quit]
jimt has joined #ocaml
dsheets has joined #ocaml
yunxing has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 248 seconds]
dsheets has quit [Ping timeout: 252 seconds]
tennix has joined #ocaml
Algebr`` has quit [Ping timeout: 268 seconds]
tennix has quit [Ping timeout: 268 seconds]
tg has joined #ocaml
dsheets has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
dsheets has quit [Ping timeout: 250 seconds]
dsheets has joined #ocaml
hxegon has quit [Ping timeout: 250 seconds]
dsheets has quit [Ping timeout: 250 seconds]
seangrove has quit [Ping timeout: 240 seconds]
seangrove has joined #ocaml
seangrov` has joined #ocaml
seangrove has quit [Client Quit]
seangrov` has quit [Remote host closed the connection]
seangrove has joined #ocaml
Reshi has quit [Ping timeout: 248 seconds]
tennix has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
aantron_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
aantron has quit [Ping timeout: 246 seconds]
seshachalam_ has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
mort___ has quit [Quit: Leaving.]
yomimono has joined #ocaml
seshachalam__ has joined #ocaml
axiles has quit [Ping timeout: 268 seconds]
seshachalam__ has quit [Quit: Leaving]
therac25 has quit [Quit: therac25]
nicholasf has quit [Ping timeout: 240 seconds]
aantron_ has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
seangrove has joined #ocaml
aantron has joined #ocaml
johnelse has quit [Ping timeout: 244 seconds]
seangrove has quit [Ping timeout: 276 seconds]
aantron_ has joined #ocaml
Guest60150 has quit [Ping timeout: 260 seconds]
aantron has quit [Ping timeout: 260 seconds]
johnelse has joined #ocaml
SomeDamnBody has joined #ocaml
tnguyen has joined #ocaml
tnguyen is now known as Guest80682
struk|desk2 is now known as struk|desk
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
nicholasf has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
therac25 has joined #ocaml
hxegon has joined #ocaml
nicholasf has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
nicholasf has joined #ocaml
keep_learning has joined #ocaml
therac25 has quit [Quit: therac25]
seshachalam_ has quit [Ping timeout: 246 seconds]
Reshi has joined #ocaml
larhat has quit [Quit: Leaving.]
seshachalam_ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
wolfcore has quit [Ping timeout: 260 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
keep_learning has quit [Ping timeout: 260 seconds]
wolfcore has joined #ocaml
seangrove has joined #ocaml
struk|desk is now known as struk|desk|away
seangrove has quit [Ping timeout: 260 seconds]
MercurialAlchemi has joined #ocaml
mettekou has joined #ocaml
pierpa has joined #ocaml
kushal has joined #ocaml
aantron has joined #ocaml
therac25 has joined #ocaml
aantron_ has quit [Ping timeout: 248 seconds]
seangrove has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
larhat has joined #ocaml
Reshi has quit [Ping timeout: 248 seconds]
Reshi has joined #ocaml
GeorgeHahn has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
seshachalam_ has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 250 seconds]
Reshi has quit [Ping timeout: 252 seconds]
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
<Vintila> Does anyone have UTop working with the async scheduler?
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kakadu has joined #ocaml
Simn has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
tane has joined #ocaml
copy` has joined #ocaml
darkf has quit [Quit: Leaving]
abbiya has joined #ocaml
larhat has quit [Quit: Leaving.]
nicholasf has quit [Remote host closed the connection]
larhat has joined #ocaml
nicholasf has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
Reshi has joined #ocaml
hxegon has quit [Quit: BRB]
mort___ has joined #ocaml
nicholasf has quit [Ping timeout: 276 seconds]
destrius has joined #ocaml
mort___ has quit [Client Quit]
emmanueloga has quit []
Reshi has quit [Quit: WeeChat 1.4]
emmanueloga has joined #ocaml
Reshi has joined #ocaml
seshachalam_ has joined #ocaml
seshachalam_ has quit [Client Quit]
AlexRussia has quit [Ping timeout: 244 seconds]
butts_butts has joined #ocaml
<destrius> hi... i'm getting a fatal error from utop when using #require "ppx_deriving.std"
<destrius> raised in bytes.ml
Reshi has quit [Quit: WeeChat 1.4]
<destrius> is there a problem with my configuration or is this not working with utop currently?
Reshi has joined #ocaml
<Kakadu> It works OK for me in the default toplevel
<destrius> i just upgraded to 4.02, so things might be broken for me
<Kakadu> `ocaml`, not `utop`
<destrius> seems like its not working in ocaml for me either
<destrius> hmm
<Kakadu> Is your compiler installed using opam?
<destrius> i think it might be a problem with whatever is being returned by the ppx
<destrius> i think it should be using the ocmal installation from the ubuntu ppa
<Kakadu> recompiling ocaml using opam is ususally good idea
<destrius> ok i might do that
<destrius> seems like several things are borked
<destrius> i guess i might need to re-initialize opam
butts_butts has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
abbiya has quit [Ping timeout: 276 seconds]
therac25 has quit [Quit: therac25]
pierpa has quit [Ping timeout: 276 seconds]
yomimono has quit [Ping timeout: 268 seconds]
yomimono has joined #ocaml
<destrius> hmm, still doesn't seem to work, even on a fresh install
Vintila has quit [Ping timeout: 244 seconds]
<Kakadu> Did you compile ocaml using opam?
<Kakadu> if not try executing 'opam switch 4.02.3 && eval `opam config env`'
nicholasf has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
therac25 has joined #ocaml
<destrius> yup i'm using a freshly compiled ocaml
<Kakadu> have you compiled ppx_deriving with opam too?
<destrius> yeah it was installed via opam too
seangrove has joined #ocaml
johnelse has quit [Ping timeout: 248 seconds]
johnelse has joined #ocaml
<Kakadu> Do you get a backtrace when environment variable OCAMLRUNPARAM=b is set?
<destrius> #require "ppx_deriving" doesn't crash, but requiring any of the plugins does
<Kakadu> Anyway, your issue is not very obvious
<destrius> yeah.. i'm trying to find out what exactly is going wrong
therac25 has quit [Quit: therac25]
<destrius> thanks for the pointers!
<Kakadu> btw, which versions of ocaml and ocamlfind do you use/
sgnb has joined #ocaml
<Kakadu> ?
<destrius> everything should be 4.02.3
<Kakadu> ocamlfind?
aantron has quit [Ping timeout: 276 seconds]
<Kakadu> $ opam show ocamlfind -f installed-versions
<Kakadu> I have 1.5.6
tennix has quit [Quit: WeeChat 1.4]
seangrove has quit [Ping timeout: 260 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<destrius> 1.6.2 here
<flux> works for me(TM) as well
<flux> ppx_deriving 3.2, ocamlfind 1.6.2, ocaml 4.02.3
<destrius> let me see if i get this problem outside of the REPL
silver has joined #ocaml
abbiya has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
<Kakadu> It bet that it will not appear
<destrius> ok, using deriving and sexplib compiles and runs fine
<destrius> for some reason the standard plugins don't seem to work, or i'm missing a library
<destrius> [@@deriving eq] should be there by default, right?
<Kakadu> no idea
<destrius> hmmmm
* Kakadu is upgrading to new ocamlfind
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
teknozulu has quit [Ping timeout: 252 seconds]
<destrius> aha
<destrius> i believe the problem was me loading camlp4 in my .ocamlinit
<destrius> camlp4o
kushal has quit [Ping timeout: 240 seconds]
<destrius> removing that makes things work again
<destrius> yeah it works now
<destrius> doh
<Kakadu> don't use camlp4
<destrius> sorry for all the noise
<Kakadu> we are in 2016
<destrius> yeah i know
<flux> pgocaml ;((
<destrius> i didn't realise it was still in my init
<destrius> camlp4, causing problems even when you don't use it anymore
<flux> we shall hope the preprocessing story of OCaml is going to be clear from now on!
<destrius> oh my, ppx_let
nicholasf has quit []
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<flux> I use ppx_monadic. how's ppx_let different?
<destrius> oh i've not seen ppx_monadic
<destrius> that looks like it might be even better
<destrius> i've been stuck in a pre 4.02 timewarp i guess
<destrius> lots of cool new things
yomimono has quit [Ping timeout: 240 seconds]
jrslepak has quit [Ping timeout: 244 seconds]
Kakadu has quit [Ping timeout: 252 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
jrslepak has joined #ocaml
mort___ has joined #ocaml
mort___ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
kushal has joined #ocaml
mort___ has quit [Client Quit]
warp has joined #ocaml
jwatzman|work has joined #ocaml
vpm_ is now known as vpm
sepp2k has joined #ocaml
mettekou has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
slicefd has joined #ocaml
SomeDamnBody has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
dhil has joined #ocaml
Reshi has quit [Ping timeout: 240 seconds]
copy` has quit [Quit: Connection closed for inactivity]
BitPuffin|osx has joined #ocaml
mort___ has joined #ocaml
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
malc_ has joined #ocaml
mettekou has quit [Quit: Textual IRC Client: www.textualapp.com]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
<Leonidas> destrius: oh, it has do. nice.
rand__ has joined #ocaml
mort___ has quit [Quit: Leaving.]
_andre has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
kushal has quit [Ping timeout: 246 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ggole has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
dsheets has quit [Remote host closed the connection]
<flux> can the ctypes foreign stuff be used to describe a C structure partially?
<flux> I was thinking of using the stub generator system, I suppose in that case I might get away with only partial list of fields?
<mrvn> flux: c structs are basically row types. just get the start right.
<mrvn> allocating them will blow up in your face, only use pointers.
dsheets has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
malc_ has quit [Remote host closed the connection]
Emmanuel`_ has joined #ocaml
seangrove has joined #ocaml
Algebr` has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
Reshi has joined #ocaml
<flux> so if I want to get the last field of AVCodecContext, I need to put 219 fields in my ocaml code?
Emmanuel`_ has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
Emmanuel`_ has joined #ocaml
<mrvn> or enough padding or access it with an offset or make a C stub that returns it.
<ollehar> is there a type-system out there that combines effects (koka) and type-states (no example?)?
<flux> I was hoping to just say the struct and the field and ctypes would deal with the rest of it,s afely :)
<mrvn> ollehar: so that a function can have the effect of latering a type?
<mrvn> flux: structure members are just offsets. No way to figure them out through dlopen()
<flux> mrvn, but I'm talking about the new stuff that generates C code
<flux> well, I don't know if it's new, it's new to me :)
<mrvn> flux: oh, then "make a C stub that returns it"
<flux> yes. can ctypes generate said c-stub for me?
<flux> I guess I will need to experiment :)
<mrvn> flux: I looked at it briefly. As far as I understood you have a special pass that generates C code from your input, then you copile that and link it to the ml code.
<flux> yep
<mrvn> Should be able to output C code that does return AVCodecContext.foo;
<mrvn> flux: do you have a smallish example that works with oasis?
<flux> mrvn, no, I have nothing :)
<flux> except hand-written bindings
<flux> but perhaps I could augment those with this ctypes-based stuff
<flux> perhaps even replace
<mrvn> I was hoping to use it to bind c++ classes.
jimt has quit [Remote host closed the connection]
<mrvn> couldn't get oasis to cooperate
<ollehar> mrvn: ehm, no, just that it has effect types, and also type-states for other types.
<ollehar> doesn't have to be type-states for effects.
<flux> c++ support for ctypes would be interesting (in particular of course objects and templates)
<mrvn> flux: Would require generating code for at least templates but ctypes now has that.
<mrvn> ollehar: is type-states enough to say that Unix.close is destructive to the FD?
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<ollehar> mrvn: yes, that's the classic example. also, that the program won't compile without closing the fd.
<mrvn> flux: would be really cool if I could use ctypes to generate the stus for QT5 widgets all from the ml code.
<mrvn> ollehar: I want that. :)
Haudegen has joined #ocaml
<ollehar> mrvn: we all do...
<ollehar> you can do something like it with phantom types.
<flux> mrvn, and it might not be that different from what a colleague now needs to do (for a Windows library: explicitly instantiate templates in the library implementation
<flux> mrvn, well the Qt5 case is certainly different, but in general the template usage that is :-)
<mrvn> ollehar: no you can't.
<mrvn> flux: Qt5 doesn't need tamplates itself but the bindings need tempates so they can inherit overrides to virtual functions of the Qt objects.
<ollehar> mrvn: well, if you wrap it in a monad.
<flux> you know what would be great, once we get modular implicits
<flux> a report of what types were used
<mrvn> ollehar: let fd_monad = Unix.open .... close fd_monad ... write fd_monad ...
<flux> so you could generate corresponding C++ bindings
<mrvn> ollehar: can't give a type error
<flux> in principle it should be simple to implement as well
<flux> well, the type retrieval part
<ollehar> mrvn: yes, monad + phantom types. wait, there's a stackoverflow question about that...
<mrvn> modular implicits?
<flux> mrvn, you're saying you haven't heard of modular implicits?!
<mrvn> ollehar: the close function can't change the type of the monad so the following write can't give a type error. No matter what you use.
PigDude has joined #ocaml
<flux> ollehar, that's pretty interesting
<flux> except the types for open_st and close_st should be abstract, right?
<PigDude> anybody know of a simple open source HTML grammar for yacc/menhir? just something that handled parsing tags, attributes, and textContent
<mrvn> ollehar: and nothing stops you from capturing the monad and using it again after you close it.
<PigDude> I didn't want to reinvent the wheel (I'll be fleshing such a parser out to handle some weird exotic JS stuff that we need to parse)
<mrvn> ollehar: it only prevents using the result of the close again. Not the input.
<Enjolras> PigDude: lambdasoup is not a grammar but a full lib to do that
<flux> hmm, so how do you capture the monad?
<PigDude> ah yea i'd be using py lxml or something if I wanted to go that route .. hm
<PigDude> I found one CFG but it is way too detailed (specifies a propert document structure, etc. whereas I'm parsing HTML fragments, not documents)
<PigDude> *proper
yminsky has quit [Ping timeout: 264 seconds]
<mrvn> flux: not tried but how about: let m = File.open_ "/tmp/foo" in run (m >> close); run (m >> read)
<PigDude> (the grammar I found is LL and not LR, http://www.antlr3.org/grammar/HTML/html.g )
yminsky has joined #ocaml
<flux> mrvn, well yes, but I think the interface would be more akin to: run_With_file_in "/tmp/foo" ( .. )
<thizanne> LL is included in LR, PigDude
<PigDude> ah ok, thanks, i'm still new to this :)
<mrvn> flux: that certainly works. But you wouldn't need monads for that
<flux> mrvn, really? how do you hide the file handle without monads?
<mrvn> flux: e.g. a stream
<mrvn> object with on_read
aantron has joined #ocaml
<flux> objectd that. you can assign to a reference?
<mrvn> flux: the object would get called with the data read, not the fd. The object comes from the user.
dsheets has quit [Remote host closed the connection]
<flux> I'm not sure if that's not just a monad with clumsier syntax ;)
Emmanuel`_ has quit [Quit: Konversation terminated!]
<mrvn> or simple: val with_file : string -> (string -> unit) -> unit
Emmanuel`_ has joined #ocaml
<flux> but you get only one operation on it
<mrvn> flux: or multiple.
<flux> so let's say we add seeking to that interface
<mrvn> then you have a problem
dsheets has joined #ocaml
ollehar has left #ocaml [#ocaml]
<mrvn> flux: problem I see with the monad approach is that you can't open the file, read a bit and then suspend operations for later. Without the close added you can't run.
<mrvn> I think suspending needs a way to capture the monad for later use and then the whole thing breaks down.
<mrvn> anyway, moands are a whole different programming style. Not a solution I want to use.
<mrvn> flux: if you get something working with Ctypes stubs let me know.
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
<Algebr`> one day a champion will rise and clean ocaml.org of ocamlnet and all these hacks
<flux> ok :)
<mrvn> flux: modular implicits sound great
<flux> clean of ocamlnet? ocamlnet is a great piece of library
<flux> I'm expecting a renaissance of ocamlnet once ocaml multicore gets in and ocaml threads once again become usable ;)
<rks`> « once again » ?
<flux> also another renaissance of people finding out that their Str-based code is broken
<flux> rks`, well, at time there were no other options ;)
<companion_cube> with_file is a good API
<companion_cube> (I'm a bit late)
<mrvn> flux: still waiting for BigArray.Unix.read
<flux> and I too have written a program based on the Threads and the only problem was the performance
<companion_cube> oh yeah
<flux> mrvn, I bet that code is already written, but not in OCaml proper..
<mrvn> flux: it's in extunix
<flux> mrvn, so the problem is..?-)
<mrvn> flux: it should be in stdlib.
leyyin has joined #ocaml
<mrvn> Note to self: add runtime lock to Qt5 bindings *shiver*
<flux> well it would be nicer, yes, but there's no must
Algebr`` has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 244 seconds]
hxegon has quit [Ping timeout: 252 seconds]
struk|desk|away is now known as struk|desk
hxegon has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
abbiya has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 276 seconds]
malc_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 276 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
axiles has joined #ocaml
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
pierpa has joined #ocaml
abbiya has joined #ocaml
jeffmo has joined #ocaml
seangrove has joined #ocaml
struk|desk is now known as struk|desk|away
Algebr``` has joined #ocaml
<seangrove> Algebr``: I might beat you re: the ec2 script ;)
Algebr`` has quit [Ping timeout: 248 seconds]
Sorella has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<seangrove> Ah, didn't meant to scare Algebr``` off....
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Algebr``` has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
shinnya has joined #ocaml
Algebr has joined #ocaml
<Algebr> seangrove: not a bad thing :)
malc_ has quit [Remote host closed the connection]
<edwin> thought I'd try to start using core_kernel, but this is not very encouraging: https://groups.google.com/forum/#!topic/ocaml-core/cDkS6Itqqko
<edwin> companion_cube: how is containers wrt to portability, I see there is no Obj.magic (except in comments and examples), would it work in js_of_ocaml or 32-bit architectures?
<companion_cube> edwin: it should work pretty much everywhere
<companion_cube> if it doesn't work on js_of_ocaml or 32bits, that's considered a bug
<edwin> k
<companion_cube> theer are no Obj.magic remaining apparently \o/
<edwin> and the 0.x version just means that the API is still changing, or are there some limitations I should be aware of?
<companion_cube> well, the API is still changing, but I try to break compatibility as little as possible
<companion_cube> I have lots of code depending on containers, so it's also in my interest :)
<companion_cube> look at the changelog and see if the amount of 'breaking' is too frightening for you
<companion_cube> (it's mostly deprecations, and changing a bit some signatures)
<companion_cube> there are some modules that are flagged "unstable/experimental" in containers.data though
<companion_cube> I also ask people their opinion before breaking something non trivial
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
FreeBird_ has joined #ocaml
<edwin> well I'll probably just start using some simple things, I got tired of writing List.rev_map |> List.rev all the time :)
FreeBird_ has quit [Remote host closed the connection]
<Algebr> edwin: wow
FreeBirdLjj has quit [Ping timeout: 246 seconds]
<pierpa> Really one must use Obj.magic to implement *a stack*? "not encouraging" is the understatement of the millennium
Emmanuel`_ has quit [Client Quit]
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
<edwin> companion_cube: also bit confused about qtest vs qcheck, the former has quickcheck with shrinking support, the latter doesn't. which one should I use?
<companion_cube> wow, the core bug...
<companion_cube> edwin: if you like in-comment tests, then qtest
<companion_cube> someone else asked the same question a few days ago
<companion_cube> and, well, I have the plan of merging qtest and qcheck :3
<edwin> I tried to be nice, bugs happen, although from the package descriptions I'd expect the unsafe Stack to be in core_extended which has 'not as closely vetted or as stable' stuff
<companion_cube> (i.e. making qcheck the backend for qtest, so it's usable without qtest itself)
<edwin> rather than in core_kernel which I expected is the portable, stable, well-tested code
<companion_cube> yeah, there are bugs in containers too (although I don't think I use Obj)
<companion_cube> also, in CCList, a non-tailrec function should be considered a bug
<edwin> not really a fan of tests in comments, doesn't play nice with syntax highlighting, although I probably wouldn't mind a ppx
<pierpa> edwin: yes, bugs happen, and for this reason there's no need to go searching new creative ways to intruduce new, more exciting kinds of them
<companion_cube> yeah, a ppx would be nice, but I need compat with < 4.02
<companion_cube> so, for the time being, comments are better
<companion_cube> edwin: so, now, `merge qtest quickcheck` is much higher on my todolist
<edwin> not sure if emacs could be convinced to highlight the test comments the same way it does for ocaml
<companion_cube> I'll try to do it in the next few days
<rks`> companion_cube: why do you need compat with < 4.02 ?
<companion_cube> rks`: because not everyone uses 4.02
<companion_cube> not every distribution, not every OS
<edwin> could 4.01 just ignore the tests?
<companion_cube> in a few years I'll ask for 4.02
<companion_cube> edwin: code using ppx does not *parse* in 4.01
<companion_cube> that's the issue
<edwin> hmm yeah and if you put them into a separate file then its no point to have 'inline' tests
<companion_cube> exactly
<companion_cube> I used to have separate tests
<companion_cube> but it's much easier to keep tests next to the function
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
PigDude has quit [Quit: PigDude]
shinnya has quit [Ping timeout: 240 seconds]
thegameg has quit [Quit: Bye bye.]
thegameg has joined #ocaml
Reshi has quit [Quit: WeeChat 1.4]
th5 has joined #ocaml
slash^ has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
abbiya has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 260 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
ontologiae has quit [Client Quit]
Emmanuel`_ has joined #ocaml
ontologiae has joined #ocaml
pierpa has quit [Ping timeout: 248 seconds]
fraggle_ has joined #ocaml
dhil has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ggole has quit []
Algebr has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<larhat> opam install publish=0.3.1 offers downgrade of dozens of packages, is there a way to dodge this?
<edwin> use a separate opam switch with --alias
<seangrove> edwin: That core bug seems like a perfect application for concolic testing
<companion_cube> or for `grep Obj.magic` ? ;-)
<edwin> Iarhat: looks like the downgrade is due to cohttp requiring older version of sexplib: http://paste.debian.net/416006/
larhat has quit [Quit: Leaving.]
fraggle_ has quit [Ping timeout: 246 seconds]
warp has quit [Quit: I'll.. be back... https://i.imgur.com/KYU8vSO.gif]
fraggle_ has joined #ocaml
malc_ has joined #ocaml
ygrek has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has joined #ocaml
tane has quit [Quit: Verlassend]
TheLemonMan has joined #ocaml
j0sh has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
th5 has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
th5 has joined #ocaml
th5 has quit [Client Quit]
AlexRussia has joined #ocaml
mettekou has joined #ocaml
larhat has joined #ocaml
GeorgeHahn has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
dhil has quit [Quit: Leaving]
Emmanuel`_ has joined #ocaml
Kakadu has joined #ocaml
butts_butts has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
dsheets has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
dsheets has joined #ocaml
Emmanuel`_ has joined #ocaml
<flux> mrvn, indeed Cstubs_structs is able to generate code such as printf(" let f = {ftype; fname; foffset = %zu} in \n", offsetof(struct AVCodecContext, codec));
dsheets has quit [Ping timeout: 240 seconds]
<flux> nice that the expected work flow is writing ocaml (basically inferring it from the C header file, could be generated..) that generates C that generates OCaml.
<flux> when I advertise this to non-ocamlers I think I'll just say "yes, ctypes provides access to named fields in C structs, no need to write C" and don't go to the specifics.. :)
Haudegen has joined #ocaml
igoroliveira has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
lokien has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
lokien has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
theo has quit [Ping timeout: 248 seconds]
hxegon is now known as hxegon_AFK
darkf has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
mettekou has quit [Ping timeout: 240 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
dsheets has joined #ocaml
sveri has joined #ocaml
<sveri> Hi, what is the "standard" build tool nowadays?
<companion_cube> I'd say ocamlbuild
<adrien> oasis
<adrien> which sits on top of ocamlbuild
<companion_cube> for many projects, ocamlbuild is sufficient
hxegon_AFK has quit [Quit: BRB]
<sveri> Ok, the more recent manual says that ocamlbuilds support for parallelization is disappointing, which sounds not to promising, tbh, especially for a statically compiled language. Is that still true?
<companion_cube> depends, do you intend to build >100,000 loc?
<companion_cube> it's not perfect but if that's the biggest issue you have with a build system, then you're lucky
<sveri> Nope, just want to try the basics
<companion_cube> especially since OCaml compiles very fast
<sveri> So I will try oasis now, thank you both :-)
Emmanuel`_ has quit [Quit: Konversation terminated!]
slash^ has quit [Read error: Connection reset by peer]
Emmanuel`_ has joined #ocaml
deko-pyon has quit [Quit: cleanup]
deko-pyon has joined #ocaml
therac25 has joined #ocaml
pierpa has joined #ocaml
govg has joined #ocaml
dsheets has quit [Remote host closed the connection]
Anarchos has joined #ocaml
hxegon has joined #ocaml
therac25 has quit [Read error: Connection reset by peer]
Anarchos has quit [Excess Flood]
Anarchos has joined #ocaml
therac25 has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
manizzle has quit [Remote host closed the connection]
mettekou has joined #ocaml
<companion_cube> Leonidas, edwin: I'm in the process of merging qtest and qcheck
<Leonidas> companion_cube: what will be the result?
<companion_cube> the plan is that qcheck moves into qtest; qtest exports a library (called qcheck) and a tool that generates tests based on qcheck
<Leonidas> companion_cube: I really like how quickly you got to the bottom of your todo list, thanks :-)
<companion_cube> so if you want the lib, you get it; if you want comment-based tests they also use the lib
<companion_cube> well it's been popped all the way up, by popular demand ;)
<Leonidas> companion_cube: very nice, much in favor of this solution.
<edwin> thanks, that sounds just what I need
<edwin> companion_cube: what will be the license of qcheck-inside-qtest? GPL-3 makes people look at me with worried eyes ...
<companion_cube> oh, I need to check with vhugot; it *should* be LGPL
<companion_cube> the current quickcheck.ml looks like it's already LGPL
<companion_cube> but I want to make this clear, indeed
hxegon has quit [Ping timeout: 260 seconds]
<companion_cube> LGPL should be fine since you just link the library (and, besides, in tests)
_andre has quit [Quit: leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
<edwin> yeah anything that doesn't change the license after linking is fine by me
<companion_cube> ok
<edwin> with qtest its a bit more problematic since the tests are inline with the regular code
<edwin> but then its just comments :)
<companion_cube> well it's your tests
<companion_cube> not a derivative work of qtest
sepp2k has quit [Quit: Leaving.]
Emmanuel`_ has joined #ocaml
<edwin> yeah, I'll worry about it when I actually use it. Most of the code that I write is, or will become open source eventually
<edwin> so in general its not a problem at all
<companion_cube> even then, it's important to have a clear licensng
<edwin> definetely
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<edwin> have you found the shrinking to be useful in practice? I used qcheck only for a few small things and the testcases it generated were sometimes quite large and hard to follow
<companion_cube> yes, it's very useful
<companion_cube> qcheck has a workaround where you can define the "size" of a test case
<companion_cube> and it will take the smallest coutner-example if size is defined
<companion_cube> but shrinking is way better
<edwin> cool
<Leonidas> I haven't found shrinking to be that useful, but that's just me.
<companion_cube> I suppose it depends on what you test
<companion_cube> I read some cool stuff about quickcheck in Erlang (where they apparently have very good tools), and shrinking was super important
<companion_cube> they w ould generate lists of events and see if properties would hold after processing the events
<companion_cube> anyway Leonidas, you won't have to worry about shrinking if you don't care, it's optional
<companion_cube> although it's provided for most builtin combinators
<edwin> there's also smartcheck that is supposed to be better at producing counterexamples, have you looked at it?
<edwin> (at least haskell's is built on top of quickcheck)
<companion_cube> it seems to require quite a lot of magic
<companion_cube> even lazy smallcheck uses haskell's laziness thoroughly
<companion_cube> so, for the time being, I'll stick with a pretty naive quickcheck..
<companion_cube> it's not perfect but it's hard to do fancy stuff without typeclasses anyway
<edwin> k, speaking of smallcheck I haven't found enumerating small values to produce any interesting failures that qcheck wouldn't catch, although perhaps it would be useful if I could enumerate some edge cases (max_int, min_int, denormal/NaN floats, )
<edwin> could I fit this into my tests when using qcheck?
Haudegen has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
<companion_cube> qtest has a generator with special cases
<edwin> among and ||| ?
<edwin> oh
<companion_cube> soon! :D
<edwin> maybe you could expose graft_corners
<companion_cube> yeah, but it's a detail that can be solved later
<edwin> sure, maybe I'll send you a PR to do that :)
<companion_cube> seems like oasis doesn't allow to specify several licenses
<mfp> companion_cube: if you're doing LGPL, make sure you don't get the static linking exception clause wrong ;-)
<companion_cube> I couldn't find the proper header for LGPL :s
<companion_cube> it's annoying
<mfp> it was an off-by-one error in the reference to the conditions for release of the modified version
<companion_cube> ?
<mfp> IIRC the typoed static linking clause referenced the one following the correct one (like 3 when it was 2 or such)
<mfp> the static linking exn was like: "if you've made a modified version and published according to the conditions set in X in the LGPL, you can link against it and release the whole under the license of your choice"
mettekou has quit [Read error: Connection reset by peer]
<mfp> somewhere (the stdlib? don't remember) got X wrong (referring to section N+1 of the LGPL when it should be N)
<companion_cube> gah, why don'tthey provide a header
<mfp> everybody copy-pasted the exception with the typo, making the license... legally dubious
<companion_cube> do you have a good header?
<mfp> let me look for it, I know I have used LGPL at some point (with the correct ref :)...
<edwin> is the one in the compiler correct? https://github.com/ocaml/ocaml/blob/trunk/LICENSE
<edwin> obviously without the QPL bits
<companion_cube> this is far too long, I'm just looking for a header to put in source files to say "this part is LGPL"
<mfp> companion_cube: got it exn > http://paste.debian.net/416112/ (it was like I remembered, correct section 2, wrong and used everywhere section 3)
<mfp> edwin: IIRC it used to be wrong and they changed it recently
mettekou has joined #ocaml
<companion_cube> hmmmm
<companion_cube> what I need is not the full text of the LGPL (it's on gnu.org) but some reasonable-sized header
<companion_cube> they provide one for GPL, but not for LGPL
<mfp> hmm will s/GPL/LGPL/ do? :-P
<flux> can't you just say copyright blahblah, for licensing refer to license.txt?
<edwin> which LGPL version?
<edwin> cause I think that matters too for the off by one
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<mfp> companion_cube: found this in my code http://paste.debian.net/416113/
<companion_cube> ah, thanks mfp
<companion_cube> I'll just change 2.1 by 3
<companion_cube> that should do it
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<companion_cube> gosh, merging two libs is some work :(
slicefd has quit [Quit: WeeChat 1.4]
yunxing has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
pdewacht_ has joined #ocaml
antkong_ has joined #ocaml
pdewacht has quit [Ping timeout: 260 seconds]
malc_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
pierpa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
wolfcore has quit [Ping timeout: 276 seconds]
govg has quit [Ping timeout: 248 seconds]
govg has joined #ocaml
wolfcore 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]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
govg has quit [Ping timeout: 244 seconds]
yunxing has joined #ocaml
govg has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
silver has quit [Quit: rakede]
govg has quit [Ping timeout: 264 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
Kakadu has quit [Remote host closed the connection]
rand__ has quit [Quit: leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Simn has quit [Quit: Leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ollehar has joined #ocaml
yunxing has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
struk|desk|away is now known as struk|desk
malc_ has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has joined #ocaml
yunxing has quit [Read error: Connection reset by peer]
Vintila has joined #ocaml
mettekou has quit [Ping timeout: 260 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml