Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
exDM69
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
781.
▲
by
exDM69
9y ago
> But honestly I am certain that it is something in particular and not something mysterious about conservation of energy/momentum which i have not come across yet, because there is no formula in that gravity simulation which should
782.
▲
by
exDM69
9y ago
The numerical methods used for this kind of calculations are engineered to compensate numerical errors (floating point and errors inherent to integrators). They take advantage of a priori knowledge about the laws of physics, in particular t
783.
▲
by
exDM69
9y ago
This uses BusyBox instead of GNU userland tools. You can complete this in an afternoon, but you can't get LFS done in that time.
784.
▲
by
exDM69
9y ago
Now do the same using symbolic computation. SymPy does it beautifully but it's much much more complicated than the equivalent in Scheme. Symbolic differentation a topic covered in the early chapters of SICP. Doing the same in Python re
785.
▲
by
exDM69
10y ago
Thanks for clarification. I didn't know that creating a thread guarantees visibility like that. But it makes sense, it would be more difficult to write correct code without it.
786.
▲
by
exDM69
10y ago
I'm pretty sure the example code is not correct, but may work out of luck. The first 'running = 1' is not guaranteed to be visible to other threads because there is no synchronization around it. In practice the pthread_create
787.
▲
by
exDM69
10y ago
Can someone explain the use of "volatile int running" here? I'm not sure it's correct but it might work here because the only place it's where it's read from without locking is the main thread (`while(cond->
788.
▲
by
exDM69
10y ago
30℅ less CPU use is roughly 30℅ less energy usage. The CPU will power down when it's done. Downclocking has negative impact because the CPU needs to be powered up longer and it is leaking current all the time it is not powergated.
789.
▲
by
exDM69
10y ago
This isn't free either because the free list is scattered around in memory and all that pointer chasing is bad for caches.
790.
▲
by
exDM69
10y ago
> C has type inference! This is only one-way type deduction (similar to C++ `auto` keyword) which isn't really proper two-way type inference. It just copies the type of the right hand side to the left hand side. E.g. given the follo
791.
▲
by
exDM69
10y ago
> Mainstream users could use such things so long as the UX was really, really good. I'm not so sure. In my experience with encrypted chat apps with non-technical people, they completely ignore any kind of security in the key exchang
792.
▲
by
exDM69
10y ago
> Is the Dutch sandwich illegal? If not, then blame your government I can't blame my government for it because the Dutch Sandwich is based on loopholes in several other countries' laws. I do blame the EU for not cracking down
793.
▲
by
exDM69
10y ago
Here [0] is a video link to SICP lecture 8A about Logic Programming, which accompanies the section 4.4. It's an excellent lecture! [0] https://ocw.mit.edu/courses/electrical-engineering-and-compu...
794.
▲
by
exDM69
10y ago
> FIA has, for decades, been explicitly forcing the cars to not be the fastest racing cars with byzantine restrictions on the design of the cars and even how they can be designed. Of course they are doing that. The whole history of F1, s
795.
▲
by
exDM69
10y ago
> I really wish they would mandate a single engine and a singe car type. Right now, it's the engine manufacturers (and the conglomerates behind them) that provide the biggest chunk of funding. If a single engine would be mandated, t
796.
▲
by
exDM69
10y ago
> Sadly unless you normalize the cars we may never see true racing as you say. For interesting single-make racing, you can watch the GP2 and GP3 races before/after the F1 race and qualifying (for European races, and a few others). T
797.
▲
by
exDM69
10y ago
> The issue is more about connection to external servers than the particular board itself. Oh I meant that the R.Pi would be the server where the IoT gadgets connect to. Located in your home and available through your home network connec
798.
▲
by
exDM69
10y ago
> A web based interface IMHO would be more usable. I'm sure you're not the only one but I can see how this could be much nicer than a Web UI for someone (like me) who prefers Vim and Mutt over Atom and Gmail. I have a supicis
799.
▲
by
exDM69
10y ago
Just out of curiosity: what prompted you to make it ncurses based? I can see lots of reasons why this could be practical but most of them (like bad network connection or slow hardware) belong to the past. Is it just a personal preference or
800.
▲
by
exDM69
10y ago
I'll try my best to explain with my electronics hobby background... It's full of analog circuitry like integrators, comparators, op amps etc (note: it's made from discrete transistors, so you won't find an opamp chip in
801.
▲
by
exDM69
10y ago
> What's the right way to design an IoT product to not be dependent on a startup's cloud servers? How about providing a single board computer like a Raspberry Pi and the software images (or source code if you can) to run the so
802.
▲
by
exDM69
10y ago
Eris is slightly smaller but more massive than Pluto. The discovery of Eris lead to the reconsideration of the definition of a planet. There's a choice to be made, either Pluto, Eris, Haumea, Makemake and Ceres are all planets or none
803.
▲
by
exDM69
10y ago
Yes, this is by design and it works as intended. I typically use this with doubles and DBL_EPSILON, which is much much smaller than FLT_EPSILON. With FLT_EPSILON this roughly equals to "zero" being "less than 0.001". If
804.
▲
by
exDM69
10y ago
Here's my less-than-scientific floating point near-equality test I use. bool zero(float x) ( return x*x < FLT_EPSILON; } bool equal_float(float a, float b) { return (zero(a) && zero(b)) || // bo
805.
▲
by
exDM69
10y ago
I write security critical software with C and I know exactly what you're talking about. It's written in C because the tooling to analyze and certify it for security in embedded/automotive/aerospace is targetting C (or C+
806.
▲
by
exDM69
10y ago
Yes, I've been using CMake again after a few years of something else. I came back to CMake because it seems to be the build system that sucks the least . I use CMake with Ninja, which is faster and nicer than plain old Make. CMake com
807.
▲
by
exDM69
10y ago
Obsessed? I don't think so. It's just that C has been around for 40 years, it'll stay around for at least another 40 years. You can still compile source code from 20-30 years ago with little or no modifications. C gets the jo
808.
▲
by
exDM69
10y ago
> I open up Uber and tell my destination, and Uber tells me 87₹. If the network is down, your Uber isn't going to open. Yet you can hail a cab and pay with cash (or credit/debit). Your taxi experiences are probably very differe
809.
▲
by
exDM69
10y ago
When the network goes down or the app backend has technical problems, the taxi fare meter will still work. It makes sure no-one gets ripped off (the passenger and the driver) and that taxes are paid correctly. It's not fool-proof of
810.
▲
by
exDM69
10y ago
There is ample evidence that smoking weed is bad for the health of the respiratory system. However, it is far less statistically likely to cause lung cancer than tabacco smoking. There are a few citations in this thread that should be able
More ›