Discover a startup every time you open a new tab - <AUTHOR> http://startuptabs.com/

<comment><USER2> The preview doesn't even work in Firefox, which is disappointing.

I love the idea, however, the format doesn't work for me at all. Showing the startup's website takes a long time to load, and it's a bad user experience.

Instead what you want to show people who open a new tab is a standardized UI (I'd go for: the startup name, what is does in one line, one standard-sized image, some text, and a link). If you'd do that, you could _preload_ one or several startups and make those tabs load instantly. That way it's a lot less jarring and distracting for the user.

Also, a Firefox version is a must-have.

<comment><USER3> Yea, I've been wanting to make a firefox version as well but never made a firefox extension before. I'll be working on this next.

Oh yea, I fixed the firefox issue. Was a minor css error regarding 100% height.

Thanks!

<comment><USER3> I also thought about the "title, description, screenshot" approach. But I really wanted startuptabs to be a stage for the startups. My goal is to make it easy for quick feedback from the community. When sites load slow, bad colors, etc... it should become apparent. Or the reverse, when sites load fast and looks great, they will stick out.

<comment><USER2> _> When sites load slow, bad colors, etc... it should become apparent._

It's not only that. When your user opens a new tab, they don't expect a huge marketing website to already be there. It's too disrupting, and in my opinion the overlay element just adds to the clutter.

</comment></comment></comment></comment><comment><USER4> Sounds like a procrastinator's wet dream...

On the opposite end of the spectrum, a minimalist to-do list every time you open a new tab: [https://chrome.google.com/webstore/detail/dayboard-new- tab-p...](https://chrome.google.com/webstore/detail/dayboard-new-tab- page/kimodcegbhclamjcbifgfaldeengbgij)

<comment><USER5> Wow. Did you make this? Put some contact info on your page if so! Implement history and labels and you have me as paying customer. No joke.

<comment><USER6> But it _is_ there! In any case, hi hello. :) I'm working on history -- but Chrome storage only allows me to go back 30 days or so. Maybe 45. Dealbreaker?

</comment></comment></comment><comment><USER7> Am I the only one who thinks this is a bad idea? I open new tabs for a reason - to open another webpage.

This will both annoy me and distract me.

Reading the comments everyone loves the idea and gives basically the same reasons I gave for hating it. Whats wrong with me?

<comment><USER8> AHA! There is a big problem for my usability. I press the tab in chrome to get view my bookmarks and use them. now they are gone ! uninstall !

<comment><USER9> Chrome should fix this. There should be a way to have an app (in a tab) and also to show the bookmarks bar on that one page. Then an option in the app could turn it on and off. Beyond this apps control, probably.

A link isn't enough. I need one click access to my bookmarks.

</comment></comment></comment><comment><USER10> Doesn't appear to work in Firefox, white page with single circular minus symbol in the top left

<comment><USER11> Ditto. Sad to see that FFox isn't the preferred choice of devs.

</comment></comment><comment><USER12> Great idea! Only drawback I'm finding is that I don't want to wait for the page to load, I'm typing my URL and hitting enter before the startup's page has loaded.

Good for wanting to randomly find a startup, but was hoping it'd be a way to discover new startups as part of my daily internet usage. Don't think I'll end up seeing many of the pages this way.

<comment><USER3> Thank! Will be working on speeing up the site loads but it's a bit tricky. Someone else mentioned maybe uses images and preload them. Still thinking about how I should tackle this.

</comment></comment><comment><USER13> That's all I'm getting when clicking on "Try It Out" -

[http://i.imgur.com/Nw1tsAu.png](http://i.imgur.com/Nw1tsAu.png)

<comment><USER3> Fixed! Please try it out again!

</comment></comment><comment><USER14> I always have about:blank as default page in new tabs because anything else is a distraction from my actual intention why I chose to open a new tab. Too often I find myself forgetting what I was actually doing (or parts of it) when a new tab has irrelevant information in it. I could imagine that it's a psychological effect similar to this one: [http://www.scientificamerican.com/article/why-walking- throug...](http://www.scientificamerican.com/article/why-walking-through- doorway-makes-you-forget/)

</comment><comment><USER15> What a great idea that I'll never ever use as it will just kill all productivity :)

Imagine working on a project, need to Google something and suddenly it's 1,5 hours later and you're reading up on some random framework you've never used and certainly don't need for your current project because this cool startup that popped up in your new tab gave you another great idea and and and...

<comment><USER16> So... Hacker News?

</comment></comment><comment><USER17> I love the idea, but I would never get any work done if I would see an interesting startup each time I opened a tab.

<comment><USER3> Haha, I've heard this before. Takes some time getting used to :). I will be working on a history feature soon and should help with this problem.

</comment></comment><comment><USER18> Would be awesome if not for the fact that it displays the extension info in a column on the left for every new tab. Why does it do that? Why isn't there an option to hide that? I added the extension to see the startup pages, not to see the damn column.

<comment><USER3> Ability to hide the column coming soon.

</comment></comment><comment><USER19> Hah, the idea here is kind of cool but watching an unending stream of startup landing pages sounds like a form of torture.

Finally, (solution to problem that doesn't exist) for (people like you/engineers like you) who know (what matters/what counts).

</comment><comment><USER20> Even with only using the preview on their website, Startuptabs provides something interesting: it's a super easy way to page through the websites of random startups. After bouncing through several dozen I see that:

-95% of these are thinly styled Twitter Bootstrap sites with huge hero images.

-Sweet jesus most of these load super slow.

-There are some interesting ideas here, but a whole lot of "[buzz word][buzz word][buzz word][buzz word], for the [buzz word]" copy.

In fact, this is a great way to see how you should change your startup's website so it doesn't sink into all this sameness.

Oh, and perhaps having a 1920x1080 photograph saved as a 1.3 MB+ PNG image as a background is a bad idea too...

<comment><USER3> You're right, Startuptab definietely reveals how you should not create a landing page. After using it for months, "load speed" as google mentioned is one of the most important aspect.

</comment></comment><comment><USER21> Love it! Now all you need is a "Valleywag version" that will show you a random startup that doesn't make any sense (eg. subscription service for coins - basically any startup mentioned on Valleywag, I suppose?)

</comment><comment><USER8> I get this on chrome :

Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: [https://developers.google.com/maps/documentation/javascript/...](https://developers.google.com/maps/documentation/javascript/tutorial#api_key)

<comment><USER3> Hi Blaine,

I'm pretty it's not Startuptabs because we aren't using the maps api. Do you have another extension that is using it?

</comment></comment><comment><USER22> Love it. Works for me in Chrome (Version 35.0.1916.153 to be precise)

Only downside: it's basically the browser equivalent of remembering you have to get your keys from the bedroom, going upstairs to get them, forgetting why you went back to your room in the first place, picking up the copy of Wired on your nightstand, heading out, and getting to the office only to realise you forgot your keys.

</comment><comment><USER23> Quick thing which I think I've noticed is this appearing in the console bar:

"Denying load of chrome- extension://bknfklfehllgmnbmlhejjoalkimnikfc/jquery.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension."

I did get a warning message from Google about your maps dev key not being valid.

<comment><USER3> I'm pretty sure that is not from Startuptabs. That library is not used ... Perhaps another extension you have installed?

<comment><USER23> No it's definitely from that extension. Goes away when the extension is disabled. I'm debugging a lot of javascript atm and the console now has that message in it even when testing on localhost. No biggie but does seem a bit odd.

</comment></comment></comment><comment><USER24> Great idea! Just wondering, why does the Chrome extension need to "access my data on all websites" if this only operates when I create a new tab? Also, the StartupTabs sidebar frequently blocked chunks of content for me, and even if I closed it in one tab, the sidebar would reappear as soon as I opened a new tab.

<comment><USER3> Hey, I wasn't sure how I can lessen the permission usage. I've tried removing almost everything in my permission area and it's still says that. I've also checked out many other chrome extensions and this seems to be common. I'll be looking into this more soon.

In regards to the tab, I'll add the feature to remember that you collapsed the tab so it doesn't reappear until you uncollapse it.

</comment></comment><comment><USER25> Good idea, would be nice to have the posibillity to search through all startups you feature. Perhaps on your website...

<comment><USER26> ditto, would be good to have search and a category based browse function.

<comment><USER3> Agreed and is on the roadmap. Search should be pretty easy but categories is a bit more difficult.

</comment></comment></comment><comment><USER27> This [http://poshfeed.com](http://poshfeed.com) uses a similar apparoach (using tabs) but offers curated content instead.

</comment><comment><USER28> Why does opening this make called to [https://spottster.com/](https://spottster.com/)?

</comment><comment><USER29> You stole my idea. Oh well on to another one.

</comment><comment><USER30> Good idea. Takes ages to load though! A screenshot, logo and short description of the startup would be better I think.

</comment><comment><USER31> your requested permissions: read my data on all websites?!! really? No bueno

</comment><comment><USER32> Am I missing something or is this basically a reverse adblock?

</comment><comment><USER33> Thanks for creating this!! I just submitted our startup :)

</comment><comment><USER34> I love the idea

</comment><comment><USER35> Didn't realise there are so much useless startups out there.

</comment><comment><USER36>
        404 Value Proposition Not Found

</comment><comment><USER37> looks inspiring, :)

</comment><comment><USER38> This is a great idea!</comment>


Rails: Capybara 2.0 Upgrade Guide - <AUTHOR> http://techblog.fundinggates.com/blog/2012/08/capybara-2-0-upgrade-guide/

<comment><USER2> Awesome, thanks for sharing. I just added it to <http://coursebacon.com> (a side project of mine).

As a side note, the popularity/ scoring algo will run tonight: [http://coursebacon.com/tutorials/43-capybara-2-0-upgrade- gui...](http://coursebacon.com/tutorials/43-capybara-2-0-upgrade-guide)</comment>


'Their Spirits Were Trapped in Those Masks' - <AUTHOR> https://www.topic.com/their-spirits-were-trapped-in-those-masks <comment><USER2> It doesnt seem as poorly documented as it is made out to be. Perhaps if you compare it with other history in general but when it comes to errasing a people this event is wel documented. We are kinda clueless howmany times we did one of these? If you take basic population growth the numer of dieoffs must be horrific.

</comment><comment><USER3> Thanks for posting that. We should never forget that we attempted genocide against the native americans. We aren't that different today in our attitudes towards muslims, allowing the creation of secret prisons where we tortured people.

<comment><USER4> I have to object to the use of the word "we" to describe the actions of people many generations ago. Basically nobody today would approve of the first case, and proponents of the second case aren't part of the "we" who would be reading this comment.

<comment><USER5> The US federal government continues to violate treaties by providing substandard services to reservations. Additionally, the US continues to steal sacred lands (ie DAPL - the pipeline could easily have been built through a primarily white town with no religious significance to anyone).

US state governments continue to use history textbooks which gloss over the Native American genocide and usually don't mention the 20th century Native American Movement at all.

I think that's enough American institutions continuing the oppression of Native Americans to justify the use of the word "we."

<comment><USER6> As a white man, I also objected to the US invasion of federally protected lands, both because of the legal contract we have with the remaining Native American tribes, and because I believe protecting nature is the highest duty of mankind, and there is not nearly enough profit in the oil industry to justify the rape of the land.

So, lets not try to be reverse racist, okay? This is HN, not reddit.</comment></comment></comment></comment>


How to get a massive discount on college: get married - <AUTHOR> http://www.jefftk.com/p/how-to-get-a-massive-discount-on-college <comment><USER2> Just imagine all the possible hilarious dialogs if you do that, and then meet somebody you actually love andwant to marry. "Technically, I need to divorce first" \-- "technically?" :-)

</comment><comment><USER3> I submitted my 2015-2016 FASFA yesterday. They estimated that my Expected Family Contribution (just me now that I'm 25) was $17,900 based on the $57,000 of taxable income I reported last year. The problem is that the income was from SF and they have no mechanism for adjusting for cost of living. They did ask me how much cash I had in the bank and how much I had in assets, but it didn't seem to affect their estimate. I haven't received the official response yet.

</comment><comment><USER4> They are saying compared to being an dependent on your parents taxes, you are better off being married.

The real alternative is to file as independent. I would want to know if there is still a discount to getting married compared to filing as independent.

<comment><USER5> Filing as an independent doesn't help. I had a friend who was in all ways independent (was basically disowned by her parents) and she couldn't qualify for any FAFSA based aid because she was still required to disclose her parents assets, and her parents refused to sign the forms to do so.

<comment><USER6> This is the biggest problem for many kids. The system assumes parents are willing to pay a "fair share", when many are absolutely not, for any number of reasons. Those kids are penalized and it is completely unfair.

<comment><USER5> This was worse than that: her parent's weren't particularly rich, but she wasn't available for _any_ FAFSA aid, since her parents refused to sign the disclosure forms.

</comment></comment></comment></comment><comment><USER7> Don't forget to choose someone sane, stable, and who has no element of vindictiveness to them. Marrying someone means you are legally bound to them - you get to share responsibility for their debts, and they get to make medical decisions for you.

This marrying trick would probably work for most people, but it has the potential to fail explosively.

<comment><USER8> > they get to make medical decisions for you

At least in MA you can fill out healthcare proxy forms [1] to shift this back to your parents.

[1] [https://en.wikipedia.org/wiki/Health_care_proxy](https://en.wikipedia.org/wiki/Health_care_proxy)

</comment></comment><comment><USER9> Now that same-sex marriage is legal, would that work if two heterosexual people technically marry each other? At least then you don't run the risk of the other party deciding they like this marriage thing and having a very complicated and uncomfortable time trying to disentangle yourself from them.

<comment><USER10> Sure, same as it works if a gay guy and lesbian woman get married for legal reasons now.

</comment></comment><comment><USER11> I'm so tired of the financial benefits that a) married couples, and b) parents, receive. Being married or having children should provide exactly zero financial benefit from governments beyond what bachelors/bachelorettes receive. It makes absolutely no sense that simply hitching yourself to another person or reproducing magically means you get government handouts. Neither of these situations provide substantial benefit to society deserving of special treatment. The discrimination against those of us who remain single is just mind-blowing.

Every adult should have the same government-mandated financial burden and reimbursement cheques in the mail. Why shacking up or pumping out kids gives the adults involved an advantage in their financial livelihoods is ridiculous. :(

<comment><USER12> Married couples have different tax treatments because of community property rules, and because the unit of taxation is the household, rather than the earner. It would be rather regressive to tax a two-person household each earning $25k/yr at the same rate as a single individual making $50k/yr, despite the fact that household income is the same. The intent of the different treatment of married-filing-jointly returns is to attempt to balance the tax paid by married couples so that it's roughly in line with the taxes that would be paid by individuals filing separately. This may result in tax benefits or penalties depending on the earnings status of each of the spouses, but it's hardly an across-the-board. "Tax divorces" are a thing; high-income couples may find it financially advantageous to divorce (even if they continue to live together as a _de facto_ married couple).

As far as kids being an "advantage in their financial livelihoods"...well, yeah, that's just hilarious. Kids are _expensive_. Tax breaks for kids are a progressive measure intended to make it slightly easier to afford to provide for one if you're in the lower echelons of the economy. If you think that anyone is having kids because of the financial advantages they convey, you're high.

Regarding the article, the "financial benefit" isn't from being married, it's from not being a dependent of your parents. There's no married person favoritism at play here; it's simple dependent eligibility status. You can achieve the same thing by being 24 years old, or by being legally emancipated.

<comment><USER13> > It would be rather regressive to tax a two-person household each earning > $25k/yr at the same rate as a single individual making $50k/yr, despite the > fact that household income is the same.

Two individual people earning $25k should pay a lower rate of tax than one individual earning $50k, yes.

But a marriage-based tax break is not the right way to implement this. Tax them individually, just like everyone else, with a progressive tax.

The married couple already have significant financial advantages over the single person: the financial security that comes from having two incomes (or even from having one person managing the household, if that's what you're imagining) is huge.

<comment><USER6> But historically, two income households have not been common. This is a recent (past two generations) turn of events. I agree that a marriage-based tax break may not have been sensible, although now with gay marriage legal nationwide, as long as the government also recognizes civil unions, it may be ok and solve the part of the problem you note.

<comment><USER14> Dual-income families have been the norm for 40 years now, out of the 100 years that the modern income tax has even existed.

</comment></comment></comment></comment></comment><comment><USER15> I did this; it worked.

<comment><USER16> Very nice :)

</comment></comment><comment><USER16> This does not work everywhere - e.g. MIT

Source: I asked the Fin. Aid department

<comment><USER17> As the author states, this hack is for the FAFSA (the free application for federal student aid)... And given that FAFSA is listed on [http://mitadmissions.org/afford/deadlines](http://mitadmissions.org/afford/deadlines) it looks like it would work with MIT.

<comment><USER18> FAFSA is only binding for Department of Education money, which is approximately nothing for a middle-class student at a top-tier school. Most of the reduction off the $60k sticker price comes from university grants, which universities can apportion as they see fit. Many use a combination of the FAFSA, the CSS PROFILE (which is more resistant to asset-hiding), and sometimes proprietary forms.

<comment><USER8> With CSS PROFILE it sounds like it's just that some schools ask for parents information anyway:

        When can a student fill out the PROFILE as an
        independent? A student is considered independent,
        for financial aid consideration, if he or she is
        or has at least one of the following: is at least
        24 years old as of Jan. 1 of the academic year,
        is married, is a graduate or professional student,
        has a legal dependent other than a spouse, is a
        veteran of the U.S. Armed Forces, or is an orphan
        or ward of the court (or was a ward of the court
        until age 18). If not, the student is considered
        dependent. A parent refusing to provide support
        for his or her child's education is not sufficient
        for the child to be declared independent.

        Financial aid eligibility is, in part, determined
        by a student's dependency status. Independent
        students are treated differently from students
        who are dependent on their parents. However, some
        schools and programs require parental information
        on the PROFILE even if the student is considered
        independent based on the criteria above.

[https://secure- media.collegeboard.org/CollegePlanning/media/...](https://secure- media.collegeboard.org/CollegePlanning/media/pdf/profile-webinar-faqs.pdf)

</comment></comment></comment></comment><comment><USER19> This is relatively common in the military where being married bumps up your salary and gives your spouse free health care. One young lady I knew had her husband take out credit cards in her name. Also, IANAL, but prenups hold different weight in different states, no?

<comment><USER20> In the military, getting married to get paid more or to get off-base housing (a "sham" marriage) will get you jailed and dishonorably discharged. The housing allowance gained through the sham marriage is technically larceny -- it's a stolen benefit. [1] [2]

I would not be surprised if college kids in a sham marriage to gain financial aid could be charged with larceny of the financial aid.

Another, less felonious option, is to simply wait until you're 24 to start going to college full-time. Spend a few years going on some ridiculously interesting adventures, and another few years trying out various jobs, and you go to college as a mature adult with some actual life experience and a better idea of how you want to spend your life? I'm surprised it's not much more common. I guess if the cutoff was 21 and not 24 it would be an obvious choice, 6 years only works if you can actually start working in your industry of choice before getting the degree.

[1] - [http://archive.armytimes.com/article/20121024/NEWS/210240319...](http://archive.armytimes.com/article/20121024/NEWS/210240319/Ex- GI-s-conviction-spotlights-sham-marriages)

[2] - afcca.law.af.mil/content/afcca_opinions/cp/hall-38241_pub.pdf

<comment><USER21> The military might have some luck with such regulations, but I doubt civilian bureaucracy even pretends to care as long as the marriage actually exists on paper. It's just not enforceable.

</comment></comment></comment><comment><USER22> I'm going to go out on a limb here and say that this idea isn't going to catch on. Sorry.

<comment><USER23> It's quite a small amount of effort for quite a large gain. The ROI seems near-certain, if the article is correct.

It may not become the norm, but if the loophole works, there's probably already some people who are doing this.

<comment> 0x5f3759df-i Especially with the supreme court ruling on gay marriage makes the barrier to this even smaller.

<comment><USER24> Thats exactly what I was thinking after reading this article. If you don't want to make it awkward to explain to your future wife who this girl that you married 10 years ago is, just marry a guy instead.

</comment></comment></comment></comment><comment><USER25> Don't forget same-sex marriage is now a thing too, if you have trouble finding friendly members of the opposite sex.

</comment><comment><USER26> Wow, this could get sketchy like those mail-order brides from Asia or Eastern Europe if people were to abuse this

</comment><comment><USER27> This would probably work, but at the same time, is also incredibly depressing.

<comment><USER28> I'm not depressed by it, but I think it verges on silly that such a loophole exists. Marriages of convenience have been happening for a very long time. There is at least one really weird one that's been in the news for the past few months...

It's sort of like taxation. Any system of nontrivial complexity can be gamed.

</comment></comment><comment><USER29> This is easier than going to Germany and learning German.

</comment><comment><USER30> Would this work in other countries? For example the UK?

<comment><USER31> I believe Student Finance ask whether or not you're financially dependent/ living with your parents, so I'd guess not.

</comment></comment><comment><USER32> what if i am gay ~>:C .... OH WAIT!!!!!!!!!!!!!

</comment><comment><USER33> What if I'am widowed?

<comment><USER10> Remarry, duh.</comment></comment>


Google-Backed Asteroid Mining Venture Attracts Billionaires - <AUTHOR> http://www.bloomberg.com/news/2012-08-06/google-backed-asteroid-mining-venture-adds-billionaire-investors.html

<comment><USER2> I don't know what other demographic asteroid mining could possibly target.</comment>


Project: A Simple Operating System - <AUTHOR> http://www.cse.unsw.edu.au/~cs9242/14/project/index.shtml#project-a-simple-operating-system <comment><USER2> This is considered the hardest computing course at UNSW (with the possible exception of the security course). It has a reputation for being brutal and breaking lesser people. 'Survivors' get a t-shirt proclaiming this fact.

<comment><USER3> Do you think this is an effective teaching style?

<comment><USER4> To be clear, the reason it is hard is the grueling pace of the project.

And to be honest, most of the individual tasks were not hard since this was a follow on to another OS course, but Milestone 6 was where shit really hit the fan for me when we needed to implement on-demand paging, and everything was easy enough in user space (catch fault, get the page from disk, map it into memory, restart the thread), but dealing with paging in an event-based kernel where you can't take a fault was pretty painful (where syscalls had a memory component) and resulted in some ghetto memory pinning.

So while this course wasn't really covering much new ground compared to the OS course we had already taken (I do recall some new material about how caches work and when you need to flush them, but not a lot else), the experience is definitely seared into my memory and I remember the details of that project like no other.

EDIT: To be clear, the lectures had a lot of new material, but it was not in the project, and .: not really tested. It did teach us about how things like VMs work.

</comment></comment></comment><comment><USER5> The OS class I took at UC Berkeley (back in 2010) was in Java, which sucked all the fun out of it. Seeing other universities' OS courses always makes me feel a little jealous.

<comment><USER6> How can an OS be written in Java? The only experiment into this direction that I know of is Jnode ([http://www.jnode.org/](http://www.jnode.org/)), which is not really mature and half-dead.

<comment><USER5> It ran user programs on a virtual CPU, also written in Java. Syscalls and page faults would call out to your code, which ran in the same JVM as the virtual CPU. You can read more about it here: [http://www.cs.berkeley.edu/~kubitron/courses/cs162-F05/Nacho...](http://www.cs.berkeley.edu/~kubitron/courses/cs162-F05/Nachos/walk/walk.html)

</comment></comment></comment><comment><USER7> [http://gernot-heiser.org/OSHoF/](http://gernot-heiser.org/OSHoF/)

</comment><comment><USER8> Makes me want to be in school again. Wait... haven't finished grad school yet. Damn.

</comment><comment><USER9> I recorded a video of the swap test and executing some programs on our implementation of SOS. The microphone is broken badly.. [https://www.youtube.com/watch?v=4iH15NIizc4](https://www.youtube.com/watch?v=4iH15NIizc4)

This is connected over Ethernet and serial to a Sabre Lite Mx6: [http://www.element14.com/community/community/designcenter/si...](http://www.element14.com/community/community/designcenter/single- board-computers/sabrelite/)

</comment><comment><USER10> Doesn't every university have an OS class like this? Stanford has Pintos, Purdue has Xinu, CMU has their own and so on. Infact, this seems a lot simpler (which is probably good) than Xinu.

<comment><AUTHOR> not much familiar with xinu, but this course mainly uses seL4 which is a completely different breed than pintos, xv6 etc.

</comment></comment><comment><USER11> And now I remember why I'm glad I'm not in school anymore...

<comment><USER12> It makes me really want to go back to school.

</comment></comment><comment><USER13> This looks really fun and reminds me of my time studying Mech Eng where we got given big group design projects. Those were lots of late/unending nights and long days in labs but honestly it's those times with good friends hammering through tough work like this that stick in my mind as the best part about uni.

Well, that and the pub. But it ranks up there!

</comment><comment><USER14> This was hands down my favorite course at UNSW.

</comment><comment><USER15> There's a similar class at UIUC that all computer engineering undergrads have to take. [https://courses.engr.illinois.edu/ece391/assignments/mp/mp3/...](https://courses.engr.illinois.edu/ece391/assignments/mp/mp3/mp3_sp15.pdf)

</comment><comment><USER16> I'm a victorian (UniMelb) who has moved to Sydney fairly recently. What are the good meetups in Sydney for recent CompSci graduates?

<comment><USER17> Specifically, I've been to a few of the Functional Programming meetups- they've been good so far. UNSW and USYD are hubs for the CS community in general. As a UTS grad, there wasn't much but Business Analysis going on there.

Generally, recommendation would be to pick a few topics that you're interested and find related communities and meetups. You'll find interesting people through osmosis.

</comment></comment><comment><USER18> Looks great - would love to see the results of some of the students.

</comment><comment><USER19> It does not look like the source code is available?

<comment><USER20> This is an assignment for a university course.

<comment><USER19> It has a supporting code with headers and build helpers

</comment></comment></comment><comment><USER21> Looks nice, great project

</comment><comment><USER22> I never got a chance to take the Systems Programming or OS Dev courses while in school- does anyone know of any online courses (or textbooks) that, by the end of it, will have you with a working toy OS through the exercises?

<comment><USER23> What is stopping you from doing this course project right now? Not meant as a criticism.

<comment><USER24> Before jumping to the exercise/project/exam parts, you need to study the theory, no? Unfortunately, lecture videos are password protected - only for UNSW associated persons...

<comment><USER25> If only somebody reading this had said password and was willing to share it.... (anybody?)</comment></comment></comment></comment>


Ants build complex structures with a few simple rules (2014) - <AUTHOR> https://www.quantamagazine.org/20140409-the-remarkable-self-organization-of-ants/ <comment><USER2> the part that got me was how they froze the ant raft to model it in a computer. wonder how they made the freezing happen

</comment><comment><USER3> Wolfram's ego ++</comment>


Math Counterexamples – Mathematical exceptions to the rules or intuition - <AUTHOR> http://www.mathcounterexamples.net/ <comment><USER2> Cool website, at least for the ones I know enough to understand.</comment>


Why I Started A Startup? - <AUTHOR>

<comment><AUTHOR> First of this is not about Hacking or web2.0. This is about why I decided to have a startup. You don't have to read.But if you do, thanks for your time.

For a long time I thought I wanted to have my own business. I starter with Import-export. That did not last a year and left me with more debt than what I make in 9 months. I am still paying for that matter fact. Then I thought I had a gift for seeing what will be a hot in technology. I remember talking to friends about web based word processors, mobile voip and niche social networks before this things were what they are today. But soon after I realized that most people thought of it too, but like me they did not do anything about it. I found myself running left and right, getting with developers and working on cool projects, only to abandon them and getting into something bigger. I am a Dreamer. I dream of products in the day and gather people to implement them by the evening. And that is it. After it is done I keep fwding the launch. I realized that I was not a business man.

So why starting a startup? Well I think I want to be a Teacher, or a role model. I would like to build a successful startup, but I would love to sit on the other side of the table and listen someone who has nothing more than an idea and $1.75 to pay the bus fair to come talk about their idea. I think I would love to sit down in the coffee shop and get so excited about his/her idea that I can yell "You are a FUCKING Genius KId". I think I would love to tell her/her to call someone who had something similar and get with him/her to build their startup.I think I would love to be woken up by the same entrepreneurs at 3 AM, just because the servers are down and they are freaking out as users in Russia are assaulting them with emails. I think I would love to help him/her calm down and find a solution to the problem. I think I would love to relax sometime in my beach-side coffee shop and laugh with them about how 3 years ago they had only an idea, a passion and $1.75, and today the only think that worries them is "how the HELL are they going to keep 1, 2, 3 millions users happy?"

But before doing all that, I think I need to be in the same situation the kid is. I must start with nothing and build something. I must really be tired and know that the only thing that is keeping me up is Passion. I must be nervous at launch and wait for the first 1000 registered users. I would be a fool if i was to give advices to someone if I don't know how they feel at the time. The problem may be different, but the feeling is the same.

Maybe you feel like me. Maybe you like to THINK and CREATE, but adore to SHARE. Maybe instead of sharing features like WEB2.0 standard, you want to share your experience and help someone else become successful. Maybe you just want to smile and tell the entrepreneur. "You got yourself, myself and my wife's money into a HELL of A MESS, Now ROLL UP your sleeves and let's FIX THIS THING"

That's why I am starting a STARTUP.</comment>


GIMP Convolution Matrix - <AUTHOR> https://docs.gimp.org/en/plug-in-convmatrix.html <comment><USER2> Author here (of the plugin, not the page).

This was my only tangible contribution to the Gimp, some twenty years ago. IIRC it was modelled after a similar feature in Paint Shop Pro, and it was easy enough an exercise for an aspiring programmer. Or so I thought: others have now spent much more time maintaining it than I spent writing it.

In hindsight it seems like a bizarre idea to have a feature whose GUI requires filling in 25 numbers. But perhaps it has use as an educational tool.

In development version of the Gimp, the entire plugin has effectively been rewritten. Good riddance!

<comment><USER3> I had no idea this feature was available in Gimp, it would have helped me out a lot in debugging and developing shaders which use convolution matrices! Thanks for your hard work!

<comment><USER4> It's in photoshop too!

</comment></comment></comment><comment><USER5> Yeah, weirdly a lot of basic image processing tasks can be expressed as convolutions: [https://en.wikipedia.org/wiki/Kernel_(image_processing)](https://en.wikipedia.org/wiki/Kernel_\(image_processing\))

<comment><USER6> I don't fully grok the math behind convolutions yet, but the symmetry of the numbers in the matrices is beautiful.

<comment><USER7> discrete convolution is just dot product. in 2d it's elementwise matrix multiplication.

[https://i.stack.imgur.com/YDusp.png](https://i.stack.imgur.com/YDusp.png)

don't worry about continuous convolutions

<comment><USER8> Discrete convolution definitely isn't the dot product. Given an n-tuple a and an m-tuple b, form a polynomial p_1 from the coefficients of a and a polynomial p_2 from the coefficients of p_2. The the convolution of a and b is the coefficients of a * b.

e.g. a= [1,2,3] and b=[4,5,6].

p_1 = 1 + 2x + 3x^2 + ...

p_2 = 4 + 5x + 6x^2 + ...

p_1 * p_2 = 4 + 13x + 28x^2 + ...

Hence the convolution of a and b is [4, 13, 28, ...].

Here's the full answer:

octave:1> conv([1,2,3], [4,5,6])

ans =

        4   13   28   27   18

The intuition behind convolution to me for an image is uniform blurring. If you have a square shaped eraser, and you use it to blur a pencil sketch, the sketch will appear blocky and square shaped. Or perhaps a better analogy is painting: your wall will appear different depending on whether you use a paintbrush or a roller.

<comment><USER7> why in the world are you presenting convolution of polynomials?

i was being glib true but the crux of convolution (what's important for someone who expresses that they don't understand the mathematics) is elementwise multiplication i.e. dot product. yes you take a filter and sweep it across your input (or vice-versa depending on whether you're really talking about convolution or correlation) and that's important but in my opinion what's more important (obviously since that's what /i/ expressed) is elementwise multiplication. once you understand that (the elementwise multiplication) sweeping and padding and etc are simple to understand.

>The intuition behind convolution to me for an image is uniform blurring. If you have a square shaped eraser, and you use it to blur a pencil sketch, the sketch will appear blocky and square shaped. Or perhaps a better analogy is painting: your wall will appear different depending on whether you use a paintbrush or a roller.

this is a very bad example since you can easily convolve with filters that sharpen (e.g. literally any gaussian kernel). so you're really not illustrating convolution but instead convolution with an averaging filter (or something like that).

in general you shouldn't jump to criticize someone's explanation to a student unless you are prepared to give a much better and (this is important) pedagogically sound explanation because 1 you look foolish 2 you sabotage the student's understanding.

<comment><USER8> I don't care about the "student", I'm telling /you/ what convolution is. It's not the dot product.

"yes you take a filter and sweep it across your input..."

Sweeping across your input is the heart and soul of convolution. I've taken courses in image processing, control theory, probability theory, and digital signal processing - and in all these contexts, convolution is always sweeping across in a very specific way. If you change a single minus sign, you get cross correlation which is completely different.

I don't appreciate the rude tone you're taking so I will not be replying further. I didn't take that tone when replying to your initial message.

<comment><USER7> > don't care about the "student", I'm telling /you/ what convolution is. It's > not the dot product.

Then don't comment on expositions given to students.

>Sweeping across your input is the heart and soul of convolution.

But that's like just your opinion man. The definition is what the definition is and a component of it is the translation of the filter and a component of it is the weighted sum. It's up to each individual to decide what's the most significant component and each individual is free to adjust their focus according to the problem at hand. In this instant I chose to focus on the sum for the sake of pedagogy.

>If you change a single minus sign, you get cross correlation which is completely different.

No in fact you get literally the same function just flipped about t=0. I would not call that completely different.

> I didn't take that tone when replying to your initial message.

Read your response again and reflect some more because absolutely your initial message was antagonistic

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> This great interactive really helped me understand what a convolution is:

[http://setosa.io/ev/image-kernels/](http://setosa.io/ev/image-kernels/)

Highly recommended!

</comment><comment><USER10> Oh man, I've been trying to find a good explanation of what a convolution matrix does! I'm literally just now working on bitmap code in LibreOffice and was deliving into the convolution matrix functionality. Thanks to the author for this!

</comment><comment><USER11> Funny that GIMP is actually doing cross-correlation instead of convolution. That's also a mess in Deep Learning frameworks where "convolution" often means "cross-correlation".

<comment><USER12> I'm interested to know what the difference is. Do you have a link that explains it?

<comment><USER13> It's a pretty minor difference, really. Over functions (which is the same as over vectors/matrices, except the latter are taken at discrete points), the autocorrelation and the convolution differ by a sign. The definition of convolution is

conv(x(t), y(t))(q) = integral (x(t)·y(q-t) dt)

where x(t), y(t) are functions. Or, with sums and x, y are vectors

conv(x, y)(q) = sum(over i + j = q+1) of (x(i)·y(j))

whereas the definition of the autocorrelation is "simpler"

ac(x(t), y(t))(q) = int(x(t)·y(t-q))

In other words, it replaces y(t) with y(-t) (i.e., the autocorrelation of x(t) and y(t) is the same as the convolution of x(t) and y(-t)). A similar transformation happens for the discrete case.

Turns out, in the context of learning, these are equivalent since it just corresponds to a relabelling of the indices (which is an invertible linear transformation). In fact, even more strongly, independent of the order of the method (so long as it is >0th order!), this will cause no change in the descent direction or objective value, unlike arbitrary invertible linear transformations (for which this is only true of ≥2nd order methods).

<comment><USER13> Also, sorry, I was taking terminology from the GP. The real term for this is _cross-correlation_ —with _autocorrelation_ being the application of the above operation onto a single function; i.e., taking ac(f(t), g(t)) as defined above, the autocorrelation of g is really defined to be ac(g(t), g(t)).

</comment></comment></comment></comment><comment><USER14> One thing that would help the comprehension of this document greatly is to mention that it's simply a "weighted average".

<comment><USER15> I don't think it is a weighted average. I believe you have to divide at some point for averaging to be going on. Convolutions just add up the neighborhood based on the kernel, and output their sum.

<comment><USER14> It still gets across most of the point of how it works.

As for dividing, that's what the Divisor option is for. To quote the article:

"The result of previous calculation will be divided by this divisor. You will hardly use 1, which lets result unchanged, and 9 or 25 according to matrix size, which gives the average of pixel values."

</comment></comment></comment><comment><USER16> A fun filter i used a bit back when i was a scientist was the rolling ball filter:

[https://imagej.net/Rolling_Ball_Background_Subtraction](https://imagej.net/Rolling_Ball_Background_Subtraction)

It took me a while to realise that this is just a cousin of convolution: in a convolution, as you sweep the kernel over the image, combine pairs of pixels and kernel elements with multiplication, then summarise the results with addition, whereas with a rolling ball, you combine the pixels and kernel elements with subtraction, and summarise the results with the maximum. The kernel used is the 'ball', but there's no real reason it has to be based on a sphere in any way.

I wonder what other image processing operators could be built in that framework?

</comment><comment><USER17> Hopefully GIMP will finish GEGL and GTK+3 migration soon to be more tablet- friendly.

<comment><USER18> I still haven't gotten over the hatchet job they did on the UI with 2.8 on the desktop.

<comment><USER19> They did a great job with 2.8 UI. Or are you one of these people who still can't get over the Save/Export thing?

<comment><USER20> As an occasional user, no I can't get over it. I choose the wrong action every time! It's a non-standard way of saving an image, and it's a usability fail.

<comment><USER19> Since GIMP 2.8 came out 5 years ago and you still haven't got used to it, you must have been using it very occasionally, so hopefully it didn't waste too much of your time. However it's a big win for people who use any non-trivial features of GIMP which can't be "saved" in an ordinary image format. Pretty much every professional media software uses this workflow. You can't "Save As" .mp4 in Sony Vegas, you can only save your project as .veg, a file format which only Sony Vegas can open. Otherwise all your hard work will be lost.

<comment><USER18> Or he just hasn't upgraded -- I know I haven't. But, you're right. I've mostly moved on to other tools. If I'm using GIMP to edit something, the source file is never going to be XCF. Sorry guys, nobody uses XCF and pros don't use GIMP. A big win for professional users would be CMYK support, not the inability to save non-XCF files.

Let's face it. Chasing non-existent professional users at the expense of your actual user base is pretty darn lousy UX.

<comment><USER19> There are so many misconceptions in this post, I have to wonder if this isn't some sort of an elaborate troll.

>If I'm using GIMP to edit something, the source file is never going to be XCF.

What makes you think the source file can only be XCF? You can easily open any image format with GIMP.

>Sorry guys, nobody uses XCF and pros don't use GIMP.

Wrong and wrong. XCF is necessary to save your work in GIMP, so most GIMP users use it.

>A big win for professional users would be CMYK support,

Who the hell needs CMYK support these days? Print is dead (well, it's getting there anyway).

>not the inability to save non-XCF files.

You can easily export your project to any image format that exists.

>Chasing non-existent professional users at the expense of your actual user base is pretty darn lousy UX.

The tool should be optimized for people who spend the most time using the tool. GIMP is for long edits, where saving (actually saving) your intermediate progress is a part of the workflow, whether you're a hobbyist or pro. For quick edits there is Pinta and whatever else.

<comment><USER18> > What makes you think the source file can only be XCF? You can easily open > any image format with GIMP.

Nothing. But if I'm opening a not-XCF I probably don't want to SAVE it as an XCF.

> Wrong and wrong. XCF is necessary to save your work in GIMP, so most GIMP > users use it.

So basically the only reason anyone uses XCF is that GIMP forces them to? That's some sound design logic there. Used to be you could save your work in not-XCF.

> Who the hell needs CMYK support these days? Print is dead (well, it's > getting there anyway).

The professional users GIMP is chasing after.

> You can easily export your project to any image format that exists.

Would be easier to save.

> The tool should be optimized for people who spend the most time using the > tool.

So chasing after the non-existent professional GIMP users would be a bad optimization then? Ok.

> GIMP is for long edits, where saving (actually saving) your intermediate > progress is a part of the workflow, whether you're a hobbyist or pro.

You know, I'd love to find an open source alternative to Lightroom and Photoshop. Turns out things like darktable and GIMP are far more archaic. That's the reason I still buy and use the Adobe tools. Dicking about with the one workflow where GIMP actually works is a poor move and doesn't do anything beneficial for more involved workflows.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER21> In Photoshop, that's Filter -> Other -> Custom

</comment><comment><USER22> I thought it was interesting the same technique (convolution) was used in two different applications: photoshop/gimp for image filters and in convolutional neural networks (CNNs). What is the purpose of convolution in CNNs?

the setosa interactive says convolution is "a technique for determining the most important portions of an image"

the hubel and wiesel experiment showed "there is a topographical map in the visual cortex that represents the visual field, where nearby cells process information from nearby visual fields. Moreover, their work determined that neurons in the visual cortex are arranged in a precise architecture. Cells with similar functions are organized into columns, tiny computational machines that relay information to a higher region of the brain, where a visual image is formed"

I'm interested in David Marr's work, about to order Vision: A Computational Investigation into the Human Representation and Processing of Visual Information, his level of analysis approach is interesting. I think he did work on edge detection, which must of been involved some kind of convolution/filter

This setosa interactive is great, and actually references the gimp documentation

[http://setosa.io/ev/image-kernels/](http://setosa.io/ev/image-kernels/)

 _An image kernel is a small matrix used to apply effects like the ones you might find in Photoshop or Gimp, such as blurring, sharpening, outlining or embossing. They 're also used in machine learning for 'feature extraction', a technique for determining the most important portions of an image. In this context the process is referred to more generally as "convolution"_

[https://knowingneurons.com/2014/10/29/hubel-and-wiesel- the-n...](https://knowingneurons.com/2014/10/29/hubel-and-wiesel-the-neural- basis-of-visual-perception/)

 _The classic experiments by Hubel and Wiesel are fundamental to our understanding of how neurons along the visual pathway extract increasingly complex information from the pattern of light cast on the retina to construct an image. For one, they showed that there is a topographical map in the visual cortex that represents the visual field, where nearby cells process information from nearby visual fields. Moreover, their work determined that neurons in the visual cortex are arranged in a precise architecture. Cells with similar functions are organized into columns, tiny computational machines that relay information to a higher region of the brain, where a visual image is formed._

[https://ps.is.tuebingen.mpg.de/research_fields/inverse- graph...](https://ps.is.tuebingen.mpg.de/research_fields/inverse-graphics)

 _Computer vision as analysis by synthesis has a long tradition and remains central to a wide class of generative methods. In this top-down approach, vision is formulated as the search for parameters of a model that is rendered to produce an image (or features of an image), which is then compared with image pixels (or features). The model can take many forms of varying realism but, when the model and rendering process are designed to produce realistic images, this process is often called inverse graphics. In a sense, the approach tries to reverse-engineer the physical process that produced an image of the world._

<comment><USER23> > I thought it was interesting the same technique (convolution) was used in > two different applications: photoshop/gimp for image filters and in > convolutional neural networks (CNNs). What is the purpose of convolution in > CNNs?

IMO, convolution in CNNs would be better denoted as correlation. In CNNs the feature maps are convolved (correlated), eg swept over the image and multiple at each spot with the results being accumulated, in order to find where in the image these filters fit. The output produces a map of how strongly each filter (there are usually multiple in a convolution layer, that is the third dimension of the layer), fits with the image. These become the weights passed onto the next layers.

As an electrical engineer by training, who used convolution all the time, I didn't understand how the two were related, especially because of the third dimension.

I read this [https://adeshpande3.github.io/A-Beginner%27s-Guide-To- Unders...](https://adeshpande3.github.io/A-Beginner%27s-Guide-To- Understanding-Convolutional-Neural-Networks/) and that lead me to how I understand it today.

</comment></comment><comment><USER24> The writing quality in these docs is absolutely terrible.

<comment><USER25> English is likely not the first language of the volunteer who wrote these docs. If you want better documentation, I encourage you to write it yourself.

The project needs all the help it can get.

<comment><USER24> I assumed as much am not belittling the skills of a non-native speaker. I was just sort of surprised that a project that has been around so long hasn't had better attention paid to its docs (my biggest FOSS experience is with PostgreSQL which is a bit of an outlier in just how good its docs are).

</comment></comment></comment><comment> Const-me I wonder who and why would use the feature?

These matrices are slow. Many kernels used in practice are separable [https://blogs.mathworks.com/steve/2006/11/28/separable- convo...](https://blogs.mathworks.com/steve/2006/11/28/separable-convolution- part-2/) and therefore much faster to compute than a generic convolution matrix.

Also the UI is hard to use. 25 edit boxes is a lot.</comment>


Anatomy of a Haskell-based Application - <AUTHOR> http://abailly.github.io/posts/cm-arch-design.html <comment><USER2> I'm going to put it out there that this reflects badly on our community when we dislike RDBMS "just because."

</comment><comment><USER3> When I tried to write a Haskell app, one thing I learned quickly was that most of the awesome Haskell features that are perfect for modeling a domain _in Haskell_ were useless because the majority of my modeling needs to be done in the database and merely wrapped with Haskell, rather than written entirely in Haskell. That disappointed me a bit. But maybe I'm wrong, in fact I hope I was wrong!

<comment><USER4> Some frameworks provide automatically generated type-safe entities, query, and update capabilites, such as the Yesod Persistent framework [0].

For a smaller but similarly safe approach, I reccomend Esqueleto.

[0] [http://www.yesodweb.com/book/persistent](http://www.yesodweb.com/book/persistent) [1] [https://hackage.haskell.org/package/esqueleto](https://hackage.haskell.org/package/esqueleto)

<comment><USER5> To be precise, Esqueleto isn't a smaller alternative, it's a layer on top of Persistent that gives you a typed DSL for SQL. It's been pretty nice when I used it, most things that I wanted to do in SQL were easily expressed. Exotic SQL functions that weren't available are easily imported in a type-safe way.

acid-state is a smaller, no-SQL alternative [1].

[1] [https://hackage.haskell.org/package/acid- state](https://hackage.haskell.org/package/acid-state)

<comment><USER4> Thank you. I was thinking of Persistent as part of a Yesod Web framework and Esqueleto as something independent, which was not correct.</comment></comment></comment></comment>


Why did US govt not adopt WHO's Covid-19 Test kit? - <AUTHOR> My theory: In USA healthcare system is optimized  to enrich big pharma, healthcare system is not optimized to get care to those who need it, as fast as possible. If a drug company that is owned by investors on  Wall-street makes test-kit, the company will charge customers in USA hundreds of dollars more than the one designed by WHO. This will enrich all share-holders of that company. The delay between rejecting WHO's test kit and developing own test kit, would have caused undetected spread of virus for few weeks or months. Is it as simple as this? <comment><USER2> Occam's razor suggests simpler reasons: the CDC believed it had a viable test and government processes favour NIH (not invented here) outcomes. No conspiracy needed.

<comment><AUTHOR> Well, in that case Occam's razor confirms the theory. "Government processes favor NIH (not invented here)". A govt whose representatives are bought by rich corporations (including big pharma), prefers only-invented-here to enrich those corporations. (even if that means delayed dissemination of virus-testing facility)

While trying to dismiss the conspiracy, Occam's razor just confirmed the conspiracy. After all, digging conspiracies is not always a bad thing.

<comment><USER2> No, the requirement of complexity to maintain a functional conspiracy around this is confounding. You don't need a conspiracy, if the NIH principle is common because at scale, corporate US interest benefits anyway.

Why pay for something you're going to get anyway?</comment></comment></comment>


Germany's armed forces adopting Matrix as backbone for all internal comms - <AUTHOR> https://www.bwi.de/news-blog/news/artikel/kommunikation-in-covid-19-zeiten-bundeswehr-setzt-instant-messaging-ein <comment><AUTHOR> In German, title taken from [https://techcrunch.com/2020/05/21/automattic- pumps-4-6m-into...](https://techcrunch.com/2020/05/21/automattic- pumps-4-6m-into-new-vector-to-help-grow-matrix-an-open-decentralized-comms- ecosystem/) which references this link.

> New Vector's decentralized tech powers instant messaging for a number of > government users, including France — which forked Riot to launch a messaging > app last year (Tchap) — and Germany, which just announced its armed forces > will be adopting Matrix as the backbone for all internal comms; as well as > for the likes of KDE, Mozilla, RedHat and Wikimedia, to name a few.

</comment><comment><USER2> Confused. Is Matrix now usable? Last time it was barely functional, more like an alpha tech preview.

The other solution they are using is slashcat. Maybe that's what they are really using.

<comment><USER3> yes, it's usable (unless you're still writing this from 2015? :). the point of the story is they're ditching stashcat in favour of Matrix.</comment></comment>


How Are Custom Mobile Apps Boosting the Hospitality Industry? - <AUTHOR> https://blog.intuz.com/how-are-custom-mobile-apps-boosting-the-hospitality-industry/?utm_source=ycombinator&utm_medium=Hospitality-apps <comment><USER2> I always prefer my clients to go for the custom native app. They wanted to have hybrid app for their hotel app. I feel hybrid apps are slow in performance and lack standard os UI.

Custom apps serve better and stand out among other rivals. You can create the app based on your customer's needs. That can be only done by custom mobile app design. It will boost product brand and user engagements ie: Airbnb, Uber, Tinder are good examples of custom native apps.</comment>


A bug story: data alignment on x86 - <AUTHOR> http://pzemtsov.github.io/2016/11/06/bug-story-alignment-on-x86.html <comment><USER2> Again someone who relies on undefined behavior. Casting pointer of wrong alignement is not a platform specific behavior, it's an undefined behavior. Relying on it is an error.

The author did not know "What Every C Programmer Should Know About Undefined Behavior": [http://blog.llvm.org/2011/05/what-every-c-programmer- should-...](http://blog.llvm.org/2011/05/what-every-c-programmer-should- know.html)

Another good link about that: [http://blog.regehr.org/archives/213](http://blog.regehr.org/archives/213)

<comment> loup-vaillant Again someone blaming the victim. I'm kind of sick of this.

While true, your comment doesn't get at the root of the problem. The obvious fact here is that there is a mismatch between the C standard and how the users really use it. The less obvious fact/opinion/fallacy, is that it is not automatically the user's fault.

 _The standard could be wrong._

Sure, there are reasons why such and such behaviour ended up undefined. Those reason are sometimes weak however: some behaviour ended up undefined on _all_ platforms because _some_ of them couldn't handle it reasonably. The alignment bug here is such an example.

To this day I don't understand why undefined behaviour wasn't specified on a platform-by-platform basis. We already have implementation defined behaviour, after all. I _guess_ this is because it lets compiler writers unify their front-ends and optimizers, but as a result, we cannot use our platforms to their fullest potential.

<comment><USER3> You are missing the point. The standard could be wrong, but it is still the standard. You still have an obligation to conform to it if you are writing C code. It is a prescriptive document, not a descriptive one. It can only be wrong to the extent that it can make poor decisions. Regardless of what it says it is authoritative.

<comment> loup-vaillant Did I gave the impression we don't need to conform to that standard? That wasn't my intention. I just wanted to point out the standard is sometimes stupid.

Of course we have to conform to the standard, however crazy. The only alternative is forking the language itself.

</comment></comment></comment></comment><comment><USER4> The correct solution for GCC is specifying 1-byte alignment for this particular array:

      #include <stdlib.h>
      #include <stdint.h>

      typedef uint32_t __attribute__((__aligned__(1))) uint32_t_unaligned;

      uint64_t sum (const uint32_t_unaligned * p, size_t nwords)
      {
          uint64_t res = 0;
          size_t i;
          for (i = 0; i < nwords; i++) res += p [i];
          return res;
      }

Probably works on clang too and IIRC the MS compiler provides similar functionality with different syntax. AFAIK there is no portable solution.

And I'm not sure how exactly this code will fail on architectures which don't support unaligned uint32_t.

<comment><USER5> In C++11 there is a standard for this : [http://en.cppreference.com/w/cpp/language/alignas](http://en.cppreference.com/w/cpp/language/alignas)

<comment><USER6> Anybody knows how Rust handles this problem?

<comment><USER7> Not sure if this is what you are asking: Last time I tried alignment in Rust I worked around the lack of explicit alignment support by adding a zero length array of the correct size to the end of the struct. Not sure if alignment support from proper attributes has landed yet.

       [repr(C)]
       struct Something
       {
          pub foo: f32,
          pub _alignment: [EightBytes, 0]
       }

where "EightBytes" is a data type of size 8, to align the whole struct on 8 bytes.

<comment><USER8> Structs already insert padding to give them alignment:

        struct One {
          foo: u8,
        }

        struct Two {
          bar: u16,
        }

        struct Three {
          foo: u8,
          bar: u16,
        }

        struct Four {
          foo: u16,
          bar: u16,
        }

        fn main() {
            assert_eq!(1, std::mem::size_of::<One>());
            assert_eq!(2, std::mem::size_of::<Two>());
            assert_eq!(4, std::mem::size_of::<Three>());
            assert_eq!(4, std::mem::size_of::<Four>());
        }

<comment><USER7> What I needed to do was to place e.g. a N byte struct exactly on an M byte alignment (e.g. 11 byte struct on 32 byte alignment etc).

<comment><USER8> Ah! Yeah, that's different, and as far as I know your way is the current right way to do it, but I'm not an expert on the subject.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> These SSE instructions that operate only on aligned data are a pain. It's not well known that Linux/x86 stack frames must always be 16 byte aligned. GCC uses this knowledge to use the SSE aligned instructions when accessing certain fields on the stack.

Unfortunately a while back the OCaml compiler generated non-aligned stack frames. Which is no problem for pure OCaml code and even saves a little bit of memory. However if the code called out to C, then _sometimes_ and unpredictably (think different call stacks, ASLR) the C code would crash. That was a horrible bug to track down:

[https://caml.inria.fr/mantis/view.php?id=5700#c10779](https://caml.inria.fr/mantis/view.php?id=5700#c10779)

<comment><USER10> Agreed, I've always found them unusual and perhaps a bit of a shortsighted decision --- they've been making processors seamlessly handle any alignment with perhaps an extra cycle, even for the MMX instructions, yet somehow felt the need to restrict much of the SSE ones into aligned and only provide one unaligned move.

The stack alignment restriction is also annoying when handwriting Asm, although fortunately it's only when calling into other C libraries that it needs to be minded.

<comment><USER11> > seamlessly handle any alignment with perhaps an extra cycle

I'm not up to date on the latest mitigation strategies, but the hairball of cache implications caused by unaligned access make me suspicious of that claim. If you (or your compiler) signal that you want performance by using vector instructions, I think it's completely fair for Intel to demand that you pay attention to alignment.

<comment><USER4> Case in point: a simple example of code which copies 1MB of data with SSE and slows down on misalignment:

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

Presumably due to the hairball of cache implications, as you put it.

But it also is true that the choice of aligned/unaligned instructions makes no difference if the array is aligned.

</comment></comment></comment></comment><comment><USER12> Well, that's pretty horrendous. Note that the naive code which just casts the input to uint16_t would work fine. I can't help but wonder if the solution to this might have been better expressed as naive implementation + platform- specific _assembly_ implementation.

After all, if you have to understand the underlying instructions executed in order to fix the problem, why not stop trying to make the compiler emit the "right" instructions and just write them yourself?

(Language lawyers: is casting a char* to a uint32_t* actually defined behavior? For unaligned data?)

<comment><USER13> No it is not, the author even cited the rule from C99 himself.

> 184.108.40.206 A pointer to an object or incomplete type may be converted to a > pointer to a different object or incomplete type. If the resulting pointer > is not correctly aligned for the pointed-to type, the behavior is undefined. > Otherwise, when converted back again, the result shall compare equal to the > original pointer. When a pointer to an object is converted to a pointer to a > character type, the result points to the lowest addressed byte of the > object. Successive increments of the result, up to the size of the object, > yield pointers to the remaining bytes of the object.

The fist sentence is what is in play over here. If you have undefined behaviour in your program anything can happen.

</comment></comment><comment><USER14> Compiler is allowed to assume alignment of pointers (what are you doing is creating a pointer to a value with invalid alignment, hence undefined behaviour (just creating a pointer is undefined behaviour)). The correct solution would be to read values indirectly. For example, a function like that could be used to replace every access to "q" variable.

        static uint32_t read(const char *p, size_t index) {
          uint32_t out;
          memcpy(&out, &p[index * sizeof out], sizeof out);
          return out;
        }

A compiler can recognize this pattern, and continue to use unaligned accesses that would work.

This has a cost of unaligned accesses on non-x86 platforms (a quite big at that), but considering the original code didn't work on these at all, it's an improvement.

<comment><USER15> Is this equivalent ? At least to me this seems a more common pattern than using memcpy(), and I expect to work better on old compilers.

      static uint32 read(const void *ptr) {
        const uint8 *b = (const uint8 *)ptr;
        return (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | (b[0]);
      }

<comment><USER4> Functionally it seems equivalent, except that it doesn't work on big endian machines (assuming the ints are in native endian).

On dumb compilers it may be faster if a few bitops happen to be faster than a call to memcpy. Which sounds plausible.

On modern compilers it boils down to whether your compiler can optimize either one or both of these patterns into a single unaligned load. GCC for example certainly optimizes 4 byte memcpy, probably already at -O2, but whether it recognizes your pattern I don't know. Compile it and check.

</comment></comment></comment><comment><USER16> At some point you might as well byte the bullet and just write the code in assembly.

<comment><USER17> > byte the bullet

Is that a clever pun or Freudian slip?

<comment><USER16> Accidental but I'll keep it.

</comment></comment></comment><comment><USER18> Note that even if you try to manually correct the pointer to work on aligned data (read any initial bytes via char pointer and read the rest via uint32_t pointer), you still generally have undefined behavior: strict-aliasing violation. And the worst thing here is that whether you do have a violation depends on how _other_ code accesses the same data / how the object is initially declared. E.g., you're fine if the original declaration is char[] or uint32_t[], but not if it's uint16_t[]. Because that would entail access to the same data via both uint16_t and uint32_t, a violation of strict-aliasing.

Actually two out of three inet checksum implementations in lwIP have this bug [1].

And like the problem discovered in the article, this is NOT theoretical. I have personally seen code "miscompiled" due to strict aliasing violations (in that case, packed structures were involved).

I think the only way to do this "manual alignment handling" is to use assembly, either by writing the entire thing in assembly, or using inline asm sections for doing the individual 32-bit memory reads/writes.

Funny story... When I was looking for a fast inet checksum implementation to use for an embedded ARM project, I took the one from RTEMS, which is written in C with much inline asm, and like the lwIP code, it has strict aliasing violations (and also problems compiling correctly with clang). What I did was, compiled it to assembly with gcc once, then included this compiled assembly in the source code. Assuming that this was compiled correctly, I don't need to be afraid of future compiler change breaking it.

[1] [http://git.savannah.gnu.org/cgit/lwip.git/tree/src/core/inet...](http://git.savannah.gnu.org/cgit/lwip.git/tree/src/core/inet_chksum.c)

<comment><USER19> Strict aliasing can worked around by casting through a union, essentially introducing a new type which can alias any of its component types. Mike Acton has a good description of it with lots of assembly examples here:

[http://cellperformance.beyond3d.com/articles/2006/06/underst...](http://cellperformance.beyond3d.com/articles/2006/06/understanding- strict-aliasing.html)

</comment></comment><comment><USER20> Related Snabb experiments with IP checksum in C with automatic vectorization, C with vector intrinsics, and AVX2 assembler: [https://github.com/snabbco/snabb/pull/899](https://github.com/snabbco/snabb/pull/899)

</comment><comment><USER21> I'm taking assembly right now, and we're working on our first RISC project after spending all semester working with the x86. Why does RISC crash if the bytes are not aligned?

<comment><USER22> Early RISC processors read data from memory 32 bits (4 bytes) at a time, and these reads had to be aligned on 4-byte boundaries. This was a feature of the memory architecture, not just the processor.

Thus an aligned read of a 32-bit integer took one memory access; an unaligned read took two, which took twice as long. This killed performance.

Rather than quietly performing badly, the processor threw an exception to encourage you to fix your code.

The ARM2 worked a bit differently. It ignored the bottom two bits of the address when it read a value from memory. When the read was complete the value was rotated by the value of the bottom 2 bits multiplied by 8. This had the effect of putting the byte referenced by the full address in the bottom 8 bits of the 32-bit register. A flag in the instruction let you optionally mask off the top 24 bits to simulate a byte read.

</comment></comment><comment><USER23> You can probably also just pass -fno-strict-aliasing to gcc.

</comment><comment><USER24> If you're willing to use compiler extensions, you can avoid the memcpy by using packed structs. This can generate better code.

Folly has a generic `loadUnaligned()` that uses this trick: [https://github.com/facebook/folly/blob/5d52fb8c30e567403b8cc...](https://github.com/facebook/folly/blob/5d52fb8c30e567403b8ccb65e5c1a159fb92d707/folly/Bits.h#L539)

</comment><comment><USER25> What if you put the array in a struct and made a union of both uint32_t and uint8_t? Would the union with the larger size force the compiler to generate a 4-byte aligned array for the bytes?

I suggest this because it would be portable without any compiler specific stuff.

<comment><USER26> It's already too late, the data is read from a file so the base of the array can be say at address 0xYYYYY2.

</comment></comment><comment><USER27> Attribute((aligned)) might be useful here.

</comment><comment><USER28> TL;DR: Even though most instructions of your processor (x86) allow data to be aligned on any byte, your compiler might not.

</comment><comment><USER29> So much HTML to complain about C working the way C is defined rather than the way the OP wants it to work! It's not that hard to write a fast ones'-complement checksum that's portable and compliant, but whining's always easier than coding.</comment>


Ask HN: How do you save comments? - <AUTHOR>

Would people be interested in the ability to 'save' comments? Ie, rather than just upvote them.
Unlike stories which get saved to a list by defaul when you upvote, it's not readily accessible to find comments that you upvoted.<p> Not every upvote would warrant a save, but a list of select comments as a unique feature migh be interesting. Items for future reference / excellent candidates for this feature might be eg: (a) Technical refrence posts; (b) test-piece writing samples; and (c) myriad how-to's (say, interviewing advice).
<p>Alternatively, what are people's best solutions for saving comments on HN? Simple bookmarks or are there better solutions?<p>The ability to peruse a "saved comments" section on HN seems like it would be easier to read/sort (because it has both title/context link as well as the text).<p>
Feel free to comment if this is also more trouble than its worth. <comment><USER2> There are generally two types of electronic conversations in this world: conversations that are meant to be in the moment, like text messages, FB chats, HN, or Twitter, and conversations that you want to come back to long into the future, like a mailing list, or email, or Stack Overflow.

I don't think anything that was said on HN a few days ago (or months or years) has any value to me. The world moves too fast to try to keep track of it.

My 2 cents.

</comment><comment><USER3> Save, as in 'remember' / 'bookmark'? Yes, please. :)</comment>


Websites to be forced to identify trolls under new measures - <AUTHOR> http://www.bbc.com/news/technology-18404621 <comment><USER3> And the obvious underlying reason for these measures: corporations and governments will be able to identify those who "defame" them.

<comment><USER4> I'm not sure that's the underlying reason --but certainly I can see corporations abusing this new law, ust as I imagine individuals abusing it. I think gov't would be less likely to abuse this as that would tread on censorship. The biggest problem, if this survives as law, is that it likely will lead to petty complaints -and by way of interference, to a possible chill in online discussions. I think that'd be a net loss. I can sympathise with people who become targets of internet bullies but I don't see how this is an appropriate response to that problem.

</comment></comment><comment><USER5> This seems potentially labor-intensive for online community operators. That said, verified trolls need to die, so if you're doing your job right, you've already got a mechanism for reporting and banning (ninja or otherwise) trolls, and most victims of abuse will hopefully turn to that before requesting ID on their attackers.

<comment><USER6> I am a verified troll. I think unpopular anonymous speech is the speech that needs the most protecting.

<comment><USER5> There's unpopular speech and then there's being a dick, which I'm certainly guilty of on occasion in the past, but I try not to make a habit of it. I operate a website, and assholes are undesirable when you're trying to build a community. If you are unable to behave yourself like a decent human being, then you can fry for all I care; mean people suck.

</comment></comment></comment><comment><USER7> "Trolling" has a utility, though.

It's a geek synchronization protocol. If you pop into a mailing list promoting your HOT NEW STARTUP, and wanting hackers to build you your new FACEBOOK KILLER in their spare time so that they can build their resume...

You're going to get trolled. And there is a reason for this:

It gives you an opportunity to troll back, thus showing that you're actually part of the culture.

It's a secret handshake that geeks do. If you're upset because you're getting "trolled"[1], it's probably because the people you're asking to do things for you don't want to.

[1]: I'm talking about /trolling/, not just being a prick. Some people are just pricks. Trolling is meant in good spirit.

<comment><USER8> You're just redefining the meaning of trolling. It's nothing else than being a prick, hidden behind an online pseudonym.

It's not some secret handshake, nor a well meaning fun poking.

<comment><USER7> As long as I've been around online communities, trolling has always been regarded as something playful.

</comment></comment></comment><comment><USER9> This is downright censorship, if we would have a law like this, I would not post anything online in fear of it considered defamatory, since there is no scientific way to determine if something is defamatory or not, so basically anything I write can be considered defamatory. Laws like this are just an excuse for censorship.

Also the people who are the victims of trolling should get a life, talk to a psychiatrist or something, they clearly have a problem, because they give one damn too many about what random people are saying on the internet.

</comment><comment><USER10> This sounds preferable to me - at the moment the websites are strangely viewed as if they directly authorised the content to be published, which obviously isn't the case.

It will be interesting if a system comes about that content can be removed on a self-serve basis, a la YouTube.

<comment><USER11> What's more disturbing is that you seem to think there's content which should be banned from being published.

What a perfect idea, let's start doing that right now. I'll let you decide what's bad for me! BTW, just bought some baby food, can you please spoon feed it to me? Also: change my diaper.

Whether an idea should or should not be made available to the masses should never be in the hands of a process, even a democratic process. Attempts at doing so are terribly misguided.

If you get offended at drive-by trolling by stupid people then you need to seek the issue in yourself, not in the website that was the playground to such behaviour. Grow up. No one's going to play nanny for the world, and if the UK wants to start doing that, then you can be sure as hell it'll see backlash.

<comment><USER12> > What's more disturbing is that you seem to think there's content which > should be banned from being published.

If you'd read TFA, you'd know that this case is where the trolls impersonated a woman, setting up a facebook profile with her name and photos on it - <USER2> that people who knew her IRL thought it was her profile. That profile painted her as a paedophile and drug dealer. They did this just for fun.

I'm pretty sure that identity theft and libel (or the equivalent definitions in other legal systems) are illegal just about everywhere; and can and should result in this content being "banned from being published", and the anonymity of the people doing it being stripped away.

This law could be over-broad, I don't know, but if you find the take-down the most disturbing part of this case, check your sense of proportion.

<comment><USER6> Can we be careful with the term "identity theft", please? Creating a fake social network profile for the lulz should not ever be a crime. Taking out credit in someone else's name should be.

A friend is being federally prosecuted (a five-year felony!) for identity theft... for possessing a list of email addresses.

Please, slow your roll.

<comment><USER12> > Can we be careful with the term "identity theft", please?

Ok, lets be careful with it:

> "Identity theft is a form of stealing someone's identity in which someone > pretends to be someone else by assuming that person's identity, typically in > order to access resources or obtain credit and other benefits in that > person's name. The victim of identity theft (here meaning the person whose > identity has been assumed by the identity thief) can suffer adverse > consequences if they are held accountable for the perpetrator's actions"

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

Taking out credit in someone else's name fits that definition exactly. Just possessing a list of email addresses does not at all.

Now, as for making a fake facebook profile with someone's name and photos: "someone pretends to be someone else by assuming that person's identity" yes, that fits.

"typically in order to access resources or obtain credit and other benefits" - no, but note that is "typically" not "always".

"The victim of identity theft can suffer adverse consequences" - yes, that happened.

So on the whole I would say that the definition of identity theft fits in this case.

</comment></comment></comment></comment></comment><comment><USER13> There has recently been a few high profile cases of trolling gone bad. Anonymity has it's benefits, hence why certain communities work better than others. Although the trends towards transparency has seen sites like sprouter, quora, fb, stack exchange excel.

One troll was sentenced today for online threats however he didn't show up to court....

<http://news.ycombinator.com/item?id=4098274>

</comment><comment><USER11> That's it, I've finally lost.

</comment><comment><USER14> I would post about what a great idea I think this is, but I don't want anyone knowing my real name.</comment>


FE-Schrift – forgery-impeding typeface - <AUTHOR> https://en.wikipedia.org/wiki/FE-Schrift <comment><USER2> A similar concept is found in Chinese writing. Numbers are written using relatively few strokes, making it easy to change a "one" into a "two."

1: 一 2: 二 3: 三 4: 四 5: 五 6: 六 7: 七 8: 八 9: 九 10: 十

For financial documents, a more complicated form of symbols is used:

1: 壹 2: 貳 3: 參 4: 肆 5: 伍 6: 陸 7: 柒 8: 捌 9: 玖 10: 拾

<comment><USER3> Other than the one to two transformation, are there others? Was the formal system a response to these problems or how it has always been done?

<comment><USER4> The more formal number ideographs are the original ones, the simpler ones were simplified so numbers aren't as awkward to use.

You can also easily change a one into a ten, for example. Note also that it's not exactly a positional number system like Arabic. E.g. the number 123 would be written 1 hundred 2 ten 3. IIRC you can also easily change a ten into a hundred or thousand, so for larger values with a few zeroes in between you could shift a meaningful place into the zeroes to the left sometimes.

</comment></comment></comment><comment> semi-extrinsic Interesting: "it was tested at the University of Giessen's Dept. of Physiology and Cybernetic Psychology." That's quite a name, sounds like it was lifted straight from Command & Conquer.

<comment><USER5> Cybernetics is more common term in the continental Europe. Anglo-Saxons use "systems theory" and it's slowly replacing cybernetics. If you want to read about cybernetic psychology and related subjects, you might want to google "systems psychology", "systems neuroscience", "systems biology" instead.

</comment></comment><comment><USER6> >FE-Schrift has been the only typeface used on new vehicle registration plates of Germany since November 2000, except for plates issued to military- registered vehicles, which still use the former DIN 1451 typeface.

Interesting that the the military vehicles don't get it. It makes some sense that they wouldn't _need_ it, but I can't imagine that it would hurt to have it.

<comment><USER7> I guess they still have 1 million plates in some storage facility. Nah, jokes aside: what they actually do is to not only legally, but practically issue their own plates, which would include stamping them. Also, they don't use the reflective background white. So not only they don't need it, they also have reasons to continue with the old variant. (And actually, they might indeed have a huge stock of them. Military supplies are often aquired at ridiculous numbers.)

(PS: Sorry, auto-correct inserted a typo, just fixed)

<comment><USER8> Why would it matter how many plates they have unless they stamp them ahead of time?

The police issues their own plates as well and they manage fine.

<comment><USER7> Police does use the EU variant for the plates, though. You're right, of course they could go with FE Schrift on their old (non-reflective, non-EU) plates. That would, however, be a new combination that would match neither the new civil plates nor the old ones.

</comment></comment></comment></comment><comment><USER9> It's an interesting design, but I find myself wondering how often license- plate forgery happened.

<comment><USER10> Sometimes the severity of a crime outweighs the frequency. It may be worth preventing any forgery since, when it does happen, the effects are bad.

<comment><USER11> Are license plates that hard to forge? How much work is it to stamp one? (Not to mention that you can get away with printing plates even on paper. A buddy was driving his car intercountry but didn't have his official plate, just the temp ones. Border agents were particular about that part. A bit of Photoshop and applying a bit of dust and no problems at all during a trip spanning 3 countries.)

<comment><USER12> You can actually just buy one for 12 euros, with any combination you like. The stamp, at least in Germany, seems to be the harder thing. It is more common to steal a plate and punch them out.

When you think about it, although the stamps are not that hard to fake, stealing a number plate is a matter of a second. You just clip it out of a plastic frame.

Source: My number plate was stolen in Germany last year.

</comment></comment></comment></comment><comment><USER13> I found an article that has a little more info but also an interactive demo of why they're hard to forge

[http://www.fsd.it/usefuldesign/german_plates_font.htm](http://www.fsd.it/usefuldesign/german_plates_font.htm)</comment>


How and why we created our styleguide - <AUTHOR> http://blog.marvelapp.com/the-marvel-styleguide/ <comment><USER2> I'm curious - since this is very close to Semantic UI, why not use that? It's much more feature complete.</comment>


Mark Zuckerberg publishes video of Jarvis - <AUTHOR> https://www.facebook.com/zuck/videos/10103351034741311/ <comment><USER2> "In case it's not clear, this is meant to be a fun summary and not a live demo." \- you got that straight.</comment>