It's funnier to do the same program in Rust with 2000 lines of code. ;)

Maybe I'm exaggerating because I just stumbled down a few recursive rabbit holes, trying to do something simple. The language definitely has its peculiar learning curve. This makes programming languages like Python and Kotlin so dev-friendly, but at a cost. Maybe C++ too, but I'm a little out of touch; I mostly miss inheritance and the carelessness of not having a borrow checker, sometimes.

PS: And to think people used to be paid according to the number of lines of code...
 
I know I should have studied Assembly at uni back then.

.386
.model small,c
.stack 1000h

.data
msg db "hello pibbuR",0

.code
includelib libcmt.lib
includelib libvcruntime.lib
includelib libucrt.lib
includelib legacy_stdio_definitions.lib

extrn printf:near
extrn exit:near

public main
main proc
push offset msg
call printf
push 0
call exit
main endp
end

PS. Above is the slightly modified Hello Word program for windows (according to Wp). Not as many lines as I thought, probably because a lot of things happen in the libraries. Using Win32 API takes a lot more lines, but very likely does quite a bit more windows, windows event and graphics output handling. I know, I've done it, It was great fun. But thank heavens I didn't do it using Vulcan.
DS

PPS. If the glyph wants to comment on the code (I think he'd like to), any other watchers as well, by all means, shut up. DS.
 
Last edited:
No worries from me, assembly is too far away. Last time I did an assembly program, printing characters was done with INT 10h (through the BIOS). Glorious times. I remember how excited I was when I learned how to make small .com executables.

I did brush it up lately, just to be able to judge how well programs were optimized after compilation: the registers on a 64-bit architecture, some of the new instructions, how parameters were passed to functions, and so on. There's a big book of more than 1000 pages, The Art of 64-bit Assembly, Volume 1 - yes, volume 1! The author, Randall Hyde, has written a few of those books. It's a bit messy, covers only Windows, but it's more than enough to get a good overview and see the main techniques... I think. I've only read a few bits (enough to go from 16 to 64).

So, if you ran out of series to watch this winter, and George R. R. Martin still hasn't finished writing his last book, it's a good alternative. ;) Unless you don't need it any more.
 
Ok. I thought you needed assembly for work.

FEWI:
  1. I only watched the first episode of Game of Thrones and didn't read any of the books.
  2. I only watch series when on my exercise bike, and I alternate between TV series and scientific programs => 3 series episodes per week
  3. I have enough horror/dark series to watch for the foreseeable future.
  4. Yay!
Regarding huge books: Back in med school, I once came over a book covering a fairly small part of the nervous system, the allocortex which is the phylogenetically old 10% part of the human cerebral cortex (the remaining 90% is the neocortex). This book was volume 8 of section 4 (covering the nervous system) of a huge series of books covering all human histology (the microscopic anatomy of tissues). And it was 800 pages long.

The title of the book series: "Handbuch der Histologie des Menschen". Yes. No surprise. German.

pibbuR who didn't read it.
 
This may interest some watchers:


You need a free account to download, the site is well worth it.

pibbuR who is among the set of watchers being (maybe) interested and who has an account
 
Cool - sadly all our NN/ML stuff is now done in Python (since 2 years ago), so C++ (which I still teach) is being 'deprecated'....Python really does make everything a lot easier, but in the past it was a pain in the * to get students to actually do stuff in C++ with ML (they spent 90% of the time fighting the language...because they didn't listen to what I said ;)
 
A few things from CodeProject:




pibbuR who can wait
 

The error, within a C program, involved a misplaced break statement within nested conditional statements, leading to data overwrites and system resets.

pibbuR who claims that he never had comitted an single error like this. Like everyone else, he prefers multiline bugs. Besides, he now almost only uses C++
 
Pascal was a great language to learn programming, at the time. I didn't know Turbo Pascal was available on CP/M.

After that, I started reading about Oberon when I heard he was working on it, but it never really caught on.
 
Yea Turbo pascal - fond memories after waiting hours for stupid ms pascal to compile small programs (ms didn't write the compiler they acquired it); there was also desmeth (sp) C. It turns out these folks took a basic class in compiler construction and use the knowledge to write their compilers which of course turned out to be 10000% better than what corporation was selling. I remember finding a bug in dsemeth C run-time library - writing a letter to the founder (company was a one man operation) and receiving a new disk in the mail a week later with the fix - support those days was great - of course Larian did the same thing - found a game breaking bug in dd and a week later he supplied a fix.

Turbo pascal wasn't true pascal but it was such a great tool (you can download the compiler) but of course times have changed; computers have changed and tools have changed. I do remember when Borland relesed their spread sheet software and the fud that was thrown at it to kill it (it had one minor calculation error - for fewer bugs than the competitor and far less serious but it was enough to allow the fud to doom the product); of course then there was ms that killed dos competition by warning corporate users it wasn't true ms dos and it might cause issues. fud is great just look at how modern fud is used in decision making these days to make people avoid vaccines and other stuff.

Anyway i diverge but in those days there were a lot of great products and in all honesty I think turbo pascal changed how i did things (though i wrote my tektronic emulator - you do know what a tektronic monitor is - for a victor 9000 in dsmeth C). Oh yea turbo pascal also ran on a victor 9000 (you do know a victor 9000 was?).
 
I remember Quattro Pro. Used for quite a while. I made a Turing machine in Quattro, so I knew, by definition and in principle it could do everything a computer could do.

pibbuR
 

pibbuR who looks forward to R#
That's interesting. They might overlook the steep learning curve of the Rust language, though:
Considering the growing enthusiasm for memory-safe programming, something Rust delivers with far less effort than the likes of C++, Microsoft's move is unsurprising.
'far less effort' is probably an observation from someone who hasn't had to deal with enough different situations. In my experience, there are several phases:
  • At first, it seems cool. It's fast, modern, and it seems you can achieve things as quickly as another language.
  • Then you realize that references (pointers) are a little more complicated than expected, and you must understand the Borrow Checker better (how pointer lifetimes interact with one another, because the compiler won't let you mess with them).
  • Then you think you overcame the difficulty spike and start being productive.
  • Then you hit a massive wall when you must work around the constraints for very simple tasks that you hadn't encountered before. Or maybe you don't realize there's a wall but your work arounds aren't safe.
Beware, it's full of rabbit holes. They should've called the language "Alice". :D
 
From codeproject:


I guess you would achieve some better sorting performance in C if you implemented the C++ library function yourself.

Pibbur::pibbuR who{"no matter what likes C++"};

PS: How do I get rid of the emoji? DS
 
Last edited: