adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 265 seconds]
brunoro has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
brunoro has quit [Ping timeout: 265 seconds]
nicholasf has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
sh0t has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 263 seconds]
fraggle_ has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
brunoro has joined #ocaml
mfp has quit [Ping timeout: 248 seconds]
brunoro has quit [Ping timeout: 252 seconds]
ygrek_ has quit [Ping timeout: 272 seconds]
mr_foobar has quit [Quit: Leaving]
silver has quit [Quit: rakede]
govg has joined #ocaml
ygrek has joined #ocaml
nicholasf has quit [Remote host closed the connection]
dxtr has quit [Ping timeout: 265 seconds]
lolisa has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
govg has quit [Ping timeout: 265 seconds]
groovy2shoes has quit [Quit: Leaving]
ygrek_ has joined #ocaml
brunoro has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
nicholasf has joined #ocaml
nomicflux has joined #ocaml
ygrek_ has quit [Ping timeout: 248 seconds]
pierpa` has quit [Ping timeout: 264 seconds]
nomicflux has quit [Quit: nomicflux]
brunoro has joined #ocaml
fluter has quit [Ping timeout: 252 seconds]
hhx has quit [Quit: WeeChat 1.5]
chattere` has joined #ocaml
chattered has quit [Ping timeout: 265 seconds]
brunoro has quit [Ping timeout: 248 seconds]
chattere` is now known as chattered
ygrek_ has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml
tmtwd has joined #ocaml
brunoro has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
Phagus has joined #ocaml
Mercuria1Alchemi has joined #ocaml
Algebr` has quit [Remote host closed the connection]
Phagus has quit [Quit: leaving]
kakadu has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml
noethics has quit [Ping timeout: 252 seconds]
brunoro has quit [Ping timeout: 248 seconds]
fluter has joined #ocaml
slash^ has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
kakadu has quit [Remote host closed the connection]
randomA has joined #ocaml
<randomA> Hi, I have a question about functors
<randomA> Suppose I am writing a functor called TestA, that takes as an argument a functor called MakeA. So module TestA(M:MakeA) = struct ... How would I be able to access the actual A? would I do module A = M(string) ?
<randomA> Is anyone here?
<reynir> What is MakeA?
<randomA> so essentially, A is tu[e tjat o,[;e,emts d
<randomA> MakeA is a functor
<randomA> that makes A from a Comparable boject
<randomA> as in the normalsih Comparable
<randomA> reynir: did i answer really soo stfff
<randomA> djoy dptti
groovy2shoes has joined #ocaml
<reynir> uh
<randomA> reynir: im sorry, dam i not being clear?
<randomA> actually. So I want to create a test mdouel for Map.
<randomA> ok?
<randomA> module TestMap (M: Map.Make) = struct
<reynir> Sorry no, you made some typos
<randomA> module TMap = Map.Make(T : Comparable)
<randomA> I get an error here saying T don't exist
<reynir> You can do that provided there's a module T of course
<randomA> reynir: write, so T is suppose to represent the Key values
<randomA> but suppose i don't want to specify the key value type
<randomA> so how owuld I create my T module?
<reynir> I guess you could add another parameter: module TestMap (M: Map.Make) (T: Comparable) = struct ...
<randomA> suppose I cannot add another parameter?
<randomA> because this is already in the interface
<randomA> and i cant change the interface
brunoro has joined #ocaml
<randomA> So I tried to do module T:Comparable = struct type t = 't let compare = ... and then I don't know what to do about that
<randomA> rgiht because how would I define compare without knowing what types
<reynir> I can't see it's possible if you can't create a Comparable instance (because key type) and you can't add T as a parameter
<randomA> i just can't add T as a parameter
<randomA> but the point is that I just need to create a TestMap functor that can test Maps of any type
<randomA> When I call TestMap on a MakeTest, it will generate tests for the MakeTest's Map's type
freusque has joined #ocaml
orbifx has joined #ocaml
brunoro has quit [Ping timeout: 248 seconds]
<randomA> reynir: would it perhaps work if I were to define T to be a functor?
ocabot has joined #ocaml
<randomA> oh perhaps it is with <Blank>.t
<randomA> write, so type is sometype.t
<randomA> like a string Map is like Map.string
<randomA> im sorry, im so dumb
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
orbifx has quit [Ping timeout: 272 seconds]
nicholasf has quit []
<randomA> is there anyone on?
<randomA> someone please help me
<companion_cube> module TestMap(T : Map.Comparable) = struct … end ?
<companion_cube> what is the issue again?
<randomA> it's module TestMap (M : Map.Make) = struct ... end
<randomA> but now how do I run tests on the the Map's keys without knowing what kind of keys it is
<randomA> I would have to make some sort of assumption about the keys of Map.Make
<randomA> so like then module MyMap = M(String)
<companion_cube> for testing you'll have to instantiate with a concrete type
<companion_cube> yes
<companion_cube> but you know that the map will not be able to use informations about the concrete type, so it's fine
<randomA> companion_cube: right, but while I'm writing the TestMap module, I still would have to assume that Map is of key type string
<companion_cube> (testing with strings, or integers, is enough)
<randomA> companion_cube: but if I assume strings, I cannot test with integers
<companion_cube> TestMap should take a functor as parameter, but instantiate it
<companion_cube> module TestMap(M : functor(X:OrderedType) -> Map.S with type key = X.t) = struct … end
<randomA> right, so inside DictTester, if I want to test "Map.find"
<companion_cube> something like this should work: you take a polymorphic map ( a functor)
<companion_cube> but then in … you can instantiate the functor with String
tmtwd has quit [Ping timeout: 252 seconds]
<randomA> companion_cube: but then my TestMap functor will only be able to test for Maps with string keys?
<randomA> or no
<randomA> so module TestMap(M : functor (C: Comparable) -> Map with type Key.t = C.t) = struct ... end
<randomA> except that I've replaced the M : functor... bit with the Map.Make
<randomA> since that is essentially what Map.make is
<randomA> but inside the module, how do I access my t values
<companion_cube> it would test with string, sure
<companion_cube> I mean, you cannot test on abstract values, can you?
<randomA> companion_cube: but wouldn't I want it to be able to test with any keys?
<randomA> no
<companion_cube> becaues it does not make any sense
<randomA> so it is not possible for me to right TestMap so that it can take in Maps of any keys?
<randomA> *write
<companion_cube> you can
<companion_cube> but at some point you need to specify concrete types for the keys
wolfcore has quit [Ping timeout: 264 seconds]
<companion_cube> and to be able to generate some values for those keys
<companion_cube> otherwise you cannot test if you don;t have any input values
<randomA> ok, so what would I write for my "representative keys". after declaring module TestMap (M: Map.Make) = struct module MyMap = M(MyKeys) end
<randomA> but what do I put for "MyKeys" ?
<randomA> if I do not want to specify yet what type is MyKeys
<reynir> incr companion_cube
<companion_cube> I don't know what you want to do
<companion_cube> you seem to want to do something impossible
<companion_cube> testing needs concrete values at some point
<randomA> ok, so this is definitely impossible
AlexDenisov has joined #ocaml
<randomA> because I've been searching all night trying to find a way
<randomA> and i think it is impossible
<randomA> but you know how in the List module, they do not specify a type, they just use like 't
<randomA> I thought I oculd be able to write this module without specifying a type
<companion_cube> you can write modules that abstract on types
<companion_cube> but at some point, for testing, you need concrete types
<companion_cube> is all
<randomA> ok, i understand
<randomA> Thank you for clearing that up
<randomA> companion_cube: do you think it is better if I test with ints or stirngs if I'm wriing a TestMap module
<randomA> because i want to essentially generate ounit tests with this module
<randomA> or does it not really matter
<companion_cube> it doesn't matter much
<randomA> why not?
<companion_cube> because in both cases you can write lots of interesting tests
<companion_cube> and print the values on which tests fail easily
<randomA> ok. I've always found int easier, so I will do that
wolfcore has joined #ocaml
<randomA> Suppose I use Ints for this test, but my Map implemetation will be used with string keys. Will my testing not be considered good because I use int keys?
<flux> randoma, the difference between Map and List is that List doesn't need to care about the content. consider how List has sort that takes the comparison function as an argument, whereas Map is always sorted. (so the comparison function for that type comse from somewhere)
<randomA> flux: yeah, I understand now
<randomA> I wish I found out earlier though, I've spent all night from 9 pm to 3:30 AM
<flux> now someone might mention that how about the polymorphic = -operator, yes, there is a polymorphic map in ie. batteries that can make use of it, I think..
<randomA> not even all night, like all day, from 5 PM to 3:30 AM
<randomA> no, it's ok, i don't want batteries
<flux> but using the = -operator can be error-prone and it can even produce runtime errors (ie. when comparing functions)
<randomA> so if I create my TestMap using int keys, but my Map implementation will be mostly using String keys, is that bad?
<flux> I think the key here is that Map doesn't actually care about the content. it cares about the interface on the content.
<randomA> or is it valid for me to claim that the functions of my implementation that pass the tests with int keys will also pass the tests with string keys
<flux> so most of the time Map is going to use T.compare to compare those values
<randomA> Yeah, that is what i'm thinking
<flux> if you change T from Int to String, you are testing T, not Map
<randomA> so I figure I int is easier for me to work with than strings
<flux> yes, I think that's a good way to go
<randomA> ok, so just to make sure. testing my Map with int keys is fine even if my Map will be used with string keys
<randomA> because Map only cares about compare
<flux> yes
<randomA> cool. So would a good way to test be to test using the actual Map module?
<randomA> like test against that?
<flux> sure.. ?
<randomA> is there a better way to test? In the past, I just spam assert_equal
<randomA> and it feels really not elegant
<randomA> not really not elegant, but just idk liek not thorough
<randomA> this is a hashtable test
<randomA> i was gonna try to do soemthing like this
<randomA> you see how they call the Test module on their Tests
<randomA> this is better actually
<randomA> this one is the test for map
tmtwd has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
AlexRussia_ has quit [Ping timeout: 244 seconds]
edwin has joined #ocaml
zpe has joined #ocaml
<jstolarek> Drup: thanks for your pull request! I'll be looking at it now
<jstolarek> and asking questions :-)
AlexRussia_ has joined #ocaml
govg has joined #ocaml
Algebr has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
minn has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
minn has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
jwatzman|work has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
dhil has joined #ocaml
MK__ has joined #ocaml
<MK__> Is there any OCaml VPN library?
<Algebr> opam search vpn => No packages found.
<MK__> I mean any kind of library that may support protocols such as PPTP, L2TP, etc (preferably as server)
Simn has joined #ocaml
<Algebr> again I would start with opam, opam search PPTP L2TP => No packages found
<Algebr> although it might be that someone has something but hasn't released it on opam
<hannes> MK__: not as far as I know, but let me know if you're up to developing such a thing...
<hannes> there are crypto libraries, and we developed a TLS library... openvpn should be straightforward to implement
<hannes> (famous last words)
<MK__> Thanks Hannes, that looks interesting. I am interested to look at it
nojb has joined #ocaml
<hannes> MK__: https://nqsb.io (and https://usenix15.nqsb.io) might be relevant then..
<Algebr> hannes: in principle, all the building blocks are there for openvpn?
<hannes> Algebr: it is a simple matter of programming (reading the spec, thinking about flow control and reassembly, think a bit harder about potential resource problems)
<hannes> MK__: I also started, but this is by no means finished, an IKE daemon https://github.com/isakmp/ike
<Algebr> hannes: what potential resource problems? Why?
<hannes> Algebr: well, you don't want another computer to be able to exhaust your memory or computing time
<Algebr> ah, like a denial of service like attack
<hannes> Algebr: I've no deep knowledge about openvpn, but if I'd implement it, I'd think hard about it (when to throw away half-opened/half-finished connections)
<flux> openvpn has a way to detect invalid sessions rapidly with a shared key (that's not used for securing the session)
<randomA> Hi
<flux> but I suppose that happens even earlier. probably not too difficult to just tell the kernel some limit?
govg has joined #ocaml
<randomA> If I have my shitty Map call MyMap and the actual Map, how do I compare the two for structural equality?
<randomA> Like make sure that the same key value pairs exist in both Maps?
<MK__> openvpn is mostly based on SSL/TLS and is not compatible with IKE
<MK__> Hannes, Your SSL/TLS library should be usable to implement it
alfredo has joined #ocaml
alfredo has quit [Client Quit]
<hannes> MK__: I do know. But I -- in contrast to other people -- think that IPSec solves the VPN problem at the right layer
<randomA> is this in ocmal?
alfredo has joined #ocaml
<hannes> randomA: MyMap.compare (fun a b -> a.foo = b.foo && ...) mapa mapb
<randomA> so hannes i didnt create a compare function in MyMap
<randomA> i created stuff like membr, find
<randomA> *member, find
<hannes> randomA: oh, then I do not understand. is MyMap an instance of Map? or a completely separate implementation?
<randomA> it's seperate implementation
<randomA> but i want to check it against the good Map
<randomA> so I need a fucntion to check all the key value pairs in between operations
<randomA> I have a to_list function in MyMap, and then I can use Map.bindings, then iterate through?
<hannes> randomA: then you need to fold over the good Map, ensuring that for each key, value pair a corresponding key,value pair exists in your MyMap
<randomA> hannes: so how would i do this?
<randomA> just Map.iter
<hannes> Map.fold (fun k v r -> if MyMap.member k mymap && compare_value (MyMap.find k mymap) v then r else None) map (Some ()) (or similar.. indicating that if the fold results in Some (), the maps are equal)
<randomA> cool beans, thank you
slash^ has quit [Read error: Connection reset by peer]
ggole has joined #ocaml
slash^ has joined #ocaml
<randomA> hannes: what is the meaning of r?
<hannes> randomA: the result (or accumulator) you're folding through... using Map.iter you'll need some way to communicate the result to the outside (exception, mutable reference)... see http://caml.inria.fr/pub/docs/manual-ocaml/libref/Map.S.html#VALfold
nojb has quit [Read error: Connection reset by peer]
Enjolras has quit [Ping timeout: 250 seconds]
<randomA> perhaps, i should do assert_equal like from ounit tests
ygrek_ has quit [Ping timeout: 248 seconds]
Enjolras has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
wxfdglm has joined #ocaml
<theblatte> do you really need to write a myocamlbuild.ml to link a native ocaml target with a C stub using ocamlbuild?
FreeBirdLjj has quit [Remote host closed the connection]
<jstolarek> gasche: thanks for looking into my issue :-) Drup was faster though ;-)
<randomA> can someone tell me if my function is correct?
<randomA> ive created a Map and an implementation of Map
<randomA> and i compare the values
<randomA> eh fuck it whatever
<companion_cube> ??
<randomA> it's lot of effort to type
<randomA> ok i type anyway
<companion_cube> waaaait
<companion_cube> if you want to show us code, use a paste website
<randomA> lmao
<randomA> ok yeah im doing that hehe
<companion_cube> don't type dozens of lines on IRC
<randomA> this one
<randomA> last function
<jstolarek> Say I have a library that I compiled to bytecode
<companion_cube> looks ok to me
<randomA> cool :D
<companion_cube> (except for the weird indentation)
<companion_cube> but, why not just run it? :3
<jstolarek> what happens if I build a native executable that depends on that library?
<randomA> idk
<randomA> how to run it
<randomA> because ounit doesnt work
<randomA> in utop
<jstolarek> does the native executable call into bytecode libraru?
<Enjolras> theblatte: if you have something else building the stubs you can pass a lflag
<companion_cube> ocamlfind opt -package ounit -linkpkg foo.ml -o foo && ./foo
<companion_cube> something like that?
<jstolarek> or is the library recompiled to native code?
<theblatte> Enjolras: I couldn't find which lflag to pass
<companion_cube> I mean, you should learn how to compile OCaml code if you don't already
<Enjolras> theblatte: you need to build a .a and then add the dir to search path for librarys and then just link with the .a name
<theblatte> ok thanks
<randomA> there's an excpetion somehow
<randomA> test_main.byte: No such file or directory
<randomA> yet it exists
<companion_cube> it's probably a broken symlink
<randomA> yes it is
<companion_cube> you're using ocamlbuild apparently
<randomA> how did you know?
<companion_cube> classic issue ;)
<randomA> how odd. How do you fix it?
<companion_cube> build the project again :p
<companion_cube> well, ocamlbuild test_main.byte should build it
<companion_cube> (maybe with some additional flags)
<companion_cube> (like: ocamlbuild -use-ocamlfind -package ounit test_main.byte)
<companion_cube> (I think)
<randomA> companion_cube: it doesnt work
<companion_cube> what's the error message?
<randomA> test_main.byte doesn't exist
<randomA> Sys_error
<randomA> test_main.byte: No such file or directory
<randomA> i see the sym link there
<randomA> when I cat test_main.byte, it also says no such file directory
<randomA> should rm the sym link?
<randomA> :D
<randomA> works
slash^ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
MK__ has quit [Quit: Leaving...]
slash^ has joined #ocaml
brunoro has joined #ocaml
silver has joined #ocaml
govg has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
<ggole> ocamlcommon.cma defines both Parse and Parser ಠ_ಠ
FreeBirdLjj has joined #ocaml
<flux> :)
<jstolarek> How do I define executable name in oasis?
alfredo has quit [Read error: Connection reset by peer]
<Drup> jstolarek: do you really need prof ? It's not very useful nowadays ...
<Drup> And I'm pretty sure it has been improved to the point -inline 0 doesn't give you anything anymore
malina has joined #ocaml
<jstolarek> Drup: honestly speaking, I have no idea
<jstolarek> I am just rtying to maintain what's in the original Makefile
<jstolarek> but it might be the case that you are right
<jstolarek> I am only starting with OCaml
<jstolarek> so my knowledge of its tools is almost none
<jstolarek> (as you might have noticed)
<Drup> It's ok, nobody really understand ocamlbuild anyway
<jstolarek> haha
<jstolarek> Oasis seems like such a nice tool and yet it makes simple things very difficult :-/
<Drup> most of things are really easy, until you try to do that specific thing that you wanted
<Drup> anyway, gtg, TAing :>
<Drup> try to rebase everyones branches for them, it'll make things easier
<Drup> say hi to james and sam from me :p
<jstolarek> Sure :-)
larhat has joined #ocaml
<jstolarek> about rebasing: I'd do that hapilly but I feel there might be some resistance
nojb has joined #ocaml
<Algebr> :( opam's make cold isn't getting correct MD5 hashes for dependencies
copy` has joined #ocaml
_andre has joined #ocaml
brunoro has joined #ocaml
rpip has joined #ocaml
larhat has quit [Ping timeout: 264 seconds]
fraggle_ has quit [Remote host closed the connection]
malina has quit [Remote host closed the connection]
<reynir> make cold?
govg has quit [Ping timeout: 252 seconds]
brunoro has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
larhat has joined #ocaml
<Algebr> like when you don't have opam installed, I have a fresh install of debian and wanted make cold rather than install debian's version of ocaml/oopam
<Algebr> opam
<companion_cube> doesn't it ship with its dependencies anyway?
<companion_cube> (maybe I remember wrong)
govg has joined #ocaml
<Algebr> have to do make lib-ext for that
<Algebr> but make cold is supposed to take care of everything
<companion_cube> hmm, I must have typed `make lib-ext`
FreeBirdLjj has quit [Remote host closed the connection]
SimonJF has quit [Remote host closed the connection]
larhat has quit [Read error: Connection reset by peer]
randomA has quit [Quit: leaving]
larhat has joined #ocaml
ser_iously has joined #ocaml
brunoro has joined #ocaml
<orbitz> Hello, is there any concise reading on the technique Jane St's polmorphic map/set use to add the comaprator as a type?
wxfdglm has quit [Ping timeout: 252 seconds]
<ser_iously> hi, looking for info on the Containers lib. I'd like to know what's the difference between pp and print in various modules. Their type is a bit misleading as pp is of type 'a printer and print : 'a formatter. I get that one relies on Buffer.t and the other on Format.formatter but my question is rather about what is the expected use.
<companion_cube> ser_iously: basically, the Buffer.t based interface is from a time when Format was slow
<companion_cube> so it would often be faster to using Printf
<companion_cube> (and bprintf is more general than sprintf and fprintf, as it allows to output to both strings and channels with reasonable perfs)
<ser_iously> So waht would you advise nowadays? To only rely on print?
<companion_cube> those days, though, I'd advise to use Format only
<companion_cube> yes
brunoro has quit [Ping timeout: 244 seconds]
<companion_cube> I'm even leaning towards using CCFormat (or Bunzli's Fmt) only, not the per-module printers, but that's really a detail
<ser_iously> ok thanks. Is it meant to perform pretty-printing of basi printing? Said otherwise, what would you advise for someone needing to prettyprint huge for;ulas?
<companion_cube> Format is good for printing huge formulas
<companion_cube> (well, it's only a problem when the nesting is so wide, that indentation exceeds 80 columns; everything gets pressed on the right border)
<companion_cube> (but I know nothing better in this case)
<ser_iously> Until recently I relied on PPrint because of its nice combinators but I fear it's a bit slow
<companion_cube> I use Format for printing large formulas and terms every day
<ser_iously> ok so I guess I'll lean towards CCFormat, to avoid depending on another package (like Fmt)
<ser_iously> Another question if you please: is there a blog post or something detailing the rationale for Containers. E.g. it seems you included in every module various interfaces for printing, monad or applicative, etc. Knowing this would allow to learn about the library quite fast I guess
<companion_cube> not really, it's all in the readme, and there is no global guideline except my own taste
<companion_cube> I use printing, applicative and monads quite regularly, hence they are present in some modules :)
<orbitz> I wish tehre was a better library structure than that. Jane St does this too and it's really painful IMO
<companion_cube> how do you mean?
<ser_iously> include Print with type t = int ?
<ser_iously> something like that ?
<companion_cube> this works
<companion_cube> it's just that in containers most modules have no deps besides the stdlib
<ser_iously> if I look into CCInt.mli there is no such thing as what I wrote
<ser_iously> not sure to undersatnd your answer
<companion_cube> there is no include because it would add a dependency to the interface module
<ser_iously> well a dependency w.r.t another signature provided by Containers... I don't see the harm
<companion_cube> originally it was also designed so you could copy a module and avoid depending on containers itself :)
<ser_iously> :)
<companion_cube> and nowadays, well, it's just enforced by usual conventions
govg has quit [Ping timeout: 272 seconds]
<companion_cube> (print, equal, compare, hash mostly)
<orbitz> companion_cube: I haven't looked at containers. but in Jane St they include all the things you can do with, String, for instance in the String module. So Map, Set, HashMap, blah blah. Which makes it feel really awkward if you want to do something new with a String, because all of a sudden all your callsites become inverted.
<ser_iously> Right. You also have plenty of modules implementing map, filter_map, etc.
<orbitz> Haven't looked at conatiners for this particular aspect*
<companion_cube> orbitz: but it's an issue with OCaml, in this case
<companion_cube> I mean, it boils down to the expression problem
<orbitz> companion_cube: Sort of. It depends on if you need access to internals or not. In the cases I referenced with Jane St, all of those can liv ein another module
<companion_cube> OO would also be problematic because you'd have to use a subclass
<companion_cube> ah, right
<companion_cube> in containers they live in another module, namely, CCString :p
tane has joined #ocaml
<orbitz> companion_cube: does CCString have references to the Map and Set collections for String?
<ser_iously> As you are here, I have yet another question regarding IteML. Aloctest seems to be trendy but I like
rgrinberg has joined #ocaml
<ser_iously> sorry... is it possible to use a colorful print in Iteml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
<companion_cube> orbitz: no, I usually just CCMap.Make(String)
<companion_cube> well, nothing in theory prevents it, but we did not write a colorful runner
<companion_cube> I'm not working much on qtest those days, sadly :s
<orbitz> companion_cube: nice. that is my preference :
<orbitz> :)
<companion_cube> (I think the proper way to go, anyway, would be to always use a OUnit runner; and write a colorful OUnit runner)
<companion_cube> there is no reason OUnit can't be as pretty as alcotest, I think
<companion_cube> (and it actually allows to swap runners)
govg has joined #ocaml
<ser_iously> thanks a lot
govg has quit [Quit: leaving]
larhat has quit [Ping timeout: 265 seconds]
<companion_cube> I have had a "todo" for months about having qtest output junit reports through OUnit
<companion_cube> :(
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
Mercuria1Alchemi has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
larhat has joined #ocaml
nomicflux has joined #ocaml
mr_foobar has joined #ocaml
ser_iously has quit [Quit: Page closed]
pierpa has joined #ocaml
zpe has quit [Remote host closed the connection]
sh0t has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
fraggle-boate has joined #ocaml
average has quit [Ping timeout: 244 seconds]
otobor has joined #ocaml
average has joined #ocaml
<otobor> hi I'm looking for a project using Qtest/Iteml and setting it up through an _oasis file (Batteries has an _oasis file and uses qtest but the _oasis setup is essentially a facade for a good'ol Makefile). Any example?
sabina has joined #ocaml
<companion_cube> I have a mix of makefile and _oasis, but if you're interested: https://github.com/c-cube/ocaml-containers/blob/master/_oasis#L172
sabina has quit [Client Quit]
<companion_cube> (the nice thing with oasis is that it handles code generation properly, so yo ucan have a makefile that is partially generated)
<otobor> thanks (right I get your point)
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
Algebr has quit [Ping timeout: 264 seconds]
al-damiri has joined #ocaml
mr_foobar has left #ocaml ["Leaving"]
freusque has quit [Quit: WeeChat 1.4]
<theblatte> so I managed to link my .o file with my native code (ocamlbuild -lflags foo.o foo.o bar.native), but the same incantation doesn't work for bytecode: `ocamlbuild -lflags foo.o foo.o bar.byte` complains that it cannot find the symbol I define in foo.o
<theblatte> whereas `ocamlbuild -lflags foo.o foo.o bar.native` compiles foo.c into foo.o and links it against bar without issue
kolko_ has quit [Quit: ZNC - http://znc.in]
kolko has joined #ocaml
<theblatte> in the bytecode command, ocamlbuild doesn't even run gcc to produce foo.o, whereas it does in native mode
diphuser has joined #ocaml
diphuser has quit [Read error: Connection reset by peer]
diphuser has joined #ocaml
nomicflux has quit [Quit: nomicflux]
FreeBirdLjj has joined #ocaml
brunoro has joined #ocaml
mrshark has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
Algebr has joined #ocaml
<theblatte> ah, the bytecode wants -lflags -custom,foo.o
SpiceGuid has joined #ocaml
<Drup> jstolarek: I forgot to answer about the warnings
nomicflux has joined #ocaml
<Drup> just add that to your _tags
<Drup> don't bother with Native/ByteOpts
jao has joined #ocaml
<Drup> (-g is already added by oasis by default, you don't need the unix flag anymore and -dtype is called "annot" nowadays)
FreeBirdLjj has joined #ocaml
Algebr has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 272 seconds]
yomimono has joined #ocaml
ygrek_ has joined #ocaml
brunoro has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
brunoro has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
MK__ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
Heasummn has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.40/20160120202951]]
rgrinberg has quit [Ping timeout: 265 seconds]
diphuser has quit [Ping timeout: 265 seconds]
ZephyrIRC has joined #ocaml
<jstolarek> Drup: thanks thanks thanks thanks thanks thanks thanks :-)
<jstolarek> you're making my life so much easier
<jstolarek> I still have to figure out what is this bin_annot thing and what is merlin
larhat has quit [Quit: Leaving.]
<Drup> merlin is awesome
<Drup> it's the official definition
ygrek_ has quit [Ping timeout: 244 seconds]
<jstolarek> what it does?
mrshark has quit [Ping timeout: 248 seconds]
<theblatte> it does awesomeness
<jstolarek> Hm.. when I was installing OCamli I think I've set up merlin
<jstolarek> at least I am getting code completion from time to time
<jstolarek> if I can only figure out how to get types of expressions and jump to definitions :-/
<Drup> you need bin_annot :p
<Drup> (and to read the merlin tutorial too)
<jstolarek> if there's a better tutorial please point me to it
ZephyrIRC has quit [Ping timeout: 264 seconds]
<Drup> nope, that's good
<jstolarek> Hm... I get different results then the ones shown in tutorial
<jstolarek> when I get autocompletion I don't have type signatures
<jstolarek> In fact, I think I get nonsense completions...
<jstolarek> that's what I get
<jstolarek> not awesome enough :-/
MK__ has quit [Remote host closed the connection]
<reynir> haha what
<reynir> Yea, that seems wrong
ygrek_ has joined #ocaml
eh_eff_ has joined #ocaml
brunoro has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
<jstolarek> I am generally used to the fact that things in Emacs don't work out of the box
<jmasseo_> i used prelude to avoid painful setup processes in emacs
brunoro has quit [Ping timeout: 252 seconds]
<jmasseo_> it mostly works?
<rightfold> An OS where things don't work out of the box? Sounds like a nightmare
* rightfold uses emacs on Gentoo :3
APNG has quit [Read error: Connection reset by peer]
Soni has joined #ocaml
rgrinberg has joined #ocaml
smondet has quit [Ping timeout: 244 seconds]
Soni is now known as APNG
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
<vapid> In the delayed choice quantum eraser, an interference pattern will form on D0 even if which-path data pertinent to photons that form it are only erased later in time than the signal photons hit that primary detector.
Algebr has joined #ocaml
mrshark has joined #ocaml
smondet has joined #ocaml
mrshark has quit [Read error: Connection reset by peer]
mrshark has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
averell has quit [Ping timeout: 248 seconds]
brunoro has joined #ocaml
averell has joined #ocaml
brunoro has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
orbifx has joined #ocaml
dmbaturin has quit [Ping timeout: 250 seconds]
dmbaturin has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 252 seconds]
<orbifx> Quoi de neuf?
AlexRussia_ has quit [Ping timeout: 272 seconds]
octachron has joined #ocaml
sh0t has left #ocaml ["Leaving"]
sh0t has joined #ocaml
brunoro has joined #ocaml
<orbifx> rgrinberg: is there a specific command for routing multiple paths to the same function?
AlexRussia_ has joined #ocaml
<rgrinberg> orbifx: no. But it should be easily done with List.fold
<orbifx> in opium's code or in user's code?
brunoro has quit [Ping timeout: 265 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
<rgrinberg> user code
fraggle_ has joined #ocaml
<orbifx> rgrinberg: ok. And is there a url_decoding function in opium? for params that are passed encoded?
<rgrinberg> orbifx: Uri has you covered I think
<orbifx> thanks rgrinberg, helps to get hints and tips to move a bit faster on this project
<rgrinberg> NP
dhil has quit [Ping timeout: 244 seconds]
slash^ has quit [Read error: Connection reset by peer]
TheLemonMan has joined #ocaml
kakadu has joined #ocaml
Denommus has joined #ocaml
brunoro has joined #ocaml
octachron has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
mrshark has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 248 seconds]
fraggle_ has quit [Ping timeout: 252 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 265 seconds]
fraggle_ has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
mookid has joined #ocaml
mrshark has joined #ocaml
ggole has quit [Ping timeout: 252 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Algebr has quit [Ping timeout: 244 seconds]
eh_eff_ has joined #ocaml
<orbifx> rgrinberg: I was mistaken; I actually need an ambersand decoder, which can return me a utf string
<orbifx> Any ideas?
<rgrinberg> ampersand decoder?
<orbifx> yeah
eh_eff_ has quit [Ping timeout: 265 seconds]
<orbifx> When I'm posting in different languages
nomicflux has quit [Quit: nomicflux]
<orbifx> the texts is encoded like so: &#917;&#955;&#955;&#951;&#957;&#953;&#954;&#945;
<rgrinberg> and where does it come from in the http request i'm curious?
tane has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
<orbifx> a submitted form
<orbifx> with post method
<companion_cube> o/ rgrinberg, been using opium a bit, btw, it's still nice :)
<Drup> is that a weird way of doing base64 ?
<orbifx> Drup: no I think this is the standard way of encoding unicode but over ascii I guess?!
<rgrinberg> orbifx: if it's utf8 then use bunzli's codec
<Drup> it looks ridiculously space inneficient
<rgrinberg> companion_cube: \o/
eh_eff_ has joined #ocaml
sh0t has joined #ocaml
kakadu has quit [Remote host closed the connection]
mookid has quit [Quit: Page closed]
<orbifx> I think the man's name is buenzli btw :P
<orbifx> rgrinberg: but it's not utf encoded, it's ascii with ambersand encoding
<orbifx> Going to try to find out at which point this happens
<rgrinberg> i'm googling for what is an ambersand (ampersand?) encoding and unfortunately i can't finding anything
<rgrinberg> s/finding/find/
brunoro has joined #ocaml
<orbifx> check the link I sent you
<maurer> rgrinberg: He presumably means HTML entity encoding
<orbifx> It might be called HTML encoding
eh_eff_ has quit [Ping timeout: 264 seconds]
<orbifx> maurer: that could be the name
<orbifx> and rgrinberg: I check the post header and it is already encoded there in the html encoding (&#<num>;)
Heasummn has quit [Quit: Leaving]
brunoro has quit [Ping timeout: 252 seconds]
<orbifx> I'm going to see if adding a meta charset fixes that
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<aantron> orbifx: maurer: rgrinberg: in case you need html entity decoding, markup.ml has some API for this. though it may be overkill because it also handles named references, and the API that is currently exposed is not particularly efficient http://aantron.github.io/markup.ml/#VALxhtml_entity
<aantron> if this is what you need though and cant find some other solution, ping me and i can make a proper API (the linked function is only meant to be passed as an argument to another function in markup.ml)
<orbifx> aantron: thanks
<aantron> (by named references i mean the several hundred entity references such as &amp;, etc)
<orbifx> Do you know if the <form> element can be made to submit un-encoded utf-8?
<aantron> actually wait
<orbifx> I think this is what is needed
<aantron> iirc this API only handles named entity references. so i guess the function that handles everything (including numbers) is not exposed at all, though it exists in the library. again, ping if needed
eh_eff_ has joined #ocaml
<orbifx> I think accepted charset solved the issue
nomicflux has joined #ocaml
<orbifx> rgrinberg: probably last question of the day :) -- does opium do anything with the HTTP headers related to the language?
<rgrinberg> orbifx: i don't think so. opium is agnostic to that
<orbifx> Accept-Encoding
<orbifx> gzip, deflate
<orbifx> Accept-Language
<orbifx> en,en-US;q=0.5
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
Heasummn has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
mrshark has quit [Ping timeout: 264 seconds]
mrshark has joined #ocaml
zv has quit [Quit: WeeChat 1.5]
yomimono has quit [Ping timeout: 272 seconds]
smondet has quit [Ping timeout: 248 seconds]
yomimono has joined #ocaml
<orbifx> thanks for all rgrinberg
<orbifx> laters all
kamog` has joined #ocaml
kamog has quit [Ping timeout: 264 seconds]
yomimono has quit [Ping timeout: 264 seconds]
orbifx has quit [Ping timeout: 264 seconds]
nomicflux has quit [Quit: nomicflux]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
smondet has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml