Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ambrop7
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
36 ms
·
271.
▲
by
ambrop7
12y ago
It immediately grabbed my attention that they used images for the column labels. Vertical text should be doable with CSS.
272.
▲
by
ambrop7
12y ago
Just do (x>y)-(x<y). It's actually pretty fast: http://stackoverflow.com/questions/10996418/efficient-intege... Disclaimer: not actually my original invention.
273.
▲
by
ambrop7
12y ago
I remember a few years ago, I hacked up the Wine source code so some skiing game would run at half speed. It totally worked :) It was even simpler than fluxcapacitor since you don't need to hook anything but just change the implementat
274.
▲
by
ambrop7
12y ago
One should know that it is the timer scheduler of the kernel which ends up doing the sorting. With Linux, this is probably a red-black tree[1], so performance of sleep sort (when it works) is O(n *log(n)). [1] https://www.kernel.
275.
▲
by
ambrop7
12y ago
Well I don't want to get into a flame-war regarding intrusive/containing or C/C++, but I will say that type safety and intrusive/container are orthogonal things. One can have a type-unsafe container as well as a type-saf
276.
▲
by
ambrop7
12y ago
I really prefer intrusive data structures, for the exact reasons outlined in the article. I've myself written many implementations of intrusive structures. But now I'd like to present the greatest of them, a super-generic implemen
277.
▲
by
ambrop7
12y ago
I just use Nix (see [1]), for Python stuff and everything else. I've never tried to use virtualenv and hope I never will. [1] https://nixos.org/wiki/Python
278.
▲
by
ambrop7
12y ago
Regarding the problem of the external display, the DPI disparity is "easily" solved by configuring the external display with a high apparent resolution but down-scaling to what the device actually supports[1]: xrandr --output <
279.
▲
by
ambrop7
12y ago
How much of the advertised functionality does it have if you don't want to turn your data over to Microsoft?
280.
▲
by
ambrop7
12y ago
That the process is being memory limited shouldn't make it impossible for another process to read its cmdline. The cmdline data of the process should already be in memory. EDIT: I suspect that this problem is a consequence of a silly d
281.
▲
by
ambrop7
12y ago
Would it be hard to fix this specifically in the kernel? I don't know the details of the implementation, but I suppose those regions of memory holding the required information for /proc to work could be made always accessible, eve
282.
▲
by
ambrop7
12y ago
But in theory the same CA infrastructure as used for the web could be used. The SSID of the network would be interpreted as the "domain". So if I try to connect to SSID example.com securely, I would verify that the AP can identify
283.
▲
by
ambrop7
12y ago
Most people don't understand the WPA PSK security model and its insufficiency for anything but private networks where every device is trusted. When you give someone the PSK, you give them the capability to impersonate the access point.
284.
▲
by
ambrop7
12y ago
I can't help myself but every time I hear "octave", I think fencepost error.
285.
▲
by
ambrop7
12y ago
That is not correct. In C99, _Bool (and the typedef bool) are special, because when any value is converted to _Bool, the result is 0 or 1 (!!x). Although the standard does not explicitly say that _Bool can only hold anything other than 0 an
286.
▲
by
ambrop7
12y ago
When a HID device is plugged in, the OS presents the user with a random number and requests that it be typed (if you only have a mouse, an on screen keyboard can be used). The newly plugged in HID device would not be fully active until the
287.
▲
by
ambrop7
12y ago
> showing that it’s possible to corrupt any USB device with insidious, undetectable malware That is surely false. It depends on the type of microcontroller used and its configuration. And indeed the github link in the article is only for
288.
▲
by
ambrop7
12y ago
I hold second place :) https://github.com/ambrop72/aprinter/blob/master/aprinter/En...
289.
▲
by
ambrop7
12y ago
The clean approach is to wrap functions into classes: class Wrap { void call() {...} }; template <typename F> { ... F::call(); } And with some imagination one can write a macro to do this wrapping given an existing function, used like
290.
▲
by
ambrop7
12y ago
Can someone explain why bash is evaluating and looking for function definitions in every environment variable? What would be broken if this entire "feature", whatever it is, was completely disabled? That's almost like a C com
291.
▲
by
ambrop7
12y ago
I don't like to sound hateful, but this is an obvious solution that any competent person knowing how TLS works would find. If someone tried to patent it, I suppose every smart card would be considered prior art. The only "novelty&
292.
▲
by
ambrop7
12y ago
It must be so hard to expand the abbreviation once.
293.
▲
by
ambrop7
12y ago
Keep in mind that functional programming is inherently less efficient than a random access machine[1]: ... And it is not easy to create their equally efficient general-purpose immutable counterparts. For purely functional languages, the wor
294.
▲
by
ambrop7
12y ago
I'm wondering if the exception is when the preceding ring_bell() function never returns? Then there is no undefined behavior since the line with undefined behavior is never reached. So one could conclude that the compiler has to prove
295.
▲
by
ambrop7
12y ago
So what's the (Windows compatible and open source) software to transition systems to?
296.
▲
by
ambrop7
12y ago
Correction: While the socket is an implementation concept in some implementations, it generally is not. From RFC 793 (TCP): To allow for many processes within a single Host to use TCP communication facilities simultaneously, the TCP pro
297.
▲
by
ambrop7
12y ago
Yes, it's an optimization, it'll just make the common case (include guard) faster, without breaking anything.
298.
▲
by
ambrop7
12y ago
Why not spend all that time that goes into making changes to the UI on actual functionality, like multi-process, sandbox, faster WebGL?
299.
▲
by
ambrop7
12y ago
I wrap the nixos-rebuild command into a script that sets a custom nixpkgs: #!/bin/sh exec nixos-rebuild -I nixpkgs=/etc/nixos/nixpkgs "$@" This itself works, but then you're probably still using chann
300.
▲
by
ambrop7
12y ago
I'm using NixOS for my HPTC and home PC. It took some to set it all up, including adding a few new packages (mostly related to 3D printing) and fixing some, but now it's running well and I'm really happy. I've always wan
More ›