adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 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
dsheets has quit [Client Quit]
dsheets has joined #ocaml
tmtwd has joined #ocaml
magical-imouto has quit [Quit: fix config]
pyon has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
mcclurmc has joined #ocaml
tmtwd has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
tmtwd has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
manizzle has quit [Ping timeout: 248 seconds]
tmtwd has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
robink has left #ocaml ["http://quassel-irc.org - Chat comfortably. Anywhere."]
shinnya has quit [Ping timeout: 265 seconds]
Mass321 has joined #ocaml
tmtwd has joined #ocaml
BitPuffin|osx has joined #ocaml
mcclurmc has joined #ocaml
tmtwd has quit [Remote host closed the connection]
MrScout has joined #ocaml
samrat has joined #ocaml
MrScout has quit [Ping timeout: 248 seconds]
manud has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
tmtwd has joined #ocaml
accidus_benartiu has quit [Ping timeout: 246 seconds]
accidus has quit [Ping timeout: 240 seconds]
hay207 has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Remote host closed the connection]
accidus has joined #ocaml
accidus_benartiu has joined #ocaml
mcclurmc has joined #ocaml
wagle has quit [Read error: Connection reset by peer]
hay207 has joined #ocaml
contempt has quit [Ping timeout: 256 seconds]
wagle has joined #ocaml
darkf has joined #ocaml
contempt has joined #ocaml
MercurialAlchemi has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
samrat has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
tmtwd has quit [Remote host closed the connection]
swgillespie has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
manud has quit [Quit: manud]
manud has joined #ocaml
manud has quit [Client Quit]
ggole has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
hsuh has quit [Ping timeout: 256 seconds]
hsuh has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
kushal has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
sailorswift has joined #ocaml
psy_ has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
siddharthv_away is now known as siddharthv
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
hay207 has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
Bhavya has joined #ocaml
crocket has joined #ocaml
<crocket> hello
<crocket> Is it possible for a simple DDNS client daemon written in ocaml to run under 10MB?
keen__________18 has quit [Read error: Connection reset by peer]
manizzle has joined #ocaml
keen__________18 has joined #ocaml
sp0on has joined #ocaml
sp0on has quit [Client Quit]
sp0on has joined #ocaml
sp0on has quit [Client Quit]
sp0on has joined #ocaml
yomimono has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
<dmbaturin> crocket: Sure. I'm not sure if there's a need for _simple_ DDNS clients though. :)
<dmbaturin> There's sure need for a comprehensive but cleanly written one. ddclient is a mess.
<dmbaturin> Either way, a "complex" one would hardly be 10MB large either, unless you link a lot of huge libraries.
<crocket> dmbaturin, ddclient was written in perl.
<crocket> perl encourages mess.
<dmbaturin> crocket: Well, it's a mess even by perl standards.
ollehar has joined #ocaml
<crocket> I don't try to write the next version of ddclient.
samrat has joined #ocaml
ollehar has quit [Quit: ollehar]
<dmbaturin> crocket: Why don't you?
<dmbaturin> I'd join it if you did. ;)
ollehar has joined #ocaml
<crocket> dmbaturin, That is not my need.
<crocket> I solve problems minimally.
yomimono has quit [Ping timeout: 250 seconds]
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
crocket has left #ocaml ["Leaving"]
samrat is now known as smingh
<smingh> is there any way I can get utop in emacs to indent lines properly?
accidus has quit [Remote host closed the connection]
accidus_benartiu has quit [Remote host closed the connection]
mort___ has joined #ocaml
mort___ has quit [Client Quit]
manud has joined #ocaml
iorivur has joined #ocaml
iorivur has quit [Ping timeout: 256 seconds]
mort___ has joined #ocaml
smingh has quit [Quit: Computer has gone to sleep.]
smingh has joined #ocaml
lewis1711 has joined #ocaml
yomimono has joined #ocaml
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KDr2 has quit [Ping timeout: 256 seconds]
sailorswift has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
KDr2 has joined #ocaml
Haudegen has joined #ocaml
nullcat has joined #ocaml
jonludlam has joined #ocaml
_andre has joined #ocaml
manud has quit [Quit: manud]
manud has joined #ocaml
<lewis1711> is there a good dynamic array module floating around on opam?
<ggole> There's one in batteries, and one in containers
<ggole> Dunno about standalone
manud has quit [Quit: manud]
rand000 has joined #ocaml
vanila has joined #ocaml
<flux> so I have this code that reads data with Cohttp from a SSL socket
<flux> it uses Lwt_stream.fold_s on the stream to handle the received data
<flux> then I use an external tool to kill the transwer in the meanwhile, and I get an Ssl.Read_error exception
<flux> what would be the best way to just have this stream getting cut instead of the mysterious exception popping up? I of course colled some (very marginally) useful information during the fold, so I would rather just have it finish early than an exception killing the result altogether.
<flux> I guess I could make a new stream out of the old one that intercepts the exception and swallows it, cutting the stream short..
<apache2> lwt_try ?
<flux> but if I put it outside the Lwt_stream.fold_s, the folded value within the it will be lost on the exception
<flux> of course I could just put it to a variable, but that's ugly ;)
siddharthv is now known as siddharthv_away
<apache2> :( I still don't understand lwt, so can't help you, but good luck!
jonludlam has quit [Ping timeout: 240 seconds]
<flux> this brought me a bit further: let filter_stream_exceptions stream = Lwt_stream.from @@ fun () -> Lwt.catch (fun () -> Lwt_stream.get stream) (function | exn -> return None)
<flux> maybe it should get an argument for handling the exceptions :)
Haudegen has quit [Ping timeout: 248 seconds]
<def`> smondet: hmm, I tried arecent version of merlin, jsoo is ok
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rks`> celestien miradet
ggole has quit [Ping timeout: 252 seconds]
nullcat__ has joined #ocaml
Haudegen has joined #ocaml
smingh has quit [Quit: [Textual IRC Client: http://www.textualapp.com/]]
nullcat has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
nullcat__ has quit [Ping timeout: 246 seconds]
nullcat_ has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
nullcat has joined #ocaml
vanila has quit [Quit: Leaving]
nullcat has quit [Client Quit]
nullcat_ has quit [Ping timeout: 240 seconds]
nullcat has joined #ocaml
nullcat has quit [Client Quit]
pyon is now known as kawaii-imouto
nullcat__ has joined #ocaml
nullca___ has joined #ocaml
nullcat__ has quit [Ping timeout: 240 seconds]
nullca___ has quit [Ping timeout: 248 seconds]
lewis1711 has quit [Ping timeout: 255 seconds]
jonludlam has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
Haudegen has joined #ocaml
NingaLeaf has joined #ocaml
<rwmjones> is it a bug in ocaml that it accepts the semicolon in this program:
<rwmjones> type t = A|B|C
<rwmjones> let f = function | A -> "A" | B -> "B"; | C -> "C"
<Drup> It is certainly weird
badkins has joined #ocaml
<Drup> ; is accepted as a terminator (instead of a separator) in somme contexts
<rwmjones> yeah
tmtwd has joined #ocaml
<rwmjones> I was just writing an OCaml parser (using an earley parser), and it rejected a program where I'd accidentally included such a semi-colon
<rwmjones> my earley parser is derived from the OCaml manual (although not all of it yet)
<ggole> I don't think it's a bug any more than accepting begin x; y; end is
Bhavya has quit [Quit: Quit the channel]
<ggole> It would be inconsistent if pattern clauses didn't allow an ending ; and everything else did.
jtfmumm has joined #ocaml
BitPuffin|osx has joined #ocaml
<flux> it doesn't seem to be documented here: http://caml.inria.fr/pub/docs/manual-ocaml/expr.html#expr ?
<rwmjones> I can't see it
<rwmjones> 'course I'm using that documentation to implement the parser, so any undocumented stuff that goes on in the real parser won't work for me
cthuluh has quit [Ping timeout: 264 seconds]
<Drup> rwmjones: that's a very good ocasion to improve the doc
<Drup> but tbh, the only valid documentation is going to be the .mly, I'm affraid
<flux> documentation should be generated from it.. :-)
samrat has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
iorivur has joined #ocaml
rand000 has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
ollehar1 has joined #ocaml
yomimono has quit [Ping timeout: 246 seconds]
yomimono has joined #ocaml
samrat has quit [Ping timeout: 246 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
<NingaLeaf> Is recursion dangerous? I was having an office debate about this given that my work is in OCaml and my colleagues are working in Java.
<NingaLeaf> I've always used recursive functions and never thought twice about it. I've never had a side-effect or bug when using recursion.
<NingaLeaf> Is there a situation where recursion could impact my work? (I've been using OCaml for just under a year)
<flux> ningaleaf, well, if you are processing big data structures and your function isn't tail-recursive
<flux> ningaleaf, particular example: List.reverse a big list
<Drup> flux: that's no more dangerous than using a stack
samrat has joined #ocaml
<flux> well, typical linux systems only come with 8 megabytes of it permitted by default
<flux> it is possible to crash the program with recursion; it's not possible to crash it with a for loop :P
<flux> well I suppose it is if your program is CPU-time limited :)
<flux> drup, so it's not more dangerous, it can be exactly as dangerous
<NingaLeaf> Oh I had no idea you could crash the program with recursion!
<Drup> NingaLeaf: well, it's simply a stack overflow
<flux> these days you do get a nice exception
<flux> unless you happen to exceed the stack within a C function
<Drup> flux: not always
<flux> I find it particularly stupid that the standard library functions are implemented in a way that manipulating big lists in a simple fashion isn't always possible :/
<flux> maybe a 8-megabyte list isn't the best thing to have. but maybe you usually have just 10k lists, and that one time your data is bigger, and your program fails :(
<flux> of course, all alternative/augmented standard libraries fix this
samrat has quit [Ping timeout: 256 seconds]
<Drup> does the JVM garantees tail call nowadays ?
<flux> I very much doubt that
<flux> but maybe it has tail calls for some situations?
<Drup> this would explain the opinion of Java people on recursion
<theblatte> usually it's better to start by reimplementing tail-recursive versions of List.* functions that are not tail-recursive :/
<Drup> theblatte: map is not obvious to implement in a tailrec manner
<flux> the problem is that a tail-rec List.map/List.reverse would either be unsafer or possibly slower
<theblatte> ;)
<Drup> theblatte: that's much slower, though
<theblatte> than crashing?
<flux> much slower for typical datasets ;)
<ggole> List.map can be made fast and tail-rec
<Drup> theblatte: hum, why don't you just create a new List module, instead of using all those list_ functions O_O
<ggole> Just needs some implementation trickery
<flux> ggole, you mean unsafety?
<Drup> theblatte: that's, like, typical ML anti-pattern
<ggole> In fact, somebody was working on a TRMC patch that should help
<theblatte> Drup: it doesn't have the same interface
<Drup> and ?
<flux> well, they could be in some Lst module
<theblatte> also, wouldn't ocaml complain about List being defined twice?
<flux> just to give the reader an idea that they are different
<Drup> theblatte: no
MercurialAlchemi has joined #ocaml
slash^ has joined #ocaml
samrat has joined #ocaml
<Drup> theblatte: I mean, you redefine List ..
<flux> it wouldn't, because that's exactly what you're doing now
<ggole> Oh, that was def`
<theblatte> ah, I meant if we were to put it in a list.ml, but we don't have to
<Drup> yeah
<Drup> I mean, you redefine List by the empty module and put a lot of list_* functions, that's just silly ^^'
<flux> let safe_map f xs = try List.map f xs with Stack_overflow -> List.rev_map f (List.reverse xs)
elfring has joined #ocaml
<flux> what do I win?!
<Drup> flux: the exception handler is not free, by far
<flux> thought the case of not entering is pretty fast?
<Drup> trmc is a better solution anyway
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flux> such a cheat. instead of using dirty hacks in the standard library ocaml just adds new language features.. ;-)
<ggole> Properly done trmc is faster than Obj.magic hacks anyway
<ggole> You can elide the write barrier.
Submarine has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
<flux> it's nice, but it's sort of an invisible optimization, isn't it? if you rewrite such a function so that recursion happens via its argument, the optimization breaks?
<flux> at least merlin is able to tell which places are tail calls and which not
<Drup> flux: [@tailcall] ? :)
<ggole> It's not really much more complicated than tail calls
rand000 has joined #ocaml
<Drup> constructors are syntactic in OCaml,
<flux> here's the slides I found, btw, for others who like me had never heard of TRMC :) http://gallium.inria.fr/seminaires/transparents/20141027.Frederic.Bour.pdf
<ggole> It's a well-known optimisation in prolog circles
<ggole> Been around for decades
tane has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
Hannibal_Smith has joined #ocaml
samrat has joined #ocaml
<jrslepak> Some trouble with ocamlbuild... I have a .c file I'm using to define some extern functions for use by some generated LLVM code (like in http://llvm.org/docs/tutorial/OCamlLangImpl4.html). If I write a function that depends on libgc, I can compile it directly with gcc, but I can't get ocamlbuild to do the same when building the REPL. I included `A"-cclib"; A"-lgc"' in the `flag' list, but I still get a linking error (the same as I get if I invoke gcc w
samrat has quit [Ping timeout: 252 seconds]
samrat has joined #ocaml
dsheets has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
contempt has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
contempt has joined #ocaml
nullcat__ has joined #ocaml
samrat has quit [Ping timeout: 252 seconds]
spaceships has left #ocaml [#ocaml]
samrat has joined #ocaml
ygrek has joined #ocaml
jtfmumm has joined #ocaml
systmkor has quit [Quit: Leaving]
systmkor has joined #ocaml
darkf has quit [Quit: Leaving]
samrat has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
jwatzman|work has joined #ocaml
creichert has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
nullcat has joined #ocaml
nullcat__ has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
Denommus has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
nullcat has joined #ocaml
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 256 seconds]
sailorswift has joined #ocaml
jtfmumm has joined #ocaml
wraithm has joined #ocaml
MrScout has joined #ocaml
samrat has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
cthuluh_ has joined #ocaml
Haudegen has joined #ocaml
samrat has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
wraithm has joined #ocaml
nullcat_ has joined #ocaml
cthuluh_ is now known as cthuluh
samrat has quit [Ping timeout: 252 seconds]
nullcat has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 252 seconds]
samrat has joined #ocaml
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paddymahoney has joined #ocaml
sailorswift has joined #ocaml
hsuh has quit [Quit: leaving]
ggole has quit []
xificurC_ has joined #ocaml
ygrek has joined #ocaml
nullca___ has joined #ocaml
xificurC has quit [Ping timeout: 246 seconds]
nullcat_ has quit [Ping timeout: 278 seconds]
nha_ has joined #ocaml
MrScout has quit [Remote host closed the connection]
<Maelan> Hi, I am working on a syntax tree. In the first place (input) it is untyped, then I run a typechecking on it. I would like to keep data, such as types inferred, attached to each node of the tree.
MrScout has joined #ocaml
<Maelan> Currently I define twice the datastructure, once with no information attached and once with the type of each sub-expression.
<Maelan> Something like:
<Maelan> type expr = Var of string | Op_call of operator * expr list | And of expr list | …
<Maelan> module Typed = struct type expr_ = Var of string | Op_call of operator * expr list | And of expr list | … and expr = typ = expr_ end
<Maelan> (I have a type ‘typ’ defined somewhere.)
<Maelan> oops, it is: … and expr = typ * expr
<Maelan> But maintaining concurrently these two types is tedious and ugly.
<Maelan> So I would like a means of doing something like:
<Maelan> type expr_ = Var of string | Op_call of operator * expr list | And of expr list | …
wagle_ has joined #ocaml
<Maelan> where I could then define the type ‘expr’ by either ‘type expr = typ * expr_’ or ‘type expr = expr_’
companion_square has joined #ocaml
Asmadeus_ has joined #ocaml
fds_ has joined #ocaml
rand000_ has joined #ocaml
maurer_ has joined #ocaml
_2can_ has joined #ocaml
wraithm_ has joined #ocaml
igitoor_ has joined #ocaml
orbitz_ has joined #ocaml
lyxia_ has joined #ocaml
<Maelan> So the solution would be to replace ‘expr’ in the definition of type ‘expr_’ by a type parameter, but then it seems impossible to define properly type ‘expr’…
MrScout has quit [Remote host closed the connection]
mort___ has joined #ocaml
<Maelan> in terms of type ‘expr_’, since the latter expects a parameter
<thizanne> you could put your ast uin a functor
<nha_> how usable is the scheme syntax for camlp5?
<thizanne> something like module Make (Info : sig type 'a t end) = struct type expr = Var of string | Add of expr Info.t * expr Info.t end
dwoos_ has joined #ocaml
jefus_ has joined #ocaml
manizzle has joined #ocaml
bitbckt_ has joined #ocaml
<thizanne> and then, module Untyped = Make (struct type 'a t = 'a)
MrScout has joined #ocaml
felipealmeida_ has joined #ocaml
<thizanne> module Typed = Make (struct type 'a t * typ * 'a end)
lpaste_ has joined #ocaml
mcclurmc has joined #ocaml
wraithm has quit [*.net *.split]
tane has quit [*.net *.split]
rand000 has quit [*.net *.split]
jonludlam has quit [*.net *.split]
yomimono has quit [*.net *.split]
ollehar has quit [*.net *.split]
wagle has quit [*.net *.split]
ggherdov has quit [*.net *.split]
l1x has quit [*.net *.split]
companion_cube has quit [*.net *.split]
fds has quit [*.net *.split]
dwoos has quit [*.net *.split]
orbitz has quit [*.net *.split]
igitoor has quit [*.net *.split]
cdidd_ has quit [*.net *.split]
nicoo has quit [*.net *.split]
lupine has quit [*.net *.split]
Sorella has quit [*.net *.split]
seako has quit [*.net *.split]
cojy has quit [*.net *.split]
_2can has quit [*.net *.split]
boegel has quit [*.net *.split]
lpaste has quit [*.net *.split]
Jefus has quit [*.net *.split]
zozozo has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
lyxia has quit [*.net *.split]
maurer has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
srax has quit [*.net *.split]
mariusae has quit [*.net *.split]
felipealmeida has quit [*.net *.split]
bitbckt has quit [*.net *.split]
dwoos_ is now known as dwoos
felipealmeida_ is now known as felipealmeida
<Maelan> Oh, right thizanne, I did not event thought of a functor.
igitoor_ has quit [Changing host]
igitoor_ has joined #ocaml
igitoor_ is now known as igitoor
lupine has joined #ocaml
jefus_ is now known as jefus
boegel has joined #ocaml
jtfmumm has joined #ocaml
<tizoc> did anything change in merlin lately that may affect ppx_deriving?
ollehar has joined #ocaml
<Maelan> The solution I thought of is by parameterizing the type of the data attached instead of parameterizing the type of nodes. That would avoid duplicating constructors, but I see no real benefit on it. This is less powerful, for untyped exprs I would be forced to attach some dumb data that I would have to ignore.
<flux> hmm, if the type it parametrized, then doesn't it really mean that you don't need dummy data? I think many wouldn't call () dummy data, but rather no data :)
manizzle has quit [Ping timeout: 244 seconds]
* jrslepak has a ()-annotated AST at some point
<flux> bonus: you get to write functions that work on both kinds of AST, if it dosen't care about the attached data
<Maelan> true
<Drup> Maelan: the parametrized approach is probably better, imho
<tizoc> ok, pinning ppx_deriving to the version on github fixed my issue, I think it was related to https://github.com/whitequark/ppx_deriving/issues/43
paddymahoney has quit [Remote host closed the connection]
wagle_ is now known as wagle
<Maelan> By the way, a typed AST seems like a case study for GADT to me, but then duplicating the AST (an untyped tree and a GADT tree) is unavoidable, isn’t it?
<Drup> yeah
<Drup> also, gadt for a typed ast is not *always* such a great idea, in particular if you want to do code transformation at some point
<Maelan> Why?
mcclurmc has quit [Remote host closed the connection]
<Drup> because then you have to prove whatever property you have in your gadt is preserved by the transformation
manizzle has joined #ocaml
<Drup> and by "prove", I mean "convince the typechecker"
mcclurmc has joined #ocaml
<Maelan> (thanks for your link jrslepak, I just finished reading it)
<MercurialAlchemi> Drup: do threats work?
iorivur has quit [Ping timeout: 240 seconds]
<Drup> MercurialAlchemi: yes, "Obj.magic" will make the typechecker accept pretty much anything :D
<Drup> but it is not without consequences :D
<MercurialAlchemi> that's more like brainwashing
<jrslepak> . o O ( by "threats," do you mean "coercion"? )
<flux> module Violence = Obj
<Drup> Violence.magic ?
<Maelan> Zero result.
<MercurialAlchemi> ViHafTeMeanzToMakeYouKompileModule
<flux> maelan, strange, though it should result in all pages without the word rectypes in it..
<Maelan> Interesting. :>
MrScout has quit [Remote host closed the connection]
<Maelan> Google must treat the ‘-’ in a special way, because without it there are results indeed.
<flux> yes, - in google means exactly what I suggested ;)
<Maelan> Oh
<Maelan> *That* is violent, isn’t it?
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has joined #ocaml
MrScout has quit [Remote host closed the connection]
<Maelan> Then apparently he refuses to do this as long as there is no other keyword given.
MrScout has joined #ocaml
wraithm_ is now known as wraithm
tane has joined #ocaml
jtfmumm has joined #ocaml
samrat has quit [Ping timeout: 248 seconds]
wraithm has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
avsm has joined #ocaml
<apache2> - means "do not show results with this word"
<apache2> as clearly documented in their documentation :)
dsheets has quit [Ping timeout: 265 seconds]
slash^ has quit [Read error: Connection reset by peer]
rand000_ has quit [Quit: Lost terminal]
samrat has quit [Ping timeout: 246 seconds]
companion_square is now known as companion_cube
Kakadu has joined #ocaml
xificurC_ has quit [Quit: WeeChat 1.2]
xificurC has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
jonludlam has joined #ocaml
Haudegen has joined #ocaml
cdidd_ has joined #ocaml
nicoo has joined #ocaml
zozozo has joined #ocaml
srax has joined #ocaml
cojy has joined #ocaml
l1x has joined #ocaml
mariusae has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
Sorella has joined #ocaml
seako has joined #ocaml
emmanueloga has joined #ocaml
_andre has quit [Quit: leaving]
ygrek has quit [Ping timeout: 255 seconds]
ggherdov has joined #ocaml
<rwmjones> new tuareg mode really sucks
<haesbaert> change is bad !
dsheets has joined #ocaml
ollehar1 has quit [Ping timeout: 264 seconds]
Asmadeus_ is now known as Asmadeus
MercurialAlchemi has quit [Ping timeout: 256 seconds]
elfring has quit [Quit: Konversation terminated!]
<rwmjones> bad change is bad
<flux> if rwmjones is referring to its indentation, I would be inclined to agree
<flux> ocp-indent works ok, though
<Drup> what changed ?
<flux> I don't any more remember. but reindenting existing code, great changes resulted in it.
<rwmjones> it just doesn't indent code sensibly or consistently at all
<rwmjones> plus, bugs bugs bugs
<Drup> beh, don't use tuareg for indentation
<flux> well, bugs are to be expected from an regexp-based ocaml indenter ;)
iorivur has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
manud has joined #ocaml
Haudegen has joined #ocaml
<flux> is there an ocaml math library as expressive (ie. succinct) as this? http://iamtrask.github.io/2015/07/12/basic-python-network/
jtfmumm has joined #ocaml
<flux> someone mentioned doing numpy-like library for ocaml.. ?
<smondet> flux: this is under active development: https://github.com/rleonid/oml
tane has quit [Quit: Verlassend]
<Drup> flux: didn't you had a bunch of stuff in the biocaml library too ?
<Drup> s/flux/smondet/
<flux> l/c
<flux> smondet, that seems interesting
<flux> seems to have lots of code as well, with documented interfaces
<flux> seems to be based on mostly standard ocaml arrays, though, so I wonder how is its performance? it does depend on lacaml, so maybe some conversions are occurring..
<companion_cube> bigarrays are compatible with lacaml, I think?
<flux> I would imagine yes
<companion_cube> if all you have is arrays of floats
paddymahoney has joined #ocaml
<flux> oml seems to use 'float array' and 'float array list' though
<companion_cube> erf
<smondet> flux: do not hesitate to add issues to `oml`
<smondet> Drup: indeed there was stuff I think in Biocaml (haven't touched it in a year)
<companion_cube> is oml supposed to be only a math library, or also having machine learning stuff?
<flux> I've been using Vg and Gg with some success, but they aren't lapack-based
<smondet> companion_cube: well the people writing it are doing machine learning so they add sutff when they need it
<flux> but as my existing code uses them, I'm pretty much bound to it.. maybe if I do something completely new I can try oml :)
<flux> a machine learning library might even be more interesting than just a general math library. I noticed it has ~recently gained logistic regression, which is useful
<flux> smondet, so should I make an issue about not being available via opam.. :)
igitoor has quit [Ping timeout: 240 seconds]
<smondet> flux: yes, please (i'm not an author)
<smondet> struktured / struk|desk knows more than me
swgillespie has joined #ocaml
<nullca___> so ummm.. how to use Obj.magic safely? I saw ocaml-asn1-combinators is using Obj.magic to build a hash table that memorize recursive grammar expressed in higher-order-abstract-syntax. https://github.com/mirleft/ocaml-asn1-combinators/blob/master/src/asn_cache.ml#L14
<nullca___> like, when I can make sure I can safely use it
<flux> it's really quite simple: don't use it! :)
<nullca___> .......
<nullca___> well, then our OCaml-TLS is not safe!
<companion_cube> sad
<nullca___> that.. i mean, looks horrible to me
<nullca___> then use this library to parse tls related protocol, i believe
<nullca___> s/then/they
igitoor has joined #ocaml
<flux> nullca___, I think this would be a better way to ask this. "Hey guys, I have this interface puzzle for you. How do I implement this signature safely? https://github.com/mirleft/ocaml-asn1-combinators/blob/master/src/asn_cache.ml - or must I resort to potentially kitten-eating unsafe code making use of Obj.magic? or just give up and switch the codebase to python? thanks!"
<nullca___> ....
<nullca___> or
<flux> or, to php
<nullca___> could someone explain his comment at line 4
<nullca___> partial fold?
<flux> higher..order.. abstract..stuff
<companion_cube> syntax
<companion_cube> HOAS = higher order abstract syntax
<companion_cube> it's when you have a grammar with binders, and represent the binders using the functions of OCaml
<companion_cube> so that scoping is enforced by OCaml
igitoor has quit [Changing host]
igitoor has joined #ocaml
<nullca___> ocaml's not being lazy really troubles me a lot these days. David Kaloper here uses such hack, together fix ``Fix`` to express recursive grammar, to deal with the problem
<companion_cube> I like it not being lazy
<nullca___> yeah
<nullca___> i mean
<flux> what's wrong with the 'lazy' mechanism?
<nullca___> on this specific example, it's really inconvenient
<companion_cube> otoh, yeah, lazy is sometimes too strict
<nullca___> you have to do such trick
<companion_cube> it's hard to tie the knot
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nullca___> "but with a little opportunistic caching it all plays out well" https://mirage.io/blog/introducing-asn1
<nullca___> what the hell......
<nullca___> what is "opportunistic caching" ......
jtfmumm has joined #ocaml
Simn has quit [Quit: Leaving]
ygrek has joined #ocaml
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
boadie has joined #ocaml
manud has quit [Quit: manud]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
thegameg has joined #ocaml
iZsh has quit [Ping timeout: 246 seconds]
iZsh has joined #ocaml
cic has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 256 seconds]
jtfmumm has joined #ocaml
<tobiasBo1> Hello !
<tobiasBo1> I'm trying to send an email with Ocaml using the gmail smtp server (with TLS)
<tobiasBo1> I manage to do so "by end" by creating a SSL connection, and then manually send all the instruction
<tobiasBo1> s/by end/by hand/
<tobiasBo1> but now I would like to use a more general solution in order to be able to easily connect to any smtp server
<tobiasBo1> That's why I wanted to use the Netsmtp library (it is in the Netclient package)
<tobiasBo1> However I can't manage to do the connection.
<tobiasBo1> I can create the client object,
<tobiasBo1> but the function authenticate doesn't do the "STARTTLS" command
<tobiasBo1> (and that's why the sendmail function fails)
<tobiasBo1> I think that I need to use the tls_config option to do the starttls function,
<tobiasBo1> however it takes a parameter I don't understand...
<tobiasBo1> : Netsys_crypto_types.tls_config
<tobiasBo1> If anyone knows how that function works I would be really happy to hear about it !
<tobiasBo1> If you want the mli file of Netsmtp : https://searchcode.com/codesearch/view/18031646/
<tobiasBo1> hum sorry
<apache2> what library should I use for unsigned uint32_t and uint64_t operations ?
<apache2> zarith?
maurer_ is now known as mauer
mauer is now known as maurer
Kakadu has quit [Remote host closed the connection]
manud has joined #ocaml
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
<tobiasBo1> The error I have is "Netsys_crypto.current_tls: No TLS provider is set"
yomimono has joined #ocaml
boadie has quit []
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tobiasBo1> Hum...
<tobiasBo1> I think I need to install conf-gnutls
Algebr has joined #ocaml
tmtwd has quit [Ping timeout: 252 seconds]
<apache2> got it, Uint
KDr2 has quit [Ping timeout: 246 seconds]
MrScout has quit [Ping timeout: 248 seconds]
MrScout has joined #ocaml
KDr2 has joined #ocaml
<tobiasBo1> If anyone knows what is the tls peer name asked, I am interested...
tmtwd has joined #ocaml
<tobiasBo1> I tried to put smtp.gmail.com, but I have an erro Fatal error: exception Nettls_gnutls.TLS.Error(NETTLS_VERIFICATION_FAILED)
<smondet> tobiasBo1: maybe it is not finding the accepted certificates on your system
<smondet> that must be configured somewhere
<tobiasBo1> smondet: And I can't boycott the certificate verification ?
avsm has quit [Quit: Leaving.]
<tobiasBo1> Yeah !
<smondet> tobiasBo1: you should be able to, but I don't know GnuTLS
<tobiasBo1> smondet: I found ! I put peer_auth to Required instead of None !
<tobiasBo1> I'm sooo happy, it works :D
destrius has quit [Ping timeout: 240 seconds]
badkins has quit []
jonludlam has quit [Ping timeout: 244 seconds]
flx has joined #ocaml
destrius has joined #ocaml
flux has quit [Remote host closed the connection]
flx is now known as flux
ygrek has joined #ocaml