mcclurmc has quit [Remote host closed the connection]
MrScout has quit [Ping timeout: 244 seconds]
mcclurmc has joined #ocaml
johnf__ has joined #ocaml
mcclurmc has quit [Ping timeout: 268 seconds]
ontologiae has joined #ocaml
AltGr has joined #ocaml
MrScout has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
ontologiae has quit [Ping timeout: 265 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
RichN has quit [Ping timeout: 256 seconds]
RichN has joined #ocaml
MercurialAlchemi has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
chris2 has quit [Ping timeout: 252 seconds]
ygrek_ has joined #ocaml
fluter has quit [Ping timeout: 246 seconds]
fluter has joined #ocaml
chris2 has joined #ocaml
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 250 seconds]
fluter has quit [Quit: WeeChat 1.2]
ygrek_ has joined #ocaml
fluter has joined #ocaml
ggole has joined #ocaml
f[x] has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
johnf__ has quit [Read error: Connection reset by peer]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
ygrek_ has quit [Ping timeout: 252 seconds]
native_killer has joined #ocaml
Ben4738 has joined #ocaml
Ben4738 has left #ocaml [#ocaml]
xet7_ has quit [Remote host closed the connection]
xet7_ has joined #ocaml
grouzen has joined #ocaml
fluter has quit [Quit: WeeChat 1.2]
fluter has joined #ocaml
zpe has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 272 seconds]
monod has joined #ocaml
frankier has joined #ocaml
cdidd has quit [Ping timeout: 250 seconds]
damason has quit [Remote host closed the connection]
monod has quit [Quit: Sto andando via]
<frankier>
Hi all, I'm trying to get Syntastic to highlight Ocaml type errors in vim. The way I'm building my projects is with a Makefile calling corebuild with a bunch of libraries passed to `-pkg`. I then have build: make in my opam file and pin the package which seems to work. The current Syntastic checker: https://github.com/scrooloose/syntastic/blob/master/syntax_checkers/ocaml/camlp4o.vim doesn't seem to deal with packages beyond Jane St
<frankier>
core at all. My question is twofold: is there a way to do `opam build` for the current directory assuming it's pinned? If so this could be a drop in replacement for ocamlbuild in this syntastic checker. If not what's the best/quickest way to get the value of build from the opam file? I was about to start messing around with sed/vim regexp but maybe there's an easier way?
<frankier>
Total Ocaml noob so excuse me if I'm going about things in a particularly odd/unusual way.
cdidd has joined #ocaml
cdidd has quit [Ping timeout: 246 seconds]
<companion_cube>
frankier: I assume you read real world OCaml
<companion_cube>
you should give a try to merlin
<companion_cube>
it's awesome
Haudegen has quit [Ping timeout: 255 seconds]
Kakadu has joined #ocaml
Simn has joined #ocaml
cdidd has joined #ocaml
<frankier>
Oh - I see. Merlin actually has some kind of Syntastic integration
<frankier>
Neat
Grezeh has joined #ocaml
<frankier>
Shame it's a bit awkward to install
cdidd has quit [Ping timeout: 260 seconds]
<frankier>
Ah, it can be installed by opam
<frankier>
Much better
ollehar has joined #ocaml
Haudegen has joined #ocaml
Grezeh has quit [Quit: Grezeh]
whirm has joined #ocaml
<companion_cube>
yeah, opam install merlin, a bit of conf, and that's it
whirm has quit [Client Quit]
<frankier>
Okay, very nice now. I don't really like that the required packages have to be specified in 3 places (Makefile, opam, .merlin) - is there a normal way to cut down on that? but apart from that pretty smooth
<apache2>
9 fields, three possible states, a "naive" bitmap would be 18 bit
<mrvn>
apache2: too big.
<mrvn>
I need one bit per reachable board position. Thats 764 boards. Without compacting those 18 bit a bitmap would use too much ram.
shinnya has joined #ocaml
<companion_cube>
and would a sorted array be too slow?
<mrvn>
companion_cube: that would require saving the board itself, meaning 19 bit per board. round up to 24 and you get 2292 byte for the array.
<companion_cube>
heh :D
<apache2>
why round up?
<companion_cube>
alignment?
<mrvn>
yep
<apache2>
can't you just mask and combine?
<mrvn>
That's still 1814 byte and I need some other vars and stack too.
deavid has joined #ocaml
ollehar has joined #ocaml
<apache2>
hmm
<apache2>
mrvn: 3**9 = 19683 possible configurations. so that fits in 15 bits (with 13085 excess configurations)
<apache2>
not all those configurations are legal though (max 3 x, max 3 o)
<mrvn>
apache2: which would need 4096 byte for a bitmap
<apache2>
how about making a tree structure?
<mrvn>
apache2: that would need 764 16bit pointers
<apache2>
15bits x 764 would need 1433 byts
<apache2>
do you need them all at once?
<mrvn>
apache2: 16 bits with the data bit. thats 1528 byte. Maybe possibly but verry tight.
<mrvn>
apache2: they are the memory of the AI so probably most of them
<mrvn>
If I use "a mod x" then the smallest x that makes a perfect hash is 11963. :(
<companion_cube>
do you have to store that many things in memory? can't you replace some memory with computations?
<mrvn>
companion_cube: no. then I wouldn't have a learning AI but a perfect tic-tac-toe player. Which would be boring.
<apache2>
:D
<companion_cube>
oh, learning on an arduino
<companion_cube>
good luck!
<bernardofpc>
there's a reason a human brain has more bits than that ;-)
<mrvn>
Hah. I tried encoding each field as 2 bits because then the math is simpler. But when I use a base 3 system I get "a % 7786" as perfect hash function. That 974 bytes for a bitfield. That should do.
genkito has joined #ocaml
genkito has quit [Client Quit]
Haudegen has quit [Ping timeout: 268 seconds]
<mrvn>
I wonder how dumb I should make the AI initially. Should it complete 2 Os in a row when it can or should it learn that? Should it block 2 Xs in a row or learn that?