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]
<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
<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" ?
<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