flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.01.0 http://bit.ly/1851A3R | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
ontologiae_ has quit [Ping timeout: 240 seconds]
mort___ has quit [Quit: Leaving.]
ollehar has quit [Read error: Operation timed out]
wormphlegm has joined #ocaml
davekong has quit [Ping timeout: 264 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest64028
zRecursive has joined #ocaml
zpe has quit [Remote host closed the connection]
Guest64028 has quit [Remote host closed the connection]
derek_c has joined #ocaml
Simn has quit [Quit: Leaving]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
derek_c has quit [Ping timeout: 240 seconds]
derek_c has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
q66 has quit [Quit: Leaving]
ontologiae_ has joined #ocaml
zpe has joined #ocaml
talzeus has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
Neros has quit [Read error: Operation timed out]
Neros has joined #ocaml
talzeus has quit [Remote host closed the connection]
ontologiae_ has quit [Ping timeout: 264 seconds]
csakatoku has joined #ocaml
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
TDJACR has quit [Ping timeout: 260 seconds]
davekong has joined #ocaml
TDJACR has joined #ocaml
csakatoku has quit [Remote host closed the connection]
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
Drup has quit [Ping timeout: 245 seconds]
Drup has joined #ocaml
derek_c has quit [Quit: Lost terminal]
Neros has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
ygrek_ has joined #ocaml
chrisdotcode_ has joined #ocaml
maxibolt has joined #ocaml
f[x] has joined #ocaml
chrisdotcode_ has quit [Remote host closed the connection]
cesar_ has joined #ocaml
chrisdotcode_ has joined #ocaml
thizanne has quit [Ping timeout: 245 seconds]
ygrek_ has quit [Ping timeout: 245 seconds]
chrisdotcode has quit [Ping timeout: 245 seconds]
testcocoon has quit [Ping timeout: 245 seconds]
argp has quit [Ping timeout: 245 seconds]
tristero has quit [Ping timeout: 245 seconds]
argp has joined #ocaml
cesar_ is now known as Guest59153
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
chrisdotcode_ has quit [Remote host closed the connection]
chrisdotcode has joined #ocaml
testcocoon has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Guest59153 has quit [Remote host closed the connection]
tnguyen has quit [Remote host closed the connection]
chrisdotcode has quit [Ping timeout: 264 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
chrisdotcode has joined #ocaml
clog has joined #ocaml
zRecursive has left #ocaml []
stomp has joined #ocaml
<ng_> ggole, http://pastebin.com/udy1ZMug this is a better example. I need find the 1 in matrix, and incresease +1 line by line if is no longer a zero around
<ggole> So you want to check the neighbours, as if looking down on a chessboard?
<ng_> yes,
<ggole> Ah, it's a game of life like thing (if not game of life itself)
<ng_> :), so i need the position right?
<ggole> Yep
<ggole> So
<ggole> What I would do is write a routine for each corner
<ggole> Then each edge
<ggole> And finally things in the middle
<ggole> At the corners and edges, you need to avoid looking at the elements that don't exist
<ng_> but how i check the position?
<ggole> If you do it that way, you don't need to
<ggole> One sec, I'll write a little sketch.
talzeus has joined #ocaml
<ng_> ggole, I'll have to leave, but writes please, I already come ok?
<ng_> just a few minutes
<ggole> OK
malc_ has joined #ocaml
Sim_n has joined #ocaml
ontologiae_ has quit [Ping timeout: 240 seconds]
Simn has quit [Ping timeout: 240 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest43068
mlh has quit [Ping timeout: 252 seconds]
mlh has joined #ocaml
Guest43068 has quit [Remote host closed the connection]
f[x] has quit [Ping timeout: 248 seconds]
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
csakatoku has joined #ocaml
chrisdotcode_ has quit [Ping timeout: 248 seconds]
csakatoku has quit [Ping timeout: 240 seconds]
jayprich has joined #ocaml
ollehar has joined #ocaml
whitequa1k is now known as whitequark
Simn has joined #ocaml
Sim_n has quit [Ping timeout: 248 seconds]
octet8 has quit []
Drup has joined #ocaml
f[x] has joined #ocaml
ulfdoz has joined #ocaml
<ng_> ggole, sorry then, how can I do?
xavierm02 has joined #ocaml
<ggole> That's how I'd do it.
<ggole> Roughly: of course you need to fill in the details.
<xavierm02> Hey. Is there some way to get the screen's size? I use Graphics for very basic drawings and I'd like to be able to open a window whose size depends on the available space instead of arbitrary picking a size.
<ng_> ggole, thank you, I'll adptar in my code and then say something
<ng_> ;)
<xavierm02> If Pt stands for percentage, I probably could use pixels from http://caml.inria.fr/pub/docs/manual-ocaml-4.01/libref/Tk.html to guess it but...
<whitequark> pt? points perhaps?
<xavierm02> Yeah that must be it. So I can't use it... Noone knows how to detect the screen's size?
<Drup> xavierm02: I don't think you can do it with graphics. It's very limitated
<ggole> Graphics is old and pretty busted.
<ggole> You can't even set the background color.
<bernardofpc> ggole: I guess in fact the problem is finding conct comp of the "1" in the matrix
<ggole> conct comp?
shinnya has joined #ocaml
<bernardofpc> connected
breakds has quit [Remote host closed the connection]
tani has joined #ocaml
<bernardofpc> big lag in here :/
<mrvn> L
<mrvn> A
<mrvn> G
Yoric has quit [Ping timeout: 264 seconds]
breakds has joined #ocaml
<companion_cube> did I tell you about my quickcheck module? :)
tane has quit [Ping timeout: 240 seconds]
malc_ has quit [Quit: leaving]
wwilly has joined #ocaml
<wwilly> bonjour
talzeus has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
xavierm02 has quit [Remote host closed the connection]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
Kakadu has quit []
f[x] has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 256 seconds]
f[x] has joined #ocaml
mcclurmc has joined #ocaml
ng_ has quit [Quit: Leaving]
Neros has quit [Ping timeout: 245 seconds]
slack1256 has joined #ocaml
f[x] has quit [Ping timeout: 252 seconds]
jayprich has quit [Ping timeout: 248 seconds]
nikki93 has joined #ocaml
jayprich has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 245 seconds]
octet8 has joined #ocaml
zpe has quit [Remote host closed the connection]
Yoric has joined #ocaml
Anarchos has joined #ocaml
testcocoon has quit [Ping timeout: 264 seconds]
trystero has joined #ocaml
csakatoku has joined #ocaml
tristero has quit [Ping timeout: 264 seconds]
testcocoon has joined #ocaml
darkf has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
jayprich has quit [Ping timeout: 240 seconds]
csakatoku has quit [Ping timeout: 248 seconds]
alex__ has joined #ocaml
<alex__> Hi! Could please help me with a little piece of code I can't understand why it doesn't compile
<alex__> let n = read_int () in
<alex__> let marked = Array.make n false
<alex__> I compile it with 'ocamlc -o' and it shows: File "book_of_evil.ml", line 3, characters 0-0:
<alex__> Error: Syntax error
<reynir> it's a syntax error
<reynir> You need "in <expression>" in the end
<alex__> Do you mean 'let marked = Array.make n false in'?
<reynir> actually it's not clear to me what you want... so I can't really say what you need
<ggole> If that's a global var, let marked = Array.make (read_int ()) false
<alex__> yes it's global var and n also is needed not only in Array.make
clog has joined #ocaml
Snark has quit [Quit: leaving]
wwilly has quit [Quit: Leaving]
Neros has joined #ocaml
derek_c has joined #ocaml
trystero has quit [Read error: Operation timed out]
csakatoku has joined #ocaml
csakatoku has quit [Ping timeout: 256 seconds]
nikki93 has quit [Remote host closed the connection]
ontologiae_ has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-280704]: i've been blurred!]
chrisdotcode has joined #ocaml
zpe has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
troydm has quit [Ping timeout: 264 seconds]
zpe has quit [Remote host closed the connection]
nikki93 has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest57994
slack_ has left #ocaml []
Obfuscate has left #ocaml []
SrPx has joined #ocaml
jayprich has quit [Quit: jayprich]
ollehar has quit [Ping timeout: 245 seconds]
kay_ has quit [Remote host closed the connection]
breakds has quit [Quit: Konversation terminated!]
kay_ has joined #ocaml
kay_ has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
kay_ has joined #ocaml
Guest57994 has quit [Ping timeout: 245 seconds]
tani has quit [Quit: Verlassend]
nikki93 has quit [Remote host closed the connection]
nisstyre has quit [Ping timeout: 256 seconds]
nisstyre has joined #ocaml
SrPx has quit [Killed (idoru (Spam is off topic on freenode.))]
cross has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
zpe has joined #ocaml
mcclurmc has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
ollehar has quit [Ping timeout: 256 seconds]
derek_c has quit [Quit: leaving]
ollehar has joined #ocaml
<bernardofpc> Error: No implementations provided for the following modules: Big_int referenced from blah.cmx
<bernardofpc> using ocamlbuild
<bernardofpc> I noted that in the toplevel this comes from nums.cmx
<bernardofpc> is this why ocamlbuild does not find it ?
jave has quit [Read error: Operation timed out]
<adrien> you need package Num
<bernardofpc> I do have it
<bernardofpc> I mean, I have it installed, #load on toplevel gives me access to it
<bernardofpc> the question is how to make ocamlbuild find it automatically
<bernardofpc> since names are somewhat not automatic in this case
<Drup> bernardofpc: use_nums in your _tags
<bernardofpc> oh
<Drup> bernardofpc: ocamlbuild -documentation is cool, use it :3
<bernardofpc> right
<bernardofpc> but I've used it before, and it found my (local) modules, and also some of the distro ones
<bernardofpc> (but maybe they're "Pervasives" and that does not count?)
cesar_ has joined #ocaml
cesar_ is now known as Guest3279
<adrien> if you want to compare apples to apples, don't use #load in the toplevel but ocamlfind's #require directive
<bernardofpc> then I'd have to do #require "num" ?
<bernardofpc> and agains, how would I know that from http://caml.inria.fr/pub/docs/manual-ocaml/libref/Big_int.html ?
<adrien> ocamlfind is a separate tool (and library)
<adrien> but it probably deservers a mention in the official doc considered it became used pretty much everywhere to find additional libraries
* adrien -> bed
jave has joined #ocaml
<bernardofpc> my question is more "how could I guess that to use Big_int the incantation (whatever it seems to be, ocamlfind or load or ocamlbuild) uses num" ?
<bernardofpc> or "where in the doc of the standard lib do I find the link Module -> lib_to_be_loaded" ?
<Drup> the "dangerous" libraries from this point of view are unix, num related thingy, Str, graphical thingy, threads and bigarray
<Drup> all of them have a use_ tags for ocamlbuild
snearch has joined #ocaml
<bernardofpc> Drup: thanks ;-)
<bernardofpc> But it'd be nice to have a backlink from http://caml.inria.fr/pub/docs/manual-ocaml/libref/Big_int.html to libnum.html
<bernardofpc> (and so on for all others in the libs you told me)
<Drup> indeed :/
jave has quit [Read error: Operation timed out]
cross has joined #ocaml
rgrinberg has quit [Quit: WeeChat 0.4.1]
nikki93 has joined #ocaml
csakatoku has joined #ocaml
breakds has joined #ocaml
caseyjames has joined #ocaml
<caseyjames> I'm having issues of using List.tl in place, due to the option. let add_elem elem list = elem :: (List.rev (List.tl list));; add_elem 5 mel;; I get: Error: This expression has type 'a Core.Std.List.t option but an expression was expected of type 'b Core.Std.List.t = 'b list # Characters 1-9: add_elem 5 mel;; ^^^^^^^^ Error: Unbound value add_elem
<Drup> hum, you're using core
csakatoku has quit [Remote host closed the connection]
<Drup> (you're "add_elem" function is a weird way to add an element to a list :D)
<Drup> caseyjames: List.tl give an option because a list may not have any tail
<Drup> caseyjames: a simpler way to do this is to pattern match against the list and explicitly handle the case where it's empty
<Drup> with the standard library, List.tl would throw an exception of the empty case.
<caseyjames> Thats what I figured, but I'm having trouble seeing where List.tl can be used at all. I've spent the day trying to dig into the higher level list functions and such
Simn has quit [Quit: Leaving]
<caseyjames> Drup: Would you say that stringing many List functions may be a bad idea in general?
ontologiae_ has quit [Ping timeout: 248 seconds]
<Drup> It's not, but List.tl is special, since it's a partial function
<Drup> and you can pretty much do the same with a simple pattern match
<caseyjames> Drup: cool, I'll stick with matching for that then. Thanks for that
csakatoku has joined #ocaml
<Drup> It's good practice to avoid incomplete pattern match anyway, and List.tl (at least standard library's version) is pretty much a shortcut for an incomplete pattern match
<Drup> caseyjames: if you want to practice list and functional programming, a good exercices is to reimplement most list functions.
ontologiae_ has joined #ocaml
csakatoku has quit [Remote host closed the connection]
<caseyjames> Drup: There is a lot of that, that I want to do. I go started with OCaml by just copying the solutions to all of the 99 list problems, and working backwards to understand them. Today was just getting an idea of what they are and how I might use them at a higher level, as I find I'm repeating a lot of low level code
snearch has quit [Quit: Verlassend]