gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
mjonsson has quit [Ping timeout: 252 seconds]
letrec has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
mjonsson has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
ski has quit [Ping timeout: 250 seconds]
goncalo has joined #ocaml
ski has joined #ocaml
sivoais has joined #ocaml
iago has quit [Quit: Leaving]
emmanuel__ has quit [Remote host closed the connection]
imperator has joined #ocaml
imperator has left #ocaml []
<Drakken> Can modules in a .mlpack file refer to previously mentioned modules in the same file?
ulfdoz has joined #ocaml
Tobu has joined #ocaml
mjonsson has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 252 seconds]
Tobu has quit [Ping timeout: 272 seconds]
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Read error: Operation timed out]
Tobu has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
diego_diego has joined #ocaml
<flux> I would like to say "yes", how else would it make any sense
<flux> could be that the modules are automatically topologically sorted, I haven't used mlpack that much that I would've given a thought to that :)
testcocoon has joined #ocaml
ftrvxmtrx_ has quit [Quit: Leaving]
BiDOrD_ has joined #ocaml
eni has joined #ocaml
BiDOrD has quit [Ping timeout: 245 seconds]
<Drakken> flux I think I found the problem. ocamlbuild is compiling the modules out of order. I put Utils first because AST uses it, but AST is being compiled first.
<adrien> hmmm
<adrien> that sounds very wrong
<adrien> there's something else
<adrien> you might have a conflict somewhere and you might be using the module inside the pack without going through the pacl
<adrien> k
roha has joined #ocaml
cdidd has quit [Remote host closed the connection]
tufisi has joined #ocaml
roha has quit [Read error: Operation timed out]
ftrvxmtrx has joined #ocaml
Snark has joined #ocaml
<Drakken> What else could it be? There's no reference to AST in Utils, and the command line is ocamlbuild foo.cmo, where Utils and AST are in foo.mlpack.
djcoin has joined #ocaml
cago has joined #ocaml
<adrien> you're using Foo.Utils and Foo.AST or "AST" and "Utils"
<Drakken> AST and Utils
<Drakken> foo.mlpack reads "Utils\nAST\n..."
<Drakken> AST.ml says "open Utils" and uses stuff in Utils, but the compiler says the stuff is unbound.
<adrien> but in your .ml code of other files
<Drakken> Actually, the third file in foo.mlpack isn't up to date. It tries to open FooAST instead of AST.
<Drakken> What difference does it make what's in other files?
ankit9 has joined #ocaml
<flux> drakken, try what ocamldep says
<flux> although, I think ocamlbuild itself should also produce a warning if there are loops in dependencies..
<Drakken> "open Foo.Utils" generates a "circular build" message.
Tobu has quit [Ping timeout: 272 seconds]
<Drakken> ocamlbuild doesn't echo all of its compiler commands, only the (first) one that has an error.
<Drakken> So I guess it wasn't compiling AST first unless it thought Utils was up to date. I deleted _build and the error disappeared.
Tobu has joined #ocaml
avsm has quit [Ping timeout: 244 seconds]
avsm has joined #ocaml
Cyanure has joined #ocaml
Tobu has quit [Quit: No Ping reply in 180 seconds.]
eni has quit [Quit: Leaving]
Tobu has joined #ocaml
larhat has quit [Quit: Leaving.]
roha has joined #ocaml
silver has joined #ocaml
guru has joined #ocaml
guru is now known as Guest54012
<Guest54012> trying to use jane street's ocaml-core -- get error during linking 'gcc: error: lib/libcore.a: No such file or directory' -- how to fix ?
<Guest54012> im a happy user of oasis + batteries so far -- puzzled why ocaml-core doesnt work
Tobu has quit [Ping timeout: 272 seconds]
mika1 has joined #ocaml
mononofu has joined #ocaml
iZsh has quit [Quit: Coyote finally caught me]
Tobu has joined #ocaml
diego_diego has quit [Quit: diego_diego]
Guest54012 has quit [Read error: Connection reset by peer]
guru_ has joined #ocaml
cyphase has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
letrec has joined #ocaml
Hussaind has joined #ocaml
Hussaind has left #ocaml []
larhat has joined #ocaml
guru_ has quit [Quit: leaving]
cyphase has joined #ocaml
sgnb has quit [Remote host closed the connection]
mfp has quit [Remote host closed the connection]
avsm has joined #ocaml
roha has quit [Ping timeout: 260 seconds]
avsm has quit [Client Quit]
avsm has joined #ocaml
err404 has joined #ocaml
sgnb has joined #ocaml
snearch has joined #ocaml
_andre has joined #ocaml
ankit9 has quit [Ping timeout: 260 seconds]
Tobu has quit [Ping timeout: 272 seconds]
mfp has joined #ocaml
roha has joined #ocaml
emmanuelux has joined #ocaml
Tobu has joined #ocaml
pango has quit [Remote host closed the connection]
pango has joined #ocaml
snearch has quit [Quit: Verlassend]
ankit9 has joined #ocaml
ski has quit [Ping timeout: 250 seconds]
err404 has quit [Remote host closed the connection]
pango has quit [Ping timeout: 252 seconds]
oriba has joined #ocaml
emmanuelux has quit [Ping timeout: 264 seconds]
pango has joined #ocaml
cago has quit [Quit: Leaving.]
cago has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
mononofu has quit [Remote host closed the connection]
Tobu has joined #ocaml
<hcarty> thelema: I can install the packages file, but it was my impression that packages was an optional thing
<hcarty> thelema: And more importantly that it is intended for customization, not as something included by default.
<hcarty> thelema: If this is not the case then I can update ocamlbrew to stick the packages file wherever it should go
<hcarty> I'm a little reluctant to do that though, since not being on oasis-db implies (perhaps incorrectly) a less cleanly integrated package.
<hcarty> That's not something I want to provide out of the box
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
<thelema> hcarty: true, I (or someone) should really upload these packages that work to oasis-db
<thelema> packages is definitely an optional thing
<thelema> Did I ever tell you about the --package option for odb? to download a remote package list and install all the packages inside?
<thelema> (it works on local package lists too, of course)
Tobu has quit [Ping timeout: 272 seconds]
<hcarty> thelema: I saw that patches were applied that implied a feature like that, but I don't think we've discussed it
<hcarty> thelema: Sounds really nice
ankit9 has quit [Ping timeout: 260 seconds]
<hcarty> Oh - is this the ripping off good ideas from barbra thing? :-)
ankit9 has joined #ocaml
kakadu has joined #ocaml
ankit9 has quit [Client Quit]
<thelema> hcarty: actually, this was the simplest way I could figure to have an automated oasis install by a single command, with a guaranteed stable dependency chain
<hcarty> thelema: Even better.
<hcarty> thelema: Right, so you have fixed versions through packages. That avoids the potential issue of a package on oasis-db being updated to an incompatible version.
<hcarty> Very nice
<hcarty> incr thelema
<thelema> exactly.
Tobu has joined #ocaml
gnuvince has quit [Read error: Operation timed out]
smondet has joined #ocaml
caj has joined #ocaml
caj has left #ocaml []
gnuvince has joined #ocaml
cdidd has joined #ocaml
* mrvn needs to design the network protocol for his game soon.
<mrvn> I wonder how much I need to coordinate events between server and client. Can I just send a "unit X goto Y" or do I need to send updates for every tile the unit crosses to ensure server and client remain in sync.
jonafan has quit [Ping timeout: 265 seconds]
chambart has quit [Read error: Operation timed out]
<mrvn> Anyone done this sort of thing before?
gnuvince_ has joined #ocaml
mika1 has quit [Quit: Leaving.]
gnuvince has quit [Read error: Connection reset by peer]
cago has quit [Quit: Leaving.]
oriba has quit [Quit: oriba]
<adrien> tcp?
<thelema> mrvn: no, but think about eventual consistency if you're not using TCP, as dropped packets can cause desync, but this desync shouldn't be permanent
mononofu has joined #ocaml
<hcarty> mrvn: The goto should be enough if you trust the client and/or validate all requests from the client on the server.
Tobu has quit [Ping timeout: 272 seconds]
<flux> mrvn, is it a real time game?
<flux> mrvn, if you want to make it work properly, perhaps it is worth doing the protocol in UDP. I had a similar case where I used TCP though, it introduced a bit latency due to windowing I think.
<mrvn> yes
<flux> it passed timestamps, object locations and object velocities to the server
<flux> and it then passed them to other clients, if I recall
<flux> some information about client latencies were also passed
<flux> you can grep for 'latency' in goba :)
<mrvn> I'm not sure loosing packets is a good idea. Loosing a tile change for a unit might be trivial but loosing a packet saying a building was errected changes a lot.
<flux> you can have two kinds of packets, ones you can loose and ones you cannot
<adrien> you will lose packets one day anyway
<adrien> or get lag
<flux> it might not matter if a building was erected a second ago or now
<flux> but it might matter if an object moves now or after one second
<mrvn> Latency shouldn't be much of a problem I think. Events should be timestamped so the situation might skip but should get back in sync.
<flux> also same for bullets: it doesn't matter where it was a second ago if we know where it is now
<mrvn> flux: It matters if there is a unit walking through the building or around it. :)
<flux> mrvn, depensd who interprets the world
<flux> if might just be a rare visual glitch
<mrvn> If the server walks around it and the client through it they get awfully out of sync.
<mrvn> And then other units walk around that unit so you get ripple effects.
<hcarty> mrvn: If you server's interpretation is considered 'truth' then there will be visual differences any time lag or syncronization issues come up
<hcarty> mrvn: Unless you stick with TCP and don't allow the display to update until an update has been sent
<mrvn> The server is always right[tm]. Otherwise you get cheating clients.
kakadu has quit [Quit: Page closed]
<adrien> but it's pretty hard to do it that way
<adrien> it's definitely better but it's a lot of things to pay attention to
<mrvn> I want to have the client to some extrapolation. So baring updates from the server units should keep moving the way the client thinks they will.
<adrien> anyway, good luck :-)
<mrvn> Main checston will be how predictable do I make unit moves. Things look better if you roll a dice when you have multiple choices. Maybe I will use an adaptive algorithm and send a unit update every time the unit needs to roll a dice.
<mrvn> s/checston/decision/
<mrvn> Or precompute a number of dice rolls and send them from server to client ahead of time.
<mrvn> For a wild idea there could be a udp and tcp connection. Important events like buildings and start/end of a goto and such via tcp and unit updates during gotos via udp.
Tobu has joined #ocaml
jarray52 has joined #ocaml
jarray52 has quit [Changing host]
jarray52 has joined #ocaml
smondet` has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<jarray52> How does one list the modules available for import from the OCaml interpreter command line?
<mrvn> can you?
<rixed> "#list;;" with batteries.
<hcarty> rixed: That's not batteries, it's findlib
<hcarty> #list shows findlib package names rather than module names
<rixed> hcarty: I stand corrected. I never know what's belonging to findlib in the repl.
<jarray52> hcarty: I want to thank you for suggesting http://try.ocamlpro.com/ yesterday. That was a great tutorial.
<mrvn> Unknown directive `list'.
<mrvn> No findlib in the default toplevel here
<rixed> #use "topfind";; then ?
smondet has quit [Ping timeout: 245 seconds]
<mrvn> # #list;;
<mrvn> aio (version: 0.0.3)
<mrvn> Even works for my own package. :)
diego_diego has joined #ocaml
<hcarty> jarray52: You're welcome. The ocamlpro folks (and ocsigen folks) did a nice job with it.
<jarray52> mrvn: I have to run #use "topfind";; before running #list;;
<rixed> jarray52: you may want to add this to your ~/.ocamlinit
<hcarty> Does anyone here use cmdliner? I'm getting some weird formatting from some of its output.
<jarray52> rixed: I don't seem to have a ~/.ocamlinit file.
mononofu has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
<jarray52> rixed: I just created the file and added #use "topfind";;
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
roha has quit [Ping timeout: 248 seconds]
thomasga has quit [Ping timeout: 265 seconds]
<jarray52> How do I import ExtLib.ExtList.List?
srcerer_ has joined #ocaml
<hcarty> jarray52: #require "extlib";; I think
srcerer has quit [Ping timeout: 245 seconds]
<hcarty> jarray52: That said, it's probably better to use Batteries than extlib - as far as I know, extlib is not being actively maintained.
cyphase has quit [Ping timeout: 245 seconds]
mononofu has joined #ocaml
<jarray52> hcarty: thanks. #require "batteries";; did the trick.
<bjorkintosh> jarray52, did rlwrap work out?
letrec has quit [Ping timeout: 252 seconds]
<jarray52> bjorkintosh: rlwrap worked out amazingly well. Thanks.
<jarray52> bjorkintosh: My distro has an interactive development environment for Ocaml called cameleon. Any thoughts on it?
jamii has joined #ocaml
<bjorkintosh> i've never used it or even heard of it.
<bjorkintosh> i just use my text editor, tmux, and repler ...
<bjorkintosh> each time i save, it automatically compiles and runs in the next window over.
<bjorkintosh> so i can see what's going on immediately.
Cyanure has joined #ocaml
thomasga has joined #ocaml
<jarray52> bjorkintosh: tmux looks useful.
* ssbr_ is using xmonad to similar effect
<thelema> hcarty: actually, extlib is being maintained, although just barely
silver has quit [Remote host closed the connection]
<thelema> hcarty: that said, I think its authors consider it like TeX - Perfect because any bugs are intended.
cyphase has joined #ocaml
<jarray52> bjorkintosh: Do you use anything for autocompletion?
<bjorkintosh> vi has an autocompletion package. i just use that.
<bjorkintosh> jarray52, are you on a mac or linux?
<jarray52> Bjorkintosh: Linux
<bjorkintosh> ah. which text editor do you use? emacs?
<ssbr_> the camlp4 docs aren't actually that bad. I was linked to a wiki that was supposed to be better, but often it just repeated what the official tutorial said, in unreadable contextless bullet-point form...
<jarray52> bjorkintosh: gedit...sometimes kate... sometimes vi... but haven't really gotten use to vi yet.
thomasga has quit [Ping timeout: 245 seconds]
<bjorkintosh> i'm not familiar with the other ones, do they support ocaml or ml?
<jarray52> kate apparently has a plugin
<ssbr_> I'm using kate to edit ocaml right now. It's a very good syntax highlighter.
<ssbr_> (I tried editing it to handle a different ML once; it's very thorough)
Tobu has quit [Ping timeout: 272 seconds]
<jarray52> hcarty: after running #require "batteries";; the command open ExtLib is not recognized. I'm trying to use the command ExtLib.List.unique.
<thelema> jarray52: use `open Batteries_uni` instead
srcerer_ is now known as srcerer
<thelema> and then just List.Unique
<jarray52> thelema: I'm told that List.Unique is an unbound constructor
<jarray52> thelema: BatList.unique works.
<thelema> sorry, List.unique (lowercase U)
<jarray52> thelema: Is that unstable?
diego_diego has quit [Quit: diego_diego]
<jarray52> That works.
<thelema> batteries? no.
<jarray52> According to this post(8 September 2010), BatList.sort_unique is unstable. That is why I asked.
<ssbr_> In camlp4, would "LIST1 [k = relat -> k]" be equivalent to "LIST1 relat", or else, what does that "[k = relat -> k]" mean?
err404 has joined #ocaml
<thelema> oh, sorry. You meant unique, not batteries
<ssbr_> (I would test this, but it appears that the project's test suite doesn't work. :S -- sending an email now)
<thelema> sort_unique is unstable; reordering its input
<thelema> List.unique is stable - it doesn't reorder its input, and keeps the last copy of each identical value
<jarray52> I assume significant progress has been made since the post and the post itself may be inaccurate.
<jarray52> thelema: Thanks for the open Batteries_uni command.
<thelema> jarray52: not at all, that code has been the same for a long time. If you're interested in improving it, we'll take improvements.
<jarray52> thelema: yes, I meant sort_unique. Thanks. that clarifies.
<jarray52> thelema: I just started learning OCaml. It will be a while before I can contribute to library functions.
<thelema> If you can do some benchmarking and write tests, you can contribute lots.
<bjorkintosh> btw, is there a book on 'advanced ocaml' or better yet, 'advanced functional programming techniques'?
chambart has joined #ocaml
<thelema> bjorkintosh: not that I know of. There's a number of levels of "advanced", some of which I'm not at myself after 10 years.
avsm has quit [Quit: Leaving.]
<bjorkintosh> heh. one merely needs to know systemF n'est ce pas?
<thelema> bjorkintosh: lol
<bjorkintosh> i keed.
<bjorkintosh> maybe i'll try to read some lisp book alongside and see.
<bjorkintosh> all the books i have right now, are on sml.
<bjorkintosh> but it looks like it is a bit of a dead end right now.
<bjorkintosh> so i'm using the ocaml compiler instead. maybe i should annotate them a bit.
<thelema> OCaml is doing a bit better lately in terms of active development
<bjorkintosh> have you read the little mler by any chance?
<thelema> nope
<thelema> "functions are people too"!
iago has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
djcoin has quit [Quit: WeeChat 0.3.2]
Tobu has joined #ocaml
<thelema> jarray52: https://gist.github.com/2654445 - benchmarking unique functions
<thelema> what's the best quick tricks to transpose a list of lists?
<jarray52> thelema: What do you mean by transpose?
<jarray52> iterative List.rev?
<thelema> as matrix transpose
<jarray52> I should say recursive use of List.rev.
<thelema> umm, I want the first elements of all input lists to be the first row of the output
<thelema> Hmm, maybe transpose should go into BatList...
<thelema> I'm a bit worried about the second case in that code - [] :: xss -> transpose xss
<thelema> eh, it seems to work.
ulfdoz has joined #ocaml
<hcarty> thelema: I have a transpose that could be added to BatArray... but I expect a BatMatrix (or BatArray2d?) would be a better target for something like that.
<thelema> we can Experimental that. I like BatMatrix
<hcarty> thelema: Ulib has a Matrix/2D-array module which could be pulled from.
<thelema> nice.
<thelema> mrvn: I guess it's time to run some benchmarks
<thelema> I think I like your code better
iago has quit [Ping timeout: 248 seconds]
<mrvn> List.map and map2 aren't tail recursive. :(
<thelema> mrvn: they are in batteries
ftrvxmtrx has quit [Quit: Leaving]
<mrvn> Line 5 is not needed.
<thelema> sure, just premature optimization
<mrvn> Should probably also catch (Invalid_argument "List.map2") and raise (Invalid_argument "transpose")
<mrvn> For when the lists are different length.
<thelema> yup
<mrvn> http://paste.debian.net/168196/ recursive solution
<mrvn> This time line 3 actualy is needed.
<mrvn> Uses twice as deep a recursion so fails at half the size of the matrix.
<thelema> mrvn2 (178.28 ns) is 2.7% faster than
<thelema> sepp2k (183.23 ns) which is 25.4% faster than
<thelema> mrvn1 (245.49 ns)
<thelema> for the 3x3 example in your first paste
<mrvn> try 10x10 or 100x100
<thelema> for 10x10:
<thelema> mrvn1 (2.13 us) is probably (alpha=9.11%) same speed as
<thelema> mrvn2 (2.20 us) which is 2.4% faster than
<thelema> sepp2k (2.25 us)
<thelema> for 100x100:
<thelema> sepp2k (369.89 us) is 12.3% faster than
<thelema> mrvn2 (421.81 us) which is 34.7% faster than
<thelema> mrvn1 (645.70 us)
<mrvn> 1000x1000?
<mrvn> I think you get some GC runs in some of your tests but not others.
<thelema> with 500x500:
<thelema> mrvn2 (50.36 ms) is probably (alpha=6.49%) same speed as
<thelema> sepp2k (51.28 ms) which is 4.5% faster than
<thelema> mrvn1 (53.71 ms)
<thelema> I've turned on Gc between tests, new 500x500 results coming
emmanuelux has joined #ocaml
<thelema> sepp2k (49.64 ms) is 1.8% faster than
<thelema> mrvn2 (50.58 ms) which is 7.5% faster than
<thelema> mrvn1 (54.68 ms)
<mrvn> Why can't I write ( :: ) or why isn't there a List.cons?
<thelema> mrvn: in batteries there is.
<thelema> (::) isn't a function, it's technically a variant constructor
<mrvn> List.map2 ( :: ) x (transpose xs) would look good
<thelema> type 'a list = (::) of 'a * 'a list | []
<mrvn> thelema: yeah. I want first class constructors. :)
<thelema> mrvn: the dev team had them but decided that they weren't worth the extra compiler complexity, so they got removed between caml special light and ocaml
<mrvn> thelema: Since batteries has mutable lists internally you could change mrvn1 to use append int the List.map2 call and remove the List.rev
larhat has quit [Quit: Leaving.]
<thelema> actually, we don't have an efficient append.
<thelema> at least we don't expose one
<thelema> we just hide it internally
<thelema> I guess we could do the same for this code...
<thelema> except we'd have to... hmm...
<alpounet> yeah this is quite a pitty not to have first class constructors...
<thelema> alpounet: only a slight pity
<alpounet> well, it would just happen to be really convenien for OCaml programmers
jarray52 has left #ocaml []
eni has joined #ocaml
mononofu has quit [Remote host closed the connection]
<thelema> mrvn: good call, here's numbers on 500x500:
<thelema> w/append (23.94 ms) is 52.2% faster than
<thelema> sepp2k (50.12 ms) which is probably (alpha=22.40%) same speed as
<thelema> mrvn2 (50.50 ms) which is 9.1% faster than
<thelema> mrvn1 (55.53 ms)
<mrvn> thelema: the Batteries internal append or @?
<thelema> batteries internal append
<mrvn> thelema: Is that like mine?
<thelema> similar - the next is a plain list
<thelema> and we use a function 'inj' to turn our record into a list
<thelema> there's my implementation
<thelema> only one call to obj.magic (as inj) in it
<mrvn> makes sense.
<thelema> I don't get your [make2] function - why head=t?
jamii has quit [Ping timeout: 260 seconds]
<thelema> actually, I've not tested mine...
<mrvn> thelema: the list itself.
<mrvn> thelema: I think yours doesn't work. You need to remember the initial head of the list and at the end return that.
<thelema> you're right.
<thelema> that was what I was worrying about...
<thelema> I think I fixed it...
<thelema> and it works now, with similar performance
<thelema> w/append (29.30 ms) is 42.1% faster than
<mrvn> thelema: List.map inj l0 ==> Obj,agic l0
<mrvn> thelema: List.map inj l0 ==> Obj.magic l0
<thelema> lol
<thelema> yup
<mrvn> thelema: Just means you have to specify the type for transpose or the Obj.Magic doesn't work right
<mrvn> How much does that gain us?
<thelema> probably not much...
<thelema> one sec...
<thelema> mean: 29.33 ms, 95% CI: (27.80 ms, 30.31 ms)
<thelema> neglegible difference
<thelema> w/append (28.83 ms) is 43.2% faster than
<thelema> fun picture comparing list uniquie methods: http://oi49.tinypic.com/2lvyc1t.jpg
<thelema> *unique
<mrvn> only log size 1-10?
Tobu has quit [Ping timeout: 272 seconds]
<thelema> log base e, the actual range is 10 to 100K
<thelema> (on the todo for the plotter is to put actual values on x axis, not transformed values)
<mrvn> yeah, would be much better
<mrvn> The line is average and the area the spread of multiple runs?
<mrvn> or standard deviation?
<thelema> line is average, area is 95% CI
<mrvn> must have hit a pretty bad hash collition there
<mrvn> collision even
<thelema> well, the data to be uniqued is odd - I'm tweaking it now, it was just random strings representing numbers 1-100
<mrvn> can you move the labels outside the grid? Align left instead of center
<thelema> the label position corresponds to the rightmost point, so the order of the labels is the order of the extreme values
<thelema> but I think that the labels can be moved, yes
<thelema> although the padding around the grid would have to be adjusted, I think
<mrvn> Having them not overlaping would be great too but probably harder
<thelema> I dunno if archimedes will do this automatically
<thelema> yes, not-overlapping is harder.
<thelema> patches welcome
ftrvxmtrx has joined #ocaml
Tobu has joined #ocaml
<mrvn> I just tested and using alpha blending is faster than color key for my game. odd.
<thelema> hardware accel?
larhat has joined #ocaml
jonafan has joined #ocaml
jonafan has quit [Client Quit]
<mrvn> thelema: Its all software surfaces in sdl. I don't think any of them should use hardware even if I have it.
<thelema> maybe float math is faster than table lookups?
<mrvn> color key is that one special color is transparent. No floats.
<thelema> oh. hmm.
<thelema> got me.
<thelema> voodoo.
<mrvn> It takes 120ms to draw a frame, which is quite disapointing.
<thelema> 8 fps? blah
Tobu has quit [Ping timeout: 272 seconds]
Xizor has joined #ocaml
<mrvn> 12ms to update the video buffer, 8ms mini map, 96ms terrain, 6ms units, items and buildings
<thelema> time to optimize terrain handling
<mrvn> Seems like I really do need to buffer the terrain so I only need to draw it when the viewpoint changes.
snearch has joined #ocaml
jonafan has joined #ocaml
<mrvn> Does anyone have a debug module that can never/always/choose_at_runtime print debug messages?
iago has joined #ocaml
<hcarty> mrvn: BatLog or https://github.com/hcarty/log4ml
<hcarty> mrvn: Using Log4ml.Easy
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<hcarty> mrvn: I'm heading off for a while, but if you have any questions about the module I can answer them when I get back.
<mrvn> hcarty: That won't completly optimize away if I want to turn debugs off.
<thelema> mrvn: you basically need macros for that, or to have the logging function compiled into your code and triggered off a non-ref value.
<mrvn> does ocamlopt remove unreachable code as in let level = 5 ... if (9 < level) ....?
<thelema> yes
<mrvn> So making level not a ref should help.
<mrvn> And then I think all arguments need to be lazy so they only evaluate when needed.
gnuvince_ has quit [Ping timeout: 256 seconds]
<thelema> you need the level to be declared as part of your project before the logging code for that to work
<mrvn> thelema: yes.
<thelema> ok then, I guess we have another logging module in the world
<mrvn> thelema: make logging a functor that takes the level as argument or something.
<mrvn> Would be nice to have a Lazy.printf
gnuvince has joined #ocaml
<mrvn> Maybe I should learn camlp4 for that. It could remove the debug statements at compile time depending on the level.
Tobu has joined #ocaml
j2d2j2d2_ is now known as j2d2j2d2
eni has quit [Quit: Leaving]
err404 has quit [Remote host closed the connection]
Anarchos has joined #ocaml
jamii has joined #ocaml
snearch has quit [Quit: Verlassend]
Xizor has quit []
Tobu has quit [Ping timeout: 272 seconds]
Snark has quit [Quit: Quitte]
rly has left #ocaml []
gnuvince has quit [Ping timeout: 244 seconds]
Tobu has joined #ocaml
oriba has joined #ocaml
Submarine has quit [Ping timeout: 245 seconds]
gnuvince has joined #ocaml
xcvd has joined #ocaml
jamii has quit [Read error: Operation timed out]
_andre has quit [Quit: leaving]
Cyanure has quit [Remote host closed the connection]
joelr has joined #ocaml
joelr has quit [Client Quit]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
roha has joined #ocaml
<pippijn> how can I get context dependent keywords with ocamlyacc/ocamllex?
Tobu has quit [Ping timeout: 272 seconds]
bjorkintosh has quit [Read error: Operation timed out]
patronus has joined #ocaml
<mrvn> you can't. they are for context free grammaers
patronus_ has quit [Read error: Connection reset by peer]
BiDOrD_ has quit [Ping timeout: 260 seconds]
BiDOrD has joined #ocaml
<pippijn> ok
<pippijn> so I need to use dypgen?
<ssbr_> blagagh. Is this the place to ask about camlp4 stuff?
<ssbr_> I'm having trouble dealing with the grammar of things that can be of the form "Foo(a:b)" versus "Foo(a).". camlp4 complains that it was expecting a ":" in the latter case, whereas I want it to realize that if it encounters a ')' (or ','), then things are of the second form, not the first
<ssbr_> grammar is so far unwrapped to this point: http://bpaste.net/show/Fcq2e6cEpsFOB0Zn3dE7/
<ssbr_> I _think_ this should be possible for LL(1), right? I'm not too sure of the theory, but you only need that one next character: if it's ":" it's the first case, if it's "," or ")" it's the second or third case (and then you distinguish based on ":" or ".")
<ssbr_> oh, maybe I can hack around this using a first required thing and then LIST0? I assume it's LIST1 that's confusing camlp4
smondet` has quit [Ping timeout: 245 seconds]
xcvd has quit [Quit: Leaving]
<ssbr_> well that changed the error to ":" or "," or "," expected after [variable] (in [expr])
<ssbr_> instead of just ":". So something else is also broken. Wooo.
roha has quit [Ping timeout: 265 seconds]
<ssbr_> I really wish it'd say something like "found <x> instead". I don't know how to debug this.
Tobu has joined #ocaml
roha has joined #ocaml
tufisi has quit [Ping timeout: 252 seconds]
chambart has quit [Quit: WeeChat 0.3.2]
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
roha has quit [Ping timeout: 245 seconds]
larhat has quit [Quit: Leaving.]
letrec has joined #ocaml
_habnabit has quit [Quit: ZNC - http://znc.sourceforge.net]