HNHacker News
TopNewBestAskShowJobs

asgeir

208 karma · joined July 5, 2014

submissionscomments
asgeir··on Customasm – An assembler for custom, user-defined instruction sets
Have you tried looking into something like NASM's macro functionality?
asgeir··on What every systems programmer should know about concurrency (2020) [pdf]
It often refers to programmers that develop things that other programmers use to construct applications. A systems programmer may work on compilers, operating systems, framework libraries, etc.

They will also often work with lower-level abstractions, such as threads, so that the higher-level developers need not think about them in their own designs.

asgeir··on Arm is canceling Qualcomm's chip design license
In Norse mythology, Heimdallr was born of nine sisters. I'm not sure that it took any less time than usual, but I enjoy the story all the same. https://en.wikipedia.org/wiki/Nine_Mothers_of_Heimdallr
asgeir··on When objects are not enough (2021)
It's possible that we are talking at cross purposes.

I think you might be arguing that the object itself does not include the set of functions/methods/operations that act on it, whereas I see them as another attribute of the class/type which is an attribute of the object.

asgeir··on When objects are not enough (2021)
I would still classify that as object oriented behavior.

You have a class/type of objects, and you have a set of functions or operations which are associated with (loosely or tightly) and operate on that type of object.

For example, I would say that file descriptors are a handle to a type of object. They encapsulate the thing that they represent (file, DRM buffer, eventfd, whatever), and some of the functions that operate on them are polymorphic. For example, read, close, ioctl, etc., don't care if the file descriptor is a file, a queue, or whatever.

You use syscalls to interact with file descriptors, but they are just as much object handles.

asgeir··on When objects are not enough (2021)
It's not a requirement, but an immutable object has fewer uses than a mutable one.

Functions/methods/actions/operations are just different names for the operations which mutate the state of the object. So, I would argue that they are a necessary attribute of mutable objects.

asgeir··on Transformers Can Do Arithmetic with the Right Embeddings
In my experience, LLMs tend to perform better if you give them instructions before the data to be operated on. At least for the ~13b size models.

So,something like: Please count the number of words in the following sentence. "What is the number of words in the sentence coming before the next one?"

edit: Which might be an artifact of the training data always being in that kind of format.

asgeir··on What is a Vector Database? (2021)
https://www.youtube.com/watch?v=gQddtTdmG_8
asgeir··on Falsehoods programmers believe about undefined behavior
It seems that you may be correct.

At the very least I am unable to construct a counter-example so I concede this point

asgeir··on Falsehoods programmers believe about undefined behavior
The undefined behavior can still affect code generation even though the program gets translated.

It's just that the generated code may not do exactly what you expect it to do because the presence of undefined behavior allowed the compiler to make assumptions which may surprise you.

edit: It seems that I am incorrect

asgeir··on Falsehoods programmers believe about undefined behavior
The compiler may make optimization decisions based on the presence of UB so the code only needs to be present.

The compiler can't know that an arbitrary part of a function is unreachable if, for instance, that code path is controlled by a parameter or global state since that equates to solving the halting problem.

https://blog.llvm.org/2011/05/what-every-c-programmer-should...

asgeir··on EU Passes Law to Switch iPhone to USB-C by End of 2024
To be clear. I think that both connectors have their own problems.

Just because I've not had the center nub break in any of my USB-C devices that doesn't mean it's not a problem for someone else.

Similarly, I've had the springs in a Lightning port give out so that no cable worked and the port needed replacing.

I still think that having the springs in the cable connector is a more durable design but the USB-C center nub is probably too thin.

(edit) Here is the chief FireWire architect talking about the same design rationale for the FW400 connector http://www.johasteener.com/what-is-firewire.html#Why_the_4-p...

asgeir··on EU Passes Law to Switch iPhone to USB-C by End of 2024
USB-C has the springs in the plug while the receptacle is only fixed contacts. Lightning on the other hand has the springs inside the receptacle.

This means that for USB-C you replace the cable when the springs wear out, but for Lightning you need to replace the port.

Cleaning lint out of a USB-C receptacle with a toothpick is safe, but sticking anything into a Lightning port could damage the springs.

asgeir··on Physics duo finds magic in two dimensions
And Super Hexagon is an excellent game (with a great soundtrack) https://superhexagon.com/
asgeir··on Iceland’s forest and bush cover has increased sixfold since 1990
It is slightly unfair to say there's barely an ecosystem. If all you've seen is Reykjanes between Keflavík and Reykjavík then sure it might look like a bleak, moss covered, rocky desert. But the thing is that different regions can vary quite drastically in their level of vegetation. You might have farmland on one side of a mountain but on the other side a vast sandy desert.

But, to be fair, if your measure of a fertile landscape is a forest then those are relatively few and far between. Personally I tend to feel a bit claustrophobic when there are trees boxing me in on all sides and I can't see the mountains. :)

asgeir··on The Windows malloc() implementation from MSVCRT is slow
Part of it is whether the code can be traced back to original AT&T code. Which would be true for e.g. BSD variants (which includes MacOS). https://i.redd.it/kgv4ckmz3zb51.jpg

Another part is the trademark and certification fee. https://www.opengroup.org/openbrand/Brandfees.htm

asgeir··on Show HN: I'm making a dynamic language in Rust
You might be interested in these articles if you want to experiment with alternative approaches to the intrusive linked-list and are OK with using object pools. Very handy if you want to have cheap alloc/free and want good memory locality for updating the objects.

https://slideplayer.com/slide/4470263/

https://gamesfromwithin.com/managing-data-relationships

asgeir··on AudioTransmit – Transmitting data between computers using audio
You're probably thinking of the initial handshake bit rather than what the middle of the data stream sounded like. https://www.windytan.com/2012/11/the-sound-of-dialup-picture...
asgeir··on In C, how do you know if the dynamic allocation succeeded?
You can find a number of technical deep-dives for classic video game consoles where people have had do deal with very limited resources.

This video springs to mind as one example: https://www.youtube.com/watch?v=tfAnxaWiSeE

asgeir··on Resident Evil Village crack completely fixes its stuttering issues
It can be useful to break the game in subtle ways so that the crackers have a harder time knowing when the crack is fully done. https://www.nag.co.za/2013/10/23/the-5-biggest-and-most-awes...
asgeir··on Nvidia cripples cryptocurrency mining on RTX 3080 and 3070 cards
You might want to look into GloriousEggroll, it tends to have better support for media and such.

https://github.com/GloriousEggroll/proton-ge-custom/wiki

asgeir··on Systemd: The Good Parts
Have you tried increasing the log-level in /etc/systemd/system.conf? You can also set LogTarget=kmsg if you have issues with the journal. You can also control this with the kernel command line if you prefer https://www.freedesktop.org/software/systemd/man/systemd.htm... You could try a kernel command line like this 'systemd.log_level=debug systemd.log_target=kmsg' for instance

You can also look at systemctl list-dependencies local-fs.target to see if it has any failed dependencies

You can also use systemctl show local-fs.target to sanity-check it to see if there are any local modifications to the target that are breaking it

asgeir··on Google’s copying of the Java SE API was fair use [pdf]
This is correct for a half-closed interval https://mathworld.wolfram.com/Half-ClosedInterval.html
asgeir··on Live feed from Iceland erupting volcano [video]
This is from the webcam at the time. https://www.ruv.is/frett/2021/03/21/gigbarmurinn-gefur-sig-o...
asgeir··on Live feed from Iceland erupting volcano [video]
I find it hard to estimate the position from the top-down view compared to when I was there, and I just copy-pasted the coordinates from Google Maps
asgeir··on Live feed from Iceland erupting volcano [video]
And if you want to see the definition of terror, look at the second video on this page when part of the main crater collapsed https://www.ruv.is/frett/2021/03/21/hraunrennsli-dagsins-a-o...
asgeir··on Live feed from Iceland erupting volcano [video]
Looks to be about half a kilometer. The webcam looks to be at about 63.89045405043735, -22.279054215941507 and the main crater is at about 63.88921695342744, -22.269097856211175

The main crater is only a few tens of meters tall.

asgeir··on How Iceland got teens to say no to drugs (2017)
I didn't say it was. I've merely speculated on why this particular law is in place.
asgeir··on How Iceland got teens to say no to drugs (2017)
That was meant as a joking way to say I'm afraid the lawmakers didn't think that far ahead and overstepped their bounds.
asgeir··on How Iceland got teens to say no to drugs (2017)
I'm afraid that might be asking for too much subtlety from the law. :)

It just says "children age 12 and younger may not be outside after 20:00 unless accompanied by an adult. Children ages 13 to 16 may not be outside after 22:00 unless they're returning home after an approved school-, athletic-, or youth-program function. Between may first and september first children may stay out an additional two hours"

Even though it's not stated the "accompanied by an adult" applies to ages 13 through 16 as well.

Page 1 of 3Next →