skysight-inc/HackerNews huggingface dataset:
I've been told it's illegal here in Texas -- evading a stop light. I can't find the Texas law saying so, at least not after 5 minutes of searching.
Yes, unless thhe parents decide not to (or the local law doesn't allow it for whatever reason)
Is est bonus video vidi visum computer programmers perceptum magis super vicis veneratio institutio of graphic intentio
> This Cicero guy seems like a very good writer

Um, yes.

http://en.wikipedia.org/wiki/Cicero
It was Bike to Work day, so it's topical.
It's not designed to be useful, it just is. Functions are objects, yes, and the def statement brings them into being and assigns them to the given name in the current scope:

>>> def f(x):
... return x + 5
>>> type(f)
<type 'function'>
>>> dis.dis(f.func_code)
2 0 LOAD_FAST 0 (x)
3 LOAD_CONST 1 (5)
6 BINARY_ADD
7 RETURN_VALUE
>>> g = f
>>> g(10)
15
>>> g is f
True

They're just variables in the current scope. If you're quite clever, your brain is already figuring out that has some interesting implications that some libraries use:

>>> import socket
>>> socket.gethostbyname('www.google.com')
'74.125.71.103'
>>> socket.gethostbyname = lambda i: '10.0.0.1'
>>> socket.gethostbyname('www.google.com')
'10.0.0.1'

I will not pass judgement on monkey patching like this, just pointing out it's doable. I know for a fact Ruby can as well.

Functions just being variables has useful properties when you're doing something like fancy switch/case type things (the readability of this is questionable, but it's cool to look at it, like a Duff's device):

>>> i = 1
>>> { str: func1, unicode: func2, int: func3 }.get(type(i), func1)(i)
in func3

Also consider something like this, which is how decorators work (and they're incredibly useful), sort of like a closure:

>>> def maker(i):
... def ret(x):
... return x + i
... return ret

>>> f, g = maker(10), maker(100)
>>> f(5), g(10)
(15, 110)

I'd be surprised if Ruby couldn't do everything I just did.
Not only is it overly-verbose and ultimately unnecessary (as shown by the alternative that follows in the article) but this mechanism is actually broken. For instance if "freqs" were data given to you from somewhere else and "freqs[c]" happened to have a type that cannot legally have 1 added to it, you'd want to see this error. The "except:" however will absorb any and all exception types and respond to all of them by setting the value to 1.
This is a silly comment. Apple's laptops are widely regarded as the best in the industry and have been for quite a few years. The cinema displays are not just displays either—they also include 2.1 speakers, a webcam, and an ambient light sensor, all in a package that looks really nice in a house or office. This is a package that other display manufacturers are yet to produce.

It's nice to oversimplify for the sake of argument, but these kinds of non-reality based posts just show how polarizing Apple is.

Good design is important to most.
But why does it anger you so much?

Besides, you seem to be ignoring that ViaWeb was built before there were ubiquitous open source libraries for practically everything. My guess is that they basically had to write the whole server/application/persistence/security/payment stack themselves from scratch. Considering that they were able to build it all with a handful (2-4?) of programmers and to beat out competition that had a head start and a much higher head count, I would wager that Lisp had at least a little something to do with it.
Actually that is not entirely true. (at least in Europe)

As per the law, if there is no bike lane, bikes belong on the road as normal vehicles. If there is a bike lane, they belong on the bike lane, but must still follow all the normal traffic rules as normal vehicles.
True, it happens now and then. Man bites dog. But in general, a lot more motor vehicles hurt cyclists and pedestrians, than the other way around.
The trade off being that it takes twice as long to get anywhere because you can't go very fast. At least that was my experience commuting on a bike in Japan.
System architecture, how to do it right
> But I have an issue with the uses like turning off the typesystem and have the project compile just so that you could feel good about yourself

That's a strawman. The claim is that it is useful to be able to compile a partially-valid program so that you can:

* Test actually running stuff

* Get the inferred types of expressions

The idea is to temporarily turn it off just to run some tests or infer some types, and then turn it on again for the rest of the work.

I think that you're arguing against a point that no one is making. Everyone agrees you should not use this feature for any other purpose except to temporarily allow some tests and exploration.
Might be useful, but I do notice (possibly selectively) that a lot of the motorcyclists where I live are dangerous riders.

The young riders who seem to favor the racing bikes in my area (Greater Toronto Area, Canada) seem to be quite dangerous in their habits, whereas the older ones who ride Harleys and the like are much less aggressive on our roadways.
It's like whitespace. Everybody has this reaction at first, then they get over it.
A fun walk through the curse of dimensionality and how your intuition can break down in higher dimensional spaces, and other life lessons, can be found in Richard Hamming's book The Art of Doing Science and Engineering:

http://www.amazon.com/The-Doing-Science-Engineering-ebook/dp...
Or worse, since the supplies' outputs will not be precisely identical or vary over their tolerance range in in sync with each, one supply could end up injecting current into another and cause damage. Such power supplies are generally designed for a specific load impedance, and connecting the supply outputs in parallel can effect a smaller load impedance than tolerable.
App Inventor looks cool -- but in terms of interface and usability it just isn't HyperCard. It's honestly amazing to me that since 1987 nothing much has come out to top it in terms of ease of use. I really LOVED that program...
I've seen initials used too, which is at least a nice hint; but the case I based the example on conjured these characters essentially at random. The real kicker was that they were forced upon users in Unix environments who had been using CVS, Subversion, etc. and went from seeing useful log messages like "changed by jsmith" to aggravating ones like "changed by rjx133".
sorry to break in on the generalizations, but -

When I lived in Spain they killed so many cyclists every year, it was the source of macabre jokes. I found that to be true in several other countries.

Probably should leave out the "Europe vs US" bit of your argument, and just stick to what you think the causes are.
Mihalic said he spent months taking a flask of liquor to bars so he could continue to go out drinking with friends without running up a tab.

Even better for the wallet, the liver, and the streets...you could be a designated driver for your friends and have them pitch in for gas and parking, and some bars will even comp your nonalcoholic drinks.
That may be the case, legally. But as the OP indicates, that is not always the case, culturally.

But if bicycles are treated like motor vehicles, why is it that you often find them creating a lane where there is none? You don't often see motorcycles riding alongside cars, in the same lane, grazing parked vehicles.
JSHint + Vim + V8
Wolves in Sheeps’ Clothing: The Direction of Disruption
Also, raising exceptions used to be quite slow, which could hurt for a sparse counting set. Don't know whether that's still the case.
The iter* methods appear in Python 3, just without the iter prefix. Therefore it is good to use them in Python 2 because that makes it possible to translate the code automatically with the 2to3 script. Otherwise possibly superfluous list conversion might get added, e.g., list(d.keys()).
Did you mean the Caucasian ethnic groups -- i.e., Chechens, Ingush, Ossetian, et al, or the "Caucasian race" (which is itself a misnomer) -- whites. These are completely separate things.

The term Caucasian is highly confusing as it's a racist term invented by the same German who came up with Negroid and Mongloid, and is - as far as I know - only used in the United States. In fact, the Supreme Court in United States v. Bhagat Singh Thind (1923) decided that Indians were "Caucasian", but were not white.

Also, China is a bad example, as Chinese is not an ethnicity, it's a nationality as China is a multi-ethnic nation. The ethnicities being Han (what most people consider to be "ethnic Chinese", Hui, et al.
They might be able to, but there is no real reason to buy on a second market now, so the market would be illiquid. If the employee would want to sell now for fear of a devaluation during the lock out period they could buy put options at the current valuation, haven't checked the price, but those options can't be too expensive right now.
I want to co-exist with bikers, I really do. I wish our cities on the east coast would be more bike friendly.

But bikers need to make up their minds. Who are they, vehicles or pedestrians? Each comes with it's own rights and obligations.

I see bikers all the time blow through red lights, stop signs, and pedestrian crosswalks. When I'm a driver I always need to slam on the breaks to avoid hitting them as such intersections when I have the right-of-way or a green light. And in dense cities a biker can cause a tremendous backup, with gridlock followng him as he makes his way through the city.

Likewise, when I'm a pedestrian, I constantly need to watch not for cars, but for high speed bikers blowing perpendicularly through pedestrian crosswalks when the pedestrians have the crossing light. Why do they get to blow through pedestrian crosswalks and red lights and stop signs?

EDIT: And bikers who listen to their iPod and wear headphones while blowing through red lights - F you!
The Pregnant Entrepreneur And The VC Who Wouldn't Fund Her
Can I just purchase an unlock code from some website?
Well, yes, but I'd also like to think that code should raise the level of the programmers reading it...You should avoid gratuitous complexity

I have a different set of policies than most programmers, which arises from my observation that our field's priorities are out of whack with the actual cost-benefit.

Our greatest costs involve understanding systems, so our first priority should typically be to produce readable and understandable code.

You shouldn't avoid language features just because some people don't know about them.

One should pick language features to optimize for readability, which is entirely contextual. If your shop has a culture of using ?: to the point where it's like a coding standard then you should keep on doing that.

So long as code can be read and understood, programmers will learn. Better yet, if the culture of a shop is that use of language features and other tools are motivated by contextual cost-benefit, then programmers will learn from this example. As it is, programmers generally are more interested in showing off, having fun, and writing things as easily as possible. It's less common to have a culture of prioritizing reading.
Invalid assertion. I didn't notice more cyclists on my commute, and it is absolutely not a cause for concern - there were none. That's right. None. Zero. Zip. Nada.

The entire list of vehicles encountered during my commute on the 18th was: the same guy I often see around town on his goldwing, a maroon 70s or very early 80s firebird or camaro, three pickups, a dump truck, the county sheriff in his personal car (he lives a few houses down from me), and a rather large John Deere tractor being moved from one field to another on the other side of the railroad tracks. Oh, and a train, on those tracks, carrying, amongst other things, 737 bodies on their way to final assembly. And while it's not a vehicle - one skunk, freshly killed.

My commute is 12 miles (one direction) of 2 lane roads across farmland. It's flat, boring, and the roads are in pretty poor condition with no shoulders. The cyclists in this area stick to other routes for their long-distance rides, where the pavement is in much better shape, and they have a shoulder that they can use if they have to dodge an idiot, instead of finding an overgrown ditch and a barbed-wire fence.
The other comments here already explain how they do it on a high level, here I'll try to explain it on a slightly more technical level.

They use DSLs very heavily. The heart of their system is OMeta, a high level pattern matching and transformation language. It works both on flat data (in which case it acts as a parser: transform flat text into structured data) and on structured data, transforming it to different structured data. The compilers for all their DSLs, including the OMeta compiler itself, are written in OMeta.

All these compilers are very short (very roughly 200 lines each?). Because they can define new languages with so little code, they pretty much have a different language for each problem they want to solve. For example for the graphics rendering they define a concise data parallel language, they have a low level intermediate language, and a couple of others (e.g. Maru (Lisp like) and Ants (for implementing WYSIWYG editing) and amusingly the TCP RFC).

Of course DSLs are not enough. If you wanted to make an exact copy of Ubuntu or Windows then no matter how good your DSLs, you're not going to make it in 20k lines. So they simplify the personal computing stack a lot. For example they don't have separate programs for document editing (MS Word), presentations (PowerPoint), internet browsing (NOT the web -- their own web format instead of HTML -- you're never going to be able implement the traditional web stack in 20k lines), email, spreadsheets, etc. Instead they unify all of this in their universal documents. So they don't try to copy, but they try to get something that's functionally equivalent. The result is pretty powerful and potentially more useful: you can put a spreadsheet table in a document, in an email, on an internet page, etc. When they extend the universal document with a new feature (for example graphs, or math typesetting) then all these individual uses benefit, instead of doing each feature N times as we do now.
I assume it was a joke; a pop culture reference to this stack overflow question:

http://stackoverflow.com/questions/1642028/what-is-the-name-...
The thing is, None is always a possible value for a parameter so it's actually more robust if functions are written to expect None.

If you say "f(x=[])" (assuming that worked without the actual side effects it has), someone could still say "x(None)" instead of "x()", causing the function to die. Since a robust program isn't able to avoid checking for None, it might as well set defaults there too.

There is another case where this is important; you might want the equivalent of "f(x=expensive_function_to_calculate_useful_default())", and you don't want that function called unless it needs to be. Only the x=None approach allows this to be deferred.
> Most countries have a 'if you're born here, you get our citizenship automatically' (I'm not sure about China specifically, just using it as an example).

That principle is called 'jus soli'[1], and is far from universal. Only ~15% of all nations confer it. A few more grant it under restricted conditions. China is emphatically _not_ one of those countries.

[1]: http://en.wikipedia.org/wiki/Jus_soli
"Underwater options and market reactions can destroy employee morale --- look at Yahoo."

As are employees locked in for 3 months while seeing their stocks free falling.
The parens are required. What you've written raises a SyntaxError.

You can omit them in the generator expression if it's being passed directly as the only parameter to a function:

halve_evens_only = list(i/2 for i in nums if i % 2 != 0)
halve_evens_only = map (/2) . filter even
I live in Seattle, and there are a lot of cyclists. I don't bike any more because it's too dangerous. But I have a question for the cyclists:

What's with wearing the tour de france outfit? 9/10 cyclists are wearing racing outfits covered with logos. They aren't racing, they're just biking to work or biking because it's a nice day out.

1/10 is wearing shorts and a t-shirt, what I wore when biking.
But if bicycles are treated like motor vehicles, why is it that you often find them creating a lane where there is none? You don't often see motorcycles riding alongside cars, in the same lane, grazing parked vehicles.

I'm not 100% sure what you're describing, but it sounds like you are talking about a situation where a cyclist is riding on the far right side of the lane next to the parked cars and is being passed in the same lane by other cars. What sounds dangerous to me about this situation is not that the cyclist is creating his own lane (because he's not, he's in the proper right most lane), but rather that cars are trying to pass him (a vehicle that is legally allowed to be there) without leaving enough room.

Also, kind of off topic, but where I'm from (California), motorcycles are legally allowed to weave between lanes and do it all the time. Not that I think this is a particularly smart think to do :)
Amazing dude! You have naturally good taste for design which helps too, but to do the full stack in such short time my hats off to you.
"Sorry, This Whining About Facebook's IPO Is Ridiculous"
But the increased restrictions on operating a motor vehicle come from the assumption driving one is a privilege, to be earned upon demonstration of appropriate competence (incl. liability insurance). Likewise, the usual consequences of a abusing a motor vehicle far more disastrous than abusing a bike, prompting a greater required performance to avert such consequences.
He's been under house arrest for over a year now. I'm not saying the guy is perfect, but he's taken some pretty big hits for wikileaks too.
In some cultures naming your dog after someone is an insult to them, like they were your b.
It's a mistake. Default values for optional parameters don't act that way in any other language I know of, including Common Lisp, in which functions are also firstclass.
Nah, Freud is a Galician Jew, not an Austrian. :)
Common reason is comfort but I think the loud colors are purely for show. Just like having a flashy car. They make cycling kits that look like every day wear, especially for mountain biking where having a bit if extra material is extremely helpful when you run out of talent and crash ;).

Personally, I just wear cargo shorts with gussets and a brightly colored exercise shirt (like the kind worn for running). Visibility and comfort without looking like a billboard.
> But people are abusing PHP to write large scale libraries and frameworks. Many riddled with security issues, and unpredictable performance bottlenecks, because the language wasn't designed to actually allow you to write well defined algorithms.

I mostly agree with your post but you've gone way over the top on this statement. PHP is pretty analogous to the majority of languages in terms of syntax, structure, and capability. Frameworks written in PHP are no more likely to have security issues or unpredictable performance bottlenecks than any other language. Certainly nothing prevents you from writing well defined algorithms.

PHP's "arrays" are both vectors and hash tables at the same time. I agree that there is no reason to combine those concepts (although I love ordered hash tables). But ultimately there isn't much harm in it; it's just an extreme example of typelessness.
Cars aren't just rough on cyclists. Being a pedestrian is dangerous enough. In NYC it's not so bad since there are so many pedestrians that drivers are somewhat used to it (and are often pedestrians themselves). But even here you have to watch out:

- In NYC it is illegal to turn right at a red light. Seriously, I wish people would learn this. Actually I wish cops would enforce this;

- As a whole you can't trust cars to indicate in the US in my experience. Not indicating and turning is common enough but you sometimes see indicating and not turning. I guess people change their mind;

- Running red lights, particularly at night, seems to be common in NYC. I certainly see garbage trucks do this but I see taxis, delivery trucks and normal cars do it as well. Most slow down to make sure there's no oncoming traffic from the side street but you can't rely on being noticed as a pedestrian.

- In Australia, when cars turn left (remember, other side of the road there), pedestrians have right of way when crossing the street (if it's not at a traffic light). You're playing with your life as a pedestrian if you rely on that however.

I think I would go ballistic if I ever got a ticket for jaywalking in NYC. Fact is, it's most dangerous as a pedestrian (and probably a cyclist) when you believe you have right of way. When you know you don't you're much more careful.

In California I feel like I'm taking my life in my hands anytime I walk anywhere (in SV although SF is fine). The whole turning right at red lights being OK thing is a recipe for killing pedestrians and I really wish it didn't exist.

I really look forward to the day when all cars are self-driving. If the number of people killed in car accidents were killed by disease it would be epidemic. It's hard to fathom just how blase people can be about injury and death on such a massive scale.

Of course how this will play out will be fairly predictable. You will have probably a large segment of the population who sticks to their guns regarding driving themselves as a personal liberty, lives be damned.
Andrei Alexandrescu - The Setup
>Lay Off the Horn

If you're cycling on the road, even though there is a perfectly good bike lane right next to it, I will honk at you. Every single time.
It's most certainly not a mistake; Python 3 would probably have fixed it, if it were. It is an (admittedly, strange) side effect of the way 'def' works.
"just a dude running a website" demonstrates a complete and utter lack of understanding of everything he did, does and has achieved.
> this was actually a study showing that omega-3 fatty acids improved the rats' memories of a maze after six weeks

So therefore Monsanto is Hitler-level evil and corn subsidies are killing us. Gotcha.
EA Origin wants crowd-funded games
.keys(), .views() and .items() in Python3 return a memoryview which happen to be iterators but do far more.
Agreed - I clicked on it hoping to learn more about who made the app.
freqs = {}
for c in "abracadabra":
if c in freqs:
freqs[c] += 1
else:
freqs[c] = 1
You're not the only person saying something similar, and it's really valuable feedback because it's showing me that people are being distracted from the point I'm trying to make.

The point is that when you're on the surface of a high-dimensional sphere, what you're standing on has characteristics that we, with our 3D intuition, would normally associate with spikes. It seems that you are in a reasonable number of people who are missing that point, so obviously I'm not making it very well.

So thanks for the feedback.
I drive a Prius. I have been hit by cyclists t-boning me 3 times because they follow the "listen, don't look" school of cycling.

(I have never hit one)
Trivi.al Swag
Best Electronic Online
Best Electronic Online Buy Online Shopping at this site! qualified orders over $25 ship FREE Best Electronic Online
My Nokia 6021 agrees with you.
reversed(a) and a[::-1] are not equivalent. The former produces an iterator over the given list (with all the mutability dangers that come with it), while the latter produces a copied list. For plain iteration, you're correct, reversed() is better (similar to how xrange vs. range was back in the day); however, for reversing something and keeping it around, the slice syntax is better.

>>> reversed([1, 2, 3])
<listreverseiterator object at 0x107265650>
>>> [1, 2, 3][::-1]
[3, 2, 1]

To clarify your point, list(reversed(a)) and a[::-1] are equivalent. It's a slightly subtle point, but extremely important if you're keeping the result of reversed() around for any length of time. If you're just iterating at the moment that you use it, yes, they're effectively equivalent.