Bluddy has quit [Quit: Connection closed for inactivity]
palomer has joined #ocaml
rbocquet has quit [Ping timeout: 268 seconds]
rbocquet has joined #ocaml
brendan has quit [Ping timeout: 268 seconds]
brendan has joined #ocaml
f[x] has quit [Ping timeout: 250 seconds]
mac10688 has quit [Ping timeout: 246 seconds]
keen___________6 has joined #ocaml
keen___________5 has quit [Ping timeout: 246 seconds]
swgillespie has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
darkf has joined #ocaml
swgillespie has quit [Read error: Connection reset by peer]
swgillespie has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
palomer has quit [Quit: palomer]
AltGr has joined #ocaml
tmtwd has quit [Remote host closed the connection]
rgrinberg1 has quit [Ping timeout: 265 seconds]
gobbledigook has joined #ocaml
<gobbledigook>
hey guys, how do I use List.sort?
<flux>
gobbledigook, I would expect most any OCaml material to sort that out.. jane street core or standard library? if the standard then List.sort compare [1; 2; 4; 3]
<gobbledigook>
is compare a function in the standard library?
<dmbaturin>
gobbledigook: You need an 'a -> 'a -> int function that returns 1 if first argument is "greater" than the second, zero is they are "equal and -1 if the second is "less".
<dmbaturin>
Whatever "greater", "equal", and "less" mean in your case. :)
<dmbaturin>
The compare function from pervasives provides intuitive comparison for built-in types.
echo-area has quit [Remote host closed the connection]
johnelse_ is now known as johnelse
sepp2k has quit [Quit: Leaving.]
enamex has joined #ocaml
antkong_ has quit [Quit: antkong_]
sepp2k has joined #ocaml
<MasseR>
gobbledigook: off topic, but thank you. I enjoy seeing people interested in learning. I've been reading #ocaml lastlog for a while, and it's been a pleasure
enamex has quit [Ping timeout: 244 seconds]
ely-se has quit [Quit: leaving]
lolisa has quit [Quit: meow]
echo-area has joined #ocaml
obadz- has joined #ocaml
rgrinberg1 has joined #ocaml
obadz has quit [Ping timeout: 260 seconds]
mahem1 has joined #ocaml
ely-se has joined #ocaml
tennix has joined #ocaml
<mahem1>
You know that you've written too much OCaml when you end you sentences like this;;
Jaglor has joined #ocaml
<flux>
well, you stop doing it after a while, as usually ocaml programs don't have ;;'s as you only use them in the toplevel. and advanced users just send fragments of code directly from their editor to the toplevel ;).
<flux>
I wonder how much fp-heavy ocaml does one need to write to accidentally start writing +. etc
* mahem1
gathers around to hear more stories of the modern new ways of these advanced users;;
<mahem1>
Really, OCaml has opened my eyes to see the purism and that intergers and reals are *completely* different philosophical concepts. What idiot would ever think to do such nonsense?
hcarty1 has joined #ocaml
<mahem1>
(Actually, tbh is was the Python Decimal package that made me realize this, but OCaml drove it home.)
Kakadu has quit [Quit: Page closed]
<mahem1>
Now, I sit in the back of my stats class and critizise my teacher when she implicitly treats continous variables as integers...
<Drup>
flux: well, you need to be an OCaml programmers that uses floats heavily, that's not so common
<octachron>
and an Ocaml programmer that simultaneously does not define a module Float = struct let (+) = (+.) ... end for numeric computation
mort___1 has joined #ocaml
tane has quit [Ping timeout: 265 seconds]
jludlam_ has quit [Ping timeout: 268 seconds]
<dmbaturin>
mahem1: My biggest conceptual problem with overloaded arithmetics is not that it usually defaults to integers, but that the default is defined outside of the language.
<mahem1>
dmbaturin: What do you mean by "is defined outside of the language"?
tennix has quit [Ping timeout: 246 seconds]
psy_ has joined #ocaml
tennix has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
tennix has quit [Ping timeout: 256 seconds]
BitPuffin has joined #ocaml
tane has joined #ocaml
<dmbaturin>
mahem1: In SML, overloaded arithmetics is entirely magical. In haskell, you can define your own type classes, but ambiguous type resolution is limited to classes from the standard library.
<ggole>
Magical is a bit strong, isn't it? There's a simple rule.
<ggole>
The rule is certainly very much a hack, but there isn't much in the way of magic machinery.
<dmbaturin>
ggole: No, I mean magical as in you can'y have your own.
<dmbaturin>
* can't
<ggole>
Ah, that's a fair complaint.
<ggole>
(But you could say the same about certain features in OCaml.)
<Drup>
ggole: I really would like to eliminate as many as possible
ely-se has quit [Quit: leaving]
<ggole>
How can you eliminate them? 20 years of OCaml code rely on them existing all over the place. :(
<flux>
if everything's custom, then that's more things to understand when reading the code
tennix has joined #ocaml
<ggole>
Are we talking about the same thing? =, <, compare, Hashtbl.hash, etc?
<Drup>
ggole: by bringing back the tools to define them inside the language
<dmbaturin>
Well, any language is going to have at least some magic in it. I just want as little of it as possible. :)
<ggole>
But they would have to have the same signature to keep working. You couldn't turn them into type-classes or similar.
<flux>
polymorphic magic functions would work without type level magic already, if there was a way to define them for custom types (in ocaml)
<flux>
but that would be too dynamic I suppose.. :)
<ggole>
I suppose you could expose a feature to write such "low level" structure-sensitive functions directly in OCaml...
<Drup>
ggole: that's ok for me, as long as the magic thing is not the only thing
<Drup>
like, for compare, it's fine
<Drup>
(for hash .. not really)
<ggole>
Hmm.
psy_ has quit [Ping timeout: 250 seconds]
tennix has quit [Ping timeout: 252 seconds]
* mahem1
is slightly dazed and confused at all of the chatter and believes that it's really alright that we have different functions for adding ints, floats, big_ints, etc...
tennix has joined #ocaml
<flux>
it's workable if you have a few types. now if you have different operators for {s,u}{8,16,32,64}.. fortunately often you can locally work with only one type so local opening of a module helps
<flux>
but, if you have a cool type-inferring type system.. then why on earth do I need to keep repeating the types to the compiler?
tennix has quit [Ping timeout: 264 seconds]
BitPuffin has quit [Read error: Connection reset by peer]
tennix has joined #ocaml
BitPuffin has joined #ocaml
<mahem1>
I guess that makes sense to just have smarter-type inferrence. And doing that wouldn't cause run-time dynamic-dispatch type of stuff to happen?
<ggole>
Inference wouldn't, type class-like machinery would
<ggole>
(Except where removed by specialisation, but that has its own costs.)
contempt has quit [Disconnected by services]
<mahem1>
I see.
contempt has joined #ocaml
ely-se has joined #ocaml
<orbifx>
Does anyone remember an article being mention, on how object orientation should not be used for code structuring? Got the link handy?
mort___1 has quit [Read error: Connection reset by peer]
tennix has quit [Ping timeout: 246 seconds]
jeffmo has joined #ocaml
contempt has quit [Read error: Connection reset by peer]
tennix has joined #ocaml
Bluddy has joined #ocaml
jludlam_ has quit [Ping timeout: 252 seconds]
contempt has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
tennix has quit [Ping timeout: 240 seconds]
rand__ has joined #ocaml
ely-se has quit [Quit: leaving]
yomimono has joined #ocaml
jludlam_ has joined #ocaml
BitPuffin has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
tennix has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
kushal has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has joined #ocaml
__uu__ has joined #ocaml
contempt has quit [Disconnected by services]
<thizanne>
http://paste.awesom.eu/thizanne/CYkt in this code, is there a difference, in the last object, between the commented method and the uncommented one ?
contempt has joined #ocaml
<thizanne>
(double_int and capitalize_var are irrelevant, sorry for the noise)
kushal has joined #ocaml
orbifx has quit [Quit: WeeChat 1.3]
palomer has joined #ocaml
<seliopou>
Drup: what is this Js.prop thing and how do I get rid of it? :P
<Drup>
You just use ##
<Drup>
and it will work
<Drup>
prop are things you can access with ##
<seliopou>
I'm doing `Dom_html.document##body`
<Drup>
and it doesn't work ?
<seliopou>
I tried `Dom_html.document##body##get` and got a different error
<seliopou>
nope doesn't work :/
<Drup>
what's the error message ?
<seliopou>
OHHHH
<seliopou>
nm
<Drup>
ah, I know
<seliopou>
examples aren't linking with js_of_ocaml.syntax
<Drup>
put parens around it :D
<seliopou>
oh really?
<Drup>
possibly ...
<seliopou>
ahah worked
<seliopou>
(parens)
<Drup>
Yeah
<Drup>
It's because "f foo##bar (baz)"
<Drup>
is parsed, with jsoo, "f (foo##bar(baz))"
<seliopou>
ah, makes sense
<Drup>
because fuck camlp4
<seliopou>
but not entirely obvious
<seliopou>
lulz
<Drup>
(mostly)
<Drup>
It's solved with the ppx, but, yeah
tennix has quit [Ping timeout: 252 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
<ggole>
thizanne: I don't think so. But if plus_to_minus were a class, and something inherited from it and overrode #map, I think there would be a difference.
MercurialAlchemi has joined #ocaml
<seliopou>
Drup: is tyxml part of js_of_ocaml?
<Drup>
No
<Drup>
It's one of the (optional) dependencies
<thizanne>
thanks ggole, I see what you mean
<Drup>
seliopou: it's part of ocsigen though :p
<seliopou>
hmmm...
<seliopou>
i'd like for the library to avoid the "i don't like this dependency so i'm not gonna use it" problem
<seliopou>
which seems to happen a bit with ocaml :D
<Drup>
what's not to like in tyxml ? :O
<seliopou>
and which I may be guilty of myself :(
<seliopou>
oh i'm sure it's great
<Drup>
I mean, it's pure, it's very thin and it's mostly composed of signatures and functors
<seliopou>
but people find reasons
<Drup>
bah
<seliopou>
i actually really want to use it
<Drup>
let them try to rebind d3 by hand
<seliopou>
haha
<seliopou>
btw figuring out this d3 thing took me a long time
<Drup>
they will have fun, I'm sure
<seliopou>
like... a year on and off at least
<Drup>
seliopou: I can imagine
<Drup>
The semantic is highly non trivial
<seliopou>
starting with elm
<seliopou>
yeah i actually at one point thought to write down redex semantics for it
<seliopou>
and then i promtply gave up that dream
<seliopou>
like really fast
<Drup>
I tried to figure out good general rules for it at some point and gave up. Your arrow approach works quite well
<Drup>
(still easy to shoot yourself with enter/select, but we will solve that soon :p)
<seliopou>
Drup: anyways, if tyxml is optional to js_of_ocaml, I'd like to keep it optional for d3 as well just so people don't have a reason to complain
<seliopou>
but the library should include support for it
<Drup>
ok
<seliopou>
Wanna just modify #4 with that?
<Drup>
not now
<seliopou>
sure
yomimono has quit [Ping timeout: 240 seconds]
mort___ has quit [Ping timeout: 246 seconds]
browncodes has quit [Ping timeout: 252 seconds]
nullcatxxx_ has joined #ocaml
ontologiae has joined #ocaml
Jaglor has left #ocaml [#ocaml]
<Drup>
seliopou: have you looked at my other ramblings on tyxml ? ^^ '
__uu__ has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has joined #ocaml
^elyse^ has joined #ocaml
ril has joined #ocaml
Guest38 has joined #ocaml
hcarty1 has quit [Ping timeout: 244 seconds]
toomuchtvrotsurb has joined #ocaml
keen___________6 has quit [Read error: Connection reset by peer]
keen___________7 has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
icicled has joined #ocaml
<icicled>
anyone here use the must+static variant of the compiler via opam ?
<icicled>
musl*
toomuchtvrotsurb has joined #ocaml
<icicled>
I'm trying to install ocurl via `opam install ocurl` with this variant and I get an error regarding the c compiler being unable to find curl/curl.h
<icicled>
I was wondering if there were any docs regarding this variant specifically relating to c extensions
<icicled>
/usr/include/curl/curl.h exists but the variant's c compiler (via musl-gcc) complains that it can't find the file - thus leading me to believe that its include path is non-standard/elsewhere
ril is now known as ril[away]
<icicled>
any suggestions?
f[x] has joined #ocaml
hcarty1 has joined #ocaml
Guest38 has quit [Ping timeout: 252 seconds]
ril[away] is now known as ril
octachron has quit [Quit: Leaving]
ril is now known as ril[away]
ril[away] is now known as ril
kushal has quit [Quit: Leaving]
<icicled>
my hunch was correct, the include dir for musl turns out to be /usr/include/x86_64-linux-musl & not /usr/include
palomer_ has joined #ocaml
palomer has quit [Ping timeout: 250 seconds]
palomer_ is now known as palomer
kushal has joined #ocaml
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
rand__ has quit [Quit: leaving]
palomer has quit [Quit: palomer]
jludlam_ has quit [Ping timeout: 246 seconds]
nullcatxxx_ has joined #ocaml
lobo has joined #ocaml
ril is now known as ril[away]
orbifx has joined #ocaml
ril[away] is now known as ril
ril is now known as ril[away]
ril[away] is now known as ril
pilne has joined #ocaml
<pilne>
when I used opam 1.2.2 to install ocaml 4.02.3 it installed it headless, is there a way to force it to install the version with x11 support? (or at least that is what happened based on the error I got). I found instructions on what to do for a mac, but not for using opam in linux. I am willing to start from a fresh opam init if needed. Thanks in advance.
<pilne>
i found instructions for a mac using brew, but I am scratching my head at this for sure
<def`>
so this is on your linux installation? what makes you think it installed without x11 support?
<pilne>
i get this error: # File "async_graphics.ml", line 17, characters 8-16:
<pilne>
# Error: Unbound module Graphics
<pilne>
when i looked it up, it pointed to a site that stated in a mac, this was the result of installing the compiler without x11 support. I was assuming it would the the same/similar for linux
f[x] has quit [Ping timeout: 252 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ggole has quit []
kdas_ has joined #ocaml
kdas_ has quit [Read error: Connection reset by peer]
<def`>
pilne: ocamlfind query graphics -l
<def`>
shoudl tell you whether graphics is available or ot
<def`>
not*
<def`>
I assume you are using ubuntu?
<pilne>
14.04
<def`>
Ok, you probably just need to install x11 headers
<def`>
Maybe just $ apt-get install libx11-dev
kushal has quit [Ping timeout: 272 seconds]
<def`>
After that, opam switch reinstall 4.02.3
<pilne>
installing those now, and going to investigate the crash that happened right before my cat came running outta the bedroom..... brb
<pilne>
ok, so far so good, now installing the rest of the packages reccomended by "real world ocaml"
ril[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 255 seconds]
<pilne>
regardless of if this works or not, thank you for your help
Haudegen has joined #ocaml
f[x] has joined #ocaml
<pilne>
awesome! it worked (:
Algebr has joined #ocaml
<pilne>
thank you so very much
<Algebr>
Can a labeled argument not be a tuple? ~foo:(thing, bar)
<Algebr>
I tried but was having trouble,
aubergines has left #ocaml [#ocaml]
<smondet>
Algebr: what do you mean? of course, f ~foo:42
<pilne>
def`: thanks again, i'm gonna be on and off for a while, but i defnitely appreciate all your help.
antkong_ has joined #ocaml
<Algebr>
Okay I forgot to update the mli
<Algebr>
smondet: thanks
oscar_toro has joined #ocaml
oscar_toro has left #ocaml [#ocaml]
echo-area has quit [Ping timeout: 256 seconds]
palomer has joined #ocaml
orbifx has quit [Ping timeout: 250 seconds]
slash^ has quit [Read error: Connection reset by peer]
rgrinberg1 has quit [Ping timeout: 240 seconds]
raphaelss has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
<nullcatxxx_>
what do you guys think on this issue...
<nullcatxxx_>
i have tried my best...
larhat1 has joined #ocaml
antkong_ has quit [Quit: antkong_]
<Drup>
nullcatxxx_: damien seems for it, you don't have to do anything
<nullcatxxx_>
i went back to that line's git history..
<nullcatxxx_>
jacques struggled with it
RichN has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
<nullcatxxx_>
i guess he definitely agrees with me now. he knows how convenient it will be when writing gadt code
jeffmo has quit [Quit: jeffmo]
mea-culpa has joined #ocaml
RichN has joined #ocaml
keen___________7 has quit [Read error: Connection reset by peer]
keen___________7 has joined #ocaml
Sorella has joined #ocaml
k1000 has quit [Remote host closed the connection]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg1 has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
tane has quit [Quit: Verlassend]
segmond has quit [Ping timeout: 246 seconds]
hcarty1 has quit [Ping timeout: 252 seconds]
sepp2k has quit [Quit: Leaving.]
segmond has joined #ocaml
mac10688 has joined #ocaml
jeffmo has joined #ocaml
<Bluddy>
It looks good to me now. It was a good discussion, and certainly one worth having.
shinnya has quit [Ping timeout: 265 seconds]
<Drup>
Bluddy: there are no other infix constructor
<Algebr>
Where does the build system in the ocaml repo set certain values, like in the seemginyl generated Makefile in ocaml/config or s.h in ocaml/config
<Drup>
Bluddy: also, just don't use "LGTM" on a PR to a repository for which you have no power what so ever. It's good to provide your opinion, but you really can't do more, in this case :)
shinnya has joined #ocaml
<Bluddy>
hehe ok. I thought it was just a convention to show my approval
<Bluddy>
thanks for letting me know
<icicled>
Does anyone know how to use cmdliner to output a man page?
<Drup>
icicled: --help will always work
<Drup>
and it shows a man page
^elyse^ has quit [Quit: Leaving]
<icicled>
Drup, yes I know it shows a man page, but what about using the man command?
<Drup>
you have multiple mode of output for --help, there is an option for that
shinnya has quit [Ping timeout: 240 seconds]
<Drup>
you just pipe to a file and install that where man will know about it
<icicled>
oh!
<icicled>
neat
rgrinberg1 has joined #ocaml
<icicled>
app --help=groff > app.man
<icicled>
silly me
pyx has joined #ocaml
pyx has quit [Client Quit]
rgrinberg1 has quit [Ping timeout: 250 seconds]
palomer has quit [Ping timeout: 252 seconds]
Simn has quit [Quit: Leaving]
<Algebr>
Drup: it would be nice if opam/cmdliner something did this for you
<Algebr>
Drup: pretty sure opam also maintains its own set of man pages
antkong has joined #ocaml
<Drup>
I'm not sure how cmdliner alone would do that :)
<Drup>
as for opam .. pretty sure it's a one line addition to an install script
<Algebr>
Drup: you mean an ad-hoc install string?
<Algebr>
script
<Algebr>
what's the way to get opam to give me the path for its man pages, opam config env manpath, or somethign like that would be nice
<Algebr>
ah, just opam config var man, I guessed and it worked.
<Algebr>
although if opam config var gave back a list of valid values, that would be nice too. Maybe an easy PR.
<Algebr>
<Drup>
Algebr: "opam config list"
<Algebr>
Drup: !!! wat, awesome.
rgrinberg1 has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
<Algebr>
Is this true. Say I have the same exact logic written in OCaml or I could just write a binding that calls C which implements the same logic. Will the C code always be faster than the equivalent OCaml code?
nullcatxxx_ has joined #ocaml
pilne has quit [Remote host closed the connection]
damason has joined #ocaml
Kakadu has quit [Remote host closed the connection]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pilne has joined #ocaml
damason has quit [Remote host closed the connection]