companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Haudegen has quit [Ping timeout: 240 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
mxns has joined #ocaml
Jesin has quit [Remote host closed the connection]
Jesin has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
zebrag has quit [Read error: Connection reset by peer]
zebrag has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
borne has quit [Ping timeout: 264 seconds]
olle has quit [Ping timeout: 240 seconds]
runawayfive has quit [Ping timeout: 260 seconds]
remexre has quit [Ping timeout: 240 seconds]
remexre has joined #ocaml
runawayfive has joined #ocaml
olle has joined #ocaml
mxns has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
mxns has quit [Ping timeout: 260 seconds]
sleepydog has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
steenuil has quit [Read error: Connection reset by peer]
mxns has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
kini has quit [Ping timeout: 264 seconds]
krkini has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
ome has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
smazga has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
smazga has quit [Ping timeout: 256 seconds]
krkini has quit [Remote host closed the connection]
kini has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
smazga has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
sagax has quit [Quit: Konversation terminated!]
mfp has quit [Ping timeout: 272 seconds]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
mxns has quit [Ping timeout: 265 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
dborisog has joined #ocaml
smazga has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
mxns has quit [Ping timeout: 272 seconds]
kini has quit [Remote host closed the connection]
kini has joined #ocaml
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
narimiran has joined #ocaml
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
smazga has joined #ocaml
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
smazga has quit [Ping timeout: 260 seconds]
decentpenguin has quit [Read error: Connection reset by peer]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
decentpenguin has joined #ocaml
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
smazga has joined #ocaml
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
smazga has quit [Ping timeout: 260 seconds]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
jlr has quit [Disconnected by services]
jlr has joined #ocaml
olle has quit [Read error: Connection reset by peer]
ome has quit [Quit: Connection closed for inactivity]
amiloradovsky has joined #ocaml
Serpent7776 has joined #ocaml
amiloradovsky has quit [Ping timeout: 260 seconds]
jlr has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
mro_name has joined #ocaml
shawnw has joined #ocaml
borne has joined #ocaml
mro_name has quit [Remote host closed the connection]
smazga has joined #ocaml
olle has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
mro_name has joined #ocaml
bartholin has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
sagax has joined #ocaml
noonien5 has joined #ocaml
noonien has quit [Ping timeout: 264 seconds]
noonien5 is now known as noonien
ArthurStrong has joined #ocaml
vicfred has quit [Quit: Leaving]
smazga has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
noonien9 has joined #ocaml
noonien has quit [Ping timeout: 265 seconds]
noonien9 is now known as noonien
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
xenu has quit [Read error: Connection reset by peer]
xenu has joined #ocaml
smazga has joined #ocaml
mbuf has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]
smazga has joined #ocaml
mro_name has quit [Remote host closed the connection]
cantstanya has quit [Remote host closed the connection]
smazga has quit [Ping timeout: 272 seconds]
cantstanya has joined #ocaml
mro_name has joined #ocaml
mro_name has quit [Client Quit]
steenuil has joined #ocaml
<d_bot> <dj charlie> any way to easily print the sexp form of a gadt?
ArthurStrong has quit [Ping timeout: 265 seconds]
ArthurStrong has joined #ocaml
smazga has joined #ocaml
mfp has joined #ocaml
<d_bot> <octachron> You can start with the code generated by a deriver and fix it.
borne has quit [Ping timeout: 264 seconds]
borne has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
<d_bot> <dj charlie> 🤔 hmm
<d_bot> <dj charlie> thanks
Haudegen has quit [Quit: Bin weg.]
mbuf has quit [Ping timeout: 265 seconds]
osa1 has quit [Quit: osa1]
osa1 has joined #ocaml
osa1 has quit [Quit: osa1]
osa1 has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
shawnw has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
<olle> companion_cube: going back to value types and GC references, would &val be safe if it's read-only? I have a feeling it would. xD
<olle> or wait...
<olle> read-only, does that include to not be part of collections etc?
<olle> maybe "not owned" is a better description than read-only
<olle> wait, borrow
zebrag has joined #ocaml
<olle> Which is exactly how Rust works...
<companion_cube> 🤷
<olle> mm
<companion_cube> you'll have a hard time finding a system that fits the same bill as rust, while being simpler
<olle> NO
<olle> I mean
<olle> Yes, it won't fit _exactly_ the same bill.
<companion_cube> yeah, you'll have more restrictions
<olle> It depends a little bit which one is easier - opt-in GC or opt-out GC?
<olle> companion_cube: yeah
<olle> Rust and C++ is some kind of "manual GC", with smart pointers etc etc
<olle> are*
<companion_cube> look at nim, what else can I say
<companion_cube> or recent stuff like Perceus
<companion_cube> or http://strlen.com/lobster/
<olle> companion_cube: no, you can't mix two strategies in one "module", I think
<olle> in nim
<companion_cube> no, but the trend is to have Arc/Orc, with opt-in move semantics, and there are value types too
<olle> oh cool, lobster is a rust spinoff?
<companion_cube> no
<olle> because rust use crabs ^^
<companion_cube> it's a weird language but apparently the refcounting scheme is interesting
<olle> alright, good tip, thanks!
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
<olle> companion_cube: is that a research language or just one man's love child?
ArthurStrong has quit [Quit: leaving]
<companion_cube> one man's thing I think
<olle> alright
<olle> great, will read later +1
dinosaure has joined #ocaml
<olle> Oh shit, koka has a version 2 now, that's awesome
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
<olle> but you still can't ENFORCE stack allocation, goddamnit
tane has joined #ocaml
<Armael> it's still not clear to me why you want stack allocation
<olle> Armael: speed? pretty clear to me :)
<olle> to be more precise: predictable speed
<companion_cube> even just using a native language with decent memory management will be much faster than php
<companion_cube> just saying
<companion_cube> (but yes, koka 2 seems absolutely amazing)
<Drup> olle: a generational gc like ocaml's already provide very fast allocations of short-lived objects in the minor heap, stack allocations don't provide much, as was already explained on discuss.
<companion_cube> up to a point, still, cause if you allocate too many small objects some of them will live to reach the major heap
<Drup> yeah, but would you be able to put so many objects on the stack freely ? :p
<companion_cube> probably, a lot of them would be shorter lived
<companion_cube> like intermediate tuples and options
<flux> I solved one program's real time problems (drawing screen 60 fps) by increasing GC collection size. I think this tells me that if your memory usage pattern has a certain form, then a stack like allocator can beat the GC handily, even if allocating the memory is fast.
<olle> Drup: yes, but language benchmark games says otherwise. I want to compare n-body benchmark with binary tree benchmark in one language with opt-in GC (or opt-out GC)
<companion_cube> as the name indicates, it's a game
<olle> NO
<olle> ;)
<companion_cube> it shows max theoretical performance, not actual performance in a real program
<companion_cube> e.g. ATS is super fast in it
<companion_cube> but in practice it's not because no one can write a program at all
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
<olle> companion_cube: of course
smazga has joined #ocaml
<olle> but it does show that scripting languages are slower than compiled languages, for example
<Drup> not all that much
<Drup> it shows you can write C-like in many languages.
<Drup> oh rather, it shows this extends in which you can write C programs in different languages
<companion_cube> yes all that much
<companion_cube> unless you mean by using C extensions, of course
<sleepydog> for silly benchmarking games i'm pretty sure you can do some unreasonable things in ocaml to avoid heap allocations
waleee-cl has joined #ocaml
<Drup> you can, and those are mostly done in the benchmark game implementations
<sleepydog> the ASM.ocaml blog post from a few years ago comes to mind
<dinosaure> you should take a look on the decompress's article: https://tarides.com/blog/2019-09-13-decompress-experiences-with-ocaml-optimization
<dinosaure> if you are aware about performance
madroach has quit [Ping timeout: 256 seconds]
<companion_cube> honestly my takeaway from optimizing OCaml is: don't do it too much
<companion_cube> you don't have many tools for it, just use good algorithms and pay attention to not use too much memory where it matters
<companion_cube> unrolling and stuff only works in flambda, which is not even really practical as a main switch right now
<olle> Drup: The binary tree benchmark is designed to hit GC
<olle> Most of the others are numerical calc, I think
<olle> So maybe it's mostly about how much you can optimize a tight loop in language X ;)
<olle> which DOES matter in some domains
<companion_cube> sure, but not representative of problems where you don't have just one single super hot loop
<companion_cube> which is most problems, afaict
<olle> hm
<olle> yes, benchmark design is hard :d
<companion_cube> and not that useful anyway
<companion_cube> like, OCaml is reasonably fast, it just can't be as fast as C on some problems
<companion_cube> (in which case it's probably better to use C, or rust)
<sleepydog> companion_cube: why is flambda impractical right now?
<companion_cube> some packages won't compile with it
<companion_cube> it can take a lot of RAM to compile some stuff
<olle> I think it's useful to know the performance of languages, nevermind it being approx
<olle> maybe it's nerd macho culture
<theblatte> flambda has been my main switch for years, very practical :)
<companion_cube> I used to, theblatte, and then I tried to install dose
<companion_cube> (which sadly is in the deps of opam-publish)
<Drup> I still have no idea what's the issue is with dose, why is it the only package that explodes on flambda ?
<companion_cube> I have no idea either
<companion_cube> it may not be the only one, but it's the one that breaks the deal for me
tryte has quit [Remote host closed the connection]
tryte has joined #ocaml
<d_bot> <EduardoRFS> Obj.magic stuff?
<Drup> unlikely
<d_bot> <EduardoRFS> why can't we do this on normal OCaml?
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> let show (module S: Show) v = S.show v
<d_bot> <EduardoRFS> ```
<companion_cube> you probably need `(module S : show with type t = 'a) (v:'a) = …` ?
<companion_cube> sth like that
<d_bot> <EduardoRFS> yeah I know, I'm just wondering why doesn't OCaml can infer this?
<d_bot> <EduardoRFS> Same, on why can't we do?
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> val show: (module S: Show) -> S.t -> string
<d_bot> <EduardoRFS> ```
<d_bot> <EduardoRFS> probably the first one isn't possible, because this /\ isn't possible
<Drup> yes, that's more or less the reason
<Drup> it's something we should lift in the short-medium-ish term
<Drup> (see the "modular explicit" PR)
<d_bot> <EduardoRFS> full discussion, why isn't FCM enough to satisfy implicits?
<companion_cube> what is FCM -_-
<Drup> Fuli Culi Madness
<Drup> (ah! that's it, I'm rewatching FLCL this week)
<dash> haha
<d_bot> <EduardoRFS> first-class modules, no, I don't know where I saw someone saying FC
<companion_cube> ah I see.
<Drup> (also Football Club of Manchester)
olle has quit [Ping timeout: 265 seconds]
<Drup> (or Madrid, etc)
<d_bot> <EduardoRFS> btw explicits is pretty cool
borne has quit [Ping timeout: 244 seconds]
<d_bot> <Kakadu> Merlin experts, please, help!
chripell_ has quit [Quit: ZNC 1.8.2+deb1 - https://znc.in]
chripell has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
hnOsmium0001 has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
Jesin has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
smazga has joined #ocaml
bartholin has quit [Quit: Leaving]
mbuf has joined #ocaml
Haudegen has joined #ocaml
landonf has quit [Quit: ZNC - http://znc.sourceforge.net]
landonf has joined #ocaml
jnavila has joined #ocaml
shmibs has quit [Quit: leaving =o]
shmibs has joined #ocaml
mbuf has quit [Quit: Leaving]
amiloradovsky has joined #ocaml
Jesin has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
jnavila has quit [Quit: Konversation terminated!]
smazga has joined #ocaml
Tuplanolla has joined #ocaml
vicfred has joined #ocaml
jnavila has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
borne has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
jnavila has quit [Client Quit]
jnavila has joined #ocaml
smazga has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
smazga has quit [Ping timeout: 265 seconds]
mxns has joined #ocaml
jnavila has quit [Remote host closed the connection]
vicfred has quit [Read error: Connection reset by peer]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
l1x has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
smazga has joined #ocaml
jnavila has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
dborisog has quit [Ping timeout: 264 seconds]
narimiran has quit [Ping timeout: 256 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
steenuil has quit [Read error: Connection reset by peer]
steenuil has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
smerdyakov has left #ocaml ["The Lounge"]
Serpent7776 has quit [Quit: leaving]
jnavila has quit [Quit: Konversation terminated!]
vicfred has joined #ocaml
motherfsck has joined #ocaml
borne has quit [Ping timeout: 264 seconds]
amiloradovsky has quit [Remote host closed the connection]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
borne has joined #ocaml
tane has quit [Quit: Leaving]
mxns has quit [Ping timeout: 246 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml