flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
kolko has quit [Read error: Connection reset by peer]
kolko has joined #ocaml
yunxing_ has joined #ocaml
yunxing_ has quit [Client Quit]
sh0t has quit [Remote host closed the connection]
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
two_wheels has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sh0t has joined #ocaml
seangrove has joined #ocaml
zRecursive has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
scarygelatin has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
tmtwd has joined #ocaml
wolfcore has quit [Ping timeout: 250 seconds]
wolfcore has joined #ocaml
connorjacobsen has quit [Ping timeout: 264 seconds]
cross has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
wolfcore has quit [Ping timeout: 276 seconds]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Read error: Connection reset by peer]
connorjacobsen has joined #ocaml
wolfcore has joined #ocaml
connorjacobsen has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
sh0t has quit [Remote host closed the connection]
unbalancedparen has joined #ocaml
tmtwd has quit [Ping timeout: 252 seconds]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 250 seconds]
tmtwd has joined #ocaml
scarygelatin has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
zaquest has quit [Ping timeout: 244 seconds]
ncthom91 has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
wiredsister has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Ping timeout: 260 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
jonasen has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
pyon has quit [Quit: Ihnen, Herr Lasker, habe ich nur drei Worte zu sagen: Nyan und Pasu~.]
pyon has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
larhat has quit [Quit: Leaving.]
uriznik has joined #ocaml
A1977494 has joined #ocaml
MercurialAlchemi has joined #ocaml
madroach has quit [Quit: leaving]
adi___ has quit [Ping timeout: 260 seconds]
adi___ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
redpoppies has joined #ocaml
redpoppies has quit [Client Quit]
guardianJ has joined #ocaml
guardianJ has quit [Remote host closed the connection]
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
FreeBird_ has joined #ocaml
larhat has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dexterph has joined #ocaml
zaquest has joined #ocaml
ygrek_ has joined #ocaml
thizanne has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dexterph has quit [Read error: Connection reset by peer]
dexterph has joined #ocaml
<Leonidas> def`: yes, this is btw exactly what I asked chenglou when they changed to /* */ comments whether they will support nested comments or fail like C does :)
<mrvn> Leonidas: ocamls nested comments let you comment out any valid ocaml code without getting confused, like: # let x = (* "*)" *) 1;;
<mrvn> val x : int = 1
<Leonidas> mrvn: I know. That's very nice. I am kinda surprised that C gets this wrong (C++ style comments weren't added that long ago after all)
<flux> well, C also has the preprocessor for disabling code
<flux> leaving the rules for comments much more relaxed..
jwatzman|work has joined #ocaml
<mrvn> they screwed up /* */ at first. Now they can't fix it without breaking existing code.
<mrvn> nested comments are hard to parse so they initially wouldn't do it. Not enough ram, code space and cpu time.
freux has joined #ocaml
<freux> hello everyone. are any nix users here? specifically, has anyone been able to install ocamlfind via opam on nix?
zRecursive has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
silver has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
groovy2shoes has quit [Quit: Leaving]
sdothum has joined #ocaml
Kakadu has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
uriznik has left #ocaml [#ocaml]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
freux has quit [Ping timeout: 272 seconds]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
jwatzman|work has joined #ocaml
Orion3k has quit [Ping timeout: 276 seconds]
Orion3k has joined #ocaml
rgrinberg has joined #ocaml
TheLemonMan has joined #ocaml
orbifx-m2 has quit [Ping timeout: 264 seconds]
steve_gh has joined #ocaml
ygrek_ has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<steve_gh> dumb question: A common OCaml pattern is to build a function out of a series of let ... in clauses with a final assignment that is returned.
<steve_gh> But what if I have a sequence of changes to a mutable variable (such as an array) in a function. Is there a better alternative to something like
two_wheels has joined #ocaml
<steve_gh> let _ = array.(0) <- 1.0 in let _ = array.(1) <- 1.0 in ...
<Drup> well, there is ";"
<chelfi> steve_gh: you can use a semicolon here, like array.(0) <- 1.0; array.(1) <- 1.0
MercurialAlchemi has joined #ocaml
tane has joined #ocaml
ygrek has joined #ocaml
<chelfi> also I think that you should prefer let () = instead of let _ = because let () ensures that you are calling function of type unit (which almost always is a side effecting function) rather than accidentaly calling a pure function and not binding its result
<chelfi> (of course this assumes that the type of your statement is unit, which is not always true even for side effecting functions)
<mrvn> While I agree with let () I don't think this has anything to do with pure functions
<steve_gh> thxs Drup. This is what I was looking for. For some reason I failed to find it in Real World OCaml.
<chelfi> mrvn: lets forget about this part then
<mrvn> Reason for "let () = ... over _": If the return type is unit it doesn't matter, if the return type is not unit then the first will tell you. You can't accidentally drop a return type.
<Drup> chelfi: it's more a protection against partially applied functions.
kushal has joined #ocaml
<mrvn> partially applied function being a major pain to find for dropped returns.
<mrvn> They look right and you can read over them 20 times and not notice that a partial application does not return ()
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<chelfi> definitely, but it also applies when the return type of your function call is not unit
sepp2k has joined #ocaml
<chelfi> I mean, let f () = 5 in let () = f () will return an error while let _ = f () will not
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has quit [Ping timeout: 272 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
kushal has quit [Ping timeout: 272 seconds]
kushal has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
Orion3k has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
madroach has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
copy` has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<pitastrudl> so i got this substring problem here, and it's not like i dont know how nested for loops work or have a problem with the syntax...i just dont know where i did something wrong
<pitastrudl> it's supposed to print a set of substrings of a string
<pitastrudl> like it seems trivial but i feel like im missing something...even wrote it down on paper and getting nowhere. initially i'd want it to start printing at the next character everytime the second loop goes trough
<pitastrudl> start at the next character*
<pitastrudl> supposedly i only need two for loops but i cant imagine doing it with only two
<zozozo> pitastrudl: I don't see 'j' being used anywhere...
<pitastrudl> zozozo: i tried doing stuff with j too but i just dont see what could work
<zozozo> pitastrudl: if you want to have an output similar to that you wrote for "banana", I'd suggest looping with j from String.length - 1 to i, and printing characters between i and j
<pitastrudl> i was trying to do that, well now i removed one for loop and did it with a counter, wrote it in the comment https://gist.github.com/pitastrudl/bdbd86ecfa188c16f2cbcbe584717a2d
<pitastrudl> it now does the first set the substrings, but it doesnt do the rest, yet
<zozozo> did you try my version ?
<pitastrudl> im not sure how to implement yours, i mean im trying to do a simmilar thing
<pitastrudl> but how would i loop from the str length to i
<pitastrudl> wouldnt that be downto?
<pitastrudl> oh you did comment
<pitastrudl> ok, hold on
<pitastrudl> woah, okay. thats a nice one
<pitastrudl> i always tried using downto but it then just flipped the words
<zozozo> ^^
<pitastrudl> thanks zozozo
<pitastrudl> this one was a hard one :c, already spent like 3 hours on it
<mrvn> ups, ewin, sorry
sh0t has joined #ocaml
ocaml574 has joined #ocaml
ocaml574 has quit [Client Quit]
ncthom91 has joined #ocaml
al-damiri has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
tmtwd has joined #ocaml
pierpa has joined #ocaml
cmk_zzz has quit [Ping timeout: 252 seconds]
Denommus has joined #ocaml
wiredsister has joined #ocaml
cmk_zzz has joined #ocaml
circ-user-vkmXT_ has joined #ocaml
circ-user-vkmXT has quit [Ping timeout: 260 seconds]
connorjacobsen has joined #ocaml
sh0t has quit [Remote host closed the connection]
M-Illandan has quit [Read error: Connection reset by peer]
M-martinklepsch has quit [Read error: Connection reset by peer]
M-pesterhazy1 has quit [Read error: Connection reset by peer]
sh0t has joined #ocaml
connorjacobsen has quit [Ping timeout: 250 seconds]
aphprentice has quit [Ping timeout: 258 seconds]
aphprentice has joined #ocaml
MercurialAlchemi has joined #ocaml
A1977494 has quit [Ping timeout: 250 seconds]
dexterph has quit [Ping timeout: 244 seconds]
M-martinklepsch has joined #ocaml
A1977494 has joined #ocaml
<steve_gh> Hi - I'm wondering why the compiler is complaining about this:
<steve_gh> match l with [] -> failwith "Empty" | x -> (let hh::_ = x in let tt::_ = List.rev x in hh::[tt]);;
<companion_cube> the [tt] is wrong (it's a list of lists)
<steve_gh> It warns me that the patterns hh::_ and tt::_ are not exhaustively matched - but surely the empty list has already been caught in the match statement
<companion_cube> also, no need to write `lt hh::_ = x`, you could write `| (hh::_) as x -> let tt::_ = List.rev x in hh::tt`
<steve_gh> Can someone enlighten me pls
<companion_cube> there is no propagation of that kind in the compiler; however you can use the pattern match above, as I explained
<companion_cube> oh wait, you try to return only the first and last elements?
<steve_gh> yep
<companion_cube> [hh;tt] or hh::tt::[]
sternenseemann has joined #ocaml
<companion_cube> but still, `let tt::_ = List.rev x` will trigger a warning, because it's non trivial to infer that `List.rev x` is non empty from the fact that `x` is non empty
ygrek has joined #ocaml
<chelfi> hh::[tt] works too
<companion_cube> oh yeah, my bad; it's so weird that I thought it was ill-typed
<steve_gh> thxs
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Kakadu> Folks, I want to set OCAMLPATH variable to get more packages accessible but I'm doing something wrong. http://paste.in.ua/1715/#16
khodzha has quit [Remote host closed the connection]
khodzha1 has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 260 seconds]
slash^ has joined #ocaml
<Kakadu> Ah, got it
<Kakadu> It looked for ..../_build/packagename
rand__ has joined #ocaml
scarygelatin has joined #ocaml
M-pesterhazy has joined #ocaml
M-Illandan has joined #ocaml
Fleurety has joined #ocaml
Orion3k has joined #ocaml
octachron has quit [Quit: Page closed]
Sorella has joined #ocaml
wiredsister has quit [Ping timeout: 258 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
larhat has quit [Quit: Leaving.]
demonimin has quit [Remote host closed the connection]
demonimin has joined #ocaml
tane has quit [Ping timeout: 258 seconds]
tane has joined #ocaml
shinnya has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
martinkl_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
connorjacobsen has joined #ocaml
martink__ has joined #ocaml
martinkl_ has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
martink__ has quit [Client Quit]
darkf has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
jeffmo has joined #ocaml
kolko has quit [Quit: ZNC - http://znc.in]
dakk_ has joined #ocaml
dakk has quit [Ping timeout: 244 seconds]
Kakadu has quit [Quit: Page closed]
zaquest has quit [Ping timeout: 272 seconds]
zaquest has joined #ocaml
yunxing has quit [Quit: Connection closed for inactivity]
manizzle has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
bacam has quit [Quit: reboot]
connorjacobsen has joined #ocaml
bacam has joined #ocaml
two_wheels has quit [Ping timeout: 272 seconds]
connorjacobsen has quit [Ping timeout: 252 seconds]
TheLemonMan has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slash^ has quit [Read error: Connection reset by peer]
rand__ has quit [Quit: leaving]
two_wheels has joined #ocaml
cat5e has quit [Ping timeout: 252 seconds]
cat5e has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
anoisz has joined #ocaml
Kakadu has joined #ocaml
<Kakadu> Folks, my ocamlbuild does not pass environment variable OCAMLPATH to ocamlfind. Am I missing something obvious? http://paste.in.ua/1718/#4
data_hope has joined #ocaml
cat5e has quit [Quit: Leaving]
Soni has joined #ocaml
aggelos_ has quit [Ping timeout: 264 seconds]
connorjacobsen has quit [Remote host closed the connection]
Soni is now known as cat5e
wiredsister has joined #ocaml
buddyholly has quit [Ping timeout: 272 seconds]
buddyholly has joined #ocaml
sh0t has quit [Ping timeout: 250 seconds]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
connorjacobsen has joined #ocaml
buddyholly has quit [Ping timeout: 272 seconds]
connorjacobsen has quit [Ping timeout: 258 seconds]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
kushal has quit [Quit: Leaving]
two_wheels has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A1977494 has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 276 seconds]
connorjacobsen has joined #ocaml
Denommus has quit [Ping timeout: 264 seconds]
data_hope has left #ocaml [#ocaml]
copy` has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
orbifx has joined #ocaml
octachron has quit [Ping timeout: 260 seconds]
buddyholly has joined #ocaml
octachron has joined #ocaml
rgrinberg has joined #ocaml
tane has quit [Quit: Verlassend]
octachron has quit [Quit: Leaving]
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
<orbifx> quit
orbifx has quit [Quit: WeeChat 1.5]
orbifx has joined #ocaml
Simn has quit [Quit: Leaving]
<orbifx> hello ocamlers
<pierpa> hello there
<orbifx> kakadu: left?
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
yomimono has joined #ocaml
<Kakadu> orbifx: nope
<orbifx> kewl
silver has quit [Quit: rakede]
sepp2k has quit [Quit: Leaving.]
<Algebr> Okay, that's new, OCAMLPATH
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sh0t has quit [Ping timeout: 250 seconds]
jbrown has quit [Ping timeout: 276 seconds]
jbrown has joined #ocaml
<orbifx> It's that path the camels take Algebr
<Kakadu> All paths leads to ... Rome?
sh0t has joined #ocaml
<struk|desk> or the singularity
<orbifx> the rome unit?
<Kakadu> Are you not getting my joke or Am I not getting yours? :)
<Algebr> oh irc.
orbifx-m has joined #ocaml
orbifx has quit [Quit: WeeChat 1.5]
Kakadu has quit [Remote host closed the connection]
<struk|desk> lol
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 272 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
struk|work has quit [Ping timeout: 250 seconds]
sh0t has joined #ocaml
darkf is now known as darkfm
darkfm is now known as darkf
jeffmo has quit [Quit: jeffmo]
AlexRussia has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ocaml