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
wonko7 has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
objmagic has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
troydm has quit [Ping timeout: 246 seconds]
troydm has joined #ocaml
BitPuffin has quit [Ping timeout: 260 seconds]
labor[m] has quit [Ping timeout: 268 seconds]
BitPuffin has joined #ocaml
labor[m] has joined #ocaml
mxns has joined #ocaml
vicfred has quit [Quit: Leaving]
mfp has quit [Ping timeout: 260 seconds]
objmagic_ has joined #ocaml
objmagic has quit [Ping timeout: 260 seconds]
objmagic_ has quit [Ping timeout: 272 seconds]
madroach_ has joined #ocaml
madroach has quit [Ping timeout: 256 seconds]
mxns has quit [Ping timeout: 268 seconds]
rdivyanshu has joined #ocaml
narimiran has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
<d_bot> <darrenldl> anyone has advice for fuzzing very slow tests (in the order of 10s of seconds)?
Serpent7776 has joined #ocaml
shawnw has joined #ocaml
<d_bot> <undu> First advocw would be yo try to avoid Duch slow tests. What Is It that takes so long to run?
Haudegen has joined #ocaml
<d_bot> <darrenldl> it's fuzzing a optimised implementation vs a simple implementation - it's not quite possible for the simple implementation to match the performance without becoming quite complicated in the process
nullcone has quit [Quit: Connection closed for inactivity]
<d_bot> <darrenldl> i can break the test space down into much smaller pieces and do the iteration that way actually, that would work around the issue i think
steenuil has joined #ocaml
<zozozo> darrenldl: another way way would be to check the result of the optimised version, rather than compare it to a "simple/naive" version, assuming the result of the implementation can be checked reasonably
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
madroach has joined #ocaml
madroach_ has quit [Ping timeout: 256 seconds]
wonko7 has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
narimiran has joined #ocaml
aaaaaa has joined #ocaml
bartholin has joined #ocaml
dhil has joined #ocaml
mfp has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
Haudegen has quit [Quit: Bin weg.]
objmagic has joined #ocaml
narimiran has quit [Ping timeout: 256 seconds]
narimiran has joined #ocaml
objmagic has quit [Ping timeout: 264 seconds]
objmagic has joined #ocaml
Haudegen has joined #ocaml
waleee-cl has joined #ocaml
delysin has quit [Read error: Connection reset by peer]
delysin has joined #ocaml
Anarchos has joined #ocaml
vicfred has joined #ocaml
mxns has joined #ocaml
shawnw has quit [Ping timeout: 260 seconds]
decentpe- has joined #ocaml
decentpenguin has quit [Ping timeout: 240 seconds]
decentpe- is now known as decentpenguin
osa1_ has joined #ocaml
osa1 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has quit [Ping timeout: 268 seconds]
mmohammadi9812 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
osa1_ is now known as osa
osa is now known as osa1
bartholin has quit [Quit: Leaving]
Haudegen has joined #ocaml
nullcone has joined #ocaml
rdivyanshu has quit [Quit: Connection closed for inactivity]
hnOsmium0001 has joined #ocaml
objmagic has joined #ocaml
minimario has joined #ocaml
minimario has quit [Remote host closed the connection]
Tuplanolla has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
aaaaaa has quit [Quit: leaving]
mxns has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
mxns has quit [Ping timeout: 260 seconds]
lefuturiste has joined #ocaml
<lefuturiste> Hi!
<lefuturiste> Can someone help me with a recursive function that I wrote to code FizzBuzz? The thing is, I can't manage to append a string using the ^ operator. https://pastebin.com/raw/7nwSn70k
<schlaftier> lefuturiste: You seem to have omitted an argument in the call to "loop" in the second-to-last line
<lefuturiste> Ah yes thanks
<lefuturiste> Now I'm trying to reduce occurences of calls to the "loop" internal function
<schlaftier> It looks like infinite recursion to me
wonko7 has quit [Ping timeout: 268 seconds]
<schlaftier> Also you might want to reconsider the order of your if-clauses
<lefuturiste> it might not be optimised but it did work though. I'm completly new to OCaml
<lefuturiste> but I have an issue when I want to call the function I made 27 | Printf.printf ("" ^ (fizzBuzz 15));;
<lefuturiste> ^^^^^^^^^^^^^^^^^^^^
<lefuturiste> Error: This expression has type string but an expression was expected of type
<lefuturiste> ('a, out_channel, unit, unit, unit, unit)
<lefuturiste> ('a, out_channel, unit) format =
<lefuturiste> CamlinternalFormatBasics.format6
<lefuturiste> oops wrong alignment
<lefuturiste> I'm not very used to IRC, I'm a discord user :)
<lefuturiste> So I don't understand why I have this error, because I pass a string to Printf.printf it should be able to handle it right?
<octachron> Note that this channel is bridged to the OCaml's discord server
<octachron> Format strings are not strings in OCaml, they share the syntax due to a compiler trick but there are fundamentally different.
<octachron> You can use "Printf.printf "%s" (fizzbuzz 15)"
<lefuturiste> or print_endline I guess
<lefuturiste> thx
objmagic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lefuturiste> And yes there was a big mistake in the if clause order schalftier
tane has joined #ocaml
<lefuturiste> I'm learning OCaml because it's used in computer science courses at my High School (I'm in France in a Classe préparatoire)
narimiran has quit [Ping timeout: 268 seconds]
<mrvn> lefuturiste: Some more details: Printf.printf has type "('a, out_channel, unit) format -> 'a" where the 'a becomes something like (int -> string -> unit) for "%d: %s" for example. Constructing that type is a magic hack in the compiler as octachron said and only works on string literals.
wonko7 has joined #ocaml
<schlaftier> lefuturiste: I hear that's quite common in France. Hope you're enjoying your courses!
<octachron> It is not so much the type that is a hack nowadays but the shared syntax with string
<octachron> You could write "%d" by hand as CamlinternalFormatBasics.(Format (Int (Int_d, No_padding, No_precision, End_of_format), "%d"))
<octachron> It is a *little* less user-friendly
<lefuturiste> thx I will try to do my best, from a imperative background standpoint it's a very weird approach to programming this functional style, but I enjoy it. different approachs are always interesting :)
<mrvn> Sure. you can build a format manually. YOu just can't use a string.
<schlaftier> good night everyone
<lefuturiste> where I can found the link of the discord server?
<d_bot> <lefuturiste> ok I found it
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
amiloradovsky has joined #ocaml
objmagic has joined #ocaml
mxns has joined #ocaml
oriba has joined #ocaml
lefuturiste has quit [Quit: Leaving]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
tane has quit [Quit: Leaving]
amiloradovsky has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 246 seconds]