Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ambrop7
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
52 ms
·
421.
▲
by
ambrop7
14y ago
Yeah, I get that it may be non-trivial to avoid head-of-line blocking in that context, but I doubt that it's impossible. If it is impossible, maybe Erlang just isn't the best tool for the job. From what I've read, I think you could create a
422.
▲
by
ambrop7
14y ago
> ... head-of-line blocking ... What’s the remedy? I don't know anything about Erlang or the software they're dealing with, but I'm surprised that "program your software to avoid unnecessary head-of-line blocking" didn't make the list.
423.
▲
by
ambrop7
14y ago
which essentially means it needs exponential time, and as such is useless
424.
▲
by
ambrop7
14y ago
Or you could just read the laptop specs and see how they probably say "X GHz" and not "X GHz persistent load, Y GHz at peaks". Also look for things like "software has to downclock the CPU if it gets too hot". (btw, the Linux kernel does do
425.
▲
by
ambrop7
14y ago
If your laptop can't stand 100% CPU (and GPU) load for an indefinite time, you should consider it broken (or just very clogged up with dust). Anyway, it's very unlikely that Linux was persistently loading your system while it's supposed to
426.
▲
by
ambrop7
14y ago
> The idea that we'll all have 3d printers in our home is possibly a bit silly. I have a 3d printer at home, or at least a half-assembled one :) You can get one for yourself at http://reprappro.com/ . The smaller one is only around $6
427.
▲
by
ambrop7
14y ago
So you're saying if you were given a mouse movement trace on top of a virtual keyboard, you couldn't possibly deduce what was typed? Someone should just make a program that does that, and this will all be settled. Maybe even make it guess w
428.
▲
by
ambrop7
14y ago
How useful is this mechanism in practice? It seems very limited to me, because you can't just call a coroutine from another coroutine, and expect it to do its job asynchronously, without the caller having to manually deliver events to it.
429.
▲
by
ambrop7
14y ago
> If you had to federate identities between two directories, would you hack something together Right, that "try it yourself" part can get very big and impractical. But the idea still stands: it would be better if you first tried to thin
430.
▲
by
ambrop7
14y ago
> Given an undirected graph, in which you need to calculate the shortest path between two vertices, would you slog it out or would you just find a shortest path algorithm? Probably just find an algorithm. This is because my goal was no
431.
▲
by
ambrop7
14y ago
> Consider though that in this community 99.9% of the time others have solved your problem before. You could reinvent the wheel (which is arrogant), or you could do some research to see which architecture has been successful for others.
432.
▲
by
ambrop7
14y ago
OpenTTD in Emscripten is particularly impressive: http://play-ttd.com/
433.
▲
by
ambrop7
14y ago
See my port of my little scripting language (NCD) to Emscripten: http://badvpn.googlecode.com/svn/wiki/emncd.html
434.
▲
by
ambrop7
14y ago
To me, "Rule of Zero" sounds more like not implementing {con,copy-con,de}structors, i.e. forgoing RAII. I've been doing this quite a lot, and it makes writing low-level and optimized code so easier. Actually, I find that having fixed owners
435.
▲
by
ambrop7
14y ago
Sure. But: - How do I make sure any other systems I own also get the patched version? (Gentoo: set up an overlay and commit the fixed package) - How do I get notified when the package was updated upstream and my patch is no longer being app
436.
▲
by
ambrop7
14y ago
If only there was an easy way for a user to add a few patches to an Ubuntu package. Not hacks like checkinstall that don't do dependencies or anything. Maybe something like copying /usr/portage/app-emulation/wine to /usr/local/portage/app-e
437.
▲
by
ambrop7
14y ago
A very nice feature of epoll is that an epoll file descriptor (which monitors a set of file descriptors) can itself be monitored via epoll/select/poll. This means that if epoll is available, a library can abstract all its I/O via a single f
438.
▲
by
ambrop7
14y ago
The solution I have done in my software is to close all unneeded file descriptors right after fork() in the child [1]. It can be argued that this is not the best solution because every place where fork() is called needs to be patched, and t
439.
▲
by
ambrop7
14y ago
$ tar xf autotools-using-package.tar.bz2 $ cd autotools-using-package Configure, compile, install. Oh, I found this little bug. Let's try to fix it ... edits configure.ac .... $ ./autogen.sh Error: possibly undefined macro A
440.
▲
by
ambrop7
14y ago
Thanks for explaining that. I wasn't aware Protothreads was such a hack, and so limited.
441.
▲
by
ambrop7
14y ago
It seems I missed the part where you asked about detecting new connections. That's possible too :) http://code.google.com/p/badvpn/wiki/NCD#Handling_events_wit... But then be careful with your dependency names, because they are global.
442.
▲
by
ambrop7
14y ago
It sure it possible. Seems like the perfect case for the multiprovide() module (CTRL+F on wiki for more info, and also the in-source documentation http://code.google.com/p/badvpn/source/browse/trunk/ncd/modu... ). process lan {
443.
▲
by
ambrop7
14y ago
Concerning NetworkManager, you might like my NCD scripting language designed specifically for programming of network configurations. http://code.google.com/p/badvpn/wiki/NCD
444.
▲
by
ambrop7
14y ago
There seem to be a lot of implementations of the same concept around, that is transforming code to an asynchronous state machine. See my comment at a previous thread [1]. Some implementations not mentioned in this submission are TameJS (for
445.
▲
by
ambrop7
14y ago
Yes, Tamejs and CPC indeed do exactly what I had in mind. CPC is particularly amazing for doing this to C. Considering NCD: you might have noticed that NCD was never meant to be a general-purpose language, but rather a simple scripting lang
446.
▲
by
ambrop7
14y ago
Hey, that was my idea too, see my own comment [1]. I've actually developed a (very simplistic) programming language utilizing this approach. I even compiled the interpreter to Javascript so you can try it our from the browser. [1] http://n
447.
▲
by
ambrop7
14y ago
I think the author is missing the obvious and natural solution: let the programmer write code in a completely synchronous (blocking) style, but have the programming language execute it an an asynchronous and concurrent fashion. Something li
448.
▲
by
ambrop7
14y ago
On my TS-7800 [1] which has GigE and a 500MHz (!) CPU, Samba outperforms the Raspberry Pi (15MB/s vs 7MB/s). Note that on the RPi not even the whole 100Mb link is utilized despite the CPU being slightly faster in general (yes, I did some be
449.
▲
by
ambrop7
14y ago
No, userland means that it runs in user space, as opposed to within the kernel. Firmware is another matter of course.
450.
▲
by
ambrop7
14y ago
Nothing AFAIK. The kernel part has already been open source in the Raspberry Pi kernel fork: https://github.com/raspberrypi/linux/tree/rpi-3.2.27/drivers... The userland part is the implementation of hardware accelerated OpenGL ES 2 and O
More ›