<orbitz>
I leveled up the name in my version: furi!
<Leonidas>
the next one will be 'furn'?
<orbitz>
quite possibly!
carlosdagos has quit [Quit: Connection closed for inactivity]
orbifx has joined #ocaml
decentpenguin has joined #ocaml
waleee has joined #ocaml
jaar has quit [Ping timeout: 252 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaar has joined #ocaml
silver has joined #ocaml
Birdface has quit [Remote host closed the connection]
Birdface has joined #ocaml
powerbit has joined #ocaml
status402 has joined #ocaml
Birdface has quit [Remote host closed the connection]
Birdface has joined #ocaml
aec has joined #ocaml
<aec>
I have a `let rec foo = ...` to which I want to add a new parameter to be able to make it tail recursive. Should I declare a local function inside `foo` or should I use an optional parameter? What is the recommended way
<theblatte>
it's more common to have a local inner function
<aec>
Thanks @theblatte :)
<aec>
In that case I'll be declaring an extra function every time the outer function `foo` is called, right? Is that a noticable performance penalty?
<aec>
*does that have a noticable performance penalty?
<zozozo>
aec: if the internal function doe snot capture anything (in the environment), it will be lifted out iirc
<theblatte>
yes, better not to capture anything to avoid allocating a closure
<thizanne>
that probably won't be noticeable anyway, though
<zozozo>
as long as the internal function is used more than once, indeed, its allocation shouldn't be a big cost overall
avr_oc has joined #ocaml
jao has joined #ocaml
ravenousmoose has joined #ocaml
ravenousmoose is now known as ravenousmoose[aw
ravenousmoose[aw has quit [Client Quit]
ollehar has quit [Ping timeout: 268 seconds]
aecepoglu[m] has joined #ocaml
aec has left #ocaml [#ocaml]
aec has joined #ocaml
FreeBirdLjj has joined #ocaml
JimmyRcom has joined #ocaml
Birdface has quit [Remote host closed the connection]
Birdface has joined #ocaml
waleee has quit [Quit: WeeChat 2.3]
FreeBirdLjj has quit [Ping timeout: 246 seconds]
aec has quit [Quit: leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
decentpenguin has quit [Quit: WeeChat 2.3]
Birdface has quit [Ping timeout: 250 seconds]
jao has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
spew has joined #ocaml
<Ulrar>
Hey dumb question, how do I tell Printf.sprintf to display a float without the .000000 at the end ?
<orbifx>
Ulrar: take a look at the %x.yf formatting options
<Ulrar>
I can convert it as an int before passing it to Printf but is there a way to do that from the format string ?
<orbifx>
I think its "%.0f"
<Ulrar>
Mh yep
<Ulrar>
that works
<Ulrar>
thanks !
<octachron>
There is also %g
<orbifx>
Ulrar: you are welcome. I recommend you use rounding though for better accuraccy
<orbifx>
Unless you have a reason not to
<Ulrar>
It's a timestamp, I don't actually need a float
<Ulrar>
That's just what I'm getting from Unix.time
<orbifx>
get top marks for rounding
<orbifx>
:)
<orbifx>
octachron: does %g not have 2 decimal places?
<orbifx>
Ulrar: there is also Pervasives.truncate
<octachron>
the precision argument of %.*g controls the number of significant digits, and %g avoids unnecessary trailing zeroes
<orbifx>
ah
Birdface has joined #ocaml
ravenousmoose has joined #ocaml
Birdface has quit [Ping timeout: 264 seconds]
ravenousmoose[aw has quit [Client Quit]
FreeBirdLjj has joined #ocaml
freyr69 has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Birdface has joined #ocaml
decentpenguin has joined #ocaml
status402 has quit [Quit: status402]
ravenousmoose has joined #ocaml
ravenousmoose is now known as ravenousmoose[aw
ravenousmoose[aw has quit [Client Quit]
sgnb has joined #ocaml
rain1 has quit [Ping timeout: 250 seconds]
mildtaste has quit [Remote host closed the connection]