adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
toppler has quit [Ping timeout: 268 seconds]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
count3rmeasure has joined #ocaml
toppler has joined #ocaml
g0d_shatt3r has quit [Ping timeout: 240 seconds]
zolk3ri has quit [Remote host closed the connection]
gautv has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ocaml
gautv has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 240 seconds]
<hashbjorn> I'm having an odd issue. I've defined `type state = State of cell list list`
<hashbjorn> and now I'm calling a function with a value `state`
<hashbjorn> but the compiler i giving me "expression has type state but an expression was expected of type cell list list"
<hashbjorn> i understand that these two aren't strictly the same, and I understand that I can use constructors (uppercase State) to convert a cell list list to a State
<hashbjorn> but now I have function that expects cell list list and not state- how do I force the function into the right type?
<hashbjorn> is there a common pitfall i'm falling into?
ygrek has quit [Ping timeout: 264 seconds]
<companion_cube> `let State l = state in …` to open the state
jave has joined #ocaml
toppler has quit [Ping timeout: 246 seconds]
<hashbjorn> im actually having the reverse problem - it registers as my custom type, but the function is apparently of the more more basic type
<hashbjorn> it expects a "cell list list" but got a "state", even though state is literally defined as a "cell list list"
<hashbjorn> nono wait that actully fixed it
<hashbjorn> if i do let `State state = State(..my values..)` it works just fine- but its using both the constructor and another type syntax i don't know
<hashbjorn> does anyone have a recommendation on what to read up on, to learn the diffence? I've been starting at this problem for a while and I'm not sure i understand the solution
toppler has joined #ocaml
silver has quit [Read error: Connection reset by peer]
<rgrinberg> Leonidas: it works well enough I think. I don't maintain it because I don't really use it.
<rgrinberg> For now :)
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
FreshcollegeGirl has joined #ocaml
keep_learning has joined #ocaml
vicfred has quit [Quit: Leaving]
count3rmeasure has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 240 seconds]
count3rmeasure has joined #ocaml
tormen_ has joined #ocaml
toppler has joined #ocaml
tormen has quit [Ping timeout: 245 seconds]
mfp has quit [Ping timeout: 276 seconds]
vicfred has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
<xvilka> flux: Mirage is a good practice, the problem is the dependence on third-party libraries, which became a nuisance for Mirage target
toppler has quit [Ping timeout: 240 seconds]
Involuntary has joined #ocaml
Jeanne-Kamikaze has quit [Ping timeout: 276 seconds]
GuerrillaMonkey has joined #ocaml
Vikfret has joined #ocaml
Involuntary has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
count3rmeasure has quit [Ping timeout: 240 seconds]
GuerrillaMonkey has quit [Quit: Leaving]
gravicappa has joined #ocaml
retropikzel has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
retropikzel has quit [Remote host closed the connection]
toppler has joined #ocaml
mbuf has joined #ocaml
sagax has quit [Ping timeout: 252 seconds]
FreshcollegeGirl has quit [Ping timeout: 240 seconds]
FreshcollegeGirl has joined #ocaml
FreshcollegeGirl has quit [Max SendQ exceeded]
FreshcollegeGirl has joined #ocaml
FreshcollegeGirl has quit [Max SendQ exceeded]
FreshcollegeGirl has joined #ocaml
FreshcollegeGirl has quit [Max SendQ exceeded]
FreshcollegeGirl has joined #ocaml
FreshcollegeGirl has quit [Max SendQ exceeded]
FreshcollegeGirl has joined #ocaml
FreshcollegeGirl has quit [Max SendQ exceeded]
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian_ has joined #ocaml
narimiran has joined #ocaml
penguwin has joined #ocaml
nullifidian_ is now known as nullifidian
count3rmeasure has joined #ocaml
zolk3ri has joined #ocaml
amiloradovsky has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
Vikfret has quit [Quit: Leaving]
toppler has joined #ocaml
amiloradovsky has quit [Ping timeout: 276 seconds]
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
bitwinery has quit [Quit: Leaving]
bartholin has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 276 seconds]
gravicappa has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
gareppa has joined #ocaml
nullifidian_ has joined #ocaml
toppler has joined #ocaml
vesper has joined #ocaml
nullifidian has quit [Ping timeout: 276 seconds]
vesper11 has quit [Ping timeout: 268 seconds]
count3rmeasure has quit [Quit: Leaving]
igstan has joined #ocaml
igstan has quit [Client Quit]
adrien has quit [Ping timeout: 240 seconds]
def` has quit [Ping timeout: 240 seconds]
def` has joined #ocaml
adrien has joined #ocaml
gareppa has quit [Quit: Leaving]
jaar has joined #ocaml
jaar has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 245 seconds]
jaar has joined #ocaml
neiluj has joined #ocaml
neiluj has joined #ocaml
toppler has joined #ocaml
aecepoglu[m] has quit [Remote host closed the connection]
cgenie[m] has quit [Remote host closed the connection]
keep-learning[m] has quit [Read error: Connection reset by peer]
peddie has quit [Write error: Connection reset by peer]
copy` has quit [Write error: Connection reset by peer]
otini has quit [Write error: Connection reset by peer]
dl3br[m] has quit [Write error: Connection reset by peer]
Haudegen[m] has quit [Remote host closed the connection]
regnat[m] has quit [Read error: Connection reset by peer]
webax[m] has quit [Read error: Connection reset by peer]
isaachodes[m] has quit [Read error: Connection reset by peer]
prsafont[m] has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
rgr[m] has quit [Read error: Connection reset by peer]
bglm[m] has quit [Read error: Connection reset by peer]
smondet[m] has quit [Read error: Connection reset by peer]
aspiwack[m] has quit [Read error: Connection reset by peer]
Virgile[m] has quit [Remote host closed the connection]
zapashcanon[m] has quit [Read error: Connection reset by peer]
jimt[m] has quit [Read error: Connection reset by peer]
hdurer[m] has quit [Write error: Connection reset by peer]
flux has quit [Write error: Connection reset by peer]
mfp has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
cartwright has quit [Ping timeout: 260 seconds]
cartwright has joined #ocaml
toppler has joined #ocaml
aecepoglu[m] has joined #ocaml
ggole has joined #ocaml
copy` has joined #ocaml
hdurer[m] has joined #ocaml
smondet[m] has joined #ocaml
Haudegen[m] has joined #ocaml
keep-learning[m] has joined #ocaml
zapashcanon[m] has joined #ocaml
aspiwack[m] has joined #ocaml
bglm[m] has joined #ocaml
jimt[m] has joined #ocaml
peddie has joined #ocaml
flux has joined #ocaml
webax[m] has joined #ocaml
prsafont[m] has joined #ocaml
isaachodes[m] has joined #ocaml
otini has joined #ocaml
cgenie[m] has joined #ocaml
dl3br[m] has joined #ocaml
regnat[m] has joined #ocaml
Virgile[m] has joined #ocaml
rgr[m] has joined #ocaml
sepp2k has joined #ocaml
neiluj has quit [Ping timeout: 246 seconds]
zolk3ri has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
silver has joined #ocaml
toppler has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
jacobian has quit [Quit: leaving]
neiluj has joined #ocaml
neiluj has quit [Changing host]
neiluj has joined #ocaml
jacobian has joined #ocaml
toppler has quit [Ping timeout: 252 seconds]
toppler has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
neiluj has quit [Quit: Konversation terminated!]
toppler has quit [Ping timeout: 268 seconds]
nullifidian_ is now known as nullifidian
toppler has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
spew has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Client Quit]
toppler has joined #ocaml
warriors has joined #ocaml
Haudegen has joined #ocaml
toppler has quit [Ping timeout: 276 seconds]
smazga has joined #ocaml
jbrown has quit [Quit: Leaving]
toppler has joined #ocaml
jbrown has joined #ocaml
wilfredh has joined #ocaml
<wilfredh> I have an ocaml style/convention question :)
<wilfredh> when writing a helper function inside a top-level function so you can pass an accumulator, what do you call it?
<wilfredh> `let worker acc = ...`? `f`? `helper`? Something else?
<ggole> I don't think there's any widely adopted convention. I personally usually use loop or recur, but if there is a good specific name that fits I would use that.
<companion_cube> often loop or aux
<companion_cube> for me
<simpson> I use `go`, picked up initially from Haskell, I think.
<Leonidas> one can even cheat and put the accumulator as optional labeled argument out *ducks*
<narimiran> i've seen `aux` in couple of different codebases
<ggole> It's always awkward when you discover you need another loop and then you write loop2 or aux2 and it's so obvious that the name is just garbage
<companion_cube> aux_foo and aux_bar
<ggole> But then you need to rename!
<theblatte> I've taken the habit of naming these "enclosing_function_aux" instead of plain "aux" to avoid confusion when "aux" is at the top of "perf top" or whatever
<theblatte> (where "enclosing_function" doesn't actually need to be enclosing)
<companion_cube> if it's not enclosing I tend to have `f_` or `f_rec` called by `f`
toppler has quit [Ping timeout: 276 seconds]
<wilfredh> thanks folks. I've gone for loop as there seems to be a weak consensus there :)
Serpent7776 has quit [Quit: Leaving]
retropikzel has joined #ocaml
toppler has joined #ocaml
zolk3ri has joined #ocaml
bartholin has joined #ocaml
mbuf has quit [Quit: Leaving]
jaar has quit [Ping timeout: 276 seconds]
ggole has quit [Quit: Leaving]
jimt has quit [Ping timeout: 268 seconds]
narimiran has quit [Ping timeout: 276 seconds]
neiluj has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Changing host]
nullifidian has quit [Read error: Connection reset by peer]
nullifidian_ has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
neiluj has quit [Quit: Konversation terminated!]
toppler has joined #ocaml
jimt has joined #ocaml
zfnmxt has joined #ocaml
<zfnmxt> Is there any existing documentation that talks about implementation-specifics for typechecking/compiling OCaml's polymorphic variants? I've found a few papers on the subject--notably by Garrigue--but they're theory-based and I'm curious about actual details. (i.e., in the papers it appears that the variants are typechecked by constraints built into the kind system, but I can't really be sure if this
<zfnmxt> is what OCaml actually does in the implementation)
gareppa has joined #ocaml
Jesin has quit [Quit: Leaving]
<zfnmxt> It would also be nice if there was something that talked more about how polymorphic variants are less efficient than their named counterparts, as briefly mentioned in 4.2.1: https://caml.inria.fr/pub/docs/manual-ocaml/lablexamples.html
gareppa has quit [Quit: Leaving]
Jesin has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
retropikzel has quit [Remote host closed the connection]
gareppa has joined #ocaml
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
Jesin has quit [Quit: Leaving]
jbrown has quit [Ping timeout: 276 seconds]
Jesin has joined #ocaml
jbrown has joined #ocaml
<reynir> Leonidas: ohhh, that's a good cheat!
Haudegen has quit [Quit: Bin weg.]
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
gareppa has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
nullifidian__ is now known as nullifidian
Jesin has joined #ocaml
<mononote> > This document was translated from LATEX
<mononote> is the source code public?
<mononote> (i would like to make custom pdf for reading)
ygrek has joined #ocaml
mononote has left #ocaml ["Leaving"]
<spew> I've got a weird problem with a state monad that I implemented
mononote has joined #ocaml
<spew> the state that is being monadically updated is a store, like a memory heap
<spew> this is so I can model mutable fields of a record but in a functionally pure way
<spew> so one of the operations is basically make : unit -> 'a State_monad.t
<spew> and that makes a "'a" which has a pointer into the store
<mononote> ah its in the ocaml repo, nevermind*
<spew> and the store that is the state of the monad gets updated so that for example, it doesn't allocate the same pointer twice
<spew> so the problem is that my store is getting too many pointers allocated
<spew> if I do something in the monadic context like "let foo = make ()"
<spew> that foo is getting "made" over and over again
toppler has quit [Ping timeout: 240 seconds]
<spew> every time it is re-used in a monadic context, the thunk that that monadic value represents gets re-evaluated
<spew> so I'm getting all these different values instead of just one unique foo
<spew> does that make sense?
<spew> so my solution was to memoize the thunks
<spew> and that seems fine but it just feels fishy
<spew> has anyone dealt with anything like this before?
bitwinery has joined #ocaml
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
narimiran has joined #ocaml
toppler has joined #ocaml
tane has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
Adso_of_Jelq has joined #ocaml
bitwinery has quit [Quit: Leaving]
jnavila has joined #ocaml
kakadu has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
cranix has quit [Ping timeout: 276 seconds]
bitwinery has joined #ocaml
cranix has joined #ocaml
neiluj has joined #ocaml
neiluj has joined #ocaml
neiluj has quit [Changing host]
toppler has quit [Ping timeout: 268 seconds]
nicoo has quit [Ping timeout: 260 seconds]
nicoo has joined #ocaml
toppler has joined #ocaml
kakadu has quit [Ping timeout: 265 seconds]
narimiran has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 245 seconds]
jaar has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
jnavila has quit [Remote host closed the connection]
gareppa has joined #ocaml
nullifidian_ has joined #ocaml
nullifidian has quit [Ping timeout: 245 seconds]
gareppa has quit [Quit: Leaving]
toppler has quit [Ping timeout: 265 seconds]
spew has quit [Quit: Connection closed for inactivity]
toppler has joined #ocaml
bitwinery has quit [Quit: Leaving]
neiluj has quit [Quit: Konversation terminated!]
toppler has quit [Ping timeout: 265 seconds]
tane has quit [Quit: Leaving]
smazga has quit [Quit: leaving]
toppler has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zmt00 has joined #ocaml
zmt01 has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml