The depth and breadth of Python - <AUTHOR> http://neopythonic.blogspot.com/2011/06/depth-and-breadth-of-python.html <comment><USER2> We've disassembled and decompiled the "obfuscated" bytecode, and we have to say that a few of their constructs are _very_ interesting. The custom memory allocator is very nifty, and along with a few other things gleaned from their binaries has proven very useful and educational to take apart and discover.

<comment><USER3> When I read the article, I wasn't very convinced the obfuscated Python bytecode couldn't be decompiled. There have been Python bytecode decompilers around for years.

</comment></comment><comment><USER4> I have to admit, that life does sound awesome.

If any of the Dropbox folks are around, why not wxPython everywhere? Why the switch to the PyObjc?

<comment><USER5> IIRC, I read somewhere that wxPython didn't get completely native looking UI elements, or didn't support some of the native OSX UI paradigms that they wanted to use. Their goal was to get 100% native UI and UX on each platform, and the only way to do that on OSX was with PyObjc.

<comment><USER3> Cocoa support in wxPython is coming along but isn't 100% there yet:

[http://groups.google.com/group/wxpython- users/browse_thread/...](http://groups.google.com/group/wxpython- users/browse_thread/thread/85fb9c4262633d80)

</comment></comment></comment><comment><USER6> Has there been any research done on programming language readability for non- programmers? I think that that would be extremely interesting.

<comment><USER7> Interesting for sure but what purpose would it serve?

Programming languages are meant for programmers. A survey of non-programmers on programming would be something on the lines of non-math people on math symbols.

<comment><USER8> I've heard an argument that Python, of the widely used languages, comes closest to being "executable pseudocode", simultaneously actually code and yet readable as an informal algorithm description. It'd be interesting to know if that were true.

<comment><USER9> If there's one thing I've learned from studying programming languages, it's that human minds are extremely diverse, especially when it comes to designing notations.

For some programmers, their 'executable pseudocode' language is Haskell, or Forth, or maybe even the assembly language of some specific piece of hardware. Some people might naturally think in COBOL.

Also, the problem domain can dictate some of the shape of the language: Something that's built out of a mathematical expression is almost always going to be expressed most compactly as that expression in standard mathematical notation, with something like APL coming close to being the 'executable pseudocode' form of that program. That said, there are almost always many ways to solve the same problem.

<comment><USER10> I haven't actually programmed in Haskell, but once I started reading about it, my pseudo-code started to look like it, especially type declarations and inline conditionals. Other times, I use more Python-y (won't say Pythonic) syntax.

So even in one person, it can vary.

</comment></comment></comment></comment></comment><comment><USER11> Would someone please explain what he means by "pattern matching" in this context?

<comment><USER12> Pattern matching is the process of defining multiple functions with the same number of arguments, where the arguments decide which function to execute.

E.g.: foo(0) -> 1; foo(n) -> foo(n) * foo(n-1).

calls to foo(0) would execute the first function, while all other calls would execute the 2nd. Note that it is often necessary to define the functions in order of most specific first.

A similar concept in Erlang is guards, where an expression can be evaluated instead of simple pattern matching.

foo(n) where n == 0 -> 1; foo(n) -> foo(n) * foo(n-1).

Might have screwed up on the Erlang notation in that example though.

<comment><USER12> This is why you don't write code before your morning shot of caffeine (unending recursive function calls). Meh.

</comment></comment></comment><comment><USER13> So if there are changes I'd like to see in Python, I should lobby Guido in person?

Yes I know, Python has a fairly decentralized control structure and a nice open process in the form of PEPs. There was just something about this post that made me a bit uncomfortable...scratching phantom itches from old, somewhat exotic languages...

<comment><USER14> <http://en.wikipedia.org/wiki/Benevolent_Dictator_For_Life> ?

</comment></comment><comment><USER15> Pattern matching in python sounds like a GREAT idea.

<comment><USER16> That would be incredible, I really miss pattern matching when writing Python code. Fitting it into the existing style of syntax and the language semantics is a problem though.

Pattern matching in list comprehensions would be awesome too. List comprehensions are very cool in Python but they're so much cooler in Haskell :)

</comment></comment><comment><USER17> I was just reading a bunch of older articles from 2009 lamenting MIT changing their intro course from Scheme to Python. I wonder if this sort of article would have been helpful in that debate.

<comment><USER18> I doubt it. The debate wasn't an indictment of Python, but rather resistance to the idea of replacing SICP (of which Scheme use was simply an implementation detail) with _anything_ else.

</comment></comment><comment><USER19> I love Python as a language, but I am frustrated by its dynamic typing. I'm surprised there has been more research into static type inference for Python (and JavaScript). Google App Engine's Python libraries implement manual type checking of API parameters (with _typeof_ and exception raising) to make the APIs harder to misuse.

The Boo programming language is heavy influenced by Python, but includes static typing and type inference. Unfortunately, Boo requires the .NET Runtime.

</comment><comment><USER20> Too bad -- I guess dropbox isn't doing anything to get efficient what's-changed notifications from the OS, then (since the only platform- specific code is the UI). Because those hooks are not at all cross-platform.

/probably obvious to all you actual dropbox users

<comment><USER21> UI isn't the only platform-specific thing in the code; we have a bunch of (non-Python) native code on each platform to monitor filesystem changes.

<comment><USER22> Totally unrelated request - you posted your YC application a few years ago, but the link 404s. If this is intentional, you can forget it, but if not, I'd really would like to see it,

Link in question is: <http://files.dropbox.com/u/2/app.html>

Original submission: <http://news.ycombinator.com/item?id=801503>

Thanks in advance! Dropbox is really an amazing product, even to techies.

</comment></comment></comment><comment><USER23> Funny, I remember Prof. Hilfinger going off on about style during a lecture for a course using Java.</comment>


Tech firms let Russia probe software widely used by U.S. government - <AUTHOR> https://www.reuters.com/article/us-usa-cyber-russia/tech-firms-let-russia-probe-software-widely-used-by-u-s-government-idUSKBN1FE1DT <comment><USER2> For me to some extent the fact that it is supposedly bad thing says more about the article author than about the firms that allowed that.

<comment><USER3> That's what I thought too... like this quote:

"Even letting people look at source code for a minute is incredibly dangerous," said Steve Quane, executive vice president for network defense at Trend Micro, which sells TippingPoint security software to the U.S. military.

<comment><USER4> It can be dangerous... I once caught a glimpse of some befunge source code, and haven't had a sound night's sleep since.

</comment></comment></comment><comment><USER3> Would it also be fair to say most likely these same places (SAP, Symantec and McAfee) probably let other governments "probe" their software as well? I'd be surprised if 5 Eyes countries weren't all over it as well.

<comment><USER5> You would hope so. Longstanding practice in crypto is to assume that 'the enemy knows the system'. It should apply here, as well.

</comment></comment><comment><USER6> In other news:

Thompson-reuters finds procedural flaw in outsourcing of critical software to uninterested 3rd party companies; uses to frame russia as malicious and and create lingering mental justification for trade embargoes

</comment><comment><USER7> "Probing" software in this context means doing security audits. Nothing would have stopped the Russians from breaking into a big company like Ford or General Electric and stealing a copy of the software for them to then look for vulnerabilities.

This is like the Oracle rat hole where they tried to claim that security audits of their products could only be done with prior approval. That cat is way out of the bag.

</comment><comment><USER8> If the firms are allowed to sell their software to non-US entities, why would Russia buy it if they couldn't inspect it. We already know from Snowden that the United States Government tries to pwn the entire world. Why would they trust anything from the U.S.A. without doing a very careful code review and then compiling it themselves?</comment>


The Amazon Kindle Cloud Reader is live - <AUTHOR> http://read.amazon.com

<comment><USER2> So is this the end of DRM on Kindle books? Because it works fine in Chromium, which I have full access to the source code for. That means I can make it do anything, including dump out the text that I'm looking at.

I dug around a little bit and found that it's storing its data in a sqlite database in ~/.config/chromium/Default/databases/https_read.amazon.com_0/2 (there's an index of what's in what database in ../Databases.db). I did a "select * from fragments", found some things that look like data URLs representing images, pasted them into my browser and yup... those are the pictures from the book I'm reading. So, DRM fail.

As for the text of the book, I see some words from the book surrounded by garbage. So if this is encryption, it's pretty bad. Excerpt:

⟳As➁⨋0⫪⟳I➁⨋0⬀⟳exit,➁⨋0⭂⟳I❪➖⨋0⭍⟳⡿❪➖⨋0⮥⟳m➁⨋0⮻⟳⢞⥞ys➁⨋0Ⰸ⟳⢵refu

"As I exit, I'm careful..."

Next step is to look for the source code that implements this and see what those garbage characters are doing.

<comment><USER3> Doesn't having _some_ encryption, even if it is trivial to break, mean that the DMCA applies if you are in the US turning this activity into a criminal act?

<comment><USER4> Isn't violating copyright(except for fair use) already illegal? If you photocopy a book fully and give it your friend, you're already violating copyright and can receive a takedown notice[1], regardless of the anti- decryption clause of the DMCA.

[1] A different provision of the DMCA

<comment><USER5> IIRC/IANAL, violating the copyright without commercial intent (you are not selling it) is still a civil law violation although DMCA takedown provisions still apply. Breaking DRM elevates it to a criminal charge.

I think that is the case, but correct me if I am wrong, it has been awhile since I studied this.

<comment><USER2> If only there were some way to anonymously release software...

<comment><USER5> Releasing it is not the issue for the user, possession of the software is.

<comment><USER2> If only there was some constitutional amendment that promised people the right "to be secure in their persons, houses, papers, and effects, against unreasonable searches".

This means: if you have some circumvention device whose presence cannot be detected from outside your home: too bad for the government. They can't do anything about it.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> _"Optimized for iPad: shop the integrated Kindle Store for Tablets"_

I was expecting this for a few months now, especially after Apple wanted to introduce that policy of theirs where they wanted a %30 cut. Amazon is not taking any chances with Apple anymore. Good for them. All content providers should use web-apps.

<comment><USER7> Web apps sacrifice offline operation. I can't say I'd be totally sanguine about that, specifically with content providers.

<comment><USER8> This one doesn't. It works just fine offline.

</comment></comment></comment><comment><USER9> The innovation in web apps that Apple spurred by their payment restrictions is going to be good for everyone. The Financial Times' excellent iPad app has now been replaced by an equally impressive web app. Amazon's Kindle Cloud Reader is almost as responsive as the native app. I'm almost ready to switch to it. Should be interesting to see how this affects the number of books they sell.

</comment><comment><USER10> Wow, they support Chrome and Safari, but not Firefox. Time to spoof my user agent and see if it really doesn't work or not...

Update: Even user-agent spoofing didn't make a difference with Firefox.

<comment><USER11> Looks like they're using Web SQL for local storage. Mozilla foolishly (IMO) rejected this standard so they'd have to reimplement the storage layer with IndexedDB to get this working on FF.

<comment><USER12> WebSQLDB isn't really a "standard". The standard is "whatever version of sqlite safari happened to ship with" which is really not a tenable long-term solution.

<comment><USER11> Sure it is. Pick a version. Call it the spec and fork SQLite if necessary. You can't possibly argue that this would be more work than inventing a new, untested data storage model from scratch. This approach is exactly what ran the W3C aground in the first place.

<comment><USER13> Why not just say "WebKit is the HTML5 spec", then? It'd be less work than coming up with an HTML5 spec from scratch.

</comment></comment></comment></comment></comment><comment><USER14> Nice. Now, if they'd just drop their surcharge for ordering ebooks in mainland Europe I might actually use it. Paying $3-%5 extra per book just because I live somewhere else doesn't make sense with ebooks.

<comment><USER10> Don't complain to Amazon about their ebook prices. Since "agency pricing", they're (mostly) not allowed to set them anymore. Beyond agency pricing, some European countries (e.g. France, Germany) have tried to regulate the prices of ebooks themselves. Sadly, Amazon is stuck just as much as you are.

<comment><USER15> This specific complaint is about Amazon though. Even if a publisher sets the exact same price for every region, Amazon sometimes adds their own "Whispernet tax" of about $2 + VAT. They seem to be gradually phasing it out now, but for the longest time, there were e.g. no free books outside the US, because even books listed as "free" actually cost a minimum of $2 + tax.

<comment><USER16> This is because all kindles in mainland Europe all have (edit) AT&T SIMs in them. It costs Amazon SIGNIFICANTLY more for you to use whispernet, because you are constantly roaming. The reason you pay the tax if you buy it on something other than the kindle itself is because at some point you could sync it on to your kindle, though archived items.

<comment><USER15> Sure, except that even Kindles that are wi-fi only had to pay the extra $2, not to mention those reading only on the PC or mobile app. It was a stupid system, but as I said, they are fortunately phasing the whole thing out now, and many books already have pricing parity (well, excluding VAT, but that's not Amazon's fault).

</comment></comment></comment></comment></comment><comment><USER17> Wow. For reading, that is incomparably better than the (admittedly horrid) Kindle for Mac native application.

If this gains a search feature, I cannot imagine ever launching the native app again.

<comment><USER11> Agreed. This is impressive. There are fewer and fewer reasons to write native apps it seems.

Any ideas what frameworks were used to build this?

</comment></comment><comment><USER10> They're highlighting their new iPad-optimized Kindle Store for Tablets. That is clearly a shot back at Apple for the recent "eBookstore Armageddon". Given how close they were to releasing their web app, I'm a little surprised that they didn't play more hardball with Apple, though.

<comment><USER11> This is one more reason why I'm happy I'm not locked into a single-platform store like iBooks.

<comment><USER18> Sadly, I think many will miss your irony.

<comment><USER11> No irony intended, actually. Although the emphasis on the iPad here shows how successful Apple has been at making this a one-platform market either way.

<comment><USER18> Double irony, then. Whether you read on the web or a Kindle e-reader or on your iPhone, you're still locked to the single Kindle platform.

I must admit that my many Kobo purchases aren't much better. I'm not locked to the Kobo platform, but I am locked to Adobe DRM.

<comment><USER11> I can now read Kindle books on any computer with a reasonable browser. I can't even read iBooks on my Mac. I prefer O'Reilly-style DRM-free PDFs, but at least I don't have to own an iDevice for the rest of my life to read my ebooks.

</comment></comment></comment></comment></comment></comment><comment><USER19> It's a very nice app. Thank you Amazon.

I hope O'Reilly and Safari Books Online take note. I use Safari but its web app to read the books is so slow as to make the whole experience painful and doesn't provide nearly the value it could.

It also seems to be very Microsoft IE optimized and basically lets you read one and only one book at a time, regardless of whether you have a post 2005 tabbed browser or not.

<comment><USER20> Yeah, I was sorely disappointed when I tried Safari. Great selection, but the interface is horrible. And they make it very hard to cancel your subscription. I expected better from O'Reilly. (It's actually a joint venture between O'Reilly and Pearson, which explains a lot. Still, it's a blight on O'Reilly's otherwise stellar reputation.)

</comment></comment><comment><USER10> Wonder why they decided to change the name from "Kindle for Web"?

OP, please fix the spelling in the title. I find it very irritating.

</comment><comment><USER20> This is wonderful. My one gripe with Kindle books was that I couldn't access them from my Ubuntu workstation. Because of that, I actually purchased a second copy of some titles from the Google eBookstore or resorted to pirating a PDF.

It doesn't look like you can highlight passages, though. And the lack of copy and paste, while understandable, will surely be grating in a desktop environment.

<comment><USER21> I've been running Kindle for PC on Wine, but this web app is definitely nicer.

</comment></comment><comment><USER22> The misspelling in the title is quite intentional -- cek is Charlie Kindel, former GM of Windows Phone Developer Experience (see <http://news.ycombinator.com/item?id=2860646>).

It should also be said that he's a great guy that I've known for more than a decade. Anyone who's interested in taking part in an early stage Seattle startup should definitely send him a message.

Well, on LinkedIn or Twitter or Google+ I guess -- Charlie, please add contact info to your HN profile!

[Edit] Looks like the title spelling has been corrected...

<comment><AUTHOR> When I posted this link to twitter I did intentionally mis-spell it (my tweet was "Oh, wow. The Amazon Kindel (er, Kindle) Cloud Reader is live: <http://bit.ly/pBoMhS>.

But, When I pasted it here to share on HN, I removed the "(er,...)" and MEANT to fix the original. My apologies for not doing that. Glad someone at HN was able to fix it.

@jonburs - My contact info IS in my HN profile, not sure why it's not showing up.

</comment></comment><comment><USER23> So... you can't cut and paste from it. Anyone want to dig in and look at how it's implemented? They must be fairly confident that people aren't going to use it to rip books off.

<comment><USER24> <http://www.free-ocr.com/>, or, I guess any OCR tool will do a job. But then - people could always have done (and probably did) that with a physical book, so, I'm not sure whether it would be worth it to make it more difficult to do with the digital book.

<comment><USER25> Well if someone created the software to do it, you could rip digital books automatically - not quite as easy to do with paper books, what with having to scan all the pages (possibly after first unbinding the book).

<comment><USER26> You can pretty easily create a page-flipper with an arduino board.

</comment></comment></comment></comment><comment><USER27> I've just bought my first e-books with this week's Pragmatic Programmer 40% sale ( <http://news.ycombinator.com/item?id=2861479> ). I'm now interested in buying an e-reader. Still hesitating between Kindle, Nook, iPad, or an Android tablet...

This might just tip the scale toward the Kindle DX.

<comment><USER11> I consolidated from a Kindle and iPad to just the iPad for travelling but I miss the Kindle. It's smaller and more comfortable to read and I prefer it for everything but books with a lot of equation or diagrams.

</comment></comment><comment><USER28> It's interesting to see Amazon working around the iPad's artificial limitations in this way. jrockway's comment about the sqlite database is particularly interesting. I'm not convinced that it would be particularly feasible to implement DRM in a cross browser way without causing serious performance problems (although I await to be unpleasantly surprised).

</comment><comment><AUTHOR> There are rumors Amazon is bringing out a color Kindle that is more an iPad like tablet than a book reader, likely based on Android.

Given the (apparently) great HTML5 work that went into building the Cloud Reader, I wonder what we'll see for UI in the color Kindle. Will there be a suite of apps that are all HTML5?

</comment><comment><USER29> This is so cool. I can now read kindle books on my ubuntu laptop without setting up kindle for pc + wine ugliness.

</comment><comment><USER30> Would anyone like to guess why search has been omitted in the web version? Also, for reference / technical books, it would be nice if the authors could mark certain blocks of content to allow copy and paste. It feels weird to have to retype all the code examples from a digital publication.

</comment><comment><USER31> WTF??? They don't support two most popular web browsers.

Firefox 5: "Your web browser isn't supported yet. Download Chrome or Safari below."

IE9: "Your web browser isn't supported yet. Download Chrome or Safari below."

<comment><USER32> They're using the Web SQL database to store the books on the client. This has never been supported by Firefox. Alternatives are becoming available, but it's not surprising that they started with the most established client-side database. It's also the only one supported by Safari, and since it seems like tablet support is one of their goals, that's important.

<comment><USER33> That is not an excuse for them, they should have a non-offline alternative for ie9 & FF

<comment><USER32> They probably will. They don't need to support everything off-the-bat, particularly since it doesn't seem like desktop browsers are even the primary target.

</comment></comment></comment></comment><comment><USER34> It shows only books downloaded to the 1st Kindle associated with particular account. Anyone knows how to display books from all Kindles on that account?

<comment><USER24> Shows books associated with all of my devices. Or, to be more accurate, all of the books I have purchased, in archive or on a device, are present. Including seven (7) unique copies of the Amazon Kindle Guide.

</comment></comment><comment><USER35> I would love to see this synchronize with the "collections" feature on the DX (not sure if all models have it). Otherwise, this is excellent.

</comment><comment><USER36> The only thing I've found missing are keyboard shortcuts to navigate the book? Or am I just trying the wrong keys?

<comment><USER37> The left and right arrows on the keyboard work for me in Safari, though only after first clicking the next arrow on-screen.

</comment></comment><comment><USER38> Shame that the dictionary is missing.

</comment><comment><USER39> At least now I will be able to read Kindle books on my CR-48 (Chromebook).

</comment><comment><USER40> Woot! Finally, we can now read kindle books on Linux. Thanks amazon.

</comment><comment><USER41> s/Kindel/Kindle/

It's a pretty grating misspelling. Thank you.

</comment><comment><USER42> That logo looks really ominous

</comment><comment><USER43> The Amazon KINDEL Cloud Reader is live...

<comment><USER43> OK... It's fixed now</comment></comment>


Show HN: A WP plugin to help your heirs inherit your website when you're dead - <AUTHOR> http://digitaldeathguide.com/ddsm/

<comment><USER2> That is actually a really great idea.

<comment><AUTHOR> Thanks Skidoo !

</comment></comment><comment><AUTHOR> Any comments welcome !</comment>


Swarming Robots - <AUTHOR> http://techcrunch.com/2015/05/13/swarming-robots-can-now-follow-your-fingertips/

<comment><AUTHOR> Moving slightly closer to Enders Game... or Jupiter Ascending. Wonder when they'll be able to detect royalty.</comment>


Nuisance call firm Keurboom hit with record fine - happy-go-lucky http://www.bbc.com/news/technology-39877362 <comment><AUTHOR> I would love to see the FCC begin to pay attention to this garbage in the US. I get about 4x more spam calls than from humans I actually want to hear from on my cell. I no longer pick up any call I don't recognize, which has caused problems. I also am in on-call rotation for my day job, so I can't just turn the ringer off at night when "on".

And these assholes call constantly. I'm not at all a violent person, but meeting someone with a financial stake in one of these operations would seriously test me. I find them utterly enraging.

<comment><USER2> Same, pretty much all phone calls I get these days are spam. And yes, very frustrating to constantly get calls offering small business loans for my non existent company.

Can anything be done to combat this?

<comment><USER3> I'm using Google Fi as my voice provider. It's not an awesome solution and requires a very specific phone, but I do get three things that really help with the spam calls:

* I can manage a list of spam and blocked callers online in addition to on the phone. This lets me move blocked call management off the phone and onto the carrier.

* I never have to answer my phone or listen to my voicemail: the transcripts have gotten to be very good, and appear relatively quickly after a call is received.

* Calls are flagged when I receive them, and probable spam calls are marked as such when the phone rings.

</comment></comment></comment><comment><USER4> 2-bit operation folds, fine unpaid. Director and his missus (1 share each) walk away unscathed.

<comment><USER5> Directors are personally liable for ICO fines as a result of PECR infringement.

At least, that was the plan, I'm not sure if this was enacted: [http://www.wablegal.com/uk-directors-personally-liable- nuisa...](http://www.wablegal.com/uk-directors-personally-liable-nuisance- calls/)

<comment><USER4> Nope, not enacted and now kicked into the long grass.

</comment></comment></comment><comment><USER6> You think this is bad, this is nothing. The worst thing is when one of these call-bots hijacks your phone number as the source/caller ID. Then you get all random people calling you about a missed call. We had a high-value xyz-8888 business number several years back that had this happen. We had to abandon the number. I assume it was someone entering in a random source number that just happened to be ours.

</comment><comment><USER7> ICO is a joke. £400k fine for 100million calls? That's probably way under what they paid to make the calls in the first place, so can just be considered a cost of business.

</comment><comment><USER8> Until our government or phone companies fix this problem in the US, I don't see another way to make a difference other than answering the phone, getting put through to a human being, and wasting their time.

Have fun with it, don't give out any personal information, and slowly take your story into ridiculous territory until the person on the other end catches on that you are playing them and hangs up on you.

<comment><USER9> The FTC Do Not Call List exists ( donotcall.gov ), and threatens fines against violators. Problems with it (beyond the janky lowest bid government website), is that you have to report the violators phone number, and anymore these are spoofed.

Also, it feels like the FTC doesn't do anything. You never hear about enforcement actions.

For a while after the DNCL came out, calls stopped, but they've been ticking up recently. I keep getting calls selling me solar panels. When I asked how they got the number, they said, "we're calling every homeowner in California." Well, that's a violation.

</comment></comment><comment><USER10> £400k? That's not a fine.

When the fine is that much less than the profits, its not a "fine". Its just a tax. And a light one at that.

</comment><comment><USER11> Here's the most important part of the story:

"In October, the government announced plans to let the ICO fine company directors as well as their businesses. "Making directors responsible will stop them avoiding fines by putting their company into liquidation," the ICO said."

Awesome!

</comment><comment><USER12> Need to stop fining companies and start suing the individuals. And actually make it hurt. 500k is change. Could even be a "indirect" donation.

</comment><comment><USER13> Would somebody please explain the reasoning behind fining companies, not individuals, to change the behavior of individuals? Because it seems to me that if the net result of doing X is a bunch of money and no jail time, the smart move is to continue doing X.</comment>


Turtl: an Evernote replacement with real data privacy - <AUTHOR> https://turtl.it

<comment><USER2> I hope it takes off.</comment>


A Microsoft Star Goes to Google - <AUTHOR> http://bits.blogs.nytimes.com/2013/12/15/a-microsoft-star-goes-to-google/

<comment> Link- It really bothers me when stories like this make the news. There is no story, the article is void. And to think it reached Hacker New's front page!

<comment><USER2> "news" is a relative thing. It's on "bits.blogs.nytimes.com"...

</comment></comment><comment><USER3> I don't know Blaise or have any direct experience with him, however when I worked at Microsoft I used to enjoy his talks and demos at company events. That doesn't sound like much but that was pretty rare.

At the same time my cynical side would figure that if he's half as competent as he seemed to be in these appearances, he's probably unhappy at Microsoft.

</comment><comment><USER4> Looks like he was involved in Photosynth - which just got an update. [http://photosynth.net/preview](http://photosynth.net/preview)

</comment><comment><USER4> The other story should be that we won't really get to play with the Photosynth tech (mentioned in the story) until [https://www.google.com.au/patents/US20130100128](https://www.google.com.au/patents/US20130100128) expires.

<comment><USER5> How ist this preventing anyone to use the collinearity equation and bundle adjustment in similiar ways?

The whole field of photogrammetry is pretty much build on these foundations which didn't just pop up in 2008.

[http://en.wikipedia.org/wiki/Collinearity_equation](http://en.wikipedia.org/wiki/Collinearity_equation)

[http://en.wikipedia.org/wiki/Bundle_adjustment](http://en.wikipedia.org/wiki/Bundle_adjustment)

<comment><USER4> Thanks, I didn't know about these.

</comment></comment></comment><comment><USER6> He's not the first Microsoft employee to go to Google, and won't be the last. Maybe if this was Steve Ballmer, it would be newsworthy, but other than that, no...

</comment><comment><USER7> Did MSFT make a counter-offer or any other attempt to retain Agüera y Arcas?

</comment><comment><USER8> How the f is this newsworthy</comment>


This machine separates your Skittles into color groups so you don't have to - <AUTHOR> http://www.zagg.com/community/blog/invented-this-machine-separates-your-skittles-into-color-groups-so-you-dont-have-to/ <comment><USER2> I wonder how much effort the Skittles factory puts in to ensuring each bag has a selection of all the colors. They certainly have some large high-volume plant to do so.

It's funny to think of this carefully-crafted machine undoing the work done by another carefully-crafted machine.

<comment><USER3> Couldn't they just mix all the colors together in roughly equal proportions (by weight, for instance) before packaging them into packets, and just rely on the statistical improbability of a noticeable imbalance in colors? I doubt there is actually a machine that counts out the Skittles by color and makes sure each bag gets the right number of each.

<comment><USER4> as someone who has kept track of their skittles color distribution over the course of a year, I can attest that there can be wide fluctuations in distribution percentages.

I wish I had kept all the numbers, but IIRC, the "typical" bag would have roughly 55-60 skittles, so the "average" color would have 11 skittles. It was common to see a single color with only 9 skittles. I can't recall ever having a bag have one color with less than 7 of any one color, but I would have on occasional see one color get as many as 18 of one color.

Sincerely yours, a gigantic nerd.

<comment><USER5> > as someone who has kept track of their skittles color distribution over the > course of a year

I mean did you not expect someone ask why? Also, why?

<comment><USER4> 1\. I like the taste having an even distribution (i'd eat one of each color at the same time). There was a stupid little pattern on how on how I'd eat the extras to get each color to have an equal number. 2\. I started a very statistics heavy programming job, so I thought it'd be fun to run some numbers on something novel.

</comment></comment></comment></comment></comment><comment><USER6> [EDIT] Adding some useful quotes from the radio interview and cleaned up the facts

[EDIT] The homepage for the company is at [3]

A similar, though much larger, machine for sorting oysters was invented in Australia a few years back (around 2006 by the look of it).

I can't find any specific web presence for the machine itself, but I managed to dig up an interview with the inventor [1] and the episode of 'Inventions from the Shed' I originally saw it in [2].

The basic premise, from memory, is to feed oysters into a chute via a conveyor belt. The oysters are funnelled so that they drop in front of a series of cameras set at different angles, which use shape recognition to match the oyster with one of a few grades of oyster.

 _[We built] a scanning detector that would take four images of the oyster as it fell--just falling under gravity and passing through four separate scanners at 45 degrees to each other, produces four separate images._

 _We take the four images and they're processed through a dedicated microprocessor and the algorithms that we use are fairly sophisticated, because they have to react very fast. And, yes, we produce in a sense a volumetric calculation_

The machine then chooses which bin to route the oyster to by rotating a directing piece at the bottom of the drop.

 _Directly below the scanning system we use a server motor which is effectively the same as you would use in industrial robot and it has a slide that is re-positioned for each oyster, and is stationary as the oyster is diverted from the direct fall down into an exit tube. That server motor rotates and is in its new position within about .03 of a second._

The machine ends up being quite fast, with around a week's worth of work done in less than a day. The accuracy, at 98%, is also impressive.

 _We have had one machine operating in excess of ten a second. We've limited it for this particular production machine to a theoretical maximum throughput of one eight of a second. It works out when an oyster grower is putting them through at an average of probably three to four a second [which is] about a thousand dozen an hour, between 800 and 1,000 dozen an hour_

Some diagrams showing what the machine looks like are at [4].

The main differences between this mechanism and the skittle machine is the extremely quick sorting necessitated by the application (sorting large amounts of oysters that was previously done by hand) and the reliance on shape matching rather than colour. I wonder how hard it would be to make a machine that sorts skittles in a similar way, that is by dropping them down a chute, analysing and directing them before they reach the bottom rather than the somewhat slower method evident in the demonstrated machine.

[1] radio interview - [http://www.radioaustralia.net.au/international/radio/onairhi...](http://www.radioaustralia.net.au/international/radio/onairhighlights/oyster- sorter)

[2] video - [http://www.dailymotion.com/video/xmdk44_inventions-from- the-...](http://www.dailymotion.com/video/xmdk44_inventions-from-the-shed- episode-3_tech)

[3] homepage - <http://www.oystek.com.au/>

[4] drawings

grader - <http://www.oystek.com.au/images/grader_line.jpg>

top down view - <http://www.oystek.com.au/images/grader_line2.JPG>

complete setup - <http://www.oystek.com.au/images/grader_line3.JPG>

</comment><comment><USER7> An industrial grade version: <http://www.youtube.com/watch?v=Q8PNMcNEjdA>

<comment><USER8> After seeing your link, I just watched a half hour of industrial robots.

They're so cool.

Look at how fast this thing moves!! <http://www.youtube.com/watch?v=v5eR0eHknZk>

This is awesome (commentary is kind of boring) <http://www.youtube.com/watch?v=4TOotC_Q3sU>

Pick and place machines are pretty cool too, they're like anti-sorting machines. <http://www.youtube.com/watch?v=nah4BQ9y8IY>

<comment><USER9> You should see the chip shooter robots:

<http://www.youtube.com/watch?v=nah4BQ9y8IY>

Humans are so screwed.

<comment><USER8> You should look at the last video I posted :P

</comment></comment></comment></comment><comment><USER10> That's very jolly! I like how cleanly constructed it is. On a DIY hacking project that kind of attention to neatness can make all the difference between "oh, cool idea" and the feeling of an actual product (even though it's in fact one of a kind).

I wonder how feasibly the opaque parts could be replaced with transparent ones and whether that would look cooler or just plain tacky?

</comment><comment><USER11> I'd like to see something identical to this, but with Marbles. Now THAT would be something!

The simplest mechanism is would be something like:

1\. Marble goes in, color is scanned and stored. Any future marbles detected with that color go into the same slot.

Of course there are many problems, mainly because Marbles come in every color and pattern imaginable. How would you deal with patterns and multi-colors? What kind of tolerances would you use for more general sorting?

I'd be fascinated to see how someone would deal with these problems. The problem of multi-color and pattern recognition might have application in many other fields.

What about actually sorting each marble individually by color shade from reddest to violetest? That would probably necessitate a storage mechanism.

</comment><comment><USER12> Simple, funny machines like this are mesmerizing in their elegant performance and almost Unix-way determination of doing one thing, but doing it well.

The video also instantly reminds me of another guy having fun with little colored candies - the one that conducted M&Ms breeding experiments ([http://rogerebert.suntimes.com/apps/pbcs.dll/article?AID=/20...](http://rogerebert.suntimes.com/apps/pbcs.dll/article?AID=/20081030/OPINION/613186340)).

</comment><comment><USER13> Sometimes I see other people's ideas and wish I had thought of that. Sometimes I'm just happy there exist people who love doing this kind of thing.

</comment><comment><USER14> Reminds me of the CubeStormer: [http://www.youtube.com/watch?v=_d0LfkIut2M&feature=relat...](http://www.youtube.com/watch?v=_d0LfkIut2M&feature=related)

</comment><comment><USER15> We did a project of this ilk at the university a couple of decades ago. Differences were the color detection circuit was a pain-in-the-ass and we used M&Ms instead of Skittles.

<comment><USER16> It's a lot easier now. =)

TAOS had a contest to build an M&M sorter based on their integrated color sensor. The winning design was nice and simple (and a lot simpler than this Skittles machine)

[http://candyaddict.com/blog/2005/12/02/how-to-make-an-mm- sor...](http://candyaddict.com/blog/2005/12/02/how-to-make-an-mm-sorter/)

</comment></comment><comment><USER17> Finally...

</comment><comment><USER18> Red FTW!</comment>


Immutable Data Structures That Are Compatible with Normal JS Arrays and Objects - <AUTHOR> https://github.com/rtfeldman/seamless-immutable <comment><USER2> There's generally three categories of immutable data libraries for JS:

\- Purpose-built specialized data structures (Immutable.js, Mori)

\- Libraries that use freezing in some way

\- Utilities that abstract over immutably updating plain JS objects and arrays.

seamless-immutable falls into the second category. Looks like it also adds some extra methods to objects it wraps/returns, and overwrites mutating methods to throw errors to help you avoid them.

My Redux addons catalog has a large page listing all of the libs I've seen that fall into these categories [0]. If you don't want to use one of the specialized data structure libs or libs that do freezing, there's at least a couple dozen immutable update utility libs out there, with a variety of APIs to choose from.

My list also has a section of Redux middlewares that will help debug accidental mutations in development, either via freezing or other comparisons [1].

[0] [https://github.com/markerikson/redux-ecosystem- links/blob/ma...](https://github.com/markerikson/redux-ecosystem- links/blob/master/immutable-data.md)

[1] [https://github.com/markerikson/redux-ecosystem- links/blob/ma...](https://github.com/markerikson/redux-ecosystem- links/blob/master/devtools.md#linting)

<comment><USER3> I've build a library Transmutable which falls into the third category :)

it allows to use immutable data structures in mutable-like way, using plain assignments: [https://www.npmjs.com/package/transmutable](https://www.npmjs.com/package/transmutable) (mutations are not performed but they are just recorded in ES6 Proxy, and object is cloned on commit (sort of copy-on-write), and mutations are then applied).

So it basically enables for writing such things:

        const copy = transform(original, stage => {
            stage.x = 10;
            stage.y = 20;
            stage.foo.bar = 123;
        })

instead of Object.assign / ... mess.

<comment><USER4> This is a neat idea, hadn't thought of this but it could definitely help me bring new developers into the immutable style more easily.

The only issue with it is, of course, the fact that Proxies are ES6 and everyone still has to deal with old browsers.

I know MobX does similar object observation, and they support IE, but I've never had the time to go into their codebase. Do you know if something like this could be written in a way that allows IE10/11 to support it?

Also, could you elaborate on why it's necessary to use a proxy at all, when in reality you could just do a copy of the object from the very beginning and allow them to do mutations on that?

<comment><USER2> As far as I know, proxies simply will not work in environments that do not support ES6, because they require purpose-built JS engine support (see some comments at [0] as examples).

MobX works by wrapping plain objects and arrays with its "observable" equivalents. Per [1] , its object support requires fields to already exist, so it knows how to generate wrapper fields accordingly.

As for copying: as I talked about in the "Immutable Update Patterns" section of the Redux docs [2], proper immutable updates require copies of _every_ level of nesting that is being modified. If you want to make an update to `state.a.b.c.d`, you need to make copies of c, b, a, and state. That's doable, but takes work, and can get ugly if you're dealing with nesting by hand. This does lead to frequent mistakes, like assuming that `let newObj = oldObj` makes a copy (it just adds another reference to the same object), or that `Object.assign()` does deep copies (it's only shallow, ie, the first level). It's one of the most common pain points I see for people learning immutability and/or using Redux.

What something like the `transmutable` lib appears to give you is the ability to write perfectly standard imperative mutation code with no extra fluff necessary, even for nested data, and still get proper immutable updates. I'm definitely going to have to play around with it.

[0] [https://stackoverflow.com/questions/35025204/javascript- prox...](https://stackoverflow.com/questions/35025204/javascript-proxy- support-in-babel)

[1] [https://mobx.js.org/refguide/object.html](https://mobx.js.org/refguide/object.html)

[2] [http://redux.js.org/docs/recipes/reducers/ImmutableUpdatePat...](http://redux.js.org/docs/recipes/reducers/ImmutableUpdatePatterns.html)

<comment><USER3> on the beginning I used getters/setters but I switched to Proxy because it allowed for simpler implementation and more flexibility.

I may consider to switch back into getters/setters, if support of Proxy is really a problem (although getters/setters have its limitations).

There is also Proxy polyfill, although it has the same limitations getters/setters have ("properties you want to proxy must be known at creation time"): [https://github.com/GoogleChrome/proxy- polyfill](https://github.com/GoogleChrome/proxy-polyfill)

</comment></comment></comment></comment></comment><comment><USER5> There is a huge loss in usefulness for immutable objects when immutability is not a default and you have that many different implementations.

The thing I like about immutability in languages that implement it by design is that you know that if you get an data structure, it is immutable. In the world of javascript, you not only have to worry about whether an object you get from a library is immutable, but which kind of immutable implementation is using. Moreover, that information is not easily available in the type signatures, so you have to go to the library author's documentation, if any! That, to me, is a complete mess.

<comment><USER6> I totally agree with you. I wish we had a built-in immutable array type and a built-in immutable object type. I love the way it's done in Python, where you have Lists vs Tuples and Class Objects vs NamedTuples. You can consume them the same way:

        my_list = [1,2,3] # mutable
        my_tuple = (1,2,3) # immutable
        my_clsobj = myclass(foo=1, bar=2)  # mutable
        my_namedt = mynamedt(foo=1, bar=2) # immutable

        my_list[0] # 1
        my_tuple[0] # 1
        my_clsobj.foo # 1
        my_namedt.foo # 1

</comment></comment><comment><USER7> I've been using this:

[https://github.com/guigrpa/timm](https://github.com/guigrpa/timm)

The onus is on the developer to actually ensure immutability, but as long you're always mutating via the library functions, you should be fine.

I've used more serious solutions, like Immutable.js, but I prefer this instead. The wrapper functions in Immutable.js, in my experience, aren't worth the trouble.

<comment><AUTHOR> Well if the onus is on the developer it kind of defeats the purpose no? As you likely know seemless-immutable also has a "production" mode that has better performance but doesn't ensure it. That seems like a good compromise to me, so that at least during development you get errors when things are being mutated.

The benchmarks in the Timm readme are interesting though. I would like to see a benchmark of seamless-immutable in production mode added to compare.

<comment><USER7> It doesn't defeat the purpose. It only mutates if there is actually a change to the data structure. When used properly, timm works great.

The (potential) problem is that it is still possible to mutate objects without the use of timm's utility functions.

If you value the performance benefits (no penalty for freezing objects since timm doesn't do that), and understand that to get the benefits, you must only mutate objects using timm, choose timm.

If you value the additional safety other libraries provide, then absolutely use one of those. It all depends on the use case.

You don't need to freeze objects if you are doing it properly. You could even do static analysis to know (by checking to see if you're reassigning object properties, etc).

</comment></comment></comment><comment><USER8> Nice! I will try it out as soon as I can but if it rids me of Immutable.js I will be so happy. Its API is so convoluted and you have to use .toJS() all the time since using get() is so clunky and while transforming value back to JS it will fail if it was undefined. Many small things that succeed in killing the joy of immutability for me. (But mostly the huge API that requires way too much studying)

Just a quick question is there a helper library for connecting immutable redux-store to localStorage? That is something I dearly miss if there is none although you could write one yourself I guess.

There is also no chaining of method calls or withMutations equivalent. Granted for small stuff not that important but it would be nice to have them in toolbox if use case arises.

But thanks. Immutability in JS is such a pain which will hopefully change in the future. Until then I'm looking for the next best thing.

</comment><comment><USER9> I've been using this library for over a year, I'd say if you have an existing project that you'd like to use Immutable objects in then it's a great choice with minimal downsides. For a greenfield project Immutable.js is probably a better bet as the newer data structures come with a lot of benefits.

<comment><AUTHOR> I have just started a React-Redux project using Immutable.js and am considering switching it over to this as I can see a lot of advantages in the compatibility with JS data. What downsides do you think I would encounter after switching?

<comment><USER2> I wrote a long Reddit comment a while back that describes the reasons why I advise that people _not_ use Immutable.js [0].

As a quick summary:

\- It doesn't magically improve perf the way some people think it will. It does make easier to use the standard shallow equality implementation of `shouldComponentUpdate`, and can be faster at copying/updating very large objects. However, many people use `toJS()` to extract values, and that is absolutely bad for perf (especially if you call it in `mapState`).

\- You either have to use its API everywhere in your codebase, or spend a lot of time encapsulating it to keep your components unaware of its existence.

\- It can be harder to debug the contents of the objects.

I'm not sure about specific downsides for using Seamless-Immutable.

My React/Redux links list has a section of articles that discuss the pros and cons of using Immutable.js for performance [1]. I've also got a section on use of immutable data in general [2], including some articles that talk about how to actually use Immutable.js in your app, and articles on using plain JS data immutably.

[0] [https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abra...](https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abramov_redux_is_not_an_architecture_or/d51g4k4/?context=3)

[1] [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/react-performance.md#immutable-data)

[2] [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/immutable-data.md)

<comment><AUTHOR> You don't appear to be actually responding to my question but are giving unsolicited advice and plugging your projects :/

<comment><USER2> I actually misread your question a bit at first - I originally thought you were asking about switching _to_ Immutable.js, not away from it. I realized that before I posted it, and decided my answer was still relevant to the aspect of "why someone might want to switch away from Immutable.js". So, in that sense it's adding context to the reasoning behind your question.

As I said, I'm not aware of specific downsides to using Seamless-Immutable. It seems like a good balance of enforced immutability in development via freezing and replacement of mutation methods, and compatibility with standard JS object/array notation and usage.

</comment></comment></comment></comment></comment><comment><USER10> Modern JavaScript is full of syntax sugar but lacks operator overloading which would be really useful for custom data structures. This surprising me.

</comment><comment><USER11> Does `Object.freeze` still incur a performance penalty? Static enforcement of immutability is possible today for array types using something like `$ReadOnlyArray` tagging in flow, if a bit clunky.

I think a light wrapper that:

1\. Integrated into flow and typescript.

2\. Rewrote mutable methods like push/splice as immutable.

... would be sufficient for many needs. I love Immutable, but it does incur a performance penalty for the expressiveness (as far as I know), and works best when starting a new project over integrating into existing (where to/from array becomes more of an issue).

<comment><USER12> Most libraries have flags for an environment variable to skip freezing in "production" mode; any decent minifier will remove the conditions since they can't be reached, so there's no performance penalty.

Tcomb does this, and is far and away one of my favorite JS libraries for all of the other features it provides as a result.

Edit: to be clear, tcomb provides runtime types, algebraic data concepts, pattern matching, validation, and with plugins react form generation and other things. Immutability is a simple consequence of needing to guarantee a valid value stays valid; it's not so much a "feature" per se

</comment></comment><comment><USER13> This looks great. Do you know the exact reason why ie10/11 is not supported?

<comment><AUTHOR> I believe it actually supports IE9+ but the tests are currently failing so they are marked red in the test array. I suspect that they are only failing for the development branch and everything works with IE9+ if you use the latest release.

</comment></comment><comment><USER14> Is there perf gain when comparing 2 immutable obj deeply with === ?

<comment><USER2> A `===` comparison is explicitly _not_ a deep comparison. It's a reference comparison, ie, "are these two variables pointing to the same object in memory?". Under the hood, that probably is interpreted as a simple pointer comparison, which is fast and cheap. That's why it's the preferred approach for doing comparisons in cases like this. _If_ you update your data immutably, then you get the benefit of quick and simple comparisons to see if things are different.

Now, a reference comparison only tells you if the objects themselves are different. It's entirely possible to have two different objects with the same or equivalent contents, such as in @kasbah's example. Both objects have a key named `a` that has a value of 1, but the objects are different references. The overall assumption when you update data immutably and compare like this is that _if_ two objects are different references, then they _probably_ have different contents, and it's time to re-render your UI.

</comment></comment><comment><AUTHOR> seamless-immutable-diff and seamless-immutable-cursor look like neat add ons for this.

[https://github.com/micnews/seamless-immutable- diff](https://github.com/micnews/seamless-immutable-diff)

[https://github.com/MartinSnyder/seamless-immutable- cursor](https://github.com/MartinSnyder/seamless-immutable-cursor)

</comment><comment><USER15> Any good primers on why it's beneficial to use immutables in JS? (especially with server side dev)

<comment><USER16> In general hand-wavy terms, it helps you write side-effect free functions; if you are operating on a data structure defined outside of a function's scope and mutate it directly, you lose reproducibility and your code becomes very difficult to test. By ensuring that the data structures are immutable, you remove one common source of unpredictable behavior. You can be confident that no matter how many times you pass a function a particular state, the resulting state will always be the same. You can do this without immutable data structures by being very careful and knowing exactly which operations mutate and which return new structures (you'll see JS devs using `Object.assign` and `Array.concat` for this purpose), but enforcing immutability with a library takes the burden off the individual developer.

One of the reasons immutable JS data structures have been gaining in popularity the last few years is the adoption of React; the virtual DOM diffing algorithm relies on a few state management methods for knowing which nodes need redrawing and the DOM won't update correctly if you directly mutate the data structures the components are using for their state. As for server- side, I can only assume it's the general trend of JS developers increasingly adopting a more functional style. One of the nice side effects (hah) of using immutables the ability to easily keep a history of state transitions and revert to a previous state if something goes wrong. This can be particularly useful when dealing with distributed systems. It's also much easier to reproduce an undesired state when debugging production issues. It's not a silver bullet but it reduces the number of heisenbugs that turn up in production.

<comment><USER2> To add a bit more context: React itself doesn't care about mutations in terms of re-rendering and virtual DOM diffing. In fact, it doesn't even care about mutations in terms of calling `setState()`. I'll recap a couple previous comments of mine at [https://news.ycombinator.com/item?id=14706862](https://news.ycombinator.com/item?id=14706862).

You can mutate a component's state and then call `setState()`, and React will still update the component as you'd generally expect. For React, immutability primarily relates to implementing `shouldComponentUpdate` using the standard shallow equality comparison approach for the best performance, and general use of Functional Programming principles for avoiding side effects. For Redux, immutability matters for ensuring that reducer functions are pure with no side effects, as that is a requirement for time travel debugging and proper updates of Redux-connected components.

So, overall immutability is definitely an encouraged approach in the React/Redux ecosystem, and there's specific places where that immutability is important for desired behavior.</comment></comment></comment>


Taking it to Th'emacs - <AUTHOR> http://gbracha.blogspot.com/2014/08/taking-it-to-themacs.html

<comment><USER2> There are WebKit integrations in Emacs available [0]. The beauty of emacs is that it's actually programming language kernel that has a text editor built in. You can extend Emacs far beyond text.

[0] [http://www.emacswiki.org/emacs/WebKit](http://www.emacswiki.org/emacs/WebKit)

<comment><USER3> This makes me wonder if it would be a good idea to make an emacs clone with another language, say, Scheme or Lua? Or Haskell?

Edit: ah, it looks like it's been done for Scheme: [http://www.emacswiki.org/emacs/GuileEmacs](http://www.emacswiki.org/emacs/GuileEmacs)

</comment></comment><comment><USER4> _Emacs has built-in scripting language. . . . All of the editor's functionality is exposed via APIs written in the scripting language.

As a consequence, you can control everything emacs does programmatically. This makes emacs extensible in a way that is far deeper and more powerful than a plug-in architecture. A plug-in architecture must anticipate every desired extension to the system. Since it never can, it always disappoints in the end. Along the way it grows ever more complex and bloated in its futile attempt to foresee every possible need. With a language, you can code any extension you need._

Does anyone who has tried to modify both Emacs and an editor (or IDE) with a plug-in architecture agree or disagree with that?

<comment><USER5> Sort of depends on what is meant by a plug-in architecture. I think it's begging the question a bit.

I can compare writing extensions to Firefox and extensions to Emacs and it's pretty much the same experience, if that helps?

<comment><USER4> >depends on what is meant by a plug-in architecture.

I'll give examples.

I love how easy it is to change or customize Emacs. E.g., if I want to change what happens when I right click on some text, I can do so (and _have done_ so) by writing some Emacs Lisp code (and only 27 lines of Emacs Lisp code at that) -- leaving the parts of Emacs written in C completely untouched.

In other words, in Emacs (and IIUC Light Table), with very few exceptions, _all_ of the editor's functionality is exposed via "APIs" (and in Emacs, it would be accurate to replace "APIs" with "variables and functions" since Emacs does not have classes and such) written in a high-level scripting language (Emacs Lisp or ClojureScript).

The same cannot be said of Textmate, Sublime Text or Lime Text. What one can say of those three, though, is that they all have a plug-in architecture.

So, my question, again, is whether the OP is correct in his assertion that -- at least for people who are in the habit of frequently changing many different aspects of their editor -- having a plug-in architecture is no substitute for having virtually all of the editor's functionality exposed via "APIs" written in a high-level language.

<comment><USER6> Interestingly, once you enable the developer tools, Komodo is very similar to what you're describing. Pretty much everything is exposed as an API to the JavaScript environment, you can change stuff on the fly and the like. It also has a Python API for certain features. I think that's a consequence of being based on XUL, a web browser is similar to emacs in terms of runtime extensibility, though not 100% of the way there.

</comment></comment></comment></comment><comment><USER7> Really seems that you can take emacs back to the core by just looking at the origin of the name. Editor MACroS. Says it all right there, it isn't just a text editor.

Indeed, the text editor portion is almost incidental. Emacs is a set of programs that all operate with the text editor as the common environment.

This works remarkably well with things that communicate through text. Which is, not unsurprisingly, a lot. Doesn't work as well for purely visual things. Especially not those that are lacking a text representation.

<comment><USER8> Emacs can display and edit vector graphics. I wrote a dedicated vector image editor a while back ("Minara") in which the application, tools, and images were all just Scheme code (using Guile).

I'm now wondering about representing and manipulating bitmap images in a similar way to Emacs' vector handling. I think it could be fun and I don't see any practical impediments. Just represent the image as a PPM-style text while it's in Emacs then write it out as binary afterwards.

<comment><USER7> Oh, certainly. And you'll never get a lack of my preaching the gospel that is org-mode. The inline latex/ditaa/graphviz/whatever manipulation is truly first rate and borderline mind blowing.

The problem, I think, is when people refuse to think of the textual representation as a reflection of the graphical one. Worse, we constantly dream of many textual representations of the same visual thing. Consider the constant wishing there was an AST based code editor, and then all of us that point out how paredit is that editor.

More to the point, the more complicated your AST or other language, the more difficult it can be to have meaningful semantics that are intuitive. What does it mean to type into a graphics image? Go down? Etc?

</comment></comment></comment><comment> one-more-minute Check out Light Table. It has a really interesting architecture specifically designed to support that kind of interactive scriptability / extensibility, and the fact that it's written in a decent Lisp (Clojure) is the icing on the cake. It's a joy to work with, because even when the internal code has problems you can just patch it on the fly.

</comment><comment><USER9> _Emacs is my preferred text editor. I don't use old-fashioned text editors as much as I used to, because I often need more specialized tools. I use IDEs for various programming languages and other things when producing high quality documents. And yet, I often wish I could subsume these with a tool that had the basic goodness of emacs._

I love the ease of customization of Emacs and other text editors, but they're just plain dumb when it comes to knowing programming languages.

<comment><USER7> Me thinks you haven't used emacs as much as "other text editors." There are very few features that people "wish" emacs had, that it doesn't actually have.

Specifically, language recognition is not just regexes in emacs.

<comment><USER10> Perhaps this is not the right forum but does anyone know of a good emacs mode for jump-to-definition in Python? I've used ctags and jedi but haven't been able to configure anything as awesome as the Python plugin for IntelliJ (same as PyCharm). To implement it, it would require a combination of static analysis and on-the-fly interpretation, given Python's duck typing. If emacs had this, I would use emacs all the time.

<comment><USER11> I use jedi.el along with virtualenv-wrapper which does jump to definition perfectly fine ime. But keep an eye for open sourcegraph's mode[0], they are going incorporate python soon AFAIU.

[0]: [https://srclib.org/plugins/emacs/](https://srclib.org/plugins/emacs/)

<comment><USER12> One of the authors of srclib here. Python has been incorporated (and should be installed if you update srclib and run the toolchain install script). The website hasn't been updated to reflect this, however. Let us know if you run into any issues!</comment></comment></comment></comment></comment>


Stunning Videos of Evolution in Action - <AUTHOR> http://www.theatlantic.com/science/archive/2016/09/stunning-videos-of-evolution-in-action/499136/?single_page=true <comment><USER2> A similar worthy project I'd like to mention is the E. coli LTEE, or Long Term Evolution Experiment. By freezing samples of every generation, they can go back and genetically sequence ancestors (or near-ancestors) to determine what succession of random mutations eventually resulted in an obvious phenotypic trait.

[0] [https://en.wikipedia.org/wiki/E._coli_long- term_evolution_ex...](https://en.wikipedia.org/wiki/E._coli_long- term_evolution_experiment)

<comment><USER3> If only they were able to capture the process in a stunning time-lapse video :)</comment></comment>


China reverses 25-year ban on trade and use of rhino horns and tiger bones - <AUTHOR> https://www.scmp.com/news/china/society/article/2170763/china-reverses-25-year-ban-trade-and-use-rhino-horns-and-tiger <comment><USER2> Licensing opens the door for bribery. And, it means simple possession isn't proof of a crime, because there might be a license somewhere.

Corruption at its purest. Americans still sort of pretend, but only to cover for the most thorough-going corruption the world has ever seen.

</comment><comment><USER3> I am sure rich Chinese, who were the only ones that could afford this kind of "medicine" before it was banned, or those who cater to then, will have no trouble getting licenses

</comment><comment><USER4> This smells like an "art of the deal" maneuver. It feels more about political than status quo, or even old medicine.</comment>


Show HN: Resume Reviewers - Get Your Resume Reviewed by Real People for Free - <AUTHOR> http://resumereviewers.com <comment><USER2> If you want me to trust you with my resume then please at least add ssl and a privacy policy to your site.

<comment><AUTHOR> I am working on adding both of those things.

</comment></comment><comment><USER3> How will they make money? Referrals to recruiters?

<comment><AUTHOR> I haven't gotten that far yet, nor am I worried about it. It's not really expensive to run a service like this, plus it seems that people could use it. I have a few ideas though, such as ads, oe charging for editing etc.</comment></comment>


Ask HN: Evolving from freelancing gigs to a consulting company? - <AUTHOR> 	I feel like i am stuck in a loop, I see a lot of folks struck in this as well, I started a freelancing account on upwork/freelancer/similar site, a year or two later, I have an established profile, I want to build a company instead of getting gigs as an individual (because of the securtiy net / the prospect of getting paid even when i can't work etc). But the gigs I have as yet, don't convert as they insist I be the one to write the code instead of someone I hire. Any advice on people who have been through this problem? how should i address it? <comment><USER2> I spent a decade both as a "gig" consultant and as a "real" consultant. Here are the differences I saw between the two.

"Gig" consulting - You are a skillset for hire or the client is simply short on ppl to do the work. You are selling labor. While you have skillsets, the client needs you for a very specific project/product and they manage you in context of that project. You are two hands on a keyboard with bonus points if you have a brain.

"Real" consulting - You come in with a "solution" which the client needs or think they need. You are selling knowledge. They don't even know how to begin and you are the brains of the operation. You are hired less on your skillset and more for the IP you bring with you. The IP may be a process for how to get from A to B or training materials along with work sessions with a team etc. Yes, development may be part of the engagement but it's not what's actually being bought nor is it what you sell.

To be able to hire ppl who do the work, it's very important to disconnect the "who" is doing the work from the product itself. If you are selling a skillset, the "who" performs the work quickly becomes a sticking point. If you are selling a final product, an outcome...the who is less relevant.

While many "real" consultants bill hourly, many of the bigger consulting companies sell "projects" and then make money on the margin. You can charge more for knowledge than labor because knowledge is harder to valuate in $ than an hour of labor is.

I.e. a friend of mine would sell white papers on particular topics within his expertise customized to the clients use cases. So, $200 hourly for coming in, meeting everyone, taking notes on needs, use case, meeting with CxO levels on concerns and goals etc. Spend 5 hours updating a pre-made template with most of the boiler plate info plus client specific stuff and charge 20K + hourly billing for the finished paper of maybe 20 pages. Usually these would support whatever agenda some CxO at the company wanted to push and needed "industry expertise", "best practices" and "market research" to back it up.

Selling a product vs your billable time makes consulting scale better in terms of revenues.

</comment><comment><USER3> How about charging more for your service so it's more worth your time to write the code?

Also, I can recommend reading this blog post series on consulting for general advice:

[https://kirubakaran.com/blog/consulting- outline/](https://kirubakaran.com/blog/consulting-outline/)

As for creating a contracting agency, it becomes about sales and marketing. You can market yourself as a premium dev shop if you find other senior programmers to work with you. You have to get good at reaching out to companies and offering them your services. Upwork isn't a good place for that imo, but you could think of Upwork as just another channel for your sales funnel.

</comment><comment><USER4> _I started a freelancing account on upwork /freelancer/similar site, a year or two later, I have an established profile, I want to build a company instead of getting gigs as an individual_

Generally speaking, your freelance profile through an online service is going to only get you more gig work through that service. Their contract typically stipulates that outright. If you want to transition away from that, you will need to set up your own website elsewhere and figure out how to get consulting work through a different pipeline. You probably need a website and a portfolio of some sort, plus a payment mechanism, description of services and means to start promoting yourself.

All of these other things are additional business skills you will need on top of whatever central skill (like programming) that you are actually selling. If you can figure them out, great. If you can't, you might have newfound appreciation for why the service has value.

I am doing this as a writer, not a coder. Having my gig work via a service is my bread-and-butter and security to fall back on while I develop more lucrative stuff that I enjoy more, like polishing resumes.

</comment><comment><USER5> You're going to find that your abilities don't scale - the people who do what you do as well as you need them to to be able to provide good service cost too much for you to effectively arbitrage their labor.

<comment><USER6> That is patently untrue. Otherwise, agencies wouldn't exist.

<comment><USER7> In my experience and close friends, the agencies hire consultants to do the difficult work, and are not good at managing that more difficult work.

</comment></comment></comment><comment><USER8> Keep doing what you're doing and get case studies and testimonials from your clients to prove that you solved their problems. As others have said, clients want their problem solved, not someone to do xyz. Prove that you can solve problems and progressively apply for bigger gigs until you're in a position where you need to put someone on to help you complete the project. If you do great work and progressively take on bigger challenges then eventually an agency will fall into place.

</comment><comment><USER9> Stop using freelance sites. They aren't worth it.

<comment><USER7> What about for people who have no contacts and can't find clients?

<comment><USER9> If you can't find clients without a freelance site, that's the skill you need to develop first. And if you have no contacts, you haven't been working in the industry long enough, IMO.

</comment></comment></comment><comment><USER10> First, let me disclaim IANAL.

Depending on the wording in your SoW/contract (You _DO_ have a written contract, right??) you may not have to disclose that someone else working for you are doing the customer work.

It may also depend on the structure of your business. I'd talk to a lawyer about it. I am in the same boat as you, and I formed as an LLC, so I've been working on getting other work that I can sub out.

<comment><USER11> A contract will not necessarily inoculate you against a charge of fraud.

It's legally dicey to represent that you personally will be performing work and then sub-contract to another person. Usually the client won't care. But if things go sideways (especially on a big contract with a lot of money at stake) you are opening yourself to a large amount of legal risk.

Always be upfront and honest. And always negotiate in good faith. The best legal strategy is to never engage in behavior that will require a lawyer to defend.

<comment><USER10> Going back, rereading what OP said. It wholly depends on the nature of the contract. (Which we don't have here.)

Please don't attribute anything untoward to me. Reputation is _EVERYTHING_ in this industry. I would _NOT_ suggest someone do something fraudulent, ever.

When you hire $PLUMBING_COMPANY to come fix a leak at your house, you don't care _WHO_ does the work. You want your problem FIXED. YESTERDAY.

So... is it fraud if they send someone who is less experienced than the owner if it's his name over the door, if your problem still gets resolved? No, not at all.

So not knowing OP's details of the contract with $CUSTOMER, you can't assume either way.

<comment><USER11> Fair points. I was being a bit hypercritical. It all depends on what you negotiate up-front.

</comment></comment></comment></comment><comment><USER12> It sounds like you need to 'productize' what you were doing before. You didn't say what you were doing but I will assume 'developing'. There have been quite a few threads on this, but you could perhaps look to capture your knowledge in a training course or e-book. Have a look at IndieHackers for more ideas.

</comment><comment><USER11> An agency is a middle-man that primarily adds value via management. It abstracts away to costs and headaches of managing a project. As with any successful middle-man your agency will need to position itself in a nexus of supply and demand.

First, you need the demand. Ideally where the demand for your type of services is above your current capacity to deliver. As in you're literally declining well-paying work with reputable clients because you simply don't have the time to build all the projects yourself.

Second, you need a supply of talent. A network of other developers who are dependable who you can call up on demand or hire outright.

If you lack either of these the agency is going to have a rough time, and probably going to fail.

Third, as an agency you will make money on the margins. Revenue will flow through your business and you will capture some percentage of it. This is very different from consulting where you capture almost 100% of the revenue, less some minor expenses.

The reason for this is simple: labor.

Let's say your rate is $100/hr. Since you're a consultant operating in a global free market that $100/hr is competitive within the market, and is mostly inelastic - there's not much room to go up or down. Another developer with your same skill level is going to cost $100/hr.

So where's you're margin? You can find margin by hiring a less-skilled developer at $75/hr. But then the quality suffers (and so can your reputation, reducing demand). Or you can attach a $25/hr "agency fee" to every hour worked. Or you can find a sucker who doesn't know the true value of his labor, and underpay and overwork him. (This last option is how most agencies operate).

Instead of making $100/hr consulting you're making $25/hr for each hour your sub-contracted developers work. This can work out nicely if you have a high level of demand, and if your developers are responsible self-starters who don't require a lot of management work on your part. But you would need some multiple of your current workload to earn the same amount of money.

My advice is to _not_ fold your current consulting into an agency. Instead, start an agency as a side-project, incorporated as a completely separate business. An agency needs to be marketed very differently than an individual consultant. Find other developers and marketing people you can partner with, agree on a compensation structure, and see if the company can land some big contracts. You can even sub-contract the project work to yourself individually at your normal labor rate.

It will be difficult to find partners who are comfortable with this. It's very difficult to work on a margin basis when your partner is working on a labor basis. But if you can earn $100/hr on the open market why would you work for your own company for less? This is one reason why many consultants end up making less money when they start an agency - they undervalue their labor because it's their company.

<comment><USER10> Have you set up an agency before, Lee? Just curious what your experience was, if so.</comment></comment>


A Modern Space Cadet - <AUTHOR> http://stevelosh.com/blog/2012/10/a-modern-space-cadet/ <comment><USER2> I'm hoping the split spacebar that Microsoft introduced[1] starts catching on with mechanical keyboard makers. The left side of the spacebar currently wastes valuable real estate. Putting another backspace key would move the most typed key into easy reach instead of forcing the right pinky to leap on every error.

On the topic of keyboard ergonomics, I also believe that all keyboards should be tenkeyless. It's another case of prioritizing an infrequent action (typing on the numpad) over a frequent action (moving the right hand to the mouse). Users who need a numpad can always get a standalone usb unit.

[1] [http://reviews.cnet.com/keyboards/microsoft-sculpt- comfort-k...](http://reviews.cnet.com/keyboards/microsoft-sculpt-comfort- keyboard/4505-3134_7-35454626.html)

<comment><USER3> Definitely. I'd just be happy if you could get a mechanical keyboard that uses the layout that MS uses for its ergonomic keyboards, with the split keys and the height gently swelling in the center where the split is. (Look at the Natural Keyboard 4000 to see what I'm talking about: [http://www.microsoft.com/hardware/en-us/p/natural- ergonomic-...](http://www.microsoft.com/hardware/en-us/p/natural-ergonomic- keyboard-4000))

Once you get used to typing on a keyboard that uses this layout, going back to a standard flat and un-split layout feels slow and painful. I love mechanical switches, but not enough to give up the much better layout of the Natural keyboards to get them.

<comment><USER4> The action on the Natural 4000 is so stiff that I know several people who experienced severe bouts of RSI within hours to days of getting one.

Check out Kinesis: great layout, and great switches. One or the other just isn't enough for many.

<comment><USER5> The Natural 4000 is a bit hit or miss. I've had 3; two were excellent, but one is merely acceptable. The action of the keys isn't as smooth, and the space bar initially required a slightly firmer press. The space bar seems to have loosened up over time, though, and I got used to the key feel quicker than I was expecting - but typos ARE much more frequent on that keyboard.

The inconsistency is a shame, because as a keyboard I really rate it. Good shape, comfy palm rests, standard layout, unintrusive media keys, and the stupid (but seemingly inevitable) F-Lock feature starts out disabled.

The action is not quite as nice as the previous Natural Pro model, but it's a lot quieter...

</comment></comment></comment></comment><comment><USER6> I spend an abnormal amount of time research keyboards and never understood the US HHKB layout because of the diamond arrow keys. A better alternative in my opinion is the KBC Poker: [http://deskthority.net/news-reviews-f4/kbc-poker- sixty-s-tak...](http://deskthority.net/news-reviews-f4/kbc-poker-sixty-s- take-t125.html)

I'd say a far better layout than HHKB is the KBC Poker.

By holding the Fn key, it changes WASD into the arrow keys; a much more familiar layout to anyone who has ever played a game on a computer. There's also a hotkey to switch right shift, right alt, right menu, and right ctrl into up/left/down/right respectively. This again, I think makes perfect sense for the few situations you might want to be able to single press arrow keys. It also supports this sort of toggle for switching escape and tilde, which is very friendly for anyone who hits escape more often than tilde (probably almost everyone.) It also has things like volume control media keys via the Fn key that I don't believe any HHKB has.

Direct link to its layout: <http://i.imgur.com/lGsld.gif> Direct link to its layout w/ FN pressed: <http://i.imgur.com/3fvcV.gif>

</comment><comment><USER7> I have the happy hacking keyboard professional 2. It's fantastic. The reason the [fn] key is positioned off, and it's hard to get at the arrow keys, is because the HHKB was specifically designed to make it hard to use the arrow keys, as they are a curse. (stay on Home Row). There are alternatives, hjkl for vim and or CONTROL-... for emacs dudes and dudettes.

<comment><USER8> Yup, the HHKB is a sparkling gem in a landscape littered with garbage.

And for those of you without lots of money, the low-priced HHKB-lite models are also very nice (they have the same great layout and design, but more pedestrian components).

[I have two HHKB-lites, one from the '90s, another bought a few years ago (the former still working flawlessly).

In the landscape of computing, where most things seem obsolete overnight, it's also rather amazing that the HHKB has managed to stay in production for so _long_ ... although it's clearly a bit of a niche product, it's been around in mostly the same form factor since the mid-90s! They're clearly doing _something_ right!]

</comment></comment><comment><USER9> There's at least one shortcut that uses control, option, shift, and command, ⌃⌥⇧⌘., which saves a sysdiagnose report to /var/tmp/.

The reason why key combinations like ⌥← don't work with Unicode Hex Input is probably because they aren't assigned to control characters. I got ⌥← to work after adding this to keymap 3 in the Unicode Hex Input.keylayout that comes with Ukelele:

        <key code="123" output=""/>

You could also use DefaultKeyBinding.dict for inserting Greek characters, but it wouldn't work in Xcode or shell views. (See [http://www.hcs.harvard.edu/~jrus/site/KeyBindings/Greek%20Bi...](http://www.hcs.harvard.edu/~jrus/site/KeyBindings/Greek%20Bindings.dict)) Another option would be to add keymaps to a keylayout file:

        <keyMapSelect mapIndex="8">
            <modifier keys="caps"/>
        </keyMapSelect>
        <keyMapSelect mapIndex="9">
            <modifier keys="caps anyShift"/>
        </keyMapSelect>

        ...

        <keyMap index="8">
            <key code="0" output="α"/>
            <key code="1" output="σ"/>

To assign another key to a holdable caps lock, check "Pass-Through CapsLock LED status" and add something like this to private.xml:

        <autogen>
        --KeyToKey--
        KeyCode::N,
        Option::KEYTOKEY_BEFORE_KEYDOWN,
        KeyCode::CAPSLOCK,
        Option::KEYTOKEY_AFTER_KEYUP,
        KeyCode::CAPSLOCK
        </autogen>

I thought something like this might also work:

        <autogen>
        --KeyToKey--
        KeyCode::A,
        ModifierFlag::OPTION_R,
        KeyCode::A,
        Option::KEYTOKEY_BEFORE_KEYDOWN,
        KeyCode::VK_CHANGE_INPUTMODE_RUSSIAN,
        KeyCode::VK_WAIT_10MS,
        Option::KEYTOKEY_AFTER_KEYUP,
        KeyCode::VK_WAIT_10MS,
        KeyCode::VK_CHANGE_INPUTMODE_FINNISH
        </autogen>

Unicode Hex Input or Greek is not included in inputsourcedef.xml though.

</comment><comment><USER10> I'm almost ashamed of how excited I was while reading this. Default layouts of keyboards are incredibly ineffective for programming, and I find customization of layouts to be very important.

The best thing I ever did was adopting something I found on some dvorak layouts; using AltGr to make any special symbols. Now, AltGr+qwerasdfzxcv makes ()[]^${};/&! for me, which covers 90% of the special characters I write. Not leaving the alphabetical keys for any of these does wonders; It's the little things, really.

I'll also try to implement the shift-key training through xmodmap. I'll post the results if I manage!

<comment><USER11> I ask xmodmap to make a compose key, which is probably something close to what you're talking about.

You can also ask Emacs to switch to tex-mode typesetting with C-u C-\

Then, you can type λ with \lambda , and other common TeX symbols.

</comment></comment><comment><USER12> My favorite keyboard is, hands down, the Microsoft Natural.

However, I'm often tempted to try a 122 key IBM:

<http://pckeyboard.com/page/PC122/UB40B5A>

Is anyone here using a 122-key?

Another one that tempts me is the Sun Type 7 (the 6 is USB too, but is too 90's):

[http://www.oracle.com/us/products/servers-storage/desktop- wo...](http://www.oracle.com/us/products/servers-storage/desktop- workstations/030752.htm)

<comment><USER13> I just wish Microsoft (or anyone, really) made mechanical keyboard with Natural layout.

That would be The Greatest Keyboard Ever Made.

<comment><USER14> what about the kinesis advantage? <http://www.kinesis-ergo.com/advantage.htm>

</comment></comment></comment><comment><USER15> I'm not sure I would like the caps lock doing double duty as both control and escape, since it seems like it would be easy to accidentally use it wrong. I always remap the caps lock to control, but long ago I trained myself to use control-] in place of escape so I never have to reach for that dreaded key when using vi, and I can also use emacs happily.

<comment><USER16> Probably everybody reading Steve's post had a "eureka" moment on different sections. For me, it was the dual-duty caps lock key idea. I've always used "ii" remapped to ESC in vim insert mode--that changes today.

<comment><USER11> How did you type Hawaii or Radii or Naziism before?

</comment></comment></comment><comment><USER17> It is a shame most of the really good keyboards require so much power that it precludes Bluetooth or mobile usage. I'd love to have a HHKB if it worked wirelessly with both my laptop and tablet.

[http://beastwith.in/2012/05/17/usiung-power-hungry- tactile-k...](http://beastwith.in/2012/05/17/usiung-power-hungry-tactile- keyboard-ipad/)

<comment><USER8> I wouldn't be surprised to see bluetooth/battery-capable versions of some of these in the future. It would seem the next logical product upgrade.

</comment></comment><comment><USER18> Oddly enough the ctrl key in the home row is a Unix thing (I think it's a Sun invention, but I don't recall). On the original space cadet keyboard (and all the Symbolics keyboards), Rub Out is located where modern day Caps Lock is found (see: <http://en.wikipedia.org/wiki/Space-cadet_keyboard>). Ctrl is still located on the bottom row.

Has anyone tried remapping a delete key to where the Caps Lock key is found? Is there anyone with a real space cadet keyboard or symbolics keyboard that can comment on using it with vim or emacs?

<comment><USER19> CTRL next to A was, I believe, its original location. That's where it was on the Teletype Model 33, which dates back to 1963, and I'm not aware of an earlier keyboard that had a CTRL key.

In the 1970s, most terminals continued with this placement. I believe the modern practice of putting Caps Lock there came in with the first IBM PC -- copied, of course, from their typewriter keyboards.

Being a longtime Lisp Machine user, I had that key mapped to Backspace on my Unix workstations into the late 1990s, but I couldn't do that remapping on my PowerBook, so I gave up -- it was too confusing to have Backspace in different places on different machines. (I think the remapping is actually possible with OS X, but I've never bothered. It's certainly possible with Linux.)

<comment><USER18> I didn't know that about the ASR-33 (haven't actually seen one), all my experience has been with unix and PC keyboards (plus some WYSE terminals).

I agree with it being confusing to have the same key jump around while you type, which is why I gave up re-mapping altogether (at my last job I was using 5 different systems that each would have required a remap, and I wasn't able to remap on each system). To much dissonance when trying to figure out why a key is not doing what you think it should be doing.

</comment></comment></comment><comment><USER20> I really wish I could take part in all this keyboard fun. Unfortunately, there's a 20 degree upward curve in the middle of my right forearm (due to an old injury). This limits my options to the Kinesis Freestyle [1] and maybe the Goldtouch. The Freestyle is okay, but I miss the switches of more substantial keyboards.

Can anyone recommend a more hacker-friendly split-in-two keyboard along the lines of those discussed in the article?

[1] <http://www.kinesis-ergo.com/freestyle.htm>

</comment><comment><USER21> This is an excellent compilation of info and tricks and I look forward to using some of it myself on the software side.

On the hardware side, I don't think I've ever seen anything surpassing <http://mykeyboard.co.uk/microswitch/> in sheer dedication to the goal of a truly efficient and comfortable/safe keyboard. I wish I had the space, money and time to attempt something similar (also not a laptop as a primary machine, but that's another matter entirely)

</comment><comment><USER22> The Japanese layout version of the HHKB looks really nice: <http://www.pfu.co.jp/hhkeyboard/lineup/pdkb420w.html> Not sure where you can buy one though.

Edit: Looking at it again, some of the programming related symbol keys are in slightly strange positions and would require some relearning. Plus the right shift is tiny.

</comment><comment><USER23> Does anyone know how to setup a keyboard to pass absolutely all keys to a VM?

I like OSX for power management and driver compatability, but I sorely miss having a tiling window manager. I would like total pass through of keystrokes to a VM. Dropping out of the VM could be accomplished by running a program on the host machine via ssh from the VM.

</comment><comment><USER24> Inspired by the space cadet: <http://people.xiph.org/~greg/xmodmap.txt>

Capslock is left control; left control is greek (gets the two sets of alternative characters listed in the file). task button is compose.

</comment><comment><USER25> Great post. Consider the following changes to the Greek mapping to be consistent with Greek keyboards and the "greek" input mode in Emacs:

        q Q: ; :
        w W: ς Σ
        y Y: υ Υ
        u U: θ Θ
        j J: ξ Ξ
        x X: χ Χ
        c C: ψ Ψ
        v V: ω Ω

</comment><comment><USER26> Have anyone implemented any of this on Windows, perhaps with Autohotkey? Is it possible?

<comment><USER5> Yes, you can do it with AutoHotKey. I tried it a few years ago but didn't really get on with it. I think it might have caused problems with some keyboard shortcuts I use - a lot of my emacs shortcuts are designed for activation with one hand pressing modifier keys and the letter key.

Anyway, just use the < and > modifiers to indicate left or right Shift specifically. For example, assuming QWERTY:

       <+q::Send q
       >+p::Send p

<comment><USER27> but wait, this doesn't get at having shift behave normally unless it is the _only_ key that gets pressed. Does it?

<comment><USER5> No, sorry - the bit from the article that was in my mind as I replied was forcing one to use the opposite Shift, because I'd tried that myself. I didn't think about the use of Shift as a key on its own (I really wouldn't get on with that myself as I tap the meta keys a lot while I'm thinking).

</comment></comment></comment></comment><comment><USER28> I'm still rocking my 1990 IBM Model-M. These things are truly indestructible.

<comment><USER29> I wore one out a year ago. It was going through an AT to PS/2 adapter then a PS/2 to USB adapter. The "S" key started only working on about 9/10 keystrokes :(

<comment><USER28> It may not be worth the effort, but you can still get replacement parts for them. Or just go with a new Unicomp.

</comment></comment></comment><comment><USER30> Thanks, I love the shift-key training wheels idea. It caught me starting both of these sentences with the wrong shift key.

</comment><comment><USER31> I love the shift click to get brackets trick, any idea on how to get it on vim?

<comment><USER32> You mean pressing shift to get parens? I doubt it's possible withing Vim. Certainly not within a terminal Vim (the terminal emulator almost certainly wouldn't pass a bare shift through to Vim at all). I'm pretty sure you have to do it at the OS level like this.

<comment><USER31> Uhm, ok perfect, thanks i'll investigate!

<comment><USER14> could you please post your findings?

</comment></comment></comment></comment><comment><USER33> Anyone have a simple way to achieve the Caps-lock training wheels in linux?

<comment><USER33> I believe this stackoverflow question, asked today, would give us the answer: <http://stackoverflow.com/questions/12704366></comment></comment>


Chicago's 'cloud tax' makes Netflix and other streaming services more expensive - <AUTHOR> https://www.theverge.com/2015/7/1/8876817/chicago-cloud-tax-online-streaming-sales-netflix-spotify

<comment><USER2> I get that the city needs more tax revenue, I have no problem with that. Raise sales tax or add a city income tax or some of the other ways cities increase their tax revenue. Doing it this way is just making it more annoying for companies to provide services to your residents. Don't make it easier for a company to not do business with your residents than to deal with your weird tax codes.

</comment><comment><USER3> I'm really confused about this. Is the tax decided on the billing address of the subscriber, the location of the streaming endpoint, or the current location of the client?

Suppose my account is registered in Chicago, but I'm spending the summer in Cleveland; why do I have to pay the tax?</comment>


The Untold History of Toontown's SpeedChat (2007) - <AUTHOR> http://habitatchronicles.com/2007/03/the-untold-history-of-toontowns-speedchat-or-blockchattm-from-disney-finally-arrives/ <comment><USER2> My son tells me that with SpeedChat Plus in Toontown, transmitting friend codes is much easier because only certain words are filtered out. If you want to transmit numbers, you can enclose homonyms in parentheses "(too").</comment>


The Lively Kernel - <AUTHOR> http://research.sun.com/minds/2007-1107/

<comment><USER2> What doesn't Sun get? this is a hacker's hack; an Smalltalk implementation in javascript:

<http://research.sun.com/projects/lively/index.xhtml>

Read what the man wrote:

"Everything you need is in the browser. There is a dynamic language there. It may not be your favorite, but it's not a bad one either. There is also a graphics system. Not the best, but pretty nice. Hook it all up with a simple user interface and you're having fun the way people should have fun with computing. I don't mean just fun for entertainment, but it's creatively inspiring. It makes you want to do cool stuff,"

Ingalls, for the uninitiated, pioneered the implementation of high-performance Smalltalk systems, including his contribution to Squeak. Wikipedia credits him for inventing the BitBlt algorithm that made bitmapped displays FAST, and invented popup menus.

If anybody is qualified to say what is a fun, intuitive programming environment it's Dan Ingalls.</comment>


I'm 29 with a useless degree, in debt, want to change career, and completely lost - <AUTHOR> https://www.quora.com/I-am-29-have-a-useless-degree-in-debt-want-to-change-career-and-completely-lost-How-can-I-manage-to-pursue-a-new-and-great-life?share=1 <comment><USER2> do what you love and money will follow ?</comment>