HN user

saticmotion

718 karma
Posts19
Comments28
View on HN
www.lboro.ac.uk 10y ago

Turning breath into words: new device unveiled to give paralysis victims a voice

saticmotion
3pts0
www.scientificamerican.com 11y ago

Stephen Hawking and Yuri Milner Announce $100M Initiative to Seek ET

saticmotion
288pts226
terrytao.wordpress.com 11y ago

There’s more to mathematics than rigour and proofs (2009)

saticmotion
6pts0
foxyeah.mozilla.org 11y ago

FoxYeah

saticmotion
5pts0
www.eecs.umich.edu 11y ago

Michigan Micro Mote – World's Smallest Computer

saticmotion
290pts53
www.space.com 11y ago

Virgin, Qualcomm Invest in OneWeb Satellite Internet Venture

saticmotion
2pts0
www.sciencealert.com 11y ago

This physicist has built a supercomputer from old PlayStations

saticmotion
2pts0
phys.org 11y ago

Physicists observe elusive particle that is its own antiparticle

saticmotion
2pts0
phys.org 11y ago

New deep sea mushroom-shaped organisms discovered

saticmotion
2pts0
phys.org 11y ago

Two-legged robot able to run without ZMP control

saticmotion
3pts0
phys.org 11y ago

Scientists craft atomically seamless, thinnest-possible semiconductor junctions

saticmotion
1pts0
www.symmetrymagazine.org 11y ago

Holographic universe experiment begins

saticmotion
149pts47
news.ycombinator.com 11y ago

Ask HN: Should higher education be expensive?

saticmotion
4pts9
phys.org 11y ago

Formal computer-verified proof of the Kepler conjecture

saticmotion
2pts0
www.cfa.harvard.edu 11y ago

A Possible Signal from Dark Matter?

saticmotion
1pts1
phys.org 11y ago

Tattoo biobatteries produce power from sweat

saticmotion
2pts0
phys.org 11y ago

3-D sketching system revolutionizes design interaction and collaboration

saticmotion
1pts1
www.marketplace.org 11y ago

The woman behind Ikea's living wage calculator

saticmotion
51pts51
phys.org 11y ago

Photo editing algorithm changes weather, seasons automatically

saticmotion
4pts0

Exactly :) I come from a .net background, where compile times are kinda bad compared to what I get in C. I had also heard of big C++ projects that could take more than 30 mins to build. So I was always scared to move to native code. Until I learned the single compilation unit trick! And if compile times were to get slow again, there are many more ways to bring it down even further,

I tend to use a single compilation unit, and use plain C. For a 50k line project I have build times of 1-1.2sec. On top of that I'm also linking to opengl, windows.h and a couple of headers in the standard lib.

Despite what the code may look like, they all have a very easy to use API. Take stb_image.h for example. Most people need just two functions, stbi_load(), which loads any supported image format to a byte array. And stbi_image_free(), which frees the data.

But if you need anything more than that it's all there. e.g. loading from memory, loading via callbacks, support for HDR images, support for custom allocators, preprocessor flags let you exclude code for unused image formats, etc etc

Increasingly popular are the "single header libraries", which were popularised by Sean Barrett[0]. It's as simple as downloading the header, putting it somewhere in your tree and #including it where you need it. It's especially useful for redistributing libraries, but I've also found it useful to create these in my own projects.

[0]https://github.com/nothings/stb

Firefox has more than a 4% market share[0][1]. One of the main reasons I've heard, is that it's free, and that the Mozilla Foundation is a non-profit.

I also just found this bit, that explains how some browsers might be over or under estimated, because of how their internals work[2]. So we really don't know what the market shares really are.

[0]http://gs.statcounter.com/#browser-ww-yearly-2008-2016

[1]https://www.w3counter.com/globalstats.php

[2]https://en.wikipedia.org/wiki/Usage_share_of_web_browsers#Ac...

My biggest gripe with OOP is the Oriented part. If you design your entire codebase around OOP you will run into architectural problems. Especially with so-called Cross Cutting Concerns[0]. The way I tend to write code, is to just start with my main function and write whatever procedural code I need to solve my problem. If I start seeing patterns, in my data or algorithms, that's when I start pulling things out. I have heard this approach being called "Compression Oriented Programming", but I don't care much for what people want to call it.

This approach doesn't mean no objects ever. But only when your problem actually calls for it. Likewise you will also end up with parts that are purely functional, data-oriented, etc. But they will be used where they make sense.

On top of that I'm also using pure C99. It does away with a lot of the fluff and cruft in other languages. In the past I used to try to fit my problems into whatever the most fancy language features I was offered. Which cost me a lot of time analysing. Now I just solve my problem.

Mind you, C is not a perfect language. There are features I wish it had. But for my approach to programming it is the most sensible to use. Apart from maybe a limited subset of C++ (such as function overloading and operator overloading for some math)

[0] https://en.wikipedia.org/wiki/Cross-cutting_concern

This seems pretty draconic. To compare with a recent law passed here, in Belgium:

- A fee of 4.000 Euro to bring a product to market.

- Juice bottles of maximum 10ml

- No remote selling of e-cigarettes (but liquids are for some reason allowed)

- No advertising (with some exceptions)

The most surprising detail to me was how much water they have to drain out of the metro each day:

"As a result, he said, they “discharge approximately 2-million gallons of water a day.” In other words: about three Olympic sized swimming pools worth."

Here are some personal thoughts in no particular order:

- Most people are bound to be about average, that's how averages work. In life you've probably been through a couple of "selection procedures" (for lack of a better term) that redefine this average for you personally. Very early in life, the average is low. People with an intellectual disability get "filtered out" and end up in special care, and the average rises. After primary school (and I'm basing myself off of the Belgian school system, which I'm most familiar with), you start specialising. Some people choose a very hands on education (woodworking, mechanic, etc.) which doesn't require the same intellectual capabilities as, what we call, general education (lots of science, Latin, Greek, etc.). The average changes. Then you might go to higher education and choose between high school or university. The average changes. I hope you get the point by now: depending on how good (and I've focused purely on intellectual capability, you might focus on another quality) you are, you will find a very high or very low average. Whatever path people choose, they are bound to be around the about average in their path.

- Something that fits quite well with the previous point, is how high you've set your personal standard. I'm not here to tell you whether or not your standard is too high or too low, you have to decide that for yourself. But consider that someone aiming to be a top theoretical physicist is going to have a much harder time achieving his standard than someone aiming to have a family, dog and house, without struggling financially. This person is again going to have a much harder time achieving their standard, compared to someone living in a poor village in Africa, just wanting to not be starving. (And you might argue that person in Africa will have a much harder time not starving than an average male white American getting a house with a family and a dog, but that's besides the point)

- Keep this standard higher than your current personal level. It will keep you wanting to become better at whatever you're doing. But keep it realistic, that will prevent you from becoming hopeless about never reaching a certain standard.

- Just because people tell you you should be happy for not being that starving person in Africa, doesn't mean they're right. They're not entirely wrong either; there are people who have it a lot worse than you'll ever have. But someone else's struggles and troubles do not negate your own.

- There's also something that's known as selection bias[0]. This fits quite nicely with point one and two. Because of the standard you've chosen for yourself or the average you've ended up comparing against, you will have a tendency to see all the people doing better than you, and ignoring those doing worse than you. Again, this doesn't mean your struggle is irrelevant. It's just something to keep in mind when comparing yourself against others.

- But then again, is there any point in comparing yourself against others? A nihilist[1] might say it doesn't matter what you do in your life. That there is no inherent value to anything you do or achieve. That there is no particular meaning to life. Maybe you can find yourself in this reasoning?

- Think about relocating. Paying those college fees might not have been hard in Belgium. Up until this academic year, higher education cost about 650-700 Euro per year. Even less if your household earns less than a certain amount. Fees as low as 150 Euro are possible for a year of higher education.

- A silly example from my own life, incorporating some points I previously made: Take a look at my English. I wasn't born in an English-speaking country, never lived in one either. I think there is still a lot to be improved about my English. But compare my English to what you might see in the comments on certain websites. Is my English really that bad (especially when keeping in mind it's not my mother tongue). Then compare my English to what you might see in a work of Shakespeare. Is it even worth learning more if I'll never reach that level of English? But in the end: does it even matter how good my English is, as long as I can get my point across?

[0]http://en.wikipedia.org/wiki/Selection_bias

[1]http://en.wikipedia.org/wiki/Nihilism

WebGL Path Tracing 12 years ago

Loading the table and chair scene caused a huge memory leak, quickly consuming 14GB of memory and then crashing Firefox.

It's still a cool demo though!

If it behaves like RAM, from the POV of the OS, I'd imagine the advantage to be the large size. There's also the fact that it won't lose its data on power loss.

Of course, if it behaves like a regular SSD, the read speeds still exceed SATA3.0 speed.

I didn't get this from the article, but are there no automated cameras in the USA? In Belgium there are tons (I pass 5 on the 10 minute drive to my girlfriend), but they're a joke. If people know the road they're taking, they drive however fast they like, until they get near a camera. They slow down until they're out of reach and then speed up again. Also only about 1/3 actually have a camera in them, but they get rotated every once in a while.

Actual policemen with a camera are rather rare - considering how much road we have - and they get reported to radio stations. Though they're not allowed to tell listeners where they are exactly, only which road they're on.

Another fact, that recently struck me, also seems to make inequality larger. I'm not quite sure how to put it into words, but I'll try.

If we take an average middle class family and a rich family. Both want to build or buy a house. Let's suppose the houses they want cost the same, e.g. $200.000. The rich family pays $200.000 and is done. The middle class family however, will have to take a loan of, let's say, 20 years at 4%. This family will eventually pay almost $300.000 for that same house.

So because the rich family can buy things without loaning, they actually pay less. This might seem obvious to some, or most of you, but it still strikes me as "unfair" (though it's perfectly fair that you pay interest on a loan).

It's nowhere near as fascinating as some other stories here. But earlier this year I and a friend created an Android app for our school schedules. Initially we thought it would be easy; "let's ask the schools devs for an API or something".

Turns out it's a basically a black box they've bought from an obscure company.

We then needed to parse the HTML tables by hand, which should be relatively straight-forward for simple tables. But then it turns out the tables are filled with rowspans, colspans and nested tables. It took me quite a while to create a decent algorithm, as I had never done anything similar before. But now we can parse all the HTML tables on that website and cache them in the app.

As I said, nothing impressive or fascinating, but I was still quite proud of my algorithm.

I finally created an account on HN, just to thank you for telling me about Paul Lockart's essay. Only now do I realize why I don't like, nor properly understand mathematics - at least not mathematics as it's presented in schools.

Things like Conway's Game of Life, fractals, etc are all so insanely interesting and their results so beautiful. But in school they have you calculating boring functions that no one really knows what they're about.