HNHacker News
TopNewBestAskShowJobs

vincent-manis

1,027 karma · joined April 23, 2020

submissionscomments
vincent-manis··on The Missing Semester of Your CS Education (2020)
I once proposed a similar course at a major CS department where I was a junior faculty member. The response was “This is a university, we don't do things like this.” Result: students who couldn't use a debugger, did not know how to use source control systems, did not know how or why to write a shell script. Mostly, students didn't know how to use online help and documentation, leading to superstitious behaviour when doing lab work: “My friend told me to do this, I don't know why it works.” Yes, some of this can come in other course, but it's the first part to be dropped if time runs out. Even though a course like this should count for few if any credits, it is essential: helping students get more out of their other courses should be what is done at a university.
vincent-manis··on Bare Metal (The Emacs Essay)
I worked at 3 universities and one multi-national company over 30 years. I used Emacs at all of them. I'm retired now, and still use Emacs daily.
vincent-manis··on Why Is SQLite Coded In C
The point about bounds checking in `safe' languages is well taken, it does prevent 100% test coverage. As we all agree, SQLite has been exhaustively tested, and arguments for bounds checking in it are therefore weakened. Still, that's not an argument for replicating this practice elsewhere, not unless you are Dr Hipp and willing to work very hard at testing. C.A.R. Hoare's comment on eliminating runtime checks in release builds is well-taken here: “What would we think of a sailing enthusiast who wears his life-jacket when training on dry land but takes it off as soon as he goes to sea?”

I am not Dr Hipp, and therefore I like run-time checks.

vincent-manis··on GNU Health
No, MUMPS (or M) is a remote descendant of JOSS, an interactive language of the 1950s. JOSS has all sorts of variants (DEC's FOCAL language of the 1960s was a dialect), but I think MUMPS is the only living one. MUMPS code is mostly unreadable, as the commands can be, and often are, abbreviated to the first letter. As a result, it looks a lot like line noise.

Regardless of its many warts, Cobol cannot be accused of being unreadable. Verbose, yes.

vincent-manis··on Linux Compose Key Sequences (2007)
And was dinged.
vincent-manis··on Linux Compose Key Sequences (2007)
These work in both X and Wayland, even though they are an X feature. X/Wayland will consult the standard file, but will also consult a file ~/.XCompose. A number of people have created files with extended compose sequences, of which https://github.com/kragen/xcompose is possibly the best-known. If you install or change ~/.XCompose, you must restart your session (log out and back in again) for it to be recognized.

I used to bind the Compose key to Caps Lock, but I've recently decided that Right Alt is a better choice.

Another commenter mentioned WinCompose, which I have used very successfully with Windows 11. On a Mac, you might try https://github.com/Granitosaurus/macos-compose, which is quite usable, provided you install Karabiner Elements for the remapping.

vincent-manis··on Microsoft insists Copilot+ PCs are 'empowering the future' – reality disagrees
By default, the key emits a hitherto unused scancode, 0x6E. Windows maps this to something like `Left Shift+Super+F23', and then allows the user to define a suitable shortcut. For reasons I don't understand, remapping this combo is unreliable in Linux. So the newer kernels emit a plain F23 code, which can be easily remapped. For an older keyboard with no Copilot key, this is all a non-issue. (There are relatively few keyboards nowadays with physical F13 thru F24 keys, though once upon a time they weren't uncommon, so F23 is a suitable choice here.)
vincent-manis··on Microsoft insists Copilot+ PCs are 'empowering the future' – reality disagrees
F23, in kernels 6.14 and later. You can use standard tools for your environment to bind that to whatever you like.
vincent-manis··on Microsoft insists Copilot+ PCs are 'empowering the future' – reality disagrees
I am very grateful to the Linux folks for including Copilot key support in recent kernels, that way you can remap the key to something useful.
vincent-manis··on Action was the best 8-bit programming language
No, recursion still works well without TCO (though as a Schemer, I love TCO). I was programming in BCPL in the early 1970s, and it handled recursive procedures with aplomb. The big revolution was realizing that, if you don't allow access to automatic variables declared in outer scopes, you could store all the variables in the stack frame, and access them with a small offset from the stack or frame pointer. That made automatic variables just about as fast as static ones (which, on System/360, had to be accessed via a base register), with small overheads at call and return sites.

Again on System/360, I benchmarked BCPL procedure call costs against subroutine call costs in Fortran G (the non-optimizing compiler). BCPL was about 3 times faster.

That said, as soon as you added multi-tasking (what we'd now call threads), it all went to hell. It's not an accident that one IBM PL/I manual of the 1960s said “Do not use procedures, they are expensive.”

As mentioned by others, it was the tiny stack in the 6502 that killed this approach. I appreciate all those who pine for the 6502, but it made implementing modern (even for the 1970s) languages almost impossible.

vincent-manis··on Removing Guix from Debian
I recently custom-built Guile for my Arch system, and found that it won't build with GCC 15, but will with 14, which is the only other version in the Arch repository. I think that the Guile maintainers will need to get busy fixing the incompatibilities in question, before GCC 16 appears.
vincent-manis··on The man with a Home Computer (1967) [video]
The terminal in the video was a rebadged KSR-33, which was common as a computer console. A few people at MIT and Bolt Beranek and Newman had them at home at that time. A KSR-33 went for about $1000, according to Perplexity. There were few video terminals available then; the most common were the IBM 2260 series, a character-mode device that I remember as being very clunky. But you couldn't have used one at home, it relied upon a very clunky control unit, and therefore couldn't be used remotely.

One additional example of the technology of that time. In 1968, I was a computer science student, and found myself called upon to arrange a demonstration of remote computing. The university at that time had no timeshared computing facility, so we used IBM's Call/360 service. The terminal was an IBM 1052 (big clunky printing terminal) with an acoustic coupler. To move this across campus, we arranged for a truck with 2 or 3 people to put the thing on a dolly, put it into the truck, and move it into the student union building. Later that day, the truck, and the helpers, came back and we reversed the process.

I really like my ThinkPad!

vincent-manis··on The man with a Home Computer (1967) [video]
I had one of those, dunno what happened to it...fun story, I was living in Boston at the time, and there was too much line noise on the phone system for 300 baud, but 110 baud worked like a charm.
vincent-manis··on GNU Artanis – A fast web application framework for Scheme
And was a gag in the ancient Dick van Dyke show, where Dick's character gets a painting signed by `Artanis', and thinks it worthless, until someone spells it backward.
vincent-manis··on Why the em dash is attracting unfair suspicion
Sorry, I wouldn't be caught dead using Word. I use quotation marks because that is the correct punctuation.
vincent-manis··on Lurk – A Turing-complete programming language for ZK-SNARKs
“Lurk's distinguishing feature relative to most programming languages is that the correct execution of Lurk programs can be directly proved using SNARKs.”

Do these proofs involve boojums?

vincent-manis··on We'd be better off with 9-bit bytes
Actually, the PDP-10 didn't have any byte size at all, it was a word-addressed machine. (An early attempt to implement C on this machine came a cropper because of this.) It did have a Load Byte and a Store Byte instruction, which allowed you to select the byte size. Common formats were Sixbit (self-explanatory), ASCII (5 7-bit bytes and an unused bit), and (more rarely, I think), 9-bit bytes.

My first machines were the IBM 7044 (36-bit word) and the PDP-8 (12-bit word), and I must admit to a certain nostalgia for that style of machine (as well as the fact that a 36-bit word gives you some extra floating-point precision), but as others have pointed out, there are good reasons for power-of-2 byte and word sizes.

vincent-manis··on Build Your Own Lisp
Oh, I forgot Lynn Conway (computer architecture)
vincent-manis··on Build Your Own Lisp
Or Jean Sammet (author of a very comprehensive book on programming languages in the 1960s), or Lois Haibt (involved in development of original Fortran compiler) or Frances Allen (did key work at IBM on optimization in Fortran compilers), or Sister Mary Keller (involved in developing Dartmouth Basic), or Adele Goldberg (key developer of Smalltalk), or Barbara Liskov (CLU, and many other things)...those off the top of my head, though a web search would find many more, I'm sure.
vincent-manis··on At a Loss for Words: A flawed idea is teaching kids to be poor readers (2019)
By contrast, my parents were high school dropouts. When I was little, my mum would read to me, with her finger following the text. I somehow got the idea, and started to sound out the words with her. By kindergarten, I was reading at a Grade 2 level. I think there are as many paths to reading as there are kids.

The cueing theory seems misguided, in teaching kids to regard pictures as the source of information. I'd say that teaching kids to read requires a mix of activities, with a heavy dose of phonics, but also activities that create a joy of reading, by showing interesting people and stories. I can't see how cueing helps.

Cueing reminds me of some of the stranger ideas in math pedagogy in elementary schools, notably that rather than learning algorithms for arithmetic operations, kids should invent their own, and maybe have several, which they choose from in a specific problem. Of course, some students have much more difficulty than others, but there really are some basic ideas they must master in order to be competent at arithmetic. Allowing a kid to amass a forest of partially working techniques and then have to hack through it to solve any problem seems ridiculous to me, much like putting a student driver in a car, with no training, and telling them to try various things to see how to drive to a given point without getting killed.

vincent-manis··on NIH is cheaper than the wrong dependency
I take neither side in a dependencies vs NIH war. I like using SQLite as a database, and I use Tk (of Tcl/Tk) as my user interface toolkit, for example. Neither of those is going anywhere, they are both maintained, and I build them myself.

I would argue that the right way to think about dependencies, as some have alluded to, is to do a risk/benefit analysis. On the benefit side, how much work would it take me to duplicate this component, how well will it suit my needs, and so on. On the risk side, everything from continued maintenance to security and licence issues (for both free/libre/open-source and proprietary components). Then risk/benefit asks for ways of ameliorating risk, such as by forking code, or paying for support.

The right way to think of adding a dependency is to ask and answer questions like this prior to adding it. This is not the way that JavaScript developers used left_pad, they just said “it's in npm, so it's good.”

vincent-manis··on Show HN: Bedrock – An 8-bit computing system for running programs anywhere
This is the latest in a very honourable tradition. My first encounter with it was with Martin Richards's BCPL system in 1972. The compiler generated a hypothetical ISA called OCODE, from which backends generated pretty good native code for Titan-2 and System/360, among others. One of those backends generated INTCODE, which was an extremely reduced ISA, for which an interpreter could be easily written (I wrote one in Fortran). Richards also provided the BCPL compiler and runtime library in INTCODE, so you could quickly have BCPL running interpretively. Then you could use this interpretive version to bootstrap a native-code backend implementation. Put this all together, and you now have a very easy compiler port.

Wirth's Pascal-P compiler of 1974(?) used the same idea, also in aid of a highly portable compiler. I have never been able to find out whether this was an independent invention, or whether Wirth was influenced by Richards's work.

Of course, the JVM and CLR are descendents of this, but they build a very complex structure on the basic idea. Writing an implementation of one of these virtual machines is not for the faint of heart.

So I think Bedrock can be very useful as a compiler target, if nothing else. However, I must agree with some of the other commenters that the 64KiB address space makes it very much of a niche tool. Come up with a 32-bit variant that's not much more complicated, and I think you have a winner.

vincent-manis··on Understand CPU Branch Instructions Better
You undoubtedly were in my class if you did it in 1985, and I am glad you got value from it.
vincent-manis··on Mostly dead influential programming languages (2020)
There is one very BIG thing that Cobol pioneered: the requirement that not only the programs, but also the data, must be portable across machines. At a time when machines used different character codes, let alone different numeric formats, Cobol was designed to vastly reduce (though it did not completely eliminate) portability woes.

We take this for granted now, but at the time it was revolutionary. In part, we've done things like mandating Unicode and IEEE 754, but nowadays most of our languages also encourage portability. We think very little of moving an application from Windows on x86_64 to Linux on ARMv8 (apart from the GUI mess), but back when Cobol was being created, you normally threw your programs away (“reprogramming”) when you went to a new machine.

I haven't used Cobol in anger in 50 years (40 years since I even taught it), but for that emphasis on portability, I am very grateful.

vincent-manis··on Understand CPU Branch Instructions Better
One of the Hennessy/Patterson books has coverage of GPUs. But the definitive description of GPUs at a conceptual undergrad level has yet to be written, I think.

As for microarchitectures, for the most part those have evolved over the last 50 years. If you are looking to extract the last bit of speed out of a CPU, the only complete resource is the documentation. But pipelines and caches have heen around for a long time, look at the System/360 Model 85 and 91. A C programmer can use a fairly primitive conceptual model of a microarchitecture to get a pretty good first-order approximation of performance issues.

I am not saying that we should teach undergrads with 1980s materials. I am saying that a good understanding of pretty much any assembly language can get a programmer pretty far.

vincent-manis··on Understand CPU Branch Instructions Better
Yes i did.
vincent-manis··on I'm more proud of these 128 kilobytes than anything I've built since
Quick answer: is our software any more usable, any more reliable, than it was 50 years ago? The more code you write, the more dependencies you require, the more opportunity for bugs and design errors to creep in. I get the impression that many software projects have enough fixes and kludges slathered on them to make them work nowadays.

(Remember Bill Atkinson's famous response, quoted here to how much code he'd written that week: -3000. He had reworked Quickdraw so that it was faster and better, with a net loss of 3000 lines of code.) Of course the classic Mac had its own constraints.

vincent-manis··on I'm more proud of these 128 kilobytes than anything I've built since
An addendum...Back in the 1960s, IBM didn't grok time-sharing. When MIT/Bell Labs looked for a machine with address translation, IBM wasn't interested, so GE got the contract. IBM suddenly realized that they had lost an opportunity, and developed their address translation, which ended up in the IBM 360/67. They also announced an operating system, TSS/360, for this machine. IBM practice was to define memory constraints for their software. So Assembler F would run on a 64K machine, Fortran G on a 128K machine, and so on. The TSS engineers asked how much memory their components were given. They were told “It's virtual memory, use as much as you need.” When the first beta of TSS/360 appeared, an attempt to log in produced the message LOGON IN PROGRESS...for 20 minutes. Eventually, IBM made TSS/360 usable, but by then it was too late. 360/67s ended up running VM/CMS, or 3rd party systems: I had many happy years using the Michigan Terminal System.

Remember, there's a gigabit pathway between server and browser, so use as much of the bandwidth as you need.

vincent-manis··on I'm more proud of these 128 kilobytes than anything I've built since
I don't do web stuff at all, but I really enjoyed this article. I am convinced that software engineers (not to mention others) have thrown the baby out with the bathwater in our brave new world of 32GB memories and fibre-optics. By all means the generous hardware capabilities let us do amazing things, like have a video library, or run massive climate computations, but mostly those resources are piddled away in giant libraries that provide little or no actual functional value.

I don't really pine for the days of the PDP-8, when programmers had to make sure that almost every routine took fewer than 128 words, or the days of System/360, when you had to decide whether the fastest way to clear a register was to subtract it from itself or exclusive-or it with itself. We wasted a lot of time trying to get around stringent limitations of the technology just to do anything at all.

I just looked at the Activity Monitor on my Macbook. Emacs is using 115MB, Thunderbird is at 900MB, Chrome is at something like 2GB (I lost track of all the Renderer processes), and a Freecell game is using 164MB. Freecell, which ran just fine on Windows 95 in 8MB!

I'm quite happy with a video game taking a few gigabytes of memory, with all the art and sound assets it wants to keep loaded. But I really wonder whether we've lost something by not making more of an effort to use resources more frugally.

vincent-manis··on Understand CPU Branch Instructions Better
This is why the old-fashioned university course on assembly language is still useful. Writing assembly language (preferably for a less-complex architecture, so the student doesn't get bogged down on minutiae) gives one a gut feeling for how machines work. Running the program on a simulator that optionally pays attention to pipeline and cache misses can help a person understand these issues.

It doesn't matter what architecture one studies, or even a hypothetical one. The last significant application I wrote in assembler was for System/370, some 40 years ago. Yet CPU ISAs of today are not really that different, conceptually.

← PreviousPage 3 of 13Next →