adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
mengu has quit [Quit: Leaving...]
pierpal has joined #ocaml
mfp has joined #ocaml
Haudegen has quit [Remote host closed the connection]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 244 seconds]
r_rios has joined #ocaml
<r_rios> Hello, all. I'm trying to build opam, but an error occurs during make lib-ext when trying to build extlib: https://paste.ofcode.org/dUiRkKfdH4iEFgSY4G2dBY
<r_rios> OCaml v4.07.0, opam 1.2.2
jao has joined #ocaml
tormen has joined #ocaml
JimmyRcom has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
Raccoon has joined #ocaml
Raccoon has quit [Remote host closed the connection]
JimmyRcom has quit [Quit: Leaving]
mfp has quit [Ping timeout: 272 seconds]
ensyde has joined #ocaml
ensyde has quit [Ping timeout: 272 seconds]
caltelt has joined #ocaml
clockish has quit [Ping timeout: 256 seconds]
Guest24189 has joined #ocaml
clockish has joined #ocaml
Guest24189 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
jbrown has quit [Ping timeout: 260 seconds]
Maxdaman1us has joined #ocaml
Maxdamantus has quit [Ping timeout: 272 seconds]
Maxdaman1us has quit [Ping timeout: 240 seconds]
Maxdamantus has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
Maxdamantus has quit [Ping timeout: 256 seconds]
r_rios_ has joined #ocaml
r_rios_ has quit [Changing host]
r_rios_ has joined #ocaml
r_rios has quit [Ping timeout: 256 seconds]
Maxdamantus has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
manas has joined #ocaml
Fare has joined #ocaml
manas has left #ocaml [#ocaml]
manas has joined #ocaml
wize has quit [Ping timeout: 256 seconds]
Fare has quit [Ping timeout: 240 seconds]
r_rios_ has quit [Ping timeout: 256 seconds]
manas_ has joined #ocaml
manas has quit [Read error: Connection reset by peer]
lopex has quit [Quit: Connection closed for inactivity]
Fare has joined #ocaml
manas_ has quit [Remote host closed the connection]
manas has joined #ocaml
<xvilka> hi
<xvilka> is there any way to convert Bigarray to Bytes without copying?
<companion_cube> nope
shinnya has quit [Ping timeout: 240 seconds]
noitakomentaja has joined #ocaml
_whitelogger has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
freyr69 has joined #ocaml
bitch0 has joined #ocaml
circle has joined #ocaml
circle has quit [Remote host closed the connection]
bitch0 has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
caltelt has quit [Ping timeout: 272 seconds]
darkmagic has joined #ocaml
kloeri4 has joined #ocaml
darkmagic has quit [Killed (Sigyn (Spam is off topic on freenode.))]
kloeri4 has quit [Remote host closed the connection]
Texou27 has joined #ocaml
Texou27 has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
manas has quit [Remote host closed the connection]
w3stside18 has joined #ocaml
manas has joined #ocaml
TBloemink28 has joined #ocaml
w3stside18 has quit [Ping timeout: 260 seconds]
TBloemink28 has quit [Read error: Connection reset by peer]
Xe24 has joined #ocaml
EvanR4 has joined #ocaml
manas has quit [Remote host closed the connection]
Xe24 has quit [Remote host closed the connection]
connection has joined #ocaml
EvanR4 has quit [Remote host closed the connection]
noitakomentaja has quit [Ping timeout: 250 seconds]
connection has quit [Read error: Connection reset by peer]
manas has joined #ocaml
aidalgol has quit [Remote host closed the connection]
aidalgol has joined #ocaml
manas has quit [Remote host closed the connection]
lannister has joined #ocaml
lannister has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
manas has joined #ocaml
manas has quit [Remote host closed the connection]
manas has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
manas has quit [Remote host closed the connection]
rs-afk has joined #ocaml
rs-afk has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Fare has joined #ocaml
manas has joined #ocaml
connection has joined #ocaml
connection has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
picolino has quit [Remote host closed the connection]
gareppa has joined #ocaml
Fare has quit [Ping timeout: 260 seconds]
okdas has joined #ocaml
okdas has quit [Killed (Sigyn (Spam is off topic on freenode.))]
BitPuffin has joined #ocaml
Alucard4200 has joined #ocaml
Alucard4200 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
mfp has joined #ocaml
manas has quit [Remote host closed the connection]
ollehar has joined #ocaml
ollehar has left #ocaml [#ocaml]
ollehar has joined #ocaml
<ollehar> why didn't someone invent something to replace FPU or floating-point arithmetic? since FPA is not exact.
<ollehar> e.g. 0.1 + 0.2 != 0.3 in *all* programming languages D:
<ollehar> so sad
<dmbaturin> ollehar: You mean fixed point arithmetic? It was invented decades ago. :)
<dmbaturin> COBOL supports it natively.
<ollehar> dmbaturin: but fixed point can't express big values, right?
<ollehar> SQL has DECIMAL data type.
<dmbaturin> Of course it can. Depends on implementation.
<ollehar> dmbaturin: ok
<dmbaturin> It's basically a tuple of two integers anyway.
<ollehar> dmbaturin: yes, but that has lower range than floating point.
<ollehar> you need 10^x too express big values.
<dmbaturin> ollehar: There's also interval arithmetic for scientific rather than financial calculations, that keeps track of error accumulation.
<ollehar> ok
<octachron> ollehar, you don't want exact arithmetic in most situation, since it excludes all irrational functions
host has joined #ocaml
<ollehar> octachron: not true. floating point is also only an approx of irrational numbers.
host has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<octachron> then it is a question of compromise between accuracy and computation speed, and float are a somewhat decent if unintuitive compromise
<ollehar> but why no hardware support for fixed point arith?
<ollehar> the plot thickens!
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
gareppa has quit [Quit: Leaving]
Spaulding has joined #ocaml
Spaulding has quit [Killed (Sigyn (Spam is off topic on freenode.))]
bartholin has joined #ocaml
YuGiOhJCJ22 has joined #ocaml
krushia has joined #ocaml
krushia has quit [Read error: Connection reset by peer]
YuGiOhJCJ22 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
jnavila has joined #ocaml
manas has joined #ocaml
shinnya has joined #ocaml
noitakomentaja has joined #ocaml
manas has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 240 seconds]
manas has joined #ocaml
jnavila has joined #ocaml
pierpal has quit [Remote host closed the connection]
bezirg has joined #ocaml
Thorne7 has joined #ocaml
Thorne7 has quit [Remote host closed the connection]
<freyr69> ollehar: because fixed point is as bad as float, but also not standardized?
<freyr69> and in really crucial app you would like to use well-defined rationals anyway
klx``20 has joined #ocaml
nero22 has joined #ocaml
nero22 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
klx``20 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
BuildTheRobots27 has joined #ocaml
BWBellairs12 has joined #ocaml
BuildTheRobots27 has quit [Remote host closed the connection]
BWBellairs12 has quit [Remote host closed the connection]
nitrix29 has joined #ocaml
nitrix29 has quit [Remote host closed the connection]
<flux[m]> DSPs do have hardware fixed point support
node9 has joined #ocaml
bezirg has quit [Remote host closed the connection]
bezirg has joined #ocaml
node9 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
APLU27 has joined #ocaml
<flux[m]> But fixed point is basically the same as plain integer ops, right? All you need is support for 32x32->64 for multiplication, right?
APLU27 has quit [Remote host closed the connection]
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
bezirg has quit [Client Quit]
bezirg has joined #ocaml
Haudegen has quit [Remote host closed the connection]
matthiaskrgr5 has joined #ocaml
<ollehar> freyr69: I want hw support for rationals :|
<ollehar> flux[m]: DSP?
matthiaskrgr5 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<ollehar> rationals with exponents, like 1/10^x or 10^x/y
<flux[m]> digital signal processors; specialized "CPUs" that probably play AAC files on your mobile phone :)
<Drup> freyr69: aren't there standards for fixed point arith ? I'm pretty sure there is an IEEE one
<freyr69> ollehar: you have addition with carry, what else do you want?
shinnya has quit [Ping timeout: 268 seconds]
<freyr69> Drup: I've never seen such a thing, which precision does it have?
<ollehar> flux[m]: ok, cool.
mengu has joined #ocaml
sud09 has joined #ocaml
sud09 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
bezirg has quit [Ping timeout: 244 seconds]
noitakomentaja has quit [Ping timeout: 250 seconds]
<xvilka> How to allocate zero-filled structure with Ctypes? I don't know what to set as the second argument to "Ctypes.allocate mystructtype ?"
lopex has joined #ocaml
Haudegen has joined #ocaml
francisl has joined #ocaml
bezirg has joined #ocaml
steev1 has joined #ocaml
steev1 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
Aleszandro has joined #ocaml
Aleszandro has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
Denommus has joined #ocaml
Freechicks has quit [Remote host closed the connection]
jbrown has joined #ocaml
spew has joined #ocaml
ghoti15 has joined #ocaml
johnelse has quit [Read error: No route to host]
manas has quit [Remote host closed the connection]
manas has joined #ocaml
ghoti15 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
FreeBirdLjj has joined #ocaml
johnelse has joined #ocaml
bezirg has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 260 seconds]
neatonk has joined #ocaml
Fare has joined #ocaml
freyr69 has quit [Remote host closed the connection]
mengu has quit [Quit: Leaving...]
BitPuffin has quit [Ping timeout: 272 seconds]
neatonk has quit [Ping timeout: 260 seconds]
Nothing4You2 has joined #ocaml
Nothing4You2 has quit [Remote host closed the connection]
picolino has joined #ocaml
node9 has joined #ocaml
<Fare> Is there a usable multicore ocaml?
<companion_cube> no.
node9 has quit [Remote host closed the connection]
<dmbaturin> Their project is quite a bit more ambitious than "just" a multicore GC.
<Fare> what more is needed?
<companion_cube> that it works? that it's merged into OCaml?
<companion_cube> I mean, there's a switch, maybe, if you want to try it not in prod
<Fare> What needs to work, beside the GC?
<companion_cube> the effect system, I think
<Fare> Didn't Damien Doligez write a concurrent GC for OCaml tens of years ago?
<companion_cube> compatibility with existing C APIs, too, I suppose
<dmbaturin> I suppose the effect system may be worth the wait.
<dmbaturin> Fare: Got a link to the paper?
<Fare> it was his phd thesis
<companion_cube> it was for caml-light, I think, OCaml didn't exist yet
neatonk has joined #ocaml
<Fare> did that make techniques inapplicable to modern OCaml?
<companion_cube> maybe it's too naive/slow by modern standards, who knows
<dmbaturin> Does the multicore runtime have a working concurrent GC already by the way?
<dmbaturin> I haven't tried it, luckily I didn't have a pressing need for it yet.
superherointj has joined #ocaml
wize has joined #ocaml
superherointj has quit [Quit: Leaving]
johnelse has quit [Read error: No route to host]
johnelse has joined #ocaml
johnelse has quit [Ping timeout: 244 seconds]
johnelse has joined #ocaml
manas has quit [Remote host closed the connection]
manas has joined #ocaml
johnelse has quit [Read error: No route to host]
johnelse has joined #ocaml
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
<discord> <Perry> The effects system is in certain ways almost more interesting than the multicore part.
steenuil_ has joined #ocaml
<discord> <Bluddy> It's really orthogonal
steenuil has quit [Ping timeout: 244 seconds]
steenuil has joined #ocaml
steenuil_ has quit [Ping timeout: 240 seconds]
zolk3ri has quit [Quit: leaving]
jnavila has joined #ocaml
neatonk has quit [Ping timeout: 265 seconds]
neatonk has joined #ocaml
dedgrant has quit [Read error: Connection reset by peer]
dedgrant has joined #ocaml
armyriad11 has joined #ocaml
Guest91868 has joined #ocaml
armyriad11 has quit [Remote host closed the connection]
Guest91868 has quit [Remote host closed the connection]
neatonk has quit [Ping timeout: 260 seconds]
neatonk has joined #ocaml
Guest23877 has joined #ocaml
Guest95115 has joined #ocaml
Guest23877 has quit [Remote host closed the connection]
Guest95115 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
Fare has quit [Ping timeout: 272 seconds]
Fare has joined #ocaml
psnively has quit [Quit: Textual IRC Client: www.textualapp.com]
francisl has quit [Quit: francisl]
FreeBirdLjj has quit [Remote host closed the connection]
furiousDingo22 has joined #ocaml
furiousDingo22 has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
wize has quit [Ping timeout: 256 seconds]
Whooa2112 has joined #ocaml
Whooa2112 has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
cryptocat1094 has joined #ocaml
ChristopheT has joined #ocaml
talisein23 has joined #ocaml
grossing11 has joined #ocaml
grossing11 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
ChristopheT has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
talisein23 has quit [Remote host closed the connection]
ygrek has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
zolk3ri has joined #ocaml
RustyJ0 has joined #ocaml
RustyJ0 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
neatonk has quit [Ping timeout: 256 seconds]
zolk3ri has quit [Quit: leaving]
zolk3ri has joined #ocaml
shinnya has joined #ocaml
host has joined #ocaml
host has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
pierpal has joined #ocaml
<loli> ollehar in CL "(= (+ 0.2 0.1) 0.3)" is True
<companion_cube> it doesn't respect the float standard? ;s
<loli> CL is a bit weird
<loli> it seems to be implementation detail
<loli> " There are four kinds of floats in Common Lisp, which provide increasing precision (implementation-dependent). By default, implementations assume short floats, which have limited precision. To input a more precise float, other textual notations must be used, e.g., "1.0d0" for a double-float."
jack5638 has quit [Ping timeout: 240 seconds]
<Drup> I'm questioning the sanity of whoever wrote that specification
<loli> CL was designed by committee, to appease most of the major lisp companies, guy steele had a hand in helping it
<loli> many people came out thinking CL wasn't a real lisp
<ZirconiumX> I thought it would do rational arithmetic
<loli> you can make it do rational arithmetic, but I"ve poisoned the numbers with a .
Jesin has quit [Remote host closed the connection]
jack5638 has joined #ocaml
CC665 has joined #ocaml
kakadu has joined #ocaml
manas has quit [Read error: Connection reset by peer]
manas has joined #ocaml
CC665 has quit [Ping timeout: 256 seconds]
manas has quit [Remote host closed the connection]
manas has joined #ocaml
neatonk has joined #ocaml
cryptocat1094 has quit [Quit: later]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
TC01 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pierpa has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
Guest85232 has quit []
Haudegen has joined #ocaml
gre has joined #ocaml
<discord> <Perry> loli is not accurately reflecting Common Lisp. The CL floating point stuff (and numeric tower in general) is very well thought out.
<discord> <Perry> Those sections of "Common Lisp: The Language" are great reading.
gre has left #ocaml [#ocaml]
shinnya has quit [Ping timeout: 240 seconds]
<loli> I should read those sections, the v2 version is always fun to jump around and learn more about
<Fare> you can also (let ((*read-default-float-format* 'double-float)) (read-from-string "1.0"))
<Fare> dynamic scoping FTW!
<Fare> I really miss it in OCaml.
<companion_cube> OCaml is closer to lambda calculus, it seems :]
<discord> <Perry> Dynamic scoping of that sort makes the type system a horrible piggy mess.
<discord> <Perry> Suddenly you've lost referential transparency left and right.
<loli> After toying with OCaml for a few weeks, it reminds me a lot of my CL code but nicer in a few ways
<companion_cube> is it even typeable?
<loli> dynamic variables are annoying with laziness as well
<Fare> OCaml is closer to making everything ugly by forcing you to use monads instead of suitable effects.
<discord> <Perry> companion_cube: with sufficient pain anything is typeable, right?
<companion_cube> no one forces you to use monads…
<companion_cube> (\x. x x)(\x. x x) is hard to type :D
<Fare> next, everyone will be writing code in John Tromp's Binary Lambda Calculus.
<discord> <Perry> Fare: there's mutability, and soon even an effect system.
<discord> <Perry> companion_cube: "adds confusion when appended to its quotation" adds confusion when appended to its quotation.
<Fare> On the one hand, I really miss macros, dynamic scoping, dynamic typing, etc.
<Fare> On the other hand, the type system makes large-scale refactoring tractable.
<discord> <Perry> There is syntactic extension in OCaml, it's just less convenient.
<discord> <Perry> dynamic scoping is, I think, an antipattern.
<companion_cube> the absence of dynamic scoping probably also helps a lot with refactoring
<discord> <Perry> That said, I do prefer lisp's "feel"
<discord> <Perry> companion_cube: dynamic scope is a nightmare for everything, including refactoring.
<Fare> dynamic scoping is an antipattern when used for the things it's not meant for, and a pattern when used for the things it's meant for.
<discord> <Perry> companion_cube: it existed at first because people didn't know how to efficiently implement lexical scope. then later, it was kept around because people were used to doing certain horrible tricks.
<discord> <Perry> I think the only proper use of dynamic scope is catching exceptions. I can't really think of others that I care to touch.
<companion_cube> well it only exists in lisp, nowadays, doesn't it?
<Fare> Give me Lisp special variables over any of the nonsense you have in other languages for context variable, thread variables, dependency injection, etc.
<companion_cube> in particular elisp and CL, but not scheme, right?
<discord> <Perry> companion_cube: only in common lisp and elisp.
<discord> <Perry> companion_cube: scheme etc. have no dynamic scope.
<companion_cube> yeah that's what I thought
<companion_cube> oh and bash
<Fare> All good schemes have "parameters" which provide dynamic scoping, though with clumsy syntax.
<companion_cube> is it in the standard?¡
<Fare> and CL uses lexical scoping by default, as it should.
<discord> <Perry> the thing in scheme that lets you emulate the same stuff is call/cc but it turns out you don't even want call/cc...
<Fare> companion_cube, which "standard"?
<companion_cube> hmmm scheme has a standard, right? R*S* for some values of *
<discord> <Perry> CL's standard allows the use of dynamic variables.
<discord> <Perry> Scheme's does not have such a thing.
<companion_cube> right
<discord> <Perry> I don't know what Fare means by "parameters"
<Fare> Racket, Gambit, Chez, have parameters.
<discord> <Perry> Fare: you know how long I've been using lisp. I miss a lot of it, and really wish for a combination of ocaml's type system and scheme's syntax, but mostly I think dynamic scope is a lose.
<discord> <Perry> What are parameters? Perhaps I've never read that part of the Racket manual.
<Fare> http://docs.racket-lang.org/reference/parameters.html?q=parameterize#%28form._%28%28lib._racket%2Fprivate%2Fmore-scheme..rkt%29._parameterize%29%29
<Fare> I believe Chez introduced them first. Oleg (I think) has a paper on how to do them properly with delimited continuations.
<discord> <Perry> Delimited continuations seem to generally be a win over the full call/cc.
<Fare> They are, hands down.
<Fare> I'm sad that Gambit doesn't seem to do them 100% properly.
<Fare> (but maybe I underestimate Gambit)
<discord> <Perry> This documentation seems to mostly be using this for thread local storage and for exceptions.
<discord> <Perry> the chez compiler is now open source? or is it the gambit one? I can't remember.
<discord> <Perry> which one did cisco buy by accident?
<Fare> I use them for all kinds of things. Database context. HTML vs TeX output context. Graphic context. Logging context. Whatever "dependency" other idiots have to "inject" like heroin.
<Fare> Cisco bought and eventually opensourced Chez.
<loli> racket has dynamic scoping via parameters
<loli> oh Fare you've already linked it, my bad
<companion_cube> sounds like passing a lot of parameters implicitly :s
<discord> <Perry> companion_cube: sort of. Exceptions are a case of dynamic scope, even in OCaml. when you throw, things are caught dynamically and not lexically.
alphaseg14 has joined #ocaml
<Fare> I implemented dynamic scoping for Java. Needless to say, my colleagues didn't want to touch it, even though it would have saved their asses. No, much better to add ten extra parameters to each and every single function... and then cry when you have to wrap around each and every function in every library you use that fails to pass them around.
<companion_cube> Perry: although it only goes down, not up
<discord> <Perry> and thread local storage is always sorta kinda dynamic scope for obvious reasons.
<Fare> Or then again, you could use a State Monad Transformer.
<discord> <Perry> indeed, it only goes down, not up.
<companion_cube> or just pass a context record by hand, which is what I tend to do
<discord> <Perry> That's why it doesn't suck.
<Fare> One State Monad Transformer for each and every dynamically scoped variable.
<companion_cube> lol
alphaseg14 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
<discord> <Perry> Fare: why not just use a mutable record?
<discord> <Perry> and pass it?
<discord> <Perry> That's just fine.
<discord> <Perry> That's why OCaml is not Haskell, purity is sometimes a pain in the neck.
<companion_cube> because then you wouldn't have to stack 20 layers of monads
<discord> <Perry> Ah, yes.
<Fare> is your mutable record automatically restored at the end of every scope, while being properly private to each thread?
<loli> in Haskell, one would just use 1 monad transfer at least MTL style (idk about effects style however)
<loli> 1 state monad*
<discord> <Perry> Fare: it can easily be.
<companion_cube> well it's quite rare that I need to modify something only locally
<companion_cube> but when I do, I use something like `with_foo` or `finally` or whatever
<companion_cube> (or you can make the record immutable, of course)
<Fare> Yes, you could use a single monad transformer plus some multiplexing mechanism for your dynamic variables to share the same monad. Good luck with that in a statically typed way, though (in Java, I cheated with some dynamic casts)
<companion_cube> I definitely don't want this state to carry arbitrary stuff *anyway*
<companion_cube> I want to know what's in it …
<Fare> (Java is an untyped language anyway: all the disagreements of typing with none of the warranties)
<Fare> companion_cube, one man's state is another man's implicit infrastructure.
Trashlord6 has joined #ocaml
<Fare> "Oh, I need to monadicize all my code to add function tracing? oops."
Trashlord6 has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
<companion_cube> or, just add one field to the state parameter?
<loli> well if you'are already in the state monad, your code would already be monadic
<loli> just add it to type signature
<Fare> good luck allowing decentralized, incremental, extension to "the" state parameter, in a well-typed way.
<companion_cube> assuming I would want to do that, yeah
<Fare> Idiots who preach pure functional programming for toys that fit in 100 lines, with techniques that definitely won't scale to a million line program.
<companion_cube> Fare: please don't insult people
<Fare> Not insulting anyone in particular.
<companion_cube> besides, we're on #ocaml, no one preaches "pure functional programming" here
<Fare> But yes, there are plenty such idiots.
<companion_cube> (otoh I often wonder what justifies having 1M lines of code in one single program… wow)
<Fare> Overall, it's still a refresher compared to the idiots from 20 years ago who preached "Object-Oriented Programming" full of murky mutually contradictory non-concepts.
<Fare> companion_cube, ever written an airline reservation system?
<discord> <Perry> Hey, OO programming in Smalltalk was great fun. It's just grotesque in things like C++.
<Fare> I made up the term 'object-oriented', and I can tell you I didn't have C++ in mind. — Alan Kay, OOPSLA '97
<discord> <Perry> And Common Lisp, your favorite language Faré, has objects. You object to them?
<companion_cube> nope, and I don't intend to
<companion_cube> but surely you don't write 1M lines in one project? you could split stuff into libraries?
<discord> <Perry> Alan Kay's opinion on C++ is beautifully correct. 😃
<discord> <Perry> Faré wrote a big airline data system in Common Lisp. With others.
<Fare> Perry, I didn't like the fact that they were used in a mutable way, so I wrote my own immutable object library. It was VERY nice. Read the paper: https://github.com/fare/lil-ilc2012 "LIL: CLOS reaches higher-order, sheds identity, and has a transformative experience"
<Drup> to be fair, OO was not a very good name for what alan kay had in mind. It was a very good marketing name, though
<Fare> Actually, using a little bit of linear typing, you find that stateful vs pure, OO vs typeclass are two independent axes to view isomorphic data structures.
<companion_cube> like "dynamic programming" ? :D
<discord> <Perry> Smalltalk is highly flawed, but you have to understand, 35 years ago it felt like a dream.
<Drup> companion_cube: that one is really terrible
<companion_cube> and it was on intent, too
<discord> <Perry> Smalltalk is also blissfully internally consistent.
<discord> <Perry> Alan Kay learned a lot from the good parts of lisp as well.
<Fare> I'm not criticizing the Smalltalk of 40 years ago. It was a great progress over the C++ of 30 years ago.
<discord> <Perry> It was great progress over modern C++.
<discord> <Perry> Frankly, removing your own eye with a rusty spoon is preferable to C++.
<companion_cube> did C++ exist 30 years ago? I thought it started in the 90s :D
<discord> <Perry> C++ was created in the 1980s.
<companion_cube> Perry: the sad thing is that unti recently, there was no real contender to C++
<Fare> "Cfront was the original compiler for C++ from around 1983"
<companion_cube> oh wow
<companion_cube> C with classes, heh
<discord> <Perry> Originally it was called C with Classes. The first edition of The C++ Programming Language was 1986 or so.
<Fare> Perry, I didn't know you were into demonology and dark arts.
<discord> <Perry> Then from there it metastasized. I have a shelf of editions of The C++ Programming Language. Each edition is 2x the last.
<discord> <Perry> Faré: I can call spirits from the vasty deep.
<companion_cube> "the design and implementation of C++" does cast a bit of light on why the language is so convoluted
<discord> <Perry> Anyway, my guess is that the doubling of both The C++ Programming Language and the language standard will continue. This means that eventually, it will require all the matter in the solar system to store the PDF.
<discord> <Perry> C++ was certainly implemented. Whether it was designed is an interesting question.
<companion_cube> yeah, just wait until they have concepts, ADTs, pattern matching, and a borrow checker :D
<Drup> Perry: amuzingly, this exponential grow also applies to the ecmascript spec
<Fare> "design" is a big word, here. Heaping features on top of each other is as much design as making mounds of rocks is architecture.
<companion_cube> its design isn't that bad given the constraints
<discord> <Perry> Eczemascript. Shudder.
<companion_cube> but the constraints are insane
<discord> <Perry> The term "overconstrained" comes to mind.
<companion_cube> exactly
<Armael> Checking things? Is that really in the C++ spirit? :3
<Fare> C++ will die along with the last C++ programmer. I don't recommend genocide, though, but voluntary extinction. http://www.vhemt.org/
<Drup> companion_cube: Wasn't there a proposition to have a lifetime system in C++ by Stroustrup ? I remember someone describing it as "Rust without the borrow checker"
mariari has joined #ocaml
<companion_cube> Drup: that's why I mentioned that
<companion_cube> also, concepts are being discussed; ADTs might come some day, who knows
<companion_cube> anyway, I know very good people who are C++ programmers, so it seems you can use that and no become insane
<companion_cube> but it's certainly not for everyone
<Fare> (The acquiring company had an experiment to translate part of the million-line airline software system above-mentioned to C++. The code did run 3-20% faster, but was 10x larger and less maintainable. Instead they decided to spend some resources improving the Lisp compiler.)
<companion_cube> well I hope rust will help fix that
<companion_cube> it already seems quite promising for web browsers
<discord> <Perry> I can't remember enough C++ at one time to be productive in it. I'm too old and inflexible. It's maybe okay for young men.
<discord> <Perry> (and women)
<discord> <Perry> Rust seems fine as an alternative in this space.
<companion_cube> rust seems perfect as an alternative in this space
<companion_cube> (by which I mean I couldn't image anything better)
<Fare> Anyway, I'm writing monadic code in OCaml, using dirty tricks with global variables some of which only work "thanks" to the fact that there is only one real thread in Lwt, and, oh well, yeech, that part would be much nicer in Lisp.
<discord> <Perry> why wrote monadic code in ocaml?
<Fare> (On the other hand, I really enjoy how the typesystem lets me be sloppy and catches me)
<discord> <Perry> I mean, yes, you can, but ocaml lets you not write monadic code if you don't want to.
<Fare> Perry: mostly for Lwt, but also for monads that emulate dynamic scoping, stricter exception control, etc.
<Fare> Also because I want to translate it all to Coq after it's working.
<discord> <Perry> companion_cube: rust may prove less perfect when we learn more. In thirty years, we've learned a great deal. It's probably close to the best we can do right now....
<companion_cube> and how do you plan to translate lwt to coq?
<Fare> I only plan to extract to it.
<companion_cube> Perry: agreed, but rust eschewed compat with C, and learnt a lot from the last 40 years of research or so
<companion_cube> Fare: usually people do the opposite, btw, they extract OCaml from coq
<Fare> I write a demo in OCaml. I want to port it to Coq later.
<Fare> I write it in a style that I know will be expressible in Coq.
<companion_cube> ah, that explains a lot
<companion_cube> (but then you're writing purely functional code, be careful :p)
depleted has joined #ocaml
<Fare> yeah, well, it's purely functional, until it assumes orthogonal persistence :-/
<companion_cube> "orthogonal persistence"?
<Fare> and I don't feel like remonadicizing everything at the time being (or ever, if I can get away with not doing so)
<Fare> companion_cube, read chapter 2-5 of https://ngnghm.github.io/
depleted has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Fare> Although, considering the discussion of Alan Kay above, chapter 1 will probably speak to you, too.
<Fare> orthogonal persistence: the silly notion that if you have an interaction with the computer, then turn it off, the next day when you turn it back on the computer will still remember about it, without your having to do anything special about it.
<Fare> the way I used to enjoy my HP calculators.
<companion_cube> right
<Fare> or some enjoyed their IBM mainframes.
<companion_cube> (hopefully there's a way to clear the cache, but yeah(
<companion_cube> ))
<Fare> Or Jochen Liedtke implemented on 8-bit east german machines in the late 1970s / early 1980s.
<Fare> (L3 and L4 came out of it)
<Fare> Jochen has a great paper on his 17 year experience with orthogonal persistence. Published in 1993.
<companion_cube> I mean this notion seems nice, but it also sounds a bit too much like magic
<companion_cube> (it does remind of urbit…)
<Fare> sorry, it was only the 13 year experience at the time, 17 was bad memory
<Fare> urbit has it, but also a lot of other baggage.
<Fare> his first system was shipped in 1979.
<Fare> he tells stories that the persistence latency was several minutes, so many times, the system was saved from memory-corrupting bugs by shutting it down before the corruption would persist (also losing a few minutes of actual work by other people).
<Fare> Good luck giving static types to that.
<companion_cube> who knows?
<Fare> maybe with a reflective dependent type system...
<companion_cube> if you're serious about persistence, the whole program is persistent too, so you can refer to its hash
<Fare> As for orthogonal persistence being "magic", companion_cube, do you flush your L1, L2, L3, swap, manually? No? Then why would you want to flush your persistence buffer manually?
<companion_cube> then values can be persisted along with hash of program+type identifier
<companion_cube> because persistence eats more and more storage? whereas L* are just caches?
<companion_cube> what seems weird is that they don't seem to worry about running out of space
<discord> <Perry> Ah, Urbit. We covered it in our lab on our seminar day devoted to insane ideas in computer science.
<Fare> It only eats more storage if you accumulate garbage.
<discord> <Perry> We also covered TempleOS.
<Fare> Perry, did you also cover the Mill architecture?
<companion_cube> well intermediate snapshots are garbage, right?
<Fare> the Intel iAPX432 ?
<Fare> companion_cube, then why persist them?
<discord> <Perry> Faré: the 432 was a crazy crazy machine.
<Fare> Did you cover the Symbolics Ivory ?
<Fare> or just the PDP-10 ?
<companion_cube> I don't know, isn't that your point that everything should be persisted? :/
<Fare> companion_cube, sure, and if you produce 4K pixels at 50 frames per second, I need to save everything, too.
jnavila has quit [Ping timeout: 240 seconds]
<Fare> Or the system could be deterministic and only record a log of significant high-level events.
<discord> <Perry> The Lisp Machine was not crazy but was arrogant. The creators hadn't read the IBM 801 papers.
<companion_cube> right, so you need to request persistence explicitly
<Fare> unless you type super fast, the system will be capable of reconstituting everything you did from what you type and store each and every significant interaction.
<companion_cube> then it's just about making persistence easy
<discord> <Perry> The 432 was sort of an albatross. Really interesting ideas, not easy to implement or use. Again it forgot the 801 papers.
<Fare> I suppose Superman or the Flash could run out of memory.
<discord> <Perry> The IBM 801 papers were so useful and so many people ignored the ideas because they came from IBM. They then built stuff without checking if it was a good idea...
<Fare> Who needs to "request persistence explicitly"? Not the average user or programmer, anyway, but yes, SOMEONE will have to do the job.
<Fare> the 801 were the original RISC papers?
<discord> <Perry> Yes.
manas has quit []
<discord> <Perry> The important lesson was this: measure.
<companion_cube> right, so it's like calling git in the background, which is doable
<discord> <Perry> Well, there were several lessons. Measure, you probably can't implement it faster in microcode, and if the compiler can't use the instruction you don't want it...
u1dzer026 has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
<discord> <Perry> TempleOS was created by someone who is literally mentally ill...
<Fare> companion_cube, the important thing is understanding the Model-View-Controler model and not having to persist the View.
<Fare> also understanding determinism and absence of UBE.
Denommus has quit [Remote host closed the connection]
<discord> <Perry> "Its development began in 2003, after Davis suffered from a series of manic episodes that left him briefly hospitalized for mental health issues.1 Davis is a former atheist who proclaimed that he had "communications" with God, and that God told him the operating system he built was for God's third temple. According to Davis, TempleOS is of "divine" intellect due to the inspired nature of the code, and that God said
<discord> to create the operating system with 640x480, 16 colors display and a single audio voice. The operating system was written in a programming language developed by Davis in C and C++, called "HolyC""
<Fare> Perry, I have no excuse.
<discord> <Perry> Faré: don't be so modest! I'm sure you have a few!
<Fare> I'm even more mentally ill? Not mentally ill enough?
<discord> <Perry> Maybe both! 😉
<discord> <Perry> Is it true you've moved back to Cambridge btw?
<Fare> It is true.
<Fare> Taxachusetts is a tax heaven, compared to Manhattan.
<discord> <Perry> Indeed. Though just crossing the river is enough to fix that.
<Fare> Also, the People's Republic of Cambridge feels very Alt-Right compared to NYC's mayoral team.
<discord> <Perry> They haven't banned the market yet?
<Fare> fewer Trump towers, too.
<Fare> They all but banned Airbnb :-/
u1dzer026 has quit [Remote host closed the connection]
spew has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
pierpal has quit [Ping timeout: 265 seconds]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 272 seconds]
neatonk1 has joined #ocaml
neatonk has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 268 seconds]
TC01 has joined #ocaml
steenuil has quit [Remote host closed the connection]
neatonk1 has quit [Ping timeout: 260 seconds]
TC01 has quit [Client Quit]
TC01 has joined #ocaml
Aleszandro has joined #ocaml
Aleszandro has quit [Killed (Unit193 (Spam is not permitted on freenode.))]
TC01 has quit [Client Quit]
TC01 has joined #ocaml
_andre has quit [Quit: leaving]
TC01 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
TC01 has joined #ocaml
TC01 has quit [Remote host closed the connection]
spew has joined #ocaml
Cypi has joined #ocaml
spew has quit [Ping timeout: 272 seconds]
spew has joined #ocaml
kakadu has quit [Ping timeout: 256 seconds]
johnpark_pj has joined #ocaml
johnpark_pj has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Alucard4200 has joined #ocaml
Alucard4200 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
spew has quit [Ping timeout: 272 seconds]
exio419 has joined #ocaml
exio419 has quit [Remote host closed the connection]
mariari has quit [Ping timeout: 255 seconds]