<ocaml783>
hey guys im a student and have an ocaml homework im offering 20$ per hours of help on skype. I am not asking for you to do my work just for someone who knows how to code in Ocaml to help me understand.
<mengu>
ocaml783:
<mengu>
ask your questions here
<mengu>
and show people that you try
<ocaml783>
i have more then 30 hours on it and it's a very small assignement. I have asked questions here. I dont want someone to do it for me i want someone to explain the things i dont understand...I really hope i didnt come off as someone who wants to pay for it to be done
gallais has quit [Ping timeout: 258 seconds]
fre2 has quit [Ping timeout: 268 seconds]
fre2 has joined #ocaml
gallais has joined #ocaml
handlex has joined #ocaml
fre3 has joined #ocaml
fre2 has quit [Ping timeout: 240 seconds]
fre3 has quit [Ping timeout: 240 seconds]
handlex has quit [Quit: handlex]
fre2 has joined #ocaml
sepp2k has quit [Ping timeout: 268 seconds]
ocaml783 has quit [Ping timeout: 260 seconds]
<lyxia>
ocaml783: this channel is free...
fre3 has joined #ocaml
fre2 has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
fre2 has joined #ocaml
fre3 has quit [Ping timeout: 240 seconds]
fre2 has quit [Ping timeout: 240 seconds]
minn has joined #ocaml
FreeBirdLjj has joined #ocaml
jerme_ has left #ocaml [#ocaml]
mfp_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
silver has quit [Quit: rakede]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
sh0t has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
agarwal1975 has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
agarwal1975 has quit [Quit: agarwal1975]
minn has quit [Ping timeout: 260 seconds]
FreeBird_ has joined #ocaml
wtetzner has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
wtetzner has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
wtetzner has quit [Remote host closed the connection]
minn has joined #ocaml
spew has quit [Ping timeout: 240 seconds]
BitPuffin|osx has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
minn has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
ygrek has joined #ocaml
djellemah has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
djellemah has joined #ocaml
minn has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBird_ has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
FreeBird_ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
Simn has joined #ocaml
apache3 has joined #ocaml
apache3_ has quit [Remote host closed the connection]
alfredo has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
jnavila has joined #ocaml
newbie84 has joined #ocaml
newbie84 has quit [Client Quit]
newbie88 has joined #ocaml
newbie88 is now known as lolisa
FreeBirdLjj has joined #ocaml
so has quit [Ping timeout: 240 seconds]
so has joined #ocaml
alfredo has quit [Ping timeout: 260 seconds]
Onemorenickname has joined #ocaml
orbitz has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #ocaml
FreeBir__ has joined #ocaml
olle has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
AltGr has joined #ocaml
FreeBird_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
orbitz has joined #ocaml
FreeBir__ has quit [Ping timeout: 240 seconds]
fre2 has joined #ocaml
<companion_cube>
I wonder how anyone can survive without the `with_resource` pattern :-/
_y has quit [Ping timeout: 256 seconds]
Fistine has quit [Ping timeout: 268 seconds]
tobiasBora has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
fre2 has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
larhat has joined #ocaml
mfp_ has joined #ocaml
zpe has joined #ocaml
orbifx has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
zpe has quit [Remote host closed the connection]
freusque has joined #ocaml
zpe has joined #ocaml
olle has quit [Quit: olle]
_y has joined #ocaml
Fistine has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnavila has quit [Quit: It was time]
AlexDenisov has joined #ocaml
olle has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
AlexDenisov has quit [Client Quit]
tobiasBora has joined #ocaml
dmoerner has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jnavila has joined #ocaml
<Onemorenickname>
companion_cube, simple, i don't do IO :D
freusque has quit [Quit: WeeChat 1.7]
<Onemorenickname>
well
<Onemorenickname>
I'm using a hashtbl on arrays
<Onemorenickname>
but it fails miserably : when the array is modified, I can't access it anymore
zpe has quit [Remote host closed the connection]
freusque has joined #ocaml
zpe has joined #ocaml
<Onemorenickname>
and that's perfectly normal
kakadu has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
freusque has quit [Quit: WeeChat 1.7]
freusque has joined #ocaml
<companion_cube>
indeed it is
maattdd_ has joined #ocaml
pitastrudl has quit [Remote host closed the connection]
silver has joined #ocaml
dhil has joined #ocaml
pitastrudl has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
dmoerner has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 258 seconds]
govg has joined #ocaml
dhil has joined #ocaml
_andre has joined #ocaml
<kakadu>
Folks, do you know which GNU/linux is running on travis for opam-repository?
<orbifx>
is there a zip function in ocaml?
<flux>
List.combine, though it requires lists to be the same length (and doesn't truncate to the shorter like I think haskell does)
<orbifx>
thanks flux
balod has quit [Remote host closed the connection]
balod has joined #ocaml
<orbifx>
wait sorry, i'm after a function which applies elements of one to the other
larhat has quit [Quit: Leaving.]
shinnya has joined #ocaml
<companion_cube>
List.map2 (fun f x -> f x)
<orbifx>
ok thanks :)
<orbifx>
im going to do it with iter2 cause there isn't anything to return
<companion_cube>
be careful that the lengths must match
<orbifx>
yeah thanks
snowcrshd has joined #ocaml
minn has quit [Quit: Leaving]
frefity has quit [Ping timeout: 260 seconds]
snhmib has joined #ocaml
Fistine has quit [Ping timeout: 246 seconds]
AlexDenisov has joined #ocaml
Fistine has joined #ocaml
dch_ has joined #ocaml
_y has quit [Ping timeout: 260 seconds]
_y has joined #ocaml
frefity has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
ajhager2 has joined #ocaml
ajhager has quit [Ping timeout: 260 seconds]
freusque has quit [Ping timeout: 256 seconds]
larhat has joined #ocaml
malc_ has joined #ocaml
Algebr has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
<n4323>
ll;;
Algebr has quit [Remote host closed the connection]
Xadnem has joined #ocaml
<Xadnem>
Hello friends, I want to declare a type with a polimorphic list like: Dim of `a [], but the compiler return me an error. Do you know how to do it please ?
<cheater>
you're using the wrong apostrophe
<cheater>
use 'a
<cheater>
not `a
rcsole has joined #ocaml
frefity has joined #ocaml
<Xadnem>
cheater: thank you for your help. I have tryed the following: type m = Dim of 'a [] . The compiler still returning error. What is wrong?
<Drup>
Xadnem: it's 'a list
<Drup>
not 'a []
<cheater>
right
<cheater>
i haven't even looked that far
<cheater>
:)
agarwal1975 has joined #ocaml
octachron has joined #ocaml
<Xadnem>
Drup: if I write: type m = Dim of 'a list;; , the compiler return: Unbound type parameter 'a.
<thizanne>
Xadnem: you need to provde 'a as a parameter of your type
<thizanne>
so type 'a m = Dim of 'a list
<thizanne>
thus `Dim [1; 2; 3]` will have the type `int m`
<thizanne>
if you explicitly want to remove this parameter from your type m, you need a gadt, and you actually don't want that
kolko has quit [Ping timeout: 260 seconds]
<Xadnem>
thizanne: Thank you very much. I undertand it now.
<thizanne>
cokanut: put ; between the instruction and the match
<thizanne>
otherwise it thinks the whole match is the second parameter of printf
<cokanut>
thizanne: ah, thanks! i'll try that.
zpe has quit [Ping timeout: 256 seconds]
snowcrshd_ has joined #ocaml
snowcrshd has quit [Ping timeout: 240 seconds]
<cokanut>
thizanne: that worked! :) but if i wanted to use all the setup variables, say "let a = 1 in let b = a + 1 in print_int b", in the return value, is that possible? aka: "let a = 1 in let b = a + 1 in print_int b in b+10" ?
<cokanut>
so I want to return a value from a function, but, I want to run an imperative statement in-between
kolko has joined #ocaml
<flux>
print_int b; b + 10
<zozozo>
or "in let () = print_int b in b + 10"
<cokanut>
zozozo: that's nice and cool! flux: putting a semicolon worked again. so what is the general rule w.r.t semicolons? does it tell ocaml that this here is an imperative statement and it ends here? then how does the variables i defined above is in scope for the return value?
BitPuffin|osx has joined #ocaml
<flux>
cokanut, consider ; an operator in this context
<flux>
cokanut, let a ; b = let () = a in b
<zozozo>
flux: without -strict-sequence it's more like "let _ = a in b"
<flux>
so much like let a = 4 in let b = 5 in a + b you can do the same with a ; b
<cokanut>
flux: zozozo: i don't think i really understood it, but now I know to look in the direction of semicolons and I'll figure it out. https://ocaml.org/learn/tutorials/structure_of_ocaml_programs.html this looks good - it talks about semicolons to sequence statements and look at them as operators. i'm going to dig in. thanks a lot to both of you!!
freusque has joined #ocaml
dhil has joined #ocaml
jbrown has joined #ocaml
<Onemorenickname>
by setting a global address int hashtbl, a type "'a indexed = 'a * int" and prefix operators "!*", "!&", "!!", I can finally write C-style code in ocaml
<Onemorenickname>
i hope nobody ever reads my code
<zozozo>
Onemorenickname: why so much hatred ? :p
jabroney has joined #ocaml
jbrown has quit [Quit: Leaving]
<thizanne>
you should do a PR for authorizing postfix partial application of operators in the syntax, so we can at last define and use x++ like real 2017 programming languages
<Onemorenickname>
thizanne, thank you for understanding me
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
sh0t has joined #ocaml
kolko_ has joined #ocaml
kolko has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<thecheshirecat>
in OCAML, but I don't understand how to do "parts"
freechips has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
<thecheshirecat>
it should split a list into n factors, and return a list with every "splitten list" in it. Something like that : [a,b,c] -input-> parts -output->[[[];[a;b;c]];[[a][b][c]];[[a];[b;c]] ...]
zpe has joined #ocaml
<thecheshirecat>
I have already done split, like that :