Algebr`` has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
nicholasf has joined #ocaml
noddy has quit [Ping timeout: 276 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
noddy has joined #ocaml
govg has quit [Ping timeout: 258 seconds]
SilverKey has joined #ocaml
nicholas_ has joined #ocaml
darkf has joined #ocaml
noddy has quit [Quit: "it's a bit backwards around here"]
nicholasf has quit [Ping timeout: 258 seconds]
dwwoelfel has joined #ocaml
dwwoelfe_ has joined #ocaml
dwwoelfel has quit [Ping timeout: 260 seconds]
mcspud has joined #ocaml
pyon has joined #ocaml
dwwoelfe_ has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 258 seconds]
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
tmtwd has joined #ocaml
larhat has quit [Quit: Leaving.]
Nahra has quit [Read error: Connection reset by peer]
Nahra has joined #ocaml
SilverKey has quit [Quit: Cheerio!]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
tmtwd has quit [Ping timeout: 258 seconds]
Denommus has quit [Ping timeout: 265 seconds]
tmtwd has joined #ocaml
MercurialAlchemi has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
johnelse has joined #ocaml
johnelse has quit [Ping timeout: 252 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
govg has joined #ocaml
Simn has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
nore has quit [Ping timeout: 265 seconds]
nore has joined #ocaml
AltGr has joined #ocaml
dexterph has joined #ocaml
ocalm has joined #ocaml
ocalm has quit [Remote host closed the connection]
tennix has joined #ocaml
tennix has quit [Client Quit]
Algebr` has joined #ocaml
pyon has quit [Quit: Good night.]
two_wheels has quit [Ping timeout: 276 seconds]
<Algebr`>
Anyone done any bindings with bucklescript yet
<Algebr`>
to js libs
nore has quit [Ping timeout: 276 seconds]
johnelse has joined #ocaml
nore has joined #ocaml
<Leonidas>
anyone used ocaml-webmachine? I'm using liberator in clojure which is similar to the original webmachine, so ocaml-webmachine is potentially the perfect solution for me :)
<Algebr`>
Leonidas: I will be very interested in seeing a real world usage
<Leonidas>
Algebr`: I plan a project with webmachine in the backend and Elm in the frontend, but not entirely sure it will happen.
Algebr` has quit [Ping timeout: 258 seconds]
nicholas_ has quit [Remote host closed the connection]
nicholasf has joined #ocaml
kev has joined #ocaml
bronsen has quit [Quit: WeeChat 1.6-dev]
wolfcore has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
wolfcore has joined #ocaml
johnelse has quit [Ping timeout: 264 seconds]
nicholasf has joined #ocaml
hay207__ has joined #ocaml
hay207_ has quit [Ping timeout: 258 seconds]
johnelse has joined #ocaml
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
caw has quit [Ping timeout: 260 seconds]
caw has joined #ocaml
Algebr` has joined #ocaml
Leonidas has quit [Ping timeout: 250 seconds]
lpaste has quit [Ping timeout: 264 seconds]
ousado has quit [Ping timeout: 264 seconds]
zozozo has quit [Ping timeout: 258 seconds]
Algebr` has quit [Ping timeout: 244 seconds]
Jaxan has quit [Ping timeout: 264 seconds]
ousado has joined #ocaml
zozozo has joined #ocaml
lpaste has joined #ocaml
Jaxan has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas_ has quit [Client Quit]
Leonidas_ has joined #ocaml
Leonidas_ is now known as Leonidas
Algebr` has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas_ has quit [Client Quit]
Algebr` has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
manizzler has quit [Read error: Connection timed out]
regnat has quit [Quit: WeeChat 1.5]
johnelse has quit [Ping timeout: 250 seconds]
regnat has joined #ocaml
manizzler has joined #ocaml
manizzler has quit [Max SendQ exceeded]
Algebr` has joined #ocaml
manizzler has joined #ocaml
silver has joined #ocaml
fluter has quit [Ping timeout: 258 seconds]
Algebr` has quit [Ping timeout: 264 seconds]
fluter has joined #ocaml
johnelse has joined #ocaml
kev has quit [Ping timeout: 240 seconds]
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 265 seconds]
thizanne has joined #ocaml
thizanne has quit [Client Quit]
manizzler has quit [Read error: Connection timed out]
manizzler has joined #ocaml
thizanne has joined #ocaml
_andre has joined #ocaml
manizzler has quit [Max SendQ exceeded]
manizzler has joined #ocaml
sdothum has joined #ocaml
voglerr has joined #ocaml
thizanne has quit [Ping timeout: 244 seconds]
hay207__ has quit [Quit: Konversation terminated!]
<voglerr>
is there a way to get all type errors from the compiler for a signature mismatch instead of just the first one?
kev has joined #ocaml
gasche has joined #ocaml
<gasche>
seliopou, hannes: could you send me a link to your OCaml 2016 abstracts?
<ontologiae>
companion_cube: Sequence.filter for what ?
<companion_cube>
to remove the combinations that do not have the length you want
<ubertaco>
I've heard some passing references to iterators. It sounds like there's work on them for 4.04? Anywhere I could read up on what the general plans are?
<gasche>
Drup: sure, but people may be curious when reading your post to know more details about the actual format datatypes
govg has quit [Ping timeout: 265 seconds]
<Drup>
gasche: can you give me a link to your post ?
zpe has quit [Ping timeout: 265 seconds]
<gasche>
Drup: a last thing that might be worth mentioning eventually (but also possibly too advanced here) is that binary functions on difference-list GADTs are not -rectypes-safe
<gasche>
(same with Prolog and the possibility to create cyclic difference lists by unification)
<Drup>
(honestly, I don't really consider rectypes, because it's very rare to use it in practice except to say "you see, you can do that", and also because it's quite hard to use it to do what you actually want to do)
<gasche>
I think you should get a non-exhaustive warning in recent OCaml versions if you write code that is not safe against clients using -rectypes themselves
<ontologiae>
what ">|=" meens ?
kev has joined #ocaml
<Drup>
ontologiae: map
<flux>
>|= fun x -> y is like >>= fun x -> return y
Christop` has joined #ocaml
<flux>
I guess most useful with non-lambda-functions, adding a 'return' is not that big a deal?
<ontologiae>
I don't know >>= too :)))
<gasche>
sometimes I suspect that using "bind" and "map" directly would be more readable
<Drup>
gasche: thanks, I added a link
ChristopheT has quit [Ping timeout: 244 seconds]
<gasche>
flux: map is more efficient
<flux>
a >>= fun x -> y is the same as bind a (fun x -> y)
<flux>
gasche, how much more efficient?-o
<Drup>
defining map in term of bind is extremly inneficient.
<gasche>
(also it requires less structure on the type)
<ubertaco>
companion_cube: thanks! Been reading over it
<gasche>
well for example for lists it will allocate exactly twice as much
<companion_cube>
flat_map on lists is terrible
MercurialAlchemi has joined #ocaml
yegods has quit [Read error: Connection reset by peer]
<gasche>
hm
<gasche>
uberTaco, companion_cube: note that this PR won't end up in 4.04 which is in feature freeze already
<ubertaco>
aw, bummer
yegods has joined #ocaml
<companion_cube>
gasche: I'm not surprised, I need to write tests anyway
yegods has quit [Remote host closed the connection]
<companion_cube>
but feeling a bit demotivated
<Bluddy[m]>
companion_cube: cheer up. It'll get it in the next cycle.
<companion_cube>
heh, who knows
<ontologiae>
companion_cube: Benchmarking your algo, it's strange, to produce 325 elements from a list of 26 elements, it take 6GB of memory
<companion_cube>
wow, really?
* companion_cube
must have missed something
<companion_cube>
ah well it produces a lot of intermediate lists
<companion_cube>
ah, through benchmarking I found a better function
<ontologiae>
companion_cube: yeah :-D
<ontologiae>
I probably will have to write it imperatively
<companion_cube>
it's called "combs2" in the gist
<gasche>
uberTaco: note that you could use one of the many extensions to the standard library that provide these functions
<ontologiae>
chelfi: sort of, but gpu oriented ;-)
<mrvn>
I've been thinking of generating all possible way to wire inputs to a number of gates to find the combination with the least number of gates and wires for a given set of functions. But for anything usable that is just so many combinations ...
<companion_cube>
this is a possible way to generate all the expressions from some basic integers
<ontologiae>
companion_cube: wow !!
<companion_cube>
well it takes some time…
<mrvn>
ontologiae: For a genetic algorithm you need something where small changes may move a small way towards the goal. I just don't see that for circuits. A small change like adding a NOT gate can completly reverse the truth table but still be the right thing eventually.
<companion_cube>
it's probably not the most efficient
<ontologiae>
and we can improve the code to use previously generated expression
dexterph has quit [Ping timeout: 250 seconds]
<mrvn>
You can go top down. Try all operands and all partitions of the input numbers. Recursivley try the first partition for the first argument of the operator and the second partition for the second.
<mrvn>
Obviously if there is only one input only Int is valid.
<mrvn>
For Add and Mul you can limit the partitionings to solutions that have the smallest number in the first partition.
<mrvn>
Problem is you still get as lot results where sub becomes negative or div is a fraction.
mcspud has quit [Ping timeout: 250 seconds]
dexterph has joined #ocaml
<companion_cube>
I'm trying to do something based on a stack language
<ontologiae>
companion_cube: how do you control the depth of the expression, ie. the number of operators you can generate ?
<companion_cube>
in the current code?
pierpa has joined #ocaml
<ontologiae>
yes
<mrvn>
companion_cube: so you push N numbers and N-1 operastors on the stack in all possible orders that don't cause a stack underflow on eval?
<companion_cube>
yeah
<companion_cube>
I think so
<companion_cube>
give me a few more minutes
<ontologiae>
companion_cube: thank you so much
<companion_cube>
well it doesn't mean it will be usable
<mrvn>
ontologiae: The depth is defined by all inputs being used up and the stack being size 1.
<mrvn>
ontologiae: or what depth do you mean?
<mrvn>
companion_cube: if you want memoization then that means remembering all the values. Doesn't work for too many inputs.
ontologiae has quit [Ping timeout: 265 seconds]
<mrvn>
companion_cube: you could make pick_op more selective. + and * are only valid if the operands are sorted. That would cut out all the a+b == b+a duplicates.
rgrinberg has quit [Quit: WeeChat 1.5]
rgrinberg has joined #ocaml
<companion_cube>
yeah
<companion_cube>
it's not easy
<companion_cube>
mrvn: side note, string_of_stack would be better with Format ;-)
<mrvn>
The question also is: For an expression resulting in X do you want all expressions or just one?
pierpa has quit [Ping timeout: 260 seconds]
<mrvn>
e.g. 4 - 2 and 4 / 2 or just one of them?
shinnya has joined #ocaml
ygrek_ has joined #ocaml
govg has joined #ocaml
johnelse has quit [Ping timeout: 244 seconds]
dhil has joined #ocaml
ontologiae has joined #ocaml
Christop` has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
ChristopheT has joined #ocaml
<tvynr>
I have a module with a variant type defined in it. I'd like to open *just* that type's constructors into my local namespace (and none of the rest of the stuff from the module). Is this possible?
<ChristopheT>
whois asm89
<mrvn>
tvynr: pythons from module import type?
<mrvn>
tvynr: I think you can only do that by repeating the types signature.
<tvynr>
mrvn: Sorta. The module carries a variant data type as well as functions named things like "pp" and "compare". I'm trying to bring in *just* the constructors while still referring to Module.compare for the functions.
<tvynr>
mrvn: I appreciate the help; finding out for sure that you *can't* do something usually requires a community. :)
<tvynr>
mrvn: Yeah. So I'm thinking I can declare the type in the scope I need it and then create the module by e.g. "struct let compare = compare_foo let equal = equal_foo ... end".
<tvynr>
It'll get the job done.
<tvynr>
(I'm using ppx_deriving for a lot of these functions.)
<mrvn>
tvynr: put the type in a submodule and then open that.
<tvynr>
mrvn: The problem is that the PPX tool I'm using to generate the e.g. compare function always generates the code adjacent to the type declaration. So I write "type t = Foo | Bar of int [@@deriving ord]" and I get "type t = ...;; let compare = ...;;".
<tvynr>
mrvn: If I put the type in the submodule, I can't use the deriving tool without duplicating the signature. And I love my code generator enough that I'll put up with the noise.
<tvynr>
The submodule's a good idea if I'm not using this PPX extension, tho. I'll bear that in mind. :)
kev has joined #ocaml
<mrvn>
yeah, doesn't work for deriving
<mrvn>
tvynr: you could make a PPX extension that puts the type in a submodule.
<mrvn>
or modify the deriving to put the helper in a module
<tvynr>
mrvn: Fair points. In my limited experience, it's pretty messy to write a PPX extension inside of the same project that wants to use it; it messes with the Atom Merlin plugin pretty badly and I have to write some pretty goofy-looking and unintuitive stuff in my _oasis file. So I tend to avoid that unless it's really important.
<tvynr>
mrvn: Fair points. In my limited experience, it's pretty messy to write a PPX extension inside of the same project that wants to use it; it messes with the Atom Merlin plugin pretty badly and I have to write some pretty goofy-looking and unintuitive stuff in my _oasis file. So I tend to avoid that unless it's really important.
<tvynr>
oops - wrong window
<tvynr>
sorry :-/
<mrvn>
yeah, I would always do the extension as separate project and then use it.
pierpa has joined #ocaml
tvynr has quit [Ping timeout: 264 seconds]
soupault has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
soupault has quit [Remote host closed the connection]
soupault has joined #ocaml
avsej has quit [Ping timeout: 250 seconds]
dxtr has quit [Ping timeout: 276 seconds]
avsej has joined #ocaml
avsej has quit [Changing host]
avsej has joined #ocaml
dxtr has joined #ocaml
johnelse has joined #ocaml
avsej has quit [Ping timeout: 250 seconds]
avsej has joined #ocaml
avsej has quit [Changing host]
avsej has joined #ocaml
johnelse has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
theblatte has joined #ocaml
GemmaG_ has quit [Ping timeout: 250 seconds]
sh0t has joined #ocaml
voglerr has joined #ocaml
voglerr has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 276 seconds]
dhezfmoiezh has joined #ocaml
dhezfmoiezh has quit [Client Quit]
ggole has quit []
dhil has quit [Ping timeout: 244 seconds]
kev has quit [Ping timeout: 240 seconds]
thizanne has joined #ocaml
orbifx has joined #ocaml
AlexRussia has joined #ocaml
milodavis has joined #ocaml
orbifx1 has joined #ocaml
orbifx has quit [Ping timeout: 244 seconds]
myst|fon has quit [Quit: Connection closed for inactivity]
Algebr` has joined #ocaml
tvynr has joined #ocaml
kev has joined #ocaml
tvynr has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
ChristopheT has quit [Ping timeout: 250 seconds]
tvynr has joined #ocaml
_andre has quit [Quit: Lost terminal]
kakadu has joined #ocaml
regnat has quit [Quit: WeeChat 1.5]
regnat has joined #ocaml
soupault has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 244 seconds]
myst|fon has joined #ocaml
Algebr` has quit [Ping timeout: 250 seconds]
Simn has quit [Quit: Leaving]
Mercuria1Alchemi has quit [Ping timeout: 265 seconds]
<rgrinberg>
Drup: were you not made an ocaml-re maintainer before? :O
<Drup>
no
<rgrinberg>
wtf, for the longest time i thought you were a maintainer
<rgrinberg>
Alright, i should ask avsm to make you part of the team
<rgrinberg>
oh nvm i might be able to do it myself.
tane has quit [Quit: Leaving]
tvynr has quit [Ping timeout: 250 seconds]
Druuup has joined #ocaml
<Druuup>
This is cool, there is a link to this chat on the first page in http://ocaml.org/ :D
Druuup has left #ocaml [#ocaml]
orbifx1 has quit [Ping timeout: 250 seconds]
dexterph has quit [Remote host closed the connection]
dexterph has joined #ocaml
Boom has joined #ocaml
Boom has quit [Client Quit]
dexterph has quit [Ping timeout: 252 seconds]
nicholasf has joined #ocaml
Kakadu2 has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
seangrove has joined #ocaml
zpe has joined #ocaml
pyon has quit [Ping timeout: 244 seconds]
zpe has quit [Ping timeout: 260 seconds]
ChristopheT has joined #ocaml
<_y>
\o/
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
<_y>
shall i guess it is the concluding act of the “how to encourage the adoption of OCaml?”
<Drup>
Doubt it's directly related :)
al-damiri has quit [Quit: Connection closed for inactivity]
jhaberku has joined #ocaml
d0nn1e has quit [Ping timeout: 250 seconds]
<jhaberku>
Let's say I define `let agent m = let rec loop () = Lwt.wrap (fun () -> print_string m) >> loop () in loop ()`
<jhaberku>
and then `let prog () = Lwt.nchoose [agent "A"; agent "B"]`
d0nn1e has joined #ocaml
kev has quit [Ping timeout: 258 seconds]
<jhaberku>
What output would you expect if you executed the result of `prog ()`?
<jhaberku>
Because what you get is certainly not what I would have expected.
<Drup>
without any flushing, I have no idea
<jhaberku>
Drup: I would have expected the "A" and "B" threads to interleave to at least some extent, but only the "A" gets executed. In other words, in the recursive `loop ()` execution, the engine never yields control to the "B" thread.
<jhaberku>
If I insert a manual call to `Lwt_unix.yield ()` before recursing, then the cooperative thing happens.
<ChristopheT>
I put a link on ocaml.org front page to an application that makes it easy to join this IRC channel (some people want interactivity with tools that feel "modern"). I would be interested of a report in, say, 2–3 months about whether more people (especially newbies) have been joining the conversation. Please use https://github.com/ocaml/ocaml.org/issues for that. Thanks.
<jhaberku>
ChristopheT: The KiwiIRC thing?
<ChristopheT>
Yes.
djellemah_ has joined #ocaml
testest has joined #ocaml
testest has quit [Client Quit]
<jhaberku>
Fewer barriers to entry than something like Gitter?
<Drup>
jhaberku: more people here than on gitter
<ChristopheT>
There is no barrier for entry—it's really simple.
<jhaberku>
Drup: Is my mental model of how Lwt works wrong? I thought that `>>` is just sugar for `>>= fun () ->` and I thought that binds were cooperation points.
<ChristopheT>
jhaberku: It is important that people who want live chat have people that respond fast. A arguably nice looking Gitter room that is empty is easily interpreted as the community being dead.
<jhaberku>
ChristopheT: Definitely. I remember that there was talk of a Gitter/IRC bridge at one point. Wasn't that you?
<ChristopheT>
Drup: You are way more here than me. May you take care of that matter?
<Bluddy[m]>
ChristopheT: There is no gitter room for OCaml