🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #101

Re: AVL tree insertion - programming exercise

#101
From: Johann 'Myrkraverk' Oskarsson
Date: Sat, 10 Oct 2026 02:38
52 lines
3977 bytes
On 10/9/2026 11:54 PM, Janis Papanagnou wrote:
> Using some hypothetical assembly to learn programming complex
> algorithms might be useful for case studies, but I think it's
> otherwise not a good idea. Our teachers uphold all due respect
> but clearly suggested more sensible representations.
> 
> To represent high-level algorithms a clear notation is sensible,
> ideally without any ballast; it need not even be an existing HLL.

That's what several books an algorithms do, including the venerable
C.L.R.S., which I admit not to have read yet, but keep a copy on my
shelf due to a recommendation.  After all, it isn't Sedgewick, and the
coverage is different.

On Knuth, I forgot why he chose assembly language, but in the times he
first started to write, that was the normal programming language of the
day.  Just, there were a lot more varieties out there, than today.  Now-
adays, you get by with x86, amd64, ARM, and Aaarch64, SPIM compatible
cores in 32 and 64bit varieties, and the RISC-V variants.

Really, nothing worth worrying about, and it's reasonable to expect any
proficient programmer is fluent in any or all of these.  I myself lack
knowledge of the ARMatures, but dabble with the rest.  At least, so far,
I do have plans to dabble with an Aarch64 in the near-ish future.

Other programmers have chosen a specific real world programming language
to teach algorithms, and not just generally like C.L.R.S. and Sedgewick,
but Mailund chose C for his /String Algorithms in C/ book, and /The Joys
of Hashing/; then most game programming books have used C++.

I personally like to learn this stuff in the concrete, rather than some
abstract representation, and a lot of books from ages past were written
in C -- only worth mentioning because we're talking about this stuff in
comp.lang.c -- though nowadays it's Python, Java, Rust, C#, C++, Common
Lisp, -- yes, I believe I mentioned that book before -- and even OCaml
if we count /Handbook of Practical Logic and Automated Reasoning/ (2009)
by John Harrison as worthy of a shelf space.  Then I have books in ML,
Pascal, Ada, and Modula-2.  Those hardly ever show up as something
written this century, so don't need to be studied by a student of the
art.

Personally, I'm not sure what I'd write in -- meaning the programming
language -- if I were to write a book on the craft today, so let's just
see if I publish something in the near-ish future.


Best wishes, and happy writing books on the craft!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Technical Details
Message-ID: <gyhyS.35877$zKXe.4157@fx12.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!fx12.ams4.POSTED!not-for-mail
References: <86ece2kppv.fsf@linuxsc.com> <11aa8vb$jk93$1@dont-email.me> <11aaggn$mu6q$1@dont-email.me> <11aaimc$n0f0$2@dont-email.me> <11aan7c$ki0$1@reader2.panix.com> <11aasbg$r60s$1@dont-email.me> <11ab2mu$cjm0$2@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!fx12.ams4.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: AVL tree insertion - programming exercise
Newsgroups: comp.lang.c
References: <86ece2kppv.fsf@linuxsc.com> <11aa8vb$jk93$1@dont-email.me>
 <11aaggn$mu6q$1@dont-email.me> <11aaimc$n0f0$2@dont-email.me>
 <11aan7c$ki0$1@reader2.panix.com> <11aasbg$r60s$1@dont-email.me>
 <11ab2mu$cjm0$2@dont-email.me>
Content-Language: en-US
From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Organization: Watcom Pro Ltd.
In-Reply-To: <11ab2mu$cjm0$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 52
Message-ID: <gyhyS.35877$zKXe.4157@fx12.ams4>
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 10 Oct 2026 10:38:02 +0800
X-Received-Bytes: 3724