News for hackers. Stuff that matters.

azolotko

Re:OpenBSD Crossed 400k Commits on Wednesday October 09, 2019 @03:06AM (#21200790)
400k CVS commits
Re:Why Use F#? on Thursday December 13, 2018 @04:27AM (#18671010)
You have a pretty narrow definition of a platform. Consider https://en.m.wikipedia.org/wiki/Computing_platform

Yes, you are right, I didn't consider the checkcast instruction.

Yes, F# does not have this particular limitation, but has few of its own in different places. Most notably, it lacks HKT (arguably, because of CLR awareness of generics).

BTW, alternative approaches to stack-safe recursion do exist in Scala. For example, https://github.com/slamdata/matryoshka

Re:Why Use F#? on Thursday December 13, 2018 @03:13AM (#18670671)
I suppose you meant boxing/unboxing. If so, yes, that's necessary for primitive types. As for regular objects, no casts are needed.

Regarding TCO, that's a well known limitation of the current Scala compiler. Hardly a "horror story".

Let me assure you, there are plenty of platforms where F# is nowhere to be seen. Thus, "can run on any platform [I care about]", which is a different set for different people anyway. For example, F# does not run on JVM, does it?

Re:Why Use F#? on Thursday December 13, 2018 @12:54AM (#18670180)
JVM knows nothing about generics. What kind of casts are you talking about?

Trampolines are a common technique to implement tailcalls on platforms that don't support them natively. What are the horror stories then?

Why would you bother with F# or Scala when iOS has Swift?

Re:Rich Hickey: Deconstructing the Database on Wednesday August 29, 2012 @06:29AM (#4447865)
AFAIK there was a Postgres extension that did something like that. But than it became deprecated and was eventualy removed.
Re:Rich Hickey: Deconstructing the Database on Wednesday August 29, 2012 @01:35AM (#4447244)
In Datomic you can setup a function the transactor can call within a transaction. This function takes the current value of the database and other supplied arguments (e.g. $100 and -$50 from your example) and according to its logic produces and returns a list of "changes" the transactor should apply to the database. The function is pure in sense that it doesn't have any side effects, it just "expands" into new data. And of course this "expantion" and application of its results happens in the same transaction.