DockerSlim makes Ubuntu Docker images 30X smaller - <AUTHOR> http://dockersl.im/ <comment><USER2> >It will use static and dynamic analysis to create a skinny container for your app.

[https://github.com/cloudimmunity/docker- slim#description](https://github.com/cloudimmunity/docker-slim#description)

Could someone elaborate on this? What kind of analysis? How does this work for different languages?

</comment><comment><USER3> This is awesome, can't wait to try it out! Is there any use for docker containers that host Go apps?

<comment><USER4> If everything else you have is in a container not having your Go app in a container means the deployment process will be a bit awkward :)

It's pretty easy to create tiny containers for Go apps. If you build the app separately then you can build your container using the scratch base image. The only gotcha is that your app needs to be statically linked. More complex Go app will have more than a single binary though, which means you need to manually keep track of those dependencies (e.g., cert files if you have an HTTPS server). Definitely doable.

Speaking of Go apps in containers. One of the common patters is including the build step in your container, but it results in big images because you end up including the build tools too. Why do people do that? Because it's convenient :) DockerSlim is a good solution for this. You keep your Dockerfile as-is. Run DockerSlim on your Go app image and the build tools and everything else you don't need is gone, so you have a tiny image :-)

</comment></comment><comment><USER4> Ping me if you want to contribute. Don't worry if you don't know Go :)</comment>


Ouya Android console up for pre-order on Amazon  - <AUTHOR> http://www.destructoid.com/ouya-android-console-up-for-pre-order-on-amazon-244071.phtml <comment><USER3> Congrats to everyone on the team for shipping this.

You guys are missing the point with the content argument. Developing for consoles has generally been a ridiculously expensive endeavor. This breaks that mold. Also what makes you think that someone won't buy a console just to play one (really good) game?

<comment><USER4> _Developing for consoles has generally been a ridiculously expensive endeavor. This breaks that mold._

No, it doesn't. This shows that you can do some consumer facing and software development around an outdated commodity platform and release it. That is nontrivial and the Ouya team certainly deserves credit for it, but it is not on the same level as what Sony, Microsoft, and Nintendo do to produce their consoles. And it shows in the final product.

 _Also what makes you think that someone won't buy a console just to play one (really good) game?_

I feel like you're wishcasting, which seems to be commonplace in Ouya discussions. What "really good" game is going to be a killer app for Ouya? The platform has very small reach and I can't see anyone with a truly promising title making it an Ouya exclusive.

<comment><USER5> Nintendo has always released low end commodity hardware.

<comment><USER4> Not in the sense that I mean, sorry. The Ouya is barely more than a Tegra 3 reference board with some furniture around it. The internals of the Wii are custom to the Wii, and that's orders of magnitude more daunting of a project.

Which does not mean that the Ouya cannot be good. (Basic microeconomics has a lot more to say on that topic.) But breathless cheering about this project "shattering the mold" doesn't really reflect reality.

<comment><USER5> That's true, yeah, but comparisonwise power doesnt mean much. Get one quirky multiplayer 'angry birds' hit and this thing will smoke ps4 in sales.

<comment><USER4> I find that extremely unlikely, because the Ouya is a parasite platform--it exists to suck up ports from other platforms (chiefly Android phones and tablets). This makes it very easy to port away from as well, and I find it much more likely that any game with significant potential is ported away from Ouya as soon as possible to reach a platform with more extant users--removing the drive to purchase an Ouya at all.

It is a problematic situation for Ouya, because they have no compelling reason to stay on the platform once you sniff the slightest success.

<comment><USER6> Android games are (so far) touch-oriented, whereas the Ouya has a console controller with analog sticks and triggers, shoulder buttons, d-pad, etc. It may be easy enough to port Android games to the Ouya, but it's also easy to make a game that doesn't port back well.

<comment><USER4> Sure, that's true. Now the bigger question: who'd bother writing those games primarily-for-Ouya in the first place? You've got Windows PCs right over there, Macs and Linux PCs accessible without _too_ much more work, and if you play your cards right, you can even deploy to the 360 (yeah, XNA's EOL'd, but it's still viable for XBLIG, and that's a lot better of a controller-based platform than Ouya is).

In the rare, doubt-it'll-happen case of a hit game coming out first on Ouya, I would bet we'd see it on Steam, for cheaper, within six months--because porting will, by necessity, be That Easy.

Ouya could, depending on tech stack get a _port_ in that situation (and I've considered it for my own project because I'll already have a gamepad API for the Windows/Mac release), but it will never be a leading platform that people actively target because the market share is infinitesmal. There are too many better options in front of it.

EDIT: Also, bear in mind that Ouya isn't doing anything groundbreaking with their gamepad stuff - the gamepad APIs already exist in Android 4.x. The only Ouya-specific stuff I have seen is in their purchasing layer.

<comment><USER6> PC's are not very living room friendly, cost more than $100, and don't come with console controllers. 360's are more expensive to develop for, are prohibitively expensive to push frequent updates to, and are heavily censored. They also cost more than $100.

<comment><USER4> About half-true; the 360 is not expensive to develop for if you're doing XBLIG, which is probably the top speed of most of the "Ouya developers" I've seen out there. It is if you're an XBLA dev, but most of them are not. ("Censorship" is bizarre; I would hope we're not pushing RapeLay here.)

But it is purely a numbers game: if you've got a chance at 0.05% of Steam consumers you've blown away the 25% or even 50% of Ouya owners who might be interested in your game and it's not even close. And that means that nobody's going to write exclusives for Ouya and so the value prop for buying one, outside of a small perfectly-targeted segment that _doesn't have a console_ and _wants to play games in the living room_ and _doesn't care about established franchises_ and _is really really cheap_ , dies on the vine.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> This is not a game console it is a cellphone!

I am thoroughly disappointed by this project. Part of the vision was to offer console gaming, but with a weak GPU and highly latency IO it is impossible to write any games that resemble the quality of a console game.

Unlike the Wii there is no compensating feature like motion sensing. Additionally this makes it impossible to write games such as the Just Dance, which are extremely popular with casual audiences.

Ultimately, I think Ouya compromised by pushing a technically simpler and underpowered design. This will bite them when they realize that nobody will write real games for a platform that can't handle it.

It is not clear why anybody would want a $100 console that plays no real games when they can get a $150 Wii.

</comment><comment><USER8> I am most interested in the Plex/XBMC support. I have been looking for a small footprint XBMC box with enough power and this seems to fit the bill.

<comment><USER9> Me too. My real pet peeve with the PC/Multimedia world is that I can't watch TV on anything other than Windows Media Center- all the channels coming through my cable connection are locked.

It's fantastically annoying, because MythTV+XBMC would be a perfect TV watching solution. As it is, my best option for a set top box is to buy an Xbox 360, and I don't particularly feel like doing that.

</comment></comment><comment><USER10> Nice, but does it have the cojones to keep up with Microsoft and Sony?

Doubtful. I think this will be a niche console for geeks, because of one reason: Content.

It's a vicious cycle. With no content, customers won't want it, and with no customers, content creators won't create any games or apps for it.

Still, it looks very promising, I'm just unsure if developers will get content onto this thing.

<comment><USER11> On the other hand, developing for this is a lot cheaper than the PS3 and 360. Much of its software is going to be ports of Android phone games, so developer adoption isn't the huge hurdle that it's been on other new ecosystems.

The mobile appstores are so saturated that it's impossible to get noticed, at least at the start that will make Ouya attractive to developers even if it has a smaller customer base.

<comment><USER10> But most of the Android games are optimized for mobile and touch. It's like having a 400K sportscar with a 55mph speed limiter. The capability is there, but then there's nothing that really takes advantage of it. What value would developers find in porting their games to the Ouya? Not much, I suppose, unless there's a saturated market. Companies like Rovio and the guys who made Temple Run can afford it, but the small-time devs like Andreas Illiger may not see much of a market with the Ouya.

Don't get me wrong, I would buy one of these anyway, but I just hope to see some developers hop onto it, which seems unlikely at this point.

<comment><USER12> I think there are quite a lot of those games that have virtual buttons on top, and those can be easily ported to the console. Many of them are RPG's or MMORPG's, which use the same free-2-play model OUYA is interested in, and are actually some of the top grossing games on Android.

</comment></comment></comment></comment><comment><USER13> "Every game on OUYA is free to try. We believe you shouldn't have to buy it unless you love it"

That's pretty cool. Count me in.

<comment><USER14> Would be interesting to see how this affects the current console gaming markets..

<comment><USER15> I wouldn't expect it to. I don't see how anyone _can_ expect it to compete with the major consoles. It won't (not to say it can't, just that it simply won't) run any huge AAA game titles, so it's completely irrelevant on that level.

I think it sits in its own niche. Budget gaming. A competitor for Nintendo's offering, perhaps. But certainly not a competitor for either Microsoft's or Sony's offering.

I think you're more likely to own an Ouya or _both_ it and a "major" console. It would not replace them.

</comment></comment></comment><comment><USER16> I backed Ouya because the idea of being able to "easily" publish the same app on phones and a console was too good to pass up. I'm just a Computer Science student tinkering with Android development in my spare time, and I can publish a game for a console. That's pretty amazing.

</comment><comment><USER17> Ouya is running a Game Jam for its first generation of games: <http://www.killscreendaily.com/create/entries.php>

My impression is that they want to become the center of Indie Game development.

<comment><USER18> A game jam with a $99 entry fee. Imagine me making a really loud, really dismissive noise for about 3 minutes.

But yeah, that does seem to be their objective. Hopefully they get their stuff together and put out a solid SDK and set of dev tools and simulator (their current release is at least a start).

<comment><USER18> Hi downvoters!

If you downvoted me because you object to my complaint about the entry fee, allow me to educate you. If you downvoted me because you think Ouya is awesome or you own Ouya shares, more power to you.

Anyway, a company like Ouya co-opting the game jam phenomenon (not to mention the term) for pure commercial, money-making greedy purposes is offensive. Allow me to explain in detail:

The events normally associated with the term Game Jam are:

a) free

b) not about prizes or competition

c) intentionally inclusive

For a few examples, just google 'game jam', or check out these pages:

<http://en.wikipedia.org/wiki/Game_jam>

<http://en.wikipedia.org/wiki/Ludum_Dare>

<http://en.wikipedia.org/wiki/Global_Game_Jam>

The whole spirit and philosophy behind game jams is to encourage anyone and everyone to creatively participate in the creation of video games, regardless of commercial viability, tools used, race, gender, age, or creed.

In comparison, the Ouya game jam:

a) Required a $99 purchase of an Ouya console to enter - EVEN THOUGH - Ouya is supposedly an Android based platform and any functioning Android game should be able to run on the Ouya.

b) Included prizes and judges being handed out at the discretion of Ouya and/or Kill Screen

c) Required all games to be Ouya games, not Android games or simply 'games that can run on the Ouya'.

These are not minor distinctions. This is important. This is a corporation feeding off the efforts of the community without giving anything back (unless you count the pittance of a few prizes to be handed out to the 'winners').

The Ouya 'game jam' is a contest. And I have no problem with contests: They are a good way to promote interest in your platform. Microsoft ran multiple successful contests for XBox Live Indie Games called 'Dream Build Play' that produced lots of great games.

<comment><USER15> > a) Required a $99 purchase of an Ouya console to enter - EVEN THOUGH - <USER2> > is supposedly an Android based platform and any functioning Android game > should be able to run on the Ouya.

The Ouya runs an additional API that provides a game menu similar to that of the Playstation's XMB or the XBox 360's Guide, as well as support for its controllers and hardware-specific features. Games _for_ Ouya need to be able to support that API. Games not targeted directly to Ouya may not be able to adequately support the controllers and hardware.

(I do not have a dev kit, so I don't know the specifics.)

</comment></comment></comment></comment><comment><USER19> I think this is really a competitor to something like Roku rather than XBoX/PS/Wii.

I imagine most of the buyers will be people who already have consoles or people with no real interest in consoles or hackers wanting to repurpose it.

</comment><comment><USER20> For those curious about the games and software confirmed to release on the Ouya, they have a list on their site:

<http://www.ouyaconsole.com/ouya-software/>

This Amazon discussion has a mirror of the list in case Ouya's site goes down (it's loading slowly for me):

[http://www.amazon.com/Games-availables-from-day- one/forum/Fx...](http://www.amazon.com/Games-availables-from-day- one/forum/FxZ1FGCSFR71ST/Tx2Q57W9DLJ4JPJ/1/ref=cm_cd_naredir)

<comment><USER21> That's not an official OUYA site.

The official site is here: <http://www.ouya.tv/>

</comment></comment><comment><USER22> I'm actually pretty excited about the Ouya as an emulation platform.

In a similar thrust, those here who think that because it's an open and easy to develop for platform don't remember the lackluster sales of many prior platforms that lead into the market with emulation (which gave them huge libraries).

Most of the non-emulator software was quite frankly, lackluster. Those consoles counted their sales in the tens of thousands of units, not in the millions.

</comment><comment><USER23> Will Game Stick be far behind? I think both are viable platforms. Actually, I'm not sure "platform" is the right word there since they both run Android.

<comment><USER24> the gcw zero seems interesting ([http://www.kickstarter.com/projects/gcw/gcw- zero-open-source...](http://www.kickstarter.com/projects/gcw/gcw-zero-open- source-gaming-handheld))

</comment></comment><comment><USER25> $100 for games, XBMC, plex, pre ordered. Will probably get Netflix on there too right? Nice little media center and controller with the bonus of multiplayer games. So worth it.

</comment><comment><USER26> I wouldn't mind having one of these with a "real" Linux distribution instead of Android to use as cheap terminal/workstation.</comment>


Free Update For: Loving Common Lisp, or the Savvy Programmer's Secret Weapon - <AUTHOR> https://leanpub.com/lovinglisp <comment><AUTHOR> I wrote this. It is free to read online.</comment>


Is There Anything Good About Men? (2007) - <AUTHOR> http://www.psy.fsu.edu/~baumeistertice/goodaboutmen.htm

<comment><USER2> Was going to just clean the text up and paste it here, until I realized how long it was.

Converted the .doc file to PDF and fixed up the formatting to be a bit better:

Left Justified: [https://s3.amazonaws.com/hnstuff/GoodAbtMenAPATalk.pdf](https://s3.amazonaws.com/hnstuff/GoodAbtMenAPATalk.pdf)

Full Justified: [https://s3.amazonaws.com/hnstuff/GoodAbtMenAPATalk- fulljusti...](https://s3.amazonaws.com/hnstuff/GoodAbtMenAPATalk- fulljustification.pdf)

Also provided URL to original document in header of each page.

<comment><USER3> Thanks for fixing this up. It really is an excellent article.

</comment></comment><comment><USER4> The formatting of that page is truly wretched. It's nearly unreadable in that format.

<comment><USER5> Even more annoying than the format is the fact that there are missing spaces between lots of words.

</comment></comment><comment><USER6> Better formatted version here:

[http://denisdutton.com/baumeister.htm](http://denisdutton.com/baumeister.htm)

</comment><comment><USER7> My question would be: is there anything good about this type of research?

Outside of academia, I don't think that anyone pays any serious mind the conclusions of these studies.

<comment> throwaway-00 >I don't think that anyone pays any serious mind the conclusions of these studies.

Quite a few people do, actually. The /r/mensrights subreddit, for example, has almost 80,000 readers at the moment.

<comment><USER8> For comparison, /r/sloths has 44k, /r/mildlyinfuriating has 80k, /r/creepypms has 87k and /r/animalsbeingjerks has 100k.

<comment><USER9> A better comparison would be to say that /r/mensrights is currently the 201st biggest subreddit:

[http://www.redditlist.com/page-2](http://www.redditlist.com/page-2)

note: please do not take this comment as me subscribing to the views of that subreddit. I just like Reddit stats.

</comment></comment></comment></comment><comment><USER10> Am I only one who finds this stuff disturbing and sexist? Author starts with some 'facts' and than just goes on and on with some speculations.

<comment><USER11> If sexist means it differentiates between the sexes, then of course. I really don't find this disparaging of women. But since we're both men (I think), it probably would be easier to get a women opinion.

<comment><USER10> Perhaps it could be sexist to men...</comment></comment></comment>


An African money-transfer firm with big ambitions - <AUTHOR> http://www.economist.com/news/finance-and-economics/21674798-african-money-transfer-firm-big-ambitions-transfer-window <comment><USER2> Tangentially related: Anyone here has good alternatives for electronic payments in East Africa, and mid/East Asia?

This is for a commercial startup that that is already working in these areas, currently using mobile payments.

<comment><USER3> What problem are you looking to solve? I may be able to help.

<comment><USER2> Thanks!

They are trying to collect small monthly payments for a service that is better than the service these people/businesses already use.

Currently distribution works using mobile payments:

1\. Customers pay using telecom companies:

2\. A voucher sms is sent out.

3\. This voucher can be entered into automated distributed distribution center that will release what the customer bought.

It works surprisingly well, but sometimes they are tempted to use scratch cards in some of the markets.

</comment></comment></comment><comment><USER4> The commission to send $100 to Somalia from the UK is 7.5% according to their website.

Imagine working your ass off on a construction site in London to send money to your family in Somalia and realizing that one out of every 13 dollars you earn is being pocketed by these middlemen.

There's nothing to admire here.

<comment><USER5> Did you read the article? They rely mostly on staff knowledge to ensure the money reaches the intended recipient.

Imagine sending that $100 with a destination that reads: "Deliver to Mirjam, daughter of Anna, who lives in the red house down the street from the Hargeisa old town well."

7.5 dollars seems pretty cheap for that kind of service.

<comment><USER4> Physically handling this much cash and verifying IDs and all this manual garbage is not actually necessary to solve the real problem which is transferring value to Mirjam.

The correct solution is to open accounts for these people like an actual bank and subsidize ATMs and electronic POS systems to encourage people not to have to actually take out cash.

Then you have a nice stable assets line on your balance sheet and you can start lending money out and enabling investment and making a profit from the interest.

> 7.5 dollars seems pretty cheap for that kind of service.

Sure, but if you send $1,000 it doesn't get any cheaper. Still worth $75? $750?</comment></comment></comment>


CSS Grids - <AUTHOR> https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Grids <comment><USER2> Really nice breakdown of the concept, before reading this I believed it was something invented by Bootstrap.</comment>


secgeeks.com needed co-founder - <AUTHOR>

<comment><AUTHOR> its a security portal like security focus etc.i planned to add various sections to this site.i am also having other sites like newskicks.com and tubeley.com all are powered using open source software.if you think this ideas interest you please contact me at:firstname.lastname@example.com i thanks for your time and looking forward to hearing from you soon.</comment>


The Coronavirus and Carbon Emissions - <AUTHOR> https://www.nytimes.com/2020/02/26/climate/nyt-climate-newsletter-coronavirus.html <comment><USER2> I made this exact observation last night in a comment on another thread and was virtually crucified for stating it.

It is a horrible disease but a reduction in emissions is still a good thing no? I guess it's sort of like Bernie praising Castro for increasing literacy.

</comment><comment><USER3> Summary seems to be: there is a drop and expected to be back at same level after the virus outbreak is finished/managed.</comment>


Re-Ask HN: Industries, Niches ripe for profit? - <AUTHOR>

Here is another one from more than a year ago http://news.ycombinator.com/item?id=475736. <comment><USER2> Clickable link: <http://news.ycombinator.com/item?id=475736></comment>


Ask HN: hackernews coders have experience with high traffic web apps? - <AUTHOR>

I am working on a start up, and I would like to lay a reasonable foundation for scaling. My theory has always been, if I need to scale, I'll be in a good position and that is a good problem to have, however I have some time and would like to at least do a decent job preparing for the possibility of higher growth and expansion.<p>I'm not a whiz at this, so wanted to see if there were any engineers out there that had experience in this that would impart some wisdom for a week or so, in exchange I can provide graphic design services. <comment><USER2> I've got a good bit of first-hand experience with this. The right answer depends a lot on the app and architecture.

Do you have to maintain state/session over a long period of time?

Can requests be load-balanced across different web servers or do they need to stay with the originating server?

How much content can be static?

How long can the data be cached for?

Will there be high-demand customers or topics/trends? (eg: think of how Twitter has dedicated Justin Bieber servers)

Will the traffic be bursty or climb steadily?

Is there a need for comments or user input to show up in real time? Does the content mostly come from users, or from some structured input on your end?

Does the site architecture lend itself to elastic scaling (either from your own standby machines, or EC2 style servers)?

These are just some things to think about.

</comment><comment><USER3> Worry about scaling when you can afford it. Many successful startups go through a transitioning stage but not all do. When icanhazcheezburger was launched it was a mix of PHP and .NET - oil and water. It still is!

</comment><comment><USER4> My advice is not to worry about scalability at this point. You can't really predict when and where your startup is going to gain popularity. Focus more on building a solid product, launch it, and you know what directions you are heading toward.

Imagine you waste 2 months of scaling your website that is only getting 100 users. I've experienced this before. Tears after all.

<comment><AUTHOR> stephenou,I'm aware of this short-sight. However, I am building a start up and putting a lot of resources into it. I do not want to plan for scale, per se, but I wanted to see if there were rough points I could actually keep in mind when developing, as opposed to just building a prototype. I'm used to use hacking things together with php and mysql, so I wanted to try to be a little more formal this time around.

<comment><USER5> until you have users, how do you know which parts of your app are going to be the bottlenecks?

<comment><AUTHOR> true. whenever Im building, (I know php and mysql), I always can get stuff to work, and make it work decently well, but i'm never sure if i'm doing stuff properly. I barely ever create OOP functions and hierarchies, etc. Does anyone else ever feel this way?

</comment></comment></comment></comment><comment><USER6> Hi Riskish,

My team and I deal with high traffic portals on a daily basis (as a hosting business). I'll be happy to listen, understand, and share with you ways to scale. Feel free to get in touch.

Regards

Joe

</comment><comment><USER7> My advice would be:

Cache everything you can, especially expensive code sections.

Move everything that doesn't have to update immediately to cron jobs.

Whenever you can, load information on demand.

Try to think before-hand about the nature of your app, specifically, is it write heavy, read heavy or code heavy? Map out a scenario of what you need to scale first, and what isn't as important to scale, for example, would you need more app servers or db servers?

Load balance if at all possible.

</comment><comment><USER8> google James Golick <http://jamesgolick.com/> He has some amazing conference lectures about how he scaled his 1.5million page view website.</comment>


Turn your PC upside down to boot into Linux (2003) - <AUTHOR> http://www.mini-itx.com/projects/windowsxpbox/?page=4 <comment><USER2> High-end laptops like ThinkPads often have an accelerometer, I'm not quite sure how hard it would be to access it from GRUB2 but it would definitely be a neat trick to boot a hidden partition or something. Or maybe display a fake error message and refuse to boot if it's _not_ sideways as a crude method of protection.

<comment><USER3> Many laptops have these sensors, often as part of a hard drive protection system. If it detects 9.8g suddenly going to 0g then it parks the read head as it's probably just been dropped. I'm not sure if they're still present in this era of SSDs. Maybe if they weren't part of the disk itself.

They were used by the Quake-Catcher Network project from Stanford. Although from the OS.

      ...seismic network by utilizing sensors in and attached to internet-connected computers.

[https://github.com/carlgt1/qcn](https://github.com/carlgt1/qcn)

Edit: Yes, I meant ms⁻² not g. Been a while since I've done any physics. 9.8g is probably more like what it would sense when hitting the floor, which is a bit too late to do anything useful. At least I didn't claim it to be 6.54×10⁻¹⁰ Nm²kg⁻² (bonus points if you get this).

<comment><USER4> > If it detects 9.8g suddenly going to 0g then it parks the read head as it's > probably just been dropped.

9.8g? Is your office inside a centrifuge? :-P

<comment><USER5> 9.8g is actually a perfectly reasonable _deceleration_ value at time of impact. So if it detects 9.8g followed by 0g, it's likely that it has bounced!

<comment> semi-extrinsic It would have to be followed by 1g, not 0g. Unless the laptop bounced in space.

<comment><USER6> The accelerometer on a laptop on a ballistic trajectory should still read 0, shouldn't it?

<comment> semi-extrinsic Ah, sorry. Yes, it will, because a typical accelerometer measures not the acceleration, but _the deviation in acceleration from freefall_. So it will show an acceleration of 1g when standing on a table, and 0g in freefall.

Which is obviously wrong if you think of it as measuring the acceleration of the laptop. The physical acceleration of the laptop is obviously zero when it is at rest on a table. (Acceleration is the change in speed, and the laptop has zero change in speed.)

<comment><USER7> Can you build a consistent accelerometer that does what you want?

If you think about the accelerometer as a little micromechanical arm which is being deflected relative to the laptop by the force of gravity, it makes a lot more sense. When they're falling together the deflection is 0.

<comment> semi-extrinsic > Can you build a consistent accelerometer that does what you want?

I gave it some thought, and no, I don't think you can build a self-contained one. But if you allow external communications it becomes very doable (see: GPS system). Also, if you allow another input that tells the device it's orientation wrt. the gravitational field, say a magnetic field sensor, it becomes easy.

<comment><USER7> If your accelerometer measures what Wikipedia calls "coordinate acceleration" it's something observer relative so I expect (waves hands) "problems" will arise with measuring in relation to your chosen reference frame at relativistic speeds.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> Cute trick. Reminds me of the Karateka easter egg -- if you inserted the floppy disk upside down[1], the graphics displayed upside down.

1\. 95% of HN is now confused

<comment><USER9> For those interesed, I was among the not-confused-but-curious (I'm old enough to even have inserted cassette tapes on a computer) and found out this [0] explanation :) Nice story, thanks ksherlock.

[0]: [http://www.geek.com/games/karateka-apple-ii-floppy-disk- had-...](http://www.geek.com/games/karateka-apple-ii-floppy-disk-had-a-side-b- played-game-upside-down-1509335/)

<comment><USER10> Unfortunately it is not explained HOW they did it.

It is somewhere on Mechner site and diaries, but I can't find it again.

Basically, one day while coding, he found out that one single bit caused a bug in rendering that flipped the whole game upside down, it was completely unintentional.

But he thought it would be hilarious to make the easter egg (indeed, it was).

Later he used the same technique on Prince of Persia game (there is an area of the game where you drink a potion that flips that bit, flipping the whole game upset down, this had to be emulated for non-Apple systems, probably caused some pain to people porting the game :P)

<comment><USER11> The Apple II floppy drives were single sided. It would be trivial to put different code on the other side of the floppy disk itself.

A single bit error that would simply flip everything upside down seems quite improbable given the Apple II hardware. I wouldn't be surprised if a bug inspired the easter egg, but I'd be shocked if there was a single bit difference between the front and back of the floppy.

<comment><USER10> I think it was related to something about how a pointer to the video data worked in the game engine (not a property of Apple II itself).

Maybe it was the positive/negative bit that was flipped, and made the pointer read backwards and underflow, but end rendering anyway due to some hardware quirk.

<comment><USER11> I don't believe that the 6502 had such a thing as a positive/negative bit that would have this kind of effect.

On that hardware, if I was going to do this, I'd just reverse the order of the entries in the scanline lookup table. On the Apple II the address of the first pixel of each scanline did not follow immediately after the address of the last pixel of the prior scanline. So every program that did any graphics work used a lookup table to get the address of a particular scanline.

As long as you were consistent in your use of this table, that would be the only necessary change to flip the game upside down.

<comment><USER12> Reversing the scanline lookup table is indeed how it was done.

Source: I disassembled it, a long time ago.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> [http://www.linux.sh/loadlin.html](http://www.linux.sh/loadlin.html)

in 2003 you still could install linux on a FAT32 system and boot from windows, you could even share your swap space with the file windows was using for the same purpose.

So an autoexec.bat with a menu and loadlin called in the process. It was not even a big penalty.

We were real hackers like this : [http://www.tsgk.net/cowboyz/tdc.html](http://www.tsgk.net/cowboyz/tdc.html)

</comment><comment><USER14> Software delivered in large physical boxes; not so much nostalgia but horror at 1) how wasteful the process was 2) how skewed it made things -- not being able to easily patch and thus deathmarch or even late shipping, and then the horrors of shipping crap and then hoping the patch would fix it, because you had to ship on a specific date.

And just how hard to make/expensive/etc. boxes, manuals, etc. were, and how annoying it was to manage inventory.

<comment><USER15> I can remember when PC game boxes shrunk down from the huge size to the smaller format. And now they are "shrinking" into nothingness with digital distribution.

<comment><USER16> Yes, and the games you "buy" also shrink into nothingness if the distributor goes bankrupt or you are accused to violate somebody's ToS. I wish back for the physical distribution of game media and offline validation of serial numbers, if only to be able to play my old games in 20 years.

<comment><USER15> True, though half the time nowadays all the physical copy does is link to a download. The last game I can remember buying a physical copy of was Civ V and basically the only thing in the box was a link to download it on Steam. With the onerous always-on DRM that seems so prevalent in many games today I'm not optimistic that I'll be able to play many of the more recent games I "own" in 20 years anyway.

<comment><USER17> There are recent games which go against this trend. For example the last one I bought without DRM was Divinity: Original Sin Enhanced Edition. Support them :)

<comment><USER15> I did :)

</comment></comment></comment></comment></comment></comment><comment><USER18> Shake it upside-down to reboot would be much more fun.

<comment><USER19> An oldie but a goodie : [http://dilbert.com/strip/1995-04-03](http://dilbert.com/strip/1995-04-03)

<comment><USER18> Thanks. That's the one I was thinking of but for some reason I was remembering it as having been a "User Friendly" so my google-fu failed me.

</comment></comment></comment><comment><USER20> > Greetings Hackaday visitors and Time Travellers from the early 2000s!

This is the best reaction I have ever seen to a sudden surge of traffic to an old page.

<comment><AUTHOR> Yeah I posted this on Sunday and it seems to just have taken off this morning - is that normal?

<comment><USER21> dikaiosune has it right. We put it in the second-chance pool, described at [https://news.ycombinator.com/item?id=10705926](https://news.ycombinator.com/item?id=10705926) and earlier posts linked from there. It's the latest in a long series of experiments to try to give good stories a second crack at the front page.

Edit: Wow, you've been posting some great articles: [https://news.ycombinator.com/submitted?id=PascLeRasc](https://news.ycombinator.com/submitted?id=PascLeRasc). We've put [https://news.ycombinator.com/item?id=11007792](https://news.ycombinator.com/item?id=11007792) in the second-chance pool and we'll send you a repost invite for [https://news.ycombinator.com/item?id=10932621](https://news.ycombinator.com/item?id=10932621). (After a few days have gone by, we do the latter instead of re-upping the post.) Hope you'll keep up the great submissions!

<comment><AUTHOR> Wow, thanks! I'm glad my posts are appreciated.

<comment><USER21> We're suckers for high-quality historical material that hasn't appeared here before. HN can never have enough of that.

</comment></comment></comment></comment></comment><comment><USER22> Perhaps I'm missing the point. If one is going to boot up between OS's that often wouldn't virtualization work best? Other than that it is a neat hack.

<comment><USER23> The points you are missing are 2003 and Celeron. Efficient and easy virtualization is relatively recent.

<comment><USER24> VMWare Workstation was already on its 4th major release by 2003.

<comment><USER25> Hardware virtualization for intel/amd processors did not come until 2006. So you could run VMWare and get decent performance with paravirtualized drivers, but running a completely different OS would have required software virtualization, and it was not fast by any means. Booting to the other operating system was a much better experience since the OS would then have full use of the resources without software virtualization being in the way.

<comment><USER11> Software only virtualization was faster than the first generation of hardware supported virtualization.

See page 7. of this document: [http://www.vmware.com/pdf/asplos235_adams.pdf](http://www.vmware.com/pdf/asplos235_adams.pdf)

<comment><USER24> Indeed. It is quite amazing how history is being revised here. Software virtualization was extremely useful from day 1.</comment></comment></comment></comment></comment></comment>


Ask HN: What is the holy grail of classical computing? - <AUTHOR> What is the holy grail of [classical] computing?
For anyone else who might be having a slow day at work - where do you think the evolution of computing practices is headed?
I'm curious as to what the prevailing ideas of "ideal computing architectures" are, in terms of computing performance, programmability and utility.
Perhaps a platform that frees us of having to tailor algorithms to match the hardware topology?
How would reconfigurable hardware change the nature of the game? Does it turn into an optimisation problem that we can throw ML/DL algorithms at?
Is it useful to work backwards from some ideal computing platform? Are we doing this already?
For instance, If Optical switches are the fastest possible computing device, would it make sense to focus most R&D effort there? Or Would this come at the cost of missing other low hanging fruit? And if so could there be an  optimal risk/reward strategy to advance computing?
Are there other existing Non von-neuman architectures that that aren't getting the attention they deserve?
Are these too many questions for one AskHN post? Do I need to stop and back to work? <comment><USER2> If you're including software no question the "holy grail" is [https://en.wikipedia.org/wiki/Artificial_general_intelligenc...](https://en.wikipedia.org/wiki/Artificial_general_intelligence).

However it sounds more like you're asking what hardware innovations will enable fundamental performance improvements, or milestones that mark a large change in how things are engineered.</comment>


I wrote this article with one mouse click - <AUTHOR> http://coding.pressbin.com/60/I-wrote-this-article-with-one-mouse-click/

<comment><USER2> You can do an awful, awful lot for your business by taking this idea one or two iterations further:

1) Identify data source

2) Extract value from data source

3) Spit out templated content pieces extracted from data source

4) Farm out templated articles to freelancers for thickening up, Demand Media style

My client from this summer who paid me to do it for the average value of particular college degrees is launching sometime in the next week or so. I'll happily play show-and-tell with the non-proprietary parts if folks want, after it launches.

<comment><AUTHOR> I tried to do almost exactly what you're describing about a year ago -- scraping structured data about mutual funds and constructing articles about each fund, which I submitted to Associated Content.

Unfortunately, I should have spent more time "thickening them up" -- after the first half dozen or so, AC began rejecting them for being too similar to each other.

But yeah, the potential is definitely there.

<comment><USER2> I'm curious: why did you submit them to Associated Content instead of building your own site, where you'd have total control and keep most of the value you created? A deep backbench of semi-automated articles about funds plus relatively fewer pillar content pieces for linkability strikes me as a potentially very viable business in an industry which is quite literally awash in cash to spend on marketing.

<comment><AUTHOR> At the time, AC was paying about $3 up front, plus pay-per-view incentives. And it has a good Google PR. So, I figured I could either be lazy and submit to AC or build my own site and spend a lot of time trying to get a decent PageRank. I chose lazy.

<comment><USER2> Just in the spirit of introducing you to other options: there exist people who already have profitable affiliate sites in the space who you could pitch on the idea of "bolt this onto your site and get X more inventory which will rank on the strength of your existing brand/trust/etc." I'd be thinking more in the five figure range than the $3 up front range.

<comment><USER3> Good suggestion!

And $3 per article can also add up, if you have a scalable solution.

</comment></comment></comment></comment></comment></comment><comment><USER4> Personally, I'm not a fan. For generic content like this, I'd rather read it in a table or chart. The data is being encoded into natural language, and then when we read it we have to parse the important information back out.

This is a weird example, but look at Groupon. One of the main reasons it's so big is the custom, humorous descriptions that go along with each item.

If newspapers want to survive, they shouldn't be automating their content- it just makes it more generic and forgettable. Nobody wants to read an article that a computer wrote.

<comment><USER5> > One of the main reasons it's so big is the custom, humorous descriptions > that go along with each item.

Personally, I never read those. I skim the headline, and look at the deal details if the topic interests me and is a really good deal.

There's a difference in content though; with deals I just want the hard facts. With many news articles, I want some well-written copy to add context to otherwise meaningless/bland data.

For the Powerball results, the sentence format is a bit more engaging and I can skim it as fast as I would skim a table. If nothing else, it makes me feel like the publisher cares more about the reader.

</comment></comment><comment><USER6> FTA: "But the result — being able to automate what used to be a monotonous task — is totally worth it."

Some of the best hackers and coders I've met were the laziest folks around; but they'd spend hours working to automate a 1-minute monotonous task.

<comment><USER2> You can get _staggering_ productivity wins by automating enough of the right 1, 5, 15 minute tasks, especially when you consider how terrible people's schedulers are. If your computer lost an hour of productive work every time it context switched, you'd figure out ways to eliminate it's list of small recurring chores, too. Happily, your computer has very, very efficient context switching relative to you.

I've been keeping a running count of time spent on various activities this month, for giggles. Total support time for BCC in the last two weeks: eight minutes. The machine has been humming so efficiently I burned some time yesterday just to check that the whole thing hadn't been hit with a meteor or something.

<comment><USER7> A second point would be that the time you spend automating tasks has other payoffs, in the form of learning and inspiration.

For instance, I suspect that part of the inspiration for Appointment Reminder came from Patrick's own realization of how valuable the automation of small tasks can be (chasing down missed appointments, in this case).

\---

To go off on another tangent, this is akin to eliminating technical debt from your workflow. By taking time to "refactor" certain tasks by doing them in a more efficient way, you get a net savings going forward. You can increase your ability to take on new tasks by increasing the efficiency of existing ones.

In keeping with the refactoring theme, if you have tasks that don't scale well, you may need to spend more time on them in a crisis. For example, in the event of a site outage you might suddenly have a deluge of support emails. Having support tickets be automatically created would save you n*60 seconds of copy/pasting.

</comment></comment></comment><comment><USER8> Nice article. It could be improved if the author collected numerous, diverse lottery result articles and used these to create a script that outputs randomized articles.

This is already done in the sports area, which is significantly more complicated: [http://mediadecoder.blogs.nytimes.com/2009/10/19/the- robots-...](http://mediadecoder.blogs.nytimes.com/2009/10/19/the-robots-are- coming-oh-theyre-here/)

</comment><comment><USER9> This task _screams_ for DSLs, especially on the generation end. Doing this in PHP directly (or most other general purpose languages) encourages too little variation because adding alternatives is relatively heavyweight. Writing a good DSL that makes it easy to offer more alternatives in a single template will make it much easier to produce something even less distinguishable from a human report.

<comment><USER10> I think you are missing the point. What's remarkable is that this person is combining basic hacking skills with a completely different career, not the cleverness of the design. Not everyone has to be a poet but amazing societal changes happen when everyone can read and write.

<comment><USER9> I don't think I was missing the point. I think I was _making another one_.

<comment><USER9> Further thought: Actually, not being a programmer reinforces my original DSL point, not contradicts it. Part of the purpose of a DSL is to reduce as much as possible the "programming" part of the task so the domain expert can concentrate on what needs to be done.

I never said "this guy should have written a DSL instead", which I didn't say because it would be an asshole thing to say. I said that this task screams for a DSL, and that's only _more_ true if this guy isn't a programmer.

</comment></comment></comment></comment><comment><USER11> No need to mess around with curl bindings directly in php. `file_get_contents` will accept an url.

<comment><AUTHOR> Hey, I'm the blog author. You're right -- I'm just so used to using cURL for more complicated requests that the simpler solution skipped my mind. I'll update.

<comment><USER11> You may know already, but a lesser known feature of php is that you can pass a [stream context](<http://php.net/manual/en/function.stream-context- create.php>) as optional argument to most file-operations. This enables you to make fine grained http-control (post, headers etc.), still using `file_get_contents` and friends.

</comment></comment></comment><comment><USER12> This idea has a lot of potential, and thanks for including code samples!

</comment><comment><USER13> wow, thats pretty funny, its almost exactly what we do for <http://www.saturdaylotteryresults.co.uk..>. funny that

<comment><USER14> You might want to add a space between the year and 'Lottery Results' in your titles.

      Old: 2010Lottery Results
      New: 2010 Lottery Results

</comment></comment><comment><USER15> this a classic seo content generation move, called mad lib sites. You create a templated article, with variables for each piece of dynamic content. Usually, you will also create "spun" content so that each article created with the madlib template is even more unique.

Then, you can scrape or find large databases of consistent information and deploy very large sites.

The trouble is getting google to fully index these sites. It requires a good amount of link building both to the madlib pages and the home page to get enough juice for the crawlers to spend time on the site and get things indexed.

They can be very useful sites to build for a variety of reasons, and can actually add some value depending on the data you're publishing

</comment><comment><USER16> Will someone please make a start-up where a non-technical person can plug in information and do something like this? It would be great!

<comment><USER17> Do you mean for general workflow tasks, or for creating documents given a set of data?

For workflow tasks, Automator.app on OSX is pretty great, even for non- programmers. There's probably something analogous on windows/other OSes.

For document generation... that seems like a fun weekend hack. I'm imagining some kind of more configurable madlibs-style app.

<comment><USER18> Microsoft Word can already do the document generation thing from an Excel spreadsheet. Of course, it's more complicated than a purpose-built app would be, but probably also more powerful.

<comment><USER19> Here's a description of how MS Word and MS Excel were actually used to create 4,600 parameterized web pages, complete with samples of the Excel and Word documents used:

<http://www.horniman.info/DOCUMNTS/HOWTO.HTM>

Scroll down to section 6, "Webpages" for explanation of this topic.

The generated website is also live online at

<http://www.horniman.info/>

so the generated HTML can be easily inspected.

</comment></comment></comment></comment><comment><USER20> <http://pastebin.com/NmtPBDgK>

<comment><USER20> <http://pastebin.com/8gMi4iAU></comment></comment>


Google AI project writes poetry which could make a Vogon proud - <AUTHOR> https://www.theguardian.com/technology/2016/may/17/googles-ai-write-poetry-stark-dramatic-vogons <comment><USER2> Reminds me of those puzzles where you change one letter at a time to turn one word into another word. Except its with words. Not really poetry - I think somebody noticed that the collated lists of derived sentences resembled some kind of free verse, and said "Hey! Its writing poetry!"</comment>


To show how easy it is for plagiarized news sites to get ad revenue, I made one - <AUTHOR> https://www.cnbc.com/2020/05/17/broken-internet-ad-system-makes-it-easy-to-earn-money-with-plagiarism.html <comment><USER2> Don't mean to be snarky, but this is _not_ how easy it is to get ad revenue. It's how easy it is to get approved for ad networks. She didn't even get adsense. I find it completely unremarkable that anyone could set up a non- adult site that has human generated content and get ads placed. The traffic needed for real ad revenue is a different story. I bet that site gets close to zero traffic (not even enough to cover hosting). SEO (black-hat or whatever) is the trick IMO not getting ad revenue. Plagiarized new domains get no weight in the Google engine.

<comment><USER3> Honestly, it'd be pretty interesting to see an article like this which continues after the 'approved for ad networks' part and shows how such a site could rank in Google, do well on social media sites, etc.

Could be interesting to see how scammers are doing that, and lead to some potentially interesting insights about black hat SEO, social media marketing, targeted ads, etc.

Because yeah, as you said, getting approved by an ad network is only part of the story, and not very much of it at that.

<comment><USER4> It may be a low bar, but being able to automate this (scraping website ansible playbook?), makes the effort required as near-nil. They only have to clear $50 to pay for ALOT of domains and hosting.

<comment><USER5> Sure but you need thousands of legitimate-seeming pageviews to get that $50 back, and the networks - even or especially the bottom tier ones - are likely to be hotter on click fraud than scraped content.

<comment><USER2> You would have to get ~16,000 pageviews to make $50. (assuming $3.00 CPM -- which would be low for adsense, but not for these second tier networks).

<comment><USER6> And 16,000 page views without unique content and links _might_ happen, but most likely not within a year or five.

If you're lucky, you trigger something in Google's black box and they rank your site better than others at the same level, but you'll still only do long tail, and even on long tail, you'll compete with the original source of the article, which has a billion links pointing to its domain. Since you'll also need to go for quantity, you'll have a giant amount of pages as well, which will not help you even with niche rankings.

I doubt that the site would pull in 10 actual, human visitors per day on average with just scraped content.

</comment></comment></comment></comment></comment></comment><comment><USER7> It's a dirty business, no cost is too great for eyeballs.

In Turkish whatever, you search the first few pages of results is from the Turkish largest news outlets because the SEO'ed for everything and Google doesn't care.

Do you want to learn how to renew your driver license? Good luck with that because your search results will bring you a wall of text articles that are almost the same for every search term.

"Lately people started to ask themselves how to renew their driver's license. But do they consider the risks of renewing drivers licenses? Experts agree that renewing the driver's license can be a complicated thing. Now strap on and get ready to learn how to renew your driver's license"

Think to have pages like that on CNN, BBC and others. They are the top result for so many searches.

Plagiarism of news, on the other hand, is more nuanced IMHO. There's nothing stopping you to say "NBC reports that" anyway. As per the article, you can not use their assets but you can create or even generate articles about the news based on the news.

The ad business is dirty. I'm almost proud of blocking ads.

<comment><USER8> In the U.K. it's supermarket opening times, especially near holidays.

Google for "Aldi opening times Easter Sunday" and you'll get articles from the lower quality newspaper websites.

It's pathetic.

<comment><USER7> Oh, definitely. Especially in these pandemic days that was something that I tried and failed. On the Turkish web apparently the news outlets gave up any hope of respect and now every single one of them is doing it. The biggest ones, the leftie ones, the right-wing ones, the cushy with the government ones. All of them.

No way Google isn't aware of this, there's a local Google office in Turkey, they have a large presence and full Turkish language support on most of the products.

Maybe it's simply part of the business model now. If a supermarket wants people to find their opening times, maybe they should buy an ad placement. There's no money in the high-quality organic search results I guess.

<comment><USER9> I'm watching this exact problem for SEO in Turkey and I can say that it was in full-force way before pandemic. Google doesn't care. Instead, they're busy flagging pages discussing "penisilin (penicillin in Turkish) application for kids" as AdSense Policy Violation since the page contains "penis".

</comment></comment></comment></comment><comment><USER10> I suspect one of the hard parts of this for Google is that many news sites legitimately publish the same articles because of wire services and correspondence arrangements, like AP and Reuters. Hard to tell whether the new site is plagiarizing or syndicating.

<comment><USER11> Don't they always include the source as AP or Reuters in the body of text somewhere?

<comment><USER12> You can copy that text too...

</comment></comment></comment><comment><USER13> Doesn't say how much she made from it. Guess: very close to zero, if not zero.

<comment><USER14> Including hosting? I'm sure it's actually in red.

<comment><USER15> If you include the hit to your professional reputation from actually plagiarizing a news site for revenue and getting blacklisted from the industry, then what did it cost? Everything.

<comment><USER16> Or you get placed as a cto with a fat raise.

<comment><USER15> My dream job.

</comment></comment></comment></comment></comment><comment><USER17> i remember in 2004 or so when an agency i worked for had a wikipedia clone running with adsense and tons of SEO which made 20k per month and basically kept the company afloat. I was a young junior dev and while i was impressed by it, it never felt right to me (which it obviously wasn't in many ways). As far as i remember this only worked for about a year at best until Google penalised those sites more and more.

</comment><comment><USER18> Unethical Continuation of This Idea:

Scrape existing news sites, and use machine learning to paraphrase everything so Google doesn't detect plagiarism.

<comment><USER19> US military has already been working on this for ~ a decade. There was a contract out of Redstone Arsenal where they writing "story spinners" to scrape and re-word war-time propaganda.

</comment></comment><comment><USER20> How easy is it to get distribution over social media sites like facebook or Twitter? The distribution costs would be close to zero there right?

</comment><comment><USER21> >"It all underscores the fact that the ad tech space is so convoluted, it's easy to make money from legitimate advertisers just by setting up a web page.

 _That means there's significant incentive to create sites with not just with low-quality clickbait or A.I.-generated nonsense, but sites filled with outright plagiarized content._ "

</comment><comment><USER22> It's really easy to get any content on the internet but really hard to verify if they are plagiarized. Basically anyone can place some ads on their websites, but if the site posts nothing but copied content, I doubt if it will last.

</comment><comment><USER23> > These firms mostly sold "popunder" ads, which pop up a new link in a browser > tab when you click something

Who is buying ads on these networks? There cannot possibly be any returns can there?

<comment><USER24> It might be a "victim filter", some scams are created to avoid wasting time in people smart enough not to fall for the scam in the following steps.

</comment></comment><comment><USER25> We're working on another way for disseminating news. It might make plagiarism a little more difficult, while also working a little better for our audience: [https://blog.nillium.com/what-can-napster-teach-local- news/](https://blog.nillium.com/what-can-napster-teach-local-news/)

<comment><USER23> How does that help prevent plagiarism?

<comment><USER25> Because it isn't full articles -- just updates as they happen coming straight from the newsroom, more like tweets. It's not to say that people can't plagiarize, but it wouldn't be as easy or make as much sense as just copy and pasting an article.

</comment></comment></comment><comment><USER26> OK first try. But needs more work.

Not much proven so far.

Many site _seem_ to translate to language X and back to English to clean the data.

Research this.

Anyone using GANs yet?

How do you stop sites blocking your scraper?

There's money for the ad companies to allow you to plod along then steal your hard earned money because you are breaking the rules. Are they?</comment>


The $3500 Shirt – A History Lesson in Economics - <AUTHOR> http://www.sleuthsayers.org/2013/06/the-3500-shirt-history-lesson-in.html <comment><USER2> I've posted in another thread about this but what interests me primarily is how housing has changed over time.

In 'ancient history', it's fairly well known that people lived in ridiculous conditions, ten to a house and so on.

But what strikes me is that in recent years (say, the last 50 or so), housing has rocketed out of proportion around the Western world whilst other goods have become basically irrelevant.

I could buy 1,000 decent spec laptops for the price of a modest home. Or over a hundred thousand cups of Starbucks coffee. The car I have outside? Sixty of them and I could get a bargain basement flat.

Renting? A brand new Android flagship for the price of a months' rent. An utterly imaginably spectacular device.

I'd much, much rather live in a world in which a laptop was a huge expense that I could only literally afford once every few years, but to be able to afford to put a roof over my head without hustling 8 hours a day.

Will we ever get there?

<comment><USER3> _Will we ever get there?_

At the moment, political and regulatory barriers dwarf technological ones, per Yglesias in _The Rent is too Damn High_ : [http://www.amazon.com/dp/B0078XGJXO](http://www.amazon.com/dp/B0078XGJXO).

In many areas, building with century-old technologies like steel frames and elevators is effectively illegal. Where it isn't illegal, the approval process is often so cumbrous that it substantially raise the price of building: [http://www.theatlantic.com/magazine/archive/2007/11/a-tale-o...](http://www.theatlantic.com/magazine/archive/2007/11/a-tale- of-two-town-houses/306334).

We as a society have chosen to make a lot of housing very expensive.

<comment><USER4> It's a bit juvenile to blame building codes without also admitting why we have them: they save lives. Look at the death tolls of earthquakes that happen in countries with and without enforced building codes.

On the other side of the coin, thanks to deregulation houses are commodities that people buy, sell and trade for profit, which raises their prices and causes volatility in the market.

Is that Atlantic article really comparing the building codes of Dallas and L.A. without admitting one of those cities has to plan for earthquakes and the other doesn't? And that one of those cities is already too big while the other is looking to grow? Where's L.A. going to get the water for these cheap new housing developments?

TL;DR building codes and growth restrictions are a lot more complicated than some rich people wringing their hands and using regulations to make themselves money.

<comment><USER5> It is more complicated than rich people gaming the system to get richer, but that's definitely part of it, and the generations-long monopoly on land ("ownership", as much as any human can claim that a piece of the earth belongs to them and them alone) enables basically unlimited rent-seeking priced at whatever the market will bear.

[http://m.sfgate.com/homeandgarden/article/What-San- Francisco...](http://m.sfgate.com/homeandgarden/article/What-San-Francisco- didn-t-learn-from-the-06-quake-2520018.php) goes into what happens to building codes after e.g. an earthquake. TL;DR not much, and I'm sure SF will get absolutely wrecked in the next "big one", people will die because stuff is old and not up to code, there will be public outcry for safer buildings, developers will lobby against it and basically do anything they can to continue to slap apartments up as cheaply as possible while charging $3000/mo for a 500sqft studio, and they'll build even-more-expensive yet not much safer buildings in the ruins. Then repeat.

<comment><USER6> > developers will lobby against it

Eh. I don't believe this is true. For example, in the Great San Francisco earthquake, something like 90% of the damage was caused by fires. Most of these fires were and are caused by unsecured water heaters, rigid gas connections, etc. There are now building codes that improve on these issues -- all water heaters are now strapped, gas connections are flexible, etc. Among other protections that I know of, shear walls are mandated in certain cases, engineering reviews are done, houses are bolted to foundations at more regular intervals, the proportion of various walls that are windows is more limited, etc.

Yes, regulations were slackened in 1906, but

1\. Earthquakes between 1906 and now show that regulations DO tighten over time. If developers are trying to lobby against these, they are failing. (More likely, the property owners paying the developers are the ones who would lobby. It benefits the contractor to charge for more work.)

2\. Even if we didn't have historical evidence to discount your position, the resources available to the people of that time and the people of our current time are not remotely comparable. Our capabilities for manufacturing and building are dramatically more vast.

More on the evolution of these codes, which further contradicts your view that developers have been able to prevent their strengthening: [http://quake06.stanford.edu/centennial/tour/stop10.html](http://quake06.stanford.edu/centennial/tour/stop10.html)

<comment><USER7> 75% of all SF housing units are over 50 years old. Source: [http://www.sf- planning.org/ftp/general_plan/Housing_Element_...](http://www.sf- planning.org/ftp/general_plan/Housing_Element_Part_I_Data_Needs_Assmt_CPC_Adopted.pdf) So the technlogical improvements in earthquake safety since the 1960s are simply irrelevant for most residents. They're living an ancient, unsafe homes.

What ought to happen is proposition 13 ought to be repealed, along with the restrictive zoning laws. Then people who are sitting on lots of undeveloped property would have to sell it to developers, because the taxes would be unaffordable otherwise. And developers would put up new properties. Prices would then come back to earth and poor people would be able to live in houses again.

But the prevailing mentality in the US is that houses are investments, not places to live, so don't expect this to happen any time soon. Instead, you can expect politicians to intervene if housing starts to become affordable again, like they did in 2007. ("Oh no! Housing prices DECLINED!") It's basically a giant transfer of wealth from the young to the old. But people are too ignorant of economics to understand how and why it's happening, so you can expect it to continue.

<comment><USER8> "So the technlogical improvements in earthquake safety since the 1960s are simply irrelevant for most residents. They're living an ancient, unsafe homes."

That's a nice theory, but it's wrong. The city is requiring buildings to get retrofitted with earthquake safe structural foundations. It's every building with greater than a few units, so the rather small 100+ year old Victorian I'm in will be required to go undergo retrofitting by 2017.

<comment><USER9> Do you have a link for that? I follow this kind of thing pretty closely and haven't heard anything like that, at least for private residences.

<comment><USER8> Here ya go: [http://sfdbi.org/mandatory-soft-story- program](http://sfdbi.org/mandatory-soft-story-program)

P.S. Thanks for all the good work you did at Reddit.

<comment><USER9> Oh, I missed where you mentioned this only applies to buildings with a minimum number of units -- I thought you meant there was a program that applied to single-family homes.

Re: reddit, pshaw, I was only there two and a half years. :) Most of the hard work was done before I showed up and after I left.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> The sewing machine changed the world. I took a sewing class a few months ago, and the instructor was very clear that before that machine was invented, women would spend a significant portion of their time making clothing and other textile items by hand, needle, and thimble. The sewing machine is a classic example of how technology can fundamentally disrupt society by removing manual tedium. All of us here on Hacker News can be inspired by this seemingly minor piece of history. It's what we should strive for in our work.

<comment><USER11> > The sewing machine is a classic example of how technology can fundamentally > disrupt society by removing manual tedium. All of us here on Hacker News can > be inspired by this seemingly minor piece of history. It's what we should > strive for in our work.

The sewing machine shifted the tedium of manual pabor from most people onto a much smaller number of very poor people who now work in conditions which are illegal over here (and often illegal where they are too) for very little money.

When I buy a shirt I don't know if it's expensive because a fair proportion of the price is being paid to the people making it, or if someone near the sales end of the chain has "added value" and is taking increased profit.

I don't find it inspiring. I guess I should be considering what these people would have instead - looming carpets by hand perhaps, which would be worse.

I would really like to know that the £47 ($70) shirt I buy isn't exploiting the very poor.

<comment><USER12> People who work in sweat shops would usually have much worse conditions to live in if they didn't work in a sweat shop. They'd be probably trying to pick things out of garbage dumps.

<comment><USER13> A lot of people around here seem to think "economically rational" is the same thing as "ethical". In a lot of places and times in the world (including US cities in the early 20th century), due to crushing poverty and a glut of labor it has been economically rational for people to accept work in factories with horrific working conditions for wages that will barely feed them. That includes where they're physically locked into massively unsafe buildings. Such as the Triangle Shirtwaist Factory. That doesn't make the practice of offering jobs in such conditions ethical.

<comment><USER14> "Ethical" in these situations aren't black and white objective affairs. The relevant metric is that whether pushing the levers we have available to us as consumers, even policy makers, in the rich west, affects a _more or less ethical_ outcome in the end.

We emphatically do not have the tools in our possession to make billions of people in south east Asia rich enough and educated enough in one stroke to avoid the situation you're describing ("crushing poverty and a glut of labor"). The one tool we do have to affect such an outcome, although slower than is desirable, is trade - and revoking that trade is pretty much the only lever we have to push, and the outcome for these people will be drastically worse.

That doesn't mean that there can't exist actions that businesses and individuals could and should take to improve matters, but step 0 is realising that those are drops on the ocean: We're not going to fix this wholesale, except by trading as much as possible.

<comment><USER13> By no means would I suggest cutting off trade as the solution to these problems (not sure why you jumped to that particular idea). Just saying that we shouldn't be _satisfied_ with having our clothes and electronics made in death-trap sweatshops or factories where they're exposed to toxic chemicals (or any number of other ethical violations related to hours worked, overtime pay, or even freedom to leave) just because sweatshops are better places to make a living than trash heaps.

That's not the only choice available. We can still pressure brands to pressure factories to provide humane and safe working conditions, and hell - is it too much to ask for brands themselves (and the purported human beings working there) to make ethical choices without threat of bad press?

</comment></comment></comment></comment></comment></comment><comment><USER15> One important fact to take into account is that the cost of labor in the middle ages cannot really be compared to today's minimum wage. The calculation based on $7.25 an hour, coming to $3500, is a bit of a hyperbole [1].

In fact, even today in many places in the world (India and Africa come to mind), artisans still produce fabrics, clothes and other low-tech products by hand for way less than American minimum wage [2].

I'm not a historian by any means, but it is my understanding that before the industrial revolution the major cost of production was the cost of materials, and the cost of labor was marginal. Contrast this with modern production, which is continually occupied with reducing the cost of labor, either by automation or by offshoring to third-world countries.

[1] Of course, any kind of cost comparison across 8 centuries is suspect. A quick search produced this: [http://faculty.goucher.edu/eng240/medieval_prices.html](http://faculty.goucher.edu/eng240/medieval_prices.html)

A peasant's linen chemise is listed as costing 8d in 1313, which is equivalent in purchasing power to anywhere between GBP 22.30 to 5970, depending on the index, according to this:

[http://www.measuringworth.com/ukcompare/result.php?year_sour...](http://www.measuringworth.com/ukcompare/result.php?year_source=1313&amount=0.03333333333333333&year_result=2015)

[2] [http://www.bls.gov/fls/](http://www.bls.gov/fls/) shows cost of labor for different countries in recent years. According to the site the average hourly compensation in India in 2010 was $1.46.

<comment><USER16> It doesn't matter whether $7.25 is hyperbole. What matters is whether or not 479 hours is hyperbole.

Let's see. IRL, I own around ten t-shirts, and they seem to wear out in 2-4 years, so let's say around 100 wearings. I'll stretch that out to 730 wearings, because I'm "wearing it until it disintegrates".

I'll hope to buy a shirt on odd-numbered years, and new pants on even-numbered years. I won't buy any other cloth goods.

If I work 40 hour weeks, I have 2080 hours of labour in a year.

Suppose I am equally economically valuable to a spinner, such that I can trade one hour of my productivity for one hour of theirs.

If I need a new 479-hour garment every year, then I need to allocate nearly a quarter of my life to buying clothes, even though I wear clothes until they disintegrate, and only own one shirt and one pair of pants. That is fantastically expensive.

<comment><USER17> Your shirts wear out much faster then theirs. The fabric is much thinner for one, and you wash (and worse tumble dry) it often.

Your calculation of 40 hour weeks is quite wrong. 100 hour weeks were completely normal back then.

So it took a month to make a shirt, and it should expect to last 10 years or so.

The Talmud says that a poor person had a budget of 50 zuz per year per person for adult clothing (not including shoes). Someone calculated based on the price of bread that 50zuz is equivalent to $166. Other calculations find 50zuz to be $1000.

One zuz was the average daily wage for an unskilled worker. So it would take you about a month and a half to get clothing.

<comment><USER16> I agree that 40 hour weeks was silly. ;) 100 hour weeks are also silly, however, especially when you consider the religious proscriptions against working on the Sabbath. 100 hour weeks is almost 17 hours a day (six days), leaving 7 hours for all sleep, eating, hygiene, recreating, family care, etc. Pretty much physically impossible. Also, as I understand it (though I am no expert), accounts of medieval life show that aside from sowing season and reaping season (when everyone DID work 100-hour weeks for very short periods), there was lots of leisure time. Let's compromise at 60-80 hour weeks.

I also agree with your points about my shirts (thin and tumble-dried). On the other hand, my shirts are woven/knitted from a very consistent fabric, which might help, and they're exposed to very little mechanical abuse outside of the dryer (I do not do physical labour, I'm very sessile, and for that matter I don't get much acidic sweat on them). And my shirts _are_ usually showing multiple (small) holes after those ~100 days of wear. You really think their shirts would last 3650 wearings, 36 times as much as my shirts? Thirty six times? Nonsense. My 7x might be low, but I bet it's closer than your 36x.

Also, as I mention in a cousin-post, I think the author screwed up her math twice, such that I think the correct number given her inputs is 879 hours, which I'm gonna call 10-15 weeks of labour. And then once we account for other clothing, as I did in my previous comment, by assuming that all non-shirt garments collectively are as expensive as one shirt, we're up to perhaps 25 weeks of labour total.

So it takes four months to make a set of clothes, and the set lasts a few years. So I'm no longer saying "one quarter of your life", I'm saying "more than ten percent". When you wear your clothes until they fall off you.

The Talmud reference is very interesting. You say 50 workdays (that's 8 weeks... you agree that the people referenced in the Talmud didn't work the Sabbath, right?) for 52 weeks of clothing, which is one sixth of one's life.

Sounds like our estimates agree.

<comment><USER17> Yah, we do mostly agree.

A few points:

I've worn shirts for longer than 100 days with no holes. T-shirts are very thin and don't last. Thicker fabric lasts exponentially longer, not just a bit longer. And the dryer is really hard on fabric.

I stand by my 10 year guess-timate - especially when you include repair.

I don't think there was ever any real leisure time. Instead it was low-energy time. For things like spinning and making cloth, but not hard work. So 90 hours a week might actually be right. (100 was too high.)

The Talmud numbers are for a poor person, not an average person. Those are the numbers below which someone should get social help. Most people would spend more I think.

The 1 zuz a day is income from outside work. A person would also work at home, so their income could be another 50% on top of that (not as money but as made at home goods). I assume the 1 zuz a day is for the poor person, not the average.

I do wonder if other people worked 7 days a week, and the Tamlud figures are not representative of the majority.

</comment></comment></comment></comment></comment><comment><USER18> Puts the 'are computers going to drive as all into unemployment' debate in perspective. A 1,000 fold reduction in input costs has predated us, and the economic results speak for themselves. What's another 10x reduction compared to that?

Taking 500 hours (30,000 minutes) of labor to make a _shirt_ (and that's just counting the final steps of production) and making it 30 minutes (if that), for production of 1 billion shirts, turns what would have been full-time employment for 240 million people into full-time employment for 240,000. (Typing on a phone, no pen handy, need to double check that)

What's super cool is from our perspective on the curve, no matter how far we've gone, a 99.99% reduction already, there's still always another 50% we can remove in labor costs.

Will _true_ perfect AI let you jump the asymptote to absolute zero labor costs? Then our creation will have surpassed us and made us like mice are to humans today. Squeak!

The other really interesting subtext is the incredible input cost constraining production and mandating complete use and recycling. No such thing as a landfill when the inputs are precious even after being "worn to threads"!

<comment><USER19> The transition was pretty gruesome, so your analogy is not all that reassuring. Nobody thinks we will all die, just that a lot of us will be very poor.

<comment><USER18> I have the complete opposite interpretation. Life before was gruesome and today we live in a world of relative _plenty_ if not obvious _excess_. Reduction of input costs makes us more wealthy not less. How many shirts do you own? How long do you work to afford a lavish bowl of berries and cream?

<comment><USER20> Not everyone lives your lifestyle. Most of the people who manufacturer your stuff are very poor and live in Asia.

<comment><USER21> And yet even most of them are probably better off than the average middle-age peasant.

</comment></comment></comment></comment></comment><comment><USER22> Fascinating article. While the concept of a "real" dollar is a leaky abstraction (hence the constant bickering about how the price indices that determine pensions etc. should be calculated), it still is a striking way to demonstrate how the relative prices of things have changed over time.

</comment><comment><USER23> This is all well known stuff. But I am glad people are writing about it. Sometimes people seem to worship the past without realizing the incredible poverty people lived in back in the day.

Also, I like the jpeg of the black mask mag featuring the Maltese Falcon at the end. The best american modern literature is pulp fiction.

</comment><comment><USER24> > Oh, and in the middle ages, it would be expected that all of the inside > sleeves would be finished.

What does this mean, that the "inside sleeves" be "finished"? And is an "inside sleeve" different from an "outside sleeve"?

</comment><comment><USER25> I think he's underestimating the yarn production rate for a drop spindle. But it's quite correct that textiles were incredibly expensive before machine production. Textile machinery launched the Industrial Revolution.

As for why textiles are so cheap now, search for "jet loom".

<comment><USER26> just looked at toyota jetloom video on youtube. That was an eyeopener.

</comment></comment><comment><USER27> This article shows the true value of innovation over time in saving time, money, and effort.

</comment><comment><USER28> I think the article is incorrect in saying _". A shirt like this [...] would be a fine weave"_

If it really took a quarter of a year to make a fine-woven shirt, poor people wouldn't have worn fine-woven clothing. It's too expensive, firstly to make, secondly because it doesn't last as long, and thirdly because it isn't warm enough in the cold months (for poor people that could easily be more than half the year. They wouldn't have glass in their window frames, and would have little in the form of heating)

</comment><comment><USER29> Might be slightly tangential, but reading the post reminded me of Rational Optimist[1], a book about how key parameters of our lives are improving despite constant global pessimism. (e.g. Food availability, income, and life span are up; disease, child mortality, and violence are down)

[1][http://www.amazon.com/Rational-Optimist-How-Prosperity- Evolv...](http://www.amazon.com/Rational-Optimist-How-Prosperity-Evolves- ebook/dp/B003QP4BJM/ref=sr_1_1)

</comment><comment><USER30> I agree that we in most of the western world generally are awash in things and that we all are "ungrateful bastards" (wording mine).

But then the author goes on about how time it would take to make a shirt in the medieval age and then calculates the cost using today's minimum wage. That make no sense at all, and dies give us any information.

Maybe compare it to price of a loaf of bread back then, that would give us an idea. Then we'd have singing to go by.

<comment><USER31> Loaf of bread? Grind the wheat using a hand mill or mortar/pestle, mix ingredients, knead, rise, bake. Doing it all low tech, takes about two hours of work: price at least $14.50 per loaf on labor alone.

</comment></comment><comment><USER32> >That's why single women were called "spinsters" \- spinning thread was their primary job.

Quite a revelation for me. Very interesting read.

</comment><comment><USER19> I was expecting another story on Bitcoin :-) But this is great, too.

</comment><comment><USER33> Good clothing is still surprisingly expensive relative to other goods. You can get a perfectly good new mini-fridge or microwave oven for $100. A pair of jeans that will last heavy usage for three years is over $100. I find that confusing. I would expect the mini-fridge and microwave oven to be many times the price of a pair of blue jeans.

<comment><USER34> Where are you buying your jeans? I live on a farm. A pair of jeans that will last under heavy usage is about $30 at Tractor Supply.

<comment><USER33> Non-selvedge denim will begin fraying badly at the cuffs and probably have holes in the crotch in well under a year of daily three mile walking, nevermind more active wear. Any selvedge denim jeans cost over $100. Sitting on a tractor or on various other farm machinery is not heavy wear.

<comment><USER35> I manufacture jeans, and this is misleading.

The strength of any textile (knit or woven) is a first a function of the yarn and then of the structure. Any heavy twill that remains unwashed for long periods of time (as all "selvedge purists" seem to do) will last longer than a pair of cheap jeans that get tumble-dryed twice a week.

Please stop perpetrating this myth that selvedge denim is somehow inherently stronger or better than regular denim. It should be indicative that most people need to turn the cuff of a pair of selvedge jeans to look for the actual selvedge before they know for certain.

To your original point that you find it confusing that apparel is expensive relative to other goods, it's probably because retail margins are disproportionate to the amount of cost it takes to sell garments for a list of reasons out of the scope of a Hacker News comment. Apparel is, at the point of sale out the door of a manufacturer, cheaper than it has probably ever been today. The amount of processes involved between planting a cotton seed and loading a container of packed garments is absolutely awe-inspiring in scope, and the fact that a pair of jeans is billed by a manufacturer at ~>$10 is crazy.

<comment><USER36> > _retail margins are disproportionate to the amount of cost it takes to sell > garments for a list of reasons out of the scope of a Hacker News comment_

I think it's perfectly appropriate for HN. Do tell us your thinking about why apparel is expensive relative to other goods. I've wondered this myself.

<comment><USER35> The emphasis of the scope was the word "comment" and not "Hacker News"; i.e., it's a lot to cram into a comment. Here are a handful of thoughts:

In a nutshell, I think apparel is too cheap, but raising prices isn't the solution because of the bargain-hunting and markdown pricing expectations that consumers have that is moving its way further upmarket every year. Brands are scared to raise a penny on their prices, and are right to be fearful because consumers don't have loyalty. While manufacturers are living on terrible margins, retailers (who get decent margins) have to deal with the ridiculous cost of retail real estate and stock write downs, which means that the only person who really wins is the importer (in cases when the importer exists) and the consumer. The importer can also lose this game if they work on a replenishment basis (double storage cost there if you're following along).

Plenty of other reasons exist. If we use the earlier example of a refrigerator, then things like automation come into the picture. The apparel industry, for the most part, is not really automated. I've seen TV manufacturing facilities, and they are so alarmingly automated it seems fake at first glance. Even then, companies like Sony have lost money every year for decades selling TV because the rest of the business can sustain huge losses so Sony can have their logo staring at you every day of the week in your living room. Apparel businesses don't have that kind of luxury because most are not small hobby businesses of a larger conglomerate.

Then there are lots of political issues such as the United States customs policies. FTA like CAFTA/NAFTA, AGUA, special treaties like the ones with Jordan are all affecting apparel. Do you know a synthetic garment from a country like Sri Lanka (lots of, for example, Nike production happens there, so think about an athletic garment from them) will be imported at a 32% duty rate?

"Fast fashion", which today basically means very cleverly convincing consumers to buy more clothes means the SKUs have gone up for manufacturers, but since nobody really gets paid anymore the margins get shrunk because of a loss of economies of scale right from the start of the value chain until things are put on retail shelves.

Etc. etc.

TL;DR Apparel costs about what it should, if we assume it should be a reasonably low-margin, high-risk business. Comparing it to the lower-margin, higher-risk electronics industry is not an easy comparison because of how different the businesses are.</comment></comment></comment></comment></comment></comment>


ELF101 a Linux executable walkthrough - <AUTHOR> https://code.google.com/p/corkami/wiki/ELF101 <comment><USER2> A good intro but doesn't go in depth enough, and it glosses over the interface between user and kernel mode.

Particularly, in modern Linux binaries, syscalls are not hardcoded as int instructions, but are dynamically mapped via a "virtual DSO" mechanism to the best instruction for the current architecture (int 80, or syscall/sysenter).

Also, in practice, the ELF would be dynamically linking to libc, and libc would be making the calls.

<comment><AUTHOR> An introduction on a single page can't go deep!

"This is the whole file, however, most ELF files contain many more elements. Explanations are simplified, for conciseness."

</comment></comment><comment><USER3> United857 is right. This totally gives a false impression that regular C code I write will use syscall instead of functions that exist in libc that are dynamically mapped in using the plt. My C code will never say int 0x80

Otherwise this I'd quite good. Helps people make the connection between Hello World in rodata and how it gets used

<comment><USER4> I just verified you are right in most cases it won't use int 0x80.

sample C code where you would expect to see int 0x80: #include <stdio.h>

void main(int argc, char __argv) { char _name[2]; name[0] = "/bin/sh"; name[1] = NULL; execve(name[0], name, NULL); exit(0);

}

when you build it and then use objdump -D: the relevant code is as follows: 8048419: 8d 54 24 18 lea 0x18(%esp),%edx 804841d: 89 54 24 04 mov %edx,0x4(%esp) 8048421: 89 04 24 mov %eax,(%esp) 8048424: e8 eb fe ff ff call 8048314 <execve@plt> 8048429: c7 04 24 00 00 00 00 movl $0x0,(%esp)

But if you use something that executes a payload it uses int 0x80.

Sample C code :

#include <unistd.h>

char shellcode[] = "\x31\xc0\xb0\x46\x31\xdb\x31\xc9\xcd\x80\xeb\x16" "\x5b\x31\xc0\x88\x43\x07\x89\x5b\x08\x89\x43\x0c" "\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c\xcd\x80\xe8\xe5" "\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x4e\x41" "\x41\x41\x41\x42\x42\x42\x42";

int main () {

int (_func)();

func = (int ( _)()) shellcode;

(int)(_func)(); }

objdump -D will give you that: 0804a040 <shellcode>: 804a040: 31 c0 xor %eax,%eax 804a042: b0 46 mov $0x46,%al 804a044: 31 db xor %ebx,%ebx 804a046: 31 c9 xor %ecx,%ecx 804a048: cd 80 int $0x80 804a04a: eb 16 jmp 804a062 <shellcode+0x22> 804a04c: 5b pop %ebx 804a04d: 31 c0 xor %eax,%eax 804a04f: 88 43 07 mov %al,0x7(%ebx) 804a052: 89 5b 08 mov %ebx,0x8(%ebx) 804a055: 89 43 0c mov %eax,0xc(%ebx) 804a058: b0 0b mov $0xb,%al 804a05a: 8d 4b 08 lea 0x8(%ebx),%ecx 804a05d: 8d 53 0c lea 0xc(%ebx),%edx 804a060: cd 80 int $0x80 804a062: e8 e5 ff ff ff call 804a04c <shellcode+0xc>

I guess you can force it, but in general the compiler will replace it with calls to libs.

<comment><USER3> Yeah you can force it if you call shellcode as a function but other than that, libc functions, if the elf is dynamically linked, will be mapped in using the procedure linkage table before main runs

but...this is because printf != the write syscall

</comment></comment></comment><comment><USER5> Very nice, too bad there are a few typos. For example, the "write" function arguments are not ordered correctly and it's using the wrong line terminator. It should be:

        write(STDOUT, "Hello World!\n", len("Hello World!\n"));

<comment><AUTHOR> thx, will fix it. any other typo ?

<comment><USER6> In code example, the hexdump starts with B9 90 00 00 08, but in the disassembly is listed as 80 00 00 90. I don't think endianness can change 08 to 80.

<comment><AUTHOR> not even German endianness ? ;)

thanks for pointing this out.

</comment></comment></comment></comment><comment><AUTHOR> FYI it's now available in professional-looking version [http://i.imgur.com/m6kL4Lv.png](http://i.imgur.com/m6kL4Lv.png) and booklet [https://speakerdeck.com/ange/elf101-a-linux-executable- walkt...](https://speakerdeck.com/ange/elf101-a-linux-executable-walkthrough) .

</comment><comment><USER7> What does the number 101 refer to? It doesn't seem to be a version number. The diagram nicely expands ELF to Executable and Linkable Format but no explanation of the number.

<comment><AUTHOR> [http://en.wikipedia.org/wiki/101_(term)](http://en.wikipedia.org/wiki/101_\(term\))

</comment></comment><comment><USER8> That mouse-over trick is really annoying.

<comment><USER8> Edit: Apologies it appears to be my browser doing something unexpected. I haven't used this computer in a while.</comment></comment>


Ask HN: How to hire good interns? - <AUTHOR>

Hi,
We are planning to hire few smart interns to work in marketing, copy writing and development tasks.
We cannot pay the market wages. Can we get quality work done?  Please share your experience <comment><USER2> Money is not the only benefits a company can provide. Will they be doing meaingful work? Do you have smart people working at the company already that they can learn from on a daily basis? Are you in a new and exciting industry that interns would find any domain knowledge valuable? Do you have other contacts that would be beneficial for them?

If you can't pay market wages for interns, that's fine. Just know that you will have to compensate them in some other way. And at the very least, cover their housing.

*College student who has does unpaid internships before and still found them satisfying. Also, I am looking for development experience, so please contact me!</comment>


Hands-On NYT Review of Instagram Reels - <AUTHOR> https://www.nytimes.com/2020/08/12/technology/personaltech/tested-facebook-reels-tiktok-clone-dud.html <comment><AUTHOR> The New York Times tried Instagram Reels with instant results...</comment>