Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ekiru
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
ekiru
15y ago
It actually says "What you won't learn: Java."
92.
▲
by
ekiru
15y ago
> For example, in The Myth of the Rational Voter[1], Caplan describes how it's actually rational behavior for voters to vote irrationally: the benefit of the degree they can sway the election is far smaller than the cost of acquiring su
93.
▲
by
ekiru
15y ago
Almost every Perl 6 implementation implements their parser using Perl 6 regexes(partly because it's much more difficult to properly support the extensible grammar otherwise), which are essentially PEGs.
94.
▲
by
ekiru
15y ago
Alternately, you can implement such context-sensitive features in another pass after the parse.
95.
▲
by
ekiru
15y ago
Linus suggested in the OP that automated reference counting (where the language implementation handles reference counting for the programmer) is preferable to GC. Python uses such reference counting (although it also has a GC fallback to en
96.
▲
by
ekiru
15y ago
> I don't believe there is a single CS course taught by a grad student Actually, this is incorrect. Although I'm not aware of any courses taught by grad students this year, I now recall that one of the lecturers also taught while a Ph.D
97.
▲
by
ekiru
15y ago
> Sure Harvard may employ people who are titans in their field, Nobel Prize winners and the like, but unless you are going to Grad school there it won’t affect you any. They won’t be teaching you, TAs will. Is this actually true? I don'
98.
▲
by
ekiru
16y ago
I use "variable" to mean "binding" exclusively. > Sure, but it's not like immutable bindings are required for that, just go the internal iterator route and you're set for most cases. Right. That's why in my first comment, I said that no
99.
▲
by
ekiru
16y ago
There are certainly other potential issues with closing over mutable variables. However, if Python's variables were immutable, it would have to create a new scope for the for body(either with statement-level scopes or by using internal iter
100.
▲
by
ekiru
16y ago
The real issue is that Python's for construct doesn't create a new lexical scope for the body. In either Perl 5 or Perl 6, both of which use mutable variables, the corresponding code does the right thing (although Perl 5 only does so if you
101.
▲
by
ekiru
16y ago
> It leads to horrendous abstraction leakage (I need to let every caller know I use FooBarWidget in the core of my application??), If your code catches any exceptions that might be thrown by its use of FooBarWidget, then you wouldn't ne
102.
▲
by
ekiru
16y ago
$_@qw()<>$@{}*&lc()~>>>$.$/$<$: Which happens to appear to not be valid Perl code. $ perl -e '$_@qw()<>$@{}*&lc()~>>>$.$/$<$:' Array found where operator expected at -e l
103.
▲
by
ekiru
16y ago
And array/hash slices/elements, including the deletion of a key.
104.
▲
by
ekiru
16y ago
What aspects of the actual behavior of loop are unspecified?
105.
▲
by
ekiru
16y ago
given/when isn't a switch statement. given and when are two separate constructs that happen to work well together for switch-statement-style purposes. given temporarily sets the topic($_) to an expression. when smart-matches against topic a
106.
▲
by
ekiru
16y ago
Or someone selling you an operating system and telling you you can only install it on hardware purchased from them. These things are far from uncommon in technology. (I will refrain from mentioning the other example that came to mind becaus
107.
▲
by
ekiru
16y ago
Why isn't that a good thing? That criterion would cause you to dismiss Haskell because it looks different from what you're used to; the example code in the link is quite similar to Haskell code. The most useful programming languages to lear
108.
▲
by
ekiru
16y ago
Better than either of those, I think, would be allow url("your-url-here") (with reject or something similar for the opposite). You could even drop the url method and simply write allow "your-url-here" if you only need to allow
109.
▲
Grammar-based dispatching
(ttjjss.wordpress.com)
3 points
by
ekiru
16y ago
|
0 comments
110.
▲
by
ekiru
16y ago
> (last one included wins) This is why Ruby doesn't do this. One of the primary purposes of traits is to fix the problem of having to linearize mixins/parents. Aliasing does ease the problems of linearization, but it doesn't solve them
111.
▲
by
ekiru
16y ago
The problem with uninformed voters self-selecting to not vote is that the people who decide not to vote because they are not sufficiently informed tend to be in the middle range of informedness. There are many more people who are even less
112.
▲
by
ekiru
16y ago
If a programmer writes code that is that bad in Perl, they will write code that is that bad in Python. They will write code that is that bad in C or in Ruby or in Haskell. No language will make programmers who don't care about good code to
113.
▲
by
ekiru
16y ago
How is this so? Decorators are just syntactic sugar for defining a function then replacing it with the result of calling another function (the decorator) on it.
114.
▲
by
ekiru
16y ago
vim was released in 1991. emacs did exist 30 years ago, but it's certainly evolved quite a bit since then. My personal emacs installation evolves regularly, although I will admit that it hasn't evolved at all today.
115.
▲
Protected Attributes Make No Sense
(perlgeek.de)
2 points
by
ekiru
16y ago
|
0 comments
116.
▲
by
ekiru
16y ago
Perl 6 would do that like this: @employees.grep($predicate1 & $predicate2 & $predicate3); The predicates can be a function, a regex, a type, or anything that can be smart-matched against. Alternately, if you want to get the employee
117.
▲
by
ekiru
16y ago
I know that this is a pretty tame example of subset types. But do you really think that modifying the return values of person-age for everything in the system is more easily extensible than a subset type which is external to the objects? Su
118.
▲
by
ekiru
16y ago
Hi. I'm the author of the post. > The Perl 6 article is about all of the syntax that you need to understand before you can read the equivalent piece of code. I think it's more that the Clojure article just shows the code with very littl
119.
▲
Age discrimination in Perl 6 using subsets and multiple dispatch
(blogs.perl.org)
30 points
by
ekiru
16y ago
|
11 comments
120.
▲
Considerations For FLOSS Hackers About Oracle vs. Google
(ebb.org)
9 points
by
ekiru
16y ago
|
0 comments
More ›