HNHacker News
TopNewBestAskShowJobs

hardmath123

1,692 karma · joined July 18, 2014

submissionscomments
hardmath123··on An Idea to Handle Left-Recursion in Parsing Expression Grammars (2010)
Also worth noting that Earley parsers also support left-recursion without any fancy additions.

http://reports-archive.adm.cs.cmu.edu/anon/anon/usr/ftp/scan...

hardmath123··on I Just Drove Eight Hours on Tesla Autopilot
I think OP meant the person who stands by the camel guiding it (for example, if the camel is being used to carry a load, rather than a human).

For example, see this image: http://imgc.allpostersimages.com/images/P-473-488-90/40/4000...

Or this image: http://imgc.allpostersimages.com/images/P-473-488-90/64/6424...

EDIT: I like how your username fits your comment so well. :-)

hardmath123··on This JPEG is also a webpage
Some PoC||GTFO PDFs are also valid in other formats—"polyglots". They usually do PDF+HTML+ZIP, though sometimes they get (even more) creative.

https://www.alchemistowl.org/pocorgtfo/

hardmath123··on Ask HN: What book have you given as a gift?
One book that works well for techy parents who have kids is The Number Devil. It's fantastic read-with-your-kid-at-bedtime material.
hardmath123··on 1+1 = 0
Full article: https://golem.ph.utexas.edu/category/2016/01/integral_octoni...
hardmath123··on Statement on DMCA Lawsuit
Ah, I was debating whether to comment this link there or post separately. Thanks for helping streamline the discussion.
hardmath123··on Contextual Identities on the Web
I think one thing that bothers people is when they look up "Samsung Smartphone" or "children's stroller" on Amazon and are suddenly bombarded with advertisements about these things all over the web.

People are also paranoid about online shopping sites changing prices based on tracking information. Here are two articles related to this: http://lifehacker.com/5973689/how-web-sites-vary-prices-base... and http://www.wisebread.com/6-ways-to-avoid-sneaky-online-price...

hardmath123··on Show HN: My own C compiler (just for fun)
Ha, finally an opportunity to show this off! My pet parser project has a built-in "unparser" to turn a parser (specified as a formal grammar) into a randomized test-case generator.

https://github.com/Hardmath123/nearley#the-unparser

hardmath123··on This is not a place of honor
In the full report [1], there actually is a sample short story or "scenario" (page F-139, "5.1 Scenario for the marking system (MFK)"). Extract:

> Jo climbed down and walked over, the sand squeaking beneath her boots. She followed Steve’s head around the shape, only to find another shape behind it. The sand had shifted in between the two, but the writing was still clear. She stood next to Steve and looked. There were faces, two of them. And there was writing, in many different forms. “Hey, I think that’s Chinese -- I saw something like it in my ancient history class,” said Steve as he knelt to get a closer look.

> “So send a picture to Cindy in Remote -- you know she likes that old stuff,” shrugged Jo. “What did they want around here? Those faces aren’t scary. That one looks scared and that one looks sick, I’m not impressed. ” She stepped out between the pillars and looked around. They had stopped just before the center. There was nothing there but sand and scrub. She squinted and saw that every passage way was blocked by these little shapes sticking up in the middle. She sighed. All this stuff for... nothing?

[1] http://prod.sandia.gov/techlib/access-control.cgi/1992/92138...

hardmath123··on Covariance and Contravariance: a fresh look at an old issue [pdf]
The way I explain variance is with a "bakers and chefs" example. Chefs turn ingredients into food and bakers turn dough into bread. Since dough is an ingredient and bread is a food, you may think all bakers are chefs. But this isn't true, because a chef should be able to handle any ingredient, and a baker may not necessarily know what to do with broccoli.
hardmath123··on How computer programming languages for kids have evolved and where they're going
Yeah! Funny, I was the one who wrote the original Scratch->Snap! converter, "Snapin8r". :-)
hardmath123··on How computer programming languages for kids have evolved and where they're going
Try Phosphorus, an HTML5 Scratch interpreter: http://phosphorus.github.io/#63476480

Also, Snap! is basically Scratch without Flash, but with everything awesome from SICP: http://snap.berkeley.edu/run/

hardmath123··on Ask HN: What are you working on and why is it awesome? Please include URL
Nearley: a JavaScript parsing toolkit http://nearley.js.org

Nearley is fast, expressive, convenient, streamable, battle-tested, bootstrapped(!), has a "standard library", and has an error handling API. You specify grammars in BNF and compile it to a JS (node/browser-compatible) file.

Nearley also has fun tools like "output json.org-style railroad diagrams from my parser" and "use this parser as a fuzzer that creates strings that match the syntax".

hardmath123··on Apple ordered to bypass auto-erase on San Bernadino shooter's iPhone
Robert Graham (Errata Security)'s notes on this: http://blog.erratasec.com/2016/02/some-notes-on-apple-decryp...
hardmath123··on Ask HN: Best curated newsletters?
I've been thinking about setting something like this up, but over email. Anyone who opts in to the mailing list would be able to submit a link+description, and once a week some software would automagically send out an aggregated email to everyone who opts in.

The problem is getting it to the optimum size. If it's too small, it won't work because nobody will want to post. If it's too large, then the signal-to-noise ratio drops and it's no better than Reddit or HN.

Also, moderation is hard.

hardmath123··on Music Industry after Scrath
This is really sad. They've also had copyright disputes over a Pac-Man game a kid wrote[0] and a folder someone made called "Animation Hall of Fame"[1].

    [0] http://wiki.scratch.mit.edu/wiki/Removed_Pac-Man_Project
    [1] http://wiki.scratch.mit.edu/wiki/Animation_Hall_of_Fame
hardmath123··on Introducing Guesstimate, a Spreadsheet for Things That Aren’t Certain
Relevant—Uncertain<T>: A First-Order Type for Uncertain Data (Microsoft Research)

http://research.microsoft.com/pubs/208236/asplos077-bornholt...

hardmath123··on How a handful of geeks defied the USSR (2011)
Relevant—here are IRC logs from the 1991 Soviet coup d'état attempt: http://web.archive.org/web/20090628013626/http://www.ibiblio...
hardmath123··on A Cabinet of Infocom Curiosities
Wow, amazing, thank you so much for that link. That just took up my entire afternoon. I wish they made games like that these days… \sigh\

Is it still possible to buy hard copies of games from Infocom? Or are they all lost relics now?

hardmath123··on A Cabinet of Infocom Curiosities
I've been looking for a copy of that game for a while now. Is there an online version or a z(5,8) version I can run with frotz or something? Is it even in the public domain?
hardmath123··on e^19709930078 = 0xdeadbeef…
Possibly, yeah. Do you have a suggestion?
hardmath123··on There are no rules in math
Thanks! I'm actually still in high school. Shoot me an email or find me on IRC if you'd like to talk—I'd be happy to say hi.

I'm hesitant to tie my writing to a "real-life" identity because you get a lot of freedom when you dissociate yourself from what you publish. If I knew my friends/parents/potential-employers could find my blog, I would be much more hesitant to publish, which would have been very unhealthy in the long run.

hardmath123··on Why CAFEBABE?
See also: http://radio-weblogs.com/0100490/2003/01/28.html
hardmath123··on Scratch is probably the answer
> That doesn't really sound like "social media".

It's "social" in the sense that it's a large community where people share things they create, make friends and have discussions. What would you say "social media" needs beyond that?

> I'd appreciate that.

Here are a few:

https://download.scratch.mit.edu/hill_monroy-hernandez_olson...

https://download.scratch.mit.edu/cscw2010poster2.pdf

https://download.scratch.mit.edu/websci09-andresmh.pdf

hardmath123··on Scratch is probably the answer
Scratch's community is very different from other kinds of social media: it's strictly regulated by the MIT folks, so content is always friendly, welcoming, and age-appropriate. As a result of this, people tend to be encouraged to work together: you would be surprised what 10-year-old kids have produced together. A large part of Scratch culture is "collaborations" and "companies" which can produce large pieces of software with really incredible co-operation--better than a lot of adults I deal with :-)

I guess Scratch as a social network tries very hard to de-emphasize numbers: there isn't a "karma" and "likes" don't bring you much (interestingly, the number of "remixes", or derivative works of your project, is emphasized much more).

I can point you to some of the LLK's published papers on this if you're interested.

(Source: Scratch community member for >5 years.)

hardmath123··on Snap: Programming for Everyone
Well, part of the motivation for blocks is that you don't need to know any special incantations. Instead of being faced with a blank text editor and a cursor, you're given a toolbox full of toys to explore, which (for me, at least, when I was in the 5th grade) is extremely empowering.

> But what I do know is that if you aren't using text, I have a hard time describing what you're doing as programming.

The thing is, kids using Scratch end up creating amazing stuff: I've seen recursive raytracers, real-time multiplayer-over-the-network FPS games, a chess AI (game tree + alpha/beta pruning), emulators for various video games… I can't really look at that and not describe it as programming.

> What's the visual representation of a type?

Shape. In Scratch and Snap!, a block that returns a boolean is diamond-shaped, and holes for boolean arguments are diamond-shaped. So you can't accidentally put a number into the condition for IF--the shape literally doesn't fit.

This beats TYPE ERROR: COULD NOT COERCE "INT" TO "BOOL" (LINE 12) any day.

> Good luck with find/replace without text.

I think it's easier to right-click a variable's block and select "rename…" from the dropdown than to run :%s/badname/goodname/g and hope you don't accidentally change non-variable instances of that substring. And since the block knows its scope, you know that only in-scope uses of that variable will be updated.

> Version control is tied to text

It turns out that version control with Snap! and Scratch projects is really easy, since the internal datastore is just XML and JSON, respectively, both of which play reasonably well with git. But when you're teaching someone to program in an introductory CS course, version control should be very low on your priority list. There are so many more exciting big ideas worth teaching.

> When you finally expose them to actual programming, all the parts that were too scary to show them to begin with are all there.

The way I see it, once you get them excited about computer science, the things that were too scary aren't scary anymore: they're exciting.

hardmath123··on Time-Lapse Mining from Internet Photos
This reminds me of https://vimeo.com/63653873, where they used Google Maps Street View to make hyperlapses.
hardmath123··on Show HN: Twenty
Bug report—maybe? If you have multiple rows of tiles, you can't drag a tile from a lower row to the game area. It bumps into a tile in a higher row and refuses to move. You need to first move the ones in the higher row to move the tile in the lower row.
hardmath123··on Elevator.js
> This document extends the Web platform with the ability to direct audio output to non-default devices, when authorization is given. Authorization is necessary because playing audio out of a non-default device may be unexpected behavior to the user, and may cause a nuisance. For example, suppose a user is in a library or other quiet public place where she is using a laptop with system audio directed to a USB headset. Her expectation is that the laptop’s audio is private and she will not disturb others. If any Web application can direct audio output through arbitrary output devices, a mischievous website may play loud audio out of the laptop’s external speakers without the user’s consent.

> To prevent these kinds of nuisance scenarios, the user agent must acquire the user’s consent to access non-default audio output devices. This would prevent the library example outlined earlier, because the application would not be authorized to play out audio from the system speakers.

> The default audio output device is always authorized.

:-(

    [1] http://www.w3.org/TR/audio-output/#privacy-consent (section 5.1)
hardmath123··on Show HN: Textures.js, SVG Patterns for Data Visualization
Hmm, an Asymptote to SVG renderer would be pretty useful for displaying mathematical diagrams on the web.
← PreviousPage 3 of 4Next →