Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kvb
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
31.
▲
by
kvb
11y ago
F# units can certainly handle the problem given a fixed matrix size, but for a general method handling arbitrary dimensions you'd need variadic measure arguments, which aren't supported (and would probably require quite a bit of b
32.
▲
by
kvb
11y ago
It's not true that each element can have its own units; given an MxN matrix there are only M+N-1 degrees of freedom (basically you can choose arbitrary units for each element in the first row and then a single multiplicative factor bet
33.
▲
by
kvb
11y ago
I think there are several reasons to prefer F#. First of all, you can use all of these features in F# today, but when's C# 7 going to be available, and will the "strong interest" features (not to mention type providers) all
34.
▲
by
kvb
11y ago
Could you justify this assertion? Here[1] is an analysis by Andreas Rossberg that indicates that this isn't the case. [1] http://stackoverflow.com/a/23019436
35.
▲
by
kvb
12y ago
It depends on what you're looking for, of course. There are certainly a few unique features that are very nice (e.g. type providers, units of measure, etc.). Compared to Scala, there's much better type inference and more of an e
36.
▲
by
kvb
12y ago
Andreas Rossberg comments a bit on the differences between ML modules and Scala objects/traits here [0]. [0] http://stackoverflow.com/questions/23006951/encoding-standar...
37.
▲
by
kvb
12y ago
Can you elaborate on the issues with running Java on the CLR? I always thought IKVM had a great reputation.
38.
▲
by
kvb
12y ago
Have you looked at the open source F# type provider for accessing R[1]? It's one way to use R from Visual Studio today. [1] http://bluemountaincapital.github.io/FSharpRProvider/
39.
▲
by
kvb
12y ago
F#'s not a pure functional language, it's a multi-paradigm language that has very good support for the .NET object model and imperative programming, even if it is "functional-first".
40.
▲
by
kvb
12y ago
I can't personally vouch for them, but perhaps try http://fsharp.org/use/mac/ and http://fsharp.org/use/linux/ , or the more in-depth http://fsharp.org/guides/ma
41.
▲
by
kvb
12y ago
Increased pesticide use can be a bit misleading, since an increased amount of something like Roundup could still be better for the environment than the typical amount of alternative pesticides.
42.
▲
by
kvb
12y ago
Thanks for the plug. While it's probably not clear from those two links, the IL builder actually tries to use the type system to enforce much more rigid correctness rules. For example, removing any of the opcodes in this example will
43.
▲
by
kvb
12y ago
Sadly, there are some circumstances where XAML is virtually inescapable (e.g. constructing templates; you can use the deprecated FrameworkElementFactory, but it's pretty ugly).
44.
▲
by
kvb
12y ago
Taken at face value I think this is misleading - a typical F# generic type will be represented as a normal .NET generic type at the IL level. However, it is true that some types are erased, like unit-of-measure type arguments or types surf
45.
▲
by
kvb
12y ago
Held back from what? I mean, I'd love it even more if it had higher kinded types, but it's a pretty great language as is.
46.
▲
by
kvb
12y ago
Your String.Split example seems like more of an indictment of the language/library design than the GC. For instance, the language could compile uses of an array literal to a static value that's reused across invocations.
47.
▲
by
kvb
12y ago
Yes, higher rank types are no problem for C# or Java generics. It's higher-kinder types that are unavailable.
48.
▲
by
kvb
12y ago
You can easily do this even in a language like C#, it's just that the syntactic overhead can be a bit much: interface Transducer<A,B> { Func<R,B,R> Apply<R>(Func<R,A,R> f); }
49.
▲
by
kvb
12y ago
Tons of stuff has been productized in various forms. .NET generics, for instance, were initially developed in MSR Cambridge. MSR research has contributed to speech recognition, search technologies in Bing, Excel's Flash Fill, SQL Ser
50.
▲
by
kvb
12y ago
This is roughly correct, but see Andreas Rossberg's caveats here[1] for some considerations that may be important depending on what you're trying to do. [1] http://stackoverflow.com/a/23019436/82959
51.
▲
by
kvb
12y ago
The JVM doesn't directly support higher-kinded types either. It might be a pain to come up with a scheme that interops nicely with other .NET languages, but in principle there doesn't seem to be anything that would make it imposs
52.
▲
by
kvb
12y ago
Why do you say there is no downside? As Jonathan Kaplan points out in the comments of the article Crito links to, Ebola is not 100% fatal and several drugs that have worked in animals have proven to have catastrophic effects when administe
53.
▲
by
kvb
12y ago
Kinect was something like the fastest selling accessory of all time, so you can't expect too many hits at that level. But there have certainly been many other consumer-visible successes, like Excel's flash fill or Skype's up
54.
▲
by
kvb
12y ago
Sure, but there are lots of failures in pretty much every language, right?
55.
▲
by
kvb
12y ago
You might also take a look at F# running on Xamarin's stack, which is probably a bit more mature.
56.
▲
by
kvb
12y ago
Great answer, but on a pedantic note, it's not quite true that the derivative of a data type is its zipper. The derivative is the one-hole context, but the zipper is more like a one-substructure context instead. There's a bit mo
57.
▲
by
kvb
12y ago
Do you feel that rape jokes are appropriate in every forum? Even if rape could be a fruitful topic "in the hands of an excellent comedian", that's hardly the situation being discussed is it?
58.
▲
by
kvb
12y ago
I don't think that's fair at all; F#'s integration with the .NET type system is one of its best features. I find that creating class types (and instances) in F# is usually easier than doing so in C#. And with object express
59.
▲
by
kvb
12y ago
Seems like parametricity ensures that Transducer a b is isomorphic to b -> [a] Am I missing something?
60.
▲
by
kvb
12y ago
That's not accurate. In fact, in the .NET 2.0 timeframe the opposite was the case (the 64-bit JIT would fail to honor the IL tail. prefix in many cases, though it would also make tail calls in other cases even when the prefix wasn
More ›