companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mxns has quit [Ping timeout: 245 seconds]
Guest19992 has quit [Quit: ZNC - http://znc.in]
dan64 has joined #ocaml
yomimono has joined #ocaml
mxns has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
mxns has quit [Ping timeout: 268 seconds]
henistein has joined #ocaml
hackinghorn has joined #ocaml
<henistein> I am trying to convert a quadtree into a matrix and I am struggling hard, this is what I have done: https://pastebin.pl/view/1b3bc7b8 . The Tree to matrix doesn't work, how can I convert a quadtree to a matrix?
mxns has joined #ocaml
henistein has quit [Quit: Connection closed]
henistein41 has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
henistein41 has quit [Quit: Connection closed]
mxns has quit [Ping timeout: 245 seconds]
narimiran has joined #ocaml
<d_bot> <Butanium> Can you show a small example of how you'd do the conversation?
mbuf has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
wonko7 has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
Sanduni has joined #ocaml
Sanduni has quit [Client Quit]
Sanduni has joined #ocaml
TheLemonMan has joined #ocaml
Sanduni has quit [Quit: Connection closed]
Haudegen has joined #ocaml
xenu has joined #ocaml
mfp has joined #ocaml
beajeanm has quit [Quit: The Lounge - https://thelounge.chat]
beajeanm has joined #ocaml
olle has joined #ocaml
Sanduni has joined #ocaml
Sanduni has quit [Client Quit]
robmyers has quit [Ping timeout: 245 seconds]
bartholin has joined #ocaml
robmyers has joined #ocaml
tryte has quit [Remote host closed the connection]
tryte has joined #ocaml
vicfred has quit [Quit: Leaving]
nullifidian has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
henistein has joined #ocaml
<henistein> I have a matrix [|[|1; 1; 1; 1|]; [|2; 2; 2; 2|]; [|3; 3; 3; 3|]; [|4; 4; 4; 4|]|] and I want to slice the nw of the matrix, there is some easy way to do it?
nullifidian has quit [Quit: Leaving]
tryte has quit [Ping timeout: 240 seconds]
tryte has joined #ocaml
<octachron> henistein, you can either define a slice type, or copy the submatrix (by creating function that copies the first or last half or an array).
<olle> no matrix lib for this??
<olle> oO
<octachron> That wasn't the question asked? Owl supports slicing https://ocaml.xyz/book/slicing.html
Haudegen has joined #ocaml
<olle> question doesn't matter ;)
<olle> (xy problem)
<henistein> Hmm ok, I am trying to do a function that change a matrix by giving a number and a coordinate(nw, ne, sw, se). Like this: 'a -> int -> string -> int array array . And this seems quite hard
mgsk has quit [Quit: Connection closed for inactivity]
<henistein> ok I did it: https://pastebin.com/sueTz1tM
<d_bot> <darrenldl> consider making `coord` a proper variant type : p
<henistein> Array.map creates a new array right?
<henistein> So if I want to do this I can't change the values :
<henistein> (Array.map (split_arr_left) (split_arr_left dummy)).(0).(0) <- 88
<henistein> Some way to break this?
<octachron> If you really want sharing on submatrices, you will need explicit slices.
<octachron> Are you sure that matrices are the right data structure for what you are trying to do?
henistein has quit [Quit: Connection closed]
henistein has joined #ocaml
<henistein> I want to convert a quadtree into a matrix: https://pastebin.pl/view/e7a5a87b
<henistein> So I am thinking about create a matrix fill of -1 and then recursively change his values according to Leaf (W -> 0, B -> 1)
<henistein> I think array array is better here than list list, since it should be easier to change, what do you think?
<octachron> An array is better. What you want is to keep track of the coordinate in the matrix of the root tree (and the size of the quadrangle?) then update the global matrix while traversing the quadtree.
<henistein> Exactly, since my previous slice function won't change directly the matrix it will be a little more complex
dldisha has joined #ocaml
dh` has quit [Ping timeout: 268 seconds]
dldisha has quit [Client Quit]
mxns has joined #ocaml
<Leonidas> I am somewhat amused that ocaml is so overrepresented on lobste.rs
<d_bot> <undu> It's good to have good visibility _somewhere_
ananya has joined #ocaml
ananya has quit [Client Quit]
Tuplanolla has joined #ocaml
waleee-cl has joined #ocaml
zebrag has joined #ocaml
mxns has quit [Ping timeout: 252 seconds]
henistein has quit [Quit: Connection closed]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Client Quit]
webshinra has quit [Remote host closed the connection]
<Armael> is it??
hackinghorn has quit [Quit: Leaving]
<Armael> my feeling was rather that there seem to be some ocaml people hanging out, but most of the active people and the volume of comments/activity is not ocaml-related (or even ocaml-tangent)
webshinra has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<Armael> (or were you talking about the lobste.rs irc channel?)
grimler32 has joined #ocaml
<grimler32> any universe editors with access to the 4 bit 3 dimensional god code at the multiverse level?
dh` has joined #ocaml
<companion_cube> 🤯
vicfred has joined #ocaml
henistein has joined #ocaml
Sanduni has joined #ocaml
Sanduni has quit [Client Quit]
mxns has joined #ocaml
bartholin has quit [Quit: Leaving]
hackinghorn has joined #ocaml
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
tane has joined #ocaml
lindah has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
lindah has quit [Ping timeout: 252 seconds]
henistein has quit [Quit: Connection closed]
olle has quit [Ping timeout: 240 seconds]
infinigon_ has quit [Ping timeout: 246 seconds]
infinigon has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
zebrag has joined #ocaml
narimiran has quit [Ping timeout: 260 seconds]
wonko7 has quit [Ping timeout: 240 seconds]
tane has quit [Quit: Leaving]
landonf has quit [Excess Flood]
landonf has joined #ocaml
olle has joined #ocaml
l1x has quit [Quit: Connection closed for inactivity]
olle has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
dh` has joined #ocaml
dh` has quit [Changing host]
Haudegen has quit [Ping timeout: 252 seconds]
dhil has quit [Ping timeout: 265 seconds]
Tuplanolla has quit [Quit: Leaving.]