The cutting-edge of cutting: How Japanese scissors have evolved (2018) - <AUTHOR> https://asia.nikkei.com/Life-Arts/Life/The-cutting-edge-of-cutting-How-Japanese-scissors-have-evolved2 <comment><USER3> Japan being a world leader in scissors does not surprise me after listening to Dan Carlin's Hardcore History episode on Japan:

[https://www.dancarlin.com/product/hardcore- history-62-supern...](https://www.dancarlin.com/product/hardcore- history-62-supernova-in-the-east-i/)

Dan brought insight into Japan that I did not have, explaining that Japan is a society of extremes. For Japan to be world leader in anything the Japanese society sets their mind to does not surprise me at all now.

(side note: I worked and lived in Japan for seven years and my wife is Japanese too. I thought I knew what Japanese people were, but Dan's explanation crystalized what being Japanese is for me.)

<comment><USER4> I would more describe this as a natural extension of a large artisanal tradition of sword-makers—swords at one point being as common in Japan as guns are in America today, unlike most of Europe where the average personal-carry weapon was a knife. There were tons of swordsmiths around to fill all that demand (and no automation to let just a few swordsmiths fill it); and the descendants of all those sword-makers still have some of that knowledge, and nothing useful to do with it (there being only so much demand for decorative and ceremonial swords today to sustain a few swordsmiths.) So what do they turn their knowledge of swordsmithing to? Making tinier pieces of metal sharp using the same techniques. Like scissors. Or fountain-pen nibs.

Or just using those skills to entertain, like this guy: [https://www.vice.com/en_us/article/nek3wk/rice-kitchen- knife...](https://www.vice.com/en_us/article/nek3wk/rice-kitchen-knife-kiwami- japan-youtube)

<comment><USER5> The legend of Japanese swordmaking is much overplayed. Swords were common, but swordmaking wasn't. Swords were far more valuable in japan due to the lack of some basic resources (metals). Japanese swords were therefore passed down rather than destroyed, as opposed to viking culture where swords were often buried. So a smaller pool of Japanese sword makers making a relatively small number of swords could supply a larger population.

Japanese swords are also much softer than enthusiasts like to admit. They are very pure carbon+iron steel but that is limiting. Again, due to nature of the available resources, Japanese sword makers did not utilize other elements, impurities, that strengthen steel beyond what can be done with iron+carbon. And all that famous folding was not unique to Japan. The average viking sword demonstrates much the same level of craftsmanship, at least in terms of the actual steel. Japanese swords are certainly better looking but they were never the magical objects often portrayed.

[https://en.wikipedia.org/wiki/Damascus_steel](https://en.wikipedia.org/wiki/Damascus_steel)

[https://en.wikipedia.org/wiki/Wootz_steel](https://en.wikipedia.org/wiki/Wootz_steel)

"For reasons that are not entirely clear, but possibly because sources of ores containing trace amounts of tungsten and/or vanadium needed for its production were depleted, the process was lost to the middle-eastern metalsmiths around 1750. It has been eagerly sought by many since that time."

[https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/d/Damasc...](https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/d/Damascus_steel.htm)

<comment><USER6> > Japanese swords were therefore passed down rather than destroyed, as opposed > to viking culture where swords were often buried

It should be noted that viking swords were often also passed down even _after_ being buried, due to the lovely part of the viking wedding ceremony where the groom presents an ancestral sword from his family to the bride, to keep in trust until they have a son to take it [1].

That sword was often obtained by making the groom take it from the grave of an ancestor it was buried with.

That makes me wonder why the sword was buried in the first place. Most cultures that bury a person with their possessions seem to do so because they believe that the items will be needed by the person in the afterlife.

But if vikings buried your grandfather with his sword because they believed he needs it in the afterlife, it seems odd that they would later make you take it for your wedding and leave the old man defenseless against his afterlife foes.

[1] [http://www.vikinganswerlady.com/wedding.shtml](http://www.vikinganswerlady.com/wedding.shtml)

<comment><USER7> > That makes me wonder why the sword was buried in the first place.

Probably some ritual related to "entering" heaven. Similar to putting coins on the eyes of the dead. Maybe they won't need it after a period of time?

</comment></comment></comment></comment></comment><comment><USER8> IMO these novel scissors don't really represent the achievements of Japanese scissor-making. The market for high-quality hairdressing and barbering scissors and tailoring shears is now almost completely dominated by Japanese manufacturers.

There are two makers left in Sheffield (William Whitely and Ernest Wright), a handful remain in Solingen, but Japan has dozens of high-end scissor manufacturers. It's a remarkable niche success story, built on a careful combination of design innovation and traditional craftsmanship.

<comment><USER9> 30 min documentary that goes into these sort of artisanal scissors in Japan: [https://m.youtube.com/watch?v=Gd_ySi7mjeE](https://m.youtube.com/watch?v=Gd_ySi7mjeE)

<comment><USER10> Well thank you, I know feel compelled to spend unnecessary amounts of money.

</comment></comment></comment><comment><USER11> I watched a TV program here in Japan a couple weeks ago where the panelists were all senior executives from stationery companies. The executives were asked about, in various categories (pens, paper, staplers, etc.), which of their competitors had the best product. For scissors, they all raved about the Plus Fitcut Curve (mentioned in the article). They are the best scissors you can buy for less than 10 dollars.

[https://www.amazon.com/Plus-Curve-Scissors- Large-35060/dp/B0...](https://www.amazon.com/Plus-Curve-Scissors- Large-35060/dp/B00KXFTIC8)

<comment><USER12> I think the article mentions that these are made in Seki city, in Gifu prefecture. Seki is famous for knife makers and they have a really neat knife festival with a street market. If you're into that kind of thing, it may be worth visiting. If nothing else, you can get a sense of how traditional Japan manifests in these little industrial enclaves in small town Japan.

<comment><USER13> Note that if you don't go during the festival, the downtown is pretty much dead. There is a nice knife shop that caters to tourists (刃物センター blade center) but the festival is definitely the best part of the year.

<comment><USER14> The big problem I see with being a tourist and going to this thing is that you'll have to pay to have your knife purchases shipped home (or pay a hefty checked-baggage fee), since you can't bring sharp blades in carry-on luggage.

<comment><USER15> In this hypothetical trip to Japan, with airfare, lodging, food, drink, local transportation, and luxury knife purchases (including duty), a 25 USD checked bag fee is 'hefty' and a 'big problem'?

<comment><USER16> Try traveling without checked bags sometime. For part of your stay, get an AirBnB that has laundry facilities.

Only having a single small roller bag (or less, I know people who just have a single backpack!) makes travelling a lot easier. I often miss being able to bring stuff home in checked luggage, but I love getting off an airplane and not having to wait for my baggage, or worry if I'll be in the 1% that doesn't get my bag back!

As an example, I landed early morning in London, walked off the airplane, went through customs, and got right on public transit, then right to a tiny cafe and had some breakfast.

Could I do that with a giant checked suitcase? Sure. Maybe. But it'd suck. And the first thing on my mind would be getting to lodging to drop off my bag. Landing at 9am and having a giant bag I need to drag around until 2pm or whenever check-in time is means a large chunk of my first day is ruined, and I get to repeat all that after a 10am checkout dragging a big bag around until it is time to go to the airport and fly back home.

Bonus: in Japan, with only a small roller bag, taking public transit to/from the airport becomes very doable at any time of the day.

tl;dr smaller bags mean simpler logistics for the entirety of a trip.

<comment><USER14> Exactly; this is the only way I travel now. I have two backpacks, a large "travel backpack" that fits in carry-on, and a smaller one that holds my laptop and some other stuff and fits under the seat in front of me. The smaller one clips onto the larger one when I need to carry it around, and then when I've left the large one at my hotel/hostel, it becomes my daypack to hold a raincoat, souvenirs, brochures, etc.

In many places, hotels have laundry facilities. Every place I stayed in Japan had them, so it was easy to just bring enough clothes for 4 days and do laundry every so often.

I'll also add that any kind of roll-around luggage is a giant PITA if you're in Europe, because the streets and sidewalks are largely cobblestones.

<comment><USER16> > In many places, hotels have laundry facilities.

In most countries I have visited, the laundry facilities are cost prohibitive and the cost of 4 days of laundry is greater than the hotel bill!

Super cool if you found a place that had free laundry services!

<comment><USER14> In Japan, every hotel or hostel has laundry, and you can do a full load for Y400 or less. There's also coin-op laundromats with similar prices. It isn't free, but it isn't expensive by any means, it's probably cheaper than using a coin locker to lock your suitcase so you don't have to lug it around all day until the hotel lets you check in.

In Europe, many smaller hotels have laundry on-site you can ask to use, or again you can use coin-op laundromats which aren't that expensive.

What countries did you visit that were "cost prohibitive" for doing laundry?

<comment><USER16> China was a no-go, the major hotel I stayed at in Suzhou was incredibly nice, had a great price on the room, and an expensive per-piece laundry service. The tiny hotel I stayed at in Beijing didn't have laundry facilities for guests.

Shinjuku Prince in Tokyo also had the usual high per-piece laundry rates. I don't 100% recall but I think the Ryokan I stayed at was similar.

I AirBnB'd through the UK, so I didn't have to worry about it. Same thing in Mexico, didn't bother with hotels.

Throughout the US it is a no-go of course.

<comment><USER14> It sounds like you're staying at expensive hotels.

I just spent 2 weeks in Japan. The locally-owned hotels had laundry on-site usually. This isn't full-service laundry; this is a coin-op machine on the ground floor that you use yourself. The one I used at a very new hotel in Osaka (Sarasa in Dotenbori) was really nice; you just put your Y400 in and come back in an hour or so, as it does both washing and drying. At hostels, it varies, but one I stayed at just charged me Y100 to wash a load, but they didn't have a dryer so I had to walk down the street and pay Y200 to dry it.

Did you even look at laundromats? If you're expecting hotel staff to do your laundry for you, then you're not going to get that cheap in almost any country, certainly not any industrialized one.

<comment><USER16> > Did you even look at laundromats?

AirBnB + Filter on Laundry is easier. :-D Don't have to take time out of the day and all that.

The Ryokan was mid-tier, nothing fancy. Went to three cities, 2nd one was AirBnB with washer+dryer available, so everything was washed there.

<comment><USER14> Ryokan are known to be expensive. Business hotels are much, much cheaper. And yes, AirBnB is a good option too. When I was searching for hotels on booking.com and travelocity.com, I was able to see which ones had laundry there too.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> I clicked through to this article because I recently bought some scissors from Amazon here in Japan. I didn't do any comparisons or anything, I just chose a cheap model from the first page of results.

I am not like a heavy scissors user, I was just sick of not being able to find the scissors, so I wanted a couple extra around the house.

And then they were delivered and I was like HOLY SHIT THESE SCISSORS ARE AMAZING!!!! And I quite literally told five or six people about these scissors, just because I was so astonished how well they cut things. I didn't know scissors went to this level.

Sure enough, the kind I bought is referenced in the article (the one with pink handles in the photo). Nakabayashi's Hikigiri model.

¥432 at Amazon Japan (about $4.00). Amazing.

[https://www.amazon.co.jp/gp/product/B00NATJ7R0/ref=ppx_yo_dt...](https://www.amazon.co.jp/gp/product/B00NATJ7R0/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1)

<comment> j-conn Tried replacing ".co.jp" with ".com" and it worked, to my surprise. Price changes to $25.56 though (with "free shipping") [https://www.amazon.com/gp/product/B00NATJ7R0/ref=ppx_yo_dt_b...](https://www.amazon.com/gp/product/B00NATJ7R0/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1)

</comment></comment><comment><USER18> Some of these are incredibly sharp!

The titanium coated one they have in one picture (gold tinted blade) is one I got via jetpens.com and via an incident with them sliding along a plastic tab; I got my first stitches ever, 3 stitches from a cut adjacent a joint of the right pointer finger. (Fall 2018 at the tender age of 30. )

My recommendation: only use normal scissors on paper, for every thing else use a scissor with the grippy micro serrations for a safer / better time.

In the kitchen the oxo brand scissors are great. For random plastic stuff like the dreaded plastic clamshell I take the nuclear route of using a compound action tin snips! Makes plastic or sheet metal cut like melted butter. And way safer ;)

<comment><USER19> Ouch! Personally I consider all the TiNi coated scissors and knives to be basically a sham, the coating doesn't make the tool sharper, just harder to sharpen when it begins to dull. Though on scissors it may make the blades a little less likely to pick up adhesive from tape (I have seen some Japanese scissors with a PTFE coating for that too).

<comment><USER18> yeah, i think they're marketed mostly as "less likely to get glues stuck". Sure look pretty though! ;)

</comment></comment></comment><comment><USER20> Side tangent - I was in a hotel channel surfing when I came across an NHK program called Japanology. They have a great episode on scissors here as mentioned several times in this thread. It's become my only regular source of tv for the past year since it's all very homey feeling. LUNCH ON is my favorite since half the show isn't even about lunch but just small businesses or municipal organizations.

</comment><comment><USER21> Whatever Japan does, it does extremely well. I bought a 0.1 mm nib size fountain pen in Japan last year. I expected it to be rough and unevenly release ink, considering how thin the nib is, but was pleasantly surprised at how good the pen was. It was a delight to use. It works smoother than my parker fountain pens, which I thought were pretty good.

<comment><USER22> Have you tried a Sony product lately? [1]

They are capable of 'world class' things, which is more than most nations can say, but like everything 'it depends'.

[1] [https://www.youtube.com/watch?v=nyCtaciiM8Y](https://www.youtube.com/watch?v=nyCtaciiM8Y)

<comment><USER14> Sony isn't really Japanese any more, it's a multinational corporation with operations in many places, including the US. This is like trying to claim that Ford cars are all-American (they aren't, they're largely made in Mexico, and they have a large European subsidiary too).

</comment></comment></comment><comment><USER23> Wow, I didn't even know I had a thing for scissors, but seems like I totally fell in love with the one that looks like a pen.

<comment><USER24> Japan has a knack for turning mundane stationery items into collectible pieces of art and creative engineering.

Some nice YouTube show-and-tells got me fascinated with that subculture (yes, a legit subculture around stationery.)

<comment><USER25> Do you have any specific YouTube videos to recommend?

<comment><USER24> Japanology's [https://youtu.be/pgPxgJMW5A8](https://youtu.be/pgPxgJMW5A8) and more in search.

<comment><USER26> They have an episode on scissors too! [https://youtu.be/Gd_ySi7mjeE](https://youtu.be/Gd_ySi7mjeE)

</comment></comment></comment></comment></comment><comment><USER27> Begin Japanology - <USER2>

[https://www.youtube.com/watch?v=Gd_ySi7mjeE](https://www.youtube.com/watch?v=Gd_ySi7mjeE)

<comment><USER28> This part of the article:

> _There is another trend in Japan 's scissors world, one in which new ideas > are being applied to cutting performance. Cutting ability is not determined > by sharp edges alone. Blade shape, the angle at which the blades come > together and how the blades move against each other also significantly > impact performance._

... immediately brought to mind proud Japanese designers doing their best to make scissors in the swordsmithing tradition of Japanese katana's and whatnot.

Nine minutes and five seconds into your linked video[0] it actually mentions a former swordsmith-turned-scissormaker from the late 19th century who applied his understanding of sword making to make better blades.

Oh Japan, how I love that reality is often better than the stereotypes about you <3

(also hate it when it's about a negative thing, but in this case it's great)

[0] [https://www.youtube.com/watch?v=Gd_ySi7mjeE&t=9m5s](https://www.youtube.com/watch?v=Gd_ySi7mjeE&t=9m5s)

</comment></comment><comment><USER29> Heh, I am a fan of Japanese stationary and I have a Pencut in my bag at all times. It's excellent. I also have a Sheffield-made pair from Ernest Wright in the kitchen. Horses for courses.

</comment><comment><USER30> I am going to drop this here at the risk of down voting: Japanese nail clippers are world class (much like their scissors).

I've had the same pair, somehow, for 11 years. And to this day using them is delightful. Weird thing to say about clipping nails, but given the frequency of that activity, it's worth noting.

So next time you're in Japan doing all of the culture, and sight seeing, and eating, spend 5m to go to a pharmacy and treat yourself.

</comment><comment><USER31> I've always been impressed by these one-piece Japanese thread scissors: [https://www.amazon.com/dp/B00WXIRPU0](https://www.amazon.com/dp/B00WXIRPU0) Very quick to grab with one hand and make a cut. No hinge; just elastic deformation of the steel.

<comment><USER32> My favorite part about thread snips like this is that I can actually use them; standard thread scissors have finger holes that are too small for many men to use.

</comment></comment><comment><USER33> There seems to be almost too many options with each having some features that I don't truly understand. What would everyone recommend for an all around usage for scissors and even for a knife? I often have problems with scissors not cutting things for whatever reason.

<comment><USER34> If you have issues with fine cuts (like fishing line or tissue paper) the scissors on a victorinox swiss army knife work very well. Get a 91mm size knife for scissors that aren't laughably tiny, but only smallish.

On the opposite side, tough items, like leather or pennies (!) can be cut with EMT shears.

<comment><USER35> Victorinox built in scissors are great. I use mine on a Classic all the time. They will send you a few replacement springs for free if you ask. It's the only problem I have ever had and that's after years and years of abuse.

</comment></comment></comment><comment><USER36> Surprisingly absent: [https://duckduckgo.com/?q=japanese+%22thread+scissors%22&t=h...](https://duckduckgo.com/?q=japanese+%22thread+scissors%22&t=h_&iax=images&ia=images)

</comment><comment><USER37> Worth mention: Craft Design Scissors [https://www.shopkanso.com/products/craft-design- technology-s...](https://www.shopkanso.com/products/craft-design-technology- scissors)

</comment><comment><USER38> Genuinely curious, why are Japanese people cutting things so often that this became a thing?

All I own is one absolute garbage pair of scissors, and I use them so rarely that it doesn't really matter. I don't think I'm an outlier, in the US.

<comment><USER39> It's not an isolated example. There is a perfectionist streak in Japanese culture, which you can observe if you study any of their traditional arts (karate, tea ceremony, etc.) This shows up in the quality of some of their consumer goods.

As another example, there was a Japanese chalk company (Hagoromo) which has unfortunately gone out of business, but which built up a fanatical following among mathematicians. I am a mathematician myself, and I found their chalk to be noticeably superior to anything which I'd previously tried.

<comment><USER40> A South Korean company bought some of Hagamoro's machines and is making chalk branded as "Hagamoro Fulltouch". I haven't used it but I've heard it's still good.

[http://en.sejongmall.co.kr/category/full- touch%ED%83%84%EC%8...](http://en.sejongmall.co.kr/category/full- touch%ED%83%84%EC%82%B0%EB%B6%84%ED%95%84/48/)

<comment><USER39> Yes! It is. Happily, the buyers have (more or less) maintained the quality of the original.

</comment></comment></comment></comment><comment><USER41> A beautiful display of the consequences of kaizen[0].

[0]: [https://en.wikipedia.org/wiki/Kaizen](https://en.wikipedia.org/wiki/Kaizen)

</comment><comment><USER42> ProTip: junky scissors can be sharpen by cutting aluminum foil.

</comment><comment><USER43> I don't want to use any of those scissors. I want slim, plain, metal-only scissors kind of like this:

[https://www.amazon.de/dp/B001U57C50/](https://www.amazon.de/dp/B001U57C50/)

I hate plastic (grips), I hate uneven grip holes, I hate protruding elements, I hate uneven blades, I hate blunt blade tips, I hate safety features.

<comment><USER44> then buy those [https://www.amazon.de/dp/B001U57C50/](https://www.amazon.de/dp/B001U57C50/)

who cares about things you don't like?

<comment><USER24> Don't you see? The things I do not like should not ever be made, or be talked about, unless it's for me to pronounce my dislike and lack of need for them.

<comment><USER45> > he things I do not like should not ever be made [...]

Wait, when did they say that? They only expressed their opinion on the kind of scissors they prefer to use and that they would never use them.

I mean, yeah, it was not a great comment, but the reactions here (not only you, another commenter did the same) seem pretty off the charts for what it was.</comment></comment></comment></comment>


U.S. sweeping up Russian hackers in a broad global dragnet - <AUTHOR> http://www.mcclatchydc.com/news/nation-world/national/national-security/article141997444.html <comment><USER2> I see two major possibility.

a] Russians hackers are the biggest problem on the internet causing billions of dollars in loss and are possibly being guided by the Russian state.

b] A narrative is being passed to justify all the negative publicity certain agencies have been getting. (We keep internet safe)

Of course, the story might be something else and the author of the article wanted to make it seem that way. But I think the choke hold on the internet has been getting tighter.

Maybe the power struggle that always existed is now shifting to the virtual world and I'm witnessing that.

Edit: Is HN fimiliar with phrack zine? Noticed today that it went bye bye as well. [0] phrack.org

<comment><USER3> What amazes me is the focus on _Russian_ hackers when the much bigger threat is Chinese ones. They have a larger budget, a bigger incentive to steal American IP, and sense a huge threat from Trump that would justify spying to get a leg up in negotiations.

So why the focus on Russia?

<comment><USER4> It was recently put to me like this (I'm not sure I agree with the analysis completely, but I think there's some truth to it, at least in the perceptions of the two countries):

While the Chinese are certainly sometimes nefarious in their online activities, their goal, as you mentioned, seems to usually be gaining IP. The perception is that Russian hacking is usually more (a) directed at stealing directly from the populace (credit card phishing, etc), or (b) directed towards political ends (see recent American politics for examples). These effects are both more visible to the general public and politically damaging. Thus they receive more focus on the political stage.

To me, (b) seems like the real differentiating factor.

<comment><USER5> The Cold War didn't end after the fall of the wall, IMHO.

We've been fighting a repeat of the 80's proxy war in Afghanistan for nearly 15 years. Roles reversed, though. Russia arms the Taliban, just like we did in the 80's with the Mujahadeen.

Syria, another blatant proxy war, is probably a better example. We're arming rebels and providing support to fight Russian (and therefore communist) interests. Sounds just like the Cold War to me.

With the recent Russian propoganda campaign (see: "fake news") going over so well that they took to celebrations in the streets, expect a lot more funny business in elections in the West.

France's election seems to be the next plaything for Russia to influence, it's setting a precedent that will restore Russia to superpower status if allowed to continue unchecked.

The power of the internet works both ways. Information, and therefore misinformation, is spread more quickly than ever. Propoganda has never been easier to dress up and present as fact. Nor have people been so willing to eat it by the spoonful, as long as it validates their own opinions and/or biases.

<comment><USER6> > The Cold War didn't end after the fall of the wall, IMHO.

It didn't with the fall of the Beeline wall, but did with the fall of the USSR. Unfortunately, by the late 1990s (particularly, this was noted during the Serbia/Kosovo conflict and subsequent peacekeeping operation) a _new_ Cold War had clearly started between NATO and Russia.

</comment></comment></comment></comment></comment><comment><USER7> I looked at one of the guilty pleas linked in the article ([https://media.scmagazine.com/documents/290/vartanyan_guilty_...](https://media.scmagazine.com/documents/290/vartanyan_guilty_plea_72377.pdf)), hoping that it might contain more details concerning how he was caught.

Unfortunately, that information is not included. However, the plea has a section about "removal from the united states" (on page 4). I found this highly amusing, considering they went to great lengths to get him to the US in the first place.

</comment><comment><USER8> What about a discussion of _how_ they were caught?

<comment><USER9> Or why they're just now being 'swept up' as opposed to prior.</comment></comment>


Show HN: Try running deep learning inference on Raspberry Pi - <AUTHOR> https://actcast.io <comment><USER3> We don't need more proprietary machine learning devices in our homes. I'd appreciate this so much more, if it was open source, so I can reshape it to whatever use case I have.

There are plenty of viable business models, that give you your well earned money and us the option to customize and understand our devices.

<comment><USER4> > We don't need more proprietary machine learning devices in our homes. I'd > appreciate this so much more, if it was open source

It doesn't seem to do anything special? You can probably run your favorite machine learning framework on the Raspberry Pi, and it will work - <USER2> using the ARM cores and NEON only. Now, machine learning and inference _using the Raspberry Pi's GPU part_ (which is broadly documented, unlike most GPU hardware) would be a gamechanger, if only for educational scenarios.

<comment><USER5> There is PlaidML[1] - a cross-platform deep learning framework that works, among others, on Raspberry Pi's GPU.

[1] - [https://github.com/plaidml/plaidml](https://github.com/plaidml/plaidml)

Edit: they don't support RPI GPU yet - [https://github.com/plaidml/plaidml/issues/141](https://github.com/plaidml/plaidml/issues/141)

</comment></comment></comment><comment><USER6> You can run TensorFlow Lite on a Pi with no problems at all. You can even train and run basic gesture recognition with full TensorFlow on a Pi.

Source: wrote a tutorial doing this for Arm ([https://github.com/ARM- software/ML-examples/blob/master/mult...](https://github.com/ARM-software/ML- examples/blob/master/multi-gesture-recognition/README.md))

<comment><USER7> There are gesture recognition sensors available that don't even need a general purpose CPU, eg. Broadcom APDS-9960. [https://cdn.sparkfun.com/datasheets/Sensors/Proximity/apds99...](https://cdn.sparkfun.com/datasheets/Sensors/Proximity/apds9960.pdf)

</comment></comment><comment><USER8> Security major issue for edge computing. Also I guess as it is isolated you assume it will be hacked and then handle the risk as well.

Non-open source? would it make it harder to deal with security and deal with as we do not know it is hacked or not.

</comment><comment><AUTHOR> Blog article about this release: [https://blog.idein.jp/post/181016515935/alphareleaseen](https://blog.idein.jp/post/181016515935/alphareleaseen)

<comment><USER9> Why would I use this rather than Snips? Edge computing is great, but in a closed source, hard to audit form it will be a tough sell to get 3rd party developers onboard.

</comment></comment><comment><USER10> Since this is about computing at the edge, I was wondering if anyone had an opinion on the intel neural compute stick 2?

I got one recently and I am not convinced, but I suppose someone on HN might have legitimate use cases.

<comment><USER11> I think the NCS2 has potential.. it's still early though. One thing on their roadmap is to support ARM, which I view as a must-have for low powered edge applications. Right now it only works with OpenVINO and certain x86 systems. So I view the real use cases coming when it can be used in settings with limited power (and limited or variable network connectivity).</comment></comment>


Show HN: My first Genetic Algorithm program - <AUTHOR>

Wrote a program in FreeBASIC to try and find out how Genetic Algorithms work. It's a quick hack that I wrote to try some theories with because the Wikipedia Article on GAs reads like greek to me. So  I built it from the general principles i knew at the time.
The "genome" per individual is an array of 9000 integers but I used only monochrome pictures with either black or white; An individual also has a fitness score.
There are 1000 individuals in the population and only two are selected to reproduce. So that makes 9 million (yes, MEELION as El Reg would write) data points and the scoring information being processed every time.
There's a 0.002% mutation rate just to keep things going because things tend to stall with monochrome data. A higher mutation rate and the algorithm will never approach maximum potential fitness, apparently.
The code is wildly unoptimized and it's my first draft. I could have used memory pointers to manipulate image data faster but this gets the job done so far. Processing color  data takes a lot more time and this program wasn't written for that.
Runs on Windows. The source code needs to be cleaned up, so I didn't include or upload it. As far as i know, this may be sadly the only Genetic Algorithm program so far from the island of Mauritius.  Download it here: https://sites.google.com/site/bryanbottebell/bryan-bottebell-s-projects/Imolver.zip <comment><USER2> Let me remind everyone that downloading and running unknown executables is borderline insane.

@OP Where is the source?, if you want to share, distribute the source not the exe.

<comment><AUTHOR> Dude, if you saw the source, you'd faint.

About it being unknown, may I remind you that much of Apple OS X or Microsoft Office are just as "unknown"? Have you read the source of LibreOffice recently?

EDIT: I've included the source in the .zip now. Maybe i should have put an EULA like the "trusted" companies but anyway, you wanted it, you got it. In BASIC.

<comment><USER3> Apple and Microsoft have much to lose if they are found distributing malware. You on the other hand have just written your first GA program and have admitted that the source is ugly. What is the last time you were OK about running an executable from a shady site?

<comment><USER4> Let's not beat up on the OP too much for not releasing source. It's a very complex program and in an initial state is surely messy code (we've all been there).

Good work OP.

<comment><USER3> Just in case it came out the wrong way, kudos to the OP for getting the job done. I just found his argument that the source-code isn't needed because Microsoft doesn't release its sources way off mark.

</comment></comment></comment></comment></comment><comment><USER5> One way you can use a higher mutation rate is to only mutate children, but keep the parents without mutation (as the first two children of the next generation). That way you can always remember the 'best of previous generations.

Or, you can vary the _mutation_ rate with a normal curve -- so say most of the population gets a small rate, but a small percentage gets a wildly higher rate and wildy lower rate.

<comment><AUTHOR> >remember the 'best of previous generations

In nature, immortality doesn't seem to lead to much evolution. remember that immortal jellyfish some japanese scientist discovered a while ago that went back to its polyp phase once it got mature? Besides, sometimes species devolve too in nature. I just accept mortality and obsolescence as they are.

<comment><USER5> hehe. That's fine. It all depends on the nature of the experiment. Typically you want to optimize a solution in a given deterministic domain. If you wish to, instead, create an open-ended evolutionary system for novelty in a non- deterministic solution space, go for it!

Although, to be fair, in nature you're also not dealing with a static fitness function, a high mutation rate, and there's a wide myriad of other variables that affect the overall dynamics of a population (like sexual vs asexual reproduction, migration, recessive genes, sexual selection, etc)

<comment><AUTHOR> You're absolutely right. I've been wondering what results i would get if I seeded all of the population with the reference image data, slightly mutated but let the GA look for variations with a 10 or 20% variation tolerance.

</comment></comment></comment></comment><comment><USER6> Thanks! I wanted to start learning GAs and this looks like a great intro.</comment>


I don't know if whoever flagged the typos in my eBook thought they were helping - <AUTHOR> https://twitter.com/ursulav/status/1209518819397505024 <comment><USER2> So what am I supposed to do when I buy an ebook and it's full of typos or OCR errors? Just suck it up? "Oh well, next time I just shouldn't buy from MAJOR PUBLISHER?"

It's sad it can be used to grief, but as a user it's the only method I have of pointing out the issues and asking for them to be addressed.

<comment><USER3> If someone genuinely spent the time to help catch errors in my manuscripts, I'd be thrilled. Editors are expensive!

That the automated system as described can be abused is a real problem, and that needs to be addressed. But that is a separate issue from the generally bad state of what passes for final edits in many books nowadays. That the author in question can't be bothered to keep a current copy of their manuscript leaves me lukewarm on the issue.

<comment><USER4> She could be traveling for the holidays and away from her usual setup. Someone in the replies mentions having this happen to them while in rural Newfoundland for a funeral, equipped with only a cellphone and a spotty connection.

Either way, I bet many programmers would run into trouble if asked to drop everything and immediately spin back up a production-ready environment for a project they haven't touched in a year.

<comment><USER3> A full book manuscript is tiny, and requires zero spinup whatsoever, unless you count opening a PDF or DOCX file as such. I have a copy of everything I've written over the past thirty years available immediately, and it would fit on a $4 thumb drive. If my career depended on it, I would be quite certain to have it with me at all times.

<comment><USER5> > A full book manuscript is tiny, and requires zero spinup whatsoever, unless > you count opening a PDF or DOCX file as such.

That is not uncommon, but neither is it the quantitative norm. A lot of authors are particular about the typesetting of their documents, and it does require a rendering environment.

It isn't unusual for a half-LaTeX half-something-else monstrosity to be rendered in a semi-custom environment. Especially if you're dealing with anything academic.

In those kinds of environments you may have a ton of assets, like graphs, that may either be large file-sizes, and/or re-generated during the rendering process from various large datasets. Those assets are not small, and may prevent you holding much more than a couple books on your $4 thumb drive.

<comment><USER3> If you have to use an academic, LaTeX monstrosity as an example to even somewhat limit the number of books you can store for a few dollars, surely we can just agree that the cost of storage is inconsequential compared to what an author will produce over their career output?

<comment><USER5> Perhaps. But months and years down the line, recreating an environment to regenerate the book can take considerable effort.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> Man it's a shame that this system is having undesired consequences for the author, but the whole thread just reeks of pretentious entitlement.

Readers are giving feedback through an app that makes it easy for them to do so. Maybe the feedback is unhelpful, but I don't see anything here indicating that the readers are acting in bad faith.

These authors should start from a position of gratefulness that their work is being published and read. From there it would be much easier to interpret this in a constructive way.

<comment><USER7> I came away with the opposite interpretation. The author never blames the readers for doing this. The author even fully understands that the system is designed to help readers to be "helpful" in this regard, but the system is clearly misguided. And in this case it's not even a typo, the "bug submitter" has incorrectly identified a bug which has saddled the author with a potential loss in sales because of the "low quality" rating it can immediately imbue.

Here we have a system designed to facilitate near real-time feedback trying to push fixes upstream into a system built on hard-copy which is very non-trivial to merge patches into. Ultimately it punishes the author out-of-band of the publisher which is also broken. Sure, you can flail your finger at the stupid publishers for still printing in hard copy, but that doesn't solve the problem.

<comment><USER6> > I will, sadly and angstfully, cop to typos. I make them. I've made peace. > But now I'm supposed to fix failures of this person's reading comprehension > and understanding of vernacular

Sure it's not the best system, but the tone is condescending and unconstructive. I get that it's cool on Twitter to hyperbolize and vent, but in any other forum this would be cringe-worthy pretension.

<comment><USER8> Flagging "moreso" as a typo is cringe-worthy pretension in the most literal sense - it is someone pretending to be a helpful editor and in the process causing the author to cringe as they are required to perform useless labor.

<comment><USER9> You dont get low quality flag for one typo. Author chose to only share "moreso" in a bid to garner sympathy. Others joining in complain about being forced, oh shock and horror, to fix ordinary typos (like missing letters) in their flawless creations.

</comment></comment></comment></comment></comment><comment><USER10> A friend who works in academia published a book with a major university press. The press had someone (in another country) do copy edits, and it came back with all of the historical language "corrected" to modern English. It's as if they ran it through a standard spell checker and just picked the closest replacement for every single word that came up. Since there was no redline provided, it took my friend hours to go back and fix all of their errors (there were other formatting changes that had to stay, otherwise they could have just reverted to the prior version).

<comment><USER11> > Since there was no redline provided, it took my friend hours to go back and > fix all of their errors (there were other formatting changes that had to > stay, otherwise they could have just reverted to the prior version).

Was your friend able to use a program to diff (show all changes between) the two versions, and resolve them? Or was it done by hand?

<comment><USER10> All done by hand. This was the last round of edits before printing, so couldn't risk missing any of the botched edits.

</comment></comment></comment><comment><USER12> I was not even aware that this flag existed. I've seen a couple of truly bum books on Amazon[1][2], and I suppose that this is meant to catch them, but there ought to be some sort of middle ground where publishers can agree with amazon not to publish shovel-lit, and amazon will agree to give them the benefit of the doubt.

[1][2] I was going to link to two such books, but they're 404 dogs now, so I suppose the system does work in some cases - I left reviews to the effect of "don't buy this, these books are fake/ultra low quality" and they have since been removed.

<comment><USER2> Last I checked it was only available on the Kindle and not (for example) the phone app.

<comment><USER13> I'm a huge kindle reader (hours a day) and never noticed. I generally just highlight and make a note saying "typo" if it's an entertaining or jarring one, as some of the authors I read ask for mistakes to be emailed in so they can correct it (and some even give you free copies of their books if you do so).

</comment></comment></comment><comment><USER14> Ursula Vernon is the author of Digger [0], a graphic novel which won a Hugo in 2012. If anyone feels moved by this to support an independent artist, I can vouch for it as a great read.

[0] [http://diggercomic.com/](http://diggercomic.com/)

</comment><comment><USER15> The downside to self-publishing is that since one lacks a trusted editor, one is at the mercy of systems intended to control for the lack of a trusted editor.

</comment><comment><USER16> Amazon is insanely effective at cutting costs and passing those savings on to you, the user. But sometimes that means they'll crowdsource typo-finding and you'll miss out on a good book because someone without a high enough reading comprehension level flagged it as "has quality issues".

People are willing to lower their expectations infinitely as long as it means lower prices. So the solution is: consumers need to reevaluate what they're willing to accept/spend, the rest will follow.

<comment><USER17> The books I read are well-edited, but that doesn't mean that a glaring thing or two doesn't slip through.

I've flagged things where errors in pronoun agreement has made things confusing, hoping that I'm making things better for the next reader. This should be an improvement on what we've lived with before. But it's not my intention to create a high priority work item for anyone...

<comment><USER18> Some things I've flagged recently:

\- A word that was in boldface, except for the last letter.

\- "downlike", which should have been "down like".

\- A gloss of Han Wudi as the "marshal emperor" (should be "martial emperor").

\- "teapoy", which I thought was a typo for "teapot". It wasn't! I learned this a few pages later, when the text mentioned gathering several things into the teapoy. But you can't unreport a typo.

Still, typo reporting is obviously a good idea, not a bad idea. The lesson is to develop workflows that accommodate it, not to stop flagging mistakes.

<comment><USER19> > which I thought was a typo for "teapot". It wasn't!

...but isn't this the problem? People report things that they think are problems without taking the few moments to check the words. Teapoy is in all of my dictionaries.

<comment><USER20> >...but isn't this the problem?

so what's the proposed solution? 100% accurate user submissions, lest we get rid of the entire system?

these kind of systems are supposed to work through different tiers of people. The user reported submission is to be considered the least trustworthy, useful only for attracting the attention of someone who can make a responsible decision or correction.

the problem is that Amazon acts without the middle-man supervising whether or not the user has made a valid discovery -- they rely on non-expert users, some of which may have a vendetta.

<comment><USER19> If Amazon runs a service they should know that users are going to flood them with inaccurate reports, and so they shouldn't attach much if any weight to those reports.

<comment><USER17> Yah, that's pretty much what he said-- that there's value in the reports, but that they will be of varied quality. You're talking past him.

</comment></comment></comment></comment></comment></comment></comment><comment><USER21> Charles Stross clarifies the situation: [https://twitter.com/cstross/status/1209553772424253440](https://twitter.com/cstross/status/1209553772424253440)

> What you're doing if you flag a book as containing typos is, you tell a > computer to yank the book off sale immediately. Nobody else can buy it until > the author jumps through flaming hoops. Best of all? You might be misreading > vernacular or British English or just plain wrong.

To the folks concerned about how to give feedback -- pressure Amazon to allow a better way. The current situation is much more analogous to e.g. reviews for rideshare drivers. Giving less than a 5 is potentially depriving someone of their livelihood. Unless that is specifically what you want to do, don't.

</comment><comment><USER22> Which book was it? This one? Or is it still hidden? [https://www.amazon.com/gp/product/1534429565](https://www.amazon.com/gp/product/1534429565)

<comment><USER23> Since she mentions it is on sale, the answer is most likely Swordheart: [https://www.amazon.com/Swordheart-T-Kingfisher- ebook/dp/B07K...](https://www.amazon.com/Swordheart-T-Kingfisher- ebook/dp/B07KGDDW7J)

</comment></comment><comment><USER24> Any system that can be gamed will be gamed.

</comment><comment><USER25> This should be solved like the "bad backlinks" problem in SEO - a disavow mechanism. The author should be able to simply reject edits/flags as he sees fit.

</comment><comment><USER26> People who criticize such things are sometimes the stupidest form of smart people. English should be fluid.

<comment><USER27> The is fluidity that add nuance and simplicity and there is fluidity that destroys meaning and versatility while adding complexity.

The fact that "literally" now figuratively has the same meaning as "figuratively" only adds confusion and limits the expressiveness of the language.

<comment><USER26> I think when people say "literally" to emphasize a point, that isn't fluid.. it disrupts the flow of the conversation because in my head I call them an idiot. People who claim spell checks because they can't understand turns of phrases are the problem.

</comment></comment></comment><comment><USER28> What's the synopsis? For those of us with all social networking blocked. Thanks.

<comment><AUTHOR> Apparently, a user flagged the word "moreso" as being a typo. According to the author, not only is this report erroneous (because "moreso" is actually a colloquial word), but it automatically resulted in the author's book being flagged on its sale page as having quality issues.

<comment><USER18> I suspect that a report of one typo isn't enough to cause that. (And the tweet does say "whoever flagged the typos", not "whoever flagged one spurious typo".)

"Moreso" is just the author reaching for the most sympathetic example they can find.</comment></comment></comment>


Whatever happened to programming? (Old post - has anything changed?) - <AUTHOR> http://reprog.wordpress.com/2010/03/03/whatever-happened-to-programming <comment><USER2> IMO, this article is much ado about nothing. There are _plenty_ of companies that offer programmers interesting challenges. I dare say that most of us posting here work in such a company, or have before.

For those programmers who are supposedly stuck in a hellish 9-5 mix of Javadocs and enterprise-grade XML and ETL and SOAP, consider, for a moment:

1\. Are they really "stuck"? The market for programmers is _massive_ ; why should anyone be stuck in a job that they hate?

Of course there may be risks -- big enterprises have steady pay, benefits, and much more certainty than the startup, but if you pick those advantages over taking a risk... well, you can't exactly claim to be stuck, now can you? :)

2\. Are those jobs really "hellish"? Personally, I'd dislike them. But an unhappy programmer is an unproductive programmer, and companies can't survive being staffed by unproductive programmers. Is it that hard to believe that programmers exist that _enjoy_ just chaining technologies together?

In the end, there are far too many options out there for this "woe is our industry" type of post to really mean anything. But I'd propose, as a simple solution for people who hate their day jobs: go home and do something you find interesting. Maybe you can build a company around it. Maybe it gets you noticed by a cool company. But at least you're having fun.

</comment><comment><USER3> Well the complaint is somewhat moot. The programming he is discussing is professional, where it is results and business driven. If every time a company wanted to develop a product that uses a database, MVC framework, web server, etc, the programmers had to write some of those components from scratch, it would be a nightmare. It would take much longer than necessary and probably be riddled with security holes. This is not a sound practice for business.

If people are looking for the creativity in developing some of these things, they can do it in their free time. That is the beauty of programming, all you need to do it is a computer, keyboard, and monitor. There is nothing stopping someone from going home and writing a database over a weekend.

</comment><comment><USER4> Whatever happened to home construction? In the old days I chopped down my own trees to form into straight boards for the frame, dig up my own rock to make a foundation, mine my own iron to be formed into nails, etc... Now I just buy all the pieces I need from the hardware store and piece them together to build a house.

<comment><USER5> Funny comment :)

But serious: there is nobody stopping you from cutting down a tree to build a house. I think this also applies to programming. At home I am putting hours in programing my own stuff, stuff that is done before and available in libraries. I want to re-invent the wheel just to know how it is done.

At work it's all about cost. You don't have time to re-invent the wheel.

</comment></comment><comment><USER6> Nobody owes you an interesting job. If you want one, it is your responsibility to find it.

Warning: this may involve tradeoffs like hard work, failure, uncertainty and penury.

</comment><comment><USER7> I keep hearing this argument, and I always feel sorry for these people. I see all this new stuff being developed, some of it by me, and I think, "Man, why can't they just go do that?"

It's almost like they're broken. They've decided they need to work for the man, and that they can't do exciting things on their own time. They can see the path they want to take, yet they keep walking the same path they hate.

<comment><USER8> The follow-up article at [http://reprog.wordpress.com/2010/03/04/whatever- happened-to-...](http://reprog.wordpress.com/2010/03/04/whatever-happened-to- programming-redux-it-may-not-be-as-bad-as-all-that/) addresses this comment, essentially saying " _my_ job doesn't suck, but what about everyone else?"

<comment><USER7> So he writes an article that makes it sound like he has this problem, but he's really just holding a pity-party for other people that he's imagining, and -I'm- the one that gets modded down?

</comment></comment></comment><comment><AUTHOR> This was posted 500 (or more) days ago, and the discussion there is interesting. This is a genuine question as to whether people think the situation is better, worse, or nothing to worry about - everything's fine?

<http://news.ycombinator.com/item?id=1165623>

</comment><comment><USER9> I love it when a post on HN shows up a day after a mid-morning brunch based rant about the subject at hand. It was my observation during the discussion that if you take away all of the shiny toys that attend what passes for web development these days, your average programmer would be left pretty much high and dry and unable to continue at that point. Having vented at that point I backed down and admitted that this was a VERY old argument that always takes place as things change. Further that I really couldn't see any good reason why things should be done the hard way. I even used to make jokes in my code where main or the equivalent had a single function called 'just-do-it'. The fact that I started out with IBM 360 BAL is totally irrelevant to today's programmer and should be. I do worry about cases of 'what happens when': even the best calculator is worthless if you don't know how to lay out the problem. But that is a a minor problem/objection. I also find it interesting that my 'antique' knowledge has provided employment for precisely those situations he mentions in the article: I can easily 'glue' together the output from one black box to another. No one needs to worry about the boxes in question; which is good since often they are inherited and are either a mystery or are quite fragile or both. My code in the middle is typically quite short and very easily modified to meet changing needs as necessary. So as much as I might rant and rail about 'In my day', I'm actually better off today than I was then. I also note that much of the toys I mock are in fact written by programmers with the same bent as I have---much rather write a utility than an application :)

</comment><comment><USER10> When I used to play with code I could build anything I wanted and it was fun. Now I have a job I have to build what the people who pay me need or want, fortunately that can be fun too but often it isn't. That's why I call it work, not play. I enjoy the satisfaction of making stuff happen via code and I don't care whether I wrote the clever bit or not I care about whether my client is happy.

If all you want to do is be a creative then that's easy, accept that you can make anything you want but no-one will necessarily pay you for it. I think at that point you're an artist and you get all the benefits and drawbacks that the title entails. The main benefit being total freedom and the main drawback being probable poverty.

</comment><comment><USER11> I think it's relative. If you're like me, and you grew up glueing libraries together, then that is fun. It's relative. Sure, I know how to write assembly and C, but I don't want to.

</comment><comment><USER12> it's only about a year and a bit old - things don't change that quickly. Come back and ask again in 2020 - with some luck, auto-completion in eclipse will have reached some semi-strong AI point that can glue libraries together for you.</comment>


The.Monad.Reader Issue 16: Automata, Iteratees and Priority Queues - <AUTHOR> http://themonadreader.wordpress.com/2010/05/12/issue-16/

<comment><USER2> If HN members have any questions or comments about the Automata article, I'd like to hear them.

<comment><USER3> I enjoyed it. I would've liked to see pointers/comparisons to such libraries for other languages -- that is, ones that export usable regex/finite automaton abstractions, not just the usual Perl stuff.</comment></comment>


Functional Programming in C# 3.0: How Map/Reduce/Filter can Rock your World - <AUTHOR> http://www.25hoursaday.com/weblog/2008/06/16/FunctionalProgrammingInC30HowMapReduceFilterCanRockYourWorld.aspx <comment><USER2> I think the author is a little confused on terminology. The list management he's talking about, while a core part of the LISP metaphor, isn't normally considered part of "functional programming", which exploits more subtle stuff like lexical closures instead of "code-only" function/method references (a lambda is much more than just a function pointer!).

Now, I'm not up on my .NET these days, but I'm all but certain a C# function is still a classic CPU call, with its data living on a normal CPU stack and not stashed into the heap somewhere where it can be found by a closure. Am I wrong?

<comment><USER3> C# anonymous functions are true lexical closures, if that is what you are asking.

<comment><USER2> Hunh. Yuck. So how does that work at the instruction level? It seems like the generated code needs to take one of two wildly divergent paths depending on whether or not a scope includes a lambda or not. Either that, or you need to malloc the stack frame of every function that gets called, which is equally a mess.

<comment><USER4> <http://people.debian.org/~aaronl/Usenix88-lexic.pdf> ddescribes non-escaping lexical closures for C++. With a bit of work (automated clone-env-on-escape, for example) you can have efficient closures that don't totally suck.</comment></comment></comment></comment>


China's Cram School from Hell - <AUTHOR> http://www.foreignpolicy.com/articles/2013/10/11/china_cram_school_from_hell_gaokao

<comment><USER2> I figured this is not very different from the Indian education system. And I think the type of government can influence how this is executed, as students have other fields to look forward to in India (not sure how it is in China).</comment>


A collection of not so obvious Python stuff - <AUTHOR> http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/not_so_obvious_python_stuff.ipynb <comment><USER2> I'm being a bit pedantic, but the last snippet under _About lambda and closures-in-a-loop pitfall_ is arguably misleading when it says, "This, however, does not apply to generators…" Which is true in the example given, but not true _in general_. Generators don't actually provide a new environment on each evaluation, they just lazily construct their contents, which assuages the problem in certain situations. This snippet

        for l in (lambda: n for n in range(3)):
            print(l()) # prints 0, 1, 2

will alternately request an argument from the generator, return a lambda, call it, and _only then_ request the next argument from the generator, which means at the time of the funtion call, _n_ will not have been incremented up to its final value. We can see the previous closures-in-a-loop behavior return if we keep the closures around to execute again, at which point the loop environment contains the final value of _n_ :

        funcs = []
        for x in (lambda: n for n in range(3)):
            funcs.append(x)
            print(x()) # prints 0, 1, 2
        for y in funcs:
            print(y()) # prints 2, 2, 2

So generators don't 'fix' the problem by constructing distinct environments for each loop iteration, but by deferring evaluation of their body until necessary.

<comment><USER3> Yeah, that part stood out to me as well. The only way I've found to get different values for each of the functions is to use a different closure for each functions.

        funcs = [(lambda i: (lambda :i))(n) for n in range(3)]
        for f in funcs:
            print(f())

</comment></comment><comment><USER4> What I love about Python is that these hangups are mostly relatively obscure, due to the puritanical adherence to principle of least surprise by Guido and the other language maintainers. No language is completely without quirks though, especially one as old as Python.

</comment><comment><USER5> This bit bothered me slightly:

>But what if we put a mutable object into the immutable tuple? Well, modification works, but we also get a TypeError at the same time.

        tup = ([],)
        tup[0] += [1]

Of course that's an error. It's equivalent to:

        temp = tup[0]
        temp += [1]
        tup[0] = temp

But the given explanation is way too obtuse. This shouldn't be a mystery at all:

> If we try to extend the list via += "then the statement executes > STORE_SUBSCR, which calls the C function PyObject_SetItem, which checks if > the object supports item assignment. In our case the object is a tuple, so > PyObject_SetItem throws the TypeError. Mystery solved."

<comment><USER6> It's not ENTIRELY obvious. For example, tup[0].extend([1]) would work fine, and the behaviour of __iadd__() seems like it should be the same as extend(). In fact, the reference[1] has the following thing to say:

> For instance, to execute the statement x += y, where x is an instance of a > class that has an __iadd__() method, x.__iadd__(y) is called.

However, this is patently not true, apparently:

        tup = ([],)
        tup[0].__iadd__([1])  # Works
        print tup

        tup = ([],)
        tup[0] += [1]  # TypeError
        print tup

[1] [https://docs.python.org/2/reference/datamodel.html#emulating...](https://docs.python.org/2/reference/datamodel.html#emulating- numeric-types)

</comment></comment><comment><USER7> The "consuming generator" problem is a good point, but their workaround misses a better solution. In Python 3, range() returns a range object, which has a __contains__ method, so you can use "in" just fine without consuming any generators. It's also much faster (it would be constant time/memory except for the fact that integers can have arbitrary size).

        l = range(5)
        print('2 in l,', 2 in l)
        print('3 in l,', 3 in l)
        print('1 in l,', 1 in l)

prints...

        2 in l, True
        3 in l, True
        1 in l, True

Also, the lambda/closure example is something that really irritates me about Python. Both dynamic and lexical scoping have this problem: they always reevaluate the variable inside the closure whenever it's called, the only difference is which parent scope the value is pulled from (the parent scope or the calling scope). It's not that the "last lambda is being reused", as the article says, but rather, there are five different lambdas, but they each refer to the same variable, which is set to 4 after the list comprehension. This sucks for metaprogramming, where you'd like to create a bunch of copies of a function with different parameterizations. There's two workarounds that I know of for this for dynamic scoping: creating another nested scope, or using keyword arguments. I'm not sure what you'd do for lexical scoping (but who uses that anyways?).

        for x in [(lambda i: lambda: i)(i) for i in range(5)]:
            print(x())

...or...

        for x in [lambda i=i: i for i in range(5)]:
            print(x())

In my purely-functional Python-like programming language, Mutagen, closures are _static_ , so that they capture the value of variables from the enclosing scope at the point that they're defined. So this works as you'd expect, printing 0 and 1 (no list comprehensions yet, and lambdas are full functions, and of course lists are immutable so no +=):

        lambdas = []
        for x in [0, 1]:
            lambdas = lambdas + [lambda: return x;]
        for l in lambdas:
            print(l())

<comment><USER8> The first workaround is actually the same as what you do for a map in 2.x (that always works):

        for x in map(lambda i: lambda: i, range(5)):
            print(x())

</comment></comment><comment><USER9> Even after reading this list, I'm comfortable forgetting everything (with maybe one exception) because these surprises really only come up when you use horrible coding practices. But it's nice to know it really takes some serious effort to find these kinds of things in Python.

</comment><comment><USER10> Midnight is not False in Python 3.5 anymore:

[https://docs.python.org/3.5/whatsnew/3.5.html](https://docs.python.org/3.5/whatsnew/3.5.html)

</comment><comment><USER11> I somehow didn't know about nonlocal. With that, isn't python 100% comparable with JavaScript?

<comment><USER12> Python didn't even have a nonlocal statement until 2.7. Making closures was (and still is, since I have to work with 2.6) a total nightmare.

<comment><USER13> nonlocal is only in python 3.

<comment><USER12> Oh, that's even worse.</comment></comment></comment></comment>


"Enders Shadow and Offense-Defense Theory" - <AUTHOR> http://blogtarkin.com/2013/11/01/enders-shadow-and-offense-defense-theory/

<comment><USER2> I was disappointed to see Bean get such a short stick in the new Ender's Game movie.

But I understand sacrifices must occur during the book -> movie translation, and the movie was good on the whole.</comment>


Become an exceptional programmer by learning to ship - <AUTHOR> http://renderedtext.com/blog/2014/01/30/become-an-exceptional-programmer-by-learning-to-ship/ <comment><USER2> Ah, the old "we only hire people with experience" topic. Same question as usual: Where should they get that experience?

Answers I usually get:

\- "on their own": You want to tell me that someone should learn on their own how to go through all phases of shipping a software _without guidance_? And you think that will produce programmers who know how to do that 'correctly'? I'd like to advise you that playing the lottery has comparable chances and that you should try it.

\- "at our competitors": That will only 'work' if your competitors don't have the same same idea.

New answers are very welcome, the topic seems quite stale to me.

<comment><USER3> As someone who has worked on teams willing to train less-experienced developers, I find that previous expertise in any other subject is a good indicator of future success in web programming.

I've seen good Ruby and JavaScript developers learn their way up from expert- level html/css buildout people, from professionally-trained musicians and chefs, or in my case from a MA in Chinese literature.

Yes, programmers need to be able to model program execution in their head, and only some subset of humans can do that. But after that hurdle, the biggest factor in success is sustained practice, humility about your skills, and a willingness to listen to advice without following it dogmatically. These skills can be developed and demonstrated in lots of non-programming backgrounds.

In an interview, you want to establish that the candidate knows what they're talking about, can do basic boolean logic, functional decomposition, etc. But after that, you just talk to them about their internships, class projects, and hobbies. Find something they are clearly proud of, and ask them about it. Probe the strategic decisions and tradeoffs they made to see that they have some awareness of their process. If you find someone who can't talk about something they're really mastered, in any field, programming is not magically going to become the first skill they practice to mastery.

Ultimately, being able to identify people like this is an enormous strategic advantage. There is no boost to a team like a new junior teammate who asks questions, takes advice, works hard, and show enjoyment at tackling new hurdles. And nothing better for a businessperson than someone you can pay less now and continuously give big raises over the next few years while still getting a better deal than hiring a senior person.

</comment></comment><comment><USER4> Meh.

1\. Exceptional programmers write neat, maintainable code. Anyone can ship something that works right now but has maintenance costs up the wazoo later.

2\. If you recruit based on open source contributions you'll miss out on the many, many fantastic devs who have no involvement in FOSS in their day jobs and like to switch off at night. (I love FOSS but I also love sleep)

3\. All of what is written about in this blog entry is better termed experience. What you want is experience of working well in the industry. The blog entry is about as useful as saying "if you want a good employee then choose someone that's already shown they can do what you're asking". This is not new information.

<comment><USER5> ++ for #1.

There are dozens of projects I've supported that were built by guys who banged it out in a couple of weeks, or a month or so of development, and it's almost always built for a single purpose. The moment the business starts thinking about other ways to use it, it becomes a mess.

Unfortunately, there are a ton of businesses who think they can get ramped up with a tiny, banged out product to sell and then 'scale up'...when in reality, they have a throwaway toy on their hands.

<comment><USER6> On the plus side, there are those of us who are brought in for their experience at untangling these messes and coming up with solid solutions that can scale up feature-wise. The same people will willingly dig out problems and fix them in production when all else fails.

People queue at your door if you have these skills.

Mediocre programmers create a lucrative market for unicorn shit as I was once told.

</comment></comment></comment><comment><USER7> That maybe looks like a sensible approach, but it really seems like another arbitrary approach to put the bar "higher".

People have had such "requirements" since ages. "We only hire candidates with university degrees", "we only hire PhD's",.

Unless you're a small company, not everybody will "ship", or write audio codecs, or interact with prospects, and so on.

<comment><USER8> Further: it's possible to select for whatever makes your particular shop special. Fifteen years ago "only early adopters with the foresight to learn ColdFusion" might have been the metric.

If reliability and predictability are the goals (and I think they are with this kind of thing), I think a far more sensible approach would be to treat developer groups like cults. "You can code however you want at home; here we _are_ dogmatic, and _everyone_ uses JetBrains. Everyone tests, everyone debugs, everyone ships."

It sounds draconian and not altogether pleasant (and I agree), but I wonder if it might be a solution for companies who distrust off-the-street devs so much that they erect hiring barriers out of fear.

</comment></comment><comment><USER9> Honestly, I think this is delusional. A developer that successfully develops and launches a product probably won't be looking for a job, they'll be maintaining and trying to grow the product's user base.

This approach will get you people who shipped products no one (or very few people) wanted. It's not as bad as it sounds, but it's not the amazing you- big-developer-ubermensch-you thing these articles on shipping your way to a job make it seem.

<comment><USER10> Perhaps, but consider there is a shocking number of professional developers who have never actually built and shipped something. They have only done maintenance on existing products, and for all you know they are NNPPs hiding out in a large team under thick blankets of political management.

<comment><USER11> Sounds like you are creating a false dichotomy between maintenance and greenfield short-cycle product development. What about the embedded developer at Ford or Boeing for whom product development means taking the code from the previous product and adding/removing features? Where product life cycles are measured in years instead of months? How about the developer writing machine learning code for Bloomberg or Wal-Mart, whose code will never see the light of day and whose "product" is never really finished?

I could go on, but this demonstrates there are many good professional developers who do not fit the SV bubble's concept of a good developer.

<comment><USER10> Of course what you are saying is true. I didn't mean to imply that I think this is some kind of great litmus test. In fact I think all litmus tests are bullshit. The uncomfortable truth is that there are probably people out there with _no_ programming experience at all who will be better programmers after a year than some 20 year veterans who have learned enough to get by but just aren't that good.

My point was simply if you _have_ to filter on some arbitrary criteria, finding people with a habit and verifiable record of shipping is probably a pretty good indicator.

</comment></comment></comment></comment><comment><USER12> > So for example, publishing source code of an implementation of an audio > compression algorithm on GitHub is not shipping. On the other hand, a > library with multiple versions, downloaded and used by hundreds of > developers is a clear indicator of shipping behavior.

My initial thoughts on this are that there are many us who are completely uninterested in spending time promoting our code. I'm fine with developing stuff and putting it up on github as an example of what I'm capable of doing, but promoting that code, getting other people involved and using it? That's marketing, not development.

<comment><USER13> Yeah, apparently according to him it's not enough to have a github account with quality software, it also has to be used by hundreds of developers.

</comment></comment><comment><USER14> This is probably the most important point:

Young programmers, due to lack of experience, sometimes don't see that writing code is only a small part in producing software.

</comment><comment><USER15> I grew up in the open source community. There's a lot of really good best practices that you pick up there as you contribute to or pull from other projects. Among those are the development/stable release trees.

If you have something that "just works", you do a release, but to a development branch. Eventually some of those features can get backported to stable, or the release will get upgraded to stable after thorough testing, or all new feature development will end once it's been tested enough to ensure a stable release. There may be 10 development releases before a stable release comes out. The benefit is you get to "just ship" code, but stable users aren't forced to deal with your bugs and various changes just because you wanted to get an experimental feature out the door.

"To ship" is not a software development practice. It's silicon valley hype. It's the idea that delivering an average product is more important than designing, developing, testing, and producing a really good product. The author is right, this is difficult. But this is not what I think most people consider when they say "to ship".

</comment><comment><USER16> People I respect told me the same thing, so I used to believe shipping made me a better programmer. It probably did in the sense that you see what it takes to finish, and sometimes it takes dropping your ideals for a while. Sometimes it takes a lot more polish than you expect. Sometimes you see the flaws in your genius designs exposed, and you learn what ways you failed to cover all possibilities even though you had 'proved' it.

But, shipping has also done me as much damage as good. Unreasonable deadlines lead to bad decisions. Crunch times make me stupider, take many months to recover from mentally, and frequently are so crowded with patching things up that the lessons I should have learned about what I did wrong are lost in the wind.

Any company that wants to get on their white horse and trumpet about the virtues of shipping should be required to back it up with strong data on the virtues of excellent project management as well as how they have figured out how to ship software on a deadline with absolutely no overtime!

</comment><comment><USER17> I don't know what I am missing here but after reading the article I came out with the following: "If you want to be a good programmer you should do a job well done"

</comment><comment><USER18> Productionalization is important indeed, however I'd say that it is a trait desired in any engineer, not necessarily a programmer.

</comment><comment><USER19> Real programmers ship, i.e. real programmers that work for sane companies and management sometimes ship code that customers actual want. Shipping products is rarely dependent only on programmers.

</comment><comment><USER20> I think that either I misread this article or some of the other posters have. The author isn't talking about shipping a product, the author is talking about delivering code to production.</comment>


Ask HN: Which time saving non-software products do you use? - <AUTHOR> Which time saving, life changing or premium products have you found very useful? It doesn't have to be software related.<p>For me it's something as simple as labelled socks. I like dark colored socks but finding pairs after doing laundry was painful. Ever since finding them I've completely switched to using socks labelled with days of week. <comment><USER2> Silly, but putting up a no-fog mirror in the shower for shaving has been amazing for me. I used to shave after the shower, but now I can take care of it while still in the shower which means it takes less time and there's less cleanup (plus I can stay warm in the shower too!). Not a huge time savings, but definitely asked myself why I hadn't done so sooner.</comment>


F# RISC-V Instruction Set Formal Specification - <AUTHOR> https://github.com/mrLSD/riscv-fs <comment><USER2> To me "formal specification" sounds like it should have some sort of connection to formal methods, i.e., some proof system. This looks more like what I would call an "instruction set simulator". Though if the focus is on clarity and readability rather than performance, "executable specification" might be a good middle ground.

<comment><USER3> In this context "formal" just means that no parts are left open to interpretation [1]. While proof systems are definitely formal that implication doesn't work the other way around.

Under normal circumstances programming code is unambiguous and should therefore suffice as a formal definition / specification (with most programming errors stemming from the fact that this formal definition doesn't match the informal definition the programmer or customer had in mind).

[1]: For comparison, [https://en.wiktionary.org/wiki/formal](https://en.wiktionary.org/wiki/formal) defines 'formal' as: "(mathematics) Relating to mere manipulation and construction of strings of symbols, without regard to their meaning".

<comment><USER2> > In this context "formal" just means that no parts are left open to > interpretation

Yes. But as you say, by that token _any_ instruction set simulator could be called a "formal specification" (modulo undefined behavior, or if you deliberately wrote in a language with nondeterminism). But we don't call them that, because (I maintain) there is something more to being a "formal specification". Namely, being in a form that is easily amenable to formal methods tools, and the _intention_ to apply these tools.

Now of course a pure F# or Haskell program is much closer than C to being analyzed by formal methods tools, but there is still a gap that wouldn't be there if the specification were written directly in Coq or Agda or Isabelle or whatever.

<comment><USER3> The main reason code isn't considered a formal specification is that it's not intended to be either formal or a specification. That doesn't mean you cannot write a formal specification in code.

If anything code allows for a higher level of formality than all but the most formal mathematics. Which is why some mathematicians are advocating that mathematical proofs should be specified as code [1]. You shouldn't confuse the existence of these languages to mean that any code not capable of expressing mathematical proofs is not formal. It might be limited, but not informal.

[1]: [https://www.youtube.com/watch?v=Dp- mQ3HxgDE](https://www.youtube.com/watch?v=Dp-mQ3HxgDE)

</comment></comment></comment></comment><comment><USER4> Here is one in Haskell which is more complete: [https://github.com/mit- plv/riscv-semantics](https://github.com/mit-plv/riscv-semantics). For example, it supports 64-bit ISA while this one doesn't yet.

</comment><comment><USER5> Maybe it could be ported to SML, because:

> "It is distinctive among widely used languages in that it has a _formal > specification_ , given as typing rules and operational semantics in The > Definition of Standard ML (1990, revised and simplified as The Definition of > Standard ML (Revised) in 1997)."

[https://en.wikipedia.org/wiki/Standard_ML](https://en.wikipedia.org/wiki/Standard_ML)

edit, the specification itself: [http://sml- family.org/sml97-defn.pdf](http://sml-family.org/sml97-defn.pdf)

</comment><comment><USER6> There are multiple WIP formal specs for Risc-V it seems one will be chosen as official and is then likely to be used for further tooling eg hardware and software verification.

</comment><comment><USER7> Coming from a different background, I wonder what this project tries to achieve? And why F#?

<comment><USER8> I find it strange that this comment is downvoted, while being only comment here asking "what does it do". As far as I understand this can be used as emulator of RISC-V processor. It is also has very verbose and clear code, so one can learn RISC-V instruction set reading it. It is specification written in programming language, which is a good reference. I find it easier to read than documentation, for example.

F# is because it's as good programming language as any.

<comment><USER7> Thanks, that was the only usable answer.

</comment></comment></comment><comment><USER9> Would make up a great blog post, about highlighting the weaknesses and strength of F#, if there are any?</comment>