Show HN: We built a viral racing game to promote a James Bond giveaway - <AUTHOR> http://www.getaround.com/007

<comment><USER2> This is pretty cool. I tried messing up some of the JavaScript variables (increasing acceleration, turning speed), and it looks like they do some sort of server-side validation on your race results. The Ajax POST request includes your score, the path you took, and the road that the game generated (and didn't accept my sub-30s score).

I set the game parameters to generate a straight course (set curvy, mountainy to 0) and got 32.94 seconds, so I'm not sure how some people are getting ~33 seconds honestly.</comment>


Rules for Developing Safety Critical Code [pdf] - <AUTHOR> http://pixelscommander.com/wp-content/uploads/2014/12/P10.pdf <comment><USER2> We just talked about this:

[https://news.ycombinator.com/item?id=8856226](https://news.ycombinator.com/item?id=8856226)

</comment><comment><USER3> The most impressive thing I've read about NASA's software development isn't mentioned here. It was the system where bugs and defects were (at least in principle) not treated as the failing of an individual but rather as a failing of the entire development process. So when a problem is found, the question isn't "Who did this and how can we punish them?" it's "What can we as a team do so that this never happens again?"

I don't know how this works in practice, but it sounds like a great system even when dealing with code in a lower-risk setting.

<comment><USER4> Blameless postmortems work phenomenally at Etsy which is a pretty low risk setting (after reading Sidney Dekker's book The Field Guide to Understanding Human Error [highly recommended] I would say that blameless post-mortems are even more important in a high-risk setting). Except failure isn't the correct word - the book makes the case that these are natural artefacts of complex systems.

1: [https://codeascraft.com/2012/05/22/blameless- postmortems/](https://codeascraft.com/2012/05/22/blameless-postmortems/)

2: [http://www.amazon.com/Field-Guide-Understanding-Human- Error/...](http://www.amazon.com/Field-Guide-Understanding-Human- Error/dp/0754648265)

<comment><USER5> Nice article. Something it doesn't point out, which can become one of the elements in the cycle of name/blame/shame, is the creation of 'heroes'. This is the figure who throws themselves at the issue and brings it back from the brink of disaster. If the culture isn't fixed and failure easy to talk about, then this can play out repeatedly. Since it's usually a celebrated event ('we survived!'), it creates poor incentives for fixing the culture. One can also play this game by noticing a potential failure mode, figuring out how to fix it, but only leaping in once it's struck. I'd rather find another employer though.

</comment></comment></comment><comment><USER6> > All code must be compiled, from the first day of development, with all > compiler warnings enabled at the compiler's most pedantic setting. All code > must compile with these setting without any warnings. All code must be > checked daily with at least one, but preferably more than one, state-of-the- > art static source code analyzer and should pass the analyses with zero > warnings.

Wow, am I ever frustrated by the summary ignoring of warnings I see going on around me. I spend my spare time at work making warnings go away and deleting uncommented @SupressWarnings from our codebase.

In a word, KISS. Another engineer designing critical systems for the US government coined that one, apparently [1].

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

<comment><USER7> Then there's Clang's struct alignment warnings using -Weverything. "Oh no, your struct will have 3 bytes of padding!" Made me turn off -Werror. Some warnings can be ignored.

<comment><USER8> It's shocking to see how often people write code like: memcpy(somePtr, &myStructObj, 12);

So while that warning can certainly be useless information, it does definitely catch bugs. Unfortunately, the people who write code like the above are also more likely to be people who ignore warnings. ;-)

<comment><USER9> Maybe you are being too specific in your example, and thus I am being nitpicky rather than helpful, but wouldn't that be caught by a static analyzer?

<comment><USER8> I just tried the following simple example:

      #include <string.h>

      struct S {
        int i;
        char c;
        int j;
      };

      void f(void) {
        struct S s1 = { 0, 0, 0 }, s2 = { 0, 0, 0 };
        memcpy(&s1, &s2, 9);
      }

      int main(void) {
        f();
        return 0;
      }

MSVC, Clang, and PC-Lint are all silent on the code (which is reasonable behavior since it's impossible to glean programmer intent from that snippet -- maybe the programmer really only wants the first nine bytes!). (Btw, yes, I am using the analyzer features for MSVC and Clang, not just relying on high warning levels.)

</comment></comment></comment></comment></comment><comment><USER10> // Of course this is only an example, but except in rare cases when the value of a boolean is significant (e.g., interfacing code in different languages), don't compare to booleans! Not only is it redundant, it's another potential source of error.

if (!c_assert(p >= 0) == true) { return ERROR; }

// vs

if (!c_assert(p >= 0)) { return ERROR; }

// The following makes the error condition clearer, but it goes against the convention of having a hopefully true condition as the argument to assert.

if (c_assert(p < 0)) { return ERROR; }

<comment><USER11> I agree with you in principal, but in practice I work on a lot of C code that does not have a built in bool type (C89).

In your example using > or < there is not an issue because it's certain the return value is either 0 or 1. However, when checking a specific variable used as a boolean I prefer to see an explicit comparison.

if(variable)

versus

if(variable==TRUE)

I developed this preference after spending weeks on a particularly nasty bug. The bug was triggered by a corrupted int that was used as a boolean variable that passed a check because if(146134613) { kill_me_now(); } will run, even though the value had been corrupted. (of course, tracking down the source of the corruption was the real fix for that case, but there's no point in having safety checks that don't work)

<comment><USER10> Interesting example, but then you're at risk of creating code paths that vary depending on whether boolean values are true, false, or other, which is contrary to the definition of a boolean value.

<comment><USER11> You're right, but that is true because there is not a boolean type, not because of the form of the check.

Either form has the same problem since an int is used in place of a true boolean (true | false | other), but I prefer the form that makes it more explicit and noticeable.

</comment></comment></comment></comment><comment><USER12> This paper also explains each rule. They use code analysis tools a lot, and do not like stuff which makes analysis harder (recursion, unbounded loops..)

<comment><USER13> Recursion and unbounded loops are far too risky on their own, even ignoring the problems they cause for static analysis. The code that goes on NASA spacecraft is bombarded by cosmic rays on a daily basis, something a server sitting in a building at the bottom of the atmosphere doesn't have to worry about nearly as much. Even if the code is perfect, if a ray hits the right spot it's possible for it to flip a bit and then your perfect recursive function will do who knows what. [1]

They use error-correcting memory to combat this, but it's still better to be safe than sorry when your software controls a multimillion dollar space oasis with human beings inside who have no means of escape.

[1] [http://www.statemaster.com/encyclopedia/Single_event- upset](http://www.statemaster.com/encyclopedia/Single_event-upset)

</comment></comment><comment><USER14> So basically keep code simple, concise, and predictable.

</comment><comment><USER15> I'm interested by the rule that says that loops must either be statically verified to terminate or statically verified to never terminate. Combined with the forbidding of recursion, it's an interesting approximation of a non- Turing-complete language. Or are guaranteed-to-be-infinite loops admissible in non-Turing-complete languages?

<comment><USER16> You are correct. Total languages are not Turing complete.

However, in the case of safety-critical software, we don't actually follow that rule perfectly. We usually have one or more main loops that never terminates, but everything called from there _does_ terminate.

In languages that _enforce_ totality, like Agda (which is not suitable for most safety-critical programming), you can either selectively disable termination checking on the main function, or you can recurse over a large number. I'm partial to 99999999999999999.

</comment></comment><comment><USER17> The rule about pointer is pretty limiting (no pointer function, no more than one level of dereferencing).

The reason is also pretty sad : "Pointers are easily misused, even by experienced programmers". I don't see how an experienced programmer has more chance to misuse pointers than anything else.

<comment><USER18> I believe this is because of the type of code they write. When writing real time systems you care about predictability of execution. When you allow function pointers, you (as a programmer / static analysis tool) suddenly have no idea what code will be executed, thus you can't reason about the time it takes. You could scour the codebase for all instances of code that set a particular function pointer, but then again it might be done indirectly, or - heaven forbid - based directly on external input. It makes code much harder to reason about.

<comment><USER19> This. There are categories of embedded system that don't allow _reentrancy_ ; it must be possible to represent the program's callgraph as a DAG with each function appearing exactly once. In some systems (ADA?) this allows for the preallocation of all local variables, too.

Some hardware (e.g. the smaller PICs) has poor support for pointers which can make indirection cost quite a lot of instructions.

Then there's the general principle of cutting your coat according to your cloth. You don't use a generalised pointer-to-rocket-engine system because you aren't going to add more engines at runtime

<comment><USER20> "You don't use a generalised pointer-to-rocket-engine system because you aren't going to add more engines at runtime"

Well, we might. Particularly if the vehicle you're modeling for a hardware in the loop sim isn't entirely specified at compile time.

</comment></comment></comment></comment><comment><USER21> > Typically, this means no more than about 60 lines of code per function.

Uncle Bob would be very upset by this statement. He advocates a maximum of 4-5 lines per function to ensure readable code in his Clean Coders video series. Anything more, and you need to refactor into smaller functions.

<comment><USER22> > He advocates a maximum of 4-5 lines per function to ensure readable code

Yeah, and you end up with myriad of functions which are used once and only once and it becomes impossible to actually find code which does something useful.

<comment><USER23> ... and good luck naming all those functions.

<comment><USER19> See sibling comment about domain-specific language; there's nothing wrong with long function names if your autocomplete is working. Codebase I'm working with has names like "auditNullRecipeCursorAtEndOfOrderLineAdditionsIfRequired" and "getUnselectedSiblingWithSametabIndexOrCreateRepeatedChildIfLessThanMax"

<comment><USER24> It's hard to notice typos in names that long. Can you immediately tell where the typo is in auditNullRecipeCursorAtStartOfOrderLineAdditionsIfRequired ?

<comment><USER19> I can't tell at all. Fortunately, as long as someone hasn't declared another function with the typoed name, either Intellisense or the compiler will tell me.

I have a much harder time with "_tcscpy_s" and similar suites of functions where a single-letter typo is likely to be a different function with the same signature.

<comment><USER24> I changed ...End... to ...Start..., which could be a plausible real world bug.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> A bit surprised it doesn't mention the use of curly braces. Perhaps they assume their "state of the art" static code analysis tools will find potential issues (like Apple's goto fail failure).

<comment><USER26> This documents is a summary. There in much more detail in the JPL Institutional Coding Standard for the C Programming Language : [http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf](http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf)

</comment></comment><comment><USER27> The PDF file seems to be timestamped 2014-12-26. Does any-one happen to know the exact authoring date? Sadly, there is no date given in the document itself.

<comment><USER28> atsaloli already gave a good answer, but I'll add that the date is in the PDF's metadata. fex, poppler provides pdfinfo which shows the creation date of 2007-01-15. Your viewer probably has an option to show it too.

<comment><USER27> Indeed, you're right. Even Apple's Preview app on my box can do that :)

</comment></comment></comment><comment><USER29> I would gladly print that PDF and stick it in every office. Maybe an alternative would be to make it work, and then to make it readable.</comment>


Ask HN: Where will Bitcoin price be in one year from now (Dec 18th, 2014)? - <AUTHOR>

<comment><USER2> When I look at the chart with a logaritmic scale and draw a line it ends up somewhere between $5000 and $10000. Let's see what's going to happen.

But yea, past performance is no guarantee for the future.

</comment><comment><USER3> It starts and ends at zero, like any other pump and dump hype...

</comment><comment><AUTHOR> My guess is: 3,100 US$.

</comment><comment><USER4> zero, as in ZeroCoin ;-)</comment>


Pantsuit: The Hillary Clinton UI Pattern Library - <AUTHOR> https://medium.com/git-out-the-vote/pantsuit-the-hillary-clinton-ui-pattern-library-238e9bf06b54#.n7xkkz4nq <comment><USER2> I thought this would be more interesting. But really it is just a template for Hillary Clinton's campaign website -- nothing novel about the design or approach.

</comment><comment><USER3> Somehow, based on the link title, I expected to find a library of UI elements based on Hillarys _actual_ pants.</comment>


A data driven look at Chicago startups - <AUTHOR> http://www.nbcchicago.com/blogs/inc-well/How-Effective-is-Excelerate-for-Chicago-Startups-149832595.html

<comment><USER2> It's great to see how non-Valley accelerators truly measure up to YC.</comment>


Too Few Women in Tech? Stop Telling People How They Should Feel About It - <AUTHOR> http://www.seattle20.com/blog/Too-Few-Women-in-Tech-Stop-Telling-People-How-They-Should-Feel-About-It.aspx

<comment><USER2> >> I thought, when juxtaposed with the response I got from Nancy Xiao, a recent high-school grad and TeachStreet intern. "I've come to realize one of my bigger challenges is not having a technical background," she says. "Just because a woman doesn't speak Ruby doesn't mean she's incapable."

If I'm looking for a partner to start a business, then I am looking someone with skills to execute. So, if no skills in the area then no startup. Their are many skills that could be used in a startup, but I am loathe to let anyone manage developers who wasn't a developer. Sure, maybe there are some examples, but from most of my experience it just leads to problems.

Heck, I would partner with a dragon if it had the right skills (and obey the local laws) - any legal, can-go-to-sleep-at-night way to the money is fine.

</comment><comment><USER3> My favorite part of the article: "When I encounter a woman I find relatable succeeding in tech, I hunt her down and I interrogate her. I'm desperate for examples of how to do this, how to carve out a path for myself in this world as myself,..."

Translation: "I'm desperate to follow in someone else's footsteps while carving out a path for myself. And that person needs to have breasts!"

Strangely, she seems to think her problem is that she can't find someone to follow, rather than the fact that she is desperately trying to be a follower.

<comment><USER4> Good grief! She should take the female out of the question. Find a personable developer with a decade or two of experience, so that he has some perspective. Ask away. Most likely he would be willing to spend the necessary time to answer her questions. And follow the trail. If he is in corporate development, but she is interested in startups, ask him to recommend a friend. There are many paid paths from photoshop or page layout to hardcore developer. All it needs is intelligence and a willingness to work hard.

EDIT: So I posted before I read the article :-) If she wanted to be on the Sr. management track, she should have gone to a smaller company, where ability would have been recognized without being on the basketball team, or learn to play basketball. If you want to fasttrack, go where the track is fast.

<comment><USER3> She could also learn about tech, which she seems to think that women seeking management positions in tech companies should not have to do.

(At least one tech company also thought they could hire a non-techie woman as CEO. Hopefully the rest of us can learn from HP's mistake.)</comment></comment></comment>


Rant @ HN: Big bully = big business ? - <AUTHOR>

I am kind of stuck with a highly incompetent(borderline bully) ISP  in northern MA /Southern NH and wondering what are my options ? Needless to say I am pissed !
Ccast: my current ISP and cable provider.
I find their net connections to be slow ( rarely get the promised upload and download speed).
besides they are constantly up to their no good tricks - bundling packages in the false pretense of cheap rates and then pulling the carpet. They have no need to care  for their internet  customers as they have very little competition in the area.
Fairpoint: The former verizon Fios service is now nearly bankrupt. I am not sure if they would be around next month.
What are my options ? Looks like as a customer - I am screwed.Has any one else had this situation with big business ? Rant on . <comment><USER2> DSL is about your only other option in this area.

You could do something like Pipeline wireless, but it's going to be several hundred/mo.

For $60/mo you can get a Verizon EVDO wireless broadband account. If you're in a 3G area the speeds are pretty decent. As long as you only do "normal" online stuff you won't go over the limits, if you're doing a lot of file chugging, it's not a good approach to the problem.</comment>


WakeMate (YC S09) Time Table - <AUTHOR> http://blog.wakemate.com/2010/07/30/shipping-and-mass-manufacturing-time-table/

<comment><USER2> Honestly, at this point, I take any time tables from these guys with a truckload of salt.

<comment><USER3> At least now they are giving us concrete details about the state of the different moving pieces. This much transparency would have been awesome back in november 09.

</comment></comment><comment><USER4> If nothing else this has been a great lesson in hardware manufacturing

That said, I would still like some sort of verification that my preorder has been cancelled and that I wont randomly be getting charged 45 dollars sometime in the future.

</comment><comment><USER5> How is WakeMate different/better than the Sleep Cycle iPhone app? It just seems like extra hardware to buy and charge...</comment>


Cloud Cadet Episode 6: Preparing for AWS Certifications - <AUTHOR> https://linuxacademy.com/blog/amazon-web-services-2/cloud-cadet-episode-6-preparing-for-aws-certifications/ <comment><USER2> Wow this was a great resource thank you!</comment>


How Android M made Sensy Remote re-think user onboarding - <AUTHOR> https://medium.com/sensy-musings/how-android-m-made-sensy-remote-re-think-user-onboarding-ff0a33933e89 <comment><USER2> I wrote the update for Android M at my company. And pretty much everything they said is true. Our UX Team spent a lot of time trying to make it work right, but I ended up ignoring a lot of it and implemented it based on what I felt was right. Having had years of experience with this model from doing iOS development I kind of followed the same patterns I would have used there.</comment>


That "JavaScript not available" case - <AUTHOR> http://christianheilmann.com/2011/12/06/that-javascript-not-available-case/

<comment><USER2> I'm really glad to see someone scrutinizing the use of JavaScript this way. JS is great for a lot of things - but part of the price of using it the way we are, using it do to more and more things formerly done by native code, is that it opens up more and more vulnerabilities that used to only exist in native code. Progressive enhancement is the way to go - and I think there are far too many egotistical developers out there who assume that their webapp is the special one that really, really, really needs JavaScript. It probably isn't. Every time I see that it reminds me of Raymond Chen's stories about one poorly-designed Windows app after another whose developers were convinced that their app was the special snowflake that should be allowed to break the rules in whatever way.

Get over yourself - and more importantly, stop putting barriers between customers and your bank account. Virtually everything that you'd do to make a site progressively enhance with JavaScript, is something that'll make the site more robust and tolerant to unexpected visitors and their environments. It's a bad idea to reject those visitors just because you didn't expect them.

</comment><comment><USER3> The author of this piece seems to be glossing over something rather important: If you need to provide both a javascript-enabled and a no-javascript method of doing the same work, then you're effectively writing duplicated code. Whether this is something you actually want to provide should depend on your target audience, and how much you really care about chasing after the folks who disable JavaScript or are otherwise unable to use the JavaScript-enabled solution. There are probably also accessibility concerns here (how compatible are JavaScript-heavy apps and screen readers?). But none of this means that you are a bad person if you write a web app that requires JavaScript to function.</comment>


In death of dinosaurs, it was all about the asteroid – not volcanoes - <AUTHOR> https://news.yale.edu/2020/01/16/death-dinosaurs-it-was-all-about-asteroid-not-volcanoes <comment><USER2> Link goes to a Yale Public Affairs & Communications summary of the article just published in Science, titled "On impact and volcanism across the Cretaceous-Paleogene boundary" at [https://science.sciencemag.org/content/367/6475/266](https://science.sciencemag.org/content/367/6475/266) .

Here's Science's even shorter summary (short enough to quote for HN), though with fewer details than Yale's:

> Around the time of the end-Cretaceous mass extinction that wiped out > dinosaurs, there was both a bolide impact and a large amount of volcanism. > Hull et al. ran several temperature simulations based on different volcanic > outgassing scenarios and compared them with temperature records across the > extinction event. The best model fits to the data required most outgassing > to occur before the impact. When combined with other lines of evidence, > these models support an impact-driven extinction. However, volcanic gases > may have played a role in shaping the rise of different species after the > extinction event.</comment>


Simple Icons, 96 PNG icons in eleven sizes - <AUTHOR> http://simpleicons.org/

<comment><AUTHOR> Not mine, but a cool set of website icons created by a colleague.</comment>


Deck.gl: Large-Scale WebGL-Powered Data Visualization - <AUTHOR> https://uber.github.io/deck.gl/#/ <comment><USER2> I can't help but roll my eyes whenever I see more WebGL visualizations from Uber. I had interviewed there maybe a year ago for the visualizations team, but didn't get an offer because I "had too much WebGL experience and not enough d3 experience." I think this is now the second or third webgl based library since released by Uber.

<comment><USER3> About a year ago would have been around the time Twitter's head of visualization joined Uber to become Uber's head of visualization. The team has grown massively since he joined. You should probably apply again.

<comment><USER2> I know...I coauthored a book on WebGL with them...

</comment></comment></comment><comment><USER4> I get 14 fps on their top example. New macbook pro. And this is supposed to be ready?

<comment> TD-Linux Their shader is doing software 64 bit float emulation, including trignometric functions.

That city graphic is _really_ precise.

(edit: it looks like the 64 bit math is used only for the map projection part of the shader... so it's not quite as ridiculous as it might seem, my haswell system is limited by CPU, not by vertex shader performance)

<comment><USER5> What should I google to find out more on this topic? Why do they need double precision if they aren't doing computation? Is it actually visible to the human eye?

<comment> TD-Linux They are feeding in lat/long coordinates to the shader, and then doing the map projection there. Effectively they want lots of precision, but also the ability to represent coordinates anywhere in the world, in their shader. The alternative is to precompute the projection before putting it into the shader.

</comment></comment></comment></comment><comment><USER6> Crashes both IE11 and Chrome 54 for me.

<comment><USER2> Doesn't crash FF 48, but damn it locks up the system for maybe 20s.

<comment> TD-Linux They have a megashader with an entire 64 bit float emulation library, which takes a good while to compile.

</comment></comment></comment><comment><USER7> Page turned 404. Anybody knew why?

</comment><comment><USER8> The examples are pretty, but all of them are basically just population density maps[1]. I'm not sure what additional understanding I can take away from the examples.

[1] [https://xkcd.com/1138/](https://xkcd.com/1138/)

<comment><USER9> > The examples are pretty ... I'm not sure

You got some of it, pretty is part of the point here. You can do nicer looking things with WebGL than with an HTML canvas.

High performance and interactivity is another side of what to look for here. Spend some time rotating and zooming these examples to see the kinds of interactions you don't get in other data visualizations. You can (potentially) visualize a lot more data at interactive rates with a WebGL view than you can with other techniques.

The laying/compositing tech is a third piece of what is interesting here, allowing different data slices to be rendered and included separately. This is useful as it's common to put everything in single WebGL view for ease of implementation initially, but can get complicated and may not scale as well as this layering approach.

</comment></comment><comment><USER10> Opening this site in Safari froze my entire machine. Granted it's a 5 year old Macbook Air but still this should never happen.

Generally it seems to me that whenever something involves WebGL, performance and UX goes out the window.

<comment><USER11> Sounds like a security bug in Safari and/or OS X, anyone know if Apple offers bounties like Chrome and Mozilla?

<comment><USER10> Apple started a bounty program at this years WWDC.

</comment></comment></comment><comment><USER12> Even on a GTX 670 these examples crawl. They seriously need to optimize.

</comment><comment><USER13> Looks like you need a top-of-the-line gaming rig to run these..

Hardly interesting from a data viz perspective, but I guess good on them for trying to push the tech envelope?

</comment><comment><USER14> Doesn't work in any browser for me right now and also doesn't appear to be linked from the main Uber github page. Not ready for release?

</comment><comment><USER15> Examples crashed the WebGL component in Chrome 54...</comment>


Simple Way to Extract GET Params from a JavaScript Script Tag - <AUTHOR> http://loopj.com/2010/06/12/simple-way-to-extract-get-params-from-a-javascript-script-tag/

<comment><USER2> This fails if you can't control the filename of the script being hosted. You can get around said flaw by utlizing the magic of errors™ as demonstrated in this example function I have made:

        var getErrorLocation = function (error) {
            var loc, replacer = function (stack, matchedLoc) {
                loc = matchedLoc;
            };

            if ("fileName" in error) {
                loc = error.fileName;
            } else if ("stacktrace" in error) { // Opera
                error.stacktrace.replace(/Line \d+ of .+ script (.*)/gm, replacer);
            } else if ("stack" in error) { // WebKit
                error.stack.replace(/at (.*)/gm, replacer);
                loc = loc.replace(/:\d+:\d+$/, ""); // remove line number
            }

            return loc;
        };

You could use it as such:

        try {
            0();
        } catch (e) {
            var scriptLocation = getErrorLocation(e);
        }

In SpiderMonkey and Rhino, the Error constructor itself is magic too, so you could just do getErrorLocation(new Error) instead.

</comment><comment><USER3> I was seeking to avoid the same thing recently. Instead of adding more JavaScript, I decided to use PHP. While we're using Rails, it's very inefficient to fire up the whole engine to do something as simple as outputting a script with a few interpolated variables. A simple PHP script can put out 2-3 times as many requests per second as Rails/Django for a task like that.

<comment><USER4> Rack Metal was pretty much made for that. I wouldn't use either until I had evidence that it was a bottleneck, but if you do, then it would let you do a few simple requests quickly without needing to swap stacks. (I run PHP and Rails concurrently for one application, but only because I had to be able to get Wordpress working.)

</comment></comment><comment><USER5> If you must do this, use # so the browser can cache the script across clients.

</comment><comment><USER6> Here's a simpler way. Put this in your htaccess file:

        AddHandler server-parsed .js

then add:

        (function(query_string){
        ...
        })("<!--#echo var="QUERY_STRING" -->");

around your script. This obviously has problems with caching, but it doesn't have the problems addressed with those "heavy loads" that you have with PHP et al.

<comment><USER7> The beauty of doing this statically entirely in javascript is that you can serve the js file from anywhere, including s3 for example.

<comment><USER6> The beauty of doing this with SSI is that you can include the same script multiple times, but with different parameters, and get: different effects.

</comment></comment></comment><comment><USER8> This solution fails when you need to insert the script more than once in a page. Instead, browsers really should provide scripts a means to retrieve the script element that they belong to.

<comment><USER9> A comment on the article pointed out that since javascript execution is blocking, you can do that for synchronous javascript:

      scripts=document.elements.getElementByTagName('script')
      latest=scripts[scripts.length-1]

<comment><USER10> I wrote a small jQuery plugin around that idea ( at [https://gist.github.com/435668/85466138a24814baef3ec6a73b7cc...](https://gist.github.com/435668/85466138a24814baef3ec6a73b7cc1f9187278f4) )

This approach allows you to specify parameters as JSON. So data of arbitrary length can be passed without having to resort to some global variable.

It solves a problem I had where I needed to pass some template engine generated content into an otherwise static script.

Thanks for the tip :)

</comment></comment></comment><comment><USER11> fyi, this has been used in <http://script.aculo.us/> (the effects js library for prototype) from a couple years ago.

example usage: <script src="scriptaculous.js?load=effects,dragdrop"></script>

code is here: <http://script.aculo.us/scriptaculous.js>

</comment><comment><USER12> Doesn't support multiple keys with the same name, which is valid and not particularly uncommon. I wouldn't be surprised if it breaks in other ways. This kind of thing is always full of subtle pitfalls.

<comment><USER13> multiple keys with the same name? what do you mean? arrays?

<comment><USER14> There's no such thing as parameter arrays. Any parameter name can have multiple values. PHP just happens to turn those into arrays. (I've never tried it in PHP with a parameter name that didn't have brackets at the end. It might not work in PHP.)

If you're familiar with Django, this is why the GET, POST and other request dictionaries are actually MultiValueDicts. If you call request.GET.getlist('varname') instead of request.GET['varname'], you'll get a list of each value passed with that name. The brackets aren't special, and if you used them, you'd need request.GET.getlist('varname[]').

</comment></comment></comment><comment><USER15> you can also do this with a regular expression. here's the blog post i wrote on it a year ago. i use one function to grab get variables from either window.location or from a script tag. 5 lines of code.

[http://www.onlineaspect.com/2009/06/10/reading-get- variables...](http://www.onlineaspect.com/2009/06/10/reading-get-variables- with-javascript/)

</comment><comment><USER16> It would be nice if the game bar at the bottom wasn't broken and hovering right over the content of the post. I'm on an iPad.

</comment><comment><USER17> How has this been upvoted? Isn't this what meta tags were made for?

<meta name=key content=123/>

</comment><comment><USER18> I love code-heavy posts, but damn I hate lines with a bunch of javascript all bunched together with semicolons between statements.</comment>


Taking England back to the Dark Ages - chestnut-tree http://www.bbc.co.uk/news/magazine-27731725

<comment><AUTHOR> I don't like borders. Maybe it is because I come from a small country (of almost exactly the blessed size mentioned in the article) and perceived borders mostly as an impediment to exploring the world.

In my opinion the one great thing the European Union brought to us is to tear down these pesky border stations where people insist on checking your passport and exact medieval tolls on goods that are transported a few miles just because the few miles cross a mostly imagined line.

However borders can be removed by implosion, too. If you assign more and more rights to smaller and smaller units borders will get less and less important.

The Seven Kingdoms of Anglia will probably join the Schengen treaty as they don't have a common big external border to protect.

That way we get all benefits: Decisions are made closer at the people and the number of borders that impede our movements will be reduced.

<comment><USER2> ^ that's basically why I'm voting Yes to Scottish independence, in fact. I'm worried by the trend in Westminster that "foreigner blaming" has become normalised and there is already talk of holding an in-out referendum on EU membership.

I want to live in a smaller country, with decisions made closer to home; but with open, welcoming borders. Actually there is evidence that we __need __immigration in Scotland. We have an ageing (for want of a better word) "indigenous" population - but we can mitigate the problems this poses if we can build a great job market and promote our world-class universities; we can attract talented young people from across the world to our universities and give them jobs here. Build a truly multi-national country. That's the intention of the SNP and the Greens, anyway, and its one I support very much, and I will vote any way I can to get us closer to that dream.

<comment><USER3> Very similar to my own reasons for voting "Yes" \- my other being getting rid of Trident.

</comment></comment></comment><comment><USER4> "Because size does matter. It seems to me that progressive, reasonable, pacific and prosperous states - like the Nordic countries, or Switzerland or New Zealand - tend to be less than 10 million people." That is what I often thought regarding the EU. A EU of regions instead of nations. United under a banner for economy, foreign affairs, standards and military and let the regions handle social insurance, police, taxes. Im actually a big fan of the EU but right now it seems to go in some wrong directions and politicans of national governments always using Bruessel as an excuse, while the EU itself is not speaking with one voice in conflicts like in Ukraine.

<comment><USER5> Yeah, the EU as a concept is phenomenal. Its execution is more questionable and its PR is flat out disastrous, with national politicians blaming it for all kinds of ills.

Also, banana curvature. Really, how was the EU not able to squash that myth? I get that the EU fundamentally answers to national governments and not voters directly, but the tiniest bit of PR effort towards voters might help in the long run, don't you think?

<comment><USER6> \- It wasn't entirely false, just misleading (there is a standard defining what a banana is for the purposes of trade categorisation, tax and subsidy)

\- the EU does not believe it's dependent on the goodwill of voters; the elected part of the EU itself is the weakest

\- the UK media is _very_ anti-EU and the EU has no real UK media operation

\- it's "tone accurate": the EU does produce an awful lot of fiddly little rules. The proposal to ban unsealed olive oil from restaurant tables got quite far recently before the public heard about it and it was laughed out of feasibility.

<comment><USER5> If the EU does not believe it's dependent on the goodwill of voters, then why did it care about the unsealed olive oil ban being laughed at? The Brussels bureaucracy is a mess, but it's not ridiculous. The proposal would never have passed, regardless of public attention.

Okay, that's just my belief, but it would be fairly depressing if I'm wrong.

</comment></comment></comment></comment><comment><USER7> This is one of those stories where I wish the title conveyed more information. At first I thought it was going to be about light pollution and how we can't see most of the stars anymore.

<comment><USER8> Could be an article about the state of education in the country :) .

</comment></comment><comment><USER9> Regarding the Heptarchy, please look at [0] .. [3]. [0] && [2] refer to members of the original Heptarchy, the other two are regions of our current era. My hood, Gloucester, is mentioned in all four articles.

      Doctor Foster went to Gloucester
      In a puddle of rain
      He stepped in a puddle
      Right up to his middle
      And never went there again

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

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

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

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

</comment><comment><USER10> Well, as long as we make border crossing more convenient for travellers, we will I am sure, be happy to spend £55 millon per day (UK) for the privilege of belonging to an anti-democratic superstate in the making which ignores referenda from citizens who don't vote the right way in elections.

<comment><USER11> Ugh, can we (collectively) stop repeating that lie about how much we pay to the EU please?

As for anti-democratic, just look at who is trying to prevent the nominated candidate from the largest party in the Parliament from being chosen as the President: The UK government. It's the executives of the _member states_ that provide the biggest anti-democratic element of the EU by trying to cling on to their power (under the guide of "sovereignty").

</comment></comment><comment><USER12> Sample size affects variability. Small countries appear at both the top and the bottom of any given league table because more populous nations begin to approach the mean.

It's the same reason that the best and worst schools are small schools; the best and worst health outcomes are in rural areas and so on.

<comment><USER5> Nah. Small northern European countries outperform the mean consistently. Even the baltics are doing better than Poland. Not everything is random variation. Big countries (Pakistan: 186m, Congo: 70-something) can be pretty fucked up too. Your assumption is that the underlying natural value is independent of country size, mine is that it isn't.

<comment><USER12> > _Not everything is random variation._

But it must be acknowledged and accounted for. Smaller samples a regularly more variable; conclusions drawn about them are weaker.

</comment></comment></comment><comment><USER13> Very Crusader Kings 2.

I would love to be a citizen of the Kingdom of Mercia[1], the devolution of power to bring national issues closer to the people that live there, are great reasons.

[1] [http://en.wikipedia.org/wiki/Mercia](http://en.wikipedia.org/wiki/Mercia)</comment>


Eric Schmidt: "It Is A War For Talent" - <AUTHOR> http://techcrunch.com/2010/11/15/google-schmidt/

<comment><USER2> What _kind_ of "talent"? The egregious metadata of Google Books has been brought up in book circles again and again. Fixing that should not require the kind of hiring hoops that programmers go through. Librarian and other specialist degrees existed long before there was ever a Google. Some things Google just doesn't want to be bothered with. (And when it comes to books, ditto for Apple.) [typo edit]

<comment><USER3> There's no significant return to google for fixing the metadata. It's not that google can't do it, it's that they don't want to do it.

Google is a company which is about scale. Hiring librarians is not a scalable solution to fixing metadata. Figure out a way to automate that fixing and I'm willing to bet Google will offer to hire you.

edit: As it happens I actually looked at working on a fairly similar problem for my undergraduate thesis (automated dating of works of unknown provenance) so if someone wants to talk about ideas for how to fix it feel free to email me.

<comment><USER4> It's pretty obvious that Google just wants the raw data of the books for later projects, and the concept of making them available to the public as they have is nothing more than the thinnest of fig leaves. They're getting far, far more value from the libraries they're scanning than they are providing back to the world, and it's because of their atrocious metadata processes.

And if someone figures out how to automate the process, you'd be a fool to be "hired" by Google. That's something that should be paid for at a much higher rate than any salary.

<comment><USER3> Most people simply don't care about metadata. The average user searching for information doesn't use metadata fields to search, they just use free-form text search.

I understand the importance of good data for academics (bad metadata on electronic book archives drove me crazy when I was researching etymology for the OED), but for most people it doesn't really matter.

<comment><USER2> Thanks to all of you who replied. Interesting perspectives on things.

</comment></comment></comment></comment></comment><comment><USER5> Just out of curiosity, any "talent" here, on HN, being aggressively recruited by google/facebook? Or is this some other kind of "talent" they are looking for.

Wouldn't most talented people want to start their own company anyways?

<comment><USER6> I also get e-mails every 6 months from Google.

A few years ago Google required a 3.75 or higher college GPA. That is an amazing GPA for the college I went to, so I've never applied. I wonder if they have relaxed that criteria.

<comment><USER7> In retrospect, my college GPA of 3.1415 doesn't seem so smart. =)

(Note: I didn't hit it exactly; it was a while ago but I think I recall I ended up at 3.139.)

<comment><USER8> Better than my college GPA of did not finish:) I had a 3-something when I left...except that I didn't take a final or two that last semester (weather was really nice).

I think the GPA thing at Google is just stupidly silly. I've accomplished quite a bit in my career. Thankfully I don't really need Google, but it does drive me nuts that there is a place that I can't work:)

<comment><USER9> I personally know a number of people working at Google who not only didn't maintain that kind of GPA, they didn't graduate at all.

GPA is only useful as a filter for people just out of college. If you've been in the work force for a while, there are better measures available.

</comment></comment></comment></comment></comment><comment><USER10> The comments in that TechCrunch thread are why I don't read TechCrunch anymore. Mike Arrington really needs to mod the trolls.

</comment><comment><USER11> This reminds me of William Gibsons "New Rose Hotel" short story. A couple of more years and switching jobs will be "defection". Bring on the teenage prostitutes, neurotoxins and japanese coffin hotels.

</comment><comment><USER12> The contrary view is that 'talent' doesn't actually matter. <http://www.gladwell.com/2002/2002_07_22_a_talent.htm>

</comment><comment> brown9-2 Looks like someone is lifting xkcd's "Online Communities" map in the background of that picture of Schmidt (or paying homage, I hope).

<comment><USER13> The map: <http://map.web2summit.com/>

</comment></comment><comment><USER14> I went through a ~2-3 month interview process with google at the end of which they said "You did great, it looks like we will have an offer to you tomorrow"

The next day, I got a call from them saying "Well, unfortunately we wont be giving you an offer, because you dont have a PMP certification."

(When I went into the process, for an infrastructure PM, I stated that my lack of a PMP cert may hurt me - they said "Oh no, we don't want people to come here with a predisposition of the process they feel they need to impose on how we work" -- I was so freaking enraged over that experience.)

I was later told "You scored really well on the interview process, why not apply for another position?"

To which I only had a big FU to the whole experience.

<comment><USER15> Yeah, the latency of their hiring amazes me. I lean towards small shops, but for some reason I entertained a phone screen from them a few years ago. Well, they called me several weeks later hoping for an onsite, but I had already interviewed for, accepted, and started another position in the meantime. I don't see why they would expect anyone good to remain available long enough for them to have a chance with, unless the candidate has singled out Google as the only place they're even considering for a month if not an entire quarter.

<comment><USER16> Yeah, that reminds me of my Thinking Machines experience. I later heard it took them another two tries to fill the position I was applying for, I think I heard the second guy timed out on them as well.</comment></comment></comment>


Excel is Getting Smarter - <AUTHOR> https://techcrunch.com/2018/03/29/excel-is-getting-smarter/ <comment><AUTHOR> As great as a lot of BI tools are, there will always be a strong demand for a spreadsheet program like Excel. Glad Microsoft isn't throwing in the towel on it.</comment>


Former Walmart General Counsel Discusses the Future of Drone Delivery Services - <AUTHOR> https://medium.com/@aerotoken/former-wal-mart-general-counsel-discusses-the-future-of-drone-delivery-services-and-aero-88a563c0b03e <comment><USER2> I wouldn't doubt that Walmart, between their acquisition of jet.com and intense focus on competing with Amazon in the e-commerce arena is taking drone delivery services very seriously right now. They are already trying nearly everything else.</comment>


Anki, Jibo, and Kuri: What We Can Learn from Social Robots That Didn't Make It - <AUTHOR> https://spectrum.ieee.org/automaton/robotics/home-robots/anki-jibo-and-kuri-what-we-can-learn-from-social-robotics-failures <comment><USER2> The article does not capture the complexity of running a hardware business.

Anki's landed cost was nearly 65% of the MSRP. Retailers take 30-35% margins. This leads to paper-thin margins for marketing, low working capital for production and other opex. You will not survive in a market like that.

I work with ex-employees from Anki. It was a well-loved product/company. If it had survived another 3-4 years, they would have seen light.

Source: I work with retail teams with products in similar categories ([https://www.playosmo.com/](https://www.playosmo.com/)).

<comment><USER3> Honestly, I don't think it matters. I agree with the basic points the article makes as being more salient.. After all, despite the complexities, there are successful hardware businesses.

These robots (I have a Cozmo and a Jibo) are at their core a novelty robot or "thing" attached to a voice assistant. Voice assistant are not "social" except to the autistic and those that have spent too much time reading about socializing in the academic literature rather than actually interacting with humans not in a study.

So they can't be social, and the robot part at the end of the day is basically a toy whose whiz-bang wears off rather quickly. I find a lot of the research on emotional connections to be a bit self-serving. There are some people that end up attached to a weird head thing, but most require something a bit smarter, it does not make a sizeable market.

Anyone in the toy industry could have looked at their financials and known this was a shitty idea, because at the end of the day none of these products have demonstrated that they are more than a toy attached to a voice assistant. Blaming retail channel cuts is a bit rich.

</comment></comment><comment><USER4> If there really is a Newton of social robots the credit should go to Sony's aibo — the vaguely Japanese-sounding names of Jibo, Kuri, etc. are dead giveaways of who's the real OG here.

Anyways aibo came out around 2000 I think, if social robots really are viable as a product category we should be way past the Newton stage by now.

</comment><comment><AUTHOR> A particularly salient comment for me in the article was:

" I sometimes hear that social robots are just voice agents with little added value. But when you hear how the handful of existing users reported on the emotional reactions they had to social robots, this does not seem to be true. Researchers have shown this emotional response in prior laboratory experiment and field studies, but we now have much more evidence for this happening real people's homes.

On the recent RoboPsych podcast on the demise of Jibo, Tom Guarriello resigns his admitted cynicism and speaks of Jibo as having an emotional effect on him and his partner. He even got choked up when Jibo said goodbye (his partner shed a tear), and his language describing the robot is often passionate and emotional. Many others have shared similar reactions.

This is not just a novelty effect. Having been around social robots for so long, I can anecdotally support what we know from a large body of academic research. A physical thing in your space, moving with and around you, provides an emotional grip that no disembodied conversant can. Seasoned engineering professors smile at their robots making an odd gesture, and often cannot help but suspend their belief that this collection of motors and control signals is merely that. I have found that very few engineers remain indifferent to viewing the famous Boston Dynamics BigDog kicking video, even if they have worked with robots for decades. "

<comment><USER3> At the extreme end of the spectrum people try to marry sex dolls and stuffed animals. There is a continuum of how attached people will get to inanimate or artificially animate objects. So it would also not be surprising if studying engineers and psych academics that you will get skewed data - groups not known for being on the right side of the bell curve for human social interaction skills.

I think even in the cases of those prone to become attached to non-living items, the attachment is not necessarily a long-term bond.

Further, suspending disbelief, and anthropomorphizing everyday mechanical things is not very compelling... I have felt bad for my car.. I think an emotional bond with a car is a pretty typical thing in the US.. However, regardless of how strong and consuming it is, most people don't treat it as a substitute or even similar to a social relationship.

</comment></comment><comment><USER5> Social robotics is a bit narrow. We got domestic robots (Roomba etc.)! Personally, I think the market has spoken: robots that do something useful are appreciated enough for businesses to be built. Robots cannot replace dogs, we have good dogs already, replacing a human is sci-fi.

<comment><USER6> I bought a Anki Vector about a year ago to tinker with the sdk. After messing with the sdk, I left it turned on for the duration of the year.

I don't use any of the voice actions but its awareness in the environment I feel is enough. It sits in the kitchen and has prime position.

I could not classify it as a "Buddy" or "Friend" but I care about it enough not to turn it off.

I think the next stage for these social robots is to learn(AI) unique personalities. eg. Movements, noises, faces. So no two social robots are the same.

<comment><USER7> Ultimately the reason I moved towards the "write my own assistant" thing is that I wanted it to be personal to me. Alexa, Siri, Google are literally corporate entities you can chat with, no matter how much they dress it up with jokes.

But the barrier of entry to that is high, and the quality of course won't compare at this juncture. I'd love to see more "build your own" type setups which give you the level of power and polish of a commercial assistant but let you really design what you want it to do.

(I feel like the assistant and robot conversations are the same here. Put it in a body or put it on a screen, but that "personality" you interact with should be yours, not off-the-shelf.)

</comment></comment></comment><comment><USER8> Most of those toys have a major conceptual flaw imo. Kids love stories - listening, watching and playing them. They often enjoy simple toys much more than complex ones, if they are more flexible in story play. If a "social" robot seems too stupid quickly or too complex to handle for story play it is quickly out of the game

</comment><comment><USER9> I think photos might have helped the article.

But looking at SciFi and what the article talks about it seems to me we need intelligence or beauty combined with constant exposure.

We can't get constant exposure since we don't have the tech for a robot to traverse a house.

We can't get great intelligence, since to be frank when this gets solved it won't be to make money on social robots.

So we need beauty with as much fake intelligence as we can muster and to hack the Gordian Knot of movement, which would be Teddy Ruxpin?

</comment><comment><USER10> These failures can be boiled down to a single word: Hype.

If you watch the videos for these products they are full of hype and silly use cases. At the end of the day these things have consequences.

We have a house full of robots. Most are useless. Most saw use for minutes out of the box and have been collecting dust for years.

If you sell products based on exaggerated claims and unrealistic use cases, failure is the only possible limit state for the business equation you have created.

Solve real problems with real solutions.

</comment><comment><USER11> I think that people who like robotics just want to make cool robots, and all of these robotics startups fail because they don't have product-market fit. I remember being very surprised at the $300 price of Anki's Vector robot. These startups should be validating the viability of their products much earlier.

</comment><comment><USER12> While I don't really understand the appeal of social robots beyond being sophisticated toys, the failures of Jubi and (I think) Anki have given me a strong reason to avoid them -- they depend on an external server, and so if the company fails, the robot becomes junk.

<comment><USER13> That struck me too. But for a different reason.

I don't want something like that talking with a remote server.

</comment></comment><comment><USER14> I think there's a much more obvious lesson to be learned from at least some of these companies.

Building a product which has complex, meaningful interactions with users, as a "social" robot is expected to do, is a difficult problem which will take a lot of time and effort to get right. It's not something that can be solved by a couple of developers in a few months as a Kickstarter project.

<comment><USER15> that may seem like the obvious lesson, but there is a more hidden lesson, at least in the case of anki. i don't their failure had as much to do with the interactions of vector than it did with the complex mechanical design.

[https://www.therobotreport.com/anki-vector-teardown- complex-...](https://www.therobotreport.com/anki-vector-teardown-complex- manufacturing/)

</comment></comment><comment><USER16> Voice-control has been a massive success but social robots have not. Why? Because they are creepy like the Boston Dynamics stuff or toys like the ones mentioned here. Maybe eventually an product that's attractive to the average consumer will show up but we haven't seen it yet. The article makes some good points about what's missing.

</comment><comment><USER17> >Lesson 2: We need artists

Disney-type artists, yes. Animatronic robots are getting better and better, and it is only a matter of time before they will be offering one-on-one interaction that is engaging to folks at one of the theme parks. In fact that is where I expect to see the next level of social robotics happening.

</comment><comment><USER18> Anki products are still on the shelves at my local Best Buy. I feel bad for the people buying them as gifts not knowing that the discounted price is because they're going out of business and will likely see reduced functionality in the future

</comment><comment><USER19> What we learn from websites that require JS to display text.</comment>


Reader Macros in Common Lisp - <AUTHOR> http://lisper.in/reader-macros/

<comment><USER2> When Harlequin started out with Dylan, to bootstrap we first quickly morphed LispWorks into a high-functioning Dylan IDE. This was done through a combination of macro, reader macro and CLOS MetaObject Protocol abuse, allowing us to achieve a faithful rendition of Dylan's syntax and object system semantics respectively.

When Dylan went from prefix to infix syntax the reader macro indirection got all the more elaborate: what started out as a trivial reader macro that treated colons differently started delegating to a full-blown lex & yacc style parser instead.

All the better, most of this was achieved modularly: Lisp editor buffers and Lisp listeners would run happily alongside Dylan editor buffers and Dylan listeners, Lisp code could still compile load and run alongside Dylan code, and Lisp classes could interoperate cleanly with Dylan classes.

There's no question that Common Lisp and its predecessors are some of the most formidably adaptable and hackable programming environments ever created. Only Smalltalk really comes close, and they have complementary strengths I think. Standard macros, reader macros and a comprehensive MOP are some of the key things that stand out in Common Lisp's favour in that hackability comparison.

<comment><USER3> (Speaking as an Open Dylan hacker...)

I've occasionally wondered if we should take the old emulator sources and re- package them as a separate repository. It isn't clear that anyone knows how to make them run any longer or whether or not they'd run on anything other than LispWorks or if this would be of anything other than a historical curiosity.

</comment></comment><comment><USER4> It's things like this that remind me that Lisp(s) are really the best languages for taking advantage of the idea of Turing completeness. In terms of ease of implementation that is. I think that really, this is what we mean by "powerful" languages - how easily can you take advantage of the principle of completeness to do _anything_ in your chosen language.

You often hear people using the idea of completeness to say that their favourite language can, of course, do anything. But in reality some languages just aren't very well suited to it, or would require some horrendous amount of coding and abstractions (Greenspuns Tenth rule comes to mind [1]).

So whenever some new idea in programming becomes popular, whether it's pattern matching [2], concurrency [3], or even the web (HN), you can always rest easy because someone will be able to quite quickly write that functionality into Lisp itself. The only difficulty is in finding out about the libraries in the first place!

[1] [https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule](https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule) [2] [https://github.com/m2ym/optima](https://github.com/m2ym/optima) [3] [http://lparallel.org/](http://lparallel.org/)

</comment><comment><USER5> I often read that Ruby (or Forth, for that matter) is great for DSL because you can "misuse" the language tokenizer/parser directly as parser for your DSL, as long as it's similar enough to ruby (e.g. tokens are whitespace delimited and such). Unfortunately, Ruby's macro power is nowhere near LISP.

I wasn't aware that this is possible in LISP, too. That's really great!

<comment><USER6> Certain things are still hardwired into the Common Lisp reader. For example, because of how colons are treated in symbols, you can't trivially support something like JSON via reader macros. It still works best if the input bears a pretty good resemblance to lisp.

That's not such a big deal, because there are plenty of tools for conventional input parsing in Common Lisp.

<comment><USER7> > ... you can't trivially support something like JSON via reader macros.

Isn't that what the article shows how to do?

<comment><USER6> Yes, with more than a trivial amount of work. When the syntax is more lisp- congruent, you don't have to jump through as many hoops.

</comment></comment></comment></comment><comment><USER8> Great article! I've used reader macros to implement readers for little assembly languages. It's also super-awesome that Lisp has this nice compiler right under the floor boards. And I don't have to touch any parser generators.

</comment><comment><USER9> Love this. Since readmacros aren't an everyday topic but rather out of the way and related to special purposes, there aren't that many practical introductions. This article is a nice writeup.

</comment><comment><USER10> The author has taken a great care to communicate his ideas clearly in such a way that is a pleasure to read it. Very well done!</comment>


Global Audit Firms Are Lobbying  to Dilute Sarbanes-Oxley Reforms - <AUTHOR> https://promarket.org/global-audit-firms-led-deloitte-using-lobbying-clout-dilute-sarbanes-oxley-reforms/ <comment><USER2> As someone who had to deal a lot with SOX compliance throughout my career, I would love to see the regulations loosened. They are overly onerous and in many cases downright bad, because they are so broadly written. At the same time, enforcement is terrible, because of the same broadly written rules.

Basically, you and your auditor work together to come up with an overly complex set of rules that somewhat meets the requirements, then your auditor brings in a bunch of consultants to help you implement their rules, which usually just means checking a lot of boxes, and then everyone calls it a day.

So really all it does is create a lot of work for a lot of people for very little gain. In a lot of cases we were going to do some of that stuff anyway, but now we had to slow down and show the auditor all the work. An auditor who usually doesn't care -- all they want to do is be able to say "yep I watched their presentation on this".

So I was quite surprised by the headline, that the auditor firms would want to roll it back. It's basically just a huge money maker for them.

And then I saw what they want to change -- they want to make the rules looser on _how the auditors are audited_. Basically they want to be able to keep being lazy.

SOX had great intentions but was one of the most poorly implemented regulations ever.

<comment><USER3> I've seen some _very_ strange things done in the name of SOX compliance. I was involved in the potential acquisition in the UK of a subsidiary of a US public company and they used to print out their AD group memberships (as screenshots) and have someone sign (wet sign - with a pen!) the printouts every week/month.

When I asked whether SOX compliance really required this they basically said they didn't really know but had to play safe as the regulations were just so vague.

<comment><USER4> Reminds me a little of the medical device industry. We do a lot of things that from an engineering perspective result in worse products but since nobody understands the regulations fully we do them. Until a new guy comes in, re- reads the rules and says we can do it differently now.

<comment><USER5> I work in the biotech industry and it's the exact same way. We have legions of lawyers who try and decipher the regulations.

A great example is price reporting to the gov't. You're supposed to report your net price across all sales to CMS on a quarterly basis. Problem is, the regulations are so vague that it falls on companies as to how to interpret them. Naturally, companies err on the conservative side (at least most of them). My old company probably had 20 FTE's dedicated to this one regulation.

And if you reach out to the regulatory body for clarification, that's a multi- year process. A great example is the AMP rule (average manufacturer price). I think CMS was supposed to role out the clarification back in 2012, but only finalized it last year. And there are still unanswered questions.

</comment></comment></comment></comment><comment><USER6> One of my good friends was an investment banker who specialized in IPO's from 2000 to 2011.

When ever I asked him about Sarbanes-Oxley chilling IPO's he would always say that the only people who claim the legislation slowed down IPO's were people on chat boards who had no relation to the process at all.

From an auditors perspective it might raise some complications but from a companies perspective, it just codified rules that almost all public companies were already doing.

I mean, even on hacker news, you'll find people parroting the sentiment that Sar-box slowed down IPO's but they never really seem to be able to identify just why, or what specific rule it is that is keeping companies private. n

Its always some non specific thing they point to, like more regulation or liability of C level executives. I mean the retort is probably what percentage of public companies have been brought private strictly because of this rule or how many executives have been sent to jail under this rule.

The below article is from 2012 but it lays out my point pretty well I think:

[http://blogs.reuters.com/alison- frankel/2012/07/27/sarbanes-...](http://blogs.reuters.com/alison- frankel/2012/07/27/sarbanes-oxleys-lost-promise-why-ceos-havent-been- prosecuted/)

<comment><USER7> I'm not sure I agree.

I think that this has consolidated the IPO market to only a few major banks that are capable of acting as underwriters.

Empirically, the number of IPOs in the USA has dropped, and the size has increased. So the data is consistent with there being a larger regulatory burden on businesses going public.

<comment><USER6> > Empirically, the number of IPOs in the USA has dropped, and the size has > increased. So the data is consistent with there being a larger regulatory > burden on businesses going public

I'll agree with the first sentence. However it is not anywhere near enough to imply the second sentence. And lots of smart people agree...

[https://www.bloomberg.com/view/articles/2015-06-24/where- hav...](https://www.bloomberg.com/view/articles/2015-06-24/where-have-all-the- publicly-traded-companies-gone-)

> The study also looked into the old argument that "regulatory and legal > changes in the early 2000s, including Regulation Fair Disclosure ('Reg FD') > and the Sarbanes-Oxley Act ('SOX'), made it more expensive" to list. These > played little or no role because the decrease in new listings was "well on > its way before these changes took place." At worst, the regulatory burden > accounts for only a small portion of the decline.

</comment></comment></comment><comment><USER8> Instead of so much regulation, I think there should be more focus on incentivizing executives as if they were owners. Owners with most of their net worth tied up in a company usually act more in the long term best interests of the company. They care less about what Wall Street thinks and more about where the company will be in 5 years, 10 years, 20 years.

Instead of stock options they can cash in when they hit short term goals, how about actually buying stock and receiving stock that managers can only sell several years after they get it?

At the very least, rate companies on whether they do this or not. Or are actually managed by owners.

</comment><comment><USER9> I believe audit firms are paid by the hour. I believe audit firms make more money when they work more hours. I believe audit firms make more money under Sarbanes-Oxley than not under it. If this is true, why would they lobby to have less revenue?

<comment><USER2> Look at they article. What they are lobbying for is looser regulations _on the auditors_ so they can keep being lazy.

<comment><USER10> You say you read the article but I don't think you understood it. They want to loosen restrictions so they can sell additional work (that they are currently prohibited to provide) to public clients of which they provide audit services.

<comment><USER2> I understood it perfectly. They want to provide more services so that they can say "this is out of compliance but pay us money and we can fix it". But their "fix" is just looking over your shoulder and checking a few boxes.

But the other part of what they want is then not have the government looking over _their_ shoulder to see what they did.

<comment><USER10> I still don't think you understand. They are prohibited from offering consulting services to audit clients which is completely different from 'compliance'. This is about auditor independence rules.

The article states that the Big 4 are lobbying against making PCAOB disciplinary proceedings public. Disciplinary proceedings are and will be in place in the future so i'm not sure where you are getting that they do not want the government looking over their shoulder. Yes, in a perfect world i'm sure they don't want the PCAOB breathing down their neck but it's part and parcel of the job.

</comment></comment></comment></comment></comment><comment><USER11> Read this as "Global Adult Films are Lobbying to Dilute Sarbanes-Oxley Reforms"

I need more coffee and a shower.</comment>


Ask HN: Best way to get involved with open source? - <AUTHOR>

I've recently been getting more interested in open source projects and I'm not sure what the best way to get involved and start contributing is.  Are there any requirements for contributing, or can anyone help?  How can you find stuff that needs to be done?  Any advice on how to get started would be greatly appreciated! <comment><USER2> I'm currently working on an open source project. Here is what I've learned.

1\. There are two kinds of OSS projects. Libraries/utilities aimed at programmers and full applications (whoever simple they may be) aimed at a specific industry/need. What you choose will depend on your personal preference and needs. In my case, I chose to do an application because it is something that is needed and not currently available (for free, and in PHP (the language I'm using)). I also use it as a personal tool ( I used it to build it ).

2\. Talk to people before deciding. I love asking people about their jobs in order to find new needs. My current project was born that way.

3\. Pick something simple for your first project. You want to pick something doable. A simple open source project that ships is better than a complex one that stagnates in your file system.

4\. Treat it as if you were doing a paid project. Use deadlines, make compromises, and for the love of code, stick to them. I learned this the hard way. Decide and code. Rinse and repeat. Learn to live with your choices.

5\. Document it at the same time you build it. This ended up being easier/faster for me.

6\. Don't forget to promote it by emailing people with a link to the project and putting a link right here on HN.

Good luck!

</comment><comment><USER3> I don't know about the best way but the easiest way is to start a project yourself. It must be a real world project that can be used by others. Once you are satisfied with it, attach an appropriate free license and upload it to your github repository. Then it's important to use it, maintain it and even talk about it. Start simple. I started with yet another node.js template engine, for example. It's also important to respond to any response from the community.

Also, not to be pedantic but you probably mean "free software". "Open source" software is not necessarily open to be edited and republished as free software is.

</comment><comment><USER4> I would say that one of the most important things, is to have an account on GitHub. If you do not have one already, sign up at <https://github.com/>. Start to follow some people and watch a few repositories for any projects you find interesting.

Use the search functions to discover projects.

Browse through issues, look how other people post issues. In general, being active on GitHub is a good way to get into open source projects.

Another place you could get started is to connect to the Freenode IRC network and join some open source projects channels there.

</comment><comment><USER5> Depending on what your knowledge is, what languages you enjoy or what is of interest for you you should just get in contact with people.

Most of them are happy you want to contribute and will help you.

Some resources: IRC-Channels, Google Groups, Github.

I started working on documentation for a project because I wasn't really ready to work on the core (both because I didn't knew the project that well and because the whole git fork-pull request workflow was new to me). I learned a lot about contributing and now contribute to a few small projects.

</comment><comment><USER6> There were a few recent articles on this on HN, you might find some great projects if you do a search. You could also start your own tiny project, a lot of people post code for common problems that other people can reuse in their own projects. For example, I'm thinking of using this in our project: <https://github.com/arashpayan/appirater/>

Its just the sort of thing I love the open source community for and makes my day.

</comment><comment><USER7> Pick something you enjoy using, like a game. Pick something with a clear process (of taking patches from new people) that you can see working. Pick a project where there's a clear todo list.

e.g. When I learn Lua i'll contribute to Corsixth [1] because I enjoy playing it, I've seen the core people work with new helpers and the wiki includes a todo with whos working on what.

[1]<https://code.google.com/p/corsix-th>

</comment><comment><USER8> Pick a project that you like and is relatively small. Download the source code and run it locally. Then make changes to it and see how it goes. Don't forget to read the documentation and be active on the forums. You don't have to post anything to the forum. Just read them.

</comment><comment><USER9> Pick something you use and improve it. If you aren't sure about jumping into the code base, start by improving documentation, doing issue queue triage, whatever.

The project's ML, issue queue, and IRC channel(s) are great places to lurk and learn the lay of the land.</comment>


The real Casanova - <AUTHOR> https://aeon.co/essays/is-there-more-to-the-legendary-lover-than-his-reputation <comment><USER2> fascinating. For instance, Casanova (who was without a doubt a real historical person):

\- arrested by the Venetian Inquisition and locked up in the infamous Piombi prison, from which no one ever left alive, nor had there ever been an escape-- until Casanova, who spent months digging a tunnel, at the end of which he lowered himself, by ropes and sheets, onto a gondola

\- after fleeing Venice while in Paris, he helped establish a lottery to finance the École militaire; Napoleon Bonaparte was one of its first students, who conquered Venice several years later

\- an advisor to Catherine the Great (she was not one of his conquests though)

\- he was a prolific writer, whose works include a five-volumne science- fiction novel (Icosameron, 1788)

the author is Laurence Bergreen and the post is excerpted from his recently published biography of Casanova.

</comment><comment><USER3> Most of it is in other summary articles, but not the part about almost moving to the US.</comment>