The Rapier Physics Engine - <AUTHOR> https://www.dimforge.com/blog/2020/08/25/announcing-the-rapier-physics-engine/ <comment><USER2> Why do the readmes for physics engines rarely specify how they solve contact constraints? This is one of the most difficult parts of writing a physics engine. It might be less important if you're just interested in visuals and making it "look OK" in a videogame, but it has an impact on the dynamics, so especially if you're interested in robotics or accurate simulation of real- world physics, this is really important to specify.

<comment><USER3> I would add that the way the contact constraints are solved decides what kind of artifacts you will be getting and you need to understand that to be able to understand precision of your simulation.

Even for a videogame this would be important. You may want to know if it is possible for fast moving objects to pass each other or not. You might then want to limit the velocity of objects (a cheap trick to solve the issue, but very effective), or you might want to choose an engine specifically for this (for example if you make a billiards game or a shooter).

</comment></comment><comment><USER4> A few months back I tried - and failed - to write a basic 2d physics engine for my JS canvas library. Before then, I tried to use existing JS physics engines with the library ... but none of them integrated nicely; the closest I got to making something useful was with Matter.js (see Codepen demo[1]).

Rapier has a WASM version, and JS bindings. I'm already looking forward to see if I can get the engine working with my code. Is there a JS-focussed community around Rapier where I can ask questions if I get stuck?

[1] - [https://codepen.io/kaliedarik/pen/zYvbwBy](https://codepen.io/kaliedarik/pen/zYvbwBy)

<comment><USER5> Author of Rapier here. The best way to get help would be to join our discord server [1]. There is a channel dedicated to rapier.js. So far most of us are Rust devs but we want to grow our JS community progressively.

You can also ask questions/post issues on the rapier.js repository [2]. You will also find a WIP user-guide on the rapier website: [3].

Right now the JS bindings are not complete, so a couple of months of work is still needed to expose all the capabilities of Rapier through JS.

[1]: [https://discord.gg/vt9DJSW](https://discord.gg/vt9DJSW)

[2]: [https://github.com/dimforge/rapier.js](https://github.com/dimforge/rapier.js)

[3]: [https://www.rapier.rs/docs/user_guides/javascript/getting_st...](https://www.rapier.rs/docs/user_guides/javascript/getting_started)

<comment><USER4> Many thanks! I've joined the discord and will have a go at setting up a Rapier-driven demo in a canvas element this weekend.

</comment></comment></comment><comment><USER6> Cross Platform determinism and great serialization capabilities makes this a networked physics programmer's dream!

I kinda wish this was in cpp, so that I could integrate it with Godot and have it be considered for upstreaming.

Edit:

Wait, no ray cast? I'm confused why that wouldn't be implemented. That's a very simple operation, is it not?

No continuous collision detection is not so great either, but is okay if the performance is good enough to tick at a high rate.

<comment><USER7> There is another Rust crate[0] from the same author that does ray casting. Also, nothing prevents this from being used in Godot[1].

[0]: [https://github.com/dimforge/ncollide](https://github.com/dimforge/ncollide)

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

</comment></comment><comment><USER8> \- cross platform bit level determinism

\- fully serializable state

Wow! Sounds like a boon for Javascript game engines like Bevy. I wonder if they'll support PlayCanvas as well.

<comment><USER9> Bevy is a a Rust game engine [https://bevyengine.org/](https://bevyengine.org/), although potentially it could be used with js when targeting WASM.

</comment></comment><comment><USER10> The benchmarks are pretty interesting. Why is it that nphysics has such apparent inconsistency in its frame times?

<comment><USER5> The main source of inconsistency for nphysics performances is its broad-phase algorithm. It is a tree-based approach which is admittedly not written very efficiently and has very unstable performances when most objects moves.

</comment></comment><comment><USER11> > Cross-platform determinism: if the enhanced-determinism feature of Rapier is > enabled, it will behave in a bit-level cross-platform deterministic way in > all platforms that comply with the IEEE 754-2008 floating point standard.

Impressive! I've understood this to be a hard problem. Unity has promised this for years but still hasn't delivered, last time I looked.

Is there anywhere we could read more about the tradeoffs and challenges involved?

Also, how widely has this been tested?

Perhaps most importantly: how can I extend this determinism to my own code?

</comment><comment> ur-whale Do these type of physics engine use Newtonian F=MA at their hearts or do they rely on Lagrangian mechanics?

My instinct tells me the first as it seems more straightforward, but then I realized I just have no idea.

Anyone knowledgeable care to enlighten?

<comment><USER12> The former, because in order to formulate a physics engine in Lagrangian mechanics you need analytic differentiation (or you can just precalculate the partial derivatives with your own hands, but then it will be precisely the same as coding it in F=ma.)

</comment></comment><comment><USER13> On a side note, does anyone know what happened to Bullet3D? It seemed like this was a really good candidate for driving game physics a few years ago, but it's been rebranded as "PyBullet", the wiki's no longer available, and it seems to have pivoted towards simulation. Also it seems like Bullet3 never got a proper release.

Is this a dead project?

<comment><USER14> It is still going strong and being actively developed : [https://github.com/bulletphysics/bullet3](https://github.com/bulletphysics/bullet3) & [https://pybullet.org/wordpress/](https://pybullet.org/wordpress/)

</comment></comment><comment><USER15> They mention wasm bindings. Are there c bindings as well?

<comment><USER5> No C bindings so far. This is something I would like to consider doing at some point. Though when exactly it is done will depends on the demand since I have limited resources.

<comment><USER13> I would try this out tomorrow if it had a C FFI. I've been working more with Rust, but I have a lot of existing work in other languages, and a C FFI would make it so much easier to consider this as an alternative.

</comment></comment></comment><comment><USER16> Bookmarking this comment section in case I ever need a prime example of bikeshedding.

<comment><USER17> It's really out of hand. HN seemingly can't help itself bikeshedding the naming of things, but you'd hope people would check to see all the other similar comments before posting their own not-so-unique take as a top-level comment...

Easy, albeit predictable, fodder for n-gate, if they can be bothered.

</comment></comment><comment><USER18> Regarding inane comments about the name, take a look at this:

[https://en.wikipedia.org/wiki/Windows_Mobile#Pocket_PC_2000](https://en.wikipedia.org/wiki/Windows_Mobile#Pocket_PC_2000)

 _Pocket PC 2000, originally codenamed "Rapier", was released on April 19, 2000, and was based on the Windows CE 3.0 kernel._</comment>


Germany to Repatriate Some of Its Gold Reserves - <AUTHOR> http://www.nytimes.com/2013/01/17/business/global/german-central-bank-to-repatriate-gold-reserves.html?hp&_r=0

<comment><USER2> It's interesting to note that a lot of gold (40% of annual production) is mined just so that it can be locked away somewhere, without any further utility derived from it. This is essentially speculative demand, so one could reasonably argue that gold is in a (many thousand years old) speculative bubble.

Central banks could burst this bubble easily by selling off their gold reserves. It is of course very hard to judge how low that would drive the price of gold, but it seems rather clear that the "proper" price of gold should be much lower than it is today.

Today, gold isn't used much for industrial production. But part of the reason for that is actually the price of gold. Gold does have useful properties as a chemical element, but engineers specifically design their processes so that they don't need too much of it.

How much more use for society could be gotten out of gold in actual production, if the gold price bubble were burst by central banks selling off their reserves, making gold more affordable for industrial purposes?

This line of thought is dual to the criticism against hedge funds participating in commodity trading. Once hedge funds create artificial demand for certain commodities such as rare earths by actually storing them in newly built warehouses, the price for those commodities could be driven through the roof, with nasty side cost-push inflation as a side-effect.

<comment><USER3> > Central banks could burst this bubble easily by selling off their gold > reserves.

Maybe the bubble is in fiat currency?

Imagine in 1933 you had locked one ounce of gold in a box, and 35 dollar bills in another box (that year, the gov valued gold at $35/oz, see: <http://en.wikipedia.org/wiki/Executive_Order_6102>).

Unlock the box today. What would you rather have? 35 dollar bills or an ounce of gold which is currently trading at $1,680 ?

Gold has been a store of value for thousands of years, while during that time, paper currencies have come and gone.

<comment><USER4> I'd rather have invested that $35 into the stock market. Going by the dow jones from 1933 to today, that $35 would be worth over $9,000. That's the proper comparison to gold.

<comment><USER3> The Dow Jones index changes over time, so to track the index properly you have to buy and sell stocks all the time, just like index tracking funds do.

As a passive investment locked in a box, you would have had to purchase $35 worth of stock in 1933 and kept the stock certificate(s). Maybe there was a mutual fund around at the time that tracked the Dow Jones.

Opening the box today, most of those companies (or funds) probably don't exist anymore, so you wouldn't actually be able to sell your stocks for cash.

<comment><USER5> When you start adding conditions for what "counts" and "doesn't count", you're probably not being impartial.

$35 turns into $600 from 1933-now, just from inflation. Invested in gold, it gets double that, and in stocks, it gets 15X that. Those are the statistics on the matter.

<comment><USER3> If you put 35 dollar bills in a box in 1933 and open it up today in 2013, you still only have 35 dollar bills, physically in your hand.

You can look at the purchasing power of $35 in 1933 vs 2013, but you don't have $600 physically in your hands to spend.

If anything, the purchasing power shows that paper bills have lost value whereas gold has gained value. In 1933, $35 could buy you 1 ounce of gold, whereas today's equivalent of $600 only buys you ~1/3 ounce.

My original post specifically talked about locking $35 in a box, so conditions haven't changed. Also I'm not claiming that gold is the best investment over time.

</comment></comment></comment></comment></comment></comment><comment><USER6> I just don't understand how it is productive to spend the amount of money necessarily to dig this stuff out of the ground only to stick it in some bank vault to go untouched for decades. Now people are arguing whose bank vault we will use to keep the stuff that we won't touch?

<comment><USER7> The main reason is that paper money is the biggest ponzi scheme the world has every seen. Every government in the world is coming round to printing more and more of the stuff. We just don't realize how bad the situation is because we are used to comparing the value of our paper dollar with a paper Euro or Yen, and they have all been devalued.

Gold cannot be printed ad infinitum. Each year roughly 2500 tons of the stuff is mined, which adds around 1.5% to the global above ground stock of gold. This 1.5% growth rate is declining, while the amount of new paper money that is created each year is increasing.

Bottom line is it the only real measure of value left in the world.

<comment><USER4> What you can trade for using your currency is what gives it value. At least IMO. In that case paper money is doing fine. The primary purpose of currency is too ease trade, not too keep score. As long as the value of paper money stays relatively stable over the short- to mid- term than it is doing it's job. 0-5% inflation a year is pretty stable, it's not going to have a large effect on when I chose to purchase things. In fact some inflation might be good to counteract the effect of technological advance: sure my money might be worth 5% 'less' a year from now, but I'll be able to buy something 50% 'better'.

</comment></comment></comment><comment><USER8> I was in the Federal Reserve gold vault a few weeks ago and you realize that gold is just a very heavy metal that is inconvenient to store and move around. The NY Fed keeps this gold for free, and having this gold in their vault is forgive the pun "as good as gold". Moving the gold is a political move that just costs a lot of real money.

<comment><USER9> for free? Source?

<comment><USER10> From the article:

"The New York Fed stores the German gold without cost on the theory that the presence of foreign gold supports the dollar's status as the global reserve currency."

<comment><USER9> Ah, thanks. I found that also in a German article.

</comment></comment></comment></comment><comment><USER11> they agreed on shipping it back to germany within the next s-e-v-e-n years. why is that? this sounds kinds dodgy to me - as if the banks who "might" store it would have to earn it first.

btw: france once transported it's gold reserves back to france in a nuclear submarine - classy.</comment>


Virgin Galactic airborne again after 2 years - <AUTHOR> http://newatlas.com/virgin-galactic-captive-carry/45350/ <comment><AUTHOR> I am really glad to see this ship flying again. I realize the suborbital stuff doesn't have the pizzaz of the orbital rockets but it seems so much more likely that I'll be able to do something like this than it does go up and spend time on orbit.</comment>


The Coronavirus Is Never Going Away - <AUTHOR> https://www.theatlantic.com/health/archive/2020/08/coronavirus-will-never-go-away/614860/ <comment><USER2> This was pretty obvious when a hotspot put out a tourism campaign "Milan is open" and the Italian government told their public about the northern lockdown allowing a flight from the north to south before it took effect.

I don't want to bash on Italy or Italians. (seems whatever Western country that had the first outbreak would have done the same) But those actions when there was available evidence showing how serious this could be still leave a sour taste in my mouth.

</comment><comment><USER3> The frustrating thing is that with maximum global cooperation between every human on Earth, we could drive the virus extinct in humans in a matter of weeks, simply by stockpiling a little food and staying away from one another. Even with the rather mediocre social cohesion that even the best countries can manage, the R-value can at least be driven low enough to render trace-and- isolate strategies feasible, and the virus defeated within months for all practical purposes. But huge swathes of the planet are not even attempting to make even minimal gestures, and that makes victory impossible. This is a test of our ability to cooperate, a prisoner's dilemma; and a critical mass is defecting.

I believe this inability to act as one spells doom for humanity in the long run, unless we can improve.

<comment><USER4> It's really hard to get cooperation of that scale for pretty much anything. You're asking billions of humans to self isolate for two weeks.

If we were dealing with Ebola it would have been easier to get people to self- isolate. But with a disease that has a 1-2% IFR it's going to be a lot harder to get that level of compliance. I agree that certain nations could have isolated better though.

</comment></comment><comment><USER5> So Sweden is right? If so will all these pundits and journalists come back with an apologetic mea culpa?

If it's never going away we have to start behaving like it and not continue lockdowns and SIPs and so on.

Masks, hygiene, distancing, stay home when sick, etc. but get people back in a groove. People cannot remain cooped up like livestock in a pen.

<comment><USER6> Even on HN there was a pressure of the herd.

Anchormen, journalists do not have skin in the game like weathermen.

</comment></comment><comment><USER7> Just like the flu.

<comment><USER8> Overblown out of all proportion.</comment></comment>


Show HN: I Code Dis – Discover Top GitHub Projects - <AUTHOR> http://icodedis.tool.cards/ <comment><USER2> I don't like that if you scroll down then tap one of the tabs like "Now, Recent or All-time" then it scrolls to the top of the page.

Very annoying.

Other than that; pretty cool website.

Not a fan of this when you have to login:

"Public and private This application will be able to read and write all public and private repository data. This includes the following: Code Issues Pull requests Wikis Settings Webhooks and services Deploy keys Collaboration invites "

<comment><AUTHOR> Thanks for the feedback. I've just lowered the grant permissions need for the GitHub auth. Originally I had it needing "repo" permissions to star repos from the app, but I've since disabled starring from the app.

<comment><USER2> Thanks!</comment></comment></comment>


Music Listening Affects the Climate - <AUTHOR> https://www.hf.uio.no/imv/english/research/news-and-events/news/2019/how-music-listening-effects-the-climate.html <comment><USER2> The incidence is negligible. It's juts a unnecessary concern to sell books. It's also fancy to blame new technologies, like the clouds. I'm betting dollars to droughts that he didn't include the energy to spin the LP/CD/cassettes.</comment>


The Chemistry of VX Nerve Agent - <AUTHOR> https://www.youtube.com/watch?v=62fPW-5TR-M <comment><USER2> chatterbeak, your account appears to be shadowbanned - or at least, all recent comments show as dead</comment>


OK Go Leaves EMI, Starts Their Own Record Label - <AUTHOR> http://laughingsquid.com/ok-go-leaves-emi-starts-their-own-record-label/

<comment><USER2> It sounds like the reason is that the label was getting between the band and their fans.

There's probably a financial component too, but that's not being emphasized. OK Go seems to think that the most critical thing for their continued survival is the tight relationship between them and their fanbase. Anything that jeopardizes that needs to go away. There's some good lessons there for us web startups.

Good luck to them. Nine Inch Nails and Radiohead seem to be doing quite well on their own, and hopefully a smaller player like OK Go can make it work as well.

<comment><USER3> Nine Inch Nails, Radiohead, OK Go, they all already have established fanbases because they signed with a major label. We still have a long way to go until an artist can establish a significant fanbase without the help of a label.

<comment><USER4> I agree with you in the case of NiN and Radiohead. But while OK Go did have one single that charted via traditional means, their last two big successes came in large part due to the popularity of online videos.

The videos for "A Million Ways" and "Here it Goes Again" were fairly low budget affairs that were likely within the range of an independent band.

While I'm sure that the label did provide some help, it seems to me that their breakout success was largely achieved in ways that can be duplicated by a talented unsigned group.

</comment></comment></comment><comment><USER5> Their letter from January explaining why their record label won't let them embed videos is a fascinating explanation of exactly how overwhelming the sea change swamping the music industry is.

<http://okgo.forumsunlimited.com/index.php?showtopic=4169>

</comment><comment><USER6> I just heard an interview with Damien on NPR. He's actually a really smart guy, although it doesn't really come across in the submitter's video.

[http://www.npr.org/templates/story/story.php?storyId=1245329...](http://www.npr.org/templates/story/story.php?storyId=124532979)

<comment><USER7> I went to the same HS as Damien and knew him through sculpture class. Very smart, very funny and quite a gifted artist. He was also nice to me as a freshman when he was a senior. Most people were surprised when he broke out in the music industry b/c we thought he was going to be a painter or a sculptor. Then we saw the videos and said, "oh, yeah, that makes sense."

<comment><USER8> And you can add to that a source of inspiration. Ironically, I saw this post on HN after just submitting an "Ask HN" which came to me while watching a live performance of OK GO! on YouTube. <http://news.ycombinator.com/item?id=1183847>

The lot of them are such a great business case study by the way. The way they created their "brand", their marketing prowess and their ability to continually, continually, continually be so masterful in the art of word-of- mouth and virality.

</comment></comment></comment><comment><USER9> The announcement from the band's website:

<http://www.okgo.net/2010/03/10/onwards-and-upwards/></comment>


New Tesla accident - <AUTHOR> https://www.facebook.com/100000826626015/videos/1232995623404647/ <comment><USER2> Previous submission (6 days ago): [https://news.ycombinator.com/item?id=13778494](https://news.ycombinator.com/item?id=13778494)

</comment><comment><AUTHOR> Driver enabled HighWayPilot and removed his hands from the steering wheel. Looks like the car tried to stay within the road marking and didn't see the barriers.

<comment><USER3> yellow line on road seems to perfectly align with the yellow barrier. camera didn't identify the wall. I don't think they have radar to identify solid objects, do they? Isn't it just camera? I can't remember right now and too lazy to look it up.

<comment><USER4> Teslas have a serious problem avoiding stationary objects in traffic lanes, especially when following traffic. If you search YouTube for Tesla accidents, there are a big group where the car is following traffic in its lane and it doesn't yield to some object in its lane. Over and over again.

From OP: [https://www.youtube.com/watch?v=fQxIhMBKblY](https://www.youtube.com/watch?v=fQxIhMBKblY)

Fatal crash in China: [https://www.youtube.com/watch?v=fc0yYJ8-Dyo](https://www.youtube.com/watch?v=fc0yYJ8-Dyo)

Another Chinese accident: [https://www.youtube.com/watch?v=rJ7vqAUJdbE](https://www.youtube.com/watch?v=rJ7vqAUJdbE)

One in Europe: [https://www.youtube.com/watch?v=qQkx-4pFjus](https://www.youtube.com/watch?v=qQkx-4pFjus)

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

I don't know what system they're using, but they really need to get a handle on it. For as many accidents as they avoid, not hitting stopped objects is pretty important from a safety perspective.</comment></comment></comment>


NixOS 19.09 - <AUTHOR> https://nixos.org/nixos/manual/release-notes.html#sec-release-19.09 <comment><USER2> My experience is that the rolling "NixOS unstable" channel is more usable. The releases don't offer any improvement in security and have less maintenance effort overall. And despite the name "unstable", the breaking changes typically incubate in the staging branch first for a few months.

But that's using it on a desktop, maybe on a server releases are more useful.

<comment><AUTHOR> Interesting. I was not aware of the staging branch. I thought that patches are always merged into master and then automatically trickle down to unstable once all of the integration tests pass.

How often do you find yourself performing a rollback? I've always stuck to the stable channel, but I may give unstable a shot if it doesn't break too often, as you say.

<comment><USER3> That was how it worked in the past, but it becomes frustrating because some changes result in many, many package rebuilds which hold up everyone else, or otherwise drains resources of the CI system, which would be better spent building existing packages. Staging is generally where changes that result in mass rebuilds go (or may introduce large instability) in order to keep the main branch "up to date".

Changes that are backwards incompatible (but do not result in mass rebuilds) can and will often just go to master directly. For example, NixOS module changes rarely result in mass rebuilds, even if it breaks an API -- but changing the default kernel version does. The latter would go to staging.

I exclusively use the unstable branch on all my Nix/NixOS machines. I rarely do rollbacks. But it's important to note that I'm a developer with commit access, so I can basically "just" fix things if they're problematic. Not everyone has that luxury. (Many Linux distro maintainers likely operate this way, I guess. :)

There have been events in the past where unstable has had changes that made rollback impossible. In particular, if the bootloader becomes unstable somehow, your rollback capabilities are toast (and you won't know _until_ you reboot, when it's too late). But I don't think anything like that has happened in a long time...

<comment><USER4> > I exclusively use the unstable branch on all my Nix/NixOS machines. I rarely > do rollbacks. But it's important to note that I'm a developer with commit > access, so I can basically "just" fix things if they're problematic. Not > everyone has that luxury. (Many Linux distro maintainers likely operate this > way, I guess. :)

An important thing with NixOS is that since the whole distro is built from a monorepo, it's also very easy for an advanced user to just git clone and fix the problematic things too (and hopefully send a pull request!).

</comment></comment></comment></comment><comment><USER5> The release announcement on Discourse: [https://discourse.nixos.org/t/nixos-19-09-release/4306](https://discourse.nixos.org/t/nixos-19-09-release/4306)

</comment><comment><USER6> There's usually something broken on my computer when I bump to a brand new release of NixOS, but I've never had rollbacks fail to recover from that. Then I just have to wait a few weeks before I try again :^)

<comment><USER7> My experience is the same. Rollbacks never fail. Upgrades often break my desktop environment. Maybe I should just stop using GNOME, since KDE seems to be the better supported "fat" desktop environment. Not sure if cobbling together some kind of i3wm-type environment would simplify things or result in just another kind of fragile complication.

Can't really figure out why GNOME stopped working for me after 18.03. Wish there was some kind of guide/tool for validating that my configuration.nix was still sane with newer versions.

<comment><USER8> I remember GNOME support was spotty when I used it two years ago. I returned this year to NixOS 18.09 just before 19.03's release and GNOME's been solid throughout, and I'm using 19.09 now.

</comment></comment></comment><comment><USER9> We rebuilt our netboot installer but we had to disable all but one of the consoles due to a race condition: [https://github.com/prgmrcom/prgmr-image- source/commit/aaa8cc...](https://github.com/prgmrcom/prgmr-image- source/commit/aaa8cc9191a09b919970435a1014133a4cc576c9#diff- ca4dbb1b337305513751f4ecdc3714a7) This is a bug conceptually similar to [https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=932416](https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=932416) Does anyone know offhand which nixos component we should file a bug against? Is it [https://github.com/NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) ?

<comment><USER10> Yes, can you create an issue there with the details and CC me? ( @zimbatm ). I haven't worked on netboot but can point you towards the right people.

</comment></comment><comment><USER11> I see the list of "backward incompatibilities" is huge. Does this distro require a lot of maintenance compared to, say, Gentoo stable?

<comment><USER12> No. Nix requires much less maintenance than gentoo. The maintenance it does require is typically very fast. Gentoo builds everything from source and portage is not immutable the way Nix is. My experience running Gentoo (and I ran it during the GCC 3 -> 4 upgrade, which required a full emerge world) is that updates cane be slow, and prone to breakage, due to missing or clashing or outdated dependencies.

Nix is a dream come true. Due to the way the nix store keeps all dependencies separate and reproduces builds to a high fidelity, when you do need to build a system package (very rare, as most are just downloaded straight out of a binary cache), it will invariably succeed with few exceptions, and the resulting binaries will work correctly.

But the best part about nix vs portage is that it won't leave your system in a half way state. Upgrading NixOS means downloading or building a bunch of packages. This can be interrupted at anytime. At no point during the download or build will the old system become unusable. Nothing in the old system is overwritten. At the time you have everything built and are ready to change, the change occurs atomically and instantly. If the new system does not work, you can revert back to the old system atomically and instantly as well. In the rare case that the new system has made your computer unstable, you can reboot the system back into the old version without the need for a rescue CD or USB stick.

<comment><USER13> OTOH, if you're like me, and want to update to get a new version of one package (and its dependency tree), it's a very common experience to find out that some completely unrelated option has changed in some backwards compatibility breaking way such that I never had to deal with when I ran Arch Linux.

You can use nix-env -i of course, but then you have a duplicate package (that can be out of sync and easy to forget about) and this doesn't work for anything with a systemd service.

I like that I can't really fuck up my NixOS installation, but I actively dread updating (although it's got a lot better in the last year). I'd love a NixOS alternative that took backwards compatibility a lot more seriously.

<comment><USER14> One of strengths and at the same weaknesses of Nix is that it is not very opinionated. That means there are many ways of doing the same thing. I'm wondering how were you backporting a new package.

For example pgbouncer version that was used was a bit older than I wanted, I was easily able to update the derivation and also enable c-ares name resolution by overriding the derivation like this:

      pgbouncer = pkgs.pgbouncer.overrideAttrs (oldAttrs: rec {
        name = "pgbouncer-${version}";
        version = "1.11.0";

        src = pkgs.fetchurl {
          url = "https://pgbouncer.github.io/downloads/files/${version}/${name}.tar.gz";
          sha256 = "0w3y53kwnkcm9fmf28zbjvqk6ivfic5f2k3nflvca1i8iaj2z044";
        };

        buildInputs = with pkgs; oldAttrs.buildInputs ++ [ pkg-config c-ares ];
      });

<comment><USER13> I'm not even talking about backporting, rather updating to the latest version in NixOS unstable means running nixos-rebuild switch --upgrade... And this often seems to fail due to non-backwards compatible changes. Sure, it happens more on unstable, but the software in stable is often too far out of date or worse, broken (e.g. by the download link expiring).

Updating the package is typically a means to an end—this month I had to upgrade emacs due to a melpa package update, and python due to a work script requiring 3.7.3—the last thing I want to be doing is maintaining my general system. Even writing an override feels a bit ridiculous (it's right there in the channel!).

What I inevitably end up updating my nix-env channels and using nix-env -i to install the new package. This works most of the time, but the insidious thing is that I usually forget that I even have this dynamically installed package, and never update it. That is, until it breaks my system in some subtle way.

So yeah, if something came out with all the benefits of NixOS (and I love the nix package manager, the safety it provides, and the pure functional declaration of all the dependency trees), but with the respect for not breaking backwards compatibility that you see in functional programming communities like Clojure, then I would be in love.</comment></comment></comment></comment></comment>


Think Real Hard - <AUTHOR> https://www.benkuhn.net/thinkrealhard/ <comment><AUTHOR> This resonated a lot with me. I spent way too much time trying to find a silver bullet. This one thing that I am missing.

I've never worked in silicon valley so I thought there must be some magic that makes everything better.

But from talking to people in open source related slack groups, on conferences, and to great senior engineers I came to understand that all I was missing was the courage to follow through with whatever ideas I had. No magic solutions. Just hard thinking.

</comment><comment><USER2> Writing down the problem always does the trick.</comment>


Show HN: Manage and share design-related assets with your team - <AUTHOR> http://www.waxvine.com <comment><AUTHOR> Waxvine gives you the ability to create a showcase of your design ideas, and we're looking for people like you to provide us with honest feedback on this very early version. Your expert advice will help us make sure we're working on improving and adding the most critical things: features you expect to see, functionality you think would be cool, things that are difficult to use, and bugs you encounter.</comment>


Is All Economics Local? [pdf] - <AUTHOR> https://www.bankofengland.co.uk/-/media/boe/files/speech/2019/is-all-economics-local-speech-by-andy-haldane.pdf?la=en&hash=577BDED2260063C517798A13E4C53E17CF82CC26 <comment><USER2> haven't read the whole paper, but the single pendulum, double pendulum analogy caught my attention (took me back to grad school). they use it to talk about complex systems (like a double pendulum) arising rapidly from simple systems (2 single pendulums), which defies basic intuition about systems.

and then (on p.27)...

> "the very dimensionality of ABMs is striking. The largest in physics can now > simulate interactions of up to 400 billion distinct particles at any one > time."

and...

> "If the largest ABMs have a dimensionality greater than our population, why > not model the economy at its highest possible resolution?"

so they use agent-based models (ABMs) (figure 2 is simcity!) to uncover unintuitive emergent behaviors underlying the highly complex system that is economics, things that just can't be understood with the simple macroeconomic models based on a few variables like GDP and inflation.</comment>


Old-School PC Copy Protection Schemes (2006) - <AUTHOR> http://www.vintagecomputing.com/index.php/archives/174/old-school-copy-protection-schemes <comment><USER2> IMO Dungeon Master for the Atari ST & Amiga has the greatest copy protection scheme ever created. It utilized (amongst a multitude of other things) something called "fuzzy bits" that were bits which values were not set but could be either "0" or "1" when read.

>If you copy your original Dungeon Master floppy disk using your favorite disk copier, the copy will not have the fuzzy bits but normal bits instead. The game can easily detect their presence by reading these bits several times: if it gets random results, then it assumes the disk is original. If it gets consistent results, it assumes the disk is a copy.

[http://dmweb.free.fr/?q=node/210](http://dmweb.free.fr/?q=node/210)

<comment><USER3> This worked because the magnetic domains on the disk were larger than the r/w head on drive, and due to play in the servo mechanism. It's the same reason why the DOD creates the 7-pass rule for securely erasing disks. You could simply read the disk multiple times and get slightly different results with some statistical analysis and some cribs, you could at least partially reconstruction the original data.

Today, magnetic disks have magnetic domains pretty much the same size as the head, and the servos are much more accurate. One pass erasing is sufficient. 27-pass is just a waste of time.

Now for SSDs, you're just screwed.

<comment><USER4> Could you please elaborate on your SSD comment? I'm interested to hear more.

<comment><USER5> SSD wear leveling algorithms ensure that the entire disk is used evenly. Any block on the drive can be literally anywhere in the storage medium, even more so than with hard drives. Some SSDs have significantly more storage media than they report (over-provisioning), again for wear leveling.

In theory, SSD erasing is solved by TCG OPAL functionality. All data written to the disk medium is encrypted, whether or not it is taken advantage of by the user. The key it uses cannot be retrieved or set by the user. Tell the disk to change the key it uses and the entire device is unintelligible noise.

Some articles: [http://www.techrepublic.com/article/erasing-ssds-security- is...](http://www.techrepublic.com/article/erasing-ssds-security-is-an-issue/)

[http://arstechnica.com/security/2011/03/ask-ars-how-can-i- sa...](http://arstechnica.com/security/2011/03/ask-ars-how-can-i-safely-erase- the-data-from-my-ssd-drive/)

<comment><USER6> Shouldn't the ATA Secure Erase command take care of properly blanking an SSD? (Assuming that its firmware can be trusted, of course.)

In practice, it's a bit more complicated, though - typically the BIOS (or is the operating system?) locks out Secure Erase and you have to hot-remove the drive and reconnect it before the drive will accept it.

<comment><USER7> > Shouldn't the ATA Secure Erase command take care of properly blanking an > SSD? (Assuming that its firmware can be trusted, of course.)

It does that -- by clobbering the hw encryption key.

</comment></comment></comment></comment></comment></comment><comment><USER8> Back in the Apple ][+ days there was a copy protection scheme that depended on the spindle speed/timing of the old Apple ][ disk drive. The original would be recorded slightly off the proper speed, but still readable (unless the timing was off the other way on your drive unit). Copies would record at normal and the software could detect that and refuse to run. An issue of the old _Hardcore Computist_ magazine (core/apple pun intended) had instructions for adding a speed control knob to a disc ][ drive unit so you didn't have to take the cover off and use a jewelers screwdriver to adjust the potentiometer. In college I occasionally made a couple extra bucks teaching Apple software classes at computer stores. One customer had an issue with a drive unit that was spinning to fast being unable to read the software. A little bit of screwdriver work fixed it right up.

edit: Found some old digitized library of issues online. Not sure which issue it was: [http://computist.textfiles.com/](http://computist.textfiles.com/)

<comment><USER9> Also, using quarter track increments for unusual spacing or staggering of the writes.

(IIRC, the movement of the floppy head was controlled by software stepping of a stepper motor. The motor had four steps to move from one track to another.)

</comment></comment><comment><USER10> My favorite were the old age verification systems. I remember my dad had the original? Leasure Suit Lary, and you had to prove you were both authentic and of age.

Authentic: enter the 5th word on page 7 of the instructions (easily foiled by a copy machine)

Of Age: who won the 1978 World Series? What is a 6th grader to do there? Phone an uncle? Go to a library or book store? I breakable... Pre internet anyway :)

<comment><USER11> The best part was how US-centric all the age verification questions were. Questions about US politicians, american football scores etc.

Luckily they were all multiple-choice so over time fourteen year old me learned the answers.

</comment></comment><comment><USER12> I remember Elite on the ZX Spectrum had a novel scheme : a prism that you held up to the screen after loading the game to read a challenge code. Quite effective in that manufacturing a similar bit of plastic was beyond the ken of most teenagers.

Here's the wikipedia page : [https://en.wikipedia.org/wiki/Lenslok](https://en.wikipedia.org/wiki/Lenslok)

Seems to me that modern displays know how big and high res they are so could calibrate the challenge to the lens lock size, so perhaps this brand of weirdness will ride again!

</comment><comment><USER13> I used to copy my friends' Amiga games, and by far the trickiest was one of the Worms games. The code book was black paper with glossy black text, making it almost impossible to scan or photograph.

I settled on figuring out the most freqently used page and copying it out by hand, my mum reading out the numbers as I wrote them down. Good times.

<comment><USER14> Someone I know copied those with a flashlight and a polaroid camera.

</comment></comment><comment><USER15> I was always partial to the copy protection in Alternate Reality: The City

>The first game, The City, also featured a novel[citation needed] anti-copying technique. The program disks could be copied though the standard methods and the copy would appear to work. However, not long after the player began the game, their character would become weaker and weaker and then die from an apparent disease.

[https://en.wikipedia.org/wiki/Alternate_Reality_(series)#Tec...](https://en.wikipedia.org/wiki/Alternate_Reality_\(series\)#Technology)

<comment><USER16> Settlers III broke the game similarly. You could start playing, but once you got to manufacturing weapons for your soldiers the iron smelters produced pigs instead of iron bars and you were stuck. (and few other, similar "bugs")

<comment><USER17> They get points for the pun, too!

<comment><USER18> And minus points for their copy protection scheme sometimes stopping originals from working. I buyed Settler III and it didn't work correctly (trees wouldn't grow back), so I phoned their support and they told me that that was the copy protection scheme in action. Great work ... thanks. At least they fixed it in an update.

</comment></comment></comment></comment><comment><USER19> Wasn't there some method where a (physical) hole was made somewhere (presumably in an unused track/sector) in the floppy so that the original floppy would work, but disk-to-disk copy operation would fail?

Then, at some point in time came along those (parallel port pass-through) dongles - I think they used to be called HASP (HArdware for Software Protection).

<comment><USER20> HASP still exists, it's a USB key now:

[https://sentinel.gemalto.com/software- monetization/sentinel-...](https://sentinel.gemalto.com/software- monetization/sentinel-hasp-hl/)

<comment><USER19> Ah, so USB is what it is at now! I think one of the first movers in the HASP sector was an Israeli company, called Alladin Technologies or something - don't know if they're still around.

<comment><USER21> Used HASP dongles as late as 2012 for some realtime camera software. Alladin seems familiar too but I cannot say for sure if it was that or another.

Suffice to say: for being Digital Restrictions Managements tools they worked amazingly well, we had far more issues with activating Windows downgrade licenses and least but not last individual RHEL licenses :-/

</comment></comment></comment></comment><comment><USER2> Earlier discussion: [https://news.ycombinator.com/item?id=9151275](https://news.ycombinator.com/item?id=9151275)

</comment><comment><USER22> I remember "Manic Miner" for Spectrum had a card with a colour matrix[0] and you had to enter the correct one to play, in that time colour copies were not available or more expensive than the game. [0][http://archive.worldofdragon.org/index.php?title=Manic_Miner](http://archive.worldofdragon.org/index.php?title=Manic_Miner)

</comment><comment><USER23> Metal Gear Solid had a good one, where the radio frequency was on the back of the game art to progress in the game.

</comment><comment><USER24> lol. That brings me back. I actually own a physical copy of "Don't Copy That Floppy" on VHS. Coincidentally we stole it from our computer teacher when I was a little kid.

<comment><USER25> It was the first video I ever saw run on a computer. I got it on a Nautilus CD and played on my Macintosh LC3. Only 8MB of RAM so it was like 160x120 resolution or something.

</comment></comment><comment><USER3> The original Sid Meier's Pirates would ask you when with Spanish treasure fleet or silver train would arrive somewhere on some date. If you answered wrong, the game would still play, but you would begin at a distinct disadvantage. A skeleton crew and a leaking pinnace (the smallest ship) if I remember correctly.

</comment><comment><USER26> I remember playing Railroad Tycoon as a kid. I never realized that the train it showed on startup was copy protection. I just thought it was a stupid guessing game that they threw in as a bonus or something, like they wanted to make sure you knew all the locomotive types before you got to them in the game.

<comment><USER27> I remember that, lost my manual but played it so much I knew the trains by heart. Same with Civilization.

<comment><USER28> Civilization has the special trait that all of the copy-protection questions have their answers available in-game through the civilopedia. I always thought that was funny.

</comment></comment></comment><comment><USER29> Old school here is analog codewheel and "third word on page 75" old school hardcopy schemes (tl;dr), but I never would have played Zork III without CopyIIPC.

</comment><comment><USER6> Robotwar (a programming game in which you program robots in a vaguely BASIC- like language and then let them fight in an arena) had a copy-protection scheme that could be defeated by, as I vaguely recall, breaking into a DOS prompt and saving files to cassette, then transferring them to a normal DOS disk.

</comment><comment><USER30> I remember having to do this for Sid Meier's Civilization for DOS. A few turns into the game, it would ask a trivia question that was answered in the manual (which of course was missing). Eventually got good at answering the questions as the game would end if you failed.

</comment><comment><USER31> I cut my assembler/hardware teeth diagnosing and patching the scheme protecting a PC game called Zany Golf. All it had was a bad block check, and a Phrack article on catching INT13 was all I needed to short-circuit the validation routine. Good times.

</comment><comment><USER32> Another technique might be to randomly destroy sectors on the back of the floppy disk, e.g., using a laser. Then format the back of the disk, and record the locations containing errors, and store these locations on the front side of the disk.

</comment><comment><USER33> DayDream BBS used to have a copy protection mechanism where when it detected being a pirated copy, it silently enabled 'shell' command for all the BBS users. I imagine that gave a pause to a few Sysops! :)

</comment><comment><USER34> years ago, I pirated a copy of Half Life. It had what I could only assume was a way to detect cracked versions. Remember the long train ride at the beginning? That goes into the canyon and finally stops at the train platform with the guard standing outside? The guard that then has to open the door? In the version that I found, the guard didn't open the door. The guard fell over dead.

I tried again and again and the guard would still fall over dead every time. Wasn't sure if I was going crazy, or if I had just been trolled by a game developer somehow.

<comment><USER35> Crysis Warhead did this: [https://youtu.be/W4ST2nbZp30](https://youtu.be/W4ST2nbZp30)

</comment></comment><comment><USER36> I had a copy (ISEPIC cart) of Beach Head II for C64. When I copied that floppy I ended up with a long black-on-green screed about how copying games was wrong. It surprised the hell out of me.

</comment><comment><USER37> Wasn't there one where you were given a plastic prism and you had to look at the screen through that prism to see a number which you typed in?

Without the prism it just looked like random dots.

I might be imagining this.

</comment><comment><USER9> Did these code wheel things work? All it takes is someone to go through the wheel positions and type out all the words to a plain lookup table that can be circulated as a text file.

<comment><USER38> They worked because there was no real internet to speak of. Yes, you could put that text file on a floppy or print them out, but outside of your friends, there was no real simple way to spread that information. BBS distribution was also so small it would not have been a thing.

<comment><USER39> Additionally, most(?) of the code wheels had multiple discs stacked together. i.e. it wouldn't be a two-dimensional lookup table, but three- or four-. IMO it would be more likely for someone to write a simple software utility to emulate it, but it would probably be simpler than that to just remove the check from the game :).

</comment></comment></comment><comment><USER37> Where in Time is Carmen Sandiego on the Amiga came with a pocket encyclopedia which was both part of the game and a copy protection mechanism.</comment>


How long to follow-up? - <AUTHOR>

I just recently started looking for my first full-time engineering position, and was wondering how long I should wait to follow up on leads.
Recently a startup I'm interested in contacted me through AngelList to talk about a position, so I quickly expressed my interest and the CEO got back to me pretty quickly. Unfortunately at the time I couldn't get on the phone to talk as he/she wanted to, so I told him that I would email him back when I had some more free time. Two days go by and I finish up a client project so I email him back to have that conversation.
It's been almost 4 business days and I haven't heard back. I'm hoping it just got buried in his inbox since I sent the email at 2AM, but am unsure. Should I follow up now, or wait longer to avoid looking creepy? <comment><USER2> Depends on a number of factors. I would wait a full week in business days - but do follow up past that. And stay on their radar until they respond.

It's happened to me in numerous cases - and can often be used as a litmus test (albeit a small one) on your determination/interest in the position.

A quick message like "Hey X - just wanted to keep this on your radar. I'm available ABC time to chat. Looking forward to discussing the role further" should suffice.

It's surprising how so few actually end up following up.

<comment><AUTHOR> Thanks, I'll take your advice. Kinda frustrating.</comment></comment>


Hackathons Are Awesome, Y Combinator Agrees - <AUTHOR> https://www.firebase.com/blog/2014-08-06-hackathons-are-awesome-y-combinator-agrees.html

<comment><USER2> "...Over the weekend they turned pizza, energy drinks, and APIs into 123 projects..."

The work that comes out of such hackathons are impressive. However, I can't help but think they work against us as we try to steer software development into greater respectability. Do doctors get together to have "heal-o-thons" with a scoreboard counter of how many cigarettes they went through for the event?

The celebration of caffeine driven cultures and work environments that feel like kids-at-summer-camp give those outside of the profession the impression that this is "normal".

Bah, humbug. Maybe I'm just getting older and put a higher priority on work environment and habits that lead to a healthier life-style.</comment>


What's new for IT pros in Windows 10, version 2004 - <AUTHOR> https://techcommunity.microsoft.com/t5/windows-it-pro-blog/what-s-new-for-it-pros-in-windows-10-version-2004/ba-p/1419764 <comment><AUTHOR> 'Windows Subsystem for Linux (WSL) enhancements

'The Windows Subsystem for Linux lets developers run a GNU/Linux environment. Here's some enhancements we've made in Windows 10, version 2004.

'Windows Subsystem for Linux 2 (WSL2). This new version of the architecture powers the WSL to run on ELF64 Linux binaries on Windows and adds support for ARM64 devices.

'Connect to WSL apps from localhost: Connect to your WSL Linux networking applications from the local host. For example, start a NodeJS service in a WSL 2 Linux distro, and connect to it from Microsoft Edge.

'Global configuration options. We've added global configuration options that you can set on the local host which will apply to each of your WSL distros.'</comment>


HP EliteBook 1030 with 16GB of RAM and Starting Price of $1249 - <AUTHOR> http://www.etechtime.com/2016/05/hp-elitebook-1030-with-16gb-of-ram-and.html <comment><USER2> Nice one :-)</comment>


MBA Mondays: Accounting From The Archives - <AUTHOR> http://www.avc.com/a_vc/2012/08/mba-mondays-accounting-from-the-archives.html <comment><USER2> To make it short:

1\. Keep a list of monthly expenses and receivables to know your burn or profit rate 2\. Make sure you have enough money in the bank. Some receivables like adsense earnings are only cashed in 45-60 days 3\. Use a professional accountant.

I would also suggest at the start of each month to review the above and adjust if there are any changes</comment>


Non-toxic salt water battery prototype can charge in seconds - <AUTHOR> https://techxplore.com/news/2019-03-non-toxic-salt-battery-prototype-seconds.html <comment><USER2> Since I read the 1950's era Popular Mechanics books my dad has had since I was born, there have been $StarTrekTech battery prototypes that totally change the battery paradigm and just need to get turned into a product. Then they fade away, never to be heard from again.

I'm not sure we will ever(in 20 years or so) invent a new battery technology that is not just a refinement of existing technologies. Convince/prove me wrong?

</comment><comment><USER3> What's the benefit here over a normal capacitor (honest question)?</comment>


Let's Remember Exxon's Extremely Wrong Response to Its Catastrophic Oil Spill - <AUTHOR> https://motherboard.vice.com/en_us/article/lets-remember-exxons-extremely-fucked-up-response-to-its-catastrophic-oil-spill <comment><USER2> I don't know why but I'm thinking about Symantec right now...</comment>


Ask HN: Who else is using knowledge graphs? - <AUTHOR> Our startup has built an Ontology containing medical terms and their relations. In simpler terms, we have the names (diseases, symptoms, medications etc...) and the relations that they have to each other. It is used in the back-end for our current products. We are thinking of opening it (the medical ontology) for public access and building a community that uses and maintains it.
Forgive my google skills, but I see very little interest in this tech and almost zero applications that use anything similar.
Should we take the trouble to go through with the project?
Is there anyone using this kind of structured knowledge base? How? <comment><USER2> The big Kahuna of medical taxonomies is UMLS

[https://www.nlm.nih.gov/research/umls/](https://www.nlm.nih.gov/research/umls/)

There is a lot of activity on knowledge graphs in medicine, including both clinical notes and support for research (ex. drug discovery)

RDF and OWL are well known as a platform for ontologies, but really ontologies are implicit in the work of the OMG, UML, WSDL, database schemas, object- oriented design, etc. Many different people are working on this from different angles in different communities and they don't talk as much as they could so the state of the art is actually better than most people (especially those involved) think.

I would love to talk more. Click on my HN profile link and send me an email.</comment>


I'm no longer working on Octave - <AUTHOR> https://mailman.cae.wisc.edu/pipermail/help-octave/2013-April/057932.html

<comment><USER2> Haha nice, I just read through the whole thing and only realized it was april fools when I clicked the link to his future plans! :)

</comment><comment><USER3> april fools</comment>


Standard Treasury (YC S13) Raises $2.7M to Help Banks Deliver Digital Services - <AUTHOR> http://blog.ycombinator.com/standard-treasury-yc-s13-raises-2-dollars-dot-7m-to-help-banks-deliver-digital-services

<comment><USER2> I really am trying to understand what they are doing here. So are they adding a layer on IFX to expose banking api to the clients/companies ? [http://standardtreasury.com/developer](http://standardtreasury.com/developer) is not working.

<comment><USER2> I now understand what they are trying to achieve here. Its basically the Banking as a Service - where they are expose their API so that companies can write a client and make the calls to the BankingService and include it as part of their accounting or other software by which means they can bake the services into the accounting dashboard (or another service, like Payroll, Invoice Payments etc).

Neat Stuff.

</comment></comment><comment><USER3> Congratulations! The premise behind the company sounded cool when I first heard about you a few months back, exciting :-).

</comment><comment><USER4> Nicely done Mr. Townsend. Nicely done.</comment>


UC Berkeley hacking leaves thousands at risk of ID theft - <AUTHOR> http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2009/05/08/BAPA17H89B.DTL

<comment><USER2> It is (of course) a home page story at berkeley.edu - with a link to its own subdomain: <http://datatheft.berkeley.edu>

Pity that there is not a _comments_ feature on the university site for Berkeley's own IT folks to discuss the event and university response to it. I hope there is as much hacker discussion of the _why_ and _how_ of THIS event on a major IT campus as there was over Joel's little password snafu.

—Berkeley alum

</comment><comment><USER3> Locks keep out the honest people.</comment>


LA City Council proposal would send letters to car owners in prostitution areas - <AUTHOR> http://www.dailynews.com/social-affairs/20151125/la-city-council-proposal-would-send-john-letters-to-owners-of-cars-in-prostitution-areas <comment><USER2> the council woman proposing it has literally no idea how bad she sounds:

>> In a statement Wednesday, Martinez said: "If you aren't soliciting, you have no reason to worry about finding one of these letters in your mailbox. But if you are, these letters will discourage you from returning. Soliciting for sex in our neighborhoods is not OK."

No reason to worry? Vis-a-vi "nothing to hide" so it's ok to invade your privacy.</comment>


Rails-deployed app without exposing the source code in server? - <AUTHOR>

	Is there a way to a Rails-deployed app without exposing the source code in server? like .net where only .dll file uploaded in server. <comment><USER2> [http://stackoverflow.com/questions/1640342/protecting- ruby-c...](http://stackoverflow.com/questions/1640342/protecting-ruby-code)

[http://stackoverflow.com/questions/1515012/possible-to- conve...](http://stackoverflow.com/questions/1515012/possible-to-convert-ruby- script-to-exe-so-that-source-code-not-visible)

<http://rencoder.com/>

</comment><comment><USER3> I find lots of rubyists get quite snotty about this concept. However, if you must, I'd suggest that you look into jrubyc as an option. It spits out Java bytecode that can't be trivially converted back to anything meaningful.

</comment><comment><USER4> In our infrastructure we use a ruby gem called warble to deploy jruby app's as war files into a tomcat servlet.</comment>


Ask YC: Best way to get my son started on programming? - <AUTHOR>

Hi all. My son is eleven years old and I'm looking into a good way to get him passionate about computer science and programming. There are a lot of resources out there. Does anyone have a recommendation on the best? <comment><USER2> If your son is passionate about technology and computers, direct him to learning to code the hard way series. Or pick up a book that will teach programming by creating a series of simple games.

If he his not, stop trying to live vicariously through him.

<comment><USER3> You'd recommend to an 11 year old to read a book "learning to code the hard way"? Really?

I think you're making a lot of assumptions with a comment like "stop trying to live vicariously through him". Would you have had the same reaction if the question was about sports?

<comment><USER2> It's a series where you dictate written programs and then debug them. <http://learncodethehardway.org/>

If the question were about sports, then yes, it would be similar. (eg: football) If your child is passionate about football, begs to watch games etc; consider enrolling him in a football league where he will play football and buy him a book that explains real plays that wont talk down to him because he is a child. If you love football and want to see your child play football, but he has expressed no interest in it, it may not be A Really Good Idea(tm).

(EDIT: added link)

<comment><USER3> For an 11 year old, a more visual pseudo programming language (see Scratch or Alice) is more appropriate than jumping into something like PHP or C. Even Codea is a jump... but Lua is pretty friendly for someone seeing code for the first time.

My kids aren't passionate about sports but they play soccer. The question that I could have asked is 'what's the best league in my area to be in?'. I wouldn't expect that readers would jump to the conclusion that we were living vicariously through them.

At any rate, I thought it was a reasonable initial question. We don't push kids into programming, but we do make materials available when they show interest. That's why I'm familiar with what I posted. However a comment such as "stop trying to live vicariously through him" comes across as rather snide.

<comment><USER4> Disagree on Scratch or Alice being necessarily better. At 11, he can certainly jump into languages like PHP or Python perfectly fine. Many programmers (including many here) started a much younger age than 11 and at a time when Scratch or Alice may not have been available. There's nothing wrong with going straight to those.

<comment><USER3> Yes, I think that really depends on the kid. Mainly I wanted to point out that there are plenty of learning vehicles that teach the programming concepts without necessarily being 100% text-based coding. For some kids that will excite them more. (That's also why I like WeDo Robotics and Mindstorm.)

Nothing wrong with going directly to programming languages if that's what the kid's into.

</comment></comment></comment></comment></comment></comment><comment><USER5> Get him one of these <http://sites.google.com/site/libby8dev/fignition> \- and nothing else, no PC, no games console, no smartphone. When I were a lad, we made our own fun. Out of rocks. And we liked it that way.

<comment><USER6> PAL output might be an issue in much of the world.

</comment></comment><comment><USER3> Here are some ideas (and we've used pretty much all of them)

Alice, from Randy Pausch (<http://www.thelastlecture.com/>) team <http://alice.org/>

Scratch <http://scratch.mit.edu/>

Codea--programming on the iPad. I highly recommend getting a keyboard. <http://twolivesleft.com/Codea/>

Art of Problem Solving has online programming classes [http://www.artofproblemsolving.com/School/courseinfo.php?cou...](http://www.artofproblemsolving.com/School/courseinfo.php?course_id=cs:intro)

Good luck!

</comment><comment><USER6> Resources about programming won't make a child passionate about it.

If he's interested, spending time with him doing some Alice or Kodu might have an effect over the long term.

But passions and interests build over time and at age 11 are heavily influenced by the interests of peers.

</comment><comment><USER7> If he likes computer games like i do try with Game Maker like i did. 2d game engine with drag and drop actions + scripting.

</comment><comment><USER8> Find a nice open source game and start showing him how to modify/extend it.

</comment><comment><USER9> lego mindstorms

<comment><AUTHOR> This is where we started a couple of years ago. He has expressed a lot of interest in app design, and I'm taking the track of "walk before you fly." As an intensely analytic and intelligent guy, I think he's ready to get into the code.

Surprised no one mentioned HacketyHack. Anyone have any experience with that?</comment></comment>


LlamaDB: A simple SQL database written in Rust - <AUTHOR> https://github.com/nukep/llamadb/ <comment><USER2> HN author should probably have linked this blog post instead. [https://nukep.github.io/progblog/2015/04/15/developing- llama...](https://nukep.github.io/progblog/2015/04/15/developing-llamadb.html) it's a good read.

</comment><comment><USER3> Seems like a cool toy. Rust is probably the right language to write a db

</comment><comment><USER4> >>>> Do not use this for anything important, like... for anything.

"Llama" means flame in Spanish; a rather appropriate name. No pun intended.

<comment><USER5> Doesn't it also mean "call" as well? So if this database ever became relevant it could be seen as "CallDB". I think "CallDB" is also an appropriate name for a database in a sense.

<comment><USER4> yes, "llama" is the present tense, 3rd person singular, as in "he calls" (el llama).

</comment></comment></comment><comment><USER6> Candor should always be encouraged in software (and particularly in databases). Free/open source software eventually works around a lack of candor, but the turnaround time is shortest from honest authors who explain the tradeoffs they intentionally make. Looking forward to seeing where this goes.

Also really excited about rust for these kinds of things, and about how the language is being developed in general.

</comment><comment><USER7> I like these kind of announcements: dat open source bravery on a Gihub README.</comment>


Ask HN: Lost – Please Help (Side Project) - <AUTHOR>

I'm a regular user here that's currently (somewhat) happily employed.
I also have a side project that makes between $800 and $2000 / month (varies by season), and I've been talking with a company about a possible acquisition of this, and hiring me. We are decently far along in the process.
I'm completely lost on what to expect / what makes sense / what to watch out for (I don't live in any big 'tech' areas, and feel a little out of touch). Have any of you been through something similar, and have any pointers? I can discuss privately if you need more details (see my email in my profile).
edit: Hacker News is throttling my replies - they're coming, just slowly... <comment><USER2> > I've been talking with a company about a possible acquisition of this, and > hiring me ...

Okay, your description is short on details, but it looks as though you have an intellectual property or "idea" (a) and some personal skills (b).

The people you're negotiating with may be trying to get (a) by offering (b). It works like this -- if they hire you, any ideas you have past that point belong to them. All they need to do is claim that you had your idea (or substantially developed it) _after_ you were hired as their employee. And as their employee, any ideas you have belong to them (a common condition of employment).

I'm not saying this is the only possibility, but it is certainly on a list of possibilities. So ... be careful about giving away your ideas in exchange for employment. Good luck.

<comment><AUTHOR> To be clear, they are offering to hire me, and give me a sizeable (at least I think, no clue what would be 'standard') starting bonus for the side project. Basically, they would own the side project after I start.

Are you describing them hiring me, and not acquiring the side project?

</comment></comment><comment><AUTHOR> Thanks for all of the great comments - I'm still going through and replying to them.

Another thing to keep in mind:

I've spoken vaguely about the site, and how it works, but nothing specific. They'd like me to come down, and discuss what I'd be doing, and go through some of the code behind the site. Is there any way to protect myself from them just copying my idea, and stopping talking to me? I signed an NDA, but that just protects each of us from discussing how the other's business works with people outside their business. Is there any way to protect myself from this?

I pretty much asked them this exact question, and they basically said 'they talk with a lot of companies, and if they did so, word would get out, and no- one would talk to them', which is true.

<comment><USER3> You need to talk to a lawyer.

<comment><AUTHOR> I agree, I'm looking into this now.

</comment></comment></comment><comment><USER4> I honestly would recommend some insightful reading over some PG's essays, they are priceless ([http://www.paulgraham.com/articles.html](http://www.paulgraham.com/articles.html)). Here are some that are related to your case and might be helpful:

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

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

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

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

</comment><comment><USER5> Would you be happy with the bonus that they're offering you to give up the project completely and walk away from the project AND a job.

There's always the possibility that you don't like working for these people or it doesn't work out.

Also, I think you should talk to an accountant/lawyer about whether you want to be paid for the product as a bonus or as a separate sale for the IP. If they want to pay you for it as a bonus, there may be seriously negative tax implications for you...but if you sell it you want to make sure to shield yourself from liability.

<comment><AUTHOR> That's the thought that's on the back of my mind throughout all of this. I do think talking to a lawyer could be a good idea, but I'm not sure how to go about doing this. My Uncle runs a small business, so I'll see if he has any suggestions - is there anywhere I can look for a lawyer? I'd be willing to spend some money to make sure I'm doing this right, I'm just not sure where to look.

</comment></comment><comment><USER6> Suppose the product revenue is $10k/year with negligible time spent by you on support. (Deduct the cost of time you spent from the $10k.)

If you value 20x earnings, that's a valuation of $200k for your project.

Since the employment is (presumably) at-will, just value the cost of selling the side-project. If you want, factor in the value of any raise you get by switching jobs.

<comment><AUTHOR> I have the site pretty well automated, so I can maintain it with a few hours a month. Any work I spend on it is to grow revenue. How do I come up with a value multiplier? I'm not strapped for cash, so $200k now vs. earned in the future isn't a huge difference to me.

That's true that I probably need to factor in the income from selling the site, and the base income separately. Factoring in the raise is a little difficult, as I'd be moving, and expect a higher salary in the city I'd be moving to.

<comment><USER6> Google's P/E is 30x. So, 30 times one year's earnings is reasonable. Do you expect better earnings growth than Google? Then use 50x or more.

If the new job is typical at-will employment, I'd assign a value of $0 to that.

Would they hire you without buying your webiste? Would they buy your website without hiring you? That would help you value each component of the offer.

$200k now is better than $20k/year for 10 years, because you can invest that $200k. The question is the relative value of investing in the stock market, vs investing more in your product.

<comment><AUTHOR> A value of $0 to the employment probably makes sense, but it is a little more complicated, as:

I'm not sure that they'd buy my website without hiring me (that's the impression I've received). They said it would be more difficult, but they would consider hiring me without buying my site if it came to that.

I was trying to place what they'd be willing to offer, and I gave them a ballpark figure of "> 100k", which in hindsight was a bad idea. I'm a little worried that they are going to offer me exactly that now...

Note: Hacker News seems to be rate limiting my replies now, so I'm going to put some of my other replies here too.

</comment></comment></comment></comment><comment><USER7> They could hire you, take the project, then fire you. What would you do?

Look over any contracts. The words in contracts are actually important and they are not EULAs to skip over.

Estimate what the worse case is worth for you.

<comment><AUTHOR> I've actually been wondering this. I've seen higher profile acqui-hires in the news, but never an explanation on how they work. Should I expect the bonus to vest over some amount of time? Should I expect anything to protect me from (a)?</comment></comment>


Ask HN: CMS or Framework for a new project? - <AUTHOR>

I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about)
On discussions with friends, they suggested Django. But I have no experience with Python or Django.
So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility?
Request you to not make this a php vs python battle as I'm looking for advice here. Thanks
PS. Cross-Posted to SO so apologies in advance to those who are there as well <comment><USER2> I would use what you know unless what you know is going to cause problems for you. Building a store is unlikely to cause you problems.

Take a look at the PHP based cart options available and see if they will fit your needs. If they don't then look to see how much work they will require in custom development. If you can easily do something with existing scripts then I would think the savings in time and getting to selling as fast as possible would be best.

If you start to outgrow your first CMS based solution then you could always build something totally custom with something like CodeIgniter while your store is still making sales. You might even be able to take the time to learn Python and Django in exploring other options.

If nothing you find will work, then go with CodeIgniter (though Drupal is also somewhat of a framework and you could build a cart as a custom add-on) so that you can get to sales as fast as possible.

</comment><comment><USER3> Stick with PHP since you are already comfortable with it.

I've tried using Drupal but it's too damn complicated to get going. CodeIgniter is still based on PHP4. If you think that's a good idea, I guess CI is an option. There's also Kohana which started as a PHP5 fork of CI. I've used it a little bit and while I don't love it, it's not awful either.

Wordpress has plenty of flaws but it's probably the best option if you want to get your store up and running soon. There is a plugin for anything you might want to do. Specifically there is the WP eCommerce plugin which has grown a lot and there's plenty of people to provide paid support when needed.

Link: <http://getshopped.org/>

Besides making a completely WP-based store, you can run it on Magento, osCommerce, hosted solutions, etc and you can bet there's a plugin or a guide to help you integrate those with WP.

So, should you use a framework or a CMS? It comes down to whether you want to implement everything yourself, or use an already proven eCommerce platform.

If no platforms fulfill your requirements, it's a choice between hacking other people's code or building it mostly from scratch. Sometimes it's just as hard to do the latter as it is to figure out how someone else's tangled spaghetti code works.

In conclusion, go RTFM and see if there's something that will do the job out of the box.

</comment><comment><AUTHOR> I agree. I have come to the same conclusion that going with a PHP based solutions is the best option. In fact, right now, I don't have the time to learn a new platform as well.

That said, I've started thinking on a different line since I posted this question. Instead of going with a CMS or a framework, I think it will be much easier and quicker to go with a dedicated E-Commerce application like Opencart, ZenCart etc.

<comment><USER4> If your main focus will be the online store, I'd definitely suggest going with an e-commerce app to keep things simple, but did you look into Drupal + Ubercart (<http://drupal.org/project/ubercart>)? If your needs extend beyond just the online store, that may be a good solution.

Also, Magento (<http://www.magentocommerce.com>) has a free community edition and may also work - just adding it to your list of possibilities! :)

<comment><AUTHOR> I did consider Ubercart but found it quite lacking in features. It is more of a ... addon... than a dedicated E-Commerce app.

I've been reading up on Magento and found quite a bit of negative issues about it - regarding speed, support and documentation. Also, it is supposed to be a pain to extend or modify.

</comment></comment></comment><comment><USER5> I don't have much experience with PHP or anything related, but when I was in similar shoes (coming from perl, though), I tried Django, and it was very very easy.

From basically zero Django knowledge, and only very little python, I had a usable application up and running within a weekend.

I can only recommend it, it's a pleasure to work with it, and has very good documentation too.

</comment><comment><USER6> The most complete open source PHP e-commerce out there is MagentoCommerce, but it's very hard to customize.

</comment><comment><USER7> wordpress + wp-commerce is VERY easy.

magento, oscommerce are full featured PHP carts</comment>