Are there any examples of 'perfect' software?
from fortnitefinn@sh.itjust.works to programming@programming.dev on 15 Feb 15:28
https://sh.itjust.works/post/55375651

I’m talking about programs that can’t be improved no matter what. They do exactly what they’re supposed to and will never be changed.

It’ll probably have to be something small, like cd or pwd, but does such a program exist?

#programming

threaded - newest

markz@suppo.fi on 15 Feb 15:31 next collapse

TempleOS

markz@suppo.fi on 15 Feb 15:38 collapse

The dev of left-pad made it perfect by removing it.

bleistift2@sopuli.xyz on 15 Feb 15:34 next collapse

No; since every user defines the perfect program differently. Which should be the default behaviour(s)?

mindbleach@sh.itjust.works on 15 Feb 16:37 next collapse

You cannot criticize a good knife by asking why it’s not a hammer.

bleistift2@sopuli.xyz on 15 Feb 17:00 next collapse

But I can critisize it for having only one sharp edge instead of 2. Or for being too short or too long. Or for having a handle that’s not shaped well for my hand. (That last metaphor is probably the correct one for the sentiment I’m going for.)

mindbleach@sh.itjust.works on 15 Feb 17:17 collapse

The answer remains, this tool is not flawed, it’s just not the one you want.

Vim could be feature-complete and formally verified and I’m still using Xed.

FishFace@piefed.social on 15 Feb 20:29 collapse

A hammer is a completely different tool, but different defaults in a single program are not.

Point is there’s no objective standard for “perfect”

treadful@lemmy.zip on 15 Feb 16:39 collapse

Software is always an ongoing conversation.

mushroommunk@lemmy.today on 15 Feb 15:38 next collapse

I would have said Windows notepad but they screwed the pooch on that one and changed it.

originalucifer@moist.catsweat.com on 15 Feb 15:59 collapse

notepad++

ieGod@lemmy.zip on 15 Feb 16:13 collapse

They recently experienced an self-update hijack. Plenty of room for improvement.

BlameThePeacock@lemmy.ca on 15 Feb 17:20 collapse

That was a server side compromise, but the update function could have detected it with more security features so you’re still right.

panda_abyss@lemmy.ca on 15 Feb 15:42 next collapse

Ski Free

L0rdMathias@sh.itjust.works on 15 Feb 15:43 next collapse

Notepad.exe, pre-windows 11. Now it’s something else entirely but still uses the name :(

edfloreshz@lemmy.ml on 15 Feb 15:48 next collapse

Notepad did what it needed to do, but it could be improved in a lot of ways

FizzyOrange@programming.dev on 15 Feb 15:49 next collapse

Nah it was eternally annoying that it didn’t support Unix line endings. Also there are clearly a ton of basic features that people want from lightweight text editors.

mindbleach@sh.itjust.works on 15 Feb 16:38 next collapse

Notepad in Windows 7 occasionally did some weird shit.

SaveTheTuaHawk@lemmy.ca on 15 Feb 17:27 collapse

I kinda love snipping tool.

[deleted] on 15 Feb 15:47 next collapse
.
Bookmeat@lemmy.world on 15 Feb 15:50 next collapse

LaTeX

bleistift2@sopuli.xyz on 15 Feb 15:59 next collapse

Error: Too many unprocessed floats.

SinTan1729@programming.dev on 15 Feb 18:24 next collapse

Not sure about LaTeX, but TeX is widely considered to be almost “perfect” code.

grue@lemmy.world on 15 Feb 21:22 collapse

TeX will be perfect after Knuth dies and the version number is incremented to π.

eager_eagle@lemmy.world on 15 Feb 20:26 collapse

ugh, no way. It might do a fine job with typesetting, but the user experience is utterly awful and that’s very unlikely to change because of design choices over 40+ years. If you don’t think so, give typst a real try.

carmo55@lemmy.zip on 15 Feb 21:04 collapse

Semantic round brackets make typst impossible to use for me. If it had curlies instead it would be great.

FizzyOrange@programming.dev on 15 Feb 15:51 next collapse

Yeah you probably can’t do to much more to pwd or yes or whatever (yeah I know about the silly optimisations). I think once you get much beyond that there are always more features you can add. Even for something like cd, people have made fancier versions with fuzzy matching and so on.

cecilkorik@lemmy.ca on 15 Feb 15:54 next collapse

The flight software for the Apollo moonshots.

portifornia@piefed.social on 15 Feb 15:58 next collapse

Honestly, it all starts going to shite after “hello world.”

Onomatopoeia@lemmy.cafe on 15 Feb 16:04 next collapse

Hahahahah

homoludens@feddit.org on 15 Feb 16:56 next collapse

Shouldn’t it be “Hello world.”?

thingsiplay@lemmy.ml on 15 Feb 19:16 next collapse

What does perfect hello world even mean? It can be realized in many ways and none is the best way.

degen@midwest.social on 15 Feb 20:45 collapse

Computers can’t even greet you in the real world. Its like some kind of sick joke.

“Dance, clanker! Dance!”

SorteKanin@feddit.dk on 15 Feb 22:17 collapse

No. “Hello, world!” or you’re doing it wrong.

[deleted] on 15 Feb 17:53 collapse
.
Onomatopoeia@lemmy.cafe on 15 Feb 16:05 next collapse

Automotive engine control computers.

They just work, for decades and millions of miles.

[deleted] on 15 Feb 16:11 next collapse
.
whotookkarl@lemmy.dbzer0.com on 15 Feb 16:19 next collapse

Pretty subjective but if you’re looking for do one thing and do it well I’d go with some of the GNU core utils like you mentioned, vlc & ffmpeg for AV media, and sl for being a silly way to handle ls typos

oce@jlai.lu on 15 Feb 16:20 next collapse

You may be interested by this en.wikipedia.org/wiki/Formal_verification.

Prominent examples of verified software systems include the CompCert verified C compiler and the seL4 high-assurance operating system kernel.

lIlIlIlIlIlIl@lemmy.world on 15 Feb 16:50 next collapse

Of course: github.com/kelseyhightower/nocode

theherk@lemmy.world on 15 Feb 17:05 next collapse

Ha. I still have an open PR on that.

BrianTheeBiscuiteer@lemmy.world on 15 Feb 22:06 collapse

Perfect code right here:




ieGod@lemmy.zip on 15 Feb 17:19 next collapse
  • vi
  • grep
  • curl
entwine@programming.dev on 15 Feb 17:22 next collapse

yes

kibiz0r@midwest.social on 15 Feb 17:34 next collapse

Is there a perfect building?

Probably not, since they exist in an environment — which is constantly changing — and are used by people — whose needs are constantly changing.

The same is true of software. Yes, programs consist of math which has objective qualities. But in order to execute in the physical world, they have to make certain assumptions which can always be invalidated.

Consider fast inverse sqrt: maybe perfect, for the time, for specific uses, on specific hardware? Probably not perfect for today.

KindaABigDyl@programming.dev on 15 Feb 17:43 next collapse

Nope.

I’ve thought about this before, and it gave me an interesting thought process: AI can’t ever be good at doing a large project.

It has a hard limit. Not only is it not as good as us, the best it can ever do is as good as us, and we’re not even good at it. That’s all it can be trained on! Our garbage code lol

ThetaDecay@lemmy.world on 15 Feb 18:00 next collapse

Pkzip version 2.04g

Gork@sopuli.xyz on 15 Feb 18:17 next collapse

WinRAR free version

BrightCandle@lemmy.world on 15 Feb 18:32 next collapse

Pretty certain cd and pwd have changed over the years. The kernel hasn’t remained the same so the commands that use it wont and now we have faster methods to do various things like getting file data the commands that depend on it will change. Less quickly than something that is still gaining features but bit rot is a very real effect since every single part of software is in constant flux.

thingsiplay@lemmy.ml on 15 Feb 19:16 next collapse

I don’t think such thing as perfect software exist, only abandoned software. If the environment changes, then the software needs changes too.

MonkderVierte@lemmy.zip on 15 Feb 20:03 collapse

Or a new software.

thingsiplay@lemmy.ml on 15 Feb 20:18 collapse

Or a rewrite in Rust.

[deleted] on 15 Feb 20:19 collapse
.
IanTwenty@piefed.social on 15 Feb 20:15 next collapse

There was a moment in time where maybe it was qmail:

https://en.wikipedia.org/wiki/Qmail

Ten years after the launch of qmail 1.0, and at a time when more than a million of the Internet’s SMTP servers ran either qmail or netqmail, only four known bugs had been found in the qmail 1.0 releases, and no security issues.

More on how it was accomplished:

https://blog.acolyer.org/2018/01/17/some-thoughts-on-security-after-ten-years-of-qmail-1-0/

Sephtis@lemmy.world on 15 Feb 20:45 next collapse

Many might disagree, but imo vim is the perfect text editor for a command line interface. It’s just so simpel and does exactly what I need it to do without doing anything unnecessary

karlhungus@lemmy.ca on 15 Feb 20:56 next collapse

neovim is a drop in replacement for vim that fixes the issues that bother me with vim

Sephtis@lemmy.world on 15 Feb 21:12 collapse

Might install that then in the future, if I remember it. Sudo apt-get install vim is just so ingrained in muscle memory

Sivecano@lemmy.dbzer0.com on 15 Feb 21:16 next collapse

Vim has some pretty messy design… Starting at some of the action quirks and ending at vim9script

Sephtis@lemmy.world on 15 Feb 21:22 collapse

Never heard of vim9script, what is it. I must admit I don’t use it for a lot of super complicated tasks just regular yaml and file editing. At for that it’s perfect imo

who@feddit.org on 15 Feb 21:35 collapse

Nit: vim is a visual editor. It has a text interface, but it’s not a command line interface.

An example of a command line text editor would be sed.

Sephtis@lemmy.world on 15 Feb 21:58 collapse

I know it isn’t a cli but a text editor that you can use in a terminal, if there’s any other difference i got wrong feel free to correct me

BodePlotHole@lemmy.world on 15 Feb 20:56 next collapse

7zip?

kryptonianCodeMonkey@lemmy.world on 15 Feb 21:15 next collapse

Depends on your definition of “perfect” and “improved”. Is it perfect because it does one fundamental thing really well? Is it improved by adding new features?

I think what you’re meaning is, is there a program that is ubiquitous (or at least works anywhere), will basically remain used forever because it does a fundamental job that will always need to be done, and it does that job in the most straightforward way possible that can’t be made any algorithmically simpler, faster, etc. Probably plenty, honestly. Bitwise operations, arithmetic, fetch/store, etc. Though ubiquity/working anywhere gets rarer the higher you go from hardware. Even your suggestion of cd, for example, has to interface with an OS’s file system, of which there are several common types. What it’s doing is simple in concept, but will always be dependent on other programs for the file system.

beeng@discuss.tchncs.de on 15 Feb 21:27 next collapse

Some Quines maybe?

Treczoks@lemmy.world on 15 Feb 22:03 collapse

TeX. Best documented source, and last bug found was 12 years ago.