News for hackers. Stuff that matters.
Re:Math.Round opens the browser print dialog by lelf on Wednesday June 19, 2019 @08:03PM (#20228580)
You cannot “window.print” in a Float32→Float32 function. It just won’t compile.
Re:Math.Round opens the browser print dialog by jakear on Wednesday June 19, 2019 @10:41PM (#20229350)
But of course, the function in question isn’t Math.Round. It’s “interpretDotNetFunction”. Which is, necessarily, “string -> IO ()” (forgive my syntax).
Re:Math.Round opens the browser print dialog by gmfawcett on Wednesday June 19, 2019 @09:52PM (#20229129)
You could make it compile in Haskell. You just shouldn't:

f x = unsafePerformIO $ print "boom" >> return (pi * x)

Re:Math.Round opens the browser print dialog by H8crilA on Wednesday June 19, 2019 @08:29PM (#20228705)
In what language?
Re:Math.Round opens the browser print dialog by pathikrit on Wednesday June 19, 2019 @09:02PM (#20228877)
Haskell
Re:Math.Round opens the browser print dialog by tedunangst on Wednesday June 19, 2019 @09:50PM (#20229116)
You can't console.log either...
Re:Math.Round opens the browser print dialog by drdaeman on Wednesday June 19, 2019 @10:38PM (#20229341)
There is Debug.Trace.trace which does the trick with unsafePerformIO (which is a special non-type-safe escape hatch for IO)