Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
abbeyj
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
abbeyj
2mo ago
Try examining the old entries from the https://en.wikipedia.org/wiki/Underhanded_C_Contest .
2.
▲
by
abbeyj
2mo ago
You would have to give the compiler some help to allow it to auto-vectorize this. Warning, untested: https://godbolt.org/z/b358bMWzG . This unrolls the loop by 16 times. The trick is using `&` instead of `and` so
3.
▲
by
abbeyj
2mo ago
I'm not clear on why there is `ip++` in the RECORD_INST handler. We've already moved to the next instruction by running `ip++` at the end of the handler in the normal dispatch table. In the RECORD_INST handler we do the work to
4.
▲
by
abbeyj
2mo ago
I think they meant EPIC https://en.wikipedia.org/wiki/Explicitly_parallel_instructio... , not EPYC https://en.wikipedia.org/wiki/Epyc .
5.
▲
by
abbeyj
3mo ago
They might have been inspired by a similar feature in previous chips, like the external video support in the TMS9918: https://en.wikipedia.org/wiki/TMS9918#External_video . If they had extra pins that they had no use fo
6.
▲
by
abbeyj
3mo ago
The one that immediately springs to mind is C#. Of all the mainstream languages it is probably the one most similar to Java. It can be compiled into platform-independent bytecode (like Java) or into native code using Native AOT. Relevant
7.
▲
by
abbeyj
5mo ago
> The Python one-liner is there because most modern shells refuse to create a non-UTF-8 filename for you. Both `echo -ne 'weird\xffname\0' > list0` and `printf 'weird\xffname\0' > list0` seem to work fine for me
8.
▲
by
abbeyj
7mo ago
I'm a bit confused about the colors used in the CPU graphs. In the first graphs it looks like green means that the application is running and red means that the GC is running. But once we get to Figure 4 then red means the GC is runn
9.
▲
by
abbeyj
7mo ago
Doing both of those things does seem to help: https://godbolt.org/z/1vv7cK4bE GCC trunk seems to like using `bool` so we may eventually be able to retire the hack of using `int`.
10.
▲
by
abbeyj
7mo ago
That would probably be difficult at optical wavelengths. At radio wavelengths you might have a better shot, but we can build radio interferometric telescopes on Earth and since the atmosphere is relatively transparent at radio frequencies,
11.
▲
by
abbeyj
8mo ago
It depends on what you want. If you want to install an old copy of Visual Studio from 20 years ago then you should be able to write a program and compile it and have that work on XP. But that comes with limitations. You're not going
12.
▲
by
abbeyj
9mo ago
You have a typo in there. You want https://www.google.com/search?q=%2810%5E100%29%2B1-%2810%5E1... . Google also gets the "wrong answer" for this expression, 0 instead of 1.
13.
▲
by
abbeyj
9mo ago
The page is 404 now. It looks like something went wrong when the author was trying to push a small edit to the page. The content is viewable at https://github.com/hiAndrewQuinn/til/blob/main/copy-item-i
14.
▲
by
abbeyj
10mo ago
> We all know that strlen will return 5, but some compilers don't: https://godbolt.org/z/M7x5qraE6 I feel like it is unfair to blame the compiler when you've explicitly asked for `/O1`. If you change
15.
▲
by
abbeyj
10mo ago
If you want to tell the compiler not to worry about the possible buffer overrun then you can try `int foo(char const s[static 4])`. Or use `&` instead of `&&` to ensure that there is no short-circuiting, e.g. `if ((s[0] == 
16.
▲
by
abbeyj
11mo ago
> "Pepp(?) boards" "Perfboards", perhaps?
17.
▲
by
abbeyj
1y ago
Are you thinking of https://web.archive.org/web/19990508050925/http://support.mi... ? Or was there a different bug in NT 4?
18.
▲
by
abbeyj
1y ago
You need `"$@"`, not just `$@` at the end of the command. Otherwise it will split any arguments that have spaces in them. E.g. try long_fn() { echo "$1" sleep "$2" } to 1s long_fn &
19.
▲
by
abbeyj
1y ago
I also used mingw and yet I arrived at different results. Maybe it was a different version, or a different distro of MinGW, or a 32-bit vs. 64-bit issue, or I'm linking against a different CRT. Without details from OP, we can't
20.
▲
by
abbeyj
1y ago
I tried to reproduce this binary to see what the 278 KB was being taken up by. The first obstacle that I ran into was that the build.bat file doesn't work if you have git configured to use core.autocrlf=false. Changing that to core.a
21.
▲
by
abbeyj
1y ago
It seems like it should be possible to factor out most of the iterator boilerplate into a helper class. Then each place where you want to iterate you can construct an instance of that helper class and supply a lambda that specifies how to
22.
▲
Probability Probably Doesn't Exist
(scientificamerican.com)
2 points
by
abbeyj
2y ago
|
0 comments
23.
▲
by
abbeyj
2y ago
This is probably technically out of scope for this article. Long-running processes that respond to SIGHUP will usually be running detached (with no controlling TTY). Thus it is a bit of stretch to call them "terminal programs".
24.
▲
Major leap for nuclear clock paves way for ultraprecise timekeeping
(nist.gov)
12 points
by
abbeyj
2y ago
|
10 comments
25.
▲
by
abbeyj
2y ago
I built a browser-based version that allows you to rotate it: http://www.stardrifter.org/regexp/
26.
▲
by
abbeyj
2y ago
> The student dutifully changed the line, and both tools reported their satisfaction with the replacement clang-tidy's `modernize-use-emplace` check warns for both the original version that uses `push_back` (as quoted in the article
27.
▲
by
abbeyj
2y ago
This is how Dalvik (the old Android Java interpreter) worked, with 64 chosen as the size of an instruction handler. See https://wladimir-tm4pda.github.io/porting/dalvik.html (search for "computed goto").
28.
▲
by
abbeyj
2y ago
Could you use something like `template <StringLiteral str> constexpr inline Key<str> key;`? Then you could write `key<"myKey">` instead of `Key<"myKey">{}`, saving you from needing the `{}` each
29.
▲
by
abbeyj
3y ago
This is quick and dirty but it works on this particular site: javascript:void(addEventListener('keydown',e=>e.keyCode==32&&e.stopPropagation(),true)
30.
▲
by
abbeyj
3y ago
> Line 3000 starts with REM, short for “remark”. We call them “comments” these days, but the ZX Spectrum is British, the brainchild of mad genius Sir Clive Sinclair. I'm not sure, but is this statement implying that `REM` is a Briti
More ›