Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sapozhnik
Jan 2, 2005

Nap Ghost
we should probably replace busybox with a bunch of nodejs scripts

kins coming out of coding bootcamps don't want to write c, gramps. also nodejs lets you really get down to the metal.

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

what are those binaries linked to dynamically? the Rust standard library is statically linked into the binary, unlike C’s on most machines

FlapYoJacks
Feb 12, 2009

Sapozhnik posted:

We should probably replace busybox with a bunch of NodeJS scripts.

Kins coming out of coding boot camps don't want to write c, gramps. Also, NodeJS lets you really get down to the metal.

What better language to use with such high-quality programmers that produce such excellent libraries as is-odd

With 336,914 weekly downloads, one dependency, seven versions, and four total files!

FlapYoJacks
Feb 12, 2009

Subjunctive posted:

what are those binaries linked to dynamically? the Rust standard library is statically linked into the binary, unlike C’s on most machines

Sure, but that means each rust application will be huge in comparison. It's okay if you have many gigabytes of space, and I do love Rust, but when you have 512MB of space, and it is split as such:

32MB: Boot
128MB: RootfsA
128MB: RootfsB
32MB: Factory
192MB: Data

You can't afford a whole hell of a lot of Rust applications!

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

rust has a no-std mode for embedded programming that, among other things, doesn't link the stdlib:

https://docs.rust-embedded.org/book/intro/no-std.html

it would never have been allowed into the linux kernel otherwise

Armitag3
Mar 15, 2020

Forget it Jake, it's cybertown.


FlapYoJacks posted:

Sure, but that means each rust application will be huge in comparison. It's okay if you have many gigabytes of space, and I do love Rust, but when you have 512MB of space, and it is split as such:

32MB: Boot
128MB: RootfsA
128MB: RootfsB
32MB: Factory
192MB: Data

You can't afford a whole hell of a lot of Rust applications!

spend less on data

Cybernetic Vermin
Apr 18, 2005

i am real unconcerned with the use-case here though, why would you *not* busybox if that's where you are at? is this meant to be an actual multiuser terminal server in 2023?

in trade you are free to be real unconcerned with my use-case of enjoying nice terminal applications, on a computer where this is splitting hairs.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

well if you're that constrained, you can build something #![no_std] if you're on something more like embedded which I think will make it smaller, but yeah generally binary size hasn't been something they've optimized for in the main toolchain

FlapYoJacks
Feb 12, 2009

Armitag3 posted:

spend less on data

I don't have space! Updates are full-sized, so it's really 64MB of usable data space! :^)

FlapYoJacks
Feb 12, 2009

Subjunctive posted:

well if you're that constrained, you can build something #![no_std] if you're on something more like embedded which I think will make it smaller, but yeah generally binary size hasn't been something they've optimized for in the main toolchain

That's... quite interesting. I didn't know that existed either! Thank you!

Sapozhnik
Jan 2, 2005

Nap Ghost
iirc a big part of the problem is that the most common command line option parsing libraries for rust are stupid-heavy

the russians used getopt(3)

Subjunctive posted:

what are those binaries linked to dynamically? the Rust standard library is statically linked into the binary, unlike C’s on most machines

if you're using musl then the libc is statically linked

either way i mean, busybox, gnu coreutils, who cares, it's like caring about what exact alloy is used for the pipes in your bathroom plumbing. as long as it doesn't leak liquefied poo poo everywhere who even cares.

FlapYoJacks
Feb 12, 2009
Musl is bad and I dread testing new packages I want to submit to Buildroot against it.

akadajet
Sep 14, 2003

FlapYoJacks posted:

Uh, no?

C++ code:
#include <iostream>

int main(void) {
  std::cout << "Hello world!" << std::endl;
  return 0;
}
It's 17K with debugging symbols, 15K without.

I will never not laugh at the "std::cout <<" syntax

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

FlapYoJacks posted:

Musl is bad and I dread testing new packages I want to submit to Buildroot against it.

what's bad about it? I have no reason to use it so I have no experience, I've heard other people complain about it, but at a glance it's not obvious to me what the problem is

Xarn
Jun 26, 2015
Isn't one of Busybox's tricks for smaller binary size that it links everything into one huge binary, whose entry point checks under which name it was called and defers into that?

Presumably you could do the same with Rust's userspace utils reimplementations if you needed those extra bytes.

pseudorandom name
May 6, 2007

pokeyman posted:

what's bad about it? I have no reason to use it so I have no experience, I've heard other people complain about it, but at a glance it's not obvious to me what the problem is

their attitude towards compatibility is "am I out of touch? no, it is the children who are wrong."

Sapozhnik
Jan 2, 2005

Nap Ghost
do standards actually matter? it would be nice if they did, but in practice the standard is glibc instead of posix. or chrome instead of whatever poo poo the w3c comes out with. or windows acpi.sys as opposed to what the acpi spec says.

no consumer (as opposed to implementer) of a standard gives two shits what the standard says because there is no effective mechanism to compel them to, other than a walled-garden manual review process, and even that is very limited. it's not a healthy mentality but it's the situation we're stuck with.

Cybernetic Vermin
Apr 18, 2005

mostly it is kind of obvious what the standard to aim for is, in that there's not a very complex ecosystem of these libraries anymore, so if you break something and it works on e.g. glibc and osx it will do you fairly little good to wave binders of standard around.

there's other things where standards still matter.

pseudorandom name
May 6, 2007

Sapozhnik posted:

do standards actually matter? it would be nice if they did, but in practice the standard is glibc instead of posix. or chrome instead of whatever poo poo the w3c comes out with. or windows acpi.sys as opposed to what the acpi spec says.

no consumer (as opposed to implementer) of a standard gives two shits what the standard says because there is no effective mechanism to compel them to, other than a walled-garden manual review process, and even that is very limited. it's not a healthy mentality but it's the situation we're stuck with.

no, which is why the musl nerdlingers having a list of "well, actually, posix says we can do this" instead of matching glibc's behavior is why the entire project is worthless

Presto
Nov 22, 2002

Keep calm and Harry on.
Wait, why do we need replacements for ps and ls?

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Presto posted:

Wait, why do we need replacements for ps and ls?

when yospos first started, the canonical solution to any problem, perceived or real, was to rewrite it in python. Now its rewrite it in rust. This is what programmers know as “progress.”

Cybernetic Vermin
Apr 18, 2005

Presto posted:

Wait, why do we need replacements for ps and ls?

eza and procs does a bunch more stuff which is cool and good. people who are willing to work on this kind of thing increasingly like rust, so preferred to redo them rather than fork stuff.

personally i think it makes all the sense in the world to get off c the moment you start doing this sort of thing, but then also don't in particular get going onto rust. all those tools do are syscalls and io, there's no reason not to climb another level of abstraction while at it.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

FlapYoJacks posted:

"procs is a modern replacement for ps written in Rust"
-rwxr-xr-x. 1 3,9M 4 nov. 21:09 output/target/usr/bin/procs
So modernity is a binary of 3.9 MB for a "ps" replacement? I checked, and the .text section is indeed 3.2 MB

Another one: "eza is a modern, maintained replacement for ls, built on exa" (in Rust)
-rwxr-xr-x. 1,3M 4 nov. 21:57 output/target/usr/bin/eza
1.3 MB for ls! Double the size of a relatively featureful Busybox!

The future. :allears:

this is what happens when you depend on naïvely-designed “package managers” for everything, and all of the million or so dependencies “have to” be built into the final executable in order for everything to be properly “transparently” optimized because no thought is given to ABIs or the evolution thereof

it’s like Node.js disease and C++ disease combined to form a new kind of horrifying infectious awfulness

eschaton fucked around with this message at 22:48 on Nov 5, 2023

The_Franz
Aug 8, 2003

all right, let's make a "64k" demo

*dynamically loads 200 megs of video drivers and systems libraries at startup*

well-read undead
Dec 13, 2022

programmers understanding that one tool or approach is not the best tool or approach for literally every use case challenge (impossible)

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

well-read undead posted:

programmers understanding that one tool or approach is not the best tool or approach for literally every use case challenge (impossible)

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.
I’m happy to work in a context such that large binaries are irrelevant. Working in a context where small binaries would be different and I’d be curious to see what it’s like but also 🤷

also in my usual working context: they’re only large relative to certain kinds of other binaries, not large relative to the memory needed or storage needed so I have no reason to care

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
i remember writing apps for palmos and like if your program was bigger than 80k people started grumbling

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

The_Franz posted:

all right, let's make a "64k" demo

*dynamically loads 200 megs of video drivers and systems libraries at startup*
i have written these things, in both dos and windows, where the windows ones did typically include a bunch of external dependencies and the dos ones didn't

they're annoyingly hard to do, either way

redleader
Aug 18, 2005

Engage according to operational parameters

eschaton posted:

this is what happens when you depend on naïvely-designed “package managers” for everything, and all of the million or so dependencies “have to” be built into the final executable in order for everything to be properly “transparently” optimized because no thought is given to ABIs or the evolution thereof

it’s like Node.js disease and C++ disease combined to form a new kind of horrifying infectious awfulness

sounds like the os vendor's problem, op

pseudorandom name
May 6, 2007

the OS vendor created Swift, a language that supports stable ABIs, a feature not present in any other language besides C

redleader
Aug 18, 2005

Engage according to operational parameters

pseudorandom name posted:

the OS vendor created Swift, a language that supports stable ABIs, a feature not present in any other language besides C

and yet no one wants to use it. curious

Sapozhnik
Jan 2, 2005

Nap Ghost

well-read undead posted:

programmers understanding that one tool or approach is not the best tool or approach for literally every use case challenge (impossible)

i;m going to write a to-do app in pure c and you can't stop me

akadajet
Sep 14, 2003

rotor posted:

when yospos first started, the canonical solution to any problem, perceived or real, was to rewrite it in python. Now its rewrite it in rust. This is what programmers know as “progress.”

wrong. it's always been to rewrite it using nodejs.

Shaggar
Apr 26, 2006

rotor posted:

when yospos first started, the canonical solution to any problem, perceived or real, was to rewrite it in python. Now its rewrite it in rust. This is what programmers know as “progress.”

to be clear this is how linux users did things and was never canon in real development or in yospos

well-read undead
Dec 13, 2022

first of all, never rewrite any software. it’s bad enough that it was written once

akadajet
Sep 14, 2003

well-read undead posted:

first of all, never rewrite any software. it’s bad enough that it was written once

I keep telling people at work we don't need to rewrite poo poo and yet it keeps happening

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

pseudorandom name posted:

the OS vendor created Swift, a language that supports stable ABIs, a feature not present in any other language besides C

the os vendor also decided on a mechanism for installing applications that makes it impossible to take advantage of abi stability for anything other than system libraries

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

pseudorandom name posted:

the OS vendor created Swift, a language that supports stable ABIs, a feature not present in any other language besides C

yeah, i’m just gonna ship a full distinct userland for every application I own, and you can’t stop me

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill
lol if you regularly create binaries smaller than 1gb, what’s it like in the 1980s grandpa

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply