News for hackers. Stuff that matters.
Re:My "retirement" project: Release 40 years worth of my "so... by jart on Friday November 03, 2023 @03:55PM (#38134146)
I'm taking a look through DOSUTIL.ZIP and I love all these simple elegant C programs. A lot of these programs somehow only manage to have 1-2 standard c #include lines. How often do you see that? I also love how, out of 20,000 lines of C code, there only exists 24 #if statements. This is how C programming was meant to be. Reading codebases like this is one of the things I drew inspiration from when I started working on Cosmopolitan Libc.
Re:My "retirement" project: Release 40 years worth of my "so... by cdchn on Friday November 03, 2023 @04:15PM (#38134392)
If your build targets are 1 then that saves you a lot of #if macros.
Re:My "retirement" project: Release 40 years worth of my "so... by lovasoa on Friday November 03, 2023 @04:38PM (#38134675)
You are replying to someone who builds C programs for 6 OS and 2 architectures without an #if ;)
Re:My "retirement" project: Release 40 years worth of my "so... by kr0bat on Friday November 03, 2023 @05:42PM (#38135359)
Re:My "retirement" project: Release 40 years worth of my "so... by echelon on Friday November 03, 2023 @05:56PM (#38135537)
I love all of the domain experts and accomplished people hanging out with the rest of us on HN. :)
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Friday November 03, 2023 @10:40PM (#38137620)
Also for the casually dressed
Re:My "retirement" project: Release 40 years worth of my "so... by jamiek88 on Friday November 03, 2023 @11:32PM (#38137904)
holy shit!

> In the above one-liner, we've basically reconfigured the stock compiler on Linux so it outputs binaries that'll run on MacOS, Windows, FreeBSD, OpenBSD, and NetBSD too. They also boot from the BIOS. Please note this is intended for people who don't care about desktop GUIs, and just want stdio and sockets without devops toil

they also boot from the BIOS.... does this mean that I can achieve my dream of booting straight into a BBC BASIC emulator on bare metal(ish)?

Re:My "retirement" project: Release 40 years worth of my "so... by arendtio on Saturday November 04, 2023 @02:03AM (#38138586)
You might want to take a look at the current no. 2 of the HN best list:

https://news.ycombinator.com/item?id=38101613

Re:My "retirement" project: Release 40 years worth of my "so... by jamiek88 on Saturday November 04, 2023 @05:15PM (#38145191)
thank you so much!

Justine is a genius.

Re:My "retirement" project: Release 40 years worth of my "so... by spockz on Saturday November 04, 2023 @04:26PM (#38144785)
Can cosmopolitan replace the whole llvm toolchain required by GraalVM’s native-image? Currently cross building with native-image is a pain, especially compared to golang. (Or resource intensive as you need to compile it on each platform/architecture you want.)
Re:My "retirement" project: Release 40 years worth of my "so... by kaba0 on Saturday November 04, 2023 @06:38PM (#38145941)
It’s probably not the best form to abstract away the OS-distinctions, as every abstraction will hide important details from the underlying OS. E.g. certain JDK native methods could be more efficiently done for, say, windows, then through a libc-like abstraction library.
Re:My "retirement" project: Release 40 years worth of my "so... by DiggyJohnson on Friday November 03, 2023 @06:29PM (#38135896)
Love a great “do you know who you’re dealing with” HN moment.

Justine’s APE [0] project is one of the few things to induce in me true, nostalgic, nerdful glee in the last few years.

[0] https://justine.lol/ape.html

Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Friday November 03, 2023 @06:41PM (#38136017)
[delayed]
Re:My "retirement" project: Release 40 years worth of my "so... by wahnfrieden on Friday November 03, 2023 @06:54PM (#38136143)
Go indie on the side then full time
Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Friday November 03, 2023 @08:56PM (#38136962)
I've definitely thought about it and I imagine it's my end game. But I'm hesitant if I'm truly ready and have the right skills for that. Would that self growth be better than contributing to something larger first (perhaps building more connections on the way)?
Re:My "retirement" project: Release 40 years worth of my "so... by reactordev on Friday November 03, 2023 @10:26PM (#38137533)
any skills you lack you can hire for. Do it!
Re:My "retirement" project: Release 40 years worth of my "so... by wahnfrieden on Friday November 03, 2023 @10:28PM (#38137553)
Contributing to OS I’m not sure what that’s a path to exactly
Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Saturday November 04, 2023 @01:28AM (#38138433)
There's Many intentions behind it. In rough order of importance;

- working on a medium-large repo size exercises more skills than just jumping into anything alone. Growth is my biggest factor for the next few years.

- OS introduces me to a community of passionate devs. Who can be anything from mentors to expand my horizons, to friends to future contacts.

- I'd choose to contribute to tools I would probably use for my own projects. So I can dig into repos early and know it intimately for the time I'd need to branch for my own project

- potential clout in certain communities can open other doors.

- Resume material is never bad if everything else falls through

It's not my end game but I think it'll help in many ways. And Personally I always had a certain respect for the OS community and want to give back, and hopefully pay if forward. .

Re:My "retirement" project: Release 40 years worth of my "so... by wahnfrieden on Saturday November 04, 2023 @08:09AM (#38140298)
Good luck. Most OS contribution is thankless and leads nowhere so be careful with your time and timidity

I contribute to repos I use in my projects, but I’d never start with them before actually finding a use for them

Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Saturday November 04, 2023 @04:35PM (#38144873)
I'll keep that in mind. Maybe it will be yet another venture of "I want to connect with people but no one else does" but nothing ventured...

And it would be a soul crushing world if I simply submitted to the fact that we're more connected than ever, but simultaneously I can't find literally anyone else to connect with without money being involved. I have at least a good decade in my heart left to fight that mentality.

Re:My "retirement" project: Release 40 years worth of my "so... by wahnfrieden on Saturday November 04, 2023 @04:52PM (#38145005)
Make money (without wages), then you have ownership of your time for pursuing interests
Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Saturday November 04, 2023 @05:52PM (#38145563)
That's the hopeful end goal. I unfortuntately need a lot of time and learning to make a product worth paying for, though. being self-sufficient is liberating but terrifying unstable in the beginning. Need to establish proper safeaguards first.
Re:My "retirement" project: Release 40 years worth of my "so... by wahnfrieden on Saturday November 04, 2023 @10:29PM (#38147477)
It might be easier/quicker than you think
Re:My "retirement" project: Release 40 years worth of my "so... by NetOpWibby on Saturday November 04, 2023 @04:17AM (#38139067)
At some point, you’re just gonna have to go for it. Jump in and see what happens.
Re:My "retirement" project: Release 40 years worth of my "so... by rebolek on Saturday November 04, 2023 @03:07PM (#38144131)
If you don't try, you'll never find out.
Re:My "retirement" project: Release 40 years worth of my "so... by nvarsj on Saturday November 04, 2023 @06:45AM (#38139775)
The perpetual inner turmoil for talented engineers :). I accepted a while ago that there's more to life than coding and career, so I don't do much outside of work - 40-50 hours a week of engineering is enough for me. But I try to focus on getting the best job possible that fits what I like to do.

Obviously spending 20+ hours a week on interesting OSS is going to get you more interesting roles over time, and generally OSS stuff is way more fun because you can pick what interests you. But you have to decide if it's worth the cost - do you really want to spend 60 hours+ a week just doing coding / engineering? Maybe you do, but in that case you'd probably be doing it already.

Re:My "retirement" project: Release 40 years worth of my "so... by sadhorse on Saturday November 04, 2023 @07:30AM (#38140067)
If you are not living the life you want then you are a failure. Face the reality of your situation. While others do what they want you do what you are "supposed" to do, and you know how this feels. Good luck.
Re:My "retirement" project: Release 40 years worth of my "so... by sgu999 on Saturday November 04, 2023 @08:13AM (#38140320)
> If you are not living the life you want then you are a failure.

What a rude and profoundly dumb statement. Are all the ones who bust their arses out of necessity failures or do they simply want to endure pain? Caring for a handicapped child, parent, being trapped in a poor country, etc.

I'd be curious to know where most of you around here who put desires above all else are coming from.

Re:My "retirement" project: Release 40 years worth of my "so... by sadhorse on Saturday November 04, 2023 @10:47AM (#38141505)
I don't understand where you are coming from. I've met cab drivers in the third world that are successful, because they live the life they want. I've met investment bankers in the first world that are failures, they are rich but can't do what they want because "N reasons", trapped as you put.

A parent that cares for a disabled child is only a failure as long as he does not want to do it but has to. In this case he is not only a failure but a horrible person.

I volunteer to care for old people 1h per month and I do not consider this a burden or entrapping or nothing like that. In fact I've met my first wife like this.

Re:My "retirement" project: Release 40 years worth of my "so... by arcanemachiner on Saturday November 04, 2023 @11:50AM (#38142153)
This sounds rather stoic. But people do not all have the same philosophy of life.

Your definition of what constitutes a "failure" doesn't have to be the same as someone else, and that's OK.

Re:My "retirement" project: Release 40 years worth of my "so... by sadhorse on Saturday November 04, 2023 @12:56PM (#38142819)
I agree with that, and I am comfortable with the prospect of others not putting themselves first, therefore opening up the possibility of them putting my interests first.
Re:My "retirement" project: Release 40 years worth of my "so... by sgu999 on Sunday November 05, 2023 @03:20AM (#38149311)
> A parent that cares for a disabled child is only a failure as long as he does not want to do it but has to. In this case he is not only a failure but a horrible person.

> I volunteer to care for old people 1h per month

I'm sorry, it does not render what you're doing irrelevant, but the comparison is laughable.

Caring for a disabled children is a full time job. I can't imagine that most were hoping to be in that situation when they conceived. It doesn't prevent them from being good carers for the child they love. If you meet some of these parents, ask them. Then you can tell them they are horrible people because as opposed to them you voluntarily go to chat with an oldie for 1h a month.

Have some empathy.

Re:My "retirement" project: Release 40 years worth of my "so... by faeriechangling on Sunday November 05, 2023 @01:04PM (#38153690)
>A parent that cares for a disabled child is only a failure as long as he does not want to do it.

I’ve seen the parents of severely disabled children. The daily work, financial cost, and social cost is immense. They don’t give up their children often out of duty and sympathy not because they ever wanted to live a life like that. They are burdened and entrapped and it’s not simply a matter of mindset.

Not even the disabled children would be keen to agree with you that their self-sacrificing parents are failures and horrible people if they feel they’ve been burdened and entrapped. THEY feel burdened and entrapped themselves. People in a bad situation can sympathize with people’s circumstances for what they are. They might resent the parent being open about their feelings, but not for having them at all.

As for why the 3rd world cab driver does not feel this way, a cab driver in the third world is often doing relatively well compared to their peers, they may have grown up in worse circumstances, and cab driving is something relatively easy to give up for a few years and then pick back up no worries. That’s not nessecarily true of the investment banker or the parent of the disabled child.

Re:My "retirement" project: Release 40 years worth of my "so... by johnnyanmac on Saturday November 04, 2023 @04:42PM (#38144923)
>If you are not living the life you want then you are a failure.

"For what it’s worth... it’s never too late, or in my case too early, to be whoever you want to be. There’s no time limit. Start whenever you want.... I hope you live a life you’re proud of, and if you’re not, I hope you have the courage to start over again."

My courage definitely wavers, but the stuff I'm "supposed" to do will hold me back if I try to what I want first. If I can't do that first, I'll at least set the breadcrumbs as I climb out of that pit.

Re:My "retirement" project: Release 40 years worth of my "so... by Applejinx on Sunday November 05, 2023 @05:32AM (#38149898)
Here's an alternate framing for you: if you are living the life you want, then you are a failure. You have settled, you have ceased to strife, you're no longer growing and evolving and aspiring.

It's a condition of certain kinds of life, to tolerate unbearable dissatisfaction. Many things have come from this drive, many astonishing people have shared it, and they'll never settle. They'll die still not 'done', their dreams unreached… because those dreams were able to scale, those stars remained beyond their reach.

Re:My "retirement" project: Release 40 years worth of my "so... by wiseowise on Sunday November 05, 2023 @05:01PM (#38156083)
> If you are not living the life you want then you are a failure.

Nah, not how it works.

Re:My "retirement" project: Release 40 years worth of my "so... by drzaiusx11 on Sunday November 05, 2023 @08:43AM (#38151037)
> pushing pencils in comparison to actually,

> truly solving problems

By picking a problem you have a vested interest in, you'll get further than solving someone else's problems in which you don't

Re:My "retirement" project: Release 40 years worth of my "so... by zikzak on Sunday November 05, 2023 @09:06AM (#38151219)
I rarely write code after work for my own use. or others. I spend time with my family. A family that started by me realizing there was more to life than billing clients 14 hours a day.

It's ok to not be building some new thing in your off hours. That's a choice they made for their own reasons. Doing what you do is also a choice and both are valid.

Re:My "retirement" project: Release 40 years worth of my "so... by digging on Friday November 03, 2023 @06:38PM (#38135990)
Ok but sidenote, that Greek-letter titling is emotionally upsetting, even if the title is SR-accessible (κύδος for that though).
Re:My "retirement" project: Release 40 years worth of my "so... by violiner on Friday November 03, 2023 @06:47PM (#38136087)
Yeah I read it as "Astmally pdrtable echesmtable". People shouldn't do this.
Re:My "retirement" project: Release 40 years worth of my "so... by IggleSniggle on Friday November 03, 2023 @08:56PM (#38136961)
"Astmally pdrtable echesmtale" is a very aesthetically pleasing name for what this, though. You just made me like it more...
Re:My "retirement" project: Release 40 years worth of my "so... by f1shy on Saturday November 04, 2023 @03:18AM (#38138849)
Wow… some think Java is portable… this is so nice!
Re:My "retirement" project: Release 40 years worth of my "so... by vidarh on Sunday November 05, 2023 @03:43AM (#38149398)
If you're going down that route, make sure to take a look at this source file for it[1], which is an absolute work of art not just for the code but for the artistic presentation, including elaborate inline logos.

[1] https://raw.githubusercontent.com/jart/cosmopolitan/1.0/ape/...

Re:My "retirement" project: Release 40 years worth of my "so... by bigbillheck on Friday November 03, 2023 @07:25PM (#38136376)
I took a quick look at cosmopolitan.h: https://justine.lol/cosmopolitan/cosmopolitan.h and counted 886 occurrences of "#if" (including #if and #ifdef)
Re:My "retirement" project: Release 40 years worth of my "so... by jart on Saturday November 04, 2023 @02:09AM (#38138614)
cosmopolitan.h is a concatenated rollup of hundreds of header files, shipped as part of the "amalgamation" variant of our release, and those sub-headers had #ifndef _FOO_H guards at the top and bottom. The rest of the #ifs are required by standards so we don't clobber the user's control of their namespace, e.g. `#ifndef _GNU_SOURCE`. What you won't see is the annoying stuff that checks for CPU, OSes, endianness, etc.
Re:My "retirement" project: Release 40 years worth of my "so... by yjftsjthsd-h on Friday November 03, 2023 @07:44PM (#38136492)
In fairness, my understanding is that APE manages that by making the differences invisible to the application. I'm not sure whether that makes it more or less applicable. (More impressive, obviously, but not simpler)
Re:My "retirement" project: Release 40 years worth of my "so... by themerone on Friday November 03, 2023 @08:23PM (#38136762)
It doesn't count if all your platform code is abstracted away by libraries.
Re:My "retirement" project: Release 40 years worth of my "so... by cdchn on Friday November 03, 2023 @08:54PM (#38136948)
Then you can appreciate how many #if macros it would save if you just targeted 1. ;)
Re:My "retirement" project: Release 40 years worth of my "so... by ramilefu on Friday November 03, 2023 @09:32PM (#38137200)
Sounds like it wouldn’t save them a single #if, if they are already at 0…
Re:My "retirement" project: Release 40 years worth of my "so... by cdchn on Sunday November 05, 2023 @09:37AM (#38151478)
I know, it was a joke, but it seemed to have very solidly wooshed.
Re:My "retirement" project: Release 40 years worth of my "so... by d6e on Sunday November 05, 2023 @08:20AM (#38150894)
How? I’d be curious if you have a blog post.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Friday November 03, 2023 @04:03PM (#38134251)
> A lot of these programs somehow only manage to have 1-2 standard c #include lines

Older C compilers will let you get away with a lot of sins which a modern C compiler will (correctly) call you out for.

Re:My "retirement" project: Release 40 years worth of my "so... by jart on Friday November 03, 2023 @04:22PM (#38134479)
We can still get away with those sins today if you change C's implicit type from int to long. I modified chibicc to do just that it was a 1 LOC patch. Suddenly I didn't need prototypes anymore and everything just worked without #include lines.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Friday November 03, 2023 @05:00PM (#38134948)
> Suddenly I didn't need prototypes anymore

Under some very old C standards, maybe. But C99 requires that you at least declare a function before calling it.

Re:My "retirement" project: Release 40 years worth of my "so... by billfruit on Friday November 03, 2023 @10:25PM (#38137525)
But why does it have to be that way though, can't the compiler scan the rest of the code/files and see if a defenition/declaration is present somewhere?

There is no such requirement of a declaration before first call in Java for example?

Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Friday November 03, 2023 @10:43PM (#38137637)
It's because the C compiler was designed to be single pass, so as to be speedy and require less memory on the systems of it's time.
Re:My "retirement" project: Release 40 years worth of my "so... by dheera on Saturday November 04, 2023 @01:11AM (#38138341)
I suppose you could just create a ".d" file standard that doesn't have that requirement but processes into a ".c" file that has the necessary prototypes. You could probably also auto-insert all the #if'n'def nonsense automatically and skip it in the ".d" files.

Kind of like how the JavaScript dudes all use this ".ts" stuff now for convenience that processes into ".js"

Re:My "retirement" project: Release 40 years worth of my "so... by foodevl on Saturday November 04, 2023 @08:23AM (#38140387)
The Arduino build system does this (preprocesses your source code to pull out prototypes and put them at the top). To make things easier for beginners.
Re:My "retirement" project: Release 40 years worth of my "so... by phatskat on Sunday November 05, 2023 @02:37AM (#38149120)
Just to be a little picky, but if you want “convenient” then just stick with pure JS - it’s overly forgiving and simple. TypeScript is lovely and I much prefer it over JS, but having to type _everything_ is far from convenient imo
Re:My "retirement" project: Release 40 years worth of my "so... by vinceguidry on Sunday November 05, 2023 @10:12AM (#38151780)
Isn't Typescript gradually typed?
Re:My "retirement" project: Release 40 years worth of my "so... by phatskat on Sunday November 05, 2023 @10:26AM (#38151896)
It is! I’ve been working in an environment that essentially requires us to type as we code (rules against using the “any” and “unknown” types) that in just used to them being enforced now lol. So I suppose my point is moot, as the tediousness isn’t forced by the language necessarily.
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Sunday November 05, 2023 @04:48PM (#38155996)
It's also considered by many to be an antipattern to add a type that is otherwise inferred. For a trivial example,

let x: number = 6;

You should instead allow the compiler to infer where it can and do

let x = 6;

Inference doesn't work across function calls like it does (did?) in Flow, which is a good thing, so those always need to be typed.

If you wanted the type of x to be 6 instead of number, you would use

let x = 6 as const;

Re:My "retirement" project: Release 40 years worth of my "so... by billfruit on Saturday November 04, 2023 @04:54AM (#38139230)
Is that a requirement that is relevant presently? I would say not so much. Do modern C compilers also make only a single pass?
Re:My "retirement" project: Release 40 years worth of my "so... by hulitu on Saturday November 04, 2023 @08:07AM (#38140279)
Yes. Gcc throws errors like hell with c files which have the definitions after functions.
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Saturday November 04, 2023 @02:15PM (#38143675)
Modern compilers still have to follow the rules of the language.
Re:My "retirement" project: Release 40 years worth of my "so... by billfruit on Sunday November 05, 2023 @10:31AM (#38151956)
Yes, but is the constraint that compiler shall make only a single pass, a rule of the language?
Re:My "retirement" project: Release 40 years worth of my "so... by trealira on Sunday November 05, 2023 @02:40PM (#38154811)
Prior to C99 (i.e., in C90), there was a rule that any undeclared identifier id that was followed by a function call parenthesis would be treated as though there were an implicit declaration in the scope in which it was used like this:

  extern int id();
The empty parentheses meant it could take any number of arguments, since it was declared in the traditional style, where the argument types weren't specified first.

This implicit declaration meant that if it was later defined in the same file as returning a type other than int, the compiler wasn't permitted to go back up in the file and treat the function call as though it returned a type other than int.

This requirement was removed in C99, but in practice, compilers kept doing it for backwards compatibility, even when not invoked in C90 mode.

Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:08PM (#38145132)
Like early Pascal compilers, or maybe all of them. Don't know about the latter case (all).
Re:My "retirement" project: Release 40 years worth of my "so... by Gibbon1 on Saturday November 04, 2023 @01:45AM (#38138516)
What I understand is the preprocessor causes issues where you could do that maybe 99.9% of the time, especially with well written code. But it'd fail that 0.1% of the time.

You do have analyses like ctags. In theory the compiler could use ctags to find definitions in source code. My experience is ctags can get confused. It's possible in a set of files to have multiple implementations of a function and ctags can't tell which one is used. And I see cases where it can't find definitions.

Personally I'd be happy if the compiler tried to find a missing definition using ctags and issued a warning.

I have wondered if adding funct, public, private keywords to the language might allow the compiler to reliably find function and stuct definitions in source files.

Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:09PM (#38145136)
Good question.
Re:My "retirement" project: Release 40 years worth of my "so... by reactordev on Friday November 03, 2023 @10:30PM (#38137560)
The fact that I'm calling a function, it must exist, otherwise the compiler will throw an error ("undefined reference to function"). So forward declarations is just needless typing.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Saturday November 04, 2023 @01:01AM (#38138307)
> The fact that I'm calling a function, it must exist

That's not necessarily true. It's possible that the symbol is a function pointer; calling a function pointer requires slightly different code generation. Compare the generated code between:

  void fn(void);
  void call_fn(void) { fn(); }
and

  void (*fn_ptr)(void);
  void call_fn_ptr(void) { fn_ptr(); }
In practice, it's probably a function, and that's what the compiler assumes if there's no declaration to go off of. But we all know what happens when you make assumptions.
Re:My "retirement" project: Release 40 years worth of my "so... by reactordev on Saturday November 04, 2023 @01:30AM (#38138448)
Making no assumption on safety, just stating that forward declarations are superfluous.
Re:My "retirement" project: Release 40 years worth of my "so... by fsckboy on Saturday November 04, 2023 @03:35AM (#38138932)
no they are not.

>The fact that I'm calling a function, it must exist, otherwise the compiler will throw an error ("undefined reference to function")

you mean the linker will throw an error. The linker is trying to link together the "references" be they forward or backward, that the compiler has created, and the compiler needs to have generated the right references, round peg round hole, square peg square hole.

You don't want your linker throwing errors, it doesn't have the context the compiler does; and you don't want to turn the linker into ChatGPT that can converse with you about your source code, just use the C version of forward references which are not particularly forward, they just say "I don't know where this is defined, it's just not defined here, but we know it's a square peg"

For example, there are architectures where space is tight (embedded for example) and nearby things can be called more efficiently than far away things, so the compiler needs to generate as many near calls as it can, falling back to far away when it has to. Square pegs, round pegs.

Re:My "retirement" project: Release 40 years worth of my "so... by reactordev on Saturday November 04, 2023 @02:39PM (#38143896)
I know why it exists. It’s still superfluous to most use cases. Don’t force me. Require it when you can’t figure it out.
Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:15PM (#38145190)
"long far pascal", et al, anyone?

Win32 C code from way back.

Heh.

Re:My "retirement" project: Release 40 years worth of my "so... by saagarjha on Saturday November 04, 2023 @02:08PM (#38143622)
The compiler needs to see it to know how to call it.
Re:My "retirement" project: Release 40 years worth of my "so... by reactordev on Saturday November 04, 2023 @02:17PM (#38143698)
In which case, it needs to keep parsing the include tree until it finds it. I know why it exists. I’m just not happy about duplicating code. Other compilers are smarter than this.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Saturday November 04, 2023 @04:34PM (#38144866)
If you're using a modern IDE, clangd can be configured to automatically insert #include statements (--header-insertion=iwyu).
Re:My "retirement" project: Release 40 years worth of my "so... by saagarjha on Saturday November 04, 2023 @10:24PM (#38147447)
The thing I hate about this is that it really has no idea what a “public” header is. If I have it on I’ll use something like uintptr_t and get a random include for <__bits/std/uintptr.h> or something that I don’t want. I assume there’s like some manual auditing one can do to go “don’t peek through stdint.h” but either nobody does this reliably or it doesn’t work.
Re:My "retirement" project: Release 40 years worth of my "so... by jart on Saturday November 04, 2023 @02:26AM (#38138661)
> C99 requires that you at least declare a function before calling it

Where is that written? Please quote the standard. My reading of ISO/IEC 9899:TC3 is that Foreword says (paraphrasing) "hey, we removed implicit int and implicit prototypes from the standard". So they simply stopped specifying it, but as far as I can tell, the standard says nothing about forbidding them. From my point of view, that means compilers are free to still implement implicit types as a compiler extension to the language, and everyone does, because that extension is needed in order to support the older c89 standard. It would only impact people who want to be able to claim their codebase is c99 standard compliant, because you can't do that if you depend on compiler extensions.

Re:My "retirement" project: Release 40 years worth of my "so... by kevin_thibedeau on Saturday November 04, 2023 @09:26AM (#38140804)
Prototypes are required in C23 as part of the expungement of K&R syntax. This also brings harmonization with C++ where an empty parameter list is implicitly void.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Saturday November 04, 2023 @04:16PM (#38144712)
> Where is that written?

ISO/IEC 9899:TC3 [1] §6.5.1 ¶2: "An identifier is a primary expression, provided it has been declared as designating an object (in which case it is an lvalue) or a function (in which case it is a function designator)."

There's even a footnote to underscore this point: "79) Thus, an undeclared identifier is a violation of the syntax."

[1]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:05PM (#38145103)
Re:My "retirement" project: Release 40 years worth of my "so... by eVeechu7 on Friday November 03, 2023 @09:15PM (#38137098)
A little bit of advice like that is a tremendous blessing to those of us who just need to touch C occasionally.
Re:My "retirement" project: Release 40 years worth of my "so... by trealira on Friday November 03, 2023 @04:53PM (#38134867)
I haven't looked that deeply, but I don't see many sins in this source code, either, except for the K&R style, weird formatting and doing too much in one line, like this line in the file CAT.C:

  if(*(Ptr = argv[i]) == '-') {

Older C compilers did let you get away with more, like using integers as pointers, and dereferencing pointers as though they were struct pointers when they aren't. But I don't see that in this code.
Re:My "retirement" project: Release 40 years worth of my "so... by duskwuff on Friday November 03, 2023 @05:03PM (#38134983)
The "sin" I was referring to was calling undeclared functions -- which is how there are so few #include directives in much of this code. Most of the files I looked at include <stdio.h> (probably required for variadic arguments on printf-type functions) and <file.h> (for the FILE type), and call other functions blindly.
Re:My "retirement" project: Release 40 years worth of my "so... by trealira on Friday November 03, 2023 @05:14PM (#38135099)
That does make sense. My bad, I should have looked closer and noticed the implicitly defined functions.

It's not even a good idea to do that on modern computers, because implicitly declared functions do type promotions from float to double and char/short to int, and on the System V ABI, it has to pass in the number of floating point arguments there are in register eax.

Re:My "retirement" project: Release 40 years worth of my "so... by jart on Friday November 03, 2023 @05:40PM (#38135341)
[delayed]
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Friday November 03, 2023 @10:47PM (#38137667)
> it'll still come out 10x more readable than Perl at the end of the day, let's be real.

A low bar, really :-P

Re:My "retirement" project: Release 40 years worth of my "so... by queuebert on Friday November 03, 2023 @09:00PM (#38136984)
Wait til you see old Fortran codes.
Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:28PM (#38145319)
>Older C compilers did let you get away with more, like using integers as pointers

In older C compilers (maybe pre-ANSI, or later, can't remember), you could literally write i[a] instead of a[i], where a was an array and i was an int, and it would work equivalently, i.e. no compiler error, and give the same result as a[i]. This was because a was the address of the start of the array, and i was an offset, so a[i] actually meant *(a + i), which, by the commutative property of arithmetic, was equivalent to *(i + a), which was equivalent to i[a].

I had read this in some C book, maybe K&R or the Waite Group C Microsoft Bible.

Never forgot it, because it was counter-intuitive, unless you knew the above reason.

And tried it out in one or more C compilers at that approximate period, and it worked as stated.

Re:My "retirement" project: Release 40 years worth of my "so... by krackers on Saturday November 04, 2023 @09:02PM (#38146917)
This still works iirc.
Re:My "retirement" project: Release 40 years worth of my "so... by trealira on Monday November 06, 2023 @10:15AM (#38163689)
This is still true, and it's mandated by the ISO C standard that a[i] is equivalent to (*((a)+(i))) (yes, they specify it with that many parentheses). You're still able to compile code that treats a[i] and i[a] interchangeably.

https://godbolt.org/z/37Kv44o1b

> I had read this in some C book, maybe K&R or the Waite Group C Microsoft Bible.

I haven't read the Microsoft C Bible, but it does say this in K&R while explaining pointers.

Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Monday November 06, 2023 @07:19PM (#38171285)
>This is still true, and it's mandated by the ISO C standard ...

Wow, good to know.

>but it does say this in K&R

Then that must be where I had read it.

Re:My "retirement" project: Release 40 years worth of my "so... by flykespice on Friday November 03, 2023 @08:35PM (#38136828)
Hmm implicit int conversion
Re:My "retirement" project: Release 40 years worth of my "so... by marcus0x62 on Friday November 03, 2023 @08:35PM (#38136834)
Meanwhile, over here in the Rust mines, I wrote a simple program that is little more than an http listener with a single route.

Cargo pulled in something like 105 dependencies to build it.

Although, as an apples to apples comparison, it does only have 2 use statements.

Re:My "retirement" project: Release 40 years worth of my "so... by lrvick on Friday November 03, 2023 @08:51PM (#38136923)
This is a culture problem, not a language problem.

Here is a http health check in 19 lines using only the rust standard library.

https://dpaste.org/f895z

Re:My "retirement" project: Release 40 years worth of my "so... by marcus0x62 on Friday November 03, 2023 @09:12PM (#38137078)
There’s a lot of distance between “reinvent the wheel by implementing all your network functionality using nothing more than sockets” and “download 100 libraries to serve a file over http”.

There’s a happy medium to be had.

I’d also disagree this is not at all a language problem - I think it’s both, in that the language has moved an awful lot of core functionality into the crate ecosystem, where there are a bewildering array of options for almost any need. The resulting explosion in the dependency graph is an entirely foreseeable consequence — partially of that language design decision and partially due to the “npm culture” (for lack of a better description.)

Re:My "retirement" project: Release 40 years worth of my "so... by kqr on Saturday November 04, 2023 @02:25AM (#38138658)
Slighly off topic, but... how is npm culture different from CPAN culture? I have a feeling there is a difference but I'm too unfamiliar with both ecosystems to point it out.
Re:My "retirement" project: Release 40 years worth of my "so... by marcus0x62 on Saturday November 04, 2023 @07:58AM (#38140218)
Speaking as someone who used Perl pretty extensively back in its heyday I’d say the difference is CPAN modules were much more likely to be self-contained, or contain a handful of external dependencies, and those dependencies were almost always self-contained.
Re:My "retirement" project: Release 40 years worth of my "so... by kqr on Sunday November 05, 2023 @07:47AM (#38150680)
Aah, that makes a tonne of sense. When you develop an application you're free to pull in any libraries you want, but the libraries themselves should be more careful. For them, it might be worth reimplementing some essentials.
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Friday November 03, 2023 @10:54PM (#38137705)
Sure, if you are putting in a health check and nothing else, that's fine. When you need to parse headers, negotiate content types, validate maximum lengths on requests, properly log the source of the request (it's not just the connecting IP if there's a load balancer in front of it), parsing request bodies, dealing with range requests, authentication, cookies, providing a good middleware mechanism...

The list goes on. While I'm not a Rust developer, there's probably hundreds of libraries because the problem is structured into a lot of small parts, and frameworks are expected to be able to satisfy the functionality you expect without needing to bypass it.

Re:My "retirement" project: Release 40 years worth of my "so... by lrvick on Saturday November 04, 2023 @06:05AM (#38139564)
As a security engineer it is still usually cheaper to write specific functions I need for highly limited scope applications than pull in libraries I have to review, and review every update to, forever.
Re:My "retirement" project: Release 40 years worth of my "so... by liftm on Sunday November 05, 2023 @07:48AM (#38150683)
I've seen this attitude before. In that specific case, someone tried to not depend on the signal_hook crate and manually (unsafely) implement signal handling… without knowing that there's a ton of pitfalls to it.

(The signal_hook crate even contains documentation on those pitfalls. https://docs.rs/signal-hook-registry/1.4.1/signal_hook_regis...)

I mean sure, reinvent the wheel. But it might do good to at least have an inkling what those 105 dependencies for your http listener did.

Re:My "retirement" project: Release 40 years worth of my "so... by lrvick on Sunday November 05, 2023 @04:38PM (#38155916)
The person you are referring to was likely also me, and I ended up going with sigwaitinfo which is perfect for my application that will only ever run on modern linux kernels.

Combining that with the stdlib health check and we end up cutting something like 150 dependencies and making something super fast to confirm is non-malicous.

https://gist.github.com/lrvick/a5eac85999a66e78067a1e47ba934...

Re:My "retirement" project: Release 40 years worth of my "so... by liftm on Tuesday November 07, 2023 @03:31AM (#38174521)
I should have recognized the username… (Is signal handling even required here?)
Re:My "retirement" project: Release 40 years worth of my "so... by tubthumper8 on Friday November 03, 2023 @08:58PM (#38136974)
In case you want to create a simple http listener without dependencies (besides the standard library), the official Rust Book has a tutorial for just that: https://doc.rust-lang.org/book/ch20-01-single-threaded.html
Re:My "retirement" project: Release 40 years worth of my "so... by marcus0x62 on Friday November 03, 2023 @09:15PM (#38137099)
I’m aware, but thank you.
Re:My "retirement" project: Release 40 years worth of my "so... by rezonant on Friday November 03, 2023 @10:49PM (#38137680)
This doesn't really surprise me, doing an HTTP service correctly is not actually trivial
Re:My "retirement" project: Release 40 years worth of my "so... by mianos on Saturday November 04, 2023 @12:46AM (#38138223)
And, the meme, for every comment in C or C++ on HN, there is one "but Rust".
Re:My "retirement" project: Release 40 years worth of my "so... by ccozan on Saturday November 04, 2023 @04:24AM (#38139105)
we should turn it into a law or somthing...
Re:My "retirement" project: Release 40 years worth of my "so... by marcus0x62 on Saturday November 04, 2023 @08:02AM (#38140255)
While we’re making laws, we could add one where, if someone posts something even slightly critical of Rust, the first couple of responses will be from Rust apologists either: a) pointing out how wrong the criticism is, b) how the criticism is mis-directed and shouldn’t be aimed at Rust, or c) how the criticism is really a beneficial and well-thought-out feature, but under absolutely no circumstances admitting that there might be anything wrong with Rust.
Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:35PM (#38145380)
No true Rustacean?

:)

https://en.m.wikipedia.org/wiki/No_true_Scotsman

Not sure if that's a good analogy, but put it out there, to see what people say.

Re:My "retirement" project: Release 40 years worth of my "so... by throwaway892238 on Friday November 03, 2023 @09:41PM (#38137250)
OTOH, here is a hash table implementation in C that is implemented entirely as macros. It's super cool: https://troydhanson.github.io/uthash/
Re:My "retirement" project: Release 40 years worth of my "so... by kelsey9876543 on Saturday November 04, 2023 @12:01PM (#38142271)
Justine, you are one of less than 5 programmers that make me feel envy. Hope to have a coffee or a whiskey with you some day if we ever cross paths. Enjoy your day, you are an inspiration and goals. Both mental goals and presentation goals, which is essentially unheard of.
Re:My "retirement" project: Release 40 years worth of my "so... by toasted-subs on Saturday November 04, 2023 @05:59PM (#38145612)
Looked through the Linux kernel and I was genuinely shocked. Something so simple, easy to read, and improve upon. Makes modern web frameworks seem like spaghetti code. Art vs scrap.
Re:My "retirement" project: Release 40 years worth of my "so... by gilbetron on Sunday November 05, 2023 @08:25AM (#38150927)
Because there were barely any libraries to include back then. If you wanted some functionality, you wrote it yourself. Which was fun, but most of the code pales in comparison to modern libraries that have had years, or decades, or eyes on them improving and testing them. Pre 2000, if you wanted some specific capability, you wrote it yourself!
Re:My "retirement" project: Release 40 years worth of my "so... by LastTrain on Friday November 03, 2023 @03:56PM (#38134156)
This is great - add them to github!
Re:My "retirement" project: Release 40 years worth of my "so... by megous on Friday November 03, 2023 @04:12PM (#38134365)
Or maybe don't feed the machine...
Re:My "retirement" project: Release 40 years worth of my "so... by outside1234 on Friday November 03, 2023 @04:34PM (#38134625)
If it is not on Github it is never going to feed anything
Re:My "retirement" project: Release 40 years worth of my "so... by quickthrower2 on Friday November 03, 2023 @04:38PM (#38134686)
A http server is all you need
Re:My "retirement" project: Release 40 years worth of my "so... by TedDoesntTalk on Friday November 03, 2023 @04:44PM (#38134754)
… which dies with the author, or a couple years later when his domain expires.
Re:My "retirement" project: Release 40 years worth of my "so... by EVa5I7bHFq9mnYK on Friday November 03, 2023 @05:02PM (#38134979)
Add $1000 to your Namecheap accounts, turn autorenew ON, you are good for couple decades ...
Re:My "retirement" project: Release 40 years worth of my "so... by cellularmitosis on Friday November 03, 2023 @05:40PM (#38135349)
The question of "how long would a non-famous repository stay alive on github" is actually an interesting thought experiment.
Re:My "retirement" project: Release 40 years worth of my "so... by simonw on Friday November 03, 2023 @05:43PM (#38135379)
GitHub's track record on this so far is fantastic. Repos that were created 15 years ago and didn't see another commit since their creation are still there today.
Re:My "retirement" project: Release 40 years worth of my "so... by pgeorgi on Friday November 03, 2023 @06:34PM (#38135959)
By this metric, folks should go for sourceforge: https://sourceforge.net/p/gnome-napster/code/ has last seen activity 23 years ago, while https://sourceforge.net/p/primal/code/ci/master/tree/ saw changes this year.
Re:My "retirement" project: Release 40 years worth of my "so... by soulofmischief on Saturday November 04, 2023 @06:32AM (#38139713)
> Last Update: 2013-02-19

Am I missing something? Where did you get 23 years from?

Re:My "retirement" project: Release 40 years worth of my "so... by a1o on Saturday November 04, 2023 @09:09AM (#38140710)
They are living four decades from now in 2040.
Re:My "retirement" project: Release 40 years worth of my "so... by pgeorgi on Sunday November 05, 2023 @01:45AM (#38148920)
Latest commit in CVS. I'm not sure what the Last Update date is about, but I think Sourceforge did some larger data shuffle in 2013, at least there are many orphaned projects where the site claims an update in 2013 even though nothing of the sort happened.
Re:My "retirement" project: Release 40 years worth of my "so... by soulofmischief on Sunday November 05, 2023 @04:51AM (#38149681)
I see, thanks for clearing that up!
Re:My "retirement" project: Release 40 years worth of my "so... by Diederich on Friday November 03, 2023 @06:24PM (#38135847)
What is the actual downside to hosting it personally and hosting it on github or something like it?
Re:My "retirement" project: Release 40 years worth of my "so... by LastTrain on Friday November 03, 2023 @06:59PM (#38136192)
Well I was called "brainwashed" for suggesting it without any explanation so good luck getting a coherent answer ;-)
Re:My "retirement" project: Release 40 years worth of my "so... by legends2k on Friday November 03, 2023 @11:16PM (#38137833)
Downside is GitHub or any of the commercial git-hosting sites might use your code in ways you didn't intend e.g. machine learning, training neural nets, etc. Alternatively they might go out of business and go down after hinting you to save a local copy. These are countered by self-hosting your repo in your own (home/cloud) server.

Downside of self-hosting is time, money and effort. You've to spend for energy and hardware and your time and effort to keep them shipshape. Chances of it surviving beyond you are slim.

Both has downsides; just pick one depending on what kind of person you're. If you only want to write code vs that and also know how to maintain it. The latter is necessary skill if you ask me, instead of being just a code monkey.

Re:My "retirement" project: Release 40 years worth of my "so... by soulofmischief on Saturday November 04, 2023 @06:31AM (#38139706)
So we'll trust Namecheap for a couple decades but not a Microsoft-backed purpose-built website?
Re:My "retirement" project: Release 40 years worth of my "so... by quickthrower2 on Friday November 03, 2023 @07:05PM (#38136229)
You believe that Github is some kind of heritage organisation? Incentives are aligned now, kind of, except they train an AI that they sell to other people on your code. I use Github but do it with open eyes.
Re:My "retirement" project: Release 40 years worth of my "so... by sesm on Friday November 03, 2023 @07:25PM (#38136375)
GitHub has Arctic Code Vault program.
Re:My "retirement" project: Release 40 years worth of my "so... by quickthrower2 on Friday November 03, 2023 @08:09PM (#38136667)
Just looked it up. That is impressive. Probably could do with some Antarctic geo redundancy ;-).
Re:My "retirement" project: Release 40 years worth of my "so... by pabs3 on Sunday November 05, 2023 @07:52AM (#38150706)
Software Heritage are also archiving all of GitHub (and more):

https://www.softwareheritage.org/

Re:My "retirement" project: Release 40 years worth of my "so... by flykespice on Friday November 03, 2023 @08:40PM (#38136861)
There is also the lesser known repo.or.cz
Re:My "retirement" project: Release 40 years worth of my "so... by megous on Saturday November 04, 2023 @05:48PM (#38145518)
It's older than github, I think. I hosted one of my projects there in 2006 or so.
Re:My "retirement" project: Release 40 years worth of my "so... by LastTrain on Friday November 03, 2023 @05:29PM (#38135236)
I do love personal websites - but the proper place for sharing code, where it can be forked and shared, is GitHub or a place like it. Plus, author has already licensed their code in a way to allow it anyway.
Re:My "retirement" project: Release 40 years worth of my "so... by fallat on Friday November 03, 2023 @06:06PM (#38135647)
> the proper place for sharing code [...] is GitHub

Man how far people are brainwashed.

Re:My "retirement" project: Release 40 years worth of my "so... by LastTrain on Friday November 03, 2023 @06:54PM (#38136145)
OK. Straighten me out. Explain the difference between sharing my 20 year old code on a personal sever with a license that says “do what you like” and posting my code on GitHub/GitLab/SourceForge etc.
Re:My "retirement" project: Release 40 years worth of my "so... by fallat on Friday November 03, 2023 @07:22PM (#38136362)
That's not the problem. The problem is saying "the proper way to share code is with GitHub". There is no single proper way to share code, least using a commercial platform(s).
Re:My "retirement" project: Release 40 years worth of my "so... by dboreham on Friday November 03, 2023 @08:19PM (#38136732)
People can poke around in it more easily. E.g. I wanted to look at the 6808 OS code but it's a zip file and I'm using a phone, so...

Not saying it needed to be on github only, but unzipping into a set of repos there in addition to posting the zips would be helpful.

I suppose anyone could do that, but then the provenance is not preserved.

Re:My "retirement" project: Release 40 years worth of my "so... by rijoja on Friday November 03, 2023 @08:46PM (#38136897)
Personally I've become sceptical towards github since Microsoft took over it, and it's surprising to me that the open source community is so happy to use it in light of Microsoft's history of trying to fight open source.

Of course there would be a lot of reasons to use github, which I'll refrain from attempting to list since I'm not really an expert of that particular subject, but those benefits has to be weighed against handing over the control of such vast amounts of data to a huge corporation which I'd think its safe to say, primarily would be interested in profit and survival, rather than the wellbeing of the open source community. One might for instance consider the possibly of the data being used to train an AI, which in itself isn't necessary a bad thing, but that still raises some questions. Apart from that relying on github's, might lead to vendor lock in, and it might also mean that the processes that gets used to develop projects falls under control of a in a best case scenario selfish actor and in a worst case scenario a hostile one.

Perhaps you are familiar with the "embrace, extend and extinguish" strategy that Microsoft has been accused of employing? Things like these doesn't really inspire trust in the company's intention towards free software. Due to the size of the company, they are also capable of influencing the industry at large through various means, for instance via expensive advertisement campaigns, and to selling their solution to existing clients. So for instance they could create software such as VS Code and Teams, which would argubly be more or less copies of existing software, using their sizable pool of developers and then use it's huge marketing machinery to take over the market.

Even tough the open source community seems to be flourishing at the moment, there would be threats looming on the horizon. For instance the question of how to relate to service providers who can profit off of open source code, without really having to share back since the code is running solely on their own servers, another one being that open source code gets used to build closed solutions with the help of AI.

Personally I appreciate projects, that distribute code in the old-fashioned ways, which has proven to be successful in countless cases, and I would like to ask open source creators to consider the alternatives, and how they would fit in with the goals of the project. A lot of times I bet github still would be a good fit, but at the same time I'm sure that there are good ideas that could be implemented outside of those parameters.

Re:My "retirement" project: Release 40 years worth of my "so... by salawat on Saturday November 04, 2023 @02:43PM (#38143923)
You mean besides Microsoft R&D slurping all Github code up by default into an LLM training set by default? Not much.
Re:My "retirement" project: Release 40 years worth of my "so... by pgeorgi on Friday November 03, 2023 @06:25PM (#38135856)
There's also codeberg.org for git-shaped artifacts, or archive.org for everything else.
Re:My "retirement" project: Release 40 years worth of my "so... by screamingninja on Friday November 03, 2023 @06:48PM (#38136092)
> Or maybe don't feed the machine...

Curious as to why you consider that a bad thing.

Re:My "retirement" project: Release 40 years worth of my "so... by megous on Saturday November 04, 2023 @05:38PM (#38145408)
Because it gives power to Microsoft to impose its will on millions of developers, and for little reason in this case, when the goal is just publishing software, and not development.

Its UI for presenting large number of software projects sucks, too.

Re:My "retirement" project: Release 40 years worth of my "so... by xeckr on Friday November 03, 2023 @03:56PM (#38134162)
Good idea. I should keep better track of all the stuff I've written...
Re:My "retirement" project: Release 40 years worth of my "so... by pbhjpbhj on Friday November 03, 2023 @04:01PM (#38134233)
elvis70 are you Dave Dunfield (the source author)?

[It might be more a ShowHN if you are?]

I'm interested if all of the code is self-written? If you wrote any of it under contract and so had special terms to allow you to eventually release it? Which piece of code there that you are most proud of and/or gonna most useful?

Re:My "retirement" project: Release 40 years worth of my "so... by elvis70 on Saturday November 04, 2023 @03:20AM (#38138863)
I'm not Dave, but here's a thread on Vogons in which he announced his project, you could possibly contact him from there: https://www.vogons.org/viewtopic.php?f=7&t=97034
Re:My "retirement" project: Release 40 years worth of my "so... by jandrewrogers on Friday November 03, 2023 @04:03PM (#38134254)
I love this. It has crossed my mind more than once to do something similar at some point in the future.

This is a bit like receiving an inheritance from your grandparents. There will be true gems and novelties mixed in with a lot of knick knacks and rubbish. But the totality of that tells a story of real people living rich and interesting lives that only a handful of highlights would not do justice to.

Re:My "retirement" project: Release 40 years worth of my "so... by albertzeyer on Friday November 03, 2023 @04:33PM (#38134618)
Why only when you are retired? Why not just right now?
Re:My "retirement" project: Release 40 years worth of my "so... by micromacrofoot on Friday November 03, 2023 @07:20PM (#38136353)
depending on how organized you are... this can take a lot of time
Re:My "retirement" project: Release 40 years worth of my "so... by chatmasta on Friday November 03, 2023 @07:33PM (#38136436)
I can definitely relate to this feeling of "when $this is all over, I'll open source a bunch of it, but it's too much work to factor it out now," where $this is more often a company or project than a career. Sadly, it almost never happens. It just goes to show the importance of open sourcing what you can, as you can (in other words, "now or never"). But it's a lot more work to do that than people imagine, even when they say "well just release it in the least polished form possible." You've still gotta deal with adding a new boundary to your codebase, which not only requires additional effort but also increases complexity of the wider project and makes it impossible to refactor without first refactoring a cascade of miniprojects you've created within it.
Re:My "retirement" project: Release 40 years worth of my "so... by josephg on Friday November 03, 2023 @09:07PM (#38137040)
I often think of source code like moulding clay. While you’re actively working in a codebase, the clay is moist and malleable. Making changes is easy, because the context of what it does, and how it’s organised is fresh in your mind.

But if you move on to another project and let time pass, the clay dries out and becomes brittle. When you open the project up again, it takes time to “wet the clay” - and remember all that context that you’ve forgotten. It’s easy to add bugs, or reimplement methods that already exist somewhere else under a different name. But over time, you work water into the clay and it becomes malleable again.

I agree with your comment. Refactoring software to split out libraries that you can opensource is a lot of work. More work than people realise. But if you think refactoring is a lot of work when the clay is wet, it’ll be many times harder if you let the clay dry first. Refactoring as you work is always the best way, because it’s often the only way to get it done.

Re:My "retirement" project: Release 40 years worth of my "so... by coldcode on Friday November 03, 2023 @09:56PM (#38137342)
I wish I had saved something from my 40 years of programming, but I alwayds left everything behind when I moved to a new job. I did manage to keep my commercial memory allocator from the late 90's (single threaded, only supported Metrowerks CodeWarrior and the old MacOS), it was the fastest allocator on the Mac, and bug-free, but became obsolete with MacOS X. Not sure anyone would care today. I lost my source code to Trapeze as I mentioned yesterday ( https://en.wikipedia.org/wiki/Trapeze_(spreadsheet_program) ). I guess I never throught about saving most of my work for a day when no one cared if I shared it.
Re:My "retirement" project: Release 40 years worth of my "so... by snvzz on Sunday November 05, 2023 @01:45AM (#38148919)
>Not sure anyone would care today.

There's a vibrant retrocomputing community.

Re:My "retirement" project: Release 40 years worth of my "so... by VirusNewbie on Friday November 03, 2023 @04:04PM (#38134270)
Put it on github! You might actually get people to fork it and continue working on it.
Re:My "retirement" project: Release 40 years worth of my "so... by myself248 on Friday November 03, 2023 @05:01PM (#38134956)
That implies that it needs people to continue working on it.

Is there no such thing as "done" anymore?

Re:My "retirement" project: Release 40 years worth of my "so... by screamingninja on Friday November 03, 2023 @06:50PM (#38136114)
> That implies that it needs people to continue working on it.

It does not.

> Is there no such thing as "done" anymore?

Is there no such thing as "building upon it" anymore?

Re:My "retirement" project: Release 40 years worth of my "so... by nihiven on Friday November 03, 2023 @04:07PM (#38134301)
This is really cool. It seems very 'pure' in comparison to what my code history will look like. In 2040, a lot of my code will show how I used a bunch of libraries and frameworks that nobody uses 'these days'. This doesn't seem good or bad, just a reflection of the times.
Re:My "retirement" project: Release 40 years worth of my "so... by swatcoder on Friday November 03, 2023 @04:18PM (#38134445)
And unless you put in the effort to archive those dependencies yourself, nobody may be able to truly read or build your code anyway.

Today’s trendy development practices are shockingly ephemeral and fragile. Very little of today’s projects would survive one decade left fallow, let alone four.

Re:My "retirement" project: Release 40 years worth of my "so... by bluGill on Friday November 03, 2023 @04:32PM (#38134607)
A few years back my office threw away a PC running Windows XP with no service packs. It was left in a closet for many years just in case we had to fix a bug in some safety critical code.

A few years ago we tried to rebuild some safety critical code from sometime back and were unable to because the certificates had expired and so the machine that can build the source code refused to connect to our version control system.

Re:My "retirement" project: Release 40 years worth of my "so... by capitol_ on Friday November 03, 2023 @04:31PM (#38134591)
This is why I really like Debians policy of being self-contained, that everything in Debian is built from sources that are in the Debian system.

It takes a lot more effort to package stuff, since you can't just download your dependencies from the internet. But you also create something that isn't as ephemeral.

Re:My "retirement" project: Release 40 years worth of my "so... by trealira on Friday November 03, 2023 @04:41PM (#38134726)
Since you mention it, I recall that it's the same thing in OpenBSD: their policy is "base builds base."
Re:My "retirement" project: Release 40 years worth of my "so... by xyst on Friday November 03, 2023 @05:05PM (#38135003)
> And unless you put in the effort to archive those dependencies yourself

go makes this extremely easy to do

https://go.dev/ref/mod#go-mod-vendor

rust tool chain also includes a vendor dependency process

https://doc.rust-lang.org/cargo/commands/cargo-vendor.html

Re:My "retirement" project: Release 40 years worth of my "so... by bbkane on Friday November 03, 2023 @05:21PM (#38135159)
Do you use this and check in vendored code? I don't, maybe I should
Re:My "retirement" project: Release 40 years worth of my "so... by josephg on Friday November 03, 2023 @09:12PM (#38137077)
Reading this thread makes me think about archiving my code too. I have backups of my project folders going back to the 90s when I started programming. But I often delete node_modules and other build artifacts before archiving because that stuff takes up so much space.

But maybe it’s worth going through and actively and explicitly downloading all those dependencies too. Who knows when npm will get hacked again, or old package versions will get yanked. Disk space is cheap. I’ve written a lot of code over the years. It would be nice to know it all still runs.

Re:My "retirement" project: Release 40 years worth of my "so... by fallat on Friday November 03, 2023 @06:05PM (#38135636)
> Today’s trendy development practices are shockingly ephemeral and fragile

My fellow human, you have just nailed what is wrong with today's software.

Re:My "retirement" project: Release 40 years worth of my "so... by kqr on Saturday November 04, 2023 @03:34AM (#38138928)
Or stated a tautology. The trendy is almost by definition ephemeral and fragile. Otherwise we'd call it timeless!
Re:My "retirement" project: Release 40 years worth of my "so... by dotancohen on Saturday November 04, 2023 @05:17AM (#38139330)

  > Very little of today’s projects would survive one decade left fallow, let alone four.
I hate to break it to you. 2040 is less than half as distant as you think it is.
Re:My "retirement" project: Release 40 years worth of my "so... by soulofmischief on Saturday November 04, 2023 @06:27AM (#38139689)
I want off this ride.
Re:My "retirement" project: Release 40 years worth of my "so... by dotancohen on Wednesday November 08, 2023 @12:42AM (#38187188)
It will be over sooner than you think it will be.
Re:My "retirement" project: Release 40 years worth of my "so... by soulofmischief on Saturday November 04, 2023 @06:28AM (#38139695)
Checking dependencies into VCS should be more common as with yarn PnP and such.
Re:My "retirement" project: Release 40 years worth of my "so... by BobaFloutist on Saturday November 04, 2023 @02:51PM (#38143993)
I think that's somewhat the curse of technology. It's so hard to make anything from scratch. How do you get metallurgy working without already having metals? How do you get electricity running without an outlet, or at least powerful, easily sourced magnets?

Thinking about the "dependency tree" for any modern convenience is truly staggering. I can't even start to think about how you can make a factory without first having a factory.

Re:My "retirement" project: Release 40 years worth of my "so... by myth_drannon on Friday November 03, 2023 @04:32PM (#38134601)
all these `pip install` and `npm install` will be useless
Re:My "retirement" project: Release 40 years worth of my "so... by myself248 on Friday November 03, 2023 @04:58PM (#38134915)
They already are, if your internet connection has a hiccup or worse.

They already are, if something has been hijacked and is now malicious.

They already are, if you need to install something offline somewhere.

They already are.

Re:My "retirement" project: Release 40 years worth of my "so... by xyst on Friday November 03, 2023 @05:07PM (#38135027)
not sure if node has its own vendor process now

But languages like go and rust have had the ability to “vendor dependencies” for awhile now.

Don’t need an active internet connection. Just need to have the toolchain.

Re:My "retirement" project: Release 40 years worth of my "so... by josephg on Friday November 03, 2023 @09:15PM (#38137107)
Node predates npm. All node does is look for dependencies in the nearest node_modules directory. (And all npm does is download dependencies into that folder). So you can simply archive / check in your node_modules directory if you want to. I think there’s tools to help out and make sure the dependency versions are all pinned. (npm shrink-wrap and friends)
Re:My "retirement" project: Release 40 years worth of my "so... by touisteur on Friday November 03, 2023 @11:04PM (#38137754)
Even before... Trying to compile archived versions of the python 2.7 runtime on recent Linux distributions is an exercise in frustration. Thank god for the gentle souls that keep putting out lightly updated compilable 2.7 python runtimes, your efforts haven't gone unnoticed.
Re:My "retirement" project: Release 40 years worth of my "so... by efreak on Sunday November 12, 2023 @04:42AM (#38238789)
I have a directory full of prebuilt wheels for the entire dependency chains of several python applications I use. All you need to do is tell python to build all the wheels and save them to X directory, and point it back at that directory for installing. In particular on Termux, there's a number of rarely-used python programs that have native dependencies, so I store them on my network drive to free up storage on my tablet. I have a similar setup for doing stuff on Colab. It's entirely possible to use python/pip in an offline environment, as long as you've planned for it ahead of time; all you need is pip and possibly wheel, and the correct version of python.
Re:My "retirement" project: Release 40 years worth of my "so... by outside1234 on Friday November 03, 2023 @04:33PM (#38134621)
Please put it on Github - nobody will ever find this otherwise
Re:My "retirement" project: Release 40 years worth of my "so... by 38 on Friday November 03, 2023 @04:39PM (#38134704)
It's on the front page, so your comment seems pretty tone deaf.
Re:My "retirement" project: Release 40 years worth of my "so... by outside1234 on Friday November 03, 2023 @05:19PM (#38135140)
For today -- and tomorrow everyone forgets about it.
Re:My "retirement" project: Release 40 years worth of my "so... by 38 on Friday November 03, 2023 @07:19PM (#38136336)
it being on GitHub does not keep it in peoples memory. so this argument is not sound.

if it was on GitHub, and it made it to the HN front page, "tomorrow everyone forgets about it" would still apply.

Re:My "retirement" project: Release 40 years worth of my "so... by thecyborganizer on Friday November 03, 2023 @04:38PM (#38134679)
From STYLE.TXT:

  - True=7 -

  Having lots of very low-level code and hardware experience, I developed a bit
  of tendancy to "minimize what can go wrong at low levels" - C treats 0==FALSE
  and !0==TRUE - most people use 0/1 ... but thats only 1 bit "difference".  I
  sometimes use 7=TRUE as thats 3 bits with no more chars to type (and of course
  foolish as such a 1 bit hardware error would "trash" pretty much any system -
  but I do tend to be a creature of habit :)
I have never heard of this convention before! Was "random bitflips messing with your conditionals" a common problem back in the day?
Re:My "retirement" project: Release 40 years worth of my "so... by wrs on Friday November 03, 2023 @04:42PM (#38134732)
I’ve been involved with systems where 0xffff… was canonical “true”, but not something as specific as 7! If you’re going to turn on more bits, why not all of them? Though I think this was because the NOT instruction was used for logical inversion, so the bit flip theory doesn’t apply.
Re:My "retirement" project: Release 40 years worth of my "so... by cpeterso on Friday November 03, 2023 @04:56PM (#38134890)
For example, the value of Visual Basic's "True" keyword is -1. This seems silly from the perspective of a C programmer, but -1 (0xffffffff) is "more true" than 1 because every bit is true, not just the LSB. :)

https://learn.microsoft.com/en-us/dotnet/visual-basic/langua...

Re:My "retirement" project: Release 40 years worth of my "so... by bilekas on Friday November 03, 2023 @05:51PM (#38135460)
Even in VB there is a grain of rationale .. I never even considered before WHY it was -1.. I always just thought it was VB doing VB, but now I have gained +1 respect for Vb..

Edit: "Gained" no "Earned"

Re:My "retirement" project: Release 40 years worth of my "so... by marssaxman on Friday November 03, 2023 @05:52PM (#38135477)
In the long-ago world where integers were commonly used as arrays of bit flags, it made perfect sense that True = Not False.
Re:My "retirement" project: Release 40 years worth of my "so... by layer8 on Friday November 03, 2023 @05:27PM (#38135226)
The OP still wanted to only type a single character.
Re:My "retirement" project: Release 40 years worth of my "so... by jareklupinski on Friday November 03, 2023 @04:52PM (#38134855)
tangential to 'how can a bit be wrong', when trying to see if a serial data line is working, i write 0xA5 ( 1010 0101 ) to send an alternating bitstream with a twist so i can test the greatest number of things i think can be wrong at once
Re:My "retirement" project: Release 40 years worth of my "so... by genter on Friday November 03, 2023 @05:05PM (#38135006)
Except that if you have the bit endian wrong, 0xA5 is the same forward and backward.
Re:My "retirement" project: Release 40 years worth of my "so... by jareklupinski on Friday November 03, 2023 @05:08PM (#38135038)
that's true! 0xAA 0x55 would work to differentiate that case?
Re:My "retirement" project: Release 40 years worth of my "so... by MadnessASAP on Friday November 03, 2023 @05:53PM (#38135497)
Yes, AA and 55 are common test patterns for a variety of hardware.

Haven't seen A5 in the wild but I suppose it could be useful as a initial "Let's setup a connection" where endianness is unknown. Assuming the next thing that is exchanged is an endian negotiation.

Re:My "retirement" project: Release 40 years worth of my "so... by genter on Friday November 03, 2023 @07:49PM (#38136532)
I like to have several sequential ones. Easier to see on the oscilloscope. (I spent last night getting a microcontroller to talk to a SPI device, so I'm still licking my wounds.)
Re:My "retirement" project: Release 40 years worth of my "so... by theblazehen on Saturday November 04, 2023 @06:09AM (#38139592)
0xAA 0x55 is actually used as the last two bytes in the MBR just for this purpose
Re:My "retirement" project: Release 40 years worth of my "so... by ahoka on Saturday November 04, 2023 @04:13AM (#38139056)
Endianness is byte order.
Re:My "retirement" project: Release 40 years worth of my "so... by mysterydip on Sunday November 05, 2023 @07:55AM (#38150727)
Bit endian is a thing in serial protocols. I had an issue with that when using a microcontroller to talk to an LCD last week.
Re:My "retirement" project: Release 40 years worth of my "so... by UweSchmidt on Friday November 03, 2023 @07:06PM (#38136237)
How would a HNer who's not familiar in those nether regions of computing, but wants to feel the excitement of sending a bitstream over a (possibly faulty!) serial data line, get started? Two Arduinos and a cable maybe?
Re:My "retirement" project: Release 40 years worth of my "so... by jareklupinski on Friday November 03, 2023 @07:18PM (#38136328)
yup that's what I was building :)

i was sending pixel data out from an Arduino (ESP32 really but using Arduino IDE) to a bunch of shift registers that seemed to be 74x595 (but couldnt know for sure) to resurrect an LED display for a local art project, and reading the data coming back out from the last register let me know I was at least getting back what I was putting in, which helped me troubleshoot a few wire length and speed/stability issues

to get started with electronics and hardware in general, I wrote a short tutorial: https://news.ycombinator.com/item?id=35116705

Re:My "retirement" project: Release 40 years worth of my "so... by UweSchmidt on Friday November 03, 2023 @07:44PM (#38136494)
That tutorial of yours is a lot more than I expected to get out of my question, such a cool first project! Thanks!
Re:My "retirement" project: Release 40 years worth of my "so... by robocat on Friday November 03, 2023 @08:05PM (#38136641)
Personally I would recommend finding fun or useful projects where you have an outcome you really desire. Start simple - one sensor like a bath overflow warner (arduino is good or maybe raspberry pi).

Learning hardware just for the sake of it is tough to keep motivated and perhaps you would never use the skills you learn? Hardware adds a tougher level to debugging - but software experience gives you a fantastic start - a logical mind and rational drilling down.

If you can fix your car you have the skills to start on electronics!

A lot of skilled people grew up through the hardware generations e.g. I began learning basic electronics because on an Apple ][ everything was simpler and we were all at the same stage. My first job was writing low level serial driver code and regularly dealing with serial devices (e.g. on PC). Our modern context is just not the same. The internet is hard to learn from. It is difficult to write good articles to help - the experienced like me just know a huge variety of implicitly learned knowledge.

I suggest you concentrate on a useful or fun outcome - I believe it's good life practice (and good engineering) to stay focused on the outcome and not get too side-tracked by explicitly trying to learn. We implicitly learn just by doing!

Re:My "retirement" project: Release 40 years worth of my "so... by benj111 on Saturday November 04, 2023 @04:41AM (#38139178)
>If you can fix your car you have the skills to start on electronics!

I'd like to think that this is a comment on the ease of fixing cars, rather than a comment about how fixing cars is basically embedded hardware/software dev....

Re:My "retirement" project: Release 40 years worth of my "so... by turndown on Friday November 03, 2023 @08:38PM (#38136844)
The way that really clarified things for me was buying a 3d printer(an Ender 3 for me) and a Raspberry Pi. Setting it up and flashing a new OS to it should basically teach you the rudimentary workings of the hardware->software interface.
Re:My "retirement" project: Release 40 years worth of my "so... by Muromec on Friday November 03, 2023 @09:51PM (#38137316)
Esp32 is the cool arduino.
Re:My "retirement" project: Release 40 years worth of my "so... by olalonde on Saturday November 04, 2023 @07:16AM (#38139976)
I would suggest to search for "Arduino starter kit" or "embedded starter kit" on Amazon. They come with lots of components and usually with some project guides.
Re:My "retirement" project: Release 40 years worth of my "so... by dboreham on Friday November 03, 2023 @04:54PM (#38134878)
No. Random bitflips (aka hardware that doesn't work) are a relatively new thing. Bit flips due to buggy software was a thing though. This is why most database engines checksum the payload data even in memory. I've also seen network packets corrupted because a bridge (former name for switch) trashed data in flight, then reconstructed its CRC for the corrupt data on the onward leg.
Re:My "retirement" project: Release 40 years worth of my "so... by ziddoap on Friday November 03, 2023 @05:02PM (#38134968)
>Random bitflips (aka hardware that doesn't work) are a relatively new thing

This implies that old hardware always worked, which I strongly doubt (what year did hardware go from always working to not?).

Re:My "retirement" project: Release 40 years worth of my "so... by ChrisSD on Saturday November 04, 2023 @04:34AM (#38139151)
1993
Re:My "retirement" project: Release 40 years worth of my "so... by bernds74 on Friday November 03, 2023 @04:59PM (#38134926)
I beg to differ. Early 90s there were some Amiga memory expansions that would constantly flip bits. I'm pretty sure it contributed to the sentiment that the system wasn't the most stable, although I'm pretty sure one or two of my friends with PCs saw similar issues on their machines. Maybe Microsoft Word wasn't to blame for all the crashes?

Of course, trying to work around it in software is utterly futile.

Re:My "retirement" project: Release 40 years worth of my "so... by anonymousiam on Friday November 03, 2023 @05:02PM (#38134973)
SEE/SEU are not a relatively new thing. However, the frequency of events is inversely proportional to the feature size, which has been decreasing over time.

https://en.wikipedia.org/wiki/Single-event_upset

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

Re:My "retirement" project: Release 40 years worth of my "so... by dvaletin on Friday November 03, 2023 @04:58PM (#38134918)
What you mean by relatively new? I observed bitflips a couple decades ago, causing machine to panic.
Re:My "retirement" project: Release 40 years worth of my "so... by fuzztester on Saturday November 04, 2023 @05:52PM (#38145560)
Panics and consequent crashes or reboots (?) used to happen in Unixen at times, maybe due to bitflips or other hardware errors.
Re:My "retirement" project: Release 40 years worth of my "so... by indymike on Friday November 03, 2023 @07:00PM (#38136196)
Bitflips aren’t a new thing. I’ve been rarely but painfully bit by them since at least 1986. This. Excludes serial and modem communications where it was a way of life.
Re:My "retirement" project: Release 40 years worth of my "so... by dragonwriter on Friday November 03, 2023 @07:29PM (#38136401)
> Random bitflips (aka hardware that doesn't work) are a relatively new thing.

I thought they (from cosmic rays, etc.) were always a thing, but so rare that you needed a very large system (in scope or time or both) to have a substantial chance of encountering one (outside of noisy comm channels, which use error correction protocols for exactly that reason.)

Re:My "retirement" project: Release 40 years worth of my "so... by defrost on Saturday November 04, 2023 @05:18AM (#38139331)
Some event (unknown) triggered multiple spikes in the "tell me three times" redundant three ADIRU units of Qantas Flight 72 causing a WTF unscheduled sudden and dramatic pitch down

https://en.wikipedia.org/wiki/Qantas_Flight_72#Conclusion

Cosmic rays were suspected but unconfirmed (kind of hard to confirm after the fact).

"All the aircaft in the world" for sixty years is kind of a large system given that currently there are on the order of one million people in the air at any moment.

Re:My "retirement" project: Release 40 years worth of my "so... by heisenbit on Saturday November 04, 2023 @09:52AM (#38140991)
There are lot‘s of thing that can go wrong beyond cosmic rays. Like timing on the bus or signals from close wires. Digital is an abstraction of an analog and chaotic reality.
Re:My "retirement" project: Release 40 years worth of my "so... by euroderf on Saturday November 04, 2023 @05:01AM (#38139267)
Cosmic rays ?
Re:My "retirement" project: Release 40 years worth of my "so... by justin66 on Saturday November 04, 2023 @11:23AM (#38141880)
> Random bitflips (aka hardware that doesn't work) are a relatively new thing.

Bits flipping due to hardware that didn’t work well was what caused Xerox PARC to implement an error correcting memory for MAXC, fifty years ago.

https://gunkies.org/wiki/Maxc

> Bit flips due to buggy software was a thing though.

No kidding.

Re:My "retirement" project: Release 40 years worth of my "so... by egometry on Friday November 03, 2023 @04:57PM (#38134903)
Still is. And there's little to be done about it.

Unless you can stop cosmic rays.

Luckily it doesn't happen THAT often. I forget the exact metric but I recall various Google Engineers saying that something like one out of a million test run failures is a random bitflip?

Re:My "retirement" project: Release 40 years worth of my "so... by eichin on Friday November 03, 2023 @05:01PM (#38134960)
Cosmic rays were a theory in 70's era hardware for failures that ended up being proven to be particles emitted by the ceramic packaging itself. (Modern bitflips are have more to do with component sizes several orders of magnitude smaller.) (edit: not saying that cosmic rays aren't a problem now, just that they only became a problem as chip element sizes shrunk, and they're probably not the only source.)

Also, you can definitely stop cosmic rays, that was part of how they eliminated them as the source.

Re:My "retirement" project: Release 40 years worth of my "so... by Supermancho on Friday November 03, 2023 @05:51PM (#38135464)
> Also, you can definitely stop cosmic rays

As I understand it, bit flipping in RAM is mitigated by error correction, via auxilliary and redundant bits.

https://en.wikipedia.org/wiki/Dynamic_random-access_memory#R...

Re:My "retirement" project: Release 40 years worth of my "so... by vitus on Sunday November 05, 2023 @08:13AM (#38150848)
ECC RAM is for the most part relegated to server-grade components, for what it's worth. So your phone, your laptop, your router? Almost certainly not using any ECC RAM, unless you've gone out of your way to do so.
Re:My "retirement" project: Release 40 years worth of my "so... by buildbot on Friday November 03, 2023 @06:18PM (#38135782)
I swear there was a google paper about using a DC as a really bad particle detector, but I can’t find :/
Re:My "retirement" project: Release 40 years worth of my "so... by scottlamb on Friday November 03, 2023 @05:08PM (#38135035)
> I have never heard of this convention before! Was "random bitflips messing with your conditionals" a common problem back in the day?

Due to RAM/CPU failures? I don't think so (though I have seen it, fwiw). With weird serial protocols that don't have proper checksums/digests, running over sketchy wiring? Yeah, and that might be part of "very low-level code and hardware experience".

Re:My "retirement" project: Release 40 years worth of my "so... by layer8 on Friday November 03, 2023 @05:17PM (#38135129)
No, this is more a case of “this could conceivably happen, so why not guard against it where it’s easy to do”. Though personally I would have used -1.
Re:My "retirement" project: Release 40 years worth of my "so... by adrianmsmith on Saturday November 04, 2023 @04:31AM (#38139134)
The BBC micro and Archimedes used -1 as true in BASIC.

It meant that you didn't need the distinction of "logical operators" (like && in C) and "bitwise operators" (like & in C). You could just use bitwise operators, e.g. the bitwise NOT operator would convert 0 (all bits clear) was -1 (all bits set) so there was no need for "logical operators".

I always felt that was more elegant than C (but of course required a two's compliment machine, which BBC/Archimedes was, but C didn't require).

Re:My "retirement" project: Release 40 years worth of my "so... by layer8 on Saturday November 04, 2023 @07:54AM (#38140191)
This is only sound if you have a boolean type that guarantees that the bits are either all zero or all one. Once a mix of bit values is possible, you have to define whether it mean true or false, and then you can’t use the bitwise operators anymore.
Re:My "retirement" project: Release 40 years worth of my "so... by AnimalMuppet on Friday November 03, 2023 @05:21PM (#38135164)
To the degree that you were worried about such things, this wasn't a real answer. Yes, it saves you if you have a boolean variable... maybe?

  if (var == TRUE)
    ; // It was 7
  else if (var == FALSE)
    ; // it was zero
  else
    ??? what do I do here?
And you need to solve that "what do I do here" for every single conditional on a boolean, and have the extra lines of code to handle it and not crash.

But, you know, what if it was a variable that you used in a switch statement instead? Or just "if (i > 17)"? Bit flips can affect your logic all over the place, not just when it's a boolean variable.

And then, if a bit flip can affect a boolean, it can also affect a pointer. Or the return address on the stack (or the link to the previous stack frame).

Or it can flip a bit in the code.

So this is, at best, a very very partial solution, and it's non-trivial to implement. So this was very much not standard practice or a "convention".

Re:My "retirement" project: Release 40 years worth of my "so... by LordShredda on Friday November 03, 2023 @06:45PM (#38136057)
if var is neither this nor that then it's not a boolean
Re:My "retirement" project: Release 40 years worth of my "so... by AndreiBB on Friday November 03, 2023 @07:04PM (#38136227)
Here is how I do it:

#define FALSE 0

#define TRUE (!FALSE)

ASSERT( TRUE != FALSE );

and let the compiler worry about which bits to use for TRUE

Re:My "retirement" project: Release 40 years worth of my "so... by russdill on Friday November 03, 2023 @07:45PM (#38136508)
I've been on a team trying to argue that exact thing. If you aren't going to handle the case where the var is neither true nor false, at least by explicitly documenting the fail-safe case, you're just cargo culting. You get a lot of that type of thing in MISRA and automotive codebases.

Any team that realizes that the compiler may choose to optimize out a shit-ton of such code gets an extra gold star.

Re:My "retirement" project: Release 40 years worth of my "so... by dahart on Saturday November 04, 2023 @10:54AM (#38141571)
Why do you think you need the “else: ??? What do I do here?” case?

Until you added the 2nd test and the 2nd else case, there is no scenario under which both paths of an if/else would fail to execute due to a bit flip of the test variable, because with ‘if (boolean_condition) {} else {}’ there is only 1 conditional test. A bit flip could have caused the wrong branch to execute, but it could not have skipped both branches. A bit flip could change the jump instruction to something else, but in that case your imagined else case still wouldn’t help.

> this is, at best, a very very partial solution

FWIW, the author said this, and fairly succinctly, saying this TRUE=7 thing is “of course foolish as such a 1 bit hardware error would "trash" pretty much any system”. He was only having a bit of fun that cost nothing, and nowhere suggested this is a solution to cosmic rays or other data errors.

Re:My "retirement" project: Release 40 years worth of my "so... by LastTrain on Friday November 03, 2023 @07:10PM (#38136261)
No, and the author basically admitted it was silly. My counter would be that it makes the intent less clear. I loved reading through his style doc though and I love that he just threw all this stuff out there. Something in his collection is bound to scratch somebody’s itch.
Re:My "retirement" project: Release 40 years worth of my "so... by kortilla on Friday November 03, 2023 @07:42PM (#38136484)
It’s a problem even now if you have software security checks dealing with adversarial actors with hardware access.
Re:My "retirement" project: Release 40 years worth of my "so... by rendaw on Friday November 03, 2023 @11:06PM (#38137769)
This doesn't make any sense even if the system isn't trashed.

If 7 == true and anything other than 7 == false, then one bitflip will still change the meaning. If 7 == true and 0 == false, then you could have code that does `if (mybool == 7) { ... }` and later `if (mybool == 0) { ... }` and end up with a situation where code path invariants are broken (i.e. mybool is neither true nor false.

If you use `>= 7` to mean true and `< 7` to mean false, while a 0 false value won't randomly become true if one of 3 bits randomly flips, a `7` true value will become false if any of those bits flip. And if any of the other bits flip, 0 will become > 7.

Re:My "retirement" project: Release 40 years worth of my "so... by fabbari on Saturday November 04, 2023 @10:14AM (#38141177)
In C any value != 0 is considered true. Nothing special about 7, he could have used any other number, but 7 is a single character, so he used that.
Re:My "retirement" project: Release 40 years worth of my "so... by kqr on Saturday November 04, 2023 @02:31AM (#38138678)
Even if it was, are you really going to think of every conditional as a tri-state boolean?

Or will you assume that one of the branches is safe to execute during failure?

Or will you count the number of bits in each conditional and assume more ones than zeroes is a true, with no error correction? Will you log that a bit has flipped or otherwise alert the operator? Will you consider that as evidence that an int has changed value too?

Will you store ints with three bits per bits also?

Error detecting codes have their place, but it takes more than just saying that true is 7.

Re:My "retirement" project: Release 40 years worth of my "so... by benj111 on Saturday November 04, 2023 @04:35AM (#38139153)
Slightly off topic, but why did 1 become the truthy value and not -1?

Logical nots would then work.

And youre still an inc/Dec away from the opposite.

Re:My "retirement" project: Release 40 years worth of my "so... by never_inline on Saturday November 04, 2023 @08:53AM (#38140608)
That depends on

a) Two's complement representation

and

b) Wraparound on arithmetic, which is still UB in low-level languages.

Re:My "retirement" project: Release 40 years worth of my "so... by benj111 on Saturday November 04, 2023 @04:59PM (#38145065)
Ok. I used -1 as a short hand for 0b11111111(11111111(1111111111111111(11111111111111111111111111111111))))

Not doesn't rely on wrap around arithmetic.

Wrap around arithmetic is only undefined for signed values.

What platform doesn't wrap around signed integers?

Just because c has some undefined behaviour, doesn't make it some natural law of the universe.

Re:My "retirement" project: Release 40 years worth of my "so... by myth_drannon on Friday November 03, 2023 @04:39PM (#38134701)
I like to download images of old programming CD's from archive.org, like Programmers Heaven[1] for example. All small and interesing programs/tutorials to look at.

[1] https://archive.org/details/Programmers_Heaven_InfoMagic_Mar...

Re:My "retirement" project: Release 40 years worth of my "so... by TMWNN on Friday November 03, 2023 @04:40PM (#38134713)
Vernor Vinge's A Deepness in the Sky depicts a human society thousands of years in the future, in which pretty much all software has already been written; it's just a matter of finding it. So programmer-archaeologists search archives and run code on emulators in emulators in emulators as far back as needed. <https://garethrees.org/2013/06/12/archaeology/>

You've made a contribution to the hoard that someone will benefit from, whether tomorrow or in 5,000 years.

Re:My "retirement" project: Release 40 years worth of my "so... by egometry on Friday November 03, 2023 @05:00PM (#38134937)
The part about the modern (read: far future) calendar being commonly thought to be based on mankind's first moon landing but ACTUALLY being based on the Unix Epoch is a favorite amoungst engineers I know that love Vinge
Re:My "retirement" project: Release 40 years worth of my "so... by ceva on Friday November 03, 2023 @04:53PM (#38134868)
why not somewhere on git? :(?
Re:My "retirement" project: Release 40 years worth of my "so... by jhallenworld on Friday November 03, 2023 @05:16PM (#38135119)
I think his most impactful utility is ImageDisk: used to archive floppy disks from many different types of computers using IBM PCs.

Much of the old software found on bitsavers.org (and archive.org) was recovered using this utility.

Re:My "retirement" project: Release 40 years worth of my "so... by razster on Friday November 03, 2023 @05:26PM (#38135211)
Another link from DDS is Dave's Old Computers http://dunfield.classiccmp.org/ , a nice treasure of old pc reviews and images, (Left, right, front and back). This is amazing as I've been working on making 3D assets for a project of mine.
Re:My "retirement" project: Release 40 years worth of my "so... by JaDogg on Friday November 03, 2023 @05:35PM (#38135295)
[delayed]
Re:My "retirement" project: Release 40 years worth of my "so... by adastra22 on Saturday November 04, 2023 @12:36PM (#38142614)
Also ran into the same 404. There's not many original CAD programs out there. I'd love to see this one.
Re:My "retirement" project: Release 40 years worth of my "so... by kuroguro on Saturday November 04, 2023 @02:22PM (#38143738)
I think the MCSAMPLE zip contains the full thing as well
Re:My "retirement" project: Release 40 years worth of my "so... by bilekas on Friday November 03, 2023 @05:42PM (#38135361)
This is brilliant.. It's so interesting too because over the years I've built up a few "Bibles" that I always need on hand when working in a particular language or even just automation, I've learnt some very good organising processes (from HN to be honest), I never thought to 'release' them as they feel quite personal and specific for my mental process.

Looking through some of these though, I think I'm inspired. Super cool idea, I would donate to the retirement project financially to say thanks if possible.

Re:My "retirement" project: Release 40 years worth of my "so... by absoluteunit1 on Saturday November 04, 2023 @02:18AM (#38138635)
I’m curious, what do you mean by “Bibles” exactly ?

And what are the organizing processes you learned; I’m always eager to learn productivity tips/software from others

Re:My "retirement" project: Release 40 years worth of my "so... by dotancohen on Saturday November 04, 2023 @05:23AM (#38139364)
I have quite a few of these bibles too. I'd love to swap some files if you're interested, I'm sure there is much to learn from yours. My Gmail username is the same as my HN username if you are interested.
Re:My "retirement" project: Release 40 years worth of my "so... by absoluteunit1 on Sunday November 05, 2023 @12:37PM (#38153382)
Ah but when you say “bibles”, what do you mean exactly? Is it just common/useful code you fold related to a particular language/framework? Could you elaborate on this
Re:My "retirement" project: Release 40 years worth of my "so... by dotancohen on Sunday November 05, 2023 @02:31PM (#38154717)
Usually there's a getting started section, mostly links to important nuances in the fine documenting and short code examples. Then there will be a section for each problem that I've encountered - often things that I've solved by reading Stack Overflow answers. But then there are the footguns and pitfalls - this is where the real value of these files lie.
Re:My "retirement" project: Release 40 years worth of my "so... by absoluteunit1 on Wednesday November 08, 2023 @11:30AM (#38192766)
Oh that’s a really great idea. Thank you for elaborating; I think I will get into a habit of doing a similar thing
Re:My "retirement" project: Release 40 years worth of my "so... by varjag on Friday November 03, 2023 @05:45PM (#38135408)
I regret not archiving my early code for good so much. First non trivial program (a snake game). First utility in assembly. First device driver (for a Centronics printer). That perpetual calendar in Pascal for a uni assignment, written with enormous hangover within an hour and still my only program written entirely bug-free to the date. All seemed trivial and not worthy of preservation then but in the end I have no code surviving from before late 1990s.

Take good care of your code kids!

Re:My "retirement" project: Release 40 years worth of my "so... by legends2k on Friday November 03, 2023 @11:04PM (#38137752)
This is a problem only we'd to face. Kids these days use Git in some hosting hub or the other that it's a rarity that their code gets lots. Of course if these "free" services go down... it matters. Self-hosting has its uses.
Re:My "retirement" project: Release 40 years worth of my "so... by valyagolev on Friday November 03, 2023 @11:18PM (#38137839)
yeah when GitHub is sold to PE 15 years from now, and we get emails like "you have 2 days to backup all your repos", i hope I won't feel too lazy
Re:My "retirement" project: Release 40 years worth of my "so... by pabs3 on Sunday November 05, 2023 @07:48AM (#38150681)
Luckily Software Heritage is backing up all of GitHub and more, so even the lazy ones won't lose code :)

https://www.softwareheritage.org/

Re:My "retirement" project: Release 40 years worth of my "so... by nestorD on Saturday November 04, 2023 @02:39AM (#38138706)
It is this exact realization, while looking for some of my old code, that first got me started using git and github.
Re:My "retirement" project: Release 40 years worth of my "so... by gpcz on Saturday November 04, 2023 @08:09AM (#38140294)
I have a lot of my old code, but I never want to look at it because it's super-cringe.
Re:My "retirement" project: Release 40 years worth of my "so... by magicalhippo on Saturday November 04, 2023 @09:00AM (#38140653)
I lost the first 5-6 years of code thanks to an IBM Deathstar[1] when I was 20.

Got really depressed by it at the time, as it included most of the projects I worked on at the time. After that I got super paranoid about having backups.

I do enjoy going back and looking at the code I still have though. Being self-taught it's mostly not terribly great, but I do have fond memories of finally cracking a certain nut or figuring out some neat trick.

[1]: https://en.wikipedia.org/wiki/Deskstar

Re:My "retirement" project: Release 40 years worth of my "so... by snvzz on Sunday November 05, 2023 @01:45AM (#38148915)
That tough lesson about backups.

Many a person has had to learn it the hard way.

Re:My "retirement" project: Release 40 years worth of my "so... by grepfru_it on Sunday November 05, 2023 @12:31PM (#38153331)
Left all backups at a remote storage facility. Remote storage facility called me one day and said all of your hardware and media has been lost, except for this one [insert oldest most worthless computer of the bunch]. Cue me raging, cursing out this storage facility, threatening to never communicate with them ever again. Finally accepted the fault lied within me. Up until yesterday, I only had redundant storage but no true backups. So I purchased an LTO-5 and now I have two backup sets onsite and a third offsite at my colocation facility.

In this story the remote storage facility was my mom's house shortly before the GFC. The hardware were varying PS/2 computers from 286 to 486s with hard drives of zip files of my QBASIC, TurboPascal, Delphi, and VisualBasic code. The only hardware saved was our first computer, an 8088. All because she didn't want the clutter in the house anymore. No contact, no chance to retrieve said wares.. just poof gone. Gone were the Z80 ASM files of my rendition of PunchOut for the Ti-83+. Can't reference my old writings that I saved in various TXT files on the gazillion 3.5" floppy disks I kept in an old laundry basket. 5.25" floppies of DOS installs, random games, and an ancient version of SCO Unix. Gone.

Everyone learns the hard way.

Re:My "retirement" project: Release 40 years worth of my "so... by snvzz on Sunday November 05, 2023 @01:49PM (#38154249)
>All because she didn't want the clutter in the house anymore.

A recurrent theme in retrocomputing forums. Never trust family with old computers; they consider them worthless.

I somehow managed to save mine. Hardware is with me, and data is well replicated, with warm, cold, remote, as well as cloud copies.

It is also all encrypted, thus it has a good chance to remain private unless I decide otherwise.

Re:My "retirement" project: Release 40 years worth of my "so... by snvzz on Sunday November 05, 2023 @01:50PM (#38154272)
The deathstar of legend.
Re:My "retirement" project: Release 40 years worth of my "so... by varjag on Saturday November 04, 2023 @11:44AM (#38142093)
Mine did vary quite a bit within that period, from BASIC in middle school to some funky selective availability GPS handling prod code. But it's beside the point: I'd love it as memento, no expectation really that said game of snake would end up on Steam.
Re:My "retirement" project: Release 40 years worth of my "so... by xtracto on Monday November 06, 2023 @07:09AM (#38161491)
Same here. I made a DOS spreadsheet program (with modeX charting! And formulas), a couple of games and a couple of viruses (aaaa TSR looked like magic)... I think they might be in some floppies in my mom's basement.
Re:My "retirement" project: Release 40 years worth of my "so... by ai-epiphany on Friday November 03, 2023 @05:53PM (#38135495)
thanks for the tokens
Re:My "retirement" project: Release 40 years worth of my "so... by bilekas on Friday November 03, 2023 @05:56PM (#38135538)
Quick question because I can't actually find any info on it, but what license are these released with ?
Re:My "retirement" project: Release 40 years worth of my "so... by fallat on Friday November 03, 2023 @06:03PM (#38135626)
Did you seriously even look at the webpage? https://dunfield.themindfactory.com/dnld/sc/COPY.TXT It's right at the top man.
Re:My "retirement" project: Release 40 years worth of my "so... by nick238 on Friday November 03, 2023 @06:15PM (#38135735)
Though because that license says "for any reasonable purpose" it's something that's vague when it comes to "is this FOSS" as it's vaguely Crockford-like ("this software shall be used for Good, not for Evil").

The [OSI requires](https://opensource.org/osd/):

> 6. No Discrimination Against Fields of Endeavor > The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

[GNU/FSF](https://www.gnu.org/philosophy/free-sw.html) have as "Freedom 0":

> The freedom to run the program as you wish, for any purpose

Re:My "retirement" project: Release 40 years worth of my "so... by Pannoniae on Friday November 03, 2023 @07:36PM (#38136450)
It's just a homemade licence, IMO don't need to be pedantic about it.

If you think you are being reasonable, use it, if you think you are not, don't :)

Re:My "retirement" project: Release 40 years worth of my "so... by dboreham on Friday November 03, 2023 @08:16PM (#38136715)
Legally, "reasonsable" just means "for a reason" (that someone can describe). Ianal but, one told me this long ago.
Re:My "retirement" project: Release 40 years worth of my "so... by bilekas on Friday November 03, 2023 @06:26PM (#38135868)
So honestly I didn't read the "COPY.TXT" .. I wouldn't expect a license to sit there, and I didn't consider that a license personally, I was expecting a defined license.
Re:My "retirement" project: Release 40 years worth of my "so... by fallat on Friday November 03, 2023 @07:20PM (#38136351)
What did you think "COPY.TXT" meant, in all honesty?
Re:My "retirement" project: Release 40 years worth of my "so... by teh_klev on Friday November 03, 2023 @08:43PM (#38136880)
If you're alluding to COPY.TXT meaning COPYRIGHT.TXT and therefore it would/should contain a license then I hate to disappoint you. Copyrights and Licenses are different things. So maybe put a dampener on your expressions of incredulity, it's not a great way to engage here.
Re:My "retirement" project: Release 40 years worth of my "so... by BenjiWiebe on Friday November 03, 2023 @10:39PM (#38137615)
Afaik there's s really common convention of a file named COPYING with instructions on when you can/cannot copy the code, i.e. the license.
Re:My "retirement" project: Release 40 years worth of my "so... by bilekas on Friday November 03, 2023 @11:53PM (#38137998)
> What did you think "COPY.TXT" meant, in all honesty?

so I'm most focused on this one : SYNC Synchronize two directry trees

While I was lost in the folder sync tools, Copy.txt really just stood out as a readme honestly.

Edit: Readme of the implementation. Like all the rest.

Re:My "retirement" project: Release 40 years worth of my "so... by vitiral on Friday November 03, 2023 @07:41PM (#38136474)
It's in COPY.txt, although it's homespun.

If you're the author, please please release into the public domain (CC0) if your purpose is educational. That makes it so anyone can learn from it and build on it without any fear of infringement.

Re:My "retirement" project: Release 40 years worth of my "so... by jcmoscon on Friday November 03, 2023 @06:12PM (#38135716)
You have the same name as the billionaire guy. Are you him? :)
Re:My "retirement" project: Release 40 years worth of my "so... by accrual on Friday November 03, 2023 @06:36PM (#38135972)
I downloaded RINGSW.ZIP to check it out.

> This file is NOT included in the demo version of this product.

> For more information, please contact Dunfield Development Systems

I admire the effort, but if you're not going to make the source freely available, what's the point? What is somebody going to do 100 years from now when they get your .zip off archive.org and you're long gone?

Re:My "retirement" project: Release 40 years worth of my "so... by legends2k on Friday November 03, 2023 @11:28PM (#38137877)
> what's the point? What is somebody going to do 100 years from now when they get your .zip off archive.org and you're long gone?

The author seems quite aware of this. He calls it out specifically: it's for learning and curiosity purposes.

Re:My "retirement" project: Release 40 years worth of my "so... by accrual on Saturday November 04, 2023 @01:56AM (#38138558)
Surely, but the author also says:

> my goal now is to release 40+ years of source code

And there was no code in the .zip. Shrug.

Re:My "retirement" project: Release 40 years worth of my "so... by cxr on Saturday November 04, 2023 @02:35PM (#38143870)
[delayed]
Re:My "retirement" project: Release 40 years worth of my "so... by accrual on Saturday November 04, 2023 @10:47PM (#38147567)
Thanks for clearing things up. I was indeed too hasty with my initial comment and didn't consider it wasn't a deliberate decision. Thanks again.
Re:My "retirement" project: Release 40 years worth of my "so... by asdefghyk on Friday November 03, 2023 @06:38PM (#38135994)
THere are reasons not to host on GitHub . There are workarounds to hosting on GitHub Google words why not put software on git hub Finds https://sanctum.geek.nz/why-not-github.html OR https://www.wired.com/2015/06/problem-putting-worlds-code-gi...
Re:My "retirement" project: Release 40 years worth of my "so... by potwinkle on Friday November 03, 2023 @07:14PM (#38136297)
Very cool to see such a long history, were the different projects you worked on related to what was going on at your job at the time?
Re:My "retirement" project: Release 40 years worth of my "so... by yndoendo on Friday November 03, 2023 @07:45PM (#38136501)
Any one catch the out of memory comment?

# we require more vespene gas; unix consensus; kNtErrorOutofmemory;

Re:My "retirement" project: Release 40 years worth of my "so... by golem14 on Friday November 03, 2023 @07:45PM (#38136507)
Worth reading the Author's recollections of his almost dying in 2019:

https://dunfield.themindfactory.com/2019.htm

Re:My "retirement" project: Release 40 years worth of my "so... by haolez on Friday November 03, 2023 @09:14PM (#38137092)
That was intense. It made me think about my father in law, who had a heart attack in 2015 that compromised 90% of his heart. His exams are so ugly that one of his physicians refused to threat him, probably worrying that he might die any minute during the appointment.

He is still alive today, he has a normal life and he even manages to go for a run in the beach every saturday. His exams haven't improved, he is always out of breath, but he just refuses to die. It's like what the physician said in the link above: "You look a lot better than what's in the paper".

Re:My "retirement" project: Release 40 years worth of my "so... by hnthrowaway0315 on Friday November 03, 2023 @09:38PM (#38137240)
Strangely reminds me of "The Shadow out of the time" by the reverent HPL.
Re:My "retirement" project: Release 40 years worth of my "so... by winrid on Saturday November 04, 2023 @01:14AM (#38138352)
> "Hug his children. Sleep in his own bed. Eat his meals. and Work a little with his hands." in her words "They shot everything she said down"

Anyone know why doctors do this? They did the same thing with my father when he wasn't getting better (leukemia with pneumonia) and they couldn't get him off the breathing tube. They were very adamant he'd be disabled for life.

Re:My "retirement" project: Release 40 years worth of my "so... by kingds on Saturday November 04, 2023 @03:30AM (#38138916)
doctors are all completely insane and should never be trusted. the process of getting into and through medical school has a selection bias towards type-a sociopaths. and whoever makes it through that wringer and gets board certified has to be constantly on guard for malpractice lawsuits. half sarcastic but mostly i do believe this lol
Re:My "retirement" project: Release 40 years worth of my "so... by zulban on Saturday November 04, 2023 @07:55AM (#38140198)
It's tough. A vast majority of the time the doctors are right about recovery, and the family is wrong, and optimistic to a delusional degree. It's hard work telling family how bad things really are.

Still, if something happens to me or loved ones I hope I get doctors who can distinguish between zero and one in a thousand.

Re:My "retirement" project: Release 40 years worth of my "so... by BobaFloutist on Saturday November 04, 2023 @02:46PM (#38143958)
I mean they're giving the best information they have. Sometimes it's wrong, but unless you think they should hedge more (which people also hate, "Why won't doctors ever commit to something, it's always 'maybe' or 'I don't know' or 'we'll see', what's the point of the degree and the high pay if they don't know anything?!") I don't really see what else they can do.

We hear a lot about all the times they're wrong, because they're tragic or frustrating or confusing, and because biology is super non-deterministic they're probably wrong more often than say physicists, but they're also right a lot of the time too, enough of the time that we consider it worth having them. We just don't get as many articles and anecdotes about a doctor correctly predicting someone's disability, because it's not as interesting.

Re:My "retirement" project: Release 40 years worth of my "so... by m3kw9 on Saturday November 04, 2023 @10:16AM (#38141193)
Grim af but that looks like a happy ending
Re:My "retirement" project: Release 40 years worth of my "so... by kmoser on Friday November 03, 2023 @11:51PM (#38137992)
Not ready to retire, but I did something like that a few years ago with the previous generation of code I wrote: https://www.kmoser.com/sourcecode/
Re:My "retirement" project: Release 40 years worth of my "so... by aquarin on Saturday November 04, 2023 @01:52AM (#38138538)
Some links unfortunately are broken.
Re:My "retirement" project: Release 40 years worth of my "so... by anArbitraryOne on Saturday November 04, 2023 @02:01AM (#38138579)
Great LLM training data
Re:My "retirement" project: Release 40 years worth of my "so... by keepamovin on Saturday November 04, 2023 @02:45AM (#38138729)
This is wonderful. Thank you. Very moving that you choose to share this!!! Thanks for making a positive impact on the world.
Re:My "retirement" project: Release 40 years worth of my "so... by sakesun on Saturday November 04, 2023 @04:30AM (#38139128)
Respect. I'll follow when my time come.
Re:My "retirement" project: Release 40 years worth of my "so... by tqwhite on Saturday November 04, 2023 @09:18AM (#38140769)
At 70, I do not think anyone has anything to learn from my 40+ years of code. I envy Mr Mindfactory's confidence.
Re:My "retirement" project: Release 40 years worth of my "so... by paulryanrogers on Saturday November 04, 2023 @10:08AM (#38141132)
Thanks for your humility. Still, please consider sharing what you can -- even if only with customers of your software. We all have so much to learn.

(I do regret giving too much of my time to free projects, yet have found a satisfying balance by including source with purchases of software I sell.)

Re:My "retirement" project: Release 40 years worth of my "so... by ofey404 on Saturday November 04, 2023 @09:33AM (#38140855)
Thank you! You show me a living history of computer programming.
Re:My "retirement" project: Release 40 years worth of my "so... by m3kw9 on Saturday November 04, 2023 @10:16AM (#38141198)
I like how he puts his email as a captcha https://dunfield.themindfactory.com/contact.htm

And slyly tells you the “password” to get past his spam filter

Re:My "retirement" project: Release 40 years worth of my "so... by eliben on Saturday November 04, 2023 @11:00AM (#38141628)
This code is enjoyable to look at - it's clean, well-documented, and clearly a work of love. I like all the small utilities that help the author accomplish a bunch of goals.

I wonder if the code manages be so clean because it's only aimed at a single compiler and a single platform. Multi-platform C code tends to be messy with preprocessor goo.

Re:My "retirement" project: Release 40 years worth of my "so... by snvzz on Saturday November 04, 2023 @11:00AM (#38141630)
Not using a standard license but rather a bespoke one is a major legal roadblock.

The presence of use restrictions does also disqualify it from being Open Source (OSI trademark) or Free Software (GNU/FSF).

If a standard license was adopted instead, such as MIT (permissive and I believe well-aligned with the intent of the author), then any concern would go away.

Re:My "retirement" project: Release 40 years worth of my "so... by dingdong33 on Saturday November 04, 2023 @01:03PM (#38142904)
Why didn’t he use more memory safe rust?
Re:My "retirement" project: Release 40 years worth of my "so... by strangattractor on Saturday November 04, 2023 @04:05PM (#38144622)
Hate to say it but I remember when this stuff first came out. Thank you for releasing the code. Brings back memories.
Re:My "retirement" project: Release 40 years worth of my "so... by alisoncopeland0 on Saturday November 04, 2023 @06:28PM (#38145841)
I wish I remembered how...my car accident made me dumb ...
Re:My "retirement" project: Release 40 years worth of my "so... by alisoncopeland0 on Saturday November 04, 2023 @06:29PM (#38145848)
I wish I remembered code my car accident made me dumb...lol
Re:My "retirement" project: Release 40 years worth of my "so... by speedylight on Saturday November 04, 2023 @08:08PM (#38146586)
This is sort of unrelated OP, but did you ever write a follow up to this post? https://dunfield.themindfactory.com/2019.htm I’m very curious how well you’ve improved since then. -
Re:My "retirement" project: Release 40 years worth of my "so... by onesphere on Saturday November 04, 2023 @09:08PM (#38146947)
Warranty?
Re:My "retirement" project: Release 40 years worth of my "so... by quonn on Sunday November 05, 2023 @08:00AM (#38150767)
We need a new GPL that includes a clause that prohibits training any sort of AI or statistical model on it, unless the output of that model is inheriting the license.

Otherwise AI will be the end of anything open - which we can already see in stackoverflow now.

Re:My "retirement" project: Release 40 years worth of my "so... by Zambyte on Sunday November 05, 2023 @08:03AM (#38150786)
Instead of impeding progress with copyright even more than alwe already do, maybe we should repeal copyright altogether.
Re:My "retirement" project: Release 40 years worth of my "so... by quonn on Sunday November 05, 2023 @08:05AM (#38150797)
It‘s my time as developer and I choose to license my output however I want. Thank you very much.
Re:My "retirement" project: Release 40 years worth of my "so... by Zambyte on Sunday November 05, 2023 @10:56PM (#38158665)
As a developer I don't think I should have the right to tell other people how to use their computers (even if they're using code that I wrote). Nor do I think that you should... thank you very much :-)
Re:My "retirement" project: Release 40 years worth of my "so... by whartung on Sunday November 05, 2023 @09:26AM (#38151392)
So, is this an issue of credit, a recognition thing? Or more an issue of just sharing with the “right” people?

I share what I do freely. If someone integrates that trivia and shares it with someone else, so much the better. I offer a fractional shoulder to stand on. Getting hovered up into an AI that then goes on to help someone else isn’t much different than having something random posted on the internet that solves someone else’s stumbling block.

But that’s just me.