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
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 245 seconds]
Tobu has quit [Ping timeout: 260 seconds]
machine2 has quit [Ping timeout: 246 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz_ is now known as ulfdoz
machine2 has joined #ocaml
err404 has quit [Quit: Ex-Chat]
Tobu has joined #ocaml
iago has quit [Quit: Leaving]
letrec has joined #ocaml
tautologico has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
everyonemines has joined #ocaml
gnuvince has quit [Quit: C-x C-c]
gnuvince has joined #ocaml
letrec has quit [Remote host closed the connection]
emmanuel__ has quit [Read error: Connection reset by peer]
letrec has joined #ocaml
everyonemines has quit [Quit: Leaving.]
emmanuelux has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
smerz has quit [Remote host closed the connection]
cdidd has joined #ocaml
tautologico has quit [Quit: tautologico]
hiptobecubic has joined #ocaml
cdidd has quit [Remote host closed the connection]
Tobu has joined #ocaml
cdidd has joined #ocaml
Submarine has joined #ocaml
Fabio has joined #ocaml
Zedrikov has joined #ocaml
Cyanure has joined #ocaml
Submarine has quit [Read error: Connection reset by peer]
ggherdov has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
ggherdov has left #ocaml []
Tobu has quit [Ping timeout: 272 seconds]
haelix has quit [Ping timeout: 240 seconds]
haelix has joined #ocaml
zorun has quit [Ping timeout: 244 seconds]
zorun has joined #ocaml
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
penryu has joined #ocaml
<penryu> I'm trying to make sure I understand the difference between these two expressions.
<penryu> since, I think to the average C/C++ programmer, they're indistinguishable
<penryu> let x = 5 (* this is a symbolic operation *)
<penryu> x <- 5 (* this is an ... imperative operation? *)
<_habnabit> yes. the latter mutates something, and the former doesn't
<penryu> since in the first isn't an assignment, despite the =; it merely tells the interpreter/compiler that x is hereafter synonymous with the value 5
<_habnabit> yes
<penryu> ah. thank you.
<penryu> even if, in the second expression, x is already the value 5, so it not mutated. it's just the intent of the operation that x is not a label or symbol representing a value, but an actual container for value(s)
<_habnabit> I can't parse the first part of what you said, but the rest is accurate
<_habnabit> := does the same thing
<penryu> ok. the second part is what mappers. the first is just disclaimer.
<penryu> sigh.
<penryu> *matters*
<penryu> _habnabit: thanks.
<penryu> I'm fascinated by ML's approach to FP, but I'm still somewhat new.
skchrko has joined #ocaml
<mrvn> penryu: let x = 5 --> int *x = &5, x <- 5 --> *x = 5
<penryu> I've thought of the "let x =" as more like a const or, maybe a #define is even closer to the definition.
<penryu> I'm more trying to wrap my head around the semantic different between symbolic and imperative operations.
<mrvn> penryu: wether it is const or not depends on what you bind. let x = "foo" in x.[0] <- 'F'
<penryu> and I think I've mostly got it.
<mrvn> Point is that let just gives the thing a new name
<penryu> ok
<mrvn> or in other words let never makes a copy.
<penryu> ah, gotcha.
<flux> it is basically 'const'. let x = 5 is const int x = 5, however let x = "hello" is char* const x = "hello"
<flux> I suppose mrvn was pointing to tagging with the pointers and all, but that doesn't happen with integers
<flux> actually I should say it's int const x = 5 to be a bit more consistent :)
<mrvn> flux: makes no difference semantically wether ints are boxed or not.
<flux> mrvn, well it does, when you use identity comparison operator
<flux> but, breakfast
letrec has quit [Ping timeout: 264 seconds]
fantasticsid has joined #ocaml
fantasticsid has quit [Client Quit]
bkheops has joined #ocaml
larhat has joined #ocaml
Anarchos has joined #ocaml
err404 has joined #ocaml
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
larhat1 has joined #ocaml
larhat has quit [Read error: No route to host]
sgnb has quit [Read error: Operation timed out]
sgnb has joined #ocaml
lorill has joined #ocaml
Hussaind has joined #ocaml
Hussaind has quit [Read error: Connection reset by peer]
Hussaind has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Hussaind has quit [Read error: Connection reset by peer]
Hussaind has joined #ocaml
tufisi has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
larhat1 has quit [Quit: Leaving.]
benozol has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
tufisi has quit [Read error: Operation timed out]
Anarchos has joined #ocaml
tufisi has joined #ocaml
<pippijn> what is a good book on ocaml?
<pippijn> or are books not recommended for ocaml?
<reynir_> We don't read them book
<Qrntz> I've read practical ocaml, but it's nowhere as good as practical CL, honestly
<reynir_> Seriously though, Jason Hickey's book on ocaml is OK although it's still a draft
<reynir_> (I have only read the first ~8 chapters)
<pippijn> it's my birthday soon and I need to give some ideas.. I never have any ideas
<pippijn> is there a book I should read if I'm interested in type theory?
<reynir_> There's "Types and programming languages" by Benjamin Pierce. I have heard it's good
Kakadu has joined #ocaml
eni has joined #ocaml
dnm has quit [Ping timeout: 248 seconds]
dnm_ has joined #ocaml
<pippijn> reynir_: ok, looks good
ccasin has quit [Ping timeout: 245 seconds]
ccasin has joined #ocaml
nimred has quit [Ping timeout: 265 seconds]
<pippijn> you read it?
benozol has quit [Ping timeout: 246 seconds]
Cyanure has quit [Remote host closed the connection]
ankit9 has joined #ocaml
nimred has joined #ocaml
ankit9 has quit [Ping timeout: 252 seconds]
pheredhel has quit [*.net *.split]
mehitabel has quit [*.net *.split]
pheredhel has joined #ocaml
mehitabel has joined #ocaml
ankit9 has joined #ocaml
reynir_ has quit [Ping timeout: 265 seconds]
lorill has quit [Quit: Ex-Chat]
<skchrko> pippijn, http://realworldocaml.org/ is going to be good
<skchrko> pippijn, but it's not there yet :)
benozol has joined #ocaml
reynir has joined #ocaml
milosn_ has joined #ocaml
benozol has quit [Read error: No route to host]
benozol has joined #ocaml
milosn has quit [Ping timeout: 245 seconds]
lihaitao has joined #ocaml
eni has quit [Ping timeout: 252 seconds]
letrec has joined #ocaml
ppilate has joined #ocaml
benozol has quit [Ping timeout: 244 seconds]
eni has joined #ocaml
err404 has quit [Quit: Ex-Chat]
bkheops has quit [Remote host closed the connection]
skchrko has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Ping timeout: 264 seconds]
skchrko has joined #ocaml
ftrvxmtrx has joined #ocaml
pango is now known as pangoafk
ppilate has left #ocaml []
lihaitao has quit [Quit: Ex-Chat]
lihaitao has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Hussaind has quit [Write error: Connection reset by peer]
Hussaind has joined #ocaml
larhat has joined #ocaml
pangoafk is now known as pango
emmanuelux has joined #ocaml
benozol has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
oriba has joined #ocaml
hiptobecubic has quit [Ping timeout: 246 seconds]
ankit9 has quit [Quit: Leaving]
hiptobecubic has joined #ocaml
ulfdoz has quit [Quit: brb]
ftrvxmtrx has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
ftrvxmtrx has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
nico has joined #ocaml
nico is now known as Guest93853
Guest93853 has left #ocaml []
nico-tls has joined #ocaml
<nico-tls> bonjour, je "débute" en caml et j'ai un petit souci : l'utilisation de Scanf.fscanf me fait avancer la position de lecture (pos_in) de quelques 1000 caractères... normal ?
Candiae has joined #ocaml
<mrvn> if only everyone would understand french
cdidd has quit [Remote host closed the connection]
<hiptobecubic> adrien, nico-tls
<nico-tls> hi mrvn
<nico-tls> English is fine for me too
<nico-tls> I am beginning with caml, and my problem is that using Scanf.fscanf move the input position (post_in) approximately 1000 characters forward
<nico-tls> that's not very convenient as I would like to use input_byte after to read a file. so is it normal? avoidable?
<gnuvince> nico-tls: (je parle français, donc si tu te sens plus à l'aise, te gêne pas) on peut voir ton bout de code?
<mrvn> sure that is not just the buffering of the in_channel?
<gnuvince> Oh, that last part was supposed to be in English; can we see your code?
benozol has quit [Quit: Konversation terminated!]
<penryu> I'm very new as well, but is that what the docs at http://caml.inria.fr/pub/docs/manual-ocaml/libref/Scanf.html warn about?
<nico-tls> here is a screenshot (128kio) with the code on the left side, toplevel on right side: http://www.izipik.com/fr/images.php?date=201204/21&img=lzwkvkhiuey9kfbudj-capture_du_2012-04-13_22_07_11.png
<nico-tls> the use of Scanf.fscanf f "%d %d " (fun w h -> width := w; height := h); just after the "read metadata" comment moves pos_in around 1000 chars forward
<nico-tls> line starting with (* *) are meant to print the current input position (in brackets)
<nico-tls> penryu: which warning ? I don't see anything regarding the position
<nico-tls> oh, I found it...
<nico-tls> thank you mrvn and penryu
<nico-tls> I should have read the doc more attentively
milosn_ is now known as milosn
<nico-tls> so is there a way to use fscanf to read characters from a binary file containing integers, the same way as input_byte does?
<vext01> anyone using ocamleditor?
Anarchos has joined #ocaml
<mrvn> nico-tls: maybe with bscanf and %r or something
err404 has joined #ocaml
reynir has quit [Ping timeout: 260 seconds]
lihaitao has quit [Read error: Connection reset by peer]
<mrvn> gildor: ping. Could you make a release of ExtUnix please?
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
ggherdov has joined #ocaml
ggherdov has left #ocaml []
eni has quit [Ping timeout: 245 seconds]
<pippijn> interesting, wyrd is in ocaml, now?
<Anarchos> pippijn what is wyrd ?
<pippijn> I thought it was written in C++ before
<pippijn> ocaml, it's true..
<vext01> looks nice
<vext01> can it integrate with gmail?
<pippijn> no
<pippijn> it's purely a frontend for remind
<vext01> thats what I have been waiting for in a text based cal
<pippijn> ok, it seems it was always ocaml
<pippijn> I saw assertion failures before, but it was probably the C part of libncurses
NihilistDandy has joined #ocaml
<zorun> vext01: you might want to look at calcurse
reynir has joined #ocaml
eni has joined #ocaml
<zorun> it doesn't integrate with gmail, but you can easily import/export icalendar files
<vext01> zorun: yeh i have had my eye on that
<zorun> and it's quite hackable :)
<vext01> gmails was on the feaure list
<vext01> is it implemented now?
avsm has joined #ocaml
<zorun> was it?
<zorun> I doubt so
Candiae has quit [Ping timeout: 245 seconds]
eni has quit [Ping timeout: 265 seconds]
<vext01> once upon a time they had a wishlist
ski has quit [Ping timeout: 265 seconds]
ski has joined #ocaml
letrec has quit [Ping timeout: 246 seconds]
<hiptobecubic> wyrd looks really great
<mrvn> I need an idea for creating a terrain map for a game. Terrain goes from Ocean to snow covered mountains in 5 steps and tiles are hexagonal. ideas?
tmaeda is now known as tmaedaZ
<hiptobecubic> ideas for what
<thelema_> mrvn: on how to generate?
<mrvn> how to generate such a map that isn't just completly random tiles.
<hiptobecubic> probabilistic function to choose tile type?
<hiptobecubic> such that low values are ocean, high are snow mountains, etc?
<mrvn> hiptobecubic: that puts snow capped mountains next to ocean. Should be a slope going through the terrains.
<mrvn> thelema_: that looks perfect
<hiptobecubic> hmmm wyrd isn't building
<mrvn> thelema_: also looks complex.
<thelema_> true
<mrvn> At the moment I would love something trivial just so I can continue doing other stuff.
<flux> mrvn, maybe you could use perlin noise to generate the platform and then somehow fit your tiles into it
<flux> (fitting = find a tile with best correlation with a piece on the high-resolution map)
<hiptobecubic> Can anyone tell me what this error means and whose fault it might be? http://vpaste.net/Nr9iK
xlq has joined #ocaml
<mrvn> flux: Do you have a better explanation of perlin noise than wikipedia?
<flux> mrvn, well, I have code! it's inside goba: http://www.modeemi.fi/~flux/goba/ http://www.modeemi.fi/~flux/goba/goba-891-src.tar.gz perlinNoise.ml
<flux> basically it is summing n sin functions that have different phase and different weight
<hiptobecubic> alright, I guess i give up on this build error for wyrd. ocaml's compiler errors defeat me.
<xlq> I wrote a polymorphic function and called it, and it all went well. Then I called it from a different place, with different types, and got a type error at the original call.
<mrvn> xlq: was it 'a or '_a?
<xlq> It's as if the type parameters of the polymorphic function got unified, so that it was no longer polymorphic.
<xlq> mrvn: 'a I think. What's '_a?
<mrvn> xlq: a type that is jet to be unified
<xlq> Well annotating the polymorphic function doesn't seem to help.
<thelema_> xlq: what's the inferred type?
<xlq> Of the polymorphic function? Don't know. How can I find out?
<thelema_> xlq: use this style annotations: http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc79
<thelema_> to find out the type, enter it in the topleve
<thelema_> *topvelel
<thelema_> or compile with -annot
<thelema_> and use emacs' C-c C-t to show the type
<thelema_> or use ocamlc -i to print the interface
eni has joined #ocaml
Hussaind has quit [Remote host closed the connection]
Zedrikov has quit [Quit: Bye all, see you next time!]
Zedrikov has joined #ocaml
<xlq> I seem to have to go through dependency hell to use the top-level ("unbound module..."). Compiling with -annot produces non-human-readable files. ocamlc -i also has problems with "unbound module".
<xlq> If I use the 'a 'b . ... form, I get
Kakadu has quit [Quit: Konversation terminated!]
<xlq> No idea how that's less general. It's exactly the same except for the quantification.
<flux> quantification is "for all", without it it means "exists"
<xlq> Despite being able to pass any value to " val f: 'a -> 'a " ?
<flux> consider this function: val f: unit -> ('a. 'a -> 'a)
<xlq> So f returns a function that maps from any type to itself?
<flux> how would you implement it?
<flux> (basically it can only return the identity function)
<xlq> Because it doesn't know how to operate on 'a?
<flux> yes
<xlq> But how is val f : unit -> ('a -> 'a) different?
<xlq> Surely if f () is a function that is not the identity function, then 'a would've been unified already.
<xlq> Well, if I have val f : unit -> ('a -> 'a) and I call f () 1, can I not then call f () [] ?
<flux> you can, because that's the same as val f : unit -> 'a -> 'a
xaimus has quit [Ping timeout: 246 seconds]
<xlq> In the second type in my paste, does (string -> 'f -> 'e -> 'd) have to be a function for all 'f, 'e and 'd?
Tobu has quit [Ping timeout: 260 seconds]
tmaedaZ has quit [Ping timeout: 272 seconds]
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
xaimus has joined #ocaml
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
tmaedaZ has joined #ocaml
<xlq> Here's a map-and-reverse function showing my problem: https://gist.github.com/2439133
hiptobecubic has left #ocaml []
<xlq> 'a list -> 'a list -> 'a list is less general than 'b. 'b list -> 'b list -> 'b list
<flux> xlq, you are requiring that the first argument of the function is the identity function
<flux> I doubt you want that
zaltekk has joined #ocaml
<xlq> I don't understand how I'm requiring that.
<flux> well, can you give me a function that satisfies that type?
<xlq> That satisfies ('a -> 'a) ?
<flux> that satisfies 'a. 'a -> 'a
<flux> the scopeof 'a btw isn't the whole signature, it ends at the first ->
<xlq> O_o
<pippijn> what's 'a. 'a -> 'a?
<flux> basically: you don't need 'a. in that case
<pippijn> what's the 'a. part?
<flux> and actually the quantifiers are very rarely required anyway
<thelema_> # let f : 'a. ('a -> 'a) -> 'a list -> 'a list = List.map;;
<thelema_> val f : ('a -> 'a) -> 'a list -> 'a list = <fun>
<thelema_> # f (fun x -> x+1) [3];;
<thelema_> - : int list = [4]
<zaltekk> hey guys...i'm interested in learning ocaml. i checked out amazon and saw that the Practical OCaml book from 2006(the only relevant result) had horrible reviews. where should i start learning?
<pippijn> ah 'a. makes sure a variable is actually polymorphic?
<zaltekk> i typically look for a book to get a good introduction to a new language
<flux> thelema_, hmm, it seems to me that I've had a misunderstanding then
<flux> xlq, I was definitely wrong about the 'a scope as wel :)
<xlq> Yeah.
<zaltekk> anybody?
<flux> why does that example then fail, though?
<thelema_> zaltekk: the caltech book? (hickey)
<mrvn> flux: paste?
<zaltekk> thelema_: searching
<flux> if I remove the 'a. quantifier, it works just fine
<Anarchos> newbie error : confused by the value of LC_CTYPE at compile time (compiling ocaml)
<xlq> flux: This case does, yeah :-\
<flux> so the quantifier isn't just a no-op there
<zaltekk> thelema_: yep just found it. thanks!
<zaltekk> also, are questions about editors/ides offtopic here>
<mrvn> flux: you aren't allowed to use 'a. just anywhere
<thelema_> zaltekk: emacs
<flux> mrvn, but what about thelema's example then?
<zaltekk> thelema_: mostly just curious if there isn't anything with intelligent code completion. is there an emacs mode?
<Anarchos> zaltekk there is a vim one
<mrvn> flux: That needs the 'a. to escape the value restriction I think.
<Anarchos> zaltekk and an emacs one too
<thelema_> zaltekk: yes, tuareg without completion and typerex with (newer)
<zaltekk> okay, thanks guys
<flux> mrvn, it doesn't need 'a., it is completely optional
<xlq> "The other application is to ensure that some definition is sufficiently polymorphic."
<eni> is there anything like the '.' in haskell in Ocaml?
<xlq> I think this is what I want to use it for.
<xlq> eni: Function composition. No, unfortunately.
<thelema_> eni: let (|>) x f = f x
<xlq> Because such an operator cannot be ascribed a type.
<flux> thelema_, that's not the . operator though, but the $ operator :)
<thelema_> not equivalent, but similarly useful
<xlq> let compose f g x = f (g x)
<eni> # plusone;;
<eni> - : int -> int = <fun>
<eni> # plustwo;;
<eni> - : int -> int = <fun>
<eni> # let plusthree = plusone |> plustwo;;
<eni> Error: This expression has type int -> int
<eni> but an expression was expected of type (int -> int) -> 'a
<thelema_> eni: not pointfree
<thelema_> let plusthree x = plusone x |> plustwo
<thelema_> let (|-) f g x = g (f x)
<thelema_> let plusthree = plusone |- plustwo
<eni> ok
<xlq> let plusthree = compose plusone plustwo
<zaltekk> thelema_: that book looks like exactly what i wanted, thanks again
Zedrikov is now known as ndulobot
ndulobot is now known as Zedrikov
Zedrikov is now known as tennis
tennis is now known as Zedrikov
nico-tls has quit [Quit: Page closed]
Zedrikov is now known as tennis
Submarine has quit [Read error: Connection reset by peer]
tennis is now known as Zedrikov
<mrvn> Map generated with corral growth.
<xlq> I think I've found the problem.
<xlq> I declared the type in an .mli file and got:
<xlq> It's always the simple things that go wrong >_<
<xlq> Oh wait, no, the stuff I put in the .mli file was wrong :(
<xlq> I still have the problem.
<Anarchos> xlq try to erase the .mli file and compile with ocamlc -i
<xlq> OK, so I've declared the function in the .mli and I've defined it in the .ml. It compiles.
<xlq> But when I actually use the function in the .ml file, it complains that the implementation doesn't match the interface. When it does so, it displays the specific instantiation of the function's type in its error message.
<xlq> Aha! I define the function in a "let rec ... and ... and ...".
<xlq> When I move it out of that series of recursive definitions, everything works!
<xlq> Solved. Here's a test-case. I wouldn't have expected "let rec" to make any difference to that!
Hodapp has joined #ocaml
<Hodapp> I am examining http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html; first they give their recursive functions for insertion sort, and they say that the function becomes polymorphic by virtue of <=, the comparison operator, being polymorphic
<Hodapp> They discuss variants later, and give an example: 'type sign = Positive | Negative;; let sign_int n = if n >= 0 then Positive else Negative;;'
<Hodapp> If the >= operator is polymorphic and I can't really see anything else being used in that function then why is sign_int not also polymorphic?
<xlq> It should be.
<xlq> Oh, no, because you compared to 0 of course.
<xlq> (>=) is 'a -> 'a -> bool.
<xlq> By doing n >= 0 you have bound 'a to int.
<Hodapp> oh... wow, I should have noticed that.
<Anarchos> Hodapp it reminds me the famous boolean type definition of D. Knuth : typedef boolean = enum {true,false, woops} :)
<Hodapp> lol
<xlq> haha
<Hodapp> This whole 'a thing is looking sort of like templates in C++, only not an atrocious clusterf**k.
eni has quit [Ping timeout: 264 seconds]
<xlq> Hodapp: That's pretty much what it is. But it's less powerful. It's not Turing-complete at compile-time, and you can't operate on polymorphic parameters without being given functions to do so.
<xlq> But one implementation is shared with all instantiations, so there's no code bloat.
<xlq> For example, in C++ you can write a "function" that maps from type to type. You can't do that in Caml.
<Hodapp> xlq: When the compiler generates errors that are longer than the code and make no sense whatsoever, I'll gladly eschew the compile-time Turing completeness.
tmaedaZ has quit [Ping timeout: 265 seconds]
<xlq> Hodapp: Indeed.
<zaltekk> but paragraph-long errors are the best :P
<Hodapp> Maps from type to type - how do you mean?
<xlq> Hodapp: f<int>::t x; // declares x to be of type f(int).
<Hodapp> How would f then be used?
<xlq> No, f(int) gets evaluated at compile-time.
<xlq> So if you've defined f to map int to long int, then x will be of type long int.
tmaedaZ has joined #ocaml
<Hodapp> I feel like this is not worth the added complexity.
<xlq> A perfectly reasonable opinion indeed!
rly has joined #ocaml
<rly> I get checking for lablgtk2.sourceview2... ocamlfind: Package `lablgtk2.sourceview2' not found
<rly> I installed lablgtk into somewhere below /usr/lib.
<Hodapp> Any recommendation for good interactive environments? Right now I'm just using 'ocaml' itself but I might like to recall earlier lines and edit and such...
<rly> ./configure doesn't appear to give any options to set the path to look.
<rly> This is for lablgtkextras-1.1
avsm has quit [Quit: Leaving.]
Tobu has joined #ocaml
skchrko has quit [Quit: ChatZilla 0.9.88.2 [Firefox 11.0/20120401163544]]
<Anarchos> Who ever used elkhound/elsa/olmar (parser from C++ to ocaml) ?
<mrvn> map with rivers: http://mrvn.homeip.net/map/map.png
<Hodapp> "type idref = { mutable id: 'a. 'a -> 'a };;" - what does this mean? Particularly, the dot after 'a?
<mrvn> Hodapp: that id is polymorphic
<Hodapp> I'm still not grasping the notation.
<mrvn> Hodapp: it creates a type variable that is independent of the type of the record
<Anarchos> Hodapp it means that even if you do something like "let (a:idref) = {id = fun 0-> 0}", the type idref will still stay polymorphic
<Anarchos> Hodapp even if you didn't specify "int" as a type parameter
<mrvn> Anarchos: idref isn't polymorphic at all
<Anarchos> Hodapp yes : the mutable id field is :)
<Anarchos> you can do a.id <- (fun "" ->"") ; a.id <- (fun 0-> 0);; without an error
asdfhjkl has joined #ocaml
absalon has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
absalon has quit [Quit: Ex-Chat]
mjonsson has joined #ocaml
smerz has joined #ocaml
reynir has quit [Read error: Connection reset by peer]
reynir has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
Fabio has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Tobu has joined #ocaml
emmanuelux has quit [Ping timeout: 264 seconds]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 246 seconds]
tufisi has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ocaml
reynir has quit [Ping timeout: 245 seconds]
<mrvn> And now the map with large view as well: http://mrvn.homeip.net/map/map.png
<mrvn> Now I can start adding units.
<pippijn> what is this for?
<mrvn> A game like Settlers
<pippijn> why is it in a parallelogram?
<mrvn> hex tiles.
<pippijn> ah
<pippijn> I see, yes
<pippijn> nice
<pippijn> that's a large settlers board
<mrvn> only 200x200 tiles
<pippijn> "only"
<pippijn> you need a large room to lay them out
<mrvn> A tile is a small unit. Buildings will take up many tiles.
<pippijn> oh, okay
<pippijn> a little different, then
xlq has quit [Ping timeout: 260 seconds]
<pippijn> I never thought I would actually use the Graphics module, but it turned out to be very useful in developing this function: http://paste.xinu.at/j8cR7f/
<pippijn> I just realised I can write it as http://paste.xinu.at/nLeaTt/
<pippijn> oh, and it's wrong
<pippijn> dx and dy are inverted, this is better:
tufisi has joined #ocaml
asdfhjkl has quit [Quit: Leaving]
reynir has joined #ocaml
tufisi has quit [Read error: Operation timed out]
<mrvn> How do I tell oasis to only build native code when available?
<pippijn> CompiledObject: native
<mrvn> where does that fit "when available"?
<pippijn> hmm
<pippijn> then I don't know
ftrvxmtrx has quit [Ping timeout: 246 seconds]
<mrvn> I have "CompiledObject: best" but it builds .cmi, .cmo, .cmx, .o and .native
<pippijn> and no .byte?
<mrvn> no, at least that one isn't done
<mrvn> But why is it building the .cmo?
<adrien> you have a .mli?
<mrvn> nope
<adrien> ocamlbuild will make one
<adrien> but the mli generation rule is made in such a way that it has to build the bytecode library
<adrien> I don't understand why it _has_ to be that way but that's what's happening
<mrvn> the .cmi is build as a side effect of building the .cmo or .cmx file. Seems it doesn't check which one it will need.
<adrien> (_and_ last time I "checked", Best made both)
<mrvn> when I add a .mli file the .cmo disapears.
<mrvn> "There is technical reasons to not accept .cmi to be generated by both ocamlc and ocamlopt." If there is a reason then what is it?
<mrvn> I hate when people leave out the important parts to their reasoning
<adrien> that bug is a duplicate of another one; have you checked there?
ftrvxmtrx has joined #ocaml
Juzor has joined #ocaml
reynir has quit [Ping timeout: 252 seconds]
reynir has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
<Juzor> hi, i'm searching a way to parse get the value passed throught de argv, anyone have an example ?
<mrvn> Scanf.sscanf argv.[1] "%d" (fun x -> main x)
<Juzor> thx
<mrvn> or use Getopt
<Juzor> i was trying to use Sys.argv.(1) or something
<mrvn> sorry, I ment Sys.argv.(1)