OneLang – A tool to help writing code in multiple languages at the same time - <AUTHOR> https://ide.onelang.io <comment><USER3> Why not write one piece of code that is _simultaneously valid_ in ~12 languages?

[https://github.com/stephane-chazelas/misc- scripts/blob/maste...](https://github.com/stephane-chazelas/misc- scripts/blob/master/which_interpreter)

I know it takes advantage of some technicalities (end-of-input separators and such), but it's still a remarkably impressive piece of engineering. I put that up there with some really hairy quines ([https://github.com/mame/quine- relay](https://github.com/mame/quine-relay)), except it can actually be _useful_!

<comment><USER4> What are the 12 languages?

I already tried:

node perl python ruby bash tcsh

From the code it is obvious that DOS and php are on the list, but I don't happen to have them.

What are the others?

<comment><USER3> I'm counting different editions of POSIX-compliant shell languages (e.g. ksh93, zsh, bash, [t]csh) as different, as well as massively different editions of DOS (freeDOS, MSDOS).

Hence the approximating tilde on "~12". Reasonable minds may consider there to be many fewer, or many more, compatible interpreters.

EDIT: There also appear to be multiple compatible JavaScript interpreters-- browser V8 (though not Node, oddly--it's detected as generic; I may send a PR sometime), SpiderMonkey, and older IE. I'm no expert on JS runtimes, though, so the differing results I'm observing may be due to something else.

<comment><USER5> You should add Whitespace [0] to that :)

[0] [https://en.wikipedia.org/wiki/Whitespace_(programming_langua...](https://en.wikipedia.org/wiki/Whitespace_\(programming_language\))

</comment></comment></comment></comment><comment> rwx</comment><comment> Went to github to see the project maturity and

"OneLang is the love child of @koczkatamas and it was not a planned child. .... OneLang is six months old at the time of writing and it already speaks, but don't expect any comfortable conversation with it yet. It cannot grow without a loving family, and as a single dad I cannot take care of it alone. It needs more mommies and daddies who can help raise it up."

<comment><USER6> Wow, sounds real mature.

<comment><USER7> At least I am not lying... ;)

<comment><USER8> indeed, I like your project. Negativity of the community can be discouraging. I stopped a project of mine because of a combination of the negativity and from the reality of having to hiring and train people to use my language.

Here is _some_ of the negativity I got: [https://www.reddit.com/r/programming/comments/6ori0/kira_is_...](https://www.reddit.com/r/programming/comments/6ori0/kira_is_a_programming_language_that_compiles_to/)

What excites me about your project is the possibility to write core math or business logic once and then expose to multiple environments.

<comment><USER9> /r/programming is one of the most pedantic forum I have ever seen but I also see it as a place where programmers flee and shelter from the non-technical bullshit and vent a bit.

If you submit anything there, be prepared for harsh criticism. There is some real value in there, but encouragement and cheerings won't come from there.

<comment><USER6> In other words, r/Programming is like the r/RoastMe of programming. Take everything with several grains of of salt.

</comment></comment></comment></comment></comment></comment><comment><USER10> It seems like a really strange choice for the "source" language to be JS - <USER2> language without any real static typing capability (even with TS).

The most limited & basic kinds of static analysis are technically possible, but why not just start with an entirely static language and translate from that to dynamic languages? Would seem much simpler...

<comment><USER11> > _It seems like a really strange choice for the "source" language to be JS_

I can't speak for the author, but I can think of several reasons I might choose JS:

1\. Almost everyone working on the web knows it, so not knowing the source language won't be a roadblock right away.

2\. Precisely because of the issues you mentioned, JS is a lot easier to translate with perfect (or close to perfect) fidelity. If the source were something like Haskell, every translation would be very lossy.

3\. JS has no boilerplate, like setting up a class or something. You can just type statements.

4\. OneLang itself is written in TS, which means working with JS as the source might be easier than, say, C#.

<comment><USER12> > 2\. Precisely because of the issues you mentioned, JS is a lot easier to > translate with perfect (or close to perfect) fidelity. If the source were > something like Haskell, every translation would be very lossy.

On the contrary, the fewer restrictions a language has, the more difficult it becomes to translate it into languages with stricter requirements. If this were built on JavaScript and not TypeScript, it couldn't even generate the correct type annotations for the other languages that require them. I doubt that this project is going to grow a Haskell backend anytime soon.

</comment></comment></comment><comment><USER13> It's fun but breaks very quickly. One simple line such as "console.log(Math.random(10));" will fail.

Amusing anyhow.

Also: please make it python 3. It's been 13 years...

<comment><USER14> 2008 to 2018 is 10 years last I checked.

<comment><USER13> Alright, my aim is very off. But even 5 years would be enough don't you think ?

<comment><USER14> I think it's certainly time to have switched. All important libraries have migrated and Python 3.6's dictionary is faster and more memory-efficient.

Python 2 is dead. Long live Python 3.

</comment></comment></comment></comment><comment><USER15> How to do one thing ok, and 10 things strangely.

<comment><USER9> My sex life in one sentence.

</comment></comment><comment><USER16> @koczkatamas this is mindblowingly awesome! Keep it up and ignore the haters.

Question: Can it support plain JS -> other languages? Or does it have to be TypeScript? How could plain JS support be added?

</comment><comment><USER17> From [https://github.com/koczkatamas/onelang/wiki/FAQ](https://github.com/koczkatamas/onelang/wiki/FAQ) it is clear that this tool falls far short of actual polyglottery.

</comment><comment><USER18> For anyone interested in cross platform development, check out Haxe and its testing process. Writing a target that passes those tests is like finishing Dark Souls. The level of effort here is about on par with finishing the character selection screen.

</comment><comment><USER19> Programming language translation has to be on the horizon. The cost of switching is currently too high.

I got into a project years ago with this ambition using an AST and allowing each language to provide their own translation for each syntax element or block of code.

It also had the unique benefit of being able to take larger blocks like a function and allowing the translator to provide a full function in some native programming language so that a login or Fibonacci function could have multiple translations in the same language allowing the translation to evolve and adapt to use the most efficient one as new translations were introduced.

</comment><comment><USER20> Isn't it more an indication of how little substantial difference there is between most mainstream languages?

<comment><USER21> You can write Typescript in any programming language.

<comment><USER7> In the demo video ([https://youtu.be/Rwo6KJ_Pa9Q](https://youtu.be/Rwo6KJ_Pa9Q)) there is a part where I am editing the same code in 4 languages (C#, TypeScript, Ruby and PHP) simultaneously.

But yeah, generally only a limited subset of a language is supported. This is the price of writing code targeting multiple language. That's why you cannot (and probably won't be able to) convert existing code.

</comment></comment></comment><comment><USER22> Hey I'm curious about your journey than the final result. I only skimmed through the code, so I don't understand everything, but it seems that the list of things it will identify is in the "yaml" files. Did you write out all of them or was there a pre-existing database somewhere?

</comment><comment><USER23> I have wanted this for such a long time. How can I make python the main typing window instead of Typscript?

</comment><comment><USER24> See also [http://cdent.org/](http://cdent.org/)

</comment><comment><USER25> Rather, I think it's a good tool that could help people who already knew a programming language to learn a new one.

</comment><comment><USER26> How is this different to haxe? [https://haxe.org/](https://haxe.org/)

<comment><USER7> I started to write a comparison page here, but missing a lot of important aspects: [https://github.com/koczkatamas/onelang/wiki/OneLang- vs.-Haxe...](https://github.com/koczkatamas/onelang/wiki/OneLang-vs.-Haxe- comparison)

Tl;dr: you cannot use One in production now, but the grand plan is to make One as hackable and flexible as I can.

So here is the plan:

\- the compiler does not contain any target language-specific part, you can add a new language by creating a few hundred lines of template file (this actually works already, it is not just a plan)

\- rewrite One in One, so you can convert from any language to any language in any language

\- there is no StdLib, but libraries can be created by anyone. We publish interface and implementation definition separately, and you can eg. implement a Web client interface for PHP and Node, while somebody else can implement it for C# and Swift. Behaviour defined by interface tests, if your implementation passes interface test => good. If there is no test for an edge-case => undefined behaviour. Read more here: [https://github.com/koczkatamas/onelang/issues/9](https://github.com/koczkatamas/onelang/issues/9)

\- you write a library in One and it helps you to publish to every language's package manager (npm, pip, NuGet, etc). You can reach much more developer with your library compared to targeting only one lang's developer base

<comment><USER27> This idea has been ronning around in my head, paired with a mining and crypto element.

The language specific implementations of those interfaces could be mined(by hand or automated) for coins to directly incentivise engineering effort. The block acceptance would be based on the universal tests/benchmarks passing.

</comment></comment></comment><comment><USER28> it does not work on my first test:

My program is i=1 and the Java program it produces is:

class Program { public static void main(String[] args) throws Exception { i = 1; } }

which is wrong because "i" must be defined in java as in "int i;"

<comment><USER12> Try writing "let i = 1". I think the assumption is that if you use undeclared identifiers, you'll provide them to the generated code in some other way.

</comment></comment><comment><USER29> If anybody is looking for something stable for years, have a look at haxe [1]

[1] [https://haxe.org](https://haxe.org)

<comment><USER30> Can I ask how Haxe is connected to Flash?

For some reason, the first time I looked at Haxe I got the impression that Haxe is an open-source Flash / Flash successor. (Mostly, I think, because Flash keeps getting mentioned with projects associated with Haxe, like OpenFL and Flambe, and several times in the Haxe Wikipedia article).

Clearly Haxe isn't "just" an open Flash, but how is Haxe related to Flash?

<comment><USER31> Haxe can compile to Flash, which is such a distinguishing feature that people actually use it to write Flash applets:

[https://haxe.org/manual/target-flash-getting- started.html](https://haxe.org/manual/target-flash-getting-started.html)

If you have ever tried to write Flash applets the old-fashioned way, it feels more like a scriptable paint program.

</comment></comment></comment><comment><USER32> Opening the site on my 3GB RAM laptop froze it - could you please not pile web frameworks atop one another? Being able to translate between languages in all cases is intrinsically impossible because of the halting problem; that this works is a testament to how restrictive and bland the Von Neumann language paradigm is, seeing as these languages aren't terribly different and all have ridiculously long specs. The closest you could get to doing this for most languages would be to specify sets of composable, first-class macros in a purpose-written Lisp (almost certainly a Scheme derivative) and write FFIs to port in standard libraries around the core languages made from macros.

<comment><USER12> The halting problem has nothing to say against translating between languages. A non-terminating program will simply be translated into another non- terminating program. In fact, Turing completeness is all about the fact that a program in any language can be translated into an equivalent program in another.

Some languages can't be _parsed_ without solving the halting problem, but even in such cases, you can simply bundle it with an interpreter in the target language. And the subset of programs humans are actually likely to write should be much saner.</comment></comment>


On the Design of Valve's 'The Lab' - <AUTHOR> http://visualise.com/2016/07/the-future-of-virtual-reality-on-the-design-of-valves-the-lab <comment><USER3> I played with 'The Lab' a little in an open space with a Vive. It was an intensely magical technological experience. (So was Tilt Brush.)

Exploring an environment in VR can't be compared to exploring one on a screen, because the objects have scale that makes sense, and you can freely move around them to see their shapes. Or, when you pick something up, you can freely move it around with your hand to see different sides and angles.

The software includes detailed representations of the Vive controllers, so you can see them while you're in VR — including accurate battery LEDs, the state of the buttons, and the position of the analog trigger.

Even the little toys in The Lab's "menu room" are fun and natural — there's a wooden bow on a table. You can reach out with a hand, touch the trigger on the controller to pick it up (the controller disappears so you seem to just be holding the bow), and then use your other hand to grab an arrow, pull it back (holding the trigger), and release (by releasing the trigger).

The demo worlds are equally magical — when I played fetch with my little robot dog, I kneeled down to pick up a stick, stood up to throw it, and then kneeled back down to give the dog an approving scratch when it brought the stick back.

I _was_ mildly excited about VR and AR. Now I'm convinced that they're going to change how we interact with computers, and with each other.

</comment><comment><USER4> Watching the evolution of new design paradigms for vr is a delight - <USER2> haven't had a media this new and different since film was developed.

A particularly interesting area is locomotion - how to get about. The teleportation model is very much a first gen approach, and folks are playing with concepts like swinging your arms to walk, and designing games so you're constantly turning around in your playspace without realising it.

I know this probably isn't appreciated, but reddit.com/r/vive is a good place to keep an ear to the ground and to watch the technology and its use develop.

</comment><comment><USER5> Ugh. Yet another website that decided to hijack scroll.

<comment><USER6> The all too common sin of putting visual designers on UX design.

<comment><USER7> Preferences are just that: preferences.

Manner of interaction is subjective, and pandered to, by tendencies reinforced by operant conditioning cues.

Just like linguistic creep mutating dialects, so too with tendencies to interact with affordances in certain ways. Someone from another country doesn't know how thick their own accent is.

<comment><USER5> That's exactly the point. Preferences are preferences and we don't know better than the user. The user's computer works in a certain way. They're used to it. Don't screw with the user.

</comment></comment></comment></comment><comment><USER8> I do love the "place this sphere on your head to switch worlds" paradigm, but I think it's maybe _too_ natural - every user I've demoed the lab for inventively ends up punching a controller into the visor.

<comment> jake-low Perhaps a substitute could be "stretch the sphere open so you're standing in the middle of it", with your arms outstretched on either side of you. Although this might trade smacking yourself for smacking your neighbors.

</comment></comment><comment><USER9> I just got to try this out yesterday. Like many others, I wasn't convinced going in but now I'm a "true believer".

I don't think VR will directly compete with the traditional video game interface, much like handheld consoles don't directly compete with PC gaming. I do think it will spawn a whole new branch of the gaming industry.

As a side note, I don't think the screenshots do justice to just how _good_ 'The Lab' looks once you're wearing the Vive.

</comment><comment><USER10> As a professional game developer, I've always loved how well Valve designs all their user experiences. They highlight this very well in the developer commentaries which are included in all their games. To me, those commentaries are one of the best parts of any Valve game, despite often sounding like an infomercial about how great Valve is.

Now, the portal thing isn't all that sensational. The room which is a level selection menu has been done a ton of times. Nintendo loves it. Super Mario 64 is one of the earliest examples I can think of and Nintendo Land even presents the different levels as attractions in a theme park which are accessed via futuristic looking gates (portals?). Valve simply did the same thing with the portals being more like those in Valve's own hit franchise aptly named "Portal", but as standalone 3D objects, rather than flat ones projected onto a flat surface.</comment>


Ask HN: Has anyone bought Laptop Insurance for their Startups? - <AUTHOR>

Having a laptop smash or be stolen is an expensive problem, but can be much worse for a tiny startup- That $2000 to replace might be the difference between making it another month and launching.
IIRC, Homeowners insurance won't cover Business-owned devices, not to mention that quite a few startuppers are renting.
Does anyone have experience with Laptop Insurance for your business?
What company did you use, and how did it work out? <comment><USER2> Insurance is for things you can't afford to replace. To me, it's a sign that I need to sit and think "If I can't replace this thing in the unlikely event that I destroy it... can I really afford this thing in the first place? would it be better to buy an older, cheaper model?"

I have a general rule that I don't carry a laptop I can't replace, just like I don't drive a car I can't replace. I don't insure the laptop, (and I have liability only on the car)

I mean, it's possible that you're compiling on the things, or doing something else CPU heavy where spending the money for a more modern laptop will pay for itself quickly in developer time... for me, all the heavy lifting is done remotely, and on Linux, so long as you have enough ram, a cpu that was pretty good 10 years ago can move the user interface along as fast as it needs to go.

For my workload, it makes sense to use an older/cheaper less powerful laptop and spend more of the money on an external monitor and keyboard (or a full on desktop for use in the office) A $150 monitor is a huge win for me.

For you this may be different. I guess saying "perhaps you should reconsider your assumptions" is not really answering your question.

When I was in high school, my grand parents gave me a laptop (oh man, it was awesome. a ThinkPad 365xd My parents didn't have the financial wherewithal to get me one, and me, I was carrying a tandy model-100 around. it was quite the upgrade. Actually, discounting crappy netbooks, this was probably the only brand new laptop I've ever owned myself.) anyhow, it was insured through "fireman's insurance group" or something like that. I never had cause to use the insurance (in part because the IBM warranty was so excellent. it covered damage that was pretty obviously my fault, too.)</comment>


I Don't Know How to Waste Time on the Internet Anymore (2018) - <AUTHOR> https://nymag.com/intelligencer/2018/05/i-dont-know-how-to-waste-time-on-the-internet-anymore.html <comment><USER2> The first comment on this makes me nostalgic for the era when Google et al(tavista) weren't aggressively pruning and ranking results in order to give the "most efficient" results for a given query. There was actually a chance that your question would lead you to a small, active blog with a thriving microcosm encapsulated by a "blogroll". Nowadays, you mostly get a platform like Reddit or Quora, where the QC is handled by an aggregate[0]. Interactions feel much shallower these days too -- but maybe that depends on where you go.

[0] [https://en.wikipedia.org/wiki/Wisdom_of_the_crowd](https://en.wikipedia.org/wiki/Wisdom_of_the_crowd)</comment>


Google+: Like not love - <AUTHOR> http://www.consultengh.com/blog/post/33/I_like_Google._Like_but_not_love._/

<comment><USER2> "Why is it that Google products always seem to come out with a bang, only to be forgotten and thrown out weeks later?"

Yeah, Search, GMail, Reader, Calendar, PicasaWeb, Groups, Books... How quickly they all died! /sarcasm

What you're actually seeing is a company that is massively innovating. They throw stuff against the wall to see what sticks. Wave and Buzz didn't really stick, along with a host of other services that don't exist any more, or didn't even make it out the labs.

</comment><comment><USER3> Agreed, and it's mentioned in the article about Google's innovation. Honestly, I think that Google is one of the most innovative companies of the century... still doesn't convince me that Google+ will really stick. Did Wave and Buzz not stick because of no critical mass? In that case, how can Google assure that doesn't happen with Google+?</comment>


A history of the Amiga, part 10: The downfall of Commodore - <AUTHOR> https://arstechnica.com/the-multiverse/2017/01/a-history-of-the-amiga-part-10-the-downfall-of-commodore/ <comment><USER2> I fell in love with the Amiga ever since I saw an Amiga 1000 in the first issue of Amiga World.

Amigas were clearly light years ahead of virtually all other personal computers at the time -- with the arguable exception of the Atari ST, which had the reputation of being better for music. But the Amiga was better for games and had better graphics. As a hardcore gamer, I knew instantly that the Amiga was what I wanted. Somehow I convinced my parents to get me an Amiga 500, as my second computer (after the TI99/4A) and spent a lot of time collecting games and demos, and connecting to BBS'.

Somehow the rest of the world didn't really see the clear superiority of the Amiga, and stuck with their boring IBM PC's and Macintoshes. Commodore collapsed, and virtually every other personal computer became extinct, as most people just wanted to buy whatever they had used at work (IBM PC) or school (Apple). This was an early lesson for me that superior technology does not always win. In fact, it's often the inferior technologies that win, for a variety of reasons -- especially marketing.

I kept my Amiga for a long time, but eventually migrated to Unix (SunOS, Irix, Dec Alpha's OSF/1, and Solaris), and eventually to Linux on a PC. It had become increasingly clear that newer tech had left the Amiga in the dust. Some people still stuck with the Amiga long after I stopped using it, but I donated mine long ago. Sometimes I wish I'd kept it, so I could bring it out for nostalgia's sake every now and then, but it's a lot of equipment to lug around.

I often wonder how the personal computer landscape would have changed had the Amiga won. Back then, it seemed like Microsoft, the IBM PC, and Apple have kept us back 10 or 20 years with their dominance.

<comment><USER3> I like to think its architecture is what gave rise to the idea of having dedicated sound and graphics cards on all computers and game consoles.

I followed another path, settling on Windows, after a decade of UNIX.

The UNIX culture never seemed to be much welcoming to the demoscene culture, which had more points of contact with the gaming culture on Windows.

For a while in the late 90's there was a website that tried to be Poet for GNU/Linux. They never managed to have more than a few demos there.

<comment><USER4> Not sure i follow, as the trend had been ongoing ever since the C64 (if not before).

As for the whole demoscene thing, i am not surprised given that it grew out of the cracking scene on micros. By being more elaborate versions of the intros cracking groups added to games (and those seems have made something of a comeback as cracking groups have to provide their own installers because games rarely ship as complete ISOs these days).

That said, i never got the impression that the demoscene was much interested in the PC platform once it started sprouting soundcards and graphics accelerators. I guess it just became hard to judge the prowess of the demo developers when the platform was not a fixed package.

<comment><USER3> Demoscene moved into shader competitions on the cards themselves, like 4KB demos on the GPU.

[http://iquilezles.org/www/material/nvscene2008/nvscene2008.h...](http://iquilezles.org/www/material/nvscene2008/nvscene2008.htm)

<comment><USER4> So they effectively turned the GPU into the CPU...

</comment></comment></comment></comment></comment><comment><USER5> Watch also the "Deathbed Vigil" video by Dave Haynie, an interesting and moving account of what was happening during the last days of C=. I would recommend to watch it especially if you never touched an Amiga and always wondered why those nerds adored it so much.

<comment><USER6> Kim Justice has another series of videos on Youtube about Commodore, Atari, and Amiga. She did a lot of research on them.

Commodore did not market the Amiga in the USA, and the PC Clones caught up in 1987 with VGA and Sound Cards. When Windows was preloaded with a mouse on PC Clones nobody needed the Amiga. The Amiga was cheaper than the Macintosh, but PC clones were cheaper than the Amiga.

Amiga had mostly video games, and Commodore could not get business apps written for it to compete with PC Clones nor get many computer dealers to carry them as Jack Tramel burned computer dealers by putting the Vic-20 and C64 in toy stores and discount stores.

</comment></comment><comment><USER7> great Amiga movie out, didn't know about the Euro demo scene. I didn't get one until the Video Toaster. [https://fmovies.se/film/from-bedrooms-to-billions- the-amiga-...](https://fmovies.se/film/from-bedrooms-to-billions-the-amiga- years.9o59x)

<comment><USER8> Tried to download it using youtube-dl, their server returned a funny message.

HTTP Error 503: Have you the ability to read quickly as the light?

PS: The video is actually hosted on Google Video. Copying the relevant Google Video URL from devtools network monitor allows youtube-dl to fetch the video correctly.

</comment></comment><comment><USER9> We complain about today's management class, but in the '80s scumbaggery and general thievery really were at Far-West levels.

The Amiga was a fabulous game machine and a great computer.

<comment><USER10> Rather amazing how inept management was. The amiga was way ahead of its time (the software architecture and design choices) and thus it might never have succeeded, but the management actively did things to increase cost of production (the a600, the various tower versions of the 2000 and 3000) and harm its own sales.

</comment></comment><comment><USER11> I had the luck of buying an A1200 a few years ago. Really impressive machine for 1992. Compared against my PC on the early 90s... well Can't run DooM, but have a lot of nice games. The majority of the games that I played from 1990 to 1995 was 2d games. Games that could have ran on these A1200 without any issue.</comment>


What Was the Happiest Day on the Internet This Decade? - <AUTHOR> https://www.theringer.com/tech/2019/3/5/18249733/happiest-day-internet-history-ranking <comment><USER2> > There's a lingering hope among people who are Extremely Online that the > internet will somehow right itself and again become the place of bizarre > daily delights that made it so engaging in the first place. Those days may > be gone forever.

Meh. Just because a big part of the internet really is like the "torture chamber" of Clockwork Orange doesn't mean the internet of the early 2000s is gone. I used to hang out in some forums as a young teenager, and these forums are still there, and active. All of the IRC channels I was active in 2002 are still there. I can still use ICQ to send messages to people I now know for over 20 years. You can still spin up a personal homepage with nearly the exact amount of work as in 2001 (at least in Germany, you had to be very careful regarding legal issues even back then). It may be buried under a ton of shit (read: ton of tweets), but the internet of 2000 is still very much there.

<comment><USER3> > a big part of the internet really is like the "torture chamber" of Clockwork > Orange

Is it? My daily rounds almost never encounter anything like that.

<comment><USER2> Then you have either developed an immunity, or you are proofing my point: since it is possibly to move around in a sane, creative and/or interesting subset of the internet, the internet from 20 years ago is still out there :)

On a side note: this "good" internet may be hard to find, but don't forget that for the majority of the population even in highly developed countries, it was still uncommon to have access to the internet at home 20 years ago, so it was "hard" to find the good internet also back then. This is somewhat thought provoking, as it seems to indicate that the "good" parts of the internet were, and are, elitist circles.

</comment></comment></comment><comment><USER4> I would have said "the day Pokémon Go had been released".

I remember people from different generations walking in the streets, talking and laughing together without knowing each other. Something very rare for Paris :).

<comment><USER5> Is that really a day "on the Internet" though? That was beautiful precisely because everyone got outside, saw monuments and interesting sites, learned about their surroundings.

<comment><USER6> It was also entirely internet enabled. Worlds meeting, I suppose.

</comment></comment></comment><comment><USER7> I'm coming in just to say this: Twitter is not the internet. There must be more complete places to pull this data, even if that takes more effort.

<comment><USER8> Yup, this data is the equivalent of dumpster diving to see what people are eating.

</comment></comment><comment><USER9> Hilariously, the graph has peaks on new years. Presumably "Happy New Years" tweets are deemed quite happy.

<comment><USER10> Well you do need to be at least slightly happy to send a Happy New Years message, unless you're sending it in a sortof ironic depressive funk.

<comment><USER11> I think it's honestly more of just a meaningless statement (at least in the US). Sort of like when someone greets you with 'how are you?' and everyone just says 'great' or something like that.

It's just words to most people, I think.

<comment><USER12> But it's words they say because that's how they want to present themselves to total strangers; as a courteous person. In the same way, people could dress like total slobs, but instead take time every morning to look decent.

<comment> Joe-Z Okay, so we now defined the meaning of "being happy" to mean "not being so totally depressed to not even put on clothes anymore" :)

Quite a low bar to reach, we can do it!

</comment></comment></comment></comment></comment><comment><USER13> Interesting that many of the big peaks don't have any specific meaning attached to them but the big troughs do.

I interpret this as meaning the internet needs a good reason to be sad, but can be happy for no particularly big reason. This seems like a good thing.

<comment><USER14> Likely something happened that is politically incorrect to even name, the bias is incredible given the troughs for tsunamis and nuclear plant meltdowns are a mere blip compared to Hillary not getting elected.

Also I'm not sure how/if they filter out bot traffic. Twitter, as I understand it, is mostly bots and fake follower accounts with human traffic being a tiny fraction of the data. Kinda like the old days of Usenet where 99% of the traffic was computers sending binaries to each other and only a tiny fraction was human to human text discussion. I would imagine the happiness sentiment of a mere repetitive shell script could distort the data such that the average is highly compressed around the 5 result. Possibly if we assume a nuclear plant meltdown should have scored a 1 on any realistic and reasonable human scale, then dropping only a tenth of that might indicate twitter is, to one sig fig, maybe ninety percent inhuman repetitive bot traffic.

To some extent twitter is workforce automation for echo chambers and signalling group affinity and membership; I'm not sure the mood of an environment in that context means anything when related to the real world, which reduces the significance of horrible events resulting in small signals. Surely, tens of thousands of deaths and nuclear contamination have nothing to do with trying to fit in with the cool kids, or at least a tiny subset of the population who think they're cool kids, which is a counterexample to my mathematical model in the paragraph above.

</comment></comment><comment><USER15> The news article is misrepresenting several things:

1) Obviously, Twitter is not representative of the whole internet and its users. Twitter has a particularly activistic base, so it's no wonder "happiness" went down after Trump got elected.

2) It misrepresents the performance of the sentiment analysis method used:

This is based on sentiment detection research done in 2011 explained here: [https://journals.plos.org/plosone/article?id=10.1371/journal...](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0026752)

They used a fairly simple lexicon-based sentiment analysis approach which even in 2011 was not even close to the state-of-the-art. They first create a sentiment/subjectivity dictionary by letting MTurkers rate words in different categories such as "happiness", "laughter", "greed", "hate", etc. For the final "positivity" score they add the matching words in Twitter posts.

This is a simple and efficient approach but produces fairly unreliable results w.r.t. negation, valence shifting, etc. Even in 2011, machine learning approaches were much better usually.

<comment><USER16> And of course it's limited to english, so far from "the internet".

And indeed, Trump has been elected for getting the majority of votes, yet it represents it as a sad day, while I'm pretty sure most voters were happy.

<comment><USER17> Hillary won the popular vote. Also non-voters (including younger people who are ineligible or just didn't vote) and people outside of the US have opinions on such things.

<comment><USER18> I feel that Clinton winning the popular vote is also a statement that does not give a clear picture, iirc, her popular vote majority was entirely due to her humongous majority in the single state of California, if you exclude the outlier of that single state and consider the figure from the remaining 51 states, then Clinton no longer has a majority on the votes.

<comment><USER19> It also doesnt include the, relevant, fact that half of the USA did not vote. People seem to hear this as more Americans voted for Hillary than didnt. This isnt true. More Americans voted for Hillary than Trump. More Americans voted for no one than either candidate.

<comment><USER20> That's only true if you include Americans ineligible to vote (i.e. children). 61.4% of adult U.S. citizens cast ballots in 2016. More Americans would _could_ vote for either candidate did so than not.

I doubt there's ever been a candidate that has won votes that total more than 50% of the voting age population so there's no reason to single out the results of the 2016 election.

[http://www.pewresearch.org/fact-tank/2017/05/12/black- voter-...](http://www.pewresearch.org/fact-tank/2017/05/12/black-voter- turnout-fell-in-2016-even-as-a-record-number-of-americans-cast-ballots/)

</comment></comment></comment></comment></comment></comment><comment><USER21> No. 1 'Happy Days', June 25th 2015

Obama legalizes gay marriage in the US,

but also,

 _Five different terrorist attacks in France, Tunisia, Somalia, Kuwait, and Syria occurred on what was dubbed Bloody Friday by international media. Upwards of 750 people were either killed or injured in these uncoordinated attacks._

<comment><USER22> That's kinda negligible compared to the other 150k daily deaths around the world. It sure registers as a big event in the media, just like plane crashes. Probably because of saliency bias.

<comment><USER23> Accidents and deliberate acts are not comparable in my opinion. Accidents can be caused by negligence or just bad luck. On top of all this, humans killing other humans is just barbaric.

</comment></comment></comment><comment><USER24> As determined by some weird algorithms based on Twitter data.

</comment><comment><USER25> The happiest day on the internet is whichever day had the least amount of traffic.

</comment><comment><USER26> I would have guessed Obama's first election win night. This was massive.

</comment><comment><USER27> Seems a bit curious that "death of Osama bin Laden" shows such a strong dip. Much sadder than "death of Robin Williams", apparently.

<comment><USER24> One of them chose to die by their own will. The other was unlawfully assassinated in a perverted lust for revenge. I would be glad if the death of the latter was made society unhappier when comparing the two. Not so say that this is a morbid, perverse thing to do anyways.

</comment></comment><comment><USER28> This article is kind of trash. It basically starts off by saying you can write off anything that happened after 2016 because Trump winning made twitter go into a downspiral of sadness, when in reality that downtrend seemed to have started in mid 2015 (right around when election coverage started really ramping up, interestingly enough).

Then after going through the effort of showing graphs and numbers to make the rankings seem legit, the author describes how the scoring is done, and it seems incredibly skewed by the addition of arbitrary events that each add a point to the score. So basically, if the author wants a day to get a higher score, they can just look into it more to find more events so that its score goes up. If an event happened that day that contributed to happiness, the hedonometer score already reflects that, it makes no sense to double dip by giving the score extra points since that days happiness may have had multiple small contributions rather than just one big one.

I don't even really agree with how the hedonometer score was integrated. I think to really see how "happy" an individual day is, it would be better to subtract that day's happiness from the baseline/average happiness of that month rather than the raw score. This gives small happy days in a happy period an advantage over big happy days in a less happy period. I guess if you're just trying to say that day is happy without trying to tie any event to it, the raw data is fine, but I think that's much less interesting. There is probably some fancier math that could be done to weight the scores on a curve that would be more fair than just subtracting from their baseline if you really wanted to get into it.

In the end they come to the conclusion that same-sex marriage being legalized is the happiest day on the internet, but if you look at the first graph, it really barely looks like an out of the ordinary day, you wouldn't notice it if it wasn't being pointed out. This really makes it feel like the author came into this article wanting that to be number one and made everything else fit around that.

</comment><comment><USER29> reading the tweets while Trump started to win the elections.. before was like "no way it will happens" and after just "omg he is winning", was kind of a tragic comic day.

</comment><comment><USER30> November 8th 2016

<comment><USER31> Seriously. I was giggling like a little school girl all night long.</comment></comment>


Toilets prevent rape. - <AUTHOR> http://www.theguardian.com/global-development/2014/jun/01/girls-toilet-rape-murder-anger-embarrassment

<comment><USER2> Security is the problem, not so much sanitation. Both are in fact problems, but I think security is the one aspect that failed these two girls.</comment>


Is an idea only real when shared and appreciated? - <AUTHOR> Https://nextcept.com/Venture/Battle <comment><USER2> No</comment>


Where is North Korea? - <AUTHOR> https://www.nytimes.com/interactive/2017/05/14/upshot/if-americans-can-find-north-korea-on-a-map-theyre-more-likely-to-prefer-diplomacy.html <comment><USER2> cracked me up haha thanks!</comment>


DEF CON 22 – Weaponizing Your Pets – Gene Bransfield - <AUTHOR> https://www.youtube.com/watch?v=DMNSvHswljM

<comment><AUTHOR> This is a very entertaining talk that was just released from the latest DEF CON. The topic is how Gene turned a cat and dog into autonomous WiFi wardriving and hacking tools. Lots of funny anecdotes and advice from someone new to hardware hacking.</comment>


Don't look to the Valley (*all of the time) - <AUTHOR> http://www.ianbell.com/2011/01/24/dont-look-to-the-valley-all-of-the-time/ <comment><USER2> Silicon Valley is overrated and hyped just like quora.</comment>


No More Religion, More Tactics for Civilization V - <AUTHOR> http://news.softpedia.com/news/No-More-Religion-More-Tactics-for-Civilization-V-135898.shtml <comment><USER2> This may date me, but I've played all 4 previous Civ games.

Although the games have improved graphically and added interesting concepts. However, the games have become VERY long. I used to be able to sit down and crank out a game in an afternoon or 2. Now it seems to take days to complete a normal game. Time I just don't have.

I think there's an opportunity for someone to make a turn based strategy game with the original CIV concepts. Just make it playable in one sitting. There isn't much else out there in the turn based strategy genre. Seems like wide open category.

<comment><USER3> You might want to check out Rise of Nations -- it's an RTS but it incorporated Civilization like gameplay better than any other game of its type that I have played. If anyone knows of a more recent similar strategy game, I'd like to hear about it.

<comment><USER4> Seconded. The lead designer of Rise of Nations was Brian Reynolds, who also designed "Sid Meier's" Civilization II and Alpha Centauri, and it shows.

Just make sure you don't have anything important planned for the next six months.

</comment></comment></comment><comment><USER5> The changes sound to me like Civilization is evolving into a completely different game. A big part of the appeal of the original Civ was the simplified combat. I think this may open that niche to other competitors.

<comment><USER6> The biggest problem with Civ I and II was the combat system. (Not really because it was simple, but because it was broken in every way.) Modern armored units attacking Greek Phalanxes and losing? Modern riflemen being defeated by chariots? Routinely.

<comment><USER7> Civ II basically fixed that. But I'm not even sure it's possible to have a balanced game and a historically accurate game, unless you have some kind of "Zeitgeist" function that keeps one player from getting a big technology lead over another. If the game mechanics let you discover gunpowder in 0 AD, they turn the entire thing into a race to get good technology.

Alternatively, they could make technologically advanced units prohibitively expensive _if you're the only player with the technology_ , and very cheap when everyone has it.

<comment><USER8> In Civ4, at least, later units are significantly more expensive, regardless of who else has the same technology. If your production is high enough to field an army of riflemen (cost 110) and cannons (cost 100) against opponents using axemen (cost 35) and archers (cost 25), you'd still steamroll him even if you spent that production on swords, axes, and catapults.

<comment><USER7> Sure. The idea is that the _first_ rifleman you build costs nearly as much as a wonder, if your opponents are using archers. That way, you can have a unit that pretty much demolishes anything, but you still have to use it strategically. As you field more of them, and your opponents develop similar technology, the cost goes down.

So people with technology will field smaller, more effective armies; as the technology spreads, the armies get bigger but the individual units are comparatively less effective. This would make the game more balanced.

</comment></comment></comment></comment></comment><comment><USER9> For those who are interested, Civilization 1 is abandonware and now (mostly)legally downloadable and playable for free:

<http://www.abandonia.com/en/games/14/Civilization.html>

It's a 16-bit DOS app so there's a pretty high chance you'll need dosbox to play it.

<comment><USER10> I must have missed the memo where copyright law had changed so that abandonware was legally downloadable and playable for free before the absurdly long copyright term (thanks, Disney) expired.

The rules may not be actively enforced, but they still exist and there is always the possibility that someone could wake up to the fact that they now own the copyright, and they could create grief for you. An admittedly unlikely scenario, but still possible.

<comment><USER11> Tough not to draw a comparison here with illegal music. Is there any reasonable expectation that the gaming industry will take the route the RIAA took and start going after people?

It seems like these old games are quite different from old music: both make most of their money immediately upon release, but games lose their appeal much faster as newer games come out, while the appeal of music may last an order of magnitude longer, and isn't necessarily replaceable. Also, while music may continue to make money on the radio or in commercials or movies or other media, games pretty much lose the revenue stream after the first few months.

I recall a few weeks ago another game (C&C maybe?) made news here for releasing an early version in promotion of a new version. You don't see Metallica giving away old tunes in promotion of a new album, do you?

<comment><USER10> I am not a prophet, but I doubt that will happen.

However there are a lot of people with nostalgia. If someone, somewhere, could put together a legal product that made it easy for a lot of people to take a walk down memory lane, they could find a good market. Such a vendor would have a strong incentive to acquire copyright to abandoned titles then enforce said copyright. This would cause backlash, but it isn't impossible that someone with money and energy could take this step.

Of course the first barrier that such a company would have is getting copyright permission to the core operating system they need to emulate. Those copyrights are owned by companies like Apple and Microsoft which are aware of the issue and show no desire to bother themselves by getting involved.

<comment><USER12> You might check out <http://www.gog.com/> \- "good ol' games"

They sell a fairly large back catalog of older games as downloads.

<comment><USER10> Interesting.

They seem to be avoiding the operating system issue by focusing on games from the 90s that can still run thanks to Microsoft's efforts to maintain backwards compatibility. (They may need to do minor tweaks, but basically the OS is still available.)

Wake me when I can legally revisit my Apple ][ memories.

</comment></comment></comment></comment></comment></comment><comment><USER13> Can anyone explain the appeal of "strategy" games? every one I've ever played seems like excel with a GUI. figure out what parameters affect income, optimize. I had some fun with Sins of a Solar Empire, but more just for the spectacle of big fleets than anything else. This will come off as pompous but whenever my friends convince me to try a new one I play for a little while and then basically go "I could be playing chess or go right now" and that's the end of it. Is it mostly just the fun of commanding armies? Do people find exploring the optimization process fun?

<comment><USER14> When I first started playing Starcraft, I too thought it a trivial game. 12 marines always beat 8, defense is stronger than offense, so mine, expand, defend, and wait. What was I missing, aside from annoying random noise affecting battles?

The strategy. It's in the noise. I didn't see it because I didn't know what it was to think strategically.

Writes Clausewitz in his classic _On War_ :

The conduct of war, then, consists in the planning and conduct of fighting. If fighting consisted of a single act, no further subdivision would be needed. However, it consists of a greater or lesser number of single _acts_ , _each complete in itself_ , which . . . are called 'engagements' and which form new entities. This gives rise to the completely different activity of _planning and executing these engagements themselves_ , and of _coordinating_ each of them with the others in order to further the object of the war. One has been called _tactics_ and the other _strategy_. . . tactics teaches _the use of armed forces in the engagement_ ; strategy, _the use of engagements for the object of the war_.

Anyone can think tactically. I have six zerglings, you have seven; you'll probably win, but perhaps I can cycle them and dance them around to do the most possible damage. Perhaps I can find the perfect spot for a siege tank on a hill, or which turret to use my battlecruiser's main gun on. From such a perspective, the game seems trivial; whoever brings the better forces to the engagement, provided both parties do the right thing, will almost certainly win.

The game is in bringing the better forces to the engagement. Deciding when and where to engage, what to control, what to build and to bring. To wait 30 seconds and take your eight marines with twelve of my own, rather than six, and then six a little later -- so I win instead of lose. Or to strike quickly so your forces are tied down and cannot interfere with another objective. Or to strike much later with more advanced forces that take no damage.

In any engagement, once both sides see what forces are in play, the outcome is already determined. Some micromanagement and smart tactics can help, but ultimately you must decide on the spot whether to spend the units or retreat. That is not the interesting part. The interesting part is in constructing the engagements to your advantage. To have the better unit matchup, or the advantage of surprise or defense, or to have more power in that particular place at that particular time.

The Excel part everybody does, and everybody gets. Factor that out. Assume everyone mines and builds perfectly. That's where the game actually starts: in turning the engagement to your advantage over what you build and where you fight. All the planning and deception and reacting and struggling that goes into that. Initiative. Massing. Marching. Scouting. That's strategy. That's the allure.

The appeal of strats? Take 20 minutes and watch some masters play . . .

<http://www.starcraft2.com/features/battlereports/4.xml>

. . . and with luck, it will be obvious.

<comment><USER13> but then why tie people down with minutia that only matters to newbies? forcing people to get over the hump of learning to mine perfectly is silly.

also: you should try Go if you haven't ever played it.

<comment><USER15> Mining "perfectly" only matters against top-level competition. Otherwise, just pointing a decent number of harvesters toward the resources (SC) or setting workers on auto (Civ) is good enough. So you have it exactly backwards; mining _efficiency_ doesn't matter much to newbies.

As for why resource mining / management even exists: from a warfare perspective, because you can only fight as long as you have the tools to fight with. From a gameplay perspective, because acquiring resources provides a major motivation for leaving your secure base, and the cost and risk associated with setting up a secondary base (versus using the same resources for some other objective like attacking an enemy position) provides a major decision point.

Learning the tools -- how to harvest, how to build units, how much your units cost, etc. -- is newbie stuff. The real game is in setting yourself up to win the war through the engagements you choose. The real game is in deciding which resources and technologies to pursue, when and where to engage your enemy with which forces, what risks to take at what time, how to respond to failures, what sacrifices to make for the sake of an objective (intelligence, delaying an enemy, destroying or acquiring something, etc.), recognizing the right time to press an advantage, and so on. It is the stuff of warfare, and the stuff of life. Far from an Excel optimization exercise, it's a rich multi-dimensional decision space with several paths to victory based on numerous factors that can vary from game to game.

That's why my wife and I still play Starcraft after twelve years.

</comment></comment></comment></comment><comment><USER16> It is interesting how their social game play will be developed. [<http://www.facebook.com/civnetwork?v=info>]

</comment><comment><USER12> For anyone that is getting a 404, more info is here: <http://forums.civfanatics.com/showthread.php?t=354036>

And screenshots: <http://www.civfanatics.com/gallery/browseimages.php?c=36>

Looks shiny :)</comment>


Ask HN: Worth it to become CEO of maybe failing YC company? - <AUTHOR> I saw the HN jobs post yesterday for the CEO position for Style Lend (description https://angel.co/stylelend/jobs/466268-ceo-co-founder)
They are a P2P fashion service for women, and have been around for at least 4 years (YC Winter 14). Clearly they have stalled, it seems the last money they raised was in 2015.
The founder/CEO is giving up her position.
Are there examples of small startups like this turning it around after 4 years?
What would be the pro and cons of taking this job? <comment><USER2> Pros:

Prestige and name recognition if you can turn it around. It'd be a ticket towards working with other YC startups that have stalled, as well as non- startups that have stagnated. Maybe it gets you on a partner track at YC.

You're interested in the space and think you can execute better than the previous CEO (and you can work with the limited remaining resources the company has).

If successful, everyone's equity isn't worthless.

Cons:

You're likely to fail, but get paid in the process. You'll still have a compelling story to use for future employment ("this is what I learned from failing"). More importantly, other people's jobs depend on you.

<comment><USER3> Before even considering it I would ask the CEO why she's leaving _and_ the employees. Some people have very good reasons to leave a sinking ship (family being the most common), but others leave because of systemic problems in the company. I've seen CEOs burning out their team by creating a climate of fear before leaving when things go sour, claiming everyone is « incompetent ». I really advise you to spend A LOT of time talking to employees.

Cons:

\- You'll have to learn about a lot of different people at the same time. In early stages startup you get to meet people one after another and earn their trust one after another. This is different.

\- You probably have a different vision than that of the previous CEO, and you'll have to go the extra mile to align everyone.

\- You inherit a culture you didn't shape. You'll probably have to change that, and it will take time for people to adjust. Just lead by example. \- All of this takes time, and meanwhile the company needs to survive :)

Pros:

\- You'll ramp up your people skills like never before. Gaining the respect of an entire team as a CEO, and (sometimes) repairing damage will take a lot of courage and empathy.

\- Obviously, if you turn this around you'll get major valley cred. And, never underestimate this, a huge satisfaction.

If you decide to go that way, good luck, and you already have my respect!

</comment></comment><comment><USER4> Probably not, you're not going to go through the YC process where most of the value is.</comment>


Google Local Pack Ad Label Feels Even More Subtle - <AUTHOR> https://www.seroundtable.com/google-local-pack-ad-label-27639.html <comment><USER2> Contrary to the usual Google hysteria around here, they held the line on disguised ads a lot longer than everyone else; but this is wayy beyond the "deceptive" line, at the level of Promoted tweets with their tiny, grayed-out bottom-corner labels. I remember a pretty robust employee culture of pushing back against even slightly deceptive things (though that was starting to change when I was there); I can't imagine how this change could have gone over without either significant employee restiveness or a dramatic cultural shift since I've been there.

</comment><comment><USER3> Google search is reverting little by little to the pre-Google era of search engines being mostly catalogs of sponsored links.

<comment><USER4> 1000% - remember when Google Adwords ads on search were in their own light- green or brown box? Hard to remember.

This is so utterly scummy. And what's sad is, no one will actually care.

</comment></comment><comment><USER5> Looks to me that Google is tapping out on growth if they sacrifice so much on product to meet their targets.</comment>


Scanwell to launch at-home 15-minute coronavirus test - <AUTHOR> https://techcrunch.com/2020/03/20/scanwell-aims-to-launch-at-home-15-minute-coronavirus-test-but-it-still-needs-fda-approval/ <comment><USER2> I hope these are coming to my town. GingerPCat has the sniffles.

<comment><AUTHOR> I hope they make it there in time!

<comment><USER2> Your well wishes are appreciated on me!

<comment><USER2> Where you go friend? You can't get the corona thu pc! GingerPCat knows.

<comment><USER2> It may be too late for me now. Much happens in last minute. It has on me. GingerPCat out.

</comment></comment></comment></comment></comment><comment><USER3> This is great news</comment>


SCI and the "62;c62;" attack - <AUTHOR> https://www.polydesmida.info/BASHing/2018-08-25.html <comment><USER2> 9A is [https://en.wikipedia.org/wiki/%C5%A0](https://en.wikipedia.org/wiki/%C5%A0) in CP1252, which is probably what it was meant to be.

According to [https://en.wikipedia.org/wiki/C0_and_C1_control_codes](https://en.wikipedia.org/wiki/C0_and_C1_control_codes) the function of this byte is "To be followed by a single printable character (0x20 through 0x7E) or format effector (0x08 through 0x0D). The intent was to provide a means by which a control function or a graphic character that would be available regardless of which graphic or control sets were in use could be defined. Definitions of what the following byte would invoke was never implemented in an international standard."

It's not a VT100 escape code either, so it's a bit odd that it would just cause the termulator to hang.

<comment><USER3> VT100 escape codes are a subset of ECMA-48, which does define (somewhat) SCI (SINGLE CHARACTER INTRODUCER) which can be encoded as 0x96 or <ESC>Z.

</comment></comment><comment><USER4> I can only get this to work in the Gnome terminal with the sequence C2 9A, not with just 9A alone. This is likely related to UTF-8. If your terminal emulator was configured for Latin-1 or something instead of UTF-8 perhaps you wouldn't need the C2 prefix. Note that C2 9A becomes U+009A after UTF-8 decoding.

The terminal is actually sending back the sequence "\e[?62;c". The "\e[?" part gets eaten by the line editor and "62;c" shows up as input. Note that despite the claims in the article you _are_ returned to the shell prompt it is just that it has some garbage in the input buffer. You can remove this by backspacing it or you can hit Ctrl+C, etc.

A little Googling produces [https://vt100.net/docs/vt220-rm/chapter4.html#S4.17.1](https://vt100.net/docs/vt220-rm/chapter4.html#S4.17.1) . This feature was designed to let the server interrogate your terminal for the features it supports. The server would send "\e[c" and then it would wait for a response in the form "\e[?...c" where the "..." part indicates the terminal capabilities. And indeed, that does work as expected:

      $ echo -ne '\e[c'; read -r -s -t 1 -n 99; echo -n $REPLY | xxd -g1
      00000000: 1b 5b 3f 36 32 3b 63                             .[?62;c

If we look down a little more in that page ([https://vt100.net/docs/vt220-rm/chapter4.html#S4.17.3](https://vt100.net/docs/vt220-rm/chapter4.html#S4.17.3)) we can see that there is an alternate sequence which also returns this response and it is "\eZ". This is "not recommend[ed]" and it looks like it is actually only supported for backward compatibility with the VT52. That sequence also behaves as expected:

      $ echo -ne '\eZ'; read -r -s -t 1 -n 99; echo -n $REPLY | xxd -g1
      00000000: 1b 5b 3f 36 32 3b 63                             .[?62;c

But we're not sending either "\e[c" or "\eZ". Somehow we're getting this answer back in response to "\xC2\x9A" instead. Gnome terminal (and probably the XFCE terminal) uses libvte for its terminal handling. If we look in the source we find this interesting comment:

      /* Escape sequences from \e@ to \e_ have a C1 counterpart
       * with the eighth bit set instead of a preceding '\x1b'.
       * This is encoded in the current encoding, e.g. in UTF-8
       * the C1 CSI (U+009B) becomes \xC2\x9B.
       *
       * When matching, the bytestream is already decoded to
       * Unicode codepoints.  In the "code" string, each byte
       * is interpreted as a Unicode codepoint (in other words,
       * Latin-1 is assumed).  So '\x80' .. '\x9F' bytes
       * (e.g. the byte '\x9B' for CSI) are the right choice here.
       *
       * For each sequence containing N occurrences of \e@ to \e_,
       * we create 2^N variants, by replacing every subset of them
       * with their C1 counterpart.
       */

I think this is saying that instead of "\e[" (aka "\e\x5B") it will also accept "\x9B" (or "\xC2\x9B" in UTF-8). Which means that "\eZ" (aka "\e\x5A") would have an alias of "\x9A" (or "\xC2\x9A" in UTF-8). So I think that explains how this all happens:

\- "\xC2\x9A" gets UTF-8 decoded into 9A

\- 9A gets treated as an alias for "\eZ"

\- "\eZ" is an old VT52 sequence which causes the terminal to answer back with its capabilities.

See also [https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/...](https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/sci- is-not-decid.html) for how PuTTY used to do the same thing but now no longer does.

<comment><USER5> Fun fact: qemu (actually the sgabios in qemu) sends the ESC [ 6 n sequence to query the terminal and waits for 0.26 seconds for a response before timing out.

In libguestfs I added code to "answer" this query, to shave 260 milliseconds off boot times:

[https://github.com/libguestfs/libguestfs/blob/0d0b5511309182...](https://github.com/libguestfs/libguestfs/blob/0d0b5511309182f163ae263e862ddb0235780917/lib/conn- socket.c#L369)</comment></comment>


On-Chain Vote Buying and the Rise of Dark DAOs - <AUTHOR> http://hackingdistributed.com/2018/07/02/on-chain-vote-buying/ <comment><USER2> It all relies on trusted computing.

If the vote is not bijective (no crypto receipt) the possibility also vanishes.

Relying on both seem to be a very hard to meet constraint</comment>


Ask HN: What can I do as a software eng to help global environmental problems? - <AUTHOR> <comment><USER2> Make an app that gives push notifications to users about their energy consumption on a real-time/daily/weekly/monthly basis. All this is tied into regional gasoline/electricity prices, that way you can output $ figures for everything. Release it for free. Think Google Analytics for personal energy($) consumption.

Tie in data from home via sense.com sensor, car travel data via google location services and a user selected vehicle.

Then give tips to user on better habits. Such as putting home in "eco" mode when you leave via Nest, or converting house to LED, etc.

Like if you change your Ford F-250 to a Civic, you will save $2000 a year based on your driving habits and distance.etc.

Or after driving your car. It says you spent about $10 in gas and 30 mins by driving just now.

The thing that inspired me was was the real time MPG gauge on my Honda Civic. It single handedly had the greatest MPG increase for my car. Since I felt the "pain" ($$) of smashing the throttle every time.

When people use their electricity at home, they don't feel " real time pain" when they turn on their 5kw AC unit or 3kw water heater. It's a crazy amount of power. They only feel once a month, when they get their energy bill for $200+ a month.

In conclusion, game-ify the hell out of dropping an end user's individual energy consumption number. By reducing energy demand at the source, then it's much easier to swallow eco friendly options.

For example, with poor energy consumption habits you may need a 10kw solar array @ a cost of 20k). But if you drop the user's average energy consumption. You can have the same quality of life at 5kw solar installtion @ $10k. Spending $10k is easier to swallow than $20k. (I made up all the $ numbers, I'm not sure where pricing is at now)

Well these are my random thoughts, I hope they inspire you.

<comment><AUTHOR> Thanks for this. I don't own a house and I live in a poorly insulated apartment building that gets full sun all day most of the year. It's a great candidate for solar panels but mostly out of my control. I already drive a civic and work from home, eating as sustainably as budget allows.

I'm wondering if there are some ideas out there on tackling the deeper cause. People are living longer, population is still growing and even if we were all 100% on renewable energy we would still be destroying the planet; the bugs are disappearing, the oceans are overfished, the bees are dying and we're even extracting an unsustainable amount of _gravel_ for goodness sake.

Something along the lines of changing the economic incentives to consume and expand, because short of terrible war or calamity, people in developing countries are still going to want refrigerators, cars, and beef and people in developed coutries aren't going to want to get rid of those.

<comment><USER3> > I'm wondering if there are some ideas out there on tackling the deeper > cause.

One rough way to think about it is I=PAT, where I is total environmental impact, P is population, A is affluence per capita, and T is environmental impact per unit of affluence.

Population has grown exponentially, per capita affluence has grown dramatically, and reductions in the last factor T haven't been able to keep up.

Worse, if you consider the "goals" of our major systems of economic organisation - or at least the observed behaviour - they aren't set up to minimise I, or even really consider it - it's more like our ways of large scale cooperation are focused on economic growth, i.e. roughly trying to maximise P*A.

If you live in an affluent western "free market" democracy it is probably politically difficult to push for major reduction or limits to population P or affluence A.

In terms of what can be done, it's probably better to focus on smaller scope/smaller scale problems. Not realistic for one person to solve the whole world's problems. If you can help push politically to regulate environmental impact in your area of local politics, that's probably very helpful. Not necessarily aligned with skills as an engineer, but this is probably more valuable than building something within current political/market framework.

If you're able to set up a small business or not for profit that is able to help others save money with side effects of reducing environmental impact, that's probably also helpful. This is less ambitious and isn't tackling the main root causes, but is something that is more in your control.

</comment></comment></comment><comment><USER4> I think anything that promotes or supports any of the following in some fashion would be good:

Passive solar design or solutions

Pedestrianism (walking, biking and using public transit instead of driving everywhere)

Eating lower on the food chain

Living more spartanly

FWIW, this was my idea of how to save the planet with potty humor and a website:

[http://peeonatree.blogspot.com](http://peeonatree.blogspot.com)

No one actually cares and I have no idea how to develop it or measure impact. It is going nowhere fast.

</comment><comment><USER5> 1\. aggregate a list of services that do free electronic and chemical waste pickup. I have to wait to get a flyer in the mail telling me someone would come by in the wee hours of the morning to do a special pickup. Would be helpful if this info were more handy.

Or better, get a community running locally to do these pickups every week across the neighborhood.

2\. Buy LED bulbs, environmentally friendly household cleaners, etc in bulk from china, and sell them at cost on Amazon. Don't try to make a large profit on environmentally friendly products -- just make them more affordable.

3\. Gardens these days are oddly biased toward aesthetics rather than local vegetation. Gather the advice of local botanists and educate folks about what trees/flowers they should plant in their yards. Insect life is decreasing, but with the right gardens, some of it can come back. For flowers, you can arrange a service to have households place pre-orders during the winter months, and then hire a local nursery to grow saplings specifically for them to plant in spring.

4\. Make a vegetarian/vegan yelp. I can't rely on yelp reviews since most folks eat meat, and their opinions on food taste/quality aren't very useful. The only reviews I can trust are those for restaurants called "Veggie House" or some similar variant. Vegetarian food isn't a marketing strategy, its just food that can be served everywhere.

5\. E-commerce site for environmentally friendly clothes. Jeans, for example, are incredibly polluting (over 1k gallons of clean water, loads of pesticides used in cotton, artificial dyes, etc). I'm not loyal to levi's, calvin klein, or whatever. Those are just the brands on the racks. Give me healthier alternatives.

6\. Aggregate quality articles on environmental issues. That research paper on insect life dropping by 75% in 27 years has been making the rounds this week. There should be more of it. NASA has a ton that aren't outdated. Start off with a weekly newsletter -- I'll subscribe If people get enough exposure to it over time, they'll start to change their minds (or tune it out, but that's always the risk)

7\. Work for the government. Immigration checks at US borders rely on shitty software that goes down often. Hundreds of trucks coming in from mexico are literally waiting for hours in the heat as their cargo rots. Same with at harbors -- $Bs in food waste.

<comment><USER6> For #4, there is happycow.net. It's great for finding vegan/vegetarian food in a neighborhood you are not familiar with.

</comment></comment><comment><USER7> [http://worrydream.com/ClimateChange/](http://worrydream.com/ClimateChange/) has some ideas.

<comment><AUTHOR> great piece, thanks

</comment></comment><comment><USER8> Become vegetarian

<comment><USER9> This. If you want a direct, measurable impact/reduction in impact, go veggie.

<comment><USER10> I think the idea of going 100% or subscribing to label scares off a lot of people. Just reducing meat consumption has an impact. See my comment above.

</comment></comment></comment><comment><USER11> I was thinking about this the other day.

You could get involved with a tech company that has the potential to reduce carbon emissions. Say if Uber or Lyft decided to create an eco option for electric cars etc.

I did see [https://preciousplastic.com/](https://preciousplastic.com/) posted on here a few days ago. That is a great way to individually contribute to helping.

You could also build a side project that helps in some way.

<comment><AUTHOR> Nice, I didn't see their posting. Interesting idea.

</comment></comment><comment><USER12> You could contribute to open source projects with an environmental focus. I don't have any particular recommendations unfortunately.

</comment><comment><USER13> by writing efficient code</comment>


Show HN: Alt Coin Tracker – VueJS - <AUTHOR> https://alttrack.github.io/ <comment><USER2> Quite useful and minimalist. If I may suggest an improvement, the tool would be better with the option to show the latest price graph for each currency.

<comment><AUTHOR> I plan to add a very small graph, just to indicate each coins direction. At some point, I'd like to be able to click on a coin and see detailed graphs and other information, news & tweets about the coin maybe.</comment></comment>


Hiten Shah on VC funding vs. bootstrapping and how to determine 'grit' [video] - <AUTHOR> http://techcrunch.com/2016/03/04/kissmetrics-hiten-shah-on-vc-funding-vs-bootstrapping-and-how-to-determine-founder-grit/ <comment><USER2> Note that this is a video interview.

<comment><USER3> Ironic how videos are such low-bandwidth ways to communicate compared to good writing. You have to wait for them, you can't scan through them to gauge whether they are good quality, sometimes you're not set up to listen to audio, etc.

<comment><USER4> In the interview, HS says he listens to everything at 2x speed.

I've felt like you, that video/audio is too slow and cumbersome, and so have eschewed it as a learning method, except as background for some other task. I'll have to give his 2x method a try.

I could see an opportunity for a "Pocket for audio" app, that (1) saves a clip for listening at a good time, (2) auto-transcribes it so you can scan for content quality or clip the part you want to hear, and (3) makes it easy to speed through at 2x or skip dull parts.

<comment><USER5> Youtube lets you speed up playback

</comment></comment></comment></comment><comment><USER6> I'd like to listen to this as a podcast later -- any idea how I can get hold of it, without running a Flash video player in a desktop browser?

<comment><USER7> Not sure if this link will stay valid, but this is the file that the audio player is linked to: [http://hwcdn.libsyn.com/p/f/2/5/f2559823f35854c8/20_20VC_FF_...](http://hwcdn.libsyn.com/p/f/2/5/f2559823f35854c8/20_20VC_FF__Hiten_Shah_on_VC_Funded_vs_Bootstrapped_Businesses_and_How_He_Decides_Which_Startups_To_Advise.mp3?c_id=11108651&expiration=1457294475&hwt=48941017266b8ed6d1dfc48294043d5c)</comment></comment>