Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
infraruby
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
31.
▲
by
infraruby
11y ago
> "Statically-typed Ruby" that isn't actually Ruby Yes, "statically-typed Ruby" != "Ruby". > but a subset of Ruby Necessarily (because "statically-typed"). You can see the supported methods
32.
▲
by
infraruby
12y ago
> I would definitely find what curryhoward described as useful You can get a statically-typed Ruby here: http://infraruby.com/live It follows Java's type system (including generics with bounded wildcards) but it doe
33.
▲
by
infraruby
12y ago
> No developed country has ever defaulted to the Bretton Woods institutions. How is this different to the https://en.wikipedia.org/wiki/Nixon_Shock ?
34.
▲
by
infraruby
12y ago
JRuby converts values (Java primitives <-> ruby Numeric, java.lang.String <-> ruby String, etc.) sometimes with unexpected results. JRuby does not wrap primitive values, or provide values that behave like primitives, but you can
35.
▲
by
infraruby
12y ago
No, probability theory itself is logical. topynate just showed you the (deductive) inference.
36.
▲
by
infraruby
12y ago
> And for larger codebases I think opt-in typing a-la Typescript is a huge win. You can have static typing with InfraRuby (at http://infraruby.com/live ), and it's opt-in in the sense that InfraRuby code runs on Rub
37.
▲
by
infraruby
12y ago
Suppose a function f(a, b) should return the sum of its arguments (i.e. a + b). What tests would you write for this function?
38.
▲
by
infraruby
12y ago
> One of the reasons I like languages with more advanced types systems such as Haskell's or Scala's is because test suites in other languages to achieve the same code coverage take much longer to run. Do you mean Haskell has be
39.
▲
by
infraruby
12y ago
> So you refused to answer my direct question: how fluent are you with Haskell? http://www.paulgraham.com/disagree.html DH0 DH1 <-- you are here DH2 DH3 DH4 DH5 DH6 > For an empiric
40.
▲
InfraRuby 3.6 released – statically typed Ruby compiler
(infraruby.com)
4 points
by
infraruby
12y ago
|
0 comments
41.
▲
by
infraruby
12y ago
> - No, we were talking about safety, not convenience. If you don't want to compare programs written for the same effort , then what? Should we compare Haskell programs written with more effort to bash programs written with less ef
42.
▲
by
infraruby
12y ago
> We are not discussing convenience; we're discussing safety. We were discussing whether Haskell programs are more likely to be correct (than bash programs), all else (including convenience) being equal. Who is more likely to write
43.
▲
by
infraruby
12y ago
> I was talking about the "last" function in my original comment. Then let's say that "some_input" is a list and the non-IO function "compute_directory_name" should return the last element of that list.
44.
▲
by
infraruby
12y ago
> My deductive reasoning is not the evidence I'm citing here. You have no evidence, only (invalid) deductions. > We counted the total number of ways that a function could go wrong If you did this it would be deduction. > and s
45.
▲
by
infraruby
12y ago
> Do you see how that's totally unrelated to accidentally accessing an uninitialized variable? I was responding to your comments about Maybe, but, yes, that is a separate issue. > While testing may eliminate some of these errors,
46.
▲
by
infraruby
12y ago
> Haskell uses Maybe to denote the absence of a value A Haskell programmer could use an empty string for that, or given a Maybe could do this: fromMaybe "" But no true Haskell programmer would do that. > you can
47.
▲
by
infraruby
12y ago
> And you agreed: I did agree that you can prove some properties about your code. Specifically, you can prove which parts of the code do not perform IO, and in that limited sense "if it compiles, it works" for that example, but
48.
▲
by
infraruby
12y ago
Did you read the thread? :-p > Haskell provides more infrastructure for making code reliable than most (or maybe all) mainstream languages. Is there any empirical evidence that Haskell programs really are more reliable (all else being eq
49.
▲
by
infraruby
12y ago
> 95% [...] of the code in Haskell we have established is susceptible to dramatically fewer bugs than any other language out there. No! Haskell has about the same proportion of LOC performing IO as any language. In Haskell, it may be eas
50.
▲
by
infraruby
12y ago
> I've shown how the compiler helps more. If the Haskell programmer uses Maybe, but there is also a cost to doing that, and overall that approach may (or may not) help more in writing correct programs than using bash with a test s
51.
▲
by
infraruby
12y ago
> "set -u" won't reject incorrect bash programs No, but "set -u" does help the bash programmer to reject incorrect bash programs and to put "test" where necessary, just as the Haskell compiler helps the
52.
▲
by
infraruby
12y ago
> if the code were written like Haskell programmers write programs [...] then it would be correct and if the code were written like (true) bash programmers write programs, taking full advantage of "set -u" and "test",
53.
▲
by
infraruby
12y ago
> Using maybe or optional would have solved that problem. If the code were written correctly then it would be correct!
54.
▲
by
infraruby
12y ago
> It could be a lot higher I'd believe 95% LOC don't perform IO, just like any codebase in any language, though it may be easier in Haskell to identify which LOC those are. But it doesn't matter! The problem could be in th
55.
▲
by
infraruby
12y ago
> There are no other possibilities, period. That's true! You have proved the original (deductive) claim "if it compiles, it works" for that one specific example, but that does not hold in general. In general you may prefer
56.
▲
by
infraruby
12y ago
> We have something better for evaluating PLs. Do tell! How do you evaluate empirical claims (about programming languages) without empirical evidence?
57.
▲
by
infraruby
12y ago
> You really don't want to lean on empiricism for PL Why not? considering "more likely to be correct" is an empirical claim. > http://www.cs.yale.edu/publications/techreports/tr1049.pdf Haskel
58.
▲
by
infraruby
12y ago
> Haskell is more likely to be correct after a successful type-check than other langs Is there any empirical evidence for this?
59.
▲
by
infraruby
12y ago
https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google... .
60.
▲
by
infraruby
12y ago
> a power granted by the Constitution from the beginning To the congress, not to the president: https://en.wikipedia.org/wiki/Ex_parte_Merryman
More ›