HNHacker News
TopNewBestAskShowJobs

strlen

4,910 karma · joined April 18, 2008

Programmer. Interested in distributed systems, programming languages and systems (networks, databases, file systems, operating systems) in general.

I do not speak for my employer or my ex-employers.

Curious about many topics outside of programming.

http://twitter.com/strlen

submissionscomments
strlen··on Analysis of SSD Reliability during power outages
What I find rather annoying is that manufacturers/marketers rarely state whether or not an SSD has a supercapacitor or not. Here have been my finding:

- OCZ Vertex 4 SSD does (but this is not advertised)

- OCZ Vertex 3 does not, Vertex 3 Pro does

- Ditto for Vertex 2 / Vertex 2 Pro

- OCZ Deneva(2) R does, other OCZ Deneva/Deneva 2 do not -- and in the case of Deneva 2 R this is advertized

- Intel 320 does (but is only sata II), but this is not advertised at all

- Intel 520/530 does not

- Intel 330/335: unclear

- Intel S3700/S3500: does and this is advertised

Background: I was looking for an SSD to use for a ZFS intent log ("ZIL" -- ZFS's write ahead log) -- my requirements were a sandforce controller (or equivalent) and toggle NAND (so that I could use the same disk for both ZFS cache and the ZIL), and a supercap. This was surprisingly hard to find.

What I'd like to see is:

1) Data on which SSDs have supercap

2) Data on which SSDs actually honour cache flush request (then a UPS + forcing a cache flush request upon power failure + redundant power supplies/multiple replicas in a distributed system) would suffice.

3) Best yet: have an API for for check whether or not an SSD has a supercap, whether or not the supercap still holds charge, and policy for honouring cache flush requests. Let the OS decide based on a policy I set.

If you are a consumer, the practical recommendation is not very different from the practical recommendation I'd give to anyone using spinning disks: RAID1/1+0/RAIDZ(-2) (with SSDs coming from different patches so that they do not wear out at the same time), UPS (for power outages), backups (against yourself and against power supply failures).

For production: obviously use a UPS, put the WAL of your database on an SSD with a supercap, make sure that your database fsync()'s the WAL at a reasonable interval (on every transaction is probably unreasonable, but so is once an hour), and use a distributed system that replicates the WAL. If using a distributed system with (semi-)synchronous WAL replication is not an option and losing incremental data is not acceptable, use redundant power supplies.

strlen··on The real use of money is to buy freedom
That one is very obviously and patently flawed: me to raise my arm in the air right now does not decrease your freedom. The only it could have been true about particular kind of freedom is if the assumptions the parent poster were true.
strlen··on The real use of money is to buy freedom
> The real problem is: This additional freedom you can buy with money means less freedom for somebody else.

There are three wrong assumptions here: 1) that wealth is zero-sum 2) that wealth is the only possible way to obtain freedom 3) that for each individual the same quantum of wealth buys the exact same quantum of freedom.

Prime-facie, neither of these three are true.

There are all kinds of problems with associated with inequality (and the literature is far too rich for me to go into detail here), but this isn't one of them.

strlen··on Why am I here?
No idea, actually. I am guessing Singaporean? It's possible to have a non-citizen US passport, though. I'd also imagine SG passport is still quite great for travel in East Asia, SE-Asia, and Oceania.
strlen··on Protesters vandalize Google bus, block Apple shuttle
> Also our food is better

Good comment overall, but this bit doesn't strike me as quite true. It may be that certain cuisines (Polish, Italian, American, and several others) are better in Chicago, but in United States I've yet to see a city that beats New York or greater Bay Area for variety of quality food.

Some cities have their specialities (American and seafood in Pacific Northwest, East and South-East Asian in LA), but walking down Clement Ave in SF or Shattuck Ave in Berkeley alone is quite a religious experience for a foodie (not to mention many hidden spots of great ethnic food in South Bay).

That said, Chicago is unmatched in one respect: architecture (no, not even by New York). Simply a stunning and beautiful city.

strlen··on Putin critic Khodorkovsky in Germany after pardon
As someone from former USSR, here's my take: the reason Khodorkovsky went to jail is because he violated the law of thieves, he stood up to Putin's bullying. If there was an across-the-board principled anti-corruption effort it would be a different matter, but there wasn't. I am tired of hearing Western's justify Putin's thuggery.

I personally come from Belarus, where a president that was democratically elected on anti-corruption charges assumed the role of a dictator. This was well expected by most of the intelligentsia: on the day of the run off election where Lukashenko's win (against another shitbird, of course, who ended up siding with Lukashenko afterwards) was confirmed my brother called us and told us to lookup 'Sulla' (http://en.wikipedia.org/wiki/Sulla) in a history book. The practice of using "crusade against corruption" to assume dictatorial role is as old as democracy itself.

That said Putin is far more pernicious than Lukashenko: with Lukashenko there is no longer any more of a pretense of democracy than there was under, e.g., Saddam in Iraq (there are elections with mythical sounding figures and no campaigns). Putin is far more cunning: he's able to maintain the facade of democracy while having unchecked and unelected power. With recent revelations about "enhanced interrogations", NSA and FISA kangaroo courts, US -- while light years far from turning into a Russia or Belarus -- is starting to show some of these very same dangerous signs of police state(1) tactics via plausible deniability.

I'll leave this quote out there on the topic of rule by robber barrons (which the oligarchs were plain and simple) vs. rule by thugs on a moral crusade:

"Of all tyrannies, a tyranny sincerely exercised for the good of its victims may be the most oppressive. It would be better to live under robber barons than under omnipotent moral busybodies. The robber baron's cruelty may sometimes sleep, his cupidity may at some point be satiated; but those who torment us for our own good will torment us without end for they do so with the approval of their own conscience."

- C.S. Lewis

(1) Here I am using the historical definition of police state: while today it's equated with totalitarianism (and neither Russia nor Belarus -- much less United States even under the worse scenario -- are totalitarian states, as anyone living in those countries who has also lived under Soviet rule can attest), the original meaning contrasted a 'polizeistaat' (rule by decree without any constitutional limitations) with a 'rechtstaat' (rights state -- constitutionally limited rule of law).

As a side note, it is unfortunate that the privatization process was botched enormously in USSR and its successor states. I always thought that the right approach to privatization should have been to follow the old Leninist slogan _literally_: factories to workers, farms to peasants, i.e., give the employees non-trivial amounts of shares/options in their workplace. Instead it became "factories and farms to corrupt middle managers and old Soviet elite".

strlen··on Why am I here?
Well, you're implying that I think selfishness is purely negative. I don't: I'm selfish in many other ways; pure selflessness can be just as bad (as you've very well described -- parents snubbing children because of a different sexual orientation!). To put in other terms, selflessness and adherence to principle are virtues in the same that bravery is a virtue; yet we don't aplaud the bravery (or selfless, or adherence to principle, etc...) of a suicide bomber much for the same reason -- the immense suffering the rest of their action caused to others. We would, however, aplaud this in (to use a hypothetical example) a fighter pilot defending his country from a nuclear strike by ramming the incoming bomber with his aircraft after they've ran out of missiles or cannon shells.

I'll also point out that my native language is Russian, where there isn't a word like selfishness: there's egoism and egotism, but not really a world like "selfish". If you lookup "selfish" in the dictionary, you'll find a more value-free translation of the word.

My poor chances of physical survival would also not be due to compromising my values: it would be due to inability to adopt to surrounding society's values. Military service in former USSR, for example, is very different from Singapore -- bullying of nerdy/weaker/etc... enlisted men by officers is an endemic problem and has driven many recruits to suicide (lookup "Dedovschina"). The smart way some people took is by committing themselves to officer corps (for a much longer term) and (to fit in) becoming bullies themselves -- something I'd never be able to do.

strlen··on Why am I here?
1) I don't think they live "cocooned". I've lived in South Bay myself for 18 years and honestly haven't seen this. Quite frankly your statement struck me as odd (I earlier wrote racist, but on a second read, I don't think this qualifies) and reactionary ("clans"?). Maintaining ethnic stores, restauraunts, and community events is very different from being "cocooned". They obey US laws (assuming all burdens and responsibilities of citizenship), they don't live in compounds unreachable to outsiders, etc...

2) The delta in material situation between India and US is far higher than the delta between US and and Singapore. Westerners moving to Singapore aren't escaping grinding poverty.

3) There's a large Indian community in Singapore (indeed the very name of the country is in an Indian language) and if you're going to compare Indians moving to the US to another group moving to Singapore (well, perhaps not moving -- they've been there for a long time), this is probably the right comparison to make. I don't see a problem with multi-ethnic states, as long as everyone lives by the same basic laws. I'd still think I would find it acceptable even if the cultures were completely isolated from rest of the country, e.g., Amish in the US, as long as -- again -- they lived by the same laws.

4) I did state elsewhere that I think in terms of immigration policies, Singapore may be "superior" to the US. I strongly believe in immigration as primary human right: everyone should have the right to move wherever they please (with only exception being due to basic economic condition -- a mostly theoretical concern, as usually countries with greatest population densities and largest immigrant population tend to be more prosperous), whether this is the right choice for others is a personal matter (something I can speak out against, but have no right to deny).

strlen··on Why am I here?
Sivers also did surrender his US citizenship:

https://www.federalregister.gov/articles/2012/04/30/2012-102...

strlen··on Why am I here?
> As for military conscription, that only applies to citizens, so if your children take US citizenship instead of Singaporean citizenship (US practices Jus Sanguinis, so I think this is possible), they wouldn't have to worry about military service (I'm not Singaporean or an immigration lawyer, so don't take my word on that).

If you (like afaik, Sivers) surrender the US citizenship, is there any basis for children taking US citizenship?

> In short, expats can totally avoid having that reality hit them. Expats tend to live in a totally different world than the natives of the countries in which they settle.

I think that's what bothers me, but I am also somewhat at a loss why: it is just for a country to allow an expatriate class that never takes citizenship, but which others contributes (indeed, that is a positive). It is legitimate for individuals to choose to forego the benefits of citizenship in order to avoid the associated responsibilities, yet I can't help by somehow sneer at a group of people who are in a country quasi-permanently (i.e., not a short-term business trip) by choice (they aren't fleeing famine or oppression -- which would be a different matter) by choose not to become its citizen.

I also don't think Singapore is a bad place. Quite frankly their immigration policies are far better than a large chunk of the world. They certainly put a far larger expectation on their citizens, but nothing really out of bounds of a Rawlsian "decent country" -- basic civil rights are respected. On the other hand US is guilty of a crime of omission -- there are many potential immigrants coming from unstable, dangerous, and poor places that are denied the right to settle in US, but would be able to settle in Singapore.

I guess if I had to pin it down, what bugs me is the way many Westernerns move and settle in countries without regards to their culture and ways of living -- out of purely material and practical concerns.

strlen··on Why am I here?
Majority of what I said is opinion and prefaced as such, other than fairly true bits about Singapore's communitarian culture (true) and tax rates (true).

Otherwise, very little is normative and instructive (telling someone that this what they should do instead of what I'd do in the same circumstances). So I am not sure how I am patronizing someone as opposed to stating deeply opinion.

I mentioned this in another comment, but John Rawls had the concept of a "decent state" -- which may have a radically different tradition than, e.g., US or UK, but one where basic civil rights are still honored and respected. Singapore fits this bill, so I don't think its system should be condemned in the same vein as many states (perhaps majority of the world today) where, e.g., civil wars flare and religious and ethnic persecution is a day-to-day reality.

> 2: People move to Singapore because they're narrowly selfish

Sivers did surrender his US citizenship, so I can assume taxation did have some reason that choice (although it could be simply to avoid double taxation -- .sg taxes plus US taxes on top -- rather only choosing lower taxes).

However, I never stated that all -- or even most -- immigrants to Singapore do this. I can only state this about Westerners moving there permanently (it's another matter about living there temporarily as part of a job, etc..), for most of whom taxation plays a determining role.

I am actually aware personally of many people who moved to Singapore for far different reasons (fleeing civil wars, seeking basic economic opportunity) -- but none of them were Westerners. For example, I attended high school and university with people who grew up in Singapore having fled grinding poverty in Burma or reeducation camps in Vietnam. In what I think is a huge criticism of US, their families were not initially allowed to enter the US: they were only able to move to the US once their parents established themselves in Singapore, obtained the right employment and education, and move to US on H1B visas.

strlen··on Why am I here?
I always felt that Singapore just doesn't seem like the right place for someone like Derek Sivers. It's a beautiful and wonderfully located place, but the stated or unstated reasons many US expats give for moving there are narrowly selfish -- in the sense of irrational selfishness vs enlightened self-interest -- low taxes, clean streets. Yet Singapore's culture is strongly communitarian: there may be low income taxes, but there are tons of other rules and regulations. The reason for the low taxes, an efficient, universal, and well functioning healthcare system, and so on isn't liberal individual empowerment (which is often the reason given for both individualistic economic policies like low tax rates and for safety-net policies like universal healthcare in the West), it's greater communal good (which -- unlike in ther West -- is also defined in a way that's much more nuanced than "greatest good for the greatest number"). That reality may not hit people immediately, but it will eventually: e.g., if you plan to have kids, be ready for corporal punishment in most schools and even some junior colleges, and (far more burdensome and soul crushing for an individualistic soul) military conscription.

Derek talked about this in earlier essays and acknowledge that he was resetting his operating system towards a more communitarian, giving the example of nominally "converting" to Islam to marry a woman. Yet to me that reason still seemed narrowly selfish, a much more principled and selfless act would be to refuse to compromise one's greater cultural and religious heritage and forgo one of life's greatest long-term pleasures (love) -- something I would not endorse, as it would result in great misery for both himself and now wife.

Personally, I am lucky, as I found United State's "left coast" and "far west" cultures to be my home: I see my own culture was being a happy medium between these two, but I have a fluent understanding and appreciation of both of these cultures. They mesh far better than the cultures I've been brought up in (secular Jewish and Russian) and I'm very lucky that I have the ability to pick and choose -- I would simply not survive (in the physical sense) had I attempted to live a life true to my personal views in the land I was born in. I sincerely hope that Derek finds in New Zealand a culture he can belong to.

strlen··on The Redis criticism thread
Quick things

1) I expected that thread to look like a Cultural Revolution struggle session". Thankfully it wasn't.

2) As I am sure many others have already said it, durability has very little to do with CAP. CAP is about the A and I in in ACID, D is an orthogonal concern.

3) Durability doesn't necessarily mean losing high performance. Most databases let the user choose how much data they're willing to lose and for what latency decreases -- the standard approach (used even in main-memory databases like RAMCloud[1] and recent versions of VoltDB[2]) is to keep a separate write-ahead log (WAL) and let the end-user choose how frequently to fsync() it to disk as well as how frequently to flush a snapshot of main memory data structures to disk.

There are many papers (e.g., http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.174....) that talk about various challenges of building WALs, but fundamentally users who want strongest possible single-machine durability can choose to fsync() on every write (and usually use battery backed raid controllers or separate log devices like SSDs with supercapacitors or even NVRAM if the writes are going to be larger than what fits into the RAID controller's write-back cache). Others can choose to live with possibility of losing some writes, but use replication[3] to protect against power supply failure and crashes -- idea being that machines in a datacenter are connected to a UPS, replicas don't all live on the same rack (to protect against -- usually rack local -- UPS failure), and there's cross-data center replication (usually asynchronous with possibility of some conflicts -- notable exception being Google's Spanner/F1) to protect (amongst many other things...) against someone leaning against the big red-button labeled "Emergency Power Off" (which is exactly what you think it is).

Flushes of main data do also hurt bandwidth with spinning disks and old or cheap SSDs, but there's a solution: use a a good, but commodity MLC SSD with synchronous toggle NAND flash with a good controller/firmware (Sandforce SF2000 or later series, Intel/Samsung/Indilinx's recent controllers) -- these work on the same principle as DDR memory (latch onto both edges of a signal) to provide sufficient bandwidth to handle both random reads (traffic you're serving) and sequential writes (the flush).

4) I known several tech companies and/or engineering departments therein who absolutely love and swear by redis. There are very good reasons for it: the code is extremely clean and simple[4] and it handles a use case that neither conventional databases nor pure kv-stores or caches handle well.

That use case is roughly described data structures on an outsourced heap for maintaining a materialized view (such as a user's newsfeed, adjacency lists of graphs stored efficiently using compressed bitmaps, counts, etc...) on top of a database. So my advise to antirez is to focus the effort around making this use case simpler rather than build redis out into a database: build primitives to let developers piggy back durability and replication to a database or a message queue. In fact, I've known of multiple startups that have (in an ad-hoc way) implement pretty much exactly that.

This is still a tough problem, but one which (I think) would yield a lot more value to redis users. Just thinking out loud, one approach could be a way to associate each write to redis with an external transaction id (HBase LSN, MySQL gtid, or perhaps an offset in a message queue like Kafka). When redis flushes its data structures to disk, it stores the last flushed transaction id to persistent storage.

I would also implement fencing within redis: when in a "fenced" mode redis won't accept any requests on a normal port, but can accept writes through an bulk batch update interface that users can program against. This could be more fine grained by having both a read-fence and a write fence, etc...

This makes it easier for users to tackle replication and durability themselves:

For recovery/durability, users can configure redis such that after a crash, it is automatically fence and "calls-back" with that last flushed id into users' own code -- by either invoking a plugin, doing an REST or RPC call to a specified endpoint, or simply using fork() and executing a user configured script which would use the bulk API.

For replication, users could use a high-performance durable message queue (something I'd imagine some users already do) -- a (write-fenced) standby redis node can then become a "leader" (unfence itself) once its caught up to the latest "transaction id" (last consumed offset in the message queue, as maintained by the message queue itself -- in case of Kafka this is stored in ZooKeeper). More advanced users can tie this with database replication by either tailing the database's WAL (with a way to transform WAL edits into requests to redis) or using a plugin storage engine for the database.

Fundamentally, where I see redis used successfully are uses cases where (prior to redis) users would use custom C/C++ code. This cycles back to the "outsourced on heap data structures" idea -- redis lets you use a high level languages to do fast data manipulation without worrying about performance of the code (especially if using a language like Ruby or Python) or garbage collection on large heaps (a problem with even the most advanced concurrent GCs like Java's).

There have been previous attempts to build these outsourced heaps as end-to-end distributed system that handle persistence, replication, and scale-out and transactions. These are generally called "in-memory data grids" -- some simply provide custom implementations of common data structures, others act almost completely transparent and require no modifications to the code (e.g., some by using jvmti). Terracotta is a well known one with a fairly good reputation (friends who contract for financial institutions and live in hell^H^H^H^H world of app servers and WAR files swear by it), but JINI and JavaSpaces were some of the first (too came too early, way before the market was ready) and are rightly still covered by most distributed systems textbooks. However their successful use usually requires Infiniband or 10GbE (or Myrinet back in dotcom days) -- reliable low-latency message delivery is needed as (with no API to speak off) there's no easy way for users to recover from network failures or handle non-atomic operations.

To sum it up, I'd suggest to examine and focus on use-case where redis is already loved by its users, don't try to build a magical end to system as it won't conserve the former, and make it easy (and to an extent redis already does this) to let users build custom distributed systems with redis as a well-behaved component (again, they're already doing this).

[1] https://ramcloud.stanford.edu/wiki/display/ramcloud/Recovery

[2] http://voltdb.com/intro-to-voltdb-command-logging/

[3] Whether it's synchronous or not is about the atomicity guarantees and not durability -- the failure mode of acknowledging a write and then 'forgetting' can happen in these systems even if they fsync every write.

[4] It reminds me of NetBSD source code: I can open up a method and it's very obvious what it does and how.

strlen··on Apache Kafka 0.8.0 released
I/O is I/O: the big differences are lack of certain APIs (which could make it poorly suited to some -- but not majority -- of I/O intensive use cases; needing -- afaik this isn't resolved with NIO.2 -- needing to use native bindings for kernel AIO is one example), poor APIs (ByteBuffer, I'm looking at you, but here's an alternative: https://github.com/airlift/slice), and the fact that by IO (obviously) involves making JNI calls which do have a latency penalty, but one that is dominated by costs of I/O itself (if code is well written, we're speaking nanoseconds here -- while even a FusionIO device would have latency measured in microseconds). I would say for bulk throughput oriented transfer from disk to socket via sendfile(), I'd say the costs of using Java are not noticeable at all.

Re: Google. MapReduce paper was published in 2004, only a few years after Java 1.4 was released. The infrastructure it is built on top of -- and like M/R itself -- were most certainly written before Java 1.4 was released and likely at a time where running Java on Linux meant using Blackdown -- which had its own issues. Java 1.4 is when java.util.concurrent and non-blocking I/O were introduced; prior to this, writing scalable socket in Java was far more difficult. It would also be until Java 1.6 that epoll() would be supported by Java on Linux, etc...

The other big part is that Map/Reduce is not in a vacuum: while Map/Reduce workloads are mostly I/O dominated, other pieces of infrastructure built on those working blocks are very memory intensive. Google "Java GC" to why that is still an issue with Java (despite having an extremely advanced concurrent garbage collector) In addition, I'd machine in the case of Google the performance advantages of C++ (more about things like being able to lay memory out in precise ways and being friendly to the CPU caches, rather than about pure performance) really do matter -- as Joshua Bloch put it "inner loops of indexers would likely stay in C++".

Finally Google does have at least some infrastructural pieces that in Java: I do know that there are first-class supported APIs for BigTable/Spanner and Map/Reduce in Java, there is also the FlumeJava paper (an EDSL for Map/Reduce in Java), and while I believe C++ infrastructure has superseded MegaStore it is one piece of Java being used for Google's core infrastructure.

That's not to even mention Google's well known exteandnsive use of Java for web-applications/middle-ware including AdSense/AdWords billing and management and gmail.

In the end, you can certainly write I/O intensive applications with Java, but with some caveats: be sure it's actually I/O intensive and the non-I/O intensive parts perform fine in Java, be wary of GC hell, know how to avoid excess/implicit copying (pretty much a case in any languages), and be sure that the APIs you plan to use are available.

In the end, I don't think it's an either/or answer: given (hate to use a buzzword, but it certainly applies) service oriented architecture, you can implement various pieces of a system in languages best suited for that task. This is becoming easier in the H* world now that protobufs is the "native" RPC language as opposed to Java serialization.

strlen··on President Obama calls on every American to learn code
Large employers (or any other corporations) don't see labour costs as an end in it of itself, but merely means to an end: the ends being (whether in the long term or in the short term) making money. They could pursue the ultimate "throw more bodies at the problem" strategy, but per Brooks it is known not to work; companies that do so are penalized by the market.

On the other hand engineers can't choose between working many low-satisfaction jobs simultaneous or working for one high-satisfaction job -- so they choose jobs that maximize their satisfaction. While there's low marginal value in higher salaries past a certain point (so other factors, e.g., for me it's working on interesting things take over); however, significant sub-market compensation (in terms of both salary and stock) -- compared to what an individual of similar ability, experience, and location would get in a company of similar size, age, etc... -- does greatly decrease satisfaction.

That gives: engineers want to maximize their satisfaction which requires not being underpaid; companies want to maximize the money they make, but can take many different approaches to this.

So at the end, the market "chooses" to hire fewer, but strong engineers through a combination of university recruiting (and paying high salaries even to new graduates), tolerating a certain degree of churn among early-career software engineers, and also aggressively going after a smaller cadre of experienced programmers who can also mentor talented but less experienced new-hires and interns.

So no, I don't see the scenario you describe as happening. Instead, I'm not alone (http://en.wikipedia.org/wiki/Average_is_Over) in thinking that similar trends will occur (or, rather, are already occurring unseen) in other white collar jobs, as well as many skilled blue collar jobs. Company finance departments will want to hire workers who are able to write VBA and not rely on clunk recorded macros; manufacturers will (and already do) want to hire workers who can program a CNC machine[1]. This will not make them software engineer any more than me being able to solve a differential equation makes me a mathematician or understanding logic circuits makes me an electrical engineer (to take it one layer lower, knowing Maxwell's field equation and even using it on the job, doesn't make an electrical engineer a physicist). Circling back, this is exactly why it makes sense for people to learning programming -- if robots are automating large parts of people's job's, there will jobs that require knowledge of both the job and programming, to be able to write "userland" programs on the robot, as oppose to program the robots' embedded systems (or to write Excel VBA scripts as opposed to build Excel itself, etc...)

[1] Language they use is G-code (http://en.wikipedia.org/wiki/G-code -- note the date, it's nothing new), and yes, it's Turing-complete: http://callenblogi.blogspot.com/2011/03/bf-interpreter-in-g-...)

strlen··on How can C Programs be so Reliable? (2008)
You're missing the point: in many cases, choice of C is not ideological but practical. I love Modula-3 and OCaml (and ML's incorporation of Modula's module system in general); yet I'm using C++ for the project I am working on. From even the purely technical point of view, despite all the features OCaml has that I enjoy, building this system wouldn't be feasible -- I need shared memory concurrency and multi-core support, for example.

On the other hand, memory leaks occur just well in memory-safe languages (looking at Modula-3, I see a WeakPtr type -- which is there for this very reason). Finally there are also many reasons to want to have manual control over memory -- which when using high-level languages, ends up looking very much like C programming (e.g., Unsafe module in Java). However, you're essentially on your own when doing this.

By the way, memory debuggers are just one example -- plain debuggers are another, tools for tracing the code execution, performance tuning, etc... are another. As are mature and universally available libraries.

I don't mean to disparage high-level languages: I greatly enjoy programming in them and would like them to expand. Yet we're talking about existing code -- and in this case, C's maturity and universality (as a "lingua franca" of programming) are unrivaled. Nothing stops one from using -- and enjoying -- both advanced high level languages and C.

strlen··on How can C Programs be so Reliable? (2008)
It's not about performance (nothing memcache does or more precisely -- given all new features I am likely unaware about -- when it was first rewritten in C is particularly CPU intensive), it's about memory management and efficiency: a in-memory system serves to reduce latency by using large amounts of memory; tuning the JVM to handle managed heaps larger than ~24gb (with only half to 2/3 of that usable for caching data) is doable but pretty much a black art if you want to avoid huge latency spikes caused by garbage collection pauses (which defeats the purpose of an in-memory store). Even if pauses are rare enough as not to affect 95-pctile latency (or if you don't care about 95-th pctile latency) in a highly-available system they introduce one of the more nasty distributed systems failures -- node A talks to node B and goes into a GC pause; node B thinks node A is dead, node A thinks node B is dead -- because when it didn't receive a reply to its outstanding requests until after it emerged from a GC pause triggering a timeout (all in the mean while certain figures from RDBMS community insist this didn't actually occur because "partitions never happen in a single datacenter...")

While it's very much possible to directly allocate and manage memory yourself in Java -- and I have done that ( http://mail-archives.apache.org/mod_mbox/hbase-commits/20130... ) -- but without memory safety guarantees, without the great tooling, without the general idea that "if your code compiles, it will probably work correctly". In other words, you're programming a very verbose and ugly (see DirectByteBuffer interface) C. There's many cases where this approach ("off-heap memory") makes sense when building memory intensive apps in Java that clearly benefit everywhere else from being written in Java: JNI is unpleasant to work with, JNA adds additional performance penalties on top of those imposed by JNI calls that it makes under the cover -- which is fine in many cases, but remember that reading files or sockets are also JNI calls -- but less so when you're building a system that distinguishes itself by being in memory.

On the other hand, if you use C (or "C+" a.k.a. "C with objects", or -- as I prefer to say to avoid confusion with libraries like glib or apr or the Linux vfs layer, all successful object oriented systems written in regular C -- "C with templates") you have accesses to the existing works (advanced allocators like jemalloc and tcmalloc don't work very well with JVM), excellent memory-debugging tools, and so on...

I will say this: I think more software rather than less should be written in higher level languages. I absolutely love OCaml, Erlang, and Lisps (especially those -- like Typed Racket and Clojure -- that have started importing features from Haskell/ML family), like what I see in Go. I use Python (and formerly Perl) on a daily basis for "casual programming", to experiment with new ideas, and automation. I've written a great deal of software in Java, where many people blinked the idea that this category of software could be more than a toy in Java. I think garbage collection could be great improved and I see no theoretical reasons why, e.g., compilers can't be written in OCaml as opposed to C or C++ (I do see practical reasons having to do with runtime, lack of multi-core support but that's a separate and fixable issue). I find projects aimed at making systems programming in high-level languages fascinating (e.g., Mirage OS, Microsoft's experiments, Jikes RVM, etc...)

However, even if these theoretical strides are achieved, there's always going to be room for C -- in the end, you need systems that give you great deal of control and act in a very deterministic and predictable fashion . In the mean while, however, there's also need to build practical systems -- so while C and C++ may not be ideal in theory, they are often the only realistic option in practice.

[1] Note, however, I didn't say anything about performance -- OCaml, Java, Haskell, LuaJit etc.. do well in the Debian benchmarks; Lisps follow those languages closely. Likewise, many high-level languages can be AOT compiled. While when written by a strong programmer and/or assisted by today's excellent optimizing compilers C will still beat these fast high-level languages in most cases, it should be noted that today it's extremely difficult to write assembly code by hand that beats assembly code written by an optimizing C compiler or even the JVM. I predict that when a language comes about that has a better designed type system than C/C++ and yet still provides ability to control memory layout much as C does, eventually compilers for that language will emit assembly code that beats assembly emitted by C compilers for the same reason compiler-written assembly beats hand-written assembly -- compiler is able to leverage the type information (declared or -- in the case of dynamically typed languages with fast runtimes -- inferred) to aid optimization.

strlen··on How can C Programs be so Reliable? (2008)
Keep in mind the date it was written -- this was before SSDs and in the days of tiny heaps. Any improvement upon seek times of what were then commodity disks (SCSI/SAS being insanely expensive and out of bradfitz' reach, afaik) would easily dominate the cost of Perl's runtime (which, in retrospect, isn't horribly bad -- the GC and VM are more mature and less trouble-prone than most common scripting languages, although nowhere near LuaJit or any modern Scheme/Common Lisp implementation).
strlen··on Testimony of Ms. Soon Ok Lee (2002)
I've lived in a totalitarian state too. In a totalitarian state (or even many authoritarian states) you can't speak out against even mundane policies without very real danger of arrest and imprisonment. I remember my dad always closing the door and keeping volume law when listening to VoA or BBC. I can openly view websites and television programs of countries us is in de-facto state of war with. I can speak my mind to coworkers on politics topics (something, again, I can't even do in authoritarian states). Best of all, I can take concrete steps (e.g., make substantial donations to ACLU and EFF, some tax deductible, others not) to find the unnerving and dangerous tendencies.

In a way, saying "we live in a totalitarian state" sounds like defeatism to me: if it's true means there are genuine dangers to speaking out and standing up for individual rights -- which is a legitimate excuse not to do so. It also absolves the voters (and non-voters) of responsibility -- as in totalitarian and authoritarian countries individuals have no say in these policies. So stating US is totalitarian could become a self-fulfilling prophecy.

Here's how The Economist -- for the most part, a publication with a civil libertarian bend -- saw the United States in 2007 -- the near height of abuses: http://www.economist.com/media/pdf/DEMOCRACY_INDEX_2007_v3.p...

#17 is a far cry American's own self perception, but it is an even further cry from authoritarianism and totalitarianism. Given that, e.g., Vaclav Havel has successfully stood up against true totalitarianism with not much more than a typewriter, I think there's both a chance and a responsibility to turn this trend back.

strlen··on FSF responds to Microsoft's privacy and encryption announcement
It is very much related: closed source software isn't audited in the open. Core principle of building secure software is one must assume that their adversary has the source code and is actively building newer and newer attacks based on it (corporate leaks happen all the time). It's not impossible to follow through with this principle when building closed source software, but it is a lot easier to handwave it.

I am not a fan of FSF's tone here, they could be more diplomatic -- but saying "we appreciate your effort, but you fail" would have been more insulting. I think there are many places for closed source software, but core privacy software is not one of those places.

The encryption core (the critical pieces that either input or output plain text -- the places where the attack is more likely to succeed as opposed to the core of the algorithms), as well and the general platform should have the source code available (even if at a fee). That's not quite the FSF vision, but perhaps the powerful vision is needed (one can think of FSF's goals as a captivating utopian story that leads to more incremental improvements).

strlen··on How can C Programs be so Reliable? (2008)
There are multiple factors that contribute, but here's a few that I haven't (to the best of my recollection) seen mentioned so far: tooling (crucial), "do the simplest thing that could possibly work" attitude brought about by (lack of) a built-in collections library and simple syntax, and lack of rapidly changing requirements during development.

Tools for C are powerful, mature, and available on near every platform. Every single C programmer that I know uses multiple memory debuggers, for example: e.g., valgrind for leak checks and more on smaller code segments, LLVM address sanitizer on unit test runs, jemalloc or tcmalloc/google-perftools, and more.

"Do the simplest thing that could possibly work" is somewhat close to the author's point: simply put, while there are widely used cross-platform hash tables in C, it takes more effort to use one; hence, they aren't used e.g., when N is known to be 100 (or if maximum size is bound, there's likewise no pressure to use the built in hash table/red-black tree and one can use perfect hashing instead...). In another big distinction I see between code I wrote in C vs. higher-level languages is that one can simply use a stack allocated variable length array -- or (if random access doesn't happen) a linked list in place of a heap allocated resizable array.

These exammples, I think demonstrated how C discourages you from interpreting "the simplest thing that could possible work" as "the thing that is fastest to code"; that's not to say development speed is not an issue -- it's a _huge_ issue! -- but it often leads to code where the unneeded complexity (such as using a red-black tree or a skip list instead of a sorted stack allocated array!) is hidden from the programmer but is nonetheless present.

Onto the last point, I agree sentiment expressed by others questions the premise. I think the examples of C programmers where we explicitly know of something as being a C program are heavily biased towards well known and open source software; open source software, language runtimes, operating systems, browsers (usually in a clean and limited subset of C++ like, e.g., Chromium and likely Firefox as well -- I only mention Chromium as I've re-used base libraries from its codebase), and so on. We don't, however, think of parking meters, vending machines, and many other usually embedded (but not life critical) systems that -- unlike open source systems software -- are built from unclear, confused, and ever changing business requirements ("well, this city introduced a new red-zone, so now we have to make sure to charge extra 0.33 cents between hours 8 and 13 except on all Holidays, but not July 4th").

Yet when people bring up Java, it's easy to forget about gmail or Minecraft, but instead to think of the insurance claim management system that you had to use after your rental car got rear-ended near 4th and Harrison, that crashes with a user-visible stack trace when you click the wrong button and (even in 2013) doesn't use Ajax and requires opening a new page (slowly, as they don't use Java's built in thread-pools but spawn new threads, because the system has to run at a customer site that uses Enron's custom implementation of Java 1.3 on an AS/400) to make an changes.

strlen··on Testimony of Ms. Soon Ok Lee (2002)
I am all for closing Guantanamo (as well as stopping the horrible brutality in US prisons -- which is a much more pressing, but more "hidden" problem) but it's counter productive to compare US to a totalitarian regime. You are still free to leave United States, to hum a tune from a counter-regime movie, etc... without being thrown in Guantanamo. Many prisoners are also released from Guantanamo. It is legal to openly run a presidential campaign -- and win -- promising to close Guantanamo (but alas, it is not illegal to fail to follow through on this core promise).

In fact, the danger of United States becoming totalitarian is low: creeping authoritarianism, police state tactics, "law and order" used to justify horrid prison conditions and insane sentences, "reasons of state" blackholes (like aforementioned Gitmo), are real dangers. Plurality of the world is governed by either hybrid or authoritarian regimes (which most usually serve to satisfy their rulers' thirst of money and power); North Korea, a few former USSR republics, and perhaps areas of failed states controlled by totalitarian factions are the only unambiguously totalitarian states.

However, by hinting at moral equivalence between United States and North Korea, you end up serving those advocating this creeping authoritarianism: they can now present outlandish arguments that since those opposed to Guantanamo "apologize" for North Korea (note, I am not accusing you of this -- you are not saying North Korea is justified in what they do, but this could easily be spun as such!), advancement of their goals is advancement of North Korea's, Taliban's, etc... goals.

I'm saying this as somebody who feels very strong about torture being an unconditional and absolute moral wrong, sees Guantanamo as representing a very evil and dangerous tendency, and also sees current prison conditions in US as something that -- in the future -- will be seen in the same light as the breaking wheel and the torture rack. Comments like this do not help; just don't do this -- instead, speak up for human rights of all individuals (whether or not their testimony looks like it "serves US agenda" or "helps the terrorists").

[Edit: the big reason I feel strongly about this is that I came from former USSR myself. I remember many Americans, especially those who were unhappy with US behaviour during Cold War would always speak about how US was slighting "my guys", "my country", and being sorry for break up of USSR. They were surprised why I would speak so negatively about "my country" -- as if government and country were equivalent, Cold War was a morally neutral football match, and as if my country wasn't one my family willing adopted and chose to make their home, that is the US.]

strlen··on Ask HN: Joining the Military?
Background/humblebrag: my brother was an officer in Soviet Strategic Missile Forces, a branch of the VVS (no, he didn't ride ICBMs like Dr. Strangelove, he programmed Forth instead). My father was in the Soviet equivalent of ROTC and was commissioned as reserve tank officer, my grandfather fought as a captain in the artillery unit during World War II -- from the very early battle all the way until the storm of Berlin -- and retired as a colonel afterwards. In short, while my family had been on the wrong side of the iron curtain, I think I'm qualified to give some advice -- from many stories my family has told -- as fundamentally, military forces are military forces.

There are many good reasons to join the military, but yours isn't one of them. To be sure, it may be beneficial for you, but exactly for the reasons you don't expect: there will most likely be no adventure for you, there will be a great deal of incredible boredom, and forced discipline.

The question is, how well do you learn/change your behaviour in a strict, highly structured, and top-down (but pretty much close to meritocratic) environment? Have you enjoyed working traditional (non-technical) jobs? How do you respond to bullying (while infamously and atypically pervasive in Soviet Union, it is something nearly all military forces have to a certain extent -- it is (wrongly, IMHO) justified as a way of maintaining "esprit de corps")? I personally would collapse in that kind of an environment -- and the big reason my family moved to the US is because they knew I wouldn't survive compulsory military service (even if I entered as an officer via the ROTC equivalent as a university student -- which was from time to time cancelled then reinstated).

Other people strive and advance: again, military is the closest thing we have to a meritocracy (look at the percentage of top military brass that come from ethnic minorities; compare that to the percentage of top business executive from traditionally disadvantage groups), you'll interact with a cross-cut of your country's population you'd otherwise never see, you'll probably see the world, you'll develop genuine relationships. If you manage to enter the right branch, you'll also possibly build technical skills you can use elsewhere. My brother who entered via the Mozhaev Military Institute -- Russian equivalent of Westpoint/Air Force Academy -- was able to advance his technical skills tremendously (both as a student and during his service). Needless to say, the description my grandfather has given of liberating French resistance prisoners from a concentration camp was one of the most powerful stories told.

This has a great deal to do with your personality: if you're a quiet and independent introvert, I'm slightly skeptical that the military will be a good place for you (but you'll be hardly the only one -- again, it represents a wide cross cut of society and can be an advantage for certain roles). If you're sociable, see obedience and patriotism as virtues (as opposed to morally neutral qualities -- useful only when they serve a greater cause like justice, kindness, liberty, or benevolence) you'll like it; if you've read Heinlein and were surprised when others found him objectionable, you'll enjoy it as well.

However, since you enjoy programming it likely means you've an aptitude for it: rather than start the endless search for "the right occupation/vocation", learn how to apply your skills in the right way.

Here's my advise: learn to overcome being distracted and bored easily while sitting, if you're boredom with the kind of programming you do now, explore different branches. By writing software you can help others an immense amount, especially those in the military. There's still time for you to join the military, especially if you're fine with joining, e.g., cost guard, air national guard, reserve, etc...

Save money, if your state lacks a good commuinity college system (which is probably true for any state other than New York or California) and you don't have the money to attend a state university, move to a state that does. In terms of California, sublease a bedroom in Cupertino, San Jose, or Santa Clara (you can't afford SF), work full-time until you've established residency (you might not be able to get a job as a programmer, but you should be able to find a position in IT, NOC, or tech support -- which can be a stepping stone to software engineering or production-facing operations), then start attending De Anza or Foothill College (you can even do this while working full time, but it's difficult -- however, part time work is actually easier to find in entry-level technical positions); afterwards transfer to a four year university (any will do -- Berkeley/UCLA/UCSD are best, but Davis, Santa Cruz, Riverside, Irvine, Cal Poly, Santa Clara, etc... still send many graduates to top-tier software companies). If you're still interested in the military, do ROTC. Study a technical major as it's much easier to, e.g., go to law school or medical school with a CS degree than it is to be a programmer with a psychology degree (though it is not impossible either).

For what it's worth, the cold truth is that United States is moving towards a society rigidly stratified by education and occupation -- if you're not doing knowledge work, you can at best hope to live paycheck to paycheck. It may not be just or fair, but I don't see any other scenario playing out in the long term. Whatever steps you take, you will have to choose between a decent middle class lifestyle and starting at a computer screen all day (even if you're not programming) OR doing something else and just getting by. If you spend time in the military, unless you plan to make the military your career (becoming a career officer) or perhaps entering the foreign service -- all of which require a college education anyway -- you will only delay that choice. A smart move could be to enter a military vocation that helps you along (e.g., becoming a network engineer in the military, then using G.I. bill and an IT job to pay for college/grad school).

Good luck, but make this choice based on reality of the military rather than some romantic view -- otherwise, you may quickly discover that Navy stands for "never again volunteer yourself".

strlen··on Scrap the Welfare State and Give People Free Money
Problem is that a 5.56 automatic rifle isn't going to be helpful when the enemy is also coming with 5.56, 5.45, 7.62x39 automatic rifles (the choice of plutocracies), but in greater quantities and aided by helicopters, tanks, etc...

A bolt action or semi-auto 7.62x51 or .30-06 is a lot more useful -- especially if your goal isn't to assume the role (i.e., overthrow) whoever is coming from you but to get yourself, your family, and ideally your property away. (I've got a 5.56 semi-auto as well, but it's mostly for the purpose of being able to use cheaper and more readily available ammunition for recreational shooting and not bruising my shoulder after a range trip, while using a calibre that's still more fun/practical than .22lr)

As for taking money without your permission -- no matter how you look at it, it's going to happen (whether via income taxes, sales taxes, property taxes, taxes on investment income, etc...). Friedrich Hayek, Milton Friedman, and company aren't exactly socialists: when they advocate these programs, their goals are to increase individual liberty and decrease state intervention in our lifetimes (rather than pine for a utopian anarcho-capitalist future). I'd rather that money go directly to the poor than to bureaucratic middlemen and rent-seeking corporations (most of the existing welfare programs) or middle classes who don't believe they (or perhaps their neighbours) are sufficiently competent to make their own retirement investments or choose the right health insurance plan for themselves (ACA, medicare, SS, etc...). I find the various paternalistic mandates (SS, ACA) to be more onerous than payments for the truly poor (some of whom as result of structural unemployment).

Replacing programs like SNAP and medicaid with a cash handout aren't going to increase existing tax rates, which seem to be the equilibrium as far as taxation goes -- higher taxes on the upper brackets (or on investment income) won't be accepted by the elites with political power, while increasing taxes in the lower brackets won't gather sufficient votes. They might actually decrease the tax rates by reducing bureaucracy.

strlen··on Scrap the Welfare State and Give People Free Money
> This is the crux of the entire argument to me. The spirit of the second amendment is to allow the citizenry to violently overthrow the federal government if they become too powerful, as a last-resort measure.

That's actually not the case. Militia meant "every able bodied white male and sometimes freed blacks" (a more expansive definition than eligible voters -- as there were still property qualifications for voting), who are meant to be armed with common civilian firearms they would purchase themselves. They could be asked to show up at a "muster" by the government, but the second amendment explicitly protected the individual right of militia members originally from federal government (later on, via 14th amendment, this was extended to the states as well as well as to anyone who is not a felon, mentally ill, etc...).

It certainly recognized the right to use these firearms for hunting and self-defense. The common musket at the time -- The Brown Bess -- was smooth bore with a 0.75" caliber and a bead sight, i.e., a 12 gauge shotgun. It could be loaded with buck shoot, with a musket ball, or (as very common) "buck and ball". So it served both the purposes of militia service weapon, for hunting many kinds of game (which wasn't a luxury, but often a necessity), and self-defence (against both humans and wild animals).

Ancestors of modern hand grenades ("bombs"), artillery, and so on all existed at the time -- but were not commonly owned by civilians.

Rather than try my hand at constitutional scholarship, I'll go by the legal theory behind the Heller decision for this. More: http://www.thedailybeast.com/articles/2013/08/22/justice-sca...

Honestly, I'll go on record and say that this is good: violent overthrow of the government worked well for the American colonists precisely because they were colonists. The Monarchist loyalists could simply leave, whereas in France, they could only do so sans the head. The stakes were much smaller, so the American revolution (or really "the first American civil war") did not lead to the horrible outcomes other violent revolutions have almost exclusively lead to. Today, the results would be far far worse -- rather than a blossoming of civil liberties, it would mean revolutionary terror, followed by an even longer period of counter-revolutionary terror. If this happens, I'll definitely want to be armed, however -- to defend myself and my family from any of the factions involved in either the revolution or the counter-revolution as I make my way to the nearest port of entry of a peaceful country.

Private armies (those reading the "militia" to mean militia groups as opposed to what it actually means) are an even scarier idea. Not to Godwin this, but it reminds me of Freikorps, SA, as well as KPD/SPD armed groups, and other (sometimes state sponsored, sometimes not) street thugs of Weimar Germany.

strlen··on Scrap the Welfare State and Give People Free Money
I don't think "pay enormous cost for a 20 year old firearm, get permission from the local law enforcement (which won't be granted to anyone in California who isn't a Hollywood producer), wait for the federal paper work for several months, pay additional fees" is "perfectly".

Even prior to 1986 FOPA amendment, the number of people who actually owned such firearms was low -- but then again, they were only used in two crimes, in both cases by police officers. Most people who take advantage of this are collectors and movie makers.

As for me, I'll pass on jumping through enormous hoops only to buy a machine that turns money into noise: ask a member of the US armed forces how many times he's actually used the M4 or M16 in fully auto or even burst as opposed to semi-auto. This is reflected in the M16/AR-15 design: they aren't designed for "spray and pray", they're designed for carefully aimed and disciplined fire in semi-auto mode (with occasional full-auto bursts for supressive fire or against metal armour).

> I personally think not. Is there really a difference between hand grenades and automatic rifles? Again, I personally think not.

Well for starters, go to a range that rents automatics (like one in Las Vegas), shoot a fully automatic rifle, and then put it down. Then, pull the pin on a hand-grenade, drop the hand-grenade next you, and then stand in place :-) [No, I don't actually encourage you to do this]. Or you may want to consider why police cruisers have rifles (albeit semi-automatics) but not (explosive) grenades -- rifles are person-to-person weapons, grenades are effectively area/anti-materiel weapons. (Random note: When I lived in USSR, my school PE classes actually included "grenade toss" -- you'd toss a stick grenade filled with inert substance -- as a sport; it's quite challenging.)

I think the difference is immense, they're completely different kinds of weapons -- first of all hand grenades, aren't technically arms if you use the definition of arms used when the constitution was written.

They would not be protected by the second amendment even if fully automatic weapons were. Fully automatic weapons on the other hand aren't protected for the same reason "shouting fire in a crowded theater" (as much as I hate this phrase...) isn't protected, grenades are not protected for the same reason that setting fire to a theater isn't protected.

While this isn't tested, semi-auto rifles, are almost certainly protected -- as they're owned by civilians in great numbers (unlike hand grenades or automatic rifles) and compare to pistols (demonstrated per case law to be protected by second amendment) are far less frequently used in homicides (despite there being more rifles/shotguns in circulation than pistols). This certainly passes the "unusual and dangerous test" used in Heller to rule out automatic rifles, hand-grenades, missiles, nukes, etc... and all the other frequently asserted strawmen.

I'll point you at an excellent book that offers a far more nuanced reading of the second amendment than either side wants to admit -- http://www.amazon.com/Gunfight-Battle-Over-Right-America/dp/... -- including the discussion of what militia means (which is different from what it means in Switzerland, although not entirely unrelated)

strlen··on Scrap the Welfare State and Give People Free Money
No, I don't think there are low crime rates for this reason. I have never implied this or stated this. In any case a comparison between Switzerland and US is bizarre -- there are far too many differences to idly (without multivariate analysis on data that is likely not even available) claim that any one variable explains lower crime rate in one vs. the other.

[Edit: I previously included a longer rant here, but, I'll just point anyone to this CDC study -- http://www.slate.com/articles/health_and_science/human_natur... -- and let them make their own conclusions]

I do happen to think that it's better for individuals to decide on their own whether the risks of keeping a firearm are outweighed by any protection it offers. My firearms are stored unloaded, under lock, with ammo in a separate location: I live in a safe neighbourhood -- which I can finally afford to do after winning the IPO lottery (to be blunt) -- so for me the risks outweigh the benefits; I don't, however, claim to be able to make this choice for others. I would much rather see housing prices go down (even though I will be hurt personally by this) and for the (scary) trend of growing education-based stratification of US society to end -- stratification which is largely manifested in ways American families live.

"Not giving a shit about legality" is far worse than even outright (but enforced) bans -- it means the criminals are able to get away with it, but individuals citizens who want to actually use it for self-defense or sport cannot.

You're also confusing two aspects of Swiss laws: militia members can keep their service rifle at home while it's a fully automatic (i.e., an actual assault rifle) with restricted ammo (I think the restrictions, however, are to prevent the military issued ammo to be used for non-military purpose; you can still take it to the range and use it with civilian purchased ammo).

Separately from this, after the end of their militia service, they have the option of paying to have it permanently converted it to semi-automatic and keeping it under the same laws as other civilian firearms.

On the other hand, fully automatic/select fire weapons are essentially illegal in the United States, military members can't keep their automatic rifles with them at home, and so on. Like in Switzerland, most US states do permit ownership of semi-auto versions of those rifles (however, afaik in the United States, they must have been manufactured as semi-automatics -- there's murky case law that can land you into trouble for having cerrain M16 parts in an AR-15, for example). However, some states (e.g., NY) ban them completely..

strlen··on Scrap the Welfare State and Give People Free Money
The Latin American states where the elites lives on hill-side housing, protected by guards and fences, all have fairly strict gun laws. They aren't going to let the poor arm themselves! While European gun laws are usually stricter than those in the "red states" of US, there are many places that have more lax laws than New York, Connecticut, and California (Czech Republic and Italy two examples that popped to my head; New Zealand and some Canadian provinces -- while not in Europe -- are also more lax than NY/CT/CA/MD afaik).

The reason you have the firepower is because those left behind by the knowledge work revolution and living in the inland US still have sufficient political power to counter the Manhattanites and San Franciscans eager to take that firepower away ("oh no, we can't let the peons be seen carrying their icky icky AR-15s, ewww!").

The biggest pusher of gun control in the United States is Mike Bloomberg -- he also happens to be a fairly enthusiastic defender of Wall Street. In his mind it makes perfect sense: why would the elites arm themselves directly, if they can just isolate themselves in Manhattan and Pacific Heights, protected by an armed police state. His gun control support (which seems to be back firing so far) is a great way for him to score brownie points many liberals (who would otherwise be diametrically opposed to most of his positions) without actually proposing any laws that would inconvenience the top 1-0.1% of the population.

I'd imagine the Swiss voters (who are voting for this) are laughing extra hard; upon completion of their militia service, they're able buy their service rifle (SIG 552) for $35 (the cost of converting it to a semi-automatic) -- the US-export equivalent (SIG 556) costs in excess of $1800 and cannot be purchased by those in New York or CT (and without significant alterations, in California), the states where quasi-technocratic elites dominate politics: they "know" what's best for the lowest classes (hence support of paternalistic programs like SNAP as well as individual mandates like social security and ACA), they also "know" what's the best for you to defend yourself.

strlen··on Scrap the Welfare State and Give People Free Money
I see a lot of comments here talking about unfairness of this system, about how it would mean less motivation, etc... and general comments about wealth redistribution.

First, this program would not create additional welfare dependants. Instead, it would transfer SNAP recepients, able individuals living on social security disability payments (http://thelastpsychiatrist.com/2011/09/how_to_be_mean_to_you...), to a system that is market-based, less expensive, and (relative to the current system) creates incentives to join and/or stay in the labour force (you don't lose eligibility for this system the moment you get a job).

Second, overall welfare programs for the poor do not cost Americans nearly as much as entitlements for the middle classes (medicare, ACA, social security, etc...). So if you're a doctrinaire libertarian/conservative who is unhappy that any taxation/wealth transfer exist, then you should work towards eliminating these programs before going after SNAP, ACA, or opposing reform like this.

There's been multiple structural shifts over the last century: the second industrial revolution, de-industrialization, and now job-less recoveries (see Tyler Cowen's "The Average is Over" and "Great Stagnation" for discussion of the later).

As nearly all jobs work becomes knowledge work (as many have -- e.g., move to CNC for metal and wood working), each technology change means a bulk of technical knowledge becomes obsolete. This leads to a bimodal employment structure: those with the right technological knowledge (as well as those at/perceived to be at the top of the talent curve) are rewarded extraordinarily (driving up housing prices), while those without the appropriate knowledge and who are unable to re-adjust fast enough (e.g., currently there's a resurgence of C/C++ programming, but yet we've got a generation of programmers who have never bothered to learn manual memory management) have to settle for lower wages until they're at a point where the salary they will need to convince them to (again) take up full-time employment will not be a salary any employer will pay. As a result you'll see many workers working just enough to get by (remote freelance/consulting work) and then eventually drop out of the labour pool altogether. A wise welfare state policy should then be designed not to punish those with volatile incomes and encourage continuous labour pool participation (until the workers gained the technical skills needed for higher wage jobs, or perhaps the skills they've already had have suddenly become in-demand).

Eventually, I think this work itself out: settlement of inland west, cheaper housing construction techniques, a general socialization of the values of an entrepreneurial workplace (vs. workplace of "company-men"/"company-women") means there will once again be a middle class. However, I am very much scared of the many stupid things an electorate desperate "to do something" coupled with rent-seeking businesses might end up doing (that will cause serious long-term damage to this country) in the meantime. Any move from a system that is a mess of regulation (navigable best by those with "pull") to one that is more market-based would help.

strlen··on Geeks for Monarchy: The Rise of the Neoreactionaries
To be honest, I did hesitate to include Salazar in the same list as even Pinochet, much less Franco or Castro: it was never totalitarian or substantially fascist, less authoritarian than many regimes in Latin America, and certainly far less authoritarian than People's Republic that were setup in its former colonies.

I clearly understand what you said about leftist in US vs. leftist elsewhere as well: both the republicans and democrats in the US would in many countries be more akin to a fairly tiny party that called itself liberal and had only a few seats in the parliament (e.g., in today's Russia the entire US political spectrum would likely fall into Yavlinsky's party/list which hasn't had any seats at all in the Duma since 2007).

Given a choice between communism (even communism under a "progressive" cloak -- Venezuela is a clear example of how that played out!) and Salazar, I also think that most reasonable people would pick Salazar in a heartbeat. Communism and socialism almost by definition require totalitarianism, which is why the last remaining totalitarian state is North Korea, with other states getting progressively less authoritarian in lockstep to them becoming less communist. Chinese citizens are for the most part more free than Cubans -- e.g., Chinese and Vietnamese citizens are permitted to leave their countries, while immigration is extremely difficult for any Cuban medical doctor. Cubans, however, are more free today than my family was under Kruschev and Brezhnev -- my parents couldn't even travel to other communist countries for scientific conferences until 1989.

However, I was not comparing Estado Novo to its alternatives at the time in Portugal or even the current mess (I believe one of the leaders of the coup against Caetano said that he wouldn't have overthrown him if he saw what came out in the end): what I see as an example of "decent" social democracy would be Sweden -- private property and capitalism, but with a somewhat more expansive welfare state. To be clear I do not in any way endorse an expansive welfare state: the taxation needed to sustain such a state chokes businesses (I am not at all surprised that Volvo is owned by Ford and Saab by GM) and the handouts create artificial externalities which ultimately lead to less individual liberty ("we gave you free healthcare, so now we will regulate what you, what you smoke, and force you [as in France] to see a doctor on a routine basis").

I also realize that this isn't a fair comparison: 1930s Portugal was a multi-ethnic state with overseas colonies, yet with living conditions (in terms of literacy, standard of living, but perhaps not infrastructure) even in metropolitan Portugal that resembled today's developing world. To compare it with a highly homogeneous and wealthy Scandinavian country of today is indeed quite absurd.

The colonial wars also complicate things quite a bit -- I personally do find it ironic that Portugal was condemned for them, while France (which acted with greater brutality both in its colonies and against domestic dissent) got a free pass.

I also do not in any way mean to slight the enormous advances in standard of living that happened under Estado Novo, as well as neutral Portugal's role as an escape route for refugees.

Yet, the "neo-reactionaries" are for the most part Americans which is what I find insane: Western-style liberal democracy is an unattainable dream for most. I first learned the word liberalism from my grandmother, who described it as only a faint memories from her grandfather -- a merchant of first guild (highest title that could be held by a Jewish capitalist) in Imperial Russia -- who supported a liberal party in 1905. I find it crazy that any American or North-West European would want to give that system up for the neo-ancien regime.

← PreviousPage 6 of 34Next →