<randomA>
i hate how there is never any posts on ocaml because no one uses this, and second how every solution that is ever proposed involved importing something
randomA has quit [Quit: leaving]
MercurialAlchemi has joined #ocaml
jonasen has joined #ocaml
Heasummn has joined #ocaml
ygrek has joined #ocaml
relrod_ is now known as relrod
Heasummn has quit [Read error: Connection reset by peer]
Heasummn has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 255 seconds]
dmbaturin_ is now known as dmbaturin
dmbaturin is now known as Guest25489
larhat has joined #ocaml
Guest25489 is now known as dmbaturin
ggole has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
copy` has quit [Quit: Connection closed for inactivity]
slash^ has joined #ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
ggole__ has joined #ocaml
ggole_ has quit [Ping timeout: 255 seconds]
mcc has quit [Quit: Connection closed for inactivity]
dch has joined #ocaml
ocabot has joined #ocaml
ocabot has quit [Remote host closed the connection]
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
ggole__ has joined #ocaml
Algebr`` has joined #ocaml
ggole_ has quit [Ping timeout: 264 seconds]
Heasummn has quit [Ping timeout: 255 seconds]
AlexDenisov has joined #ocaml
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 265 seconds]
AlexDenisov has quit [Ping timeout: 276 seconds]
ggole__ has joined #ocaml
phase_ has joined #ocaml
ggole_ has quit [Ping timeout: 272 seconds]
AlexDenisov has joined #ocaml
Orion3k has quit [Quit: Leaving]
Orion3k has joined #ocaml
<Algebr``>
how do I ask something on the ocaml mailing list?
<Algebr``>
been suscribed but now want to ask a question
hhx has quit [Quit: WeeChat 1.5]
<lyxia>
just send a mail to the ML address
<Algebr``>
this right: caml-news-weekly@lists.idyll.org
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<lyxia>
caml-list@inria.fr
<Algebr``>
neat, thanks
<lyxia>
yup just like that.
teiresias has joined #ocaml
zpe has joined #ocaml
<Algebr``>
cool, so you saw it?
<Algebr``>
lyxia:
<lyxia>
Algebr``: I did. :)
<Algebr``>
yay, hope someone helps out, I'm delaying something cause I can't figure this out correctly.
<Algebr``>
want to get rid of the // TODO HACK
ygrek has quit [Ping timeout: 265 seconds]
zpe has quit [Ping timeout: 240 seconds]
phase_ has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
tmtwd has joined #ocaml
Simn has joined #ocaml
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
mfp_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tane has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas_ is now known as Leonidas
spion_ is now known as spion
yegods has joined #ocaml
ggole_ has joined #ocaml
ggole__ has quit [Ping timeout: 260 seconds]
<benmachine>
has anyone worked on js_of_ocaml enough to know how to make the tests pass? they fail for me with what appear to be "genuine" failures, but I'ld like independent confirmation before I go opening a github issue
<benmachine>
I'm also asking in #ocsigen but there aren't 273 people in there
yegods has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
yegods has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
larhat1 has quit [Read error: Connection reset by peer]
yegods has quit [Ping timeout: 240 seconds]
larhat1 has joined #ocaml
FreeBirdLjj has joined #ocaml
zpe has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
AlexDenisov has joined #ocaml
<Bluddy[m]>
randomA: what's your question?
inr__ is now known as inr
sdothum has joined #ocaml
FreeBirdLjj has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Druup is now known as Drup
CuriousErnestBro has joined #ocaml
smondet`` has joined #ocaml
AlexDenisov has joined #ocaml
smondet` has quit [Ping timeout: 276 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
mattg has quit [Read error: Connection reset by peer]
vinoski has quit [Read error: Connection reset by peer]
myst|fon has quit [Read error: Connection reset by peer]
jeroud has quit [Read error: Connection reset by peer]
jmct has quit [Read error: Connection reset by peer]
msch_ has quit [Read error: Connection reset by peer]
rfv has quit [Read error: Connection reset by peer]
mattg has joined #ocaml
myst|fon has joined #ocaml
vinoski has joined #ocaml
jmct has joined #ocaml
rfv has joined #ocaml
msch_ has joined #ocaml
slash^ has quit [Quit: Leaving]
jeroud has joined #ocaml
atsampson has quit [Ping timeout: 272 seconds]
atsampson has joined #ocaml
barkmadley[m] has quit [Ping timeout: 276 seconds]
srenatus[m] has quit [Ping timeout: 276 seconds]
M-jimt has quit [Ping timeout: 276 seconds]
AlexRussia has joined #ocaml
barkmadley[m] has joined #ocaml
loocash has joined #ocaml
loocash has quit [Quit: Leaving]
APNG has quit [Ping timeout: 250 seconds]
APNG has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
M-jimt has joined #ocaml
srenatus[m] has joined #ocaml
fluter has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
Algebr`` has quit [Remote host closed the connection]
fluter has joined #ocaml
larhat1 has quit [Quit: Leaving.]
Algebr has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
orbifx has joined #ocaml
tane has quit [Quit: Leaving]
larhat has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Muzer has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
orbifx has quit [Quit: WeeChat 1.5]
Muzer has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: WeeChat 1.5]
rgrinberg has joined #ocaml
AlexDenisov has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<mrvn>
Error: The variant type unit has no constructor ::
copy` has joined #ocaml
<mrvn>
How can I get that error there?
<mrvn>
yes
<mrvn>
ups
<copy`>
State.t is unit? :-)
FreeBirdLjj has joined #ocaml
<mrvn>
no. EVen if it where I can build a list of units.
<mrvn>
It's a type error. solutions has type unit, not State.t list.
<copy`>
Oh, right
<mrvn>
WHat I don't get is why 1) I get that error instead of a type error at all, 2) why the type check doesn't give an error first
FreeBirdLjj has quit [Remote host closed the connection]
shinnya has joined #ocaml
<ggole_>
That is a type error?
<pseudo-sue>
hey, i don't have any real knowledge of ocaml, but i'm trying to build a tool that was written in it, and i'm having what i think are some trivial dependency issues when i run make.
FreeBirdLjj has joined #ocaml
<pseudo-sue>
"Unbound module Ast", and that sort of thing.
<ggole_>
eg, if you have type state = unit let test x y : state = (x : state) :: (y : state list) is will complain that :: is not a constructor of unit
<pseudo-sue>
i'm assuming that the fix is to just install the proper packages, but i'm not sure how to find the ones i need.
<pseudo-sue>
sorry if this is boringly trivial question, i just haven't had much luck googling about for a clue.
infinity0 has joined #ocaml
<ggole_>
pseudo-sue: usually you would use either the system package manager or opam (an OCaml specific package manager) to install dependencies
tmtwd has joined #ocaml
<ggole_>
Does the tool come with build instructions?
<pseudo-sue>
nothing all that instructive. pretty much just 'run make'.
<pseudo-sue>
(ropc and ropc-llvm are the tools i'm trying to get up and running -- both pulled from github)
<ggole_>
"(you will need to install some dependencies and die a little inside during this process)"
<ggole_>
Oh dear
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<ggole_>
Looks likely that you need to install BAP
<pseudo-sue>
i have.
<pseudo-sue>
i see that these tools ship with an older version of bap, though.
<pseudo-sue>
so maybe i need to go compile that first.
<pseudo-sue>
is the Ast module something that's provided in a known package?
<ggole_>
That's a very common name, hard to say where it's from without the context
<ggole_>
It's probably from BAP (which does have an ast.ml)
<benmachine>
there's an ast.ml in ropc itself
<benmachine>
...there appears to be an entire copy of batteries in here
<zozozo>
that's ... heavy
<benmachine>
last commit was 3 years ago, maybe opam wasn't a thing back then
companion_square is now known as companion_cube
<pseudo-sue>
thanks for the help guys. i'll swing by later if i hit another wall
<infinity0>
anyone got a comparison between batteries and containers?
pseudo-sue has quit [Ping timeout: 276 seconds]
<companion_cube>
not that I know of
<companion_cube>
o/ folks
<companion_cube>
infinity0: you can take a look at the r espective online APIs
clog has quit [Ping timeout: 276 seconds]
clog has joined #ocaml
<mrvn>
ggole_: () :: [] is just fine
<ggole_>
((() :: []) : unit) => Error: This variant expression is expected to have type unit The constructor :: does not belong to type unit
<mrvn>
different error
<ggole_>
Wait, really?
<ggole_>
You don't get the first part?
<mrvn>
# () :: ();;
<mrvn>
Error: The variant type list has no constructor ()
<companion_cube>
this cast is wrong?
<infinity0>
companion_cube: looking now, thanks
<ggole_>
mrvn: I get Error: This variant expression is expected to have type unit list The constructor () does not belong to type list
<ggole_>
(In the 4.03.0 toplevel.)
<mrvn>
# let u = ();;
<mrvn>
val u : unit = ()
<mrvn>
Error: This expression has type unit but an expression was expected of type int list
<mrvn>
# 1 :: u;;
<mrvn>
# 1 :: ();;
<mrvn>
Error: The variant type list has no constructor ()
<mrvn>
Why are there 2 errors for this?
<mrvn>
SOmething is trying to be smart and guess what I might have ment.
<mrvn>
(and now it shows that type l'a list = Nil | Cons x y
<mrvn>
ggole_:
<mrvn>
# ((1 :: u) : unit);;
<mrvn>
What do you get for that?
<ggole_>
Error: This variant expression is expected to have type unit The constructor :: does not belong to type unit
<mrvn>
Error: The variant type unit has no constructor ::
<ggole_>
Hmm
<mrvn>
OCaml version 4.01.0
<ggole_>
Which switch are you using?
<mrvn>
none
<ggole_>
They might have changed it.
<ggole_>
I don't remember seeing that change, though.
<mrvn>
Used to just give me a type error
<mrvn>
Problem (for me) is that it infered that the retun type of the function is unit and then :: can't return a unit os it's an error. The type check on 1 or u doesn't get tried at all.
<ggole_>
Why is it a problem?
<mrvn>
Another branch of the code returns u, which somehow became unit. Now how do I find that place.
<ggole_>
(I assume this is within a let rec or similar.)
<ggole_>
If it's within a let rec, find the function(s) that are getting wrong return types and annotate them
<ggole_>
just foo x y z : _ list = ... should do
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<mrvn>
ggole_: I did. took a few steps. I wish one could force a type somewhere and then rerun the infering and get all the errors where the bug is.
<ggole_>
Yeah.
<ggole_>
There was an OCaml 'type debugger' presented at the recent ICFP, actually
<ggole_>
That would be useful here
<mrvn>
well, bug fixed. I now have code that given a number of inputs and a truth table finds a netlist of digital gates that produces that function. Actually a list of possible solutions. Now I have to somehow print and compare them.
<mrvn>
A netlist is a graph so it's kind of hard to print.
<ggole_>
There's dot, although that isn't exactly easy itself
<mrvn>
yeah. but would you read dot format instead of drawing it?
<ggole_>
Nope
jstolarek has joined #ocaml
<tane>
you can draw it using dot?
<ggole_>
That's what dot is for, yeah
<tane>
+ you can use ocamlgraph library and its graphviz module to output dot
<mrvn>
My nodes are digital gates. would be cool to use the actual gate symbols for them.
<mrvn>
draw an actual schematic.
<tane>
you can give dot actual images for nodes, with the inline html tags
wxfdglm has joined #ocaml
zpe has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 265 seconds]
jonasen has quit [Ping timeout: 265 seconds]
jonasen has joined #ocaml
w1gz_ is now known as w1gz
<rightfold>
Dot for logic circuits is gonna be painful
<rightfold>
Unless you don't care about straight lines
mcc has joined #ocaml
jonasen_ has joined #ocaml
jonasen has quit [Ping timeout: 276 seconds]
<Drup>
there is an option in dot to only use straight lines
wxfdglm has quit [Quit: leaving]
jonasen_ has quit [Ping timeout: 265 seconds]
mrshark has joined #ocaml
jonasen has joined #ocaml
jonasen has quit [Ping timeout: 272 seconds]
jonasen has joined #ocaml
mrshark has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
<flux>
I think rightfold means "about lines that go either horizontally or vertically"?
<flux>
that kind of layout would be cool for graphviz
<rightfold>
Yeah, also nodes nicely alined
<rightfold>
Few corners
<flux>
I guess someone should just port the algorithm from some PCB layout program ;)
<rightfold>
Visio flowchart autolayout isnt too bad
<rightfold>
I wish graphviz supported that algorithm
<ggole_>
I'm guessing that if you want that sort of thing you'll shortly want other things that are features of dedicated tools
<flux>
such as?
<flux>
if you want automatic layout (ie. programmatically generated data), there aren't that many quality options out there..
phase_ has quit [Remote host closed the connection]
<djsjadkhf>
James Paul Warburg (August 18, 1896 – June 3, 1969) was a German-born American banker. He was well known for being the financial adviser to Franklin D. Roosevelt. His father was banker Paul Warburg, member of the Warburg family and "father" of the Federal Reserve system.
<djsjadkhf>
[..]
<djsjadkhf>
He gained some notice in a February 17, 1950, appearance before the U.S. Senate Committee on Foreign Relations in which he said, "We shall have world government, whether or not we like it. The question is only whether world government will be achieved by consent or by conquest."[1]
<djsjadkhf>
Paul Moritz Warburg (August 10, 1868 – January 24, 1932) was a Jewish German-born American banker, and an early advocate of the U.S. Federal Reserve System.
phase_ has joined #ocaml
<Algebr>
what the fuck is this
<djsjadkhf>
idk lols
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kosh_ has joined #ocaml
<kosh_>
Is "OCaml for Scientists" still actual? if I want to try start learning Ocaml to do some scientific simulations, should I start with this book? (I am not new to FP, I know some haskell)
phase_ has quit [Ping timeout: 255 seconds]
tane has quit [Quit: Leaving]
<dxtr>
So, what's the difference between pairs and lists?
<Algebr>
a pair is just two things, a list is n number
<dxtr>
So what is int * int * int?
Simn has quit [Quit: Leaving]
<dxtr>
Is that actually int * (int * int)?
sm0g has joined #ocaml
<Algebr>
no, not the same thing
<Algebr>
first is a tuple of three things, second is a tuple of two things where second thing is a tuple of two things
<dxtr>
So what's the syntax for a pair? :P
<dxtr>
Okay, so my question is really: what's the difference between a tuple and a list?
<Algebr>
?
<Algebr>
the number of things in a tuple is part of its type
<dxtr>
I should have realized that
<dxtr>
That makes sense
MercurialAlchemi has quit [Ping timeout: 265 seconds]
sm0g has quit [Ping timeout: 264 seconds]
mrshark has joined #ocaml
<lyxia>
you can have a tuple of different types
<lyxia>
lists are homogeneous
<lyxia>
(1, "a") : int * string, but [1; "a"] is ill-typed.
<dxtr>
right
mrshark has quit [Ping timeout: 265 seconds]
sh0t has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Ping timeout: 272 seconds]
<infinity0>
do you guys know how i can get ocaml to not do tail-call optimisation
<infinity0>
it's really messing with this stack trace i'm trying to debug
zpe has quit [Ping timeout: 264 seconds]
<copy`>
I'm reading some code, does this do anything: `Lwt.catch read_frame (fun exn -> Lwt.fail exn)`
sm0g has joined #ocaml
sm0g has quit [Ping timeout: 276 seconds]
hhx has joined #ocaml
West405 has joined #ocaml
<mfp_>
copy`: yes, it catches exceptions raised in read_frame and turns them into Lwt failures
<mfp_>
Algebr: I think it's haskellian coded speech. world government = ad-hoc polymorphism, by consent = modular implicits, by conquest = type-classes
wu_ng has joined #ocaml
West405 has left #ocaml [#ocaml]
<copy`>
mfp_: I thought that happens automatically
<mfp_>
copy`: nope, at some point you need to Lwt.catch (could be a part of the expansion performed by the ppx ext, either [%lwt expr] or try%lwt ...)
<copy`>
But, is there a difference between a thread that raises an exception (such as `read_frame`) and a failed thread (such as returned by `Lwt.fail`)
<mfp_>
copy`: Lwt.bind m f does not catch exns in f, because otherwise it'd be impossible to perform tail calls in f
<copy`>
Oh, I see
<mfp_>
an uncontrolled exception goes up the stack and might become visible in unexpected parts of the program (other Lwt threads)
<mfp_>
so you really need to capture them in the Lwt monad; if you're using try%lwt or such, it'll happen naturally