Hacker News new | past | comments | ask | show | jobs | submit | more jhatemyjob's comments login

This is why the aforementioned ABI (of the latter language in the title of this post) won't die for a long time. The name of the game is compatibility, not performance/security. Bell Labs was first.


The C ABI won't die because it has a stranglehold on *NIX. Every new language you make has to conform in some way to C in order to use syscalls.


That is not true on Linux, where you can just make syscalls yourself. They don't even use the C ABI, even if it's pretty similar (For syscalls, the fourth argument is passed in R10 instead of RCX, since that holds the return address for sysret).


You can call a syscall with assembly, but the result it gives you follows C's formats. Maybe your language does integers in a different way so you still have to abide to it's standard to adapt what the OS gives you


I'd argue that it follows the CPU's native integer representation, which C also does. Yes, if your language uses tagged integers or something, you'll have to marshal the syscall arguments/results from/to your own representation, but the same is true if you want to use those integers for arithmetic (beyond trivial additions or multiplying/dividing by a power of two, for which you can use lea).


Mine was not a critique. Of course every OS needs to be programmed with a language and its syscalls will be formatted accordingly. And if you want to program using an OS's features, other than the compilation to assembly, you also have to worry about inter-operating with what the OS provides. I'm simply noting that for the foreseeable future, C's way of doing things will always have to be kept in mind when writing dev tools


Sure, that makes sense. Out of curiosity, do you know of any way to design a syscall ABI that's not C-like that was either used in the past or would have some advantages if a new OS adopted it? I imagine that lisp machines did things differently, but a) I don't know whether they had syscalls as such or simply offered kernel services as regular functions and b) they did have microcode support for tagged integers and objects.

I'm asking since I want to get into (hobbyist) OS development at some point and would love to know if there's a better way to do syscalls.


Yes, C and Unix are closely related.


Yes, I think rust made a big mistake for not going for a stable (or at least mostly stable like C++) ABI (other than the C one). The "staticly link everything" is fine for desktops and servers, but not for e.g. embedded Linux applications with limited storage. It's too bad because things like routers are some of the most security sensitive devices.


> or at least mostly stable like C++

The C++ ABI doesn't solve generics (templates); C++ templates live in header files, as source code, and get monomorphized into code that's embedded in the binary that includes that header. The resulting monomorphized code is effectively statically linked, and any upgraded version of a shared library has to deal with old versions of template code from header files, or risk weird breakage.

Swift has a more realistic solution to this problem: polymorphic interfaces (the equivalent of Rust "dyn"). That's something we're taking inspiration from in the design of future Rust stable ABIs.

> but not for e.g. embedded Linux applications with limited storage

Storage is often not the limiting factor for anything running embedded Linux (as opposed to something much smaller).

The primary point in favor of shared libraries is to aid in the logistics of upgrading dependencies for security. It's possible to solve that in other ways, though.


You find a good manager the same way you would find a good IC: https://youtube.com/watch?v=QplyFXgIx7Q


That's great, but the video goes on to say that he hired a trained manager (an MBA) with zero experience in manufacturing to manage the Macintosh manufacturing team...

So, do as I say not as I do?


That clip lacks context. Before that clip he was talking about engineers/designers. I think that documentary is just poorly edited, they interspersed Steve's monologue with something that was only loosely related to what he was saying. Manufacturing is labor, it doesn't require much brains. Whoever manages a team like that probably doesn't need to have much experience being on the ground floor.

Here's a longer clip (uploaded by Andy Hertzfeld himself!) which has more context: https://www.youtube.com/watch?v=l3agg64LM88


Is there anyone out there that will make a GC Nano for a fee? Don't have time / skillz to do this myself but I want one


I would say that it is just a bad idea for a start unless you plan to use wireless controllers.

With cable connected one you are just looking for a console that would be dragged left and right every time you pull a bit with the controller.


This is an insane response. This does not concern me at all and has nothing to do with what I said.


-


Wouldn't this let you run a front end on the edge with Nginx??? Sounds fun!


Are you really surprised though? Like you alluded, people use Kubernetes and Bazel just because it has the big ol' G stamp on it. GraphQL is no different

(Well... slightly different. It's the FB stamp, not the G stamp)


I'm surprised it took so long.

I worked with k8s and realised pretty quickly it was pointless for my org.


Yeah that's what I'm saying, it shouldn't be surprising, these delusions last entire careers. Look at all the people who base their career on Java


I just picked java up again recently and it's really OK now. I'd have used it for my project but spring boot doesn't have an auto-generated admin like django so I binned it.


The Java thing was a joke lol.


Plus there's a million ways you can get screwed out of your equity


This was my opinion until I got the Kindle Scribe, turns out the Kindle was too damn small


This is a great idea and I am glad it is BSD licensed. Unfortunately the execution is somewhat lacking. SQLite is best suited for embedded / clientside applications with minimal dependencies. The author of this project decided to use Go and make it a service.


> SQLite is best suited for embedded / clientside applications with minimal dependencies.

Often repeated and certainly rooted in truth but there was a healthy discussion on here the other day[0] where tptacek shared a link in a comment[1] to a related blog post about getting more scale out of using SQLite serverside.

0: https://news.ycombinator.com/item?id=39975596

1: https://kerkour.com/sqlite-for-servers


Did I?

> Both in-process (Go API) and standalone (RESP) servers.

In-process means that the database is "embedded / clientside" in your terms.


It's a server.


Do you usually embed redis?


I would like to.


You want to use an in-mem database like SQLite or DuckDB or even replicate the data structures in-code that redis uses. Redis doesn't really add a whole lot to the table over a general programming language with a good standard library other than being shared over a network.


Exactly, the standard library is what I'm after. I am currently using SQLite but I prefer the redis interface


What would you use Redis or substitutions for in embedded/ clientside applications? Seriously asking.


In practice iOS apps, in theory anything written in C


This is based on so many levels


Based literally only at the foundation of the building.


God I am so disappointed, I thought he disassembled Mario Kart 64 into C and refactored the codebase. Fuck my life


No, just go get one. Don't be a PL obsessing over a video game.


So sorry I've disappointed you, but don't fuck your life plz


It's too late. I already fucked it.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: