MelonBread.dev

@lispi314 @sun the reason i'm so defensive of C++ is because if you go back to the 90s, C++ is just like... fine. just plain Java-like OOP with inheritance and C semantics.

go back in time for javascript and it's always been unusable.

@lispi314 @vr-t8x15 I can probably never do Java again but it's so simple to pick up that I think it's valuable at least as a beginner language.

@lispi314 @vr-t8x15 I'll learn Scala eventually

@sun @lispi314 C++ was my first "real" language (after TI-BASIC and FORTRAN)

@vr-t8x15 @lispi314 I still consider myself a "Java programmer" because I started with pre-1.0 beta in 1995 and didn't put it down until about three years ago.

@sun @vr-t8x15 @lispi314 Java as a beginner language?

@feld @vr-t8x15 @lispi314 its used as an introductory course language in several universities

@vr-t8x15 @sun Scala is pretty much what Java should have been.

Unfortunately, the implementation has /problems/ (the tooling is a hot flakey mess).

@feld @lispi314 @vr-t8x15 what do you guys think about just starting people with a lisp with immutable data structures and just naturally exclude people that can't hack it

@sun @vr-t8x15 @lispi314 yeah, they had that at my school too but it seemed crazy to use as a beginner language. I guess if you just shape the curriculum to hide everything that the Java VM does for the user it could work

also looking at Java code makes my eyes want to puke, so I have that bias

@feld @vr-t8x15 @lispi314 enterprise java is godawful but when I did projects on my own they were small and beautiful

@feld @lispi314 @vr-t8x15 java and go were both invented for companies where you just plain aren't hiring the best quality of people but need them to be productive and not fuck up majorly all the time and they both are pretty good at that

@sun @feld @lispi314 largely positive but i would offer the choice between that or the same deal with C. learn what a pointer is or get out of my codebases. yes, even the rust ones

@vr-t8x15 @feld @lispi314 I'm one of those people that considers C a portable assembler, I know the arguments against it but I think it's a passable metaphor. you can teach C at the same time you teach assembler and computer architecture and it should all "click"

@sun @feld @lispi314 go was co-developed by ken thompson of all people. embarassing

@sun @feld @lispi314 yup. learning C is crucial to acquiring whole-system understanding. if not for the lessons that come from the language then the codebases knowing it opens you up to reading.

have you ever read doom's source code? it's like poetry. same with linux or BEAM.

@vr-t8x15 @feld @lispi314 No, but I should read DOOM's source code.

@sun @feld @lispi314 virtually every uni, from what i can tell. C++ is typically taught as "the hard java" too, which fucking sucks. proper computer science courses tend to like C though from what i can tell

@vr-t8x15 @sun @feld > proper computer science courses tend to like C though from what i can tell

They do. And for some reason, few ever talk about the litany of design problems with it, or applaud them as laudable, instead of flaws. In many cases because they drank the kool-aid for a bunch of memes that haven't been true or relevant for decades at this point.

@lispi314 @feld @vr-t8x15 my issue with teaching C++ for school is that you're going to be teaching like 80% C++ idiosyncrasies instead of concepts.

@sun @feld @lispi314 "here's how you display to the screen, but keep in mind that << is a bitshift operator that has been overloaded by `std::ostream`. what's a bitshift? what's an operator? what's overloading? glad you asked, but we've run out of time this semester; happy graduation!"

@sun @vr-t8x15 @lispi314 a lot of gaming C especially early gaming C is gonna be so weird

I think if you want to read quality C code you need to reach for something written by a good *nix C programmer

* OpenLDAP and LMDB by Howard Chu
* Certain OpenBSD things
* Anything by Poul-Henning Kampf
* C code written by TedU

@feld @vr-t8x15 @lispi314 the code in OpenSMTP, despite now having half a dozen severe security flaws discovered, is very well architected for a UNIX system

@feld @sun @lispi314 openbsd c is typically beautiful

@sun @vr-t8x15 @lispi314 there's some really good stuff in Solaris that nobody pays attention to

@feld @sun @vr-t8x15 @lispi314 Nothing is more beautiful than GNU's C.

Right from the license on the top of the file, it's very pleasing.

@feld @Suiseiseki @vr-t8x15 @lispi314 Jim Meyering I sentence you to death

@feld @sun @vr-t8x15 @lispi314 >Linking to github mirror rather than the real thing
https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c

Every line is in its proper place to ensure that --help and --version operate as expected of GNU software.

"Free"BSD's version is flawed as it doesn't do this;
LANG=ja_JP.UTF-8 /bin/true --help
使用法: /bin/true [コマンドライン引数は無視されます]
または: /bin/true OPTION
終了コードは成功になります。

--help 使い方を表示して終了する
--version バージョン情報を表示して終了する

Your shell may have its own version of true, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.

GNU coreutils のオンラインヘルプ: <https://www.gnu.org/software/coreutils/>
翻訳に関するバグは <https://translationproject.org/team/ja.html> に連絡してください。
詳細な文書 <https://www.gnu.org/software/coreutils/true>
(ローカルでは info '(coreutils) true invocation' で参照可能)。

LANG=ja_JP.UTF-8 /bin/true --version
true (GNU coreutils) 9.5
Copyright (C) 2024 Free Software Foundation, Inc.
ライセンス GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

作者 Jim Meyering。

@Suiseiseki @feld @sun @lispi314 if i were involved in bonsai this is the part where i'd say that information about versioning, licensing, help, and localizations of all of the above would be the jobs of manpages, not --help or --version.

@vr-t8x15 There is no guarantee than a man is installed on a system with GNU coreutils installed, nor the packagers haven't decided to remove the manpages and add them to a -doc version of the package (that may not be installable if you don't have internet right then).

Meanwhile, those kind of packagers can't work out how to strip out gettext files usually.


For every binary on the system, unless there is a legitimate technical reason not to, the license should be printed when --version or --license is passed, preferably optionally in the users preferred native language.

The manpage is really for more detailed information on software usage and GNU has those too.

@Suiseiseki @sun @vr-t8x15 @lispi314

> Your shell may have its own version of true, which usually supersedes
the version described here. Please refer to your shell's documentation
for details about the options it supports.


It's true. It has no options. It was never supposed to have any options. This is just gaslighting the user.

@feld >It's true. It has no options. It was never supposed to have any options.
GNU's Not Unix and therefore arbitrary limitations set by Unix are ignored, so claims like "It was never supposed to have any options" are ignored and the free software license printing flags are added no matter the seething.

>This is just gaslighting the user.
>It's gaslighting the user to helpfully tell them the license of all software they execute at only a --version invocation away.

@Suiseiseki they don't need to know the fucking license of something that just returns a 0 exit code

the code is trivial and not patentable; the license is pointless

@feld >the code is trivial and not patentable
Software is not a patentable subject manner, as software is math - too bad the USA patent office awards them anyway.

A patent on one program wouldn't be a big issue - the issue is that patents restrict all software and even hardware.

The relevant law here is copyright.

While "return 0;" certainly isn't creative enough to qualify for copyright, based GNU developers decided to exercise their creativity and write yet another masterpiece (https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c) that is creative enough to qualify for copyright and therefore it print the license.

@sun @feld @lispi314 @vr-t8x15 no, immutability is not how computers work or how most actual data structures and algorithms work

@sun @vr-t8x15 @lispi314 i thought java just taught people to type shit blindly like most overseas contractors do.

i still have PUBLIC STATIC VOID MAIN STRING ARGS stuck in my head. were any of those terms explained? no. would I have understood them if they were? no.

@sun @feld @vr-t8x15 @lispi314 Can confirm Java was the language taught in my High School's programming classes. (Circa 2009~)
replies
0
announces
0
likes
1

@sun @feld @Suiseiseki @lispi314 @vr-t8x15
Jim was the only teammate whom I really hated. Moving to France was the perfect punishment for him.

@sun @Suiseiseki @feld @lispi314 @vr-t8x15 I meant to include that I do not support a death penalty for him.

@vr-t8x15 @sun @lispi314 I knew a guy, who wrote 3 C compilers, Mark Venguerov. One day in 1986 he asked me if I were up to writing a C++ compiler. "Don't worry, it's only a oreprocessor, and I'll help you out." I wonder sometimes what would come out of me if I signed up for it.

@zaitcev @vr-t8x15 @lispi314 werent all the first ones c preprocessors?

@whiteline @feld @sun @lispi314 structured programming is not how computers work, teach the first years goto

@hayley @feld @whiteline @lispi314 yall should learn that after you learn how to make reliable software

@sun @vr-t8x15 @lispi314
oop of any kind ruins programmers; have to spend years unlearning

@ageha @vr-t8x15 @lispi314 its perfectly usable for boring enterprise work.

@sun @vr-t8x15 @lispi314
it's entirely pointless if you have a good type system; just that + simple procedural design is all you need (funclangs better for some usecases but

and is becoming more and more an active harm as multithreading and parallelism become necessary everywhere. like bartosz milewski comment, "the core concept of oop is abstraction over data races

@ageha @vr-t8x15 @lispi314 enterprise programmers aren't smart enough for that.

@sun @vr-t8x15 @lispi314
oop is more complicated. like literally just make data structures and then functions typed to operate on them rather than inflexibly pasting the two together into "objects

@ageha @vr-t8x15 @lispi314 i have years of experience with what mediocre programmers can and can't do.

@sun @vr-t8x15 @ageha @lispi314 I have decades of experience telling petty tyrant nerds who argue about this to suck dick

@YTFoidLover1488 @vr-t8x15 @ageha @lispi314 most people are bad programmers and java makes them productive programmers. you can try ramming good languages down their throats, won't work.

@sun @feld @lispi314 @vr-t8x15 new parrotable opinion on coding acquired

@sun @ageha @lispi314 enterprise software development, where creativity goes to die and management DESPERATELY has to contrive ways to make codebases stand the test of time while firing the experienced people and knowing nothing about how computers actually work. OOP *is* usable.

there is no sarcasm in that. /srs. OOP works great in enterprise. kind of like how lobotomies work great to increase the productivity of enterprise managers AND to ameliorate the suffering of employees

@sun @vr-t8x15 @lispi314
am saying oop was much more difficult for me to pick up than anything else because i came to it second, after structured C and functional languages. it isn't actually easier; most people just learn it first

go hints at what a simple procedural language can be. just do that but with better type system and standard lib (and without the bizarre needlessly-bad smaller design choices

@ageha @vr-t8x15 @lispi314 I think go is better than java

@ageha @sun @vr-t8x15 @lispi314

OOP is just playing with lego

if you have a lego mindset, then OOP is easy