News for hackers. Stuff that matters.

asgeir

Have you tried looking into something like NASM's macro functionality?
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.

Re:Arm is canceling Qualcomm's chip design license on Wednesday October 23, 2024 @05:30AM (#41923362)
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
Re:When Objects Are Not Enough on Thursday July 25, 2024 @10:53AM (#41069409)
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.

Re:When Objects Are Not Enough on Thursday July 25, 2024 @10:03AM (#41068808)
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.

Re:When Objects Are Not Enough on Thursday July 25, 2024 @09:27AM (#41068445)
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.

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.

Re:Falsehoods programmers believe about undefined behavior on Monday November 28, 2022 @11:03AM (#33775273)
It seems that you may be correct.

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

Re:Falsehoods programmers believe about undefined behavior on Monday November 28, 2022 @09:55AM (#33774345)
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.

Re:Falsehoods programmers believe about undefined behavior on Monday November 28, 2022 @07:37AM (#33772842)
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...

Re:EU Passes Law to Switch iPhone to USB-C by End of 2024 on Tuesday October 04, 2022 @04:16PM (#33086122)
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...

Re:EU Passes Law to Switch iPhone to USB-C by End of 2024 on Tuesday October 04, 2022 @09:56AM (#33080442)
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.

Re:Physics duo finds magic in two dimensions on Wednesday August 17, 2022 @04:27AM (#32493757)
And Super Hexagon is an excellent game (with a great soundtrack) https://superhexagon.com/
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. :)

Re:The Windows malloc() implementation from MSVCRT is slow on Saturday July 02, 2022 @05:33PM (#31962661)
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

Re:Show HN: I'm making a dynamic language in Rust on Monday April 25, 2022 @06:43AM (#31152734)
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

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...
Re:In C, how do you know if the dynamic allocation succeeded? on Saturday November 06, 2021 @06:06AM (#29128942)
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

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...
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

Re:Systemd: The Good Parts on Monday May 17, 2021 @06:02AM (#27181750)
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

This is correct for a half-closed interval https://mathworld.wolfram.com/Half-ClosedInterval.html
Re:Live feed from Iceland erupting volcano [video] on Monday March 22, 2021 @05:42AM (#26538612)
Re:Live feed from Iceland erupting volcano [video] on Monday March 22, 2021 @05:22AM (#26538460)
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
Re:Live feed from Iceland erupting volcano [video] on Monday March 22, 2021 @04:51AM (#26538273)
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...
Re:Live feed from Iceland erupting volcano [video] on Monday March 22, 2021 @04:37AM (#26538176)
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.

Re:How Iceland got teens to say no to drugs (2017) on Saturday July 25, 2020 @05:34PM (#23952607)
I didn't say it was. I've merely speculated on why this particular law is in place.

Older »