skysight-inc/HackerNews huggingface dataset:
I'm slowly trying to switch from Vim to Light Table. There are a couple of bugs in Vim emulation plugin that I think need to be solved before it becomes useful enough to me. E.g. issues with *-search.¹ But I'm optimistic those will get fixed fairly soon.

> missed my Sublime plugins and shortcuts too much

I'm not a Sublime user, but have you tried configuring Sublime-style keymap? Light Table uses CodeMirror, so first you may want to play with CodeMirror Sublime bindings demo.² If it's good enough for you, then it should be relatively easy to adapt Light Table.

1. https://github.com/LightTable/Vim/issues/13

2. http://codemirror.net/demo/sublime.html
Circuit Scribe kits & Kano.me could be good starting points.
Not all "first-party" but Vim has a very very rich set of search and file management features:

http://benmccormick.org/2014/11/10/vim-workflows-file-switch...
Ask HN: Your favorite hacks using household items?
Recently I read that you can measure for your condom size using an empty cardboard toilet paper roll.

http://luckybloke.com/pages/find-your-condom-size

As a former condom hater, it actually worked for me. It made me wonder what other clever hacks I'm missing out on. Ideas?
I'm a bit sad that Undum [0] didn't receive attention [1] that Twine did. I think it's more (arguably the most, to date) modern and user-friendly take on interactive fiction, which should have long since moved to the web, like these two platforms show us.

[0] http://undum.com/

[1] Here are all three interactive pieces made with Undum:

* The Play, A dress rehearsal gone horribly wrong, by Deirdra Kiai http://squinky.me/theplay/

* Almost Goodbye, by Aaron A. Reed http://almostgoodbye.textories.com/

* The Matter of the Monster, by Andrew Plotkin http://eblong.com/zarf/zweb/matter/
Thanks. I still find it fascinating people do good work without fully understanding an area. It's as if you're not supposed to. I wonder if this could be used as a guiding principle in making things.

If what you are working on originally looks understandable, you should be alarmed.
Hm... not sure if I agree (if I understand this correctly).

If in the inner loop, the same method is called (of the same class), this means that the target of the indirect function call is always the same, and I assume that the CPU can predict that. If not, the compiler can hoist the lookup out of the loop. In certain languages, e.g. in Objective C (where lookups are dynamic, and much more expensive than vtable approach), it's a common programming pattern to manually hoist the lookup out of the loop, get the method descriptor (i.e. the jump target) and call the descriptor in the loop, without going through the lookup again.

If the inner loop loops over objects of different class (i.e. you're looping over an array of objects, each can be a different sub-class, and you're calling a virtual method), I don't think there is any way to improve vtable based approach.
It's in there, though I don't know why it's the last entry.
Vim is what we used in school in my first programming class.

While I understand the appeal of IDEs, I hate autocomplete as I feel like it gets in the way more than it helps. I type faster than most people I know though so that is probably why I don't really appreciate the autocomplete. I really really hate having to constantly use the mouse.

Finally, I am fairly new to working but I really feel like using vim and the command line usually makes it so that you have a better understanding of what's happening. I don't think this is a problem inherent to IDEs but more that because they do so much for you, it's much easier to just get things done without actually having to understand what it's doing. I've had many teammates who could tell me how they got something working in terms of the steps they took in their IDE but could not tell me what those steps actually translated to doing (e.g. I went to this menu and did this as opposed to I had to add a dependency to so and so)
If we take this article at face-value (that Google is as big as it is because of its monopoly in search) a related question is immediately raised: why is Google's search engine a monopoly?

If the monopoly is due to superior technology, why are Google able to write a better search engine and maintain this search engine lead?

If the monopoly is due to other effects (buying favored search-engine status in Safari, Firefox and pushing Chrome/Android) why don't the browsers have all the power?

I guess I agree with the article that Google's power is search-engine derived but there's more to the source of that monopoly than I think the article discusses.
I just did a similar thing that the linked tutorial uses for controlling lights. I use an arduino+RF emitter to control store bought RF controlled mechanical relays (3 for $20) and an rpi to host a server (used as ios mobile bookmark) that talks to the arduino. It's a pretty easy setup and the RF emitter with an antenna gets through walls. But I'm not sure it'd scale to a whole house, and much less reliably.

You can also build your own wifi controlled outlets using sparkcores like in this tutorial[1]. That author addressed your question about powering the modules that control the switches by "stripping apart an old USB power adapter, and soldering up AC wire from the power cable as well as an additional two wires to the back of where the USB port was soldered to the board on the +/- power pins."

Googling around you can find other sites like [2] for building your own controllers. But to be honest if you're looking for a whole home solution that's reliable and safe it's probably best to use some pre-bought kit for that purpose like Insteon - but I could defintely be wrong. Good luck!

[1] https://www.hackster.io/daniel0524/building-a-wifi-outlet
[2] http://www.openhomeautomation.net/
Why rust is better? for example, it has generics, which more abstract and offering greater reuse while still being efficient.

As for the dream of dropping fixed systems, you can already buy a cheap fast mcu from xmos with 4 cores which you can use 3 to create extra peripherals.Or another cheap CPU with a small fpga. But of course if you're fighting for pennies of cost or power, there might be better fixed alternatives than those 2.

BTW the reason we don't have FPGA on chips is probably mostly commercial - charging by the peripheral offer chip companies ways to more revenues and more differentiation between each other. They really don't want to sell the same commodity chips of mcu+fpga.
Ask HN: How come nothing ever works out?
Note: I'm partially venting, burnt out and not sure what to do next. Would love to hear from those who have been through this.

Background: I a software engineer. I started doing Rails/Javascript consulting. Hired part-time consultants to take on all of my dev work. That way, I make some money off them coding, and I could focus on building products.

My question:

* What am I doing wrong? I feel like I'm learning, and doing lots of hustle! Yet, I never hit an idea that works!

What I've done:

* A startup where I got $50k in government funding (ya Canada!) hired employees. Nobody cared about the product and it folded. Major learning experience (genuinely sorry Canadian tax payers!)
* Wrote an ebook people have found really helpful. Net $5000 for 80 hours of work.
* Did customer development on 3 different target markets (Loan officers, Public Relations agencies, Construction/Renovation teams, people suffering from Chronic fatigue syndrome). Did around 100+ 30 minute customer development interviews.
* Lots of cold calling and networking for my consultancy and the pipeline is never full. Making it really stressful.
* Built my consultancy from nothing to hitting $250k in revenue this fiscal year. That's four years with only subcontractors.
* Multiple landing pages tested, sent traffic to them.

Why it sucks:

* None of my ideas ever gain paying customers. I've really tried to follow The Foundation and 30x500 principles and so only offered concierge MVPs.
* I have a few friends who have built products and make $400k+ per year selling them. I feel like I have tried really hard and also haven't made it. Comparing sucks

Halp!
Algebra is the study of sets and their operations.

"High school algebra" is usually limited to the study of real numbers and the operations of addition and multiplication.

In upper division undergraduate mathematics, you learn about other kind of algebras. For example, there is the set of regular polygons with operations such as rotation and reflection.

In OO, a class of objects defines the operations (methods) that are valid, and thus, a class is an algebra, and a set of classes is a family of algebras. I suppose that you would need a form of multiple-inheritance in order to have a family of algebras for an object.
Algebra in this context means a system of rules for deciding that two programs (or functions) that are expressed differently, are actually equivalent in the sense that they map equal inputs to equal outputs. I.e. f(x) and g(x) are equivalent if they return the same value for all x.

The algebra of arithmetic is the most familiar, and it lets us determine that f(x) = 1 + (1 + (1 + x)) is equivalent to g(x) = ((1 + 1) + 1) + x for any integer x. In this case, the relevant algebraic law is associativity.

One abstract way to think about integers is as sets of equivalent arithmetic trees, so "3" is a stand in for the set {(1 + 1) + 1, 1 + (1 + 1)}.

Other kinds of objects that can appear in a program can have similar kinds of equivalences under various operations.

As a less familiar example, take axis aligned bounding boxes. Translation and scaling both map an axis aligned bounding box to another axis aligned bounding box. Intersection maps two bounding boxes to one smaller bounding box. "Convex closure" maps two bounding boxes to a larger bounding box--specifically, the smallest bounding box that encloses both of them.

There are then various algebraic laws that let us determine that differently expressed combinations of these operations are in fact equivalent.

If "∧" represents intersection, and A, B, and C are bounding boxes, then f(A, B, C) = (A ∧ B) ∧ C and g(A, B, C) = A ∧ (B ∧ C) are equivalent because intersection is associative.

If we apply the same translation to two bounding boxes and then form the intersection of the results, this is equivalent to intersecting the boxes, and then translating the results.

There are also interesting equivalences that relate intersection and closure.

This kind of broadly construed "algebraic" manipulation can be used to rewrite one program into an equivalent program that executes more efficiently, and this is one way of thinking about what an optimizing compiler is doing when it optimizes a program.
+1 for this. I actually just set up similar myself yesterday. Once you look at a few tutorials and figure out how to muck around with all the yaml config files, it's really pretty easy to configure bungeecord. The isolation you get from being in completely separate worlds is definitely an added bonus. You can do cool things like create worlds that are entirely devoted to a minigame, for instance, if you want to have that. It also makes it really easy to just create one hub world that players can teleport from, and return to easily. I used a really simple plugin called FancyPortals[0] to achieve that. There are a couple potential problems you may face, the biggest one being memory requirements (since you would actually be running n servers instead of just one). If that's the case, you could also check out MultiVerse[1], which is a bit easier on memory I believe.

If nothing else, you should at least consider switching over to Spigot[2] (A high performance fork of Bukkit). They've had some DMCA problems, so you have to compile the .jar yourself, but there's a script which automates the entire process, so that's really no big deal. Plus they just updated to 1.8 yesterday! Once you have Spigot, you can use any Bukkit plugin. Plugins exist that do everything you're trying to do, and more, but with the added bonus of actually being integrated into the game. The big one to check out would be Essentials[3], which contains dozen of simple commands for doing lots of common, neat things.

[0] http://dev.bukkit.org/bukkit-plugins/fancyportals/

[1] http://dev.bukkit.org/bukkit-plugins/multiverse-core/

[2] http://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-1-...

[3] http://dev.bukkit.org/bukkit-plugins/essentials/
Not standard.

> Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.

- http://www.ecma-international.org/publications/files/ECMA-ST...
Ask HN: How to replicate dev and production?
I'm trying to determine how I should set up a virtual machine to match my production environment. The choices between Salt, Chef, Ansible, Puppet, etc. are overwhelming. They also all seem to have a focus on many machines in a network, whereas I'm just worried about my local dev VM and a single VPS for personal projects. Maybe I should just use a plain bash script? All I'm looking to do is automate the installation of nginx, node, etc.. Configure all the virtual sites, create and manage some user accounts and other configuration.
> In the US we screw around (talking, surfing the web, etc) much more.

DeMarco & Lister referred to this, I believe it was in Peopleware, as "undertime".
> I would love to see one single company that isn’t dominating a market with no cash cow in-flow that can succeed without strict discipline, sharp focus, hard work, and hands-on management.

I would not work for this person. It's ironic that he thinks Schmidt is the one that has it wrong.
Nope. Size fit color is blue (or else black, which is kind of a dark blue). No (they don't tend to respect the blue rule). Also: move to a hot country to reduce the need for clothes.
FastMail's Email Search Architecture
Not a very great article at all, imho. There are a few glaring issues, first and foremost, there are tons of libraries that are available for free. Then even if you restrict yourself to a Kindle, as I do, there are tons of free novels purely on Amazon.com alone for free download and reading, zero monthly fee. Then there are tons of authors in their program who, like me, regularly give away ebooks which they had previously offered for free in the hopes of encouraging people to enjoy the brand and buy more later.

When I review a site like Author Earnings dot com (no affiliation, other than being a huge fan of such an amazing amount of free and open data) it shows pretty clearly that, "An Indie author can make it." In fact, the bulk of the data shows Indies have as good a chance, or better, at cracking the best seller list on the site.

For free, on both sides of the interest pool for authors and readers, there is a ton of value and a growing amount of it. Then if you start looking at other models like Issuu (recently on the app store, after long absence) and Wattpad, it really makes you scratch your head at the tone of the article.

Without the preface, "For newbies to the publishing category," it reads like a poorly articulated puff piece. Sorry.
Wow, what an enjoyable read. I recommend the story about randomly generating JPG files too.
> the authors are confusing causation and correlation... they are all consequences of Google’s success. For example the authors write: “Their plan for creating that great search engine... Hire as many talented software engineers as possible, and give them freedom.” Well, this worked because the search was already successful enough to fund that freedom.

This is the key point and the clickbait-y headline notwithstanding, it's a very valid point. People look at Google and say "wow they have super-smart engineers and let them work on whatever they want with 20% of their time" and tons and tons of products sprung up all over the place.

But after a while, management seemed to back off of that philosophy quite a bit. In 2011, Google killed off many of its less successful projects, including Google Labs, and I read in some nook or cranny of the Internet that the 20% time has been quietly deemphasized over a number of years.

So the idea that you can just hire smart people and magic will happen, though often copied and lionized, is not all it's cracked up to be. <Insert quip about monkeys, typewriters and Shakespeare here.>
I don't think so.

I'd guess the singularity is decades away not centuries.

Genetic engineering babies for higher intelligence is already here. But I'd guess it'll become more effective and common place in decades.

The intelligent tend to clump and interbreed. They breed less, so % might go down but numbers are probably relatively stable.

Add to this many counties like the billions in China currently don't have this problem atm. When they get their education system / poverty sorted they'll add huge numbers to last us out the centuries.

Plus I also think communal intelligence should not be under rated. Even if g drops, systems of group collaboration might keep the issue at bay.
Which country is this? How many work(non-vacation) weeks a year?
Wow, this make me really sad. I remember interviewing him about Engine Yard on my old podcast.

He always impressed me and I was so happy he took the time to talk: http://web20show.com/2008/07/episode-47-ezra-zygmuntowicz/.
Strictly, "... or that you can run your tests on an OS that does, and your code does not behave meaningfully differently between OSes." Either way, it may or may not be a strong assumption, depending on domain...
How Microsoft Uses C++ to Deliver Office Applications Across Multiple Platforms
C++11 notes
Computer science isn't a science and it's not about actual computers. Software engineering isn't engineering and is really about the limits of people, not software in and of itself.

Nevertheless, my job title is "Software Engineer". Where it makes sense, I model myself after our elder cousin professions. When it doesn't, I don't.
The things you do for your kids.
C++11 examples
I doubt that was what was going on, but I can't find any documentation right now on how F# optimizes case matches. If it was doing that, it would have to apply those classes to all instances of the patterns, which seems unlikely in the face of separate compilation as "Foo of int * bool * string" could be constructed in a far away place. Well, if Foo was a local type that wouldn't escape, perhaps they could optimize it in the module, but it still seems unlikely.

OO languages have trouble optimizing constructs such as interfaces (and other forms of multiple inheritance) because the v-table is no longer very linear. Now throw in arbitrary predicates and you are pretty much back to linear search. Probably the state of the art can be found in GHC, but even they probably fall back to linear in a lot of cases.
Just a small sampling of what's out there that could search just as well or better:

For emacs:

helm-ack[1]
helm-ag[2]
helm-git-grep[3]

For vim:

ctrlp[4]
unite[5]

[1] - https://github.com/syohex/emacs-helm-ack

[2] - https://github.com/syohex/emacs-helm-ag

[3] - https://github.com/yasuyk/helm-git-grep

[4] - https://github.com/kien/ctrlp.vim

[5] - https://github.com/Shougo/unite.vim
With regards to the Linux kernel bug in another thread today...

"The first step in fixing a broken program is getting it to
fail repeatably" - Tom Duff / Bell Labs
A book I read, Industrial Megaprojects, suggests that everyone else makes a lot of the same dumb mistakes we do.

We're not comparing ourselves to civil, structural, process, mining, aeronautical or industrial engineering.

We're comparing ourselves to flawless platonic ideals of those professions that we invented whilst talking amongst ourselves.
Really bad news for strong Java shops and developers. This move away from Java byte code probably means very little hope for Java 8 compatibility in Android any time soon. For myself, I wrote Java server code for a decade before writing Android apps and the companies I work at often have an order of magnitude more Java server programmers than Android programmers, if they have any Android devs. So more compatibility and feature parity with Java proper would have been great.
I don't think waterfall is actually used in other disciplines, perhaps we were just cargo culting back then?

But my question is: if SE is supposed to be based on a theory of project management, then what is the theory used in other disciplines? Or do project management not see that as their underlying theory, but rather something more hard like physics or chemistry?

It sounds like there must be a general field of project management out there...getting people to apply technical skills to get things done. It is probably a soft science, but definitely necessary. So why not talk about this aspect SE as a sub-field at that field rather than as an aspect of a more hard science (computer science)?
I came here seriously expecting Sublime to win out. At the time of writing, Vim actually has a narrow lead (267 vs. 239) - and third place, Emacs, has less than half that, with 119.

That surprised me quite a bit.
I've been writing Python and Java(Android) side by side for a few months. I feel that for all the advantages of initial speed that python offers it takes a lot away. Especially in large projects. I spend a significant amount of my python time trying to understand Types, and if those areas are not covered by tests then I'm Fked, I'll have to spend hours trying simulate the exact conditions of how an error occurred.

Don't get me wrong, I love python, but writing python requires a lot of restraint and experience. Novice programmers who build a python code base just screw things up, especially those who don't yet understand the value of readability and maintainability.

I'd much prefer novice code on Java than on Python.
Ok, now your boss asks you to write an iPhone client.

Or web client with a lot of logic in the browser.

Or even a custom, native windows client. (Ok, Swing or SWT, but, ...really?)

"Language X for Everything" is simple not possible, regardless of the value for X.
Technology is making us blind: The dangerous complacency of the iPhone era
It's a little disingenuous to compare the US and Germany. While there are large variations in Germany too (and one could look at the individual states there as well) -- it would make more sense to compare US states, rather than all of US. Or: one might compare the whole of EU (or possibly, some older subset of EU) with all of the US.

[edit: On the other hand, as the US leads by a pretty significant margin, there must be other factors at work. While Germany isn't top among the EU, the US is top of the world on that list, anyway. I'm a little surprised the US is even ahead of Norway -- given the pretty big GDP boost Norway gets from oil, and our low population.]
I would rewrite that as "_explicitness_ improves readability". When I read Java code, I rarely have trouble to know what the code is doing (at least at a local scale).

Not all static-typed languages are readable because they're not all explicit. In C++ for example, even the most trivial snippet of code can be obfuscated by all sorts of abuse: operator overloading, implicit calls to copy constructors, preprocessor macros, etc. Scala suffers the same problem, perhaps even worse, doing tons of stuff automatically i.e. in a way that's not obvious by just staring at a code fragment such as an individual method. Organizations that have success writing large-scale code in such languages [I can speak for Google here], typically have careful style guides that ban the bad stuff and are strongly enforced by code review process; but in that case you're not using language X anymore, you're using some "safe subset" of X.

Of course you can't have any high-level abstraction without some tradeoff of maximum explicitness; virtual calls for example make hard to know which exact code is invoked by "just staring" at an invocation. The trick is striking a healthy balance between power and readability. Java is not perfect in this criteria (it errs a bit in the side of caution), but it's certainly much better than any dynamic-typed language.