Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ambrop7
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
ambrop7
9y ago
A (presumably controversial) way to use React is to use only props never state, manage state in your own variables (possibly in a separate "controller" class) and call forceUpdate() when you have changed those variables such that
62.
▲
by
ambrop7
9y ago
If anyone else is confused: the dates there are MM.DD.YYYY not DD.MM.YYYY
63.
▲
by
ambrop7
9y ago
I think syscalls are not as slow as many people imagine they are, especially with modern CPUs and kernels (there are special instruction for syscalls that are faster than the old "interrupt" approach). See here: http://
64.
▲
by
ambrop7
9y ago
In my free time I've been coding a TCP/IP stack in C++(14): https://github.com/ambrop72/aipstack . It uses a single-threaded event-driven architecture, is usable on embedded system (no mallocs), and is header
65.
▲
by
ambrop7
9y ago
Why would you use waitForBytesWritten if you want an event loop? Just do as the note says.
66.
▲
by
ambrop7
9y ago
Possibly so that the code corresponding to each commit builds/works, which makes bisect much easier.
67.
▲
by
ambrop7
9y ago
> I suppose experienced developers do as little as possible in callbacks (talking about C/C++ mostly) I have personally come to embrace the opposite approach: let callbacks do absolutely anything someone could do outside of a callba
68.
▲
by
ambrop7
9y ago
(as already mentioned, ints being 64-bit does not make it any more 64-bit) It may be just a bit of hacking in the some GCC platform configuration files (I'm guessing), and getting possibly tens to hundreds of packages to work with that
69.
▲
by
ambrop7
9y ago
Assuming the page is from America, it seems quite close to the worst considering I had to scroll through ~3 pages equivalent of weirdly horizontally scrolling images while all but the sky of the images was obscured by a cookie warning spann
70.
▲
by
ambrop7
9y ago
The best part is how you can zoom out in your browser and you can see as much around you as you need.
71.
▲
by
ambrop7
9y ago
It is already possible. The current test setup involves my APrinter software (firmware for 3d printers) ported to run on Linux including its web interface. It does indeed use a TAP interface and yes it reads/writes Ethernet frames (the
72.
▲
by
ambrop7
9y ago
I don't really intend to promote this yet but anyway here's my in-progress TCP/IP stack implementation: https://github.com/ambrop72/aprinter/tree/master/aipstack It is written in C++14, is
73.
▲
by
ambrop7
9y ago
I don't think there's really a "functional gap". All generally useful programming languages including Prolog are imperative "in the end" no matter what the books say, and anyone good at using them will think ab
74.
▲
by
ambrop7
9y ago
From the service configuration file posted on that reddit thread, it is a WCF based service and it seems to have metadata access enabled (the <endpoint address="mex"...> part). One could try to use Visual Studio to "add
75.
▲
by
ambrop7
9y ago
No pictures (of lifeforms)?
76.
▲
by
ambrop7
9y ago
If the HW has good vectored I/O support then it might be possible to send out data directly from user buffers. This is by composing a packet using two buffer descriptors, one for the header, which points to the next descriptor for the
77.
▲
by
ambrop7
9y ago
Please stop saying the documentation is "total mess" and "absolute shit" because this is far from the truth. There is comprehensive documentation available for Nix[1] and NixOS[2]. There is an online search for packages
78.
▲
by
ambrop7
9y ago
How can it be this was reported almost two years ago and nothing has been done?
79.
▲
by
ambrop7
9y ago
Yes, with SIGCHLD you can call waitpid(-1, &status, WNOHANG) in a loop until it fails, and you will collect all terminated children.
80.
▲
by
ambrop7
10y ago
It helps if you ever looked at the packets for example in Wireshark and have at some understanding of how TCP works. But the most important thing is the ability to read standards (RFCs).
81.
▲
by
ambrop7
10y ago
This is great. I don't see how I can resist making one. I will probably 3D-print the hardware but use my own electronics and SW for controlling it. (I'm kind of addicted to writing my own software for controlling 3D printers and t
82.
▲
by
ambrop7
10y ago
I am developing a new TCP/IP stack targeting embedded systems primarily. It is being written in a restricted subset of C++14 (e.g. no dynamic memory or exceptions, but virtual functions are great). There is a LOT of things complete alr
83.
▲
by
ambrop7
10y ago
One way to solve the scaling issue is to set the external monitor to a virtual higher resolution while still driving it at its native resolution (with scaling down done in GPU). Actually Linux/Xorg generally support this out of the box
84.
▲
by
ambrop7
10y ago
Right, this is basically what I said in my comment :) Thanks for the proposal reference.
85.
▲
by
ambrop7
10y ago
I suspect the issue is that variant<int,char> is not trivially copy constructible (at least when I tested on godbolt), so the ABI believes it is not allowed to pass the object by value. (this is a guess only, correct me if you know be
86.
▲
by
ambrop7
10y ago
I created a programming language called NCD. It is a mostly imperative language but where each statement can make the program backtrack to that point. The original intended use case was for configuring the network on Linux but it is really
87.
▲
by
ambrop7
10y ago
Why would STUN be necessary if the client is behind NAT? So long as the server is not, the client can send the first packet and NATs will establish associations for the packets from the server to arrive to the client.
88.
▲
by
ambrop7
10y ago
Obviously no, the first (for M==1) means exactly one is true, the latter at least one is true. But a1||...||aN is equivalent to bool(a1)+...+bool(aN)>0 (assuming no integer overflow :).
89.
▲
by
ambrop7
10y ago
> most programming languages don’t have an explicit “logical operator” for it I guess the author never taught of <boolean> != <boolean>. The only thing to be careful with is that it doesn't implicitly convert arguments t
90.
▲
by
ambrop7
10y ago
If it has memory safety issues then it's not written by experts :)
More ›