<mbuf>
lseq 2 = Cons (2, Cons (3, Cons (4, unit))), so, I guess h initially gets the value of 2, and then 3, and then 4 and so on, but, I where does the value of 'x' come from?
<mbuf>
I think when h is 2, x is tf () and hence Cons (3, Cons (4, Cons (5, unit))).
<mbuf>
Similarly, when h is 3, x is Cons (4, Cons (5, unit)) etc.
ygrek__ has quit [Ping timeout: 246 seconds]
rople has quit [Ping timeout: 268 seconds]
rople has joined #ocaml
bartholin has quit [Remote host closed the connection]
mbuf has quit [Ping timeout: 276 seconds]
mbuf has joined #ocaml
<Leonidas>
TIL merlin has neomake integration <3
oni-on-ion has joined #ocaml
barockobamo has joined #ocaml
mfp has joined #ocaml
rople has quit [Quit: rople]
dhil has joined #ocaml
sagax has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
mbuf has quit [Quit: Leaving]
Serpent7776 has quit [Ping timeout: 240 seconds]
sagax has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
tg has quit [Ping timeout: 264 seconds]
tg has joined #ocaml
barockobamo has quit [Remote host closed the connection]
jao has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
delysin_ is now known as delysin
Haudegen has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
Serpent7776 has joined #ocaml
<companion_cube>
Leonidas: vintage dune is Old Spice
spew has joined #ocaml
rosterok has joined #ocaml
<theblatte>
companion_cube: omg.
<spew>
what did I miss?
dhil has joined #ocaml
jao has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Guest87157 has joined #ocaml
Guest87157 has quit [Remote host closed the connection]
jao- has joined #ocaml
jao- is now known as jao
barockobamo has joined #ocaml
<haesbaert>
what's the preferred way to represent something I'd represent as a bitmap in C ? say for instance I have 20 capabilities, in C I'd just use a 32bit word and each bit would be one capability.
<haesbaert>
I can to it with a list of things in ocaml, but then testing becomes linear
<Armael>
you can use a bool array if you don't care too much about the memory overhead
<theblatte>
you can give up on packing everything into one int and have a record, or do the bit masking by hand and hide it with getters and setters?
<Armael>
but you can also use an int
<haesbaert>
I guess giving up on packing is good enough, in the end they are in a record anyway
<companion_cube>
haesbaert: an int
<companion_cube>
+ bitshifts
<haesbaert>
but then I need to create a clutter of a name->bitposition thing
<Leonidas>
ppx!
* Leonidas
*ducks to avoid the object thrown by companion_cube*
<Drup>
haesbaert: there is the bitv library too
Serpent7776 has quit [Quit: Leaving]
jao has quit [Remote host closed the connection]
<ggole>
There's a ppx for enum tags, so you could use that
<haesbaert>
I'm going for unpacking, I've no idea why I didn't consider that
<ggole>
You could do efficient small enum sets and arrays (safely) indexed by enums as a ppx... hmm
<ggole>
Sort of a crappy version of Pascal's enum sets
dhil has quit [Quit: Quit]
<companion_cube>
haesbaert: well I use that when it's important to not spend 20 words for 20 bits of info
<companion_cube>
otherwise, fields are ok, I guess
q9929t has joined #ocaml
webshinra has joined #ocaml
smazga has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
jao has joined #ocaml
ziyourenxiang has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
FreeBirdLjj has quit [Remote host closed the connection]