<everyonemines>
Drup: Well, I haven't really used it myself, but...
<everyonemines>
- the code looks ugly to me
<everyonemines>
- Mozilla has some organizational problems now IMO
<everyonemines>
- progress has seemed really slow
<everyonemines>
- trying to be C++ and I hate C++
<everyonemines>
- performance not so good so far
<whitequark>
that's really misguided...
<everyonemines>
- I don't think a new systems programming language will be very popular right now
<everyonemines>
- LuaJIT + C will probably be faster
<Drup>
I can't say I agree with your points =')
<everyonemines>
Yeah, I guess that's it. I don't claim to be an expert on it or anything, I just haven't gotten a good impression.
<whitequark>
I see that list as "I don't like Rust, let's make up some reasons why"
<whitequark>
the comparison with C++, C and Lua is especially absurd, Rust has very little to do with any of them
<whitequark>
it's an ML derivative with typeclasses and region-based memory management, which has exactly ø intersection with C, C++ or Lua
<Drup>
whitequark: to be fair, mozilla is marketing it as a C++ replacement
<whitequark>
Drup: you don't have to be C++ to replace C++
<Drup>
(but I agree with you)
<whitequark>
and in fact, Rust is a really simple language at its core
<whitequark>
(which would be the worst general objection to C++)
kclancy has quit [Remote host closed the connection]
<Drup>
the regions based memory management (I call it just "linear types" :p) is the fancy attractive feature for me :D
<whitequark>
no, it's not just linear types.
<whitequark>
"just linear types" don't include borrowing
<Drup>
yeah I know it's a bit more
<whitequark>
it's a difference between an academic curiosity and a practical systems lang ;)
<everyonemines>
Oh yeah, also, I'm suspicious when a large org says "let's invent a new programming language" when there's already things that would have been applicable
<everyonemines>
in Rust's case, maybe Julia?
<Drup>
not julia, no.
<Drup>
(ahah, certainly not julia)
<everyonemines>
how so?
<Drup>
it's like saying "you can do bound checking (you seem to like that) in both Agda and Sage, I'm sure both languages are interchangeable"
oriba has joined #ocaml
<everyonemines>
I don't know those
<whitequark>
everyonemines: there's not anything that comes near rust in the terms of feature set
<Drup>
whitequark: well, ATS does
* araujo
thinks rust has a bright future
<Drup>
everyonemines: julia is half dynamically typed, JIT based, GCed
<whitequark>
Drup: doesn't ATS require you to prove far stronger statements about the code?
<Drup>
whitequark: yes, you were talking about the feature set, not the usability :D
<whitequark>
usability is a feature
<whitequark>
the most important one, in fact, just look at PHP...
<araujo>
and rust development is extremely active these days, just do a git pull everyday and you will see....
<Drup>
yeah, I'm a bit confused at the "progress has seemed really slow"
* araujo
has two bindings lib under development for it too
<everyonemines>
Oh yeah, that was unclear. I don't mean in terms of code written, I mean in terms of what they're getting per LOC.
<whitequark>
rust is in stabilization stage
<araujo>
right
<Drup>
(and feature pruning stage, too)
<Drup>
(which is a *very* good thing lot's of language designer tend to overlook)
<everyonemines>
do you think it's going to be faster than ocaml eventually?
<everyonemines>
I'm skeptical.
struktured has quit [Ping timeout: 240 seconds]
<whitequark>
of course
<whitequark>
I would be surprised if it's not already
<everyonemines>
I'm pretty sure it's much slower ATM
<everyonemines>
i'll check
<araujo>
performance is one of the main goal, so, if not faster already, I think it will be as fast or faster at some point
<everyonemines>
rust isn't on benchmarksgame.alioth.debian.org
<araujo>
though I don't see rust like a competitor for ocaml
everyonemines has left #ocaml [#ocaml]
everyonemines has joined #ocaml
everyonemines has left #ocaml [#ocaml]
<whitequark>
benchmarksgame is irrelevant, that's why it's called "game"
<araujo>
more of a competitor for C/C++ or even Java...
<Drup>
this website is taken far too seriously ...
everyonemines has joined #ocaml
<everyonemines>
performance is a goal for ocaml too, and most other languages too
<whitequark>
araujo: Java? I dunno, Java should be replaced with something like OCaml
<whitequark>
everyonemines: I'm not sure you understand the nature of tradeoffs done by Rust and OCaml respectively
<Drup>
everyonemines: there is a "slightly" difference of manpower
<araujo>
whitequark, maybe...
<everyonemines>
whitequark: ok...?
<everyonemines>
how do you mean
<araujo>
whitequark, I think of java system apps that could be ported/re-written in rust though
<araujo>
but it certainly targets more c/c++
eikke__ has joined #ocaml
<whitequark>
Rust (allows to) aggressively lift allocations to stack, focuses on deterministic memory management and provides multicore concurrency
<araujo>
actually I think a system programming language like rust can benefit languages like haskell/ocaml
<whitequark>
as side effect you can also vectorize much more code (OCaml doesn't do it at all)
<whitequark>
(OCaml really only tries to weakly unbox stuff out of that whole list)
<Drup>
another thing to note, is that Rust is for now working on having a stable language
<Drup>
optimisation don't break compatbility most of the time, they can do that later.
* araujo
has heard we could have 1.0 by end of this year
<whitequark>
Drup: that's not really valid in case of something like Rust
<Drup>
whitequark: I don't know if it's valid, but it's a point I have seen raised by rust people
<whitequark>
Drup: sure, you can optimize JavaScript code by a factor of 100-1000 over five years
<whitequark>
but not in Rust, where quite a few of low-level details are directly and indirectly exposed
<Drup>
(I'm not sure you can really optimize JS that much :D)
<whitequark>
that's what happened after V8 first appeared
<everyonemines>
Yeah, ocaml is bad at concurrency, but I guess there's Scala
<whitequark>
it's at *least* a factor of 100
<Drup>
ahah, Scala
<whitequark>
everyonemines: and you said you hate C++...
<Drup>
funny joke
<everyonemines>
Well, I don't like it, but IIRC it's relatively popular
<whitequark>
Scala is not a systems language
<everyonemines>
It doesn't matter if you call it a systems language or not, what matters is how fast it is
<everyonemines>
and ATM Rust isn't any faster than Scala
<whitequark>
that's an odd statement
<everyonemines>
and I don't think GC being optional will provide real benefits
<whitequark>
"fast" hardly matters most of the time, cf.: ruby
<whitequark>
you can't use literally anything to write a library that exports a C-compatible interface right now, except C
<whitequark>
(or C++, by extension)
<everyonemines>
what about LuaJIT
* whitequark
facepalms
<whitequark>
no.
<everyonemines>
or is that now what you meant
<everyonemines>
*not
<Drup>
everyonemines: where do you get your measurements from ?
<Drup>
ok, but the plugin isn't merged in cppo yet :p
<rgrinberg>
ah
<Drup>
and it's ocaml >= 4.01
<rgrinberg>
so how do you invoke ocamlbuild to use some findlib package?
<Drup>
in the pr :p
<rgrinberg>
ty ty
<Drup>
I will try to see if I can remove the need for the extra dep rule
<Drup>
maj system => my urxvt segfault, so cool -__-
<rgrinberg>
Drup: can you not just ship the plugin separately?
<rgrinberg>
i mean in it's own opam package
<Drup>
rgrinberg: sure I can, but what for ?
<rgrinberg>
don't have to martin to make up his mind and wait for a cppo release
<Drup>
oh no, I told him not to merge yet because it wasn't ready
<rgrinberg>
oh ok. the biggest benefit for me using is that i can get back my .ml file extensions :D
<Drup>
in the meantime, you can just copy past the rule in the plugin.
<Drup>
paste*
<Drup>
(as soon as I have finished raging over perl segfaulting, I will update cppo's PR)
<rgrinberg>
anybody else hate all caps sigantures?
<rgrinberg>
this isn't cobol god dam it
<BitPuffin>
hmm, is it bad that an optional argument can't be erased? Because why would the compiler otherwise feel that a warning is necessary
<BitPuffin>
ah
<BitPuffin>
I see
<BitPuffin>
it doesn't get applied unless you do foo "a" ?opt:None
<BitPuffin>
well I mean it gets applied, but you don't get the value
<BitPuffin>
you get another function
<BitPuffin>
that's kind of odd
johnnydiabetic has joined #ocaml
<BitPuffin>
is there a good reason why the rule for erasing optional arguments isn't "It can erase until the first ordered argument, unless it's the last argument"?
<Drup>
it's the other way around
<Drup>
you must put the optionnal arguments before the others
<BitPuffin>
Yeah I know
<BitPuffin>
because otherwise it can't be erased
<BitPuffin>
but why can't they be erased if they are last?
<BitPuffin>
so if I have let foo a ?b = ... why shou'dn't it erase b if I do foo 2
<BitPuffin>
shouldn't*
* BitPuffin
is kinda tired
<Drup>
because that's the matching semantic for optional arguments.
<BitPuffin>
what do you mean
<Drup>
the semantic is "match the argument from right to left, droping optional arguments if they are skipped
<BitPuffin>
yeah
<BitPuffin>
but is there a good reason why it can't also match "there is only optional arguments left, skip them"
<Drup>
it's a good semantic, because it's easy to predict, the mental model to understand when an optional argument will be consumed or not is simple
fraggle_ has quit [Remote host closed the connection]
philtor_ has joined #ocaml
fraggle_ has joined #ocaml
everyonemines has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
struktured has quit [Ping timeout: 240 seconds]
struktured has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
strobegen has joined #ocaml
tlockney_away is now known as tlockney
<Drup>
rgrinberg: as a user, would you prefer the cppo_I tag taking a directory (and we need to add dependencies explicitly) or taking a file (and it will manage the dependency automatically) ?
<Drup>
(or some other idea)
johnnydiabetic has quit [Quit: Leaving]
struktured has quit [Ping timeout: 240 seconds]
<rgrinberg>
hmm
<rgrinberg>
hard to say, both are good
<Drup>
currently, it's the first
<rgrinberg>
trying to think which one would cause the least surprises
<Drup>
because it map directly to cppo's arguments
<Drup>
maybe I could just add a cppo_I_dep or something ?
<rgrinberg>
i suppose that's better than since most people would build a mental model immediately
<rgrinberg>
both would be good
struktured has joined #ocaml
<Drup>
ooh, I can be clever
<Drup>
hum, not sure
ygrek has quit [Remote host closed the connection]
<Drup>
rgrinberg: I could check if the argument is a directory, and if it's a file, add it as dependency and include the parent
<Drup>
but I'm not sure if it's a good idea or if I should stick with two tags
<rgrinberg>
i think that woudl work ok
<rgrinberg>
can't think of any corner cases
racycle_ has quit [Quit: ZZZzzz…]
divyanshu has quit [Quit: Computer has gone to sleep.]
<Drup>
rgrinberg: I implemented like that, it works fine
andreypopp has quit [Quit: Connection closed for inactivity]
everyonemines has joined #ocaml
Submarine has joined #ocaml
everyonemines has quit [Quit: Leaving.]
everyonemines has joined #ocaml
Oejet has joined #ocaml
alpounet has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
alpounet has joined #ocaml
pminten has quit [Remote host closed the connection]
ygrek has joined #ocaml
ollehar has joined #ocaml
tane has joined #ocaml
q66 has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
fraggle_laptop has joined #ocaml
Hannibal_Smith has joined #ocaml
alpounet has quit [Remote host closed the connection]
everyonemines has quit [Quit: Leaving.]
ollehar has joined #ocaml
andreypopp has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
rand000 has joined #ocaml
agarwal1975 has joined #ocaml
eikke__ has joined #ocaml
claudiuc has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 240 seconds]
AdmiralBumbleBee has quit [Quit: AdmiralBumbleBee]
agarwal1975 has quit [Quit: agarwal1975]
Submarine has quit [Remote host closed the connection]
skchrko has joined #ocaml
SHODAN has quit [Quit: No Ping reply in 180 seconds.]
SHODAN has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
shinnya has joined #ocaml
Thooms has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
eizo has joined #ocaml
mcclurmc has joined #ocaml
ygrek has quit [Remote host closed the connection]
NoNNaN has quit [Remote host closed the connection]
studybot has quit [Write error: Connection reset by peer]
reynir has quit [*.net *.split]
mehdid has quit [*.net *.split]
_2can has quit [*.net *.split]
thizanne has quit [*.net *.split]
iZsh has quit [*.net *.split]
_2can has joined #ocaml
mehdid has joined #ocaml
thizanne has joined #ocaml
reynir has joined #ocaml
iZsh has joined #ocaml
studybot has joined #ocaml
NoNNaN has joined #ocaml
hhugo has quit [Quit: Leaving.]
michael_lee has joined #ocaml
cdidd has quit [Ping timeout: 276 seconds]
agarwal1975 has joined #ocaml
racycle has joined #ocaml
eikke__ has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
cdidd has joined #ocaml
rand000 has quit [Ping timeout: 276 seconds]
watermind has joined #ocaml
slash^ has joined #ocaml
eikke__ has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
michael_lee has quit [Ping timeout: 265 seconds]
boogie has joined #ocaml
zebr has quit [*.net *.split]
nicoo has quit [*.net *.split]
arj has quit [*.net *.split]
keen________ has quit [*.net *.split]
nicoo has joined #ocaml
boogie has quit [Remote host closed the connection]
keen________ has joined #ocaml
arj has joined #ocaml
boogie has joined #ocaml
ontologiae has joined #ocaml
lordkryss_ has joined #ocaml
boogie has quit [Remote host closed the connection]
penglingbo has quit [Ping timeout: 240 seconds]
zebr has joined #ocaml
lordkryss has quit [Ping timeout: 245 seconds]
zebr has quit [*.net *.split]
pyon has joined #ocaml
zebr has joined #ocaml
boogie has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
boogie has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
dapz has joined #ocaml
ygrek has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
rand000 has joined #ocaml
Thooms has quit [Ping timeout: 245 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
mcclurmc has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
lordkryss_ has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
<rgrinberg1>
Drup: how do i make ocamlbuild pick up the shcaml.cma depenedency for scripts int the examples dir?
<Drup>
I think there is something called ocaml_lib in ocamlbuild_plugin
<Drup>
(I usually let oasis handle this sort of thing)
<rgrinberg1>
im slightly allergic to oasis
<rgrinberg1>
would prefer to use topkg
cdidd has quit [Ping timeout: 240 seconds]
<adrien>
*cough* *cough*
<adrien>
I cannot understand the will to use ocamlbuild but not oasis
<rgrinberg1>
i just dont want to dump a ton of auto generated crap i dont understand into my project
<adrien>
if you remove "auto generated" from that sentence, I could think you're speaking of ocamlbuild
<adrien>
more seriously
<adrien>
large part of oasis is to fill the gaps in ocamlbuild
<adrien>
especially with rules
<adrien>
or when ocamlbuild has a crazy behaviour
<adrien>
which is why it's unfair to blame it on oasis and why I'm eager to have ocamlbuild out of the compiler repository
<rgrinberg1>
i'd still need to edit the myocamlbuild because i have some custom rules and then I have to deal with the auto generated mess
<rgrinberg1>
i do use oasis for tiny/simple projects
<Drup>
rgrinberg1: dynamic setup.
<rgrinberg1>
Drup: never heard of it… let me read my oasis docs about it
<Drup>
(and also, honestly, you don't want to have this crap auto generated, but you will have to write a non trivial amount of it anyway, so ...)
<Drup>
(there are problems with oasis, I totally agree with that. However the auto generated code is not a problem in oasis, it's a problem in ocamlbuild.)
<rgrinberg1>
well how much more code am i going to need to do the simple task i have left
<def`>
(in latest merlin, we switched from ocamlbuild to ocamlmakefile… it's easier to hack and much faster to build)
<mrvn>
It does what I tell it to, not what I mean.
<rgrinberg1>
and i do agree that ocamlbuild's plugin interface is awful
<Drup>
if only it was only the plugin interface
<Drup>
...
<rgrinberg1>
def`: does it discover dependencies automatically?
<Drup>
it uses ocamldep
<adrien>
you have to list files iirc
<Drup>
so, sort of
<mrvn>
rgrinberg1: does anything not run ocamldep?
<def`>
but you have to specify the link order
<def`>
(which imho is reasonable)
<adrien>
I have hopes to have oasis not need posix stuff at all for 4.03
<adrien>
i.e. it'd build on windows without cygwin nor msys
<adrien>
and one thing against OCamlMakefile: it's 7k lines
<adrien>
of makefile
<rgrinberg1>
i guess listing the files is a small price to pay..
<adrien>
it's scary
<Drup>
( adrien : but it's not auto generated !)
<rgrinberg1>
and makefiles are easy to read
<Drup>
(sorry ;))
<adrien>
Drup: doesn't matter, it's Makefile :P
<adrien>
rgrinberg1: 7k lines? not really
<adrien>
well, you can read, sure
cdidd has joined #ocaml
<adrien>
debug besirs very simple stuff?
<adrien>
besides*
<def`>
on the positive side, it's portable and easy to build
<Drup>
(I think rgrinberg1 was ironic)
<Drup>
(I hope he was)
<rgrinberg1>
well i was comparing myocamlbuild rules
<rgrinberg1>
to makefiles rules, and I'd makefiles any day
<def`>
+1 :)
<Drup>
including substitutions and stuff in makefiles ?
<adrien>
rules in the ocaml compiler sources are fairly simple
<def`>
… stick to BSD make :P
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* adrien
spanks def`
<adrien>
actually, pmake derivatives are nice
<def`>
(ok, OCamlMakefile rely on Gnu make)
<adrien>
it's a shame BSD is so fragmented though: you can't get the same support on any of them
<adrien>
maybe net and free
<adrien>
definitely not openbsd
<def`>
but, makefiles are mostly right, but scale really bad accross multiple directories
<rgrinberg1>
how does ocamlmakefile handle incremental compilation?
<adrien>
like make?
<def`>
rgrinberg1: expose the dependency graph to make, rely on make :)
<adrien>
def`: at least ocamlbuild has linear scaling
<rgrinberg1>
i see, so timestamps?
<adrien>
(wrt to y=x)
<def`>
adrien: but ocamlbuild is way too slow to be useable on project spanning multiple directories
dapz has joined #ocaml
<adrien>
:)
<Drup>
def`: the question is not really the number of directory
<Drup>
(or am I the only one who like to have several directories, even if my library is small ?)
<def`>
nevermind
<adrien>
Drup: that's because you over-engineer
<Drup>
that's probably right
lordkryss has joined #ocaml
axiles has quit [Remote host closed the connection]
Lutin` has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
dnm_ has joined #ocaml
alexey has joined #ocaml
rgrinberg1 has quit [Quit: Leaving.]
Eyyub has joined #ocaml
alexey has quit [Quit: leaving]
Lutin` has quit [Ping timeout: 260 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ocaml
rgrinberg has joined #ocaml
<BitPuffin>
is it possible to override (=) for your own custom type?
<def`>
no, you have to define your own equality function and explicitly call it
<BitPuffin>
ah, and call it something else
<rgrinberg>
which is usually best practice anyway :D
<BitPuffin>
Is there a convention for what this usually is called? :P
<Drup>
actually, you can override, but you can't surcharge ;)
<Drup>
overload*
<Drup>
(beh, french x)
<rgrinberg>
if your type has a module then just add a compare function there
<BitPuffin>
well in nimrod we have it so that you define ==, which makes != available automatically because it just rewrites a != b to: not a == b
<rgrinberg>
you can do the same with a functor
<Drup>
BitPuffin: ad hoc type classe :p
<Drup>
BitPuffin: the common name is "equal"
<BitPuffin>
ah, haven't gotten that far in real world ocaml :)
<BitPuffin>
oh okay
<BitPuffin>
I'll call it that then
<BitPuffin>
to follow convention
<Drup>
type classes are not an ocaml feature
<BitPuffin>
oh
<BitPuffin>
:P
<rgrinberg>
Drup: you can't dissapoint newcomers so early like that
<BitPuffin>
although this is actually not typeclass
Cyanure has quit [Remote host closed the connection]
<BitPuffin>
in nimrod
<BitPuffin>
we have typeclasses but they are a different thing
<Drup>
BitPuffin: I know, hence the "ad hoc"
<BitPuffin>
oh
<BitPuffin>
:P
<BitPuffin>
sorry
<BitPuffin>
and we don't have either?
<Drup>
(I don't know what "typeclasses" mean in nimrod, though)
<BitPuffin>
I'm fairly sure it's similar to what it would be in haskell or rust
<Drup>
(I'm referring to an haskell feature)
<BitPuffin>
haven't really used them
<BitPuffin>
been planning to use them though
<BitPuffin>
how come ocaml doesn't have typeclasses?
<whitequark>
not yet
<def`>
:P
<BitPuffin>
do we have a certain preference
<BitPuffin>
oh okay
<Drup>
not at all :D
<whitequark>
every time you get annoyed with lack of them, poke def`
* whitequark
grins
<BitPuffin>
hehe
<BitPuffin>
will do :)
def` is now known as def``
<Drup>
x)
* whitequark
hides
<BitPuffin>
lol
def`` is now known as def`
<BitPuffin>
although I'm more concerned with ocaml's concurrent GC getting worked on
<BitPuffin>
probably
<def`>
it is, it is
<BitPuffin>
yeah I know
<BitPuffin>
:)
<BitPuffin>
It's a complicated issue
<whitequark>
def`: will it even have a concurrent gc?
<BitPuffin>
by the way the ocaml compiler is written in ocaml right?
<whitequark>
I was under impression that a concurrent gc is massively complex and isn't considered for ocaml, esp. given non-concurrent runtime
<def`>
BitPuffin: yes
<BitPuffin>
def`: is it written in "nice" ocaml? :P
<whitequark>
such as, C code having no idea about concurrency
Kakadu has quit [Quit: Konversation terminated!]
<whitequark>
BitPuffin: it's hackable
<Drup>
whitequark: cf recent mail on the mailing list :p
<BitPuffin>
I guess what I'm asking is if there is sensible names and comments etc in the source
<BitPuffin>
in nimrod the compiler is written in nimrod but it's pretty hard to follow what's happening
<Drup>
there are comments
<Drup>
sometimes
<def`>
whitequark: there is a serious work on concurrent gc
<Drup>
not always in english.
<BitPuffin>
lol
<def`>
BitPuffin: it's the worst piece of ocaml i've ever seen
<Drup>
x)
<BitPuffin>
write ocaml comments in ocaml
<BitPuffin>
new meta
<BitPuffin>
wao
<whitequark>
def`: yeah I see
<whitequark>
(about gc)
<BitPuffin>
def`: haha, well I guess that's kind of to be expected. But as long as it's possible to understand :P
<whitequark>
actually I find the OCaml sources pretty well readable
<def`>
BitPuffin: well it depends on the part you're working on
<whitequark>
but maybe that's because I also consider LLVM perfectly clear and Ruby just moderately annoying
<Drup>
whitequark: def` is mostly living in the typechecker currently, so ...
<BitPuffin>
whitequark: I don't know if ocaml would be able to keep growing if they decided to skip the concurrent gc
<BitPuffin>
although
<BitPuffin>
I guess ruby and python does just find
<BitPuffin>
find? fine
<BitPuffin>
english and things
<Drup>
BitPuffin: just looked at nimrod typeclasses
<BitPuffin>
yeah?
<Drup>
how to twist an elegant concept to make it ulgy
<BitPuffin>
haha
<BitPuffin>
how so?
<Drup>
(well, that applies to all nimrod for me, anyway)
<BitPuffin>
well
<def`>
whitequark: the existing caml_{enter/leave}_blocking_section already give some concurrency hints
<BitPuffin>
guess it's not designed to be an elegant functional language :P
ggole has quit []
<Drup>
BitPuffin: anyway, in haskell, you can define a default implementation for a typeclass, and have circularity. if you give a partial definition of a typeclass, the compiler will figure out if it's enough and use the other definitions
<def`>
whitequark: especially since the current runtime allows multiple C threads to run in parallel if they release the lock (that is a C-code should not make assumption on the thread it is being run from)
<BitPuffin>
Drup: that's pretty cool
<Drup>
so, the Eq typeclass is defined by and (=) operator, defined as no <> and a <> operator, defined as not =
<def`>
(though if it keeps the lock it could assume being alone)
<Drup>
so you can provide = or <>, and it's enough
<BitPuffin>
Drup: do you think we'll move to that once we get typeclasses in ocaml?
<BitPuffin>
rather than the current unimplementable polymorphic =
<mrvn>
once you hve typeclases that happens automatically.
<def`>
BitPuffin: as a special case, custom blocks (external values imported in ocaml heap, using a C api) can have custom comparison functions
<Drup>
mrvn: it will need (compatibility breaking!) changes in the stdlib
<Drup>
so not happening.
<def`>
BitPuffin: but this is only provided for bindings, interoperability with foreign languages
<BitPuffin>
Drup: are you sure it would have to break compatibility?
<mrvn>
Drup: shouldn't. The existing api should just fall into type classes
<BitPuffin>
def`: gotcha
<BitPuffin>
def`: I guess the ocaml compiler will just "trust" you then?
<Drup>
it will break compat because everyone is expecting not to have a equality function
<def`>
BitPuffin: yes
<BitPuffin>
kind of like in rust if you do unsafe {} the compiler trusts you
<Drup>
not to have to define
<mrvn>
Drup: they assume they have Pervasives.=
<Drup>
mrvn: yes, which would not be available anymore
<BitPuffin>
Drup: well they wouldn't have to define it
<def`>
mrvn: if you add a predicate / typeclass constraint to (=), you change its signature
<BitPuffin>
it would default back to the old one no?
<mrvn>
which would be the core eq class with all the basic types in it
<BitPuffin>
with the circularity
<Drup>
mrvn: but not the new ADTs
<Drup>
(without a typeclass definition)
<Drup>
hence breaking compat
<mrvn>
Drup: only those things defining a special eq would get something new
<Drup>
mrvn: I think you don't understand how a typeclassed = behaves
<Drup>
there will be no polymorphic identity anymore
<def`>
identity ??
<Drup>
equality*
<def`>
ah, right.
<BitPuffin>
Drup: well couldn't you keep the polymorphic = in the typeclass as the default implementation?
<Drup>
BitPuffin: also, notes that = is naturally working on almost anything by default
<mrvn>
the compiler has to dfine an implicit type class eq that behaves like the polymorphic one
ollehar has joined #ocaml
<BitPuffin>
Drup: yes, but the key word is almost :)
<Drup>
BitPuffin: that would need a hack in the compiler
tane has quit [Quit: Verlassend]
<BitPuffin>
Drup: polymorphic = is already a hack in the compiler
Hannibal_Smith has quit [Quit: Sto andando via]
<mrvn>
everything simply is in the type class that has the polymorphic =
<BitPuffin>
yeah that's what I was thinking as well
<mrvn>
type classes can be inherited and extended, right?
<BitPuffin>
on the other hand I don't know typeclasses all too well
<Drup>
everything that you are saying is basically worse than have a module "ImplicitPervasives" with new operators
<def`>
+1
<Drup>
stop trying to stockpile hacks upon hacks
<BitPuffin>
I don't see why people are so scared of breaking backwards compatibility btw
<Drup>
that's another debate
<BitPuffin>
most backward compatibility changing stuff can be adjusted with an emacs/vim macro :P
<whitequark>
because python 2 will be supported until 2020
<whitequark>
and this is an epic failure
<def`>
give me more time… At some point it'll be worth discussing place of implicits in library :)
<Drup>
but just now that, on the stdlib and the compiler, it's not happening :)
<whitequark>
and they have 2to3 supposedly automatic conversion
<Drup>
know*
<def`>
But its nice to know your ideas, opinions, etc on the matter :)
<BitPuffin>
I guess we'll end up with CL's =, eq, eql, equal, equalp in the end :P
<Drup>
BitPuffin: not really
<whitequark>
we already have eq and equal
* BitPuffin
was kidding
<whitequark>
== and ==
<whitequark>
= and ==
<BitPuffin>
ah
<BitPuffin>
XD
<BitPuffin>
well that's no good
<Drup>
well, == doesn't really need overloading anyway
<def`>
BitPuffin: having a special case for physical equality is nice
<BitPuffin>
def`: you mean same instance?
<BitPuffin>
I think so as well
<def`>
BitPuffin: instance… I use this word with caution, but yeah, same instance.
<BitPuffin>
one for checking if something is equal, and one for checking if two things are in the same place in memory
<def`>
Yes, that's it
<def`>
structural equality vs physical equality
<BitPuffin>
all you need
<BitPuffin>
yeah
<BitPuffin>
guess that's what you say
Eyyub has quit [Ping timeout: 245 seconds]
ollehar has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
lordkryss has quit [Ping timeout: 265 seconds]
tristero has quit [Ping timeout: 240 seconds]
NoNNaN has quit [Quit: []]
<BitPuffin>
by the way
<BitPuffin>
this is not ocaml specific, but appropriate to ask here. How can you in a pure, functional way, build a file downloader that can cancel the download
<BitPuffin>
it's such an incredibly stateful thing
<def`>
downloading a file has some observable side effect :)
<BitPuffin>
yeah
<BitPuffin>
I know
<def`>
I would just use a concurrency monad
<Drup>
(+1 on the concurrency monad)
<BitPuffin>
aha
<BitPuffin>
well then
<BitPuffin>
I'm actually asking this because I'm about to implement this in C at work. And I'm trying to do it in a fairly pure style because C has a tendency to get out of hand :P
<Drup>
I doubt there is a monadic concurrency library in C x)
<whitequark>
I'm sure there is, C ecosystem is full of insane stuff
<BitPuffin>
When I was like "I don't like node, javascript is a messy and unreliable language" or something like that, the guy was like "Yeah I know, but the thing I like about node is that it's event based, finally we have event based! :D"
<BitPuffin>
and internally I was like thanks marketing guy xD
<Drup>
BitPuffin: that was going to be my second point, the awesome asynchronous concurency support.
<def`>
whitequark: excellent, thanks
<whitequark>
def`: watch along, it gets better
<BitPuffin>
"something that you can’t do with any other language."
<BitPuffin>
hahahahaha
<BitPuffin>
I love this
<whitequark>
def`: some context (I don't know whether the video author knew it)
<whitequark>
I had an IRC log where @raggi actually convinced some guy to use sharded /dev/null for his data
<whitequark>
I'm *not* kidding
racycle has quit [Quit: ZZZzzz…]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark>
and another thing, there was recently a funny bitcoin hack, the exchange used... you guessed it, mongodb, and without transactions
<whitequark>
with exactly the results you would expect from such setup
<whitequark>
(though it's nowhere near "the collapse of the world's economy")
madroach has quit [Ping timeout: 252 seconds]
<def`>
this reminds me of the "bitcoins marketplaces" powered by php & mongodb
<def`>
oops
<BitPuffin>
"No wonder people love Node.js. It gives you the same performance as lightweight threads but with the clarity and usability of x86 assembly." ahahah
<def`>
yeah, I saw your messages after, sry :D
madroach has joined #ocaml
watermind has quit [Ping timeout: 260 seconds]
<Drup>
whitequark: I second episode is even better x)
<Drup>
the*
dapz has joined #ocaml
Lutin` has joined #ocaml
<BitPuffin>
whitequark: we also use mongodb
<whitequark>
please tell me where you work
<BitPuffin>
why lol XD
<whitequark>
(so I could add it to a list of companies whose products I will never touch)
<BitPuffin>
well, you could actually make a difference probably, I can't really say anything and be taken seriously because I don't have years of experience on my resume