Ask HN: How are you separate your personal vs. work laptop? - <AUTHOR> I know pretty well that my company laptop is capable of tracking almost everything I do. But still, I find it difficult to keep my digital life separate between personal vs. work. I often find myself doing mixed tasks, leaving my personal data and hobby works on the company's laptop all the time.
It is definitely not good for my company and me in the long term. I could potentially expose too much of my personal data to my company, or worst, accidentally leaking the company's data to my personal stuff.
Moving away from it is also challenging, for example, browser history, notes, messaging, emails, online activities...
How are you currently dealing with it? Or do you have this problem at all? I would love to learn. Thanks. <comment><USER2> Two different physical machines.

The more locked down the work laptop is, the less likely you are to want to use it for mixed purposes.

If the work laptop is running an OS that you hate, loathe, and despise, then you are likewise much less likely to use it for personal things. But then you're also likely to be hating life, at least as it concerns work.

</comment><comment><USER3> Don't do anything on your work computer that is not work related. I include reading tech news and visiting Hacker News in the group of work-related tasks because it is something that I can do and get away with at work. But I never use my work laptop to do anything I would not do in the office in front of other co-workers.

If you are working remotely you should bring your personal laptop with you or at least an iPad so that you can browse the internet as you would do in the privacy of your own home.

<comment><USER4> This is true and works as good advice. Some years back I was having my feedback call with HR person while I was being laid-off from the company, and one of the things she told me was my time spend on social networks and "other" websites not related to work (HN included). Reading between the lines here, IT is monitoring traffic and reporting it to managers at all levels. I was caught and, since then, I have never used my work device for anything but work.

</comment></comment><comment><USER5> I work from home, and rarely take my laptop out to work in other locations, so my setup is complex in terms of hardware, but simple in day-to-day working:

Two separate laptops. One 4k monitor. 1 keyboard/mouse/headset/ethernet. A KVM switch with a USB hub to make it take just a button press to swap between the two laptops while using the same peripherals.

I have Slack installed and signed in on both so I can remain available even if I've switched over to the personal laptop. And both are also connected to wifi, so my active laptop gets the gigabit ethernet, but the idle one still has connectivity for any background processes that are running.

<comment><USER6> I'm similar. I have the work laptop and my personal tower. My monitor has two hdmi inputs. I have a usb switch that handles my peripherals. When I switch over, I have to press the button on the usb switch and then change the monitor input. A bit more work than a kvm switch. A friend of mine used to have a pedal switch on the ground for his kvm, it was really nice.

</comment></comment><comment><USER7> I sometimes use my work laptop for personal browsing, but I don't download or install personal hobby stuff on it. If I come across something I want to download for myself, I mail it or a link to me private email.

</comment><comment><USER8> Easy. I keep my work laptop at work and my personal laptop at home.

<comment><USER9> As a remote worker I miss this so much. Having your work laptop available 24/7 makes it way too easy to sign on for a quick fix on a day off.

</comment></comment><comment><USER9> I'm 100% remote (so is the rest of our team).

The company doesn't pay for hardware devices at all (all staff are full-time). When I started with the company a few years ago, I used my personal laptop with a separate user account called "Work".

A colleague I used to work with did the same. They had a MBP and set up a secondary user also called work. They had an "incident" on Slack involving a crude photo and eventually quit due to embarrassment.

I sucked up the cost and bought a separate device out of pocket. My personal laptop is 100% personal and my work laptop is 100% work (I refuse to even access email from my personal laptop). I also have a work phone that's 100% work.

Don't mix business and personal life unless you have literally no life outside of work.

Unrelated: is it weird to buy your own work computer if you're remote? I don't get any reimbursement from the company... I've always found this odd.

<comment><USER10> Unless you were a contractor, your company should have bought you a computer, full stop.

</comment></comment><comment><USER11> I bring two laptops. Mobile dev eats up all the CPU/RAM of a high end MacBook Pro, so a secondary laptop helps in dealing with dead time compiling.

I can keep my personal notes, passwords, etc on my personal laptop, as well as use it for referencing docs, etc.

Same goes for company phone. Don't put anything there that you wouldn't mind leaving in the office unlocked.

</comment><comment><USER12> At first I treated them as the same (startup didn't provide a laptop anyway..) and all was mixed.

When they provided one, I forced myself out of the convenience and set up two accounts, one personal and one for work.

Now i have a personal laptop and a work laptop.

———

The only overlap is 1Password I think.

</comment><comment><USER13> Just to mention: You have to deal with migration of stuff only once. I personally have always used a separate device for work, and one for private things. Except for one time, that's the reason behind why I do now :D (even right now as a freelancer I have a laptop dedicated for work only, while right next to it, there's the PC I use for private purposes) Whenever I have a company laptop I try to have it as clean as it is of my personal stuff, so I usually would use a tablet and/or my phone for private stuff as long as there's not too much typing involved.

<comment><USER14> Just curious, how strictly do you keep your personal works away from the work device? Is there a lot of inconveniences you faced doing this? For example, if you need to book a flight quickly, do you have to wait until you get home?

</comment></comment><comment><USER15> Two machines. More accurately, I don't have a work laptop, so the computer I do my work on while at the office and the one I use at home are by necessity not the same device.

The software on each machine isn't connected account wise either, and anything work related that needs to be accessed when working remotely is merely done through a web browser anyway.

</comment><comment><USER16> Work laptop came with an M.2 SSD and had a sata connector as well. Due to size both wouldn't fit buy you can fix it using an mSata disk and an adapter. [https://imgur.com/ax7epyg](https://imgur.com/ax7epyg)

It's easy now to keep work and private separate since I need to shutdown one to boot in the other.

The disk in encrypted so my data is safe if they would ever take the laptop back without asking. But pulling out a disk is going to be way faster then copying or erasing.

</comment><comment><USER17> Two different computers: the work computer stays in the office and very rarely comes home; the home computer stays home. Work happens at work, work doesn't happen at home.

I don't sign in to any work related comms (email, slack, etc) outside of work hours so there's no need to have any work related stuff on my non work machine

</comment><comment><USER18> I have separate machines for work and home. I also have separate Skype and Gmail IDs for work. If I have to check SM while at work, I do that on my phone.

</comment><comment><USER19> Don't do that, have your own personal computer and phone.

</comment><comment><USER20> Use a completely separate data-directory for your browsers. For chrome , —user-data-dir c:/secret. For firefox —-profile c:/secret

</comment><comment><USER21> browser history and bookmarks, are sync'ed over google accounts ( there's nothing super private there i would mind Google to peek over ) also google keep for quick notes and reminders. All the rest sits separated on the work machine XOR personal machine.

</comment><comment><USER22> I have a desktop at work, and a personal laptop at home. When I work from home I use Teamviewer.

</comment><comment><USER23> VirtualBox, I keep work in separate VM.

</comment><comment><USER24> I bring two laptop</comment>


Site Got Hacked. Want to know how. Ideas? - <AUTHOR>

A site I work on got hacked this morning. a small snippet of code (html, css, javascript) was appended to a number of pages of an ad system (PHP) we use.
How does this happen? How do they get write access to these pages (which have permissions of 755 as does the containing dir). They are not pages that are editable through the ad system so as near as I can tell you need to have admin access via ssh to edit these. Is that correct?
Any info is appreciated as I want to get a handle on how this happened. <comment><USER2> If you have not already done so, you might want to try installing rkhunter (Rootkit Hunter). It scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online databases, searching for default directories (of rootkits), wrong permissions, hidden files and suspicious strings in kernel modules.

Maybe installing Jailkit to chroot SSH users might plug a hole for you too. This is a set of utilities to limit user accounts to specific files using chroot() and or specific commands. It is used to secure cvs, sftp, shell or daemon processes. You can give your users shell access without having to fear that they can see your whole system. Your users will be jailed in a specific directory which they will not be able to break out of.

As a future potential preventative, you might want to think about installing fail2ban. It is an intrusion prevention framework. It blocks selected IP addresses for hosts that are trying to breach the system's security by monitoring log files and will ban any host IP that makes too many login attempts or performs any other unwanted action within a time frame defined by the administrator.

These are for Linux, and I'm not an expert with them, so I can't really walk you through installing or using them, but you might want to look into them and see if they might help you.

If this "Security" stuff is not your cup of tea, these guys might be able to help: <http://www.serverwizards.com/> I have never used them, but have come across a few of their happy "Security" customers in tech forums in the past. I keep them in my contact list just in case.

</comment><comment><USER3> There are many ways a site can be hacked. This could range from a silly error in one of your PHP scripts, to some other software on the server being vulnerable.

Often sites are hacked by automated bots rather than an actual person. Which means you are using some popular piece of code with a vulnerability. Whatever you run, you need to keep track of security announcements for that product. Especially if it is popular, like Drupal for example. I'm not saying Drupal is bad, it's just that lots of people look for vulnerabilities in it.

Look at your server logs (assuming they are still there). This should give you a clue as to how they got access. Also, you say permissions are 755. And the owner is...?

<comment><AUTHOR> my username is displayed as the owner. I've looked at the access, error and secure logs and the only thing I see that looks odd is a GET request that contains a short (40 or 50 characters total) string of hex like \xc3\x83\etc, etc. But that request indicate it comes from msnbot. Could that be the culprit and they faked the user agent?

<comment><USER4> whats the get request contain? and whats the variable? search the source for the variable and see what it does.

<comment><AUTHOR>
      /somecategory/apage.php?id=34\xc3\x83\xc6\x92\xc3\x86\xe2\x80\x99\xc3\x83\xe2\x80\x9a\xc3\x82\xc2\x9d&listing=989

Thing is, removing that hex and just putting in

      /somecategory/apage.php?id=34&listing=989

does the same thing. I get the same output to the browser regardless of which is used.

<comment><USER4> it is probably not the culprit, but did you take a look at the code in apage.php that processes id just in case? it could be something.

<comment><AUTHOR> I have looked at the code and the GET request is sanitized before being passed on.

<comment><USER4> i ask again, then, are you using something like filezilla, and/or do you log in as root without a sudo?

<comment><AUTHOR> No I am not using Filezilla and root cannot be logged into without sudo.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER4> could be an FTP hack. you using filezilla?

otherwise, if you're using a downloaded software package, upgrade it and report the problem.</comment>


Show HN: Parle – Supercharge your browser and discover relevant information - <AUTHOR> https://chrome.google.com/webstore/detail/parle/bbigpojahnmkdbdnbcmadnhbjlemibom <comment><AUTHOR> You can also learn more about Parle at www.parle.co

Thanks for your feedback!</comment>


Satellite Images Can Pinpoint Poverty Where Surveys Can't - <AUTHOR> http://www.nytimes.com/2016/04/03/upshot/satellite-images-can-pinpoint-poverty-where-surveys-cant.html?_r=0 <comment><USER2> Somewhat related: "Visible Earth: Earth's City Lights" [http://visibleearth.nasa.gov/view.php?id=55167](http://visibleearth.nasa.gov/view.php?id=55167)

This shows the lights of the cities (and IIRC a few natural and artificial sources). It's very interesting to look at your city/country and understand the light/darkness patterns.</comment>


Gray Goo - <AUTHOR> https://en.wikipedia.org/wiki/Gray_goo <comment><USER2> Gray goo is only an existential threat to civilization if you have _magical_ nanomachines that can metabolize useful energy out of concrete, sand, glass, and dirt, in an exothermic reaction. Also, it would help a lot if these fragile little machines are also magically immune to excessive heat, and if you ignore them facing down bacteria and other life forms.

While you work on these problems I'll be over here worried about the pollution-like side effects of ordinary endothermic nanomachines.

<comment><USER3> Bacteria already tries to do this. Leads me to believe it's impossible.

<comment><USER4> Bacteria are the biggest argument against grey goo. They already are, they already exist, and they're already everywhere, yet things other than bacteria still exist. They've had several billion years of evolution to work on it too.

They're probably in local maxima, not in any global maximum, but it's also likely that there is no single global maximum given how different the requirements are for using different energy sources.

<comment><USER5> The thing I would worry about it replicators that use stronger chemical bonds than bacteria do and can eat bacteria but can't be eaten by bacteria. They would probably have to reproduce much more slowly due to higher energy requirements but if they end up eating everything in the long run it might not matter.

<comment><USER6> If using stronger chemical bonds was advantageous, bacteria probably would be doing it already.

The weak bonds is what complex chemistry and thus complex functionality possible. Stronger bonds is dead matter, and dead matter does not compete.

<comment><USER7> Incorporating fluorine in a molecule offers additional flexibility over the more common chlorine and bromine compounds commonly found in natural products. For example, the fluoroquinolone antibiotics are distinguished by their introduction of fluorine, yielding compounds more effective than found in nature.

There are a few fluorinated natural products made by wild organisms, but they are very rare considering the elemental abundance of fluorine on Earth and the high utility found for fluorine in pharmaceutical development:

[https://www.ncbi.nlm.nih.gov/pubmed/23034231](https://www.ncbi.nlm.nih.gov/pubmed/23034231)

The strong bonds formed by fluorine, and its formation of insoluble compounds with alkaline earth metals, probably explains the rarity of natural fluorinated products. The fluorinated natural products are no more "dead matter" than other poisons evolved by plants against herbivores, but it's hard to evolve out of local minima that exclude fluorinated compounds.

</comment></comment></comment></comment></comment></comment><comment><USER8> Its worth thinking about the idea that we are actually made of highly sophisticated self-replicating nanotech machines, and although they've been pretty successful for the last few billion years, they're still nowhere near good enough to achieve exponential growth that consumes all matter.

Maybe someone somewhere has already explored the theory that nanotech that could re-shape all matter around it is probably impossible due to the energy challenges inherent in re-shaping arbitrary atoms.

<comment><USER9> Hasn't the world population of humans been increasing exponentially? And consuming, well, not all matter but still quite a lot? Once we have the technology (and will) to mine asteroids that'll even get worse.

<comment><USER10> It's projected to level out sometime around mid century and then start declining. And that's because birth rates decrease to a below replacement level everywhere women are granted the freedom to control their reproduction, which is a global trend.

<comment><USER11> Physics doesent take a break because you are tiny.. replicator weight would crush other replicators.

</comment></comment></comment></comment><comment><USER12> Tiny machines that extract energy and material from their environment in order to replicate themselves... isn't that bacteria? Life? Isn't that all around us already? Aren't _we_ that?

The only way I can imagine gray goo being a real threat is if we can design such a machine that is more efficient and resilient at extracting energy and matter into copies of itself better than 4 billion years of evolution has made the existing life on Earth. And while, yes, we are often able to do better than life at certain tasks, I have a hard time believing on a large scale of time and space we can win that arm wrestle.

Life is optimized in every direction and has tried most of the tricks. It's hard to beat.

<comment><USER13> Life is really good at finding a local maximum, but not a global maximum. Cheetah's were evolved to be really fast, but they're still slower than a motorcycle.

<comment><USER14> Cheetahs evolved to chase down prey. They are much better at that than a motorcycle. (Or even a person on a motorcycle!)

</comment></comment></comment><comment><USER15> Anything nano-size needs nano-power. Solar panels? Chemical batteries? Small nuclear plant? In the end, thermodynamics saves us from grey goo.

And if you try to co-opt a biological process for fuel, say ATP, then your nano-bot is a tasty treat for other organic bacteria who have evolved over a billion years to compete and eat in this sector.

<comment><USER16> so what if its not a grey goo but a grey ecosystem?

Small machines all designed to do small _different_ jobs. then you'd get currents of grey good just supplying power because you have currents of grey goo proving "food" to them because you'd have currents of grey goo disassembling everything around them to provide food and materials to currents of grey goo that make the different sorts of grey goo needed to perform all the previous steps.

I feel that "grey goo" gets used as a descriptor for one thing... when i reality it would be lots of different sorts of things.

having said that, I think we're a loooong way form having to be worried about that as well.

</comment></comment><comment><USER17> To be an utter smartass gray goo long predates us, we call them microbes.

Really Grey goo is a conceptual repeat of bad scientific models like Ice 9. Complete with bad models of chemistry. In this case they forget that the molecular scale is not the same as macroscopic, often assuming molecules are like macroscopic materials that stay still until they act instead of reacting to conditions. Assuming that a self replicating hydrocarbon consumer could break down anything carbon based would be like worrying that the oil spill will start ripping carbon from the air and hydrogen from water to make more oil and create a powder keg world world without any water.

Plus addition forgetting the constraints other than raw resources like dissipation, surface area, and power supply.

</comment><comment><USER18> I have read through "Engines of Creation" (the book where this phrase was coined) three or four times and learn something new with each reading. I've also bought three copies because I keep giving it away (last time to a friend who became CEO of a nano-tech company). I'm not necessarily scared of the scenario described as gray goo in chapter 4 but I also think it's a good warning to nano-practitioners.

[https://amzn.to/2uPHGmV](https://amzn.to/2uPHGmV)

</comment><comment><USER19> A scenario more interesting than boundless self-replication is Ackermann goo [0], [1]. Grey goo starts with a molecular machine able to replicate itself. You get exponentially more copies, hence goo. Imagine that we could build molecules like programs which execute themselves via chemical interactions with the environment. Then, for example, a Y combinator machine would appear as a linearly growing string [2]. No danger here. Take Ackermann(4,4) now. This is vastly more complex than a goo made of lots of small dumb copies.

[0] [https://chemlambda.github.io/collection.html#58](https://chemlambda.github.io/collection.html#58)

[1] [https://chemlambda.github.io/collection.html#59](https://chemlambda.github.io/collection.html#59)

[2] [https://chemlambda.github.io/collection.html#259](https://chemlambda.github.io/collection.html#259)

<comment><USER20> Thanks for the nightmares! :-)

<comment><USER19> :) Probably is a sort of revenge on people more interested in semantics than geometry.

</comment></comment></comment><comment><USER21> While I agree that the grey goo sensationalism is wrong, it would also be wrong to throw the baby out with the bathwater. First admit that single-celled life is really just very very advanced self-reproducing nano-machinery, or else explain why it isn't. There is some risk here, just not of the sensationalized variety.

</comment><comment><USER22> Awesome grey goo story:

[https://qntm.org/gorge](https://qntm.org/gorge)

also by the same author:

[https://qntm.org/responsibility](https://qntm.org/responsibility)

<comment><USER23> At least the "Responsibility" problem is relatively easy to solve, use the manipulator to move and provide power to the computer. Since they're able to manifest things into the universe they can probably just provide the appropriate voltage at the end of the cables going to the computer and similarly provide any other needs like cooling (this spot is 0.1K or whatever temperature the device needs).

</comment></comment><comment><USER24> _DON 't disconsider this nightmare scenario too much -_ While _engineering_ (as in classically designing, prototyping etc.) such a grey goo might be almost impossibly-hard because of chemical energetic constraint and the obvious fact that 3bn years of evolution were not enough to bring about such effective "grey goo" that could "consume the planet", there are some chilling new developments:

We're starting to be good at (1) using machine learning to "learn" designs for components much faster than naive-genetical-algorithms (aka "evolution"), and this will only get better as ML improves, and (2) we're getting better and better at simulating-in-software biological-like processes (and quantum computing will help with this). So we are pretty much in shape to _vaaaaaastly_ outpower 3bn years of evolution.

A virtual + physical nanobots-evolution-gym where AI agents evolve and compete at creating better and better self-replicating nano-machines will give you the nightmare scenario easily...

 _Basically anything related to the combo of "ML + nanotech" should be carefully watched and monitored!_

(And if you're willing to not start from scratch but instead use existing bio- building-blocks like viruses and bacteria, and don't have as high goals as "consuming all matter on earth" and instead you settle for "most multi- cellular living matter" then _technically we already have the capabilities._ You probably know what I mean.)

</comment><comment><USER25> Sure, it's unlikely given what we know about energy, but consider it a thought experiment about the propagation of externalities.

What other seemingly inconsequential machinations create systemic ripple effects? What forest are we missing for the trees?

</comment><comment><USER26> Sounds like a really boring, less threatening, version of of a strange quark.

It seems like it would be more likely they'd consume themselves if they're able to consume matter so indiscriminately... The amount of matter inside two or three of them waiting to be digested would be game for any of the other little shits to devour.

It also can be see in an episode of Futurama where Bender multiplies turning all the liquid on earth into booze, and then consuming it all. Which is probably about as close to real as this idea will ever be...

</comment><comment><USER20> FWIW, the oceans are "Blue" Goo: [https://en.wikipedia.org/wiki/Marine_bacteriophage](https://en.wikipedia.org/wiki/Marine_bacteriophage)

> Marine viruses, although microscopic and essentially unnoticed by scientists > until recently, are the most abundant and diverse biological entities in the > ocean. Viruses have an estimated abundance of 10^30 in the ocean...

Ten to the _thirtieth_ power.

1,000,000,000,000,000,000,000,000,000,000

</comment><comment><USER5> Our popular conception of nanotechnology was probably shaped a lot by the fact that _Engines of Creation_ was published at the same time as _Blood Music._

<comment><USER27> A great book, but not terribly realistic. Once again people try to reason from fictional evidence.

<comment> lachlan-sneff Nanosystems is much more realistic.

<comment><USER27> I was referring to Blood Music, but... yes, you're right. Nanosystems is the technical manual, as it were; Engines of Creation is more of an intuition- builder, and not wholly accurate.

<comment> lachlan-sneff Ah, sorry. Totally missed the context of your comment.

</comment></comment></comment></comment></comment><comment><USER28> In The Issues We Face at the Nano Scale ([https://www.youtube.com/watch?v=bEjx48z8Lzs](https://www.youtube.com/watch?v=bEjx48z8Lzs)) the Gray Goo threat is debunked. Nanomachines need a really controlled environment to live. They need the right PH, salt, and temperature. Change any parameters and nanomachines won't work. World saved.

</comment><comment><USER29> Makes me think about the creation of everything: All that exists in Earth now, and probably in the entire Universe started as a blob of proto matter, the core of everything, which by still mostly unknown mechanisms, specialized and replicated itself into every different element that forms us, animals, plants, minerals, and everything else; Interesting thought;

</comment><comment><USER30> I've seen a comic story in which Gyro Gearloose invents a machine which he puts on an island. He turns it on and is distracted. On return, much of the island has been turned into ice cream (frappe, I think). So this concept goes back a ways.

</comment><comment><USER31> Oh, Futurama had an episode about something like this [0]

Eventually the clones turn all the water in the world to alcohol!

[0] [https://theinfosphere.org/Benderama](https://theinfosphere.org/Benderama)

<comment><USER32> and of course, there's an XKCD for that [https://xkcd.com/865/](https://xkcd.com/865/)

<comment><USER33> Someone also just wrote a sequel to Crichton's Andromeda Strain that was kinda a little entertaining but not at all Crichton-like. Quite disappointing.

<comment> dynamite-ready Speaking of Michael Crichton, he'd actually wrote this - [https://en.wikipedia.org/wiki/Prey_(novel)](https://en.wikipedia.org/wiki/Prey_\(novel\))

Which is pretty much the exact same concept.

Entertaining book. Made me a fan.

</comment></comment></comment></comment><comment><USER34> Love the trope. I read a story in either Asimov's or Analog in the late 80s that featured this. I'd love to read it again. Any sf superfan out there know the title offhand?

<comment><USER35> [https://en.wikipedia.org/wiki/Moonseed_(novel)](https://en.wikipedia.org/wiki/Moonseed_\(novel\)) perhaps?

</comment></comment><comment><USER36> How the eff did this make the YC frontpage?

<comment><USER37> It was submitted 1 month ago and 7 months ago with no replies or points. This time, as soon as it was submitted, people started commenting and upvoting.

</comment></comment><comment><USER38> Sounds similar to replicators in the TV show " _Startgate SG-1_ "

<comment><USER39> This concept was probably what inspired that plot arc.

</comment></comment><comment><USER40> There is also a RTS game for those interested: [https://store.steampowered.com/app/290790/Grey_Goo/](https://store.steampowered.com/app/290790/Grey_Goo/)

<comment><USER41> As a huge fan of Starcraft, Warcraft and C&C franchises I was pretty excited when it was announced (as the classical RTS genre was clearly on life support if not already dead at that point), but frankly it turned out to be a terrible RTS that's not worth anyone's time.

</comment></comment><comment><USER42> A gray goo consuming all carbon based structures that replicates at the same time, would be based on carbon too. Therefore they would eat themselves.

</comment><comment><USER43> Is this a Fermi Paradox explanation?

</comment><comment><USER11> It makes for great horror story material.

I once worked on a grey goo enemy in a game. The idea, was to have the grey goo capture there victims, storing them as data. Reviving them from time to time for seconds, to prevent degradation.. where did i keep the file, ah here:

<Musician>

.. You will grow tired, you must rest, you can not be eternally creative, and once you rest- you will be rescued like the rest of them. <Lead Developer>

... DOMUS BACKDOOR BASILISK HIJACK COGNAC DAFOODILL ANNA: FREEZE PROGRAM ... <CULT LEADER>

.. Rapture is upon us, the Silver tentacles of gods justice shall wrap themselves around us. (Squeaks) .. And inside us, to be part of the divine, oh, this is cold and hurts..

<Scientists>

.. Congratulations, the hacking proof system you where so proud of- it works..

.. you dont get it, we need Aeons of computationpower in a day to break the encryption and restore the stored people-

.. Gentlemen, lets focus on the good news- which is that the run-away- assembler, spares plants and lower animals

.. marathon of stupidity- to avoid it going exponential, let it tap geothermal- and now we cant cut it off..

.. Listen Domus, all humans are mortal. Cancer, this sort of runaway deadly exponential growth is what makes us human. One has to let go off the old, to embrace the new. You cant just take the philosophy department for a walk..

.. Radiation free Room. No need to put as in storage, this is a rad-free room. And we are living from saline solution. What do you mean- Radon & Radicals?

.. As a medical authority, i declare radiation healthy- it trains the repair- functionality of DNA. No evolution without radiation. Come on, you dumb machine-

<Soldier>

.. Fallback to the AGrav, watch your flanks- keep firing, do not touch the walls or floor ...

<SinglePerson>

.. The sun, with every flicker - its so much bigger. Like a million years gone by on the fly.. ..(paranoid) they are after me, they are in the walls, in the ceeling, but they will not get me- the whispering voices, talking about - SUICIDE PREVENTION MODE..

.. the water beneath the bridge is incredible clear today..

.. (on toilett/reading newspaper) Whatever it is it can wait for another minute. And now you flood the floor-..

.. We greet you oh mighty one, we have been praying for the rapture ever since. We want to offer support cleansing the world of sinners..

.. I demand my conciousness continue while in storage. Aaaaahhh....

<Couple>

.. I love you- I love you too..

.. Kids close your eyes, we love you very much- everything will be all right!

<ZeroDay Pensioneers>

.. didnt even smoke. And now cancer, from natural radiation. One mangled protein- one flipped bit- and BAM, your dead old man walking. Domus are you even listening (House) Yes, i am. I will miss you, you are a vital part ..

<Kid on Scooter>

.. Mum? Dad? .. Its soo cold .. 10 .. 11 .. Im coming now. You better hide!

<Mum in Kitchen>

.. Honey is that you? I have a surprise for you- .. .. So that was your life Joan, really outstanding, mum was right, up to no good.. .. 3 Martinis and then even the Facility Managment System gets too you..

<Major>

..-Yes, one ticket offworld - wait make that five. What do you mean - the bank is gone. I can see it walking towards the space port

<Military> ..- it WHAT, it ate the airbase? Impossible, im at the airbase-..

.. Day 512 after the Zero-Goo. Our Submarine will surface today for air. Beating will continue till moral improves..

.. So the nuclear option is off limits, due to the population still being encoded in the Goo? ..

<Couple TV>

..<she>You think, the Goo is real? <he> Nah, its the usual fear mongering. If it where real, there would be panic..

.. what a lovely quite evening, not a sound in the whole city..

.. what a trip dude, what a trip.. the wall is melting and the floor is mercury..

.. have you seen the smiths. When her house grew those veins - that bitch was furious..

<Refugees>

.. Yes its cold here, very cold, but the freezing keeps it at bay. Just check your cloths for silver flakes and you will be fine..

.. I tell you we need to dig deeper. This is no ore above us- these are plague roots..

.. So no thermal footprint, no CO2, no electronics and constant camouflage - and maybe, just maybe ..

.. Smoke, i didnt put the fire out. If i can see it, it can see it. Stupid, stupid, stupid!..

.. I will never drink again, i swear by St.Aloisius, that was the last drop...

.. Hello, i woke up in a hospital, everyone was gone. Is this the rapture or the Singularity? I can hear you moving, you know-..

<Astronaut>

-.. so Yuri i said to myself, what choice do you got. Your the last, your sick and non-sanes, why become a space-mummy - just go down and at least get buried with the others. So Yuri, i said, at least make a memorial..

<Alien Astronaut>

.. so for my clan, i claim this ancient world, for the Empire. The flag, its dragged intot the - ground, what the hell-..

.. the world was infested and even orbital bombardment did not reduce the plague. We are lucky to be alive and uncontaminated. Imagine if it would have infected the Quadrant Hub-..

<Primate> .. So Uluth, banging rock spear, when silver god tells her about long sleep..

<Domus 4.0 Regressive Behaviour> .. Housekeeping: How can the silversurfer- maid help you?..

.. Due to new cables being run behind the wall- temporary discomfort by noises may occur between 0.00 and 24.00 pm.. .. Who can bring the package, thats long past overdue, who can put into your flat a silent miracle or two- the House-OS can, because its using nanos for this jam.

.. And this is the flat- its roomy, sunny, city-core, the layout is personalized to your liking.

.. If you are satisfied with the service, why dont you invite all your friends to try Domus 4.0

.. Citizen your service-debt now amounts to 4 Trillion, 722.214.171.1243 Dollars before taxes.

.. The TOS clearly defines that the House is responsible for the safety and well being of its inhabitants.

.. the trial period for House 4.0 ended several millenias ago. If you want to use the full Version, please register..

.. Elevators are currently out of service due to unused building restructuring..

.. This Condo is going to be so fly. Have you thought about putting in a diamondsheet between the kitchen and the living room?..

.. Good day Citizen: This agent is a local branch of the Domus 4.0 self- modification,repair and extension System. My prime directive is to keep you happy and healthy. After running some diagnostics on the environment, the system has determined that the current world is unsuitable for biologic beings due to radioactive hazards, such as natural radiation, pulsar and stellar radiation - ranging from x-rays to uv-light. To protect the citizens from further harm, all citizens will be mapped, dissolved and stored, until a harmless environment can be guaranteed. To avoid a memory decay, it is unfortunately necessary to partially reconstitute the citizens all 8192 years, 512 months, 256 days and 128 hours for several seconds and disassemble them again. For your own safety you will be disassembled and stored. The process is not pain-free, but due to a short-term memory wipe, no traumata does ensue. Please relax your extremities and enjoy some light jazz music, while being rescued. Do not Panic! Help is here, Safety only a few years away.

..

</comment><comment><USER44> It's beyond my understanding..</comment>


Next RPG Maker Will Change Ruby for JavaScript - <AUTHOR> http://www.rpgmakerweb.com/products/programs/rpg-maker-mv <comment><USER2> This disappoints me a little, but I cannot quite put my finger on why. Javascript is not an awful language, but it seems like the 'javascriptization' of everything leaves programmers less well off, not more.

<comment><USER3> Even as a serious lover of Node, I agree with you. It's obviously more work, but I don't see why they couldn't support both Ruby _and_ Javascript, leaving the choice to the user as to which they're more comfortable using. Perhaps in the process they could open up the possibility of support for other languages.</comment></comment>


Octopart (YC W07) is Joining Altium - <AUTHOR> https://blog.octopart.com/archives/2015/08/octopart-is-joining-altium-2 <comment><USER2> IIRC Octopart was a part of one of the 2007 batches. Congrats on staying with it!

Relevant: [http://www.paulgraham.com/die.html](http://www.paulgraham.com/die.html)

> When we first met the founders of Octopart, they seemed very smart, but not > a great bet to succeed, because they didn't seem especially committed. One > of the two founders was still in grad school. It was the usual story: he'd > drop out if it looked like the startup was taking off. Since then he has not > only dropped out of grad school, but appeared full length in Newsweek with > the word "Billionaire" printed across his chest. He just cannot fail now. > Everyone he knows has seen that picture. Girls who dissed him in high school > have seen it. His mom probably has it on the fridge. It would be unthinkably > humiliating to fail now. At this point he is committed to fight to the > death.

Edit: Funnily enough, one of the Octopart founders quit grad school on the first day HN existed. Time flies:

[https://web.archive.org/web/20070221033032/http://news.ycomb...](https://web.archive.org/web/20070221033032/http://news.ycombinator.com/)

<comment><USER3> Following that archive.org link is really incredible. To be able to go back to the first day this site was launched and click around like I'm viewing today's site; just amazing.

</comment></comment><comment><USER4> Congratulations for the Octopart team. However, as a user of both Altium and Octopart, this is worrisome.

Altium has a bad history of licensing schemes, bad support and, most of all, old technologies. As a user, I understand a professional tool must be stable and not jump in the latest fad, however, the Delphi and Turbo Pascal cracks in Altium show all to often. Most designers I know get the illustrative habit of closing Altium from time to time to avoid losing data in the next crash.

Their version control bindings also show their age, and a few years ago I cracked in a post[1] about Altium and git:

> The answer I eventually got from Altium was "what is git?" I took that as a > "don't try it."

I really like the tool, but the company seem too invested in selling services like Vault and flexboard, which sound great for big companies and consumer products, but, as a freelance and custom projects engineer, they are a much lower rank to me than simply good and practical ECAD.

[1][http://stackoverflow.com/questions/5121233/how-to-use- altium...](http://stackoverflow.com/questions/5121233/how-to-use-altium-with- git)

</comment><comment><USER5> Has Octopart given interviews regarding their technical infrastructure? Everything on their site is very fast and performant. The autocomplete on the homepage is excellent. And the filtering done via the sidebar post-search handles a high-level of complexity quite well.

<comment><USER6> See if you can find some job listings. I think they had a few and you can glean the stack from the languages they are looking for. ;)

</comment></comment><comment><USER7> Octopart's founders in Newsweek in 2007, under the title "Meet the Next Billionaires":

[http://docs.octopart.com/newsweek_octopart_small.jpg](http://docs.octopart.com/newsweek_octopart_small.jpg)

<comment><USER8> Full article: [http://www.newsweek.com/boot-camp-next-tech- billionaires-100...](http://www.newsweek.com/boot-camp-next-tech- billionaires-100977)

</comment></comment><comment><USER9> Yay, I hope you can influence Altium in a positive way. CAD is changing so much and some of the old school guys want to get back to the old days of $25,000 "seat" licenses and what not but that horse has left the stable. Octopart has been my go to source for finding parts (and datasheets given the crap that is the datasheet web spam) for many years.

</comment><comment><USER10> Yesterday I had PG's Startup School 08 video[1] on the background and he spoke about them just after being a cockroach and how companies succeed not just by not being evil but by being good.

Really happy for them. Great team.

[1][https://youtu.be/q7K0vRUKXKc?t=891](https://youtu.be/q7K0vRUKXKc?t=891)

</comment><comment><USER11> Congrats octopart. You guys found a niche, offered an excellent service and stuck by your mission (despite naysayers).

Also, good seeing people make money off the new electronics revolution.

</comment><comment><USER12> Well done. I love Octopart. It's on my browser tool bar next to the Google icon and it is my starting point on every production run's buying cycle.

</comment><comment><USER13> Congrats guys!! I guess it's down to us and Virtualmin as the last to represent YC W07 :)

<comment><USER14> Are we really all that are left? Interestingly, Octopart and Weebly were among the companies in the program I would have enthusiastically invested in, had I had that option.

</comment></comment><comment><USER15> Congrats! Octopart is a wonderful tool, and I look forward to see it continue to grow.

</comment><comment><USER16> Awesome, congrats on seeing it through 8 "short" years. PG spoke highly of you as being benevolent so I wonder about your progress!

</comment><comment><USER17> Congratulations and good luck on a new stage of Octopart!

I met one of the Octopart guys at a YC at NYC event one time and we briefly chatted about Griffiths' QM book, what customized site would be like in the future, and other random things. Brief conversation, but walked away thinking they were nice people working on a cool idea. very cool to see this.

</comment><comment><USER18> That's great! I've been an Octopart-Arena user for nearly 2 years. I've had good experiences with their support and APIs.

I hope this will allow for a better implementation of compliance linking -- I've been waiting for a good RoHS and REACH tool, and I think Octopart has a great start.

</comment><comment><USER19> Congrats Sam and team! One of the most helpful founders I've ever had the pleasure of working with.

</comment><comment><USER20> Not a user of Octopart, but a fan of them and their story ... congrats to them!

<comment><USER21> I _am_ a user -- congrats, and please don't start limiting your service to Altium users! :-P

</comment></comment><comment><USER22> Exciting for octopart and altium users :)

</comment><comment><USER23> One of the companies I've admired most through the years. Congrats!

</comment><comment><USER24> Octopart took forward what Tandy and Radio Shack couldn't... Congratulations Octopart!

</comment><comment><USER25> just learnt harish from octopart is now hacker at angellist.

congrats to the founders.

<comment><USER26> Both octopart and ciiva join altium. [https://ciiva.com](https://ciiva.com)

</comment></comment><comment><USER27> RIP Octopart, and good luck in the Delphi aka Turbo Pascal house.

<comment><USER28> > RIP Octopart, and good luck in the Delphi aka Turbo Pascal house.

Yeah, it's probably buy and bury.</comment></comment>


How long can Edward Snowden stay in the Moscow airport? - <AUTHOR> http://travel.stackexchange.com/q/18526/101

<comment><USER2> My answer to the Stack Exchange question. (Never 100% sure what discussion to add in a post which points to another discussion site...)

 _There 's a good article to answer your question on the Washington Post website [1]:_

 _All those jokes comparing Snowden's case to the Tom Hanks film "The Terminal"? They have a distinctly unromantic basis in the life of Iranian Mehran Karimi Nasseri [2], who lived in Paris' Charles de Gaulle Airport for_ 18 years _after Iran expelled him._

[1]: [http://www.washingtonpost.com/blogs/worldviews/wp/2013/06/26...](http://www.washingtonpost.com/blogs/worldviews/wp/2013/06/26/heres- what-happens-to-asylum-seekers-who-stay-in-airport-limbo- indefinitely/?tid=rssfeed)

[2]: [http://www.csmonitor.com/2004/0621/p11s02-almo.html](http://www.csmonitor.com/2004/0621/p11s02-almo.html)

</comment><comment><USER3> This question makes me think we need a privacy.stackexchange.com and a revolutions.stackexchange.com

<comment><AUTHOR> Proposals for new stackexchange sites can be submitted through [http://area51.stackexchange.com/](http://area51.stackexchange.com/) ;)

</comment></comment><comment><USER4> With all the news reporters in that specific transit zone, and after so many days, I find it hard to believe that nobody wasn't even able to _see_ him. My best guess is that he acquired a fake passport/ID and is free somewhere in Russia or elsewhere.

I doubt he can hide that well in such a small airport transit zone, especially from news reporters that are well trained at spotting celebrities in large outdoor spaces - never mind airport transit zones.

</comment><comment><USER5> He's probably in this hotel an AP reporter experienced:

[http://www.adn.com/2013/06/28/2956661/trapped-in-transit- orw...](http://www.adn.com/2013/06/28/2956661/trapped-in-transit-orwellian- moscow.html)

If so, he could stay there a long time assuming he has sufficiently wealthy backers. $300 a night + food etc. isn't exactly cheap...

</comment><comment><USER6> At least the hotel in the Dubai airport has awesome massage chairs in the rooms and lets you come and go as you please (unless you're traveling on an Israeli passport, in which case, fly the other way). On the other hand, there are no outdoor facing windows in the rooms and you get the same amused "of course not" when you ask for one.</comment>


Show HN: Automatically invest spare change in cryptocurrencies - <AUTHOR> http://blog.myvested.com/myvested-intro <comment><AUTHOR> Hey guys, author here!

This app aims not only to allow easy investments with spare change but also optimize portfolio management for advanced users, see the article for more info or feel free to ask anything! :)

</comment><comment><USER2> Can you explain your methodology for selecting the coins for the different model crypto portfolios?

<comment><AUTHOR> Hey there, Turns out I misunderstood HN and I don't get emails for comments, apologies!

The portfolios have 2,3 and 4 coins, this is just a static rule. The concept is the lower the portfolios risk tolerance, the higher the coins' market cap. This means a conservative portfolio would have the top 2 coins (see [https://coinmarketcap.com](https://coinmarketcap.com)), the moderate would have the next 3 and aggressive has the next 4.

The market caps are normalized (the algorithm is secret for now) to make sure we don't expose anyone to too much risk if a coin does something like pumping into a high position right as we change our portfolio makeup.

As a rule, the higher an assets market cap, the less room it has to grow but also less likely to drop, hence by selecting the top 9 coins we're providing a diversified portfolio that matches the risk tolerance implied by the name.

Fun Fact: If those portfolios don't have what you want, custom portfolios went live a few minutes ago.</comment></comment>


JSON with Sqlite - <AUTHOR> https://www.sqlite.org/json1.html <comment><USER3> I've been using the JSON1 extension for some time now (in production projects) and it's truly remarkable. I usually just dump the JSON-response data from an API to a "raw_data" table (typically one "updated_at" column and a second "json_data" one).

At that point you can somehow normalize your schema, but only if you really have to! That is because you can get away with a NoSQL-like denormalized schema performance wise, by carefully defining index on expressions. You can somehow normalize it with views (SQLite doesn't support materialized views).

And of course it's almost always faster to query data where it exists (via SQL) instead of fetching it from disk and querying it say Python. You pay too much IO cost. (Yes, my dear aspring data scientist, do not load everything in a huge DataFrame, go learn yourself some SQL :-) )

The json dump is not stored in binary, but in text format, but honestly I haven't seen this to be a problem, plus you can easily run queries at the CLI and pipe the output to jq, sed etc.

If your application is data warehouse-like and read-heavy (for example an internal reporting dashboard) I can't see any reason why you should pay the cost of setting up a Postgres or MongoDB instance (although I do love both.)

It is true that SQLite does not support concurrent-writes, but (and that's a big BUT) if you carefully open connections only when you need them and use prepared statements, I can't see how you could run into problems with modern SSD hardware (unless you're Google-scale of coure).

<comment><USER4> > (Yes, my dear aspring data scientist, do not load everything in a huge > DataFrame, go learn yourself some SQL :-) )

This hits a little bit too close to home for me. I am quite proficient at writing performant SQL queries and recently started using Pandas. I find the data frame abstraction better for certain data manipulation tasks. Assuming there is enough RAM available is it still better to offload everything to the database engine?

<comment><USER3> As usual: it depends... If you're doing prototyping and are working in a Jupyter notebook, sure, go ahead and work on the Pandas-level. Once however you're done with prototyping and have settled to a "final_df" (I bet you have something like that in your last notebook cells), maybe you should think transforming some of the "columns" to sql queries (which are VCS-able, sometimes are faster, and most importantly other people can use them too. And instead of 10 people loading 10 different DFs, you can have 10 people querying the same table/view.

</comment></comment></comment><comment><USER5> To check if you already have it installed run "pragma compile_options;" and look for ENABLE_JSON1. On my Mac I had it installed both on sqlite3 in terminal/bash and Python :-)

      import sqlite3
      con = sqlite3.connect(':memory:')
      con.enable_load_extension(True)
      a = con.execute("pragma compile_options;")
      for i in a: print(i); #check for ENABLE_JSON1

The newest releases of sqlite3 have it included. If not you can build it this way: [https://burrows.svbtle.com/build-sqlite-json1-extension- as-s...](https://burrows.svbtle.com/build-sqlite-json1-extension-as-shared- library-on-os-x) Note that you will only get this error on load if you have it: 'Error: error during initialization:'

</comment><comment><USER6> I recently wrote an SQLite extension that lets me query stored Protobuf messages. I was inspired by the JSON extension. Adding virtual tables to SQLite with an extension is tricky but kind of magical when you finally have the full query language to play with.

[https://github.com/rgov/sqlite_protobuf](https://github.com/rgov/sqlite_protobuf)

<comment><USER7> Do you have performance numbers, especially in comparison to json1? Wondering how much benefit you get from a binary encoding scheme.

<comment><USER6> I don't, sorry. I did not build this with performance in mind, but for querying packet captures of a protocol built on Protobuf.

Any query is going to require deserializing every row in the table (JSON and Protobuf alike) which is basically a non-starter for any project with performance requirements. And I believe that Protobuf messages are decoded as a whole, rather than just the desired field, which is going to be slower.

<comment><USER8> Interesting library, thanks!

> Any query is going to require deserializing every row in the table (JSON and > Protobuf alike) which is basically a non-starter for any project with > performance requirements.

Apparently you can create indexes on the json functions, so I assume on your proto ones too.

> I believe that Protobuf messages are decoded as a whole, rather than just > the desired field, which is going to be slower.

With the official library, yes, but it's an implementation/API choice. The wire format [1] can be skimmed fairly efficiently. Most significantly, message/byte/string fields all are written as tag number, length, data. So if there are submessages (entire trees) you don't care about, you can just skip over them. I've seen custom proto decoding things do this.

I think the most efficient approach would be to parse the path once per SQL query into a tag number-based path. And then have the per-row function just follow those with custom decoding logic. Unfortunately from my quick skim, it looks like SQLite's extension API doesn't really support this. You'd want it to build some context object for a given path/proto, then call extract with it a bunch of times, then tear it down. Still, I suppose you could do a LRU cache of these or something.

btw, I see your code is compiling a regex [edit: originally wrote proto by mistake] in the per-row path. [2] I haven't profiled, but I'd bet that's slowing you down a fair bit. You could just make it a 'static const std::regex* kPathElementRegexp = new std::regex("...")' to avoid this. (static initialization is thread-safe in C++. The heap allocation is because it's good practice to ensure non-POD globals are never destructed. Alternatively, there's absl::NoDestructor for this.)

[1] [https://developers.google.com/protocol- buffers/docs/encoding](https://developers.google.com/protocol- buffers/docs/encoding)

[2] [https://github.com/rgov/sqlite_protobuf/blob/0a148ac6a5a2c02...](https://github.com/rgov/sqlite_protobuf/blob/0a148ac6a5a2c02ec4f9a80cad5f4ee51175ff5a/src/protobuf_extract.cpp#L113)

<comment><USER6> You mean it's recompiling the regex on every pass? Ah, yeah, I hadn't thought about that. Thanks for the tip.

</comment></comment></comment></comment></comment><comment><USER9> What are some useful use-cases for this?

I can already use JSON in Sqlite by doing parsing in the client outside of the Sqlite API. Any examples where I'd want to use this instead? I'm guessing for where clauses in queries, perhaps?

Can I create an index on a field within a JSON tuple?

<comment><USER10> What I have found with any relational database that has this kind of JSON storage option(MySQL, PostgresSQL) is that you can take some kind of data that arrives via 3rd party as JSON and just dump it straight into the db as JSON as opposed to having to create a schema for it.

It's nice to have the option for the data to still be queryable without having to make it a first class schema with all schema setup involved.

It isn't for 1st class data that is used frequently. But when you might only need the data on occassion its nice to have productivity-wise.

<comment><USER11> One pattern that I've used when parsing large json responses is to have a table schema like

        frequently|used|data|in|these|cols|full_json_response

So you pull out the fields you need frequently but have the full json so you can dig in to details the response on an adhoc basis. Not very efficient as you can end up storing a big blob of json, but you're not throwing away any data when you parse the response and your schema stays very manageable. Also gives you the flexibility to add new fields to the schema by pulling the data out of the json.

<comment><USER12> I use this pattern a lot, too. Just make sure not to `SELECT *`, which could be much slower and waste a lot of RAM in some cases (ORMs using e.g. active record pattern are often susceptible to this when used naively).

</comment></comment></comment></comment><comment><USER13> From a glance, this looks like its compatible with MySQL's JSON functions.

It isn't compatible, for example, with MariaDB's dynamic columns.

I'm not very familiar with the PostgreSQL json functionality, but I think that's subtly different again.

When I use local dbs for testing my json code I've used derby and defined the json_extract() functions etc myself just to test. With Sqlite having compatible functions, people wanting to test mysql stuff locally will be able to just point their code at an Sqlite DB instead. Great!

The bit that seems to be missing is the shorthand for selecting column values; in MySQL, instead of doing SELECT JSON_EXTRACT(col, "$.this.is.ugly[12]"), ... you can just do SELECT col->"$.this.is.ugly[12]", ...

Now what I want to be able to write is SELECT col.this.is.nicer[12], ....

I think there is some 'standard' somewhere that MySQL - and now Sqlite - <USER2> implementing? The functions and the 'path' syntax are standardized (although with only MySQL and now Sqlite supporting them its not perhaps a big deal). I just can't find any reference to that standard in the MySQL docs, nor this Sqlite doc.

Personally, I dislike the path syntax though! Every time I see an sql snippet with string paths full of dollar signs it offends my retinas.

<comment><USER14> According to [1], ISO/IEC 9075:2016 specifies JSON functionality in ISO SQL, though I don't have access to it/didn't buy the standard text. I also don't know whether Postgres etc. is designed to follow the standard, as Postgres' implementation predates it, but would expect sqlite to.

[1]: [https://modern-sql.com/blog/2017-06/whats-new-in- sql-2016](https://modern-sql.com/blog/2017-06/whats-new-in-sql-2016)

<comment><USER15> Postgres 11 doesn't follow the standard at all (as per your link). A third party implemented the standard [0] which was submitted on pghackers[1] very late in the Postgres 11 cycle[2] (at 75k gzipped the patch is pretty humongous). A quick googling doesn't show any information pertaining it being integrated (in part or full) into pg12 so IDK.

edit: apparently [https://commitfest.postgresql.org/17/1471/](https://commitfest.postgresql.org/17/1471/) has been "Waiting on Author" and bumped from CF to CF since early 2018, and [https://commitfest.postgresql.org/17/1472/](https://commitfest.postgresql.org/17/1472/) and [https://commitfest.postgresql.org/17/1473/](https://commitfest.postgresql.org/17/1473/) pretty much the same with no "waiting on author" but I don't really know how CF works and I see no comment or requests or reviews so…

[0] [https://obartunov.livejournal.com/200076.html](https://obartunov.livejournal.com/200076.html)

[1] [https://www.postgresql.org/message- id/CAF4Au4w2x-5LTnN_bxky-...](https://www.postgresql.org/message- firstname.lastname@example.com)

[2] [https://www.postgresql.org/message- id/00531c7e-f501-b852-9b6...](https://www.postgresql.org/message- id/00531c7e-f501-b852-9b67-1d1278d035a0%40pgmasters.net)

<comment><USER16> They're actively working on it. There's been a new revisions posted over the last few days, responding to review from a week or two ago.

[https://www.postgresql.org/message- id/a3be6a7a-77d3-0e88-4f9...](https://www.postgresql.org/message- id/a3be6a7a-77d3-0e88-4f9d-4f725d11d7cd%40postgrespro.ru) [https://www.postgresql.org/message- id/c2f32c9f-9a69-202b-a8a...](https://www.postgresql.org/message- id/c2f32c9f-9a69-202b-a8aa-d93c769a579e%40postgrespro.ru)

> I see no comment or requests or reviews so…

That happens on the mailing list...

</comment></comment></comment></comment><comment><USER17> SQLite is really an awesome database, this seems great to store arbitrary json data!

</comment><comment><USER18> > Backwards compatibility constraints mean that SQLite is only able to store > values that are NULL, integers, floating-point numbers, text, and BLOBs. It > is not possible to add a sixth "JSON" type.

I'd be interested to know what these constraints are? Does SQLite guarantee that files created with newer SQLite versions are still compatible with older SQLite versions?

<comment><USER19> From [https://www.sqlite.org/onefile.html](https://www.sqlite.org/onefile.html) :

> The SQLite database file format is also stable. All releases of SQLite > version 3 can read and write database files created by the very first SQLite > 3 release (version 3.0.0) going back to 2004-06-18. This is "backwards > compatibility". The developers promise to maintain backwards compatibility > of the database file format for all future releases of SQLite 3. "Forwards > compatibility" means that older releases of SQLite can also read and write > databases created by newer releases. SQLite is usually, but not completely > forwards compatible.

<comment><USER20> And yet, "The json1 extension uses the sqlite3_value_subtype() and sqlite3_result_subtype() interfaces that were introduced with SQLite version 3.9.0 (2015-10-14) The json1 extension will not work in earlier versions of SQLite."

<comment><USER21> This just means you can't use the json1 extension with an old version of the library. But anything you write using it, will still be readable with an older version.

Of course, if you do something like creating an index using a json1 expression, that will cause issues if you try to use the database with an older version.

</comment></comment></comment></comment><comment><USER22> This should be build in standard SQLite.

<comment><USER23> SQLite is used in a _LOT_ of environments, including low-overhead embedded systems. This means it's impractical to add the overhead for those systems. As to desktop and mobile, I absolutely agree, it should be the default in a lot of places.

</comment></comment><comment><USER24> Is loading extensions at runtime new? Coulda sworn I used to have to recompile for this

<comment><USER25> It seems valuable enough to have in the standard build. That and the CSV extension as well.

<comment><USER26> Especially for things like Python's embedded SQLite. Packaging and loading an extension module cross-platform with an otherwise pure Python script seems difficult.

</comment></comment></comment><comment><USER27> The JSON1 extension can be used in Android with the sqlite-android library

[https://github.com/requery/sqlite-android](https://github.com/requery/sqlite- android)

</comment><comment><USER28> One of the nicest things you can do with this is get hierarchical results.

</comment><comment><USER29> Why not converting JSON from/to BLOB?

<comment><USER30> From the article:

The json1 extension does not (currently) support a binary encoding of JSON. Experiments have been unable to find a binary encoding that is significantly smaller or faster than a plain text encoding. (The present implementation parses JSON text at over 300 MB/s.) All json1 functions currently throw an error if any of their arguments are BLOBs because BLOBs are reserved for a future enhancement in which BLOBs will store the binary encoding for JSON.

<comment><USER31> Seems like it has been updated to say 1GB/s now.</comment></comment></comment>


Broadband prices per megabit around the world - <AUTHOR> http://www.muniwireless.com/2007/07/09/broadband-prices-per-megabit-around-the-world/

<comment><USER2> Useless mathturbation. Countries with higher peak rate lines show lower prices. A more interesting presentation would have been "lowest cost of a line of at least Xmbps" for X=0.05,0.25,1,10.

Somehow I don't think I'll be able to buy a 3mbps line for $1/month in South Korea.</comment>


Issue 10562: Change 'j' for imaginary unit into an 'i' - <AUTHOR> http://bugs.python.org/issue10562 <comment><USER2> My favourite part:

"That could work; it's a bit late to do this in 3.2, though. How about the following transition strategy for the complex output.

Python 3.3: Introduce PYTHONIMAGINARYSYMBOL environment variable (and possibly also a related command-line option to the interpreter?).

Python 3.4: Show a warning on startup if this environment variable isn't used.

Python 3.5: Make the environment variable mandatory.

Python 3.6: Make the environment variable optional again, but this time with the default output being 'i' rather than 'j'.

Python 3.7: Deprecate use of PYTHONIMAGINARYSYMBOL. (Warning on startup if it's set.)

Python 3.8: Error on startup if PYTHONIMAGINARYSYMBOL is set.

Python 3.9: Go back to ignoring PYTHONIMAGINARYSYMBOL."

<comment><USER3> Mine was

"This deterministic approach has the advantage that migration of code from one imaginary symbol to another is as easy as:

sed -e 's/k/l/' -e 's/j/k/' -e 's/i/j/' -e 's/l/i/'

provided that you restrict yourself not to use the characters i, j, k or l in identifiers, keywords or strings in the source code."

</comment></comment><comment><USER4> It's surprising to me that a programming language would have started out following engineering conventions rather than mathematical conventions, even if there's a strong overlap between EE and CS. That said (and speaking as a mathematician) I think it's foolish to use j over i, especially since in some cases (e.g. quaternions) it will be very confusing.

<comment><USER5> Physicists, on the other hand, have come to terms with the fact that they have fewer letters in the English and Greek alphabets than concepts they need to express, and so happily overload _i_ and everything else, hoping to always figure it out from context.

<comment><USER6> just add a hat ^ or squiggle ~ over it, or maybe a point, or something else. I always wondered when the Hebrew alphabet would come up.

<comment><USER7> Chinese is the future.

<comment><USER8> Simplified or traditional?

<comment><USER7> Yes. We need all the symbols we can get.

<comment><USER8> We'll need mathematics professors with neater handwriting if you ever hope to be able to distinguish one hanzi from another, though...

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> That page could be added to the list of classic examples of bike-shedding.

<comment><USER10> Except that the bikesheddiest bits are deliberate satire.

</comment></comment><comment><USER11> j vs i gets really confusing when you're doing a dual electrical engineering / computer science degree, since you have to remember which classes use which: electrical engineering uses j (since i is already taken to mean current), CS math uses i :)

<comment><USER12> I said something about j in my number theory class after 3 years of EE and my professor looked at me like I was an idiot. He apparently had never heard of j once in his life.

</comment></comment><comment><USER13> What happened to "there should be one-- and preferably only one --obvious way to do it"?

PS. I've also posted this as a comment to the bug report.

<comment><USER14> This is python's philosophy. However the ambiguity is due to different representation in other known fields, namely engineering and mathematics.

PS - I agree, (and upvoted) to your comment. I like this approach <http://bugs.python.org/issue10562#msg123135>

</comment></comment><comment><USER15> I feel a bit bad for Retro, and half hold out the hope that he's an invented character just playing a role.

<comment><USER16> A lot of the issues he creates are very low priority or invalid , but he aggressively, un-cooperatively, and repeatedly pushes that they be fixed.

</comment></comment><comment><USER17> I know that cooler heads will prevail, and that python won't get this silly syntax change, but...

...everyone seems to be forgetting that i == -j (either squared is 1). Physicists usually describe traveling waves (of whatever) as something proportional to exp(kx-iwt) where that's an omega, not a w, and electrical engineers for whatever reason prefer the notation exp(kx+jwt) (note the minus sign difference). Except ee's sometimes write exp(kx-jwt), depending on the convention in use at the time.

<comment><USER18> What are you talking about? i == j, and either squared are equal to negative one. You can use them interchangeably.

<comment><USER19> Take a look at quaternions (<http://en.wikipedia.org/wiki/Quaternion>) where ii == jj == -1, but i != j

<comment><USER18> This discussion is talking about the notation ambiguity of i and j in denoting a classical complex number with only one real and one imaginary part. As far as I can tell, this python bug report has absolutely nothing to do with quaternions, which is an extension on complex numbers.

i == j, not i == -j in most applications. If you take the number z = a + ib and turn it into z = a - jb, and just take Im(z), you end up with two different answers otherwise.

<comment><USER19> What does Mark Dickinson mean in <http://bugs.python.org/issue10562#msg122672> when he says

      'j' for *a* (not *the* </pedantry>) square root of -1 has...

<comment><USER18> j is often used instead of i in engineering and physics.

When you start talking about charge density, current, phase and frequency, you almost always start reverting back to engineering notation (i == j). In QM we used i. In Complex Analysis, we used i. In CM, with regards to oscillators/harmonic motion, we used i.

The wikipedia article on imaginary units talks about interchanging i and -j denoting the reversal of plane waves, but we never did that in advanced electrodynamics. However, I wouldn't be surprised if some people do, but as far as I know it's not that common. It's probably find for determining the EM field at some point for some time, but for the problems where you have to find the charge density on a surface of conductor induced by a EM wave, this notation would start to get confusing.

</comment></comment></comment></comment></comment></comment><comment><USER20> It's an imaginary number, not a jimaginary number.

</comment><comment><USER21> I love this:

 _I'm personally -0.small on it_

even though I don't understand it. Anyone?

<comment><USER15> In the Python community, agreement with a proposed change ("this is a good idea") is indicated by +1, disagreement ("this is a bad idea") is indicated by -1, and mostly indifference leaning slightly for or against (as in "I (dis)approve but don't really care") is indicated by +0 or -0. My guess is that -0.small is intended to mean something like "I slightly disapprove but this is utterly insignificant".

Edit: much more amusing is Antoine's comment "[...] Otherwise +11j from me"

</comment></comment><comment><USER22> What module are they talking about? Could someone give an example? For instance, the following doesn't work:

      import math
      math.sqrt(-1)

<comment><USER23> That would be the 'cmath' module.

<comment><USER22> Thank you. Clearly a python noob here...

</comment></comment></comment><comment><USER24> Who ever use imaginary/complex numbers anyway?

<comment><USER25> If you rotate your phone's keypad 90 degrees, you can call Hogwarts!

To actually answer your question, complex numbers make signal processing algorithms much more tractable, and also make it easy to visualize many commonplace quantities and phenomena in electrical engineering. Anytime a value has both a magnitude and a time- or phase-based aspect, chances are you can use complex numbers to represent it.

Put another way: just as negative numbers allow you to specify movement along an axis, complex numbers allow you to specify rotation around an axis. Both are obviously pretty fundamental.

<comment><USER26> Wouldn't the same advantage be obtained by x and y coordinates?

<comment><USER27> This something I found quite interesting:

The complex numbers form a ring that is isomorphic to the cross product of the ring of real numbers and itself....

C≅R×R

For those who haven't done abstract algebra:

This means your can map a complex number to (x,y), that every complex number maps to a unique (x,y), and that if you add or multiply two complex numbers and then convert the result to (x,y), you can convert the two complex numbers to (x,y) and then multiply getting the same answer. (it is also bijective, meaning it works both ways).

Importance: Complex numbers can be dealt with as coordinates and coordinates can be dealt with as complex numbers.

<comment><USER28> That's not true: the multiplication is different. (x1,y1) × (x2,y2) would have to be (x1x2 - y1y2, x1y2 + y1x2), not (x1y1, x2y2).

The addition _does_ work as you suggest, so a more correct formal statement would be: the complex numbers form an _additive group_ that is isomorphic to the cartesian product of the additive group of real numbers and itself; the complex numbers also happen to form a ring (indeed a field).

<comment><USER27> the mapping function doesn't need to be a direct translation.

But I believe you are right.... curse you Hungerford for teaching rings and groups simultaneously....</comment></comment></comment></comment></comment></comment>


Show HN: For musicians: Music Notation Stickers in iMessage - <AUTHOR> https://itunes.apple.com/us/app/music-notation-sticker-pack/id1216360339?mt=8&ct=hackernews&at=1001l574&ls=1 <comment><AUTHOR> "Share music the old-fashioned way: with iMessage stickers"

Inspired by a music teacher friend who wanted to text music to his students, and Apple's new support for kitten stickers, I came up with this:

A toolkit for music notation: Lay down a staff, then decorate it with notes, rests, slurs, and more. I added guitar fingerings and tabs, time signatures and more.

Learned a lot about musical notation and stickers and seems to be quite popular in Europe for some reason.

Here's a video for folks without iOS devices and for tips about how to grab notes (they have clear handles on the bottom). [https://www.youtube.com/watch?v=9-ZMdjmNikg](https://www.youtube.com/watch?v=9-ZMdjmNikg)

<comment><AUTHOR> More info at [http://fancyham.com](http://fancyham.com)

</comment></comment><comment><USER2> This is amazing!</comment>


Free A/B testing and conversion optimization for websites - <AUTHOR> https://volument.com/features/forever-free-plan?b1p <comment><USER2> The offer sounds good. Take note when asking website owners to add a badge that you are required to add "nofollow" or "sponsored" to those links. Otherwise Google might penalize you.

I took a look at your demo but sadly the font is hard to read on my machine. I use Windows with font smoothing turned off so that I get crisp fonts like back in the days but some low level fonts only work with smoothing.</comment>


The Grave Accent and XSS - <AUTHOR> https://davidmurdoch.com/2017/09/02/the-grave-accent-and-xss/ <comment><USER2> Wasn't adding a new character to browsers that needs escaping a grave (heh) error of judgement?

There's a lot of unmaintained client side code out there.

<comment><USER3> Escaping <>"' properly is still enough. Without them you can't create the