Better HN
topnewbestaskshowjobs
Log inSign up

mannschott

73 karma · joined Aug 18, 2017 (9y ago) · 36 submissions

Submissions

comment 3mo ago · link · parent

In C a pointer can point to any arbitrary offset within an object or array, to a local variable somewhere on the stack, to a static variable, to read-only memory, to the first(?) of an indeterminate number of characters (hopefully) terminated by ((char)0). To the first of a statically unknown number of variables located somewhere in memory, to a variable of indeterminate type (thanks to union), to I/O devices, and also to unallocated memory since there's no bounds checking.

A reference can only point to an object or an array on the heap. Array indexing is bounds-checked.

It seems obvious to me that these restrictions make references easier to reason about than C-style pointers, and therefore easier to learn.

comment 3mo ago · link · parent

«Why dont O/S support executables with something like LLVM binaries and generate the native code at load time ?»

I've wondered this too. I can think of two systems "IBM i" (formerly OS/400) [1] and Oberon "Slim Binaries" [2] off the top of my head. I suspect that the answer to your question is some mix of path dependence and engineering trade-offs.

[1] https://en.wikipedia.org/wiki/IBM_i [2] https://dl.acm.org/doi/pdf/10.1145/265563.265576

For example, if the system has unix-style paged virtual memory (which Oberon did not), it's probably convenient to be able to directly map pages of native instructions into memory without needing to translate or massage them first.

In the case of "IBM i", which I've only ever read about, it sounds like it moves complexity from e.g. the compiler into the loader and so closer to the Kernel of the operating system. If I wanted to better understand the net cost/benefit analysis of this design I'd look for more detail on work done to port to PowerPC.

comment 1y ago · link · parent

One would assume that, but in practice, the predominant style is not one of many short procedures. Instead it feels that there's a preference to just inline the code unless the resulting procedure will have more than one caller.

For example, search for "PROCEDURE Scan" here: https://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Texts...

Control structures are deeply nested and this goes on for 64 (very dense) lines. The low line count but is an artifact of how Oberon is conventionally formatted. When reformatted to mimic the conventions of languages like C, Java or Python it works out to more than 120 lines.

When I program in Oberon (recreationally) I tend to follow this style even though I would extract the same code into a separate method were I writing in Java.

comment 2y ago · link · parent

It’s all bastard CSV out here in the real world.

For extra fun consider the German-Speaking word where CSV files are actually Semicolon-Separated but everyone still calls them CSV and looks at you like you drooled on yourself when you point out that “;” is not a “,”.

This appears to be because we use “,” as decimal separator and were too dense to learn how to use " properly in CSV.

Bastard CSVs as far as the eye can see.

comment 2y ago · link · parent

When I wrote "teletype" I wasn't referring to what teletypes had become by the time by the time Unix was developed. Think further back than that. This is why I mentioned 5-bit codes:

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

This coding scheme is so constrained (32 possible 5-bit values) that it uses the codes FIGURES (01000) and LETTERS (10000) to toggle back and forth between two alternate sets of meanings for the remaining 30 possible codes. Still not enough space for lower case or ASCII's plethora of control codes (just NUL and DEL).

comment 2y ago · link · parent

The early days of manual typewriters, paper tape, teletypes and vacuum tube systems, which already followed this practice predate US-ASCII, so I don't think the particular numeric values assigned by US-ASCII can have any explanatory power in answering this question.

Me, I blame the Romans ;-)

The Latin alphabet was initially only what we call the "upper case". What became the lower case came (a millennium?) later, first as an alternate style of handwriting and then as an addition to the alphabet along with rules about when which form of each letter should be used.

Given the need to economize as in 5-bit teletype codes it's not surprising the chosen convention was to print (or later display) those codes as upper case as that is, historically speaking, the default.

Still, I like to wonder if anyone every thought to build a teletype that printed in lowercase just to screw with people. :-D

comment 3y ago · link · parent

I've always suspected that 'Reader' and 'Writer' were names borrowed from Oberon since that's one of the influences that contributed to early Go design:

https://github.com/Project-Oberon/Source-Code/blob/cf7f6a6cd...

Please enjoy this microdose of historical trivia even though it doesn't answer the question of why those names were chosen (when designing Oberon).

comment 3y ago · link · parent

I've had a lot of Mohnstrudel (Poppy Seed Strudel) in Austria [1]. You won't get high; you'll just get diabetes. ;-)

https://kochen.kerpe.at/wp-content/uploads/2020/02/Mohnstrud...

comment 3y ago · link · parent

z/OS, OpenVMS and OS/400 spring to mind.

comment 3y ago · link · parent

Enumerations and subranges (in style of Modula-2 and Pascal) are missing from Oberon, but Records are present subject to type extension in the style of structs in Go. In Oberon(-1), we used (pointers to) procedures in record fields as methods when programming in an object-oriented style. Oberon-2 added methods which dispatch dynamically based on type of receiver. These were "type bound procedures". You'll find this idea echoed in Go as well.

comment 4y ago · link · parent

I was shocked by how spammy Amazon.com's search results seemed compared to what I'm accustomed to from Amazon.de. I'm not a regular user of Amazon.com but have had occasion to do so since I'm visiting family in the US. Amazon.de is the "local" Amazon where I live.

Is this an affect of differing laws in the EU versus the USA? Differences in leadership of Amazon.com versus Amazon.de? Differences in perceived market expectations? Perhaps the average American consumer is expected to be more tolerant of this kind of thing? (I wonder because I compare the robo-call-infested hellscape that we've made of our telephone system compared to the rarity of such abuse where I live in Europe and wonder if we, in the US, are just more prone to behave in a way that produces tragedies of the commons.)

comment 4y ago · link · parent

"Permanently suspended" is neither accurate nor helpful. That an account can't leave that state is precisely what "permanently" means. Since an appeal is possible, "Indefinitely suspended" would be accurate.

comment 4y ago · link · parent

This is the root of the problem for me as well.

comment 4y ago · link · parent

The article's proposed mapping of tags and especially comments to links strikes me as unavoidably clunky in a world where one-way links are the only kind available. Maybe I'd find this golden hammer argument more convincing in the context of a hypertext system where bi-directional links [1] were common and well supported.

[1] https://maggieappleton.com/bidirectionals

comment 4y ago · link · parent

> In school you do “experiments” and if the answer doesn’t match what is in the book you are marked down.

This is unsurprising and probably obvious. The purpose of the exercise is learning how to do experiments reliably so that at some later point when doing experiments to test a hypothesis you can have some confidence that the results you produce are actual data and not just noise.

When doing science class "experiments" of this sort perhaps it would illuminate things to students better by going up one level: the hypothesis under test is "student can perform experiment reliably". The putative subject of the "experiment" isn't the actual subject in inquiry: you are. On the other hand maybe this would just confuse students. (I've observed wildly varying capacity for abstraction and meta-cognition among the people I work with as a software developer so I suppose this is something that varies among individuals generally.)

comment 4y ago · link · parent

Back in the day™ Think’s Pascal used bold, italics and underlining to do syntax highlighting because the Mac’s screen was black-and-white. It would be a compromise: you can’t encode as much information into the text’s appearance without access to color, but it could be sufficient depending on your requirements.

comment 5y ago · link · parent

Presumably what's meant is the tools necessary to directly access the affected systems to effect repairs. I suppose it's by analogy to this:

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

comment 5y ago · link · parent

My $JOB is maintaining such a desktop CRUD app that's been in use for the past 20 years. It uses a Swing (via a proprietary higher-level framework) for its GUI. Over the years it's accreted a few dozen services (also in Java) in its orbit, but the central GUI app and its data-base still remain and continue to be extended as new requirements arise.

comment 5y ago · link · parent

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

Looks like about 1% of the population were snitches for the Stasi. You can decide for yourself if that's "a lot" or not.

comment 5y ago · link · parent

A few more oddballs come to mind:

iCab was a favorite of mine before the switch from Classic Mac OS to Mac OS X. I made heavy use of its ability to save offline copies of open web pages (with all embedded resources). http://www.icab.de

OmniWeb, on Mac OS X was very pretty for its time. (It was originally developed on OpenStep.) https://en.wikipedia.org/wiki/OmniWeb

NetPositive was bundled with BeOS. I only used it briefly. https://en.wikipedia.org/wiki/NetPositive

comment 5y ago · link · parent

Sadly not a joke, but thankfully quite obscure: https://en.wikipedia.org/wiki/Endianness#Middle-endian

comment 6y ago · link · parent

This will already sort equal file names together. If I wanted to combine that with file sizes, I'd probably do some kind of

    decorate | sort | undecorate
dance on each line produced by find. Where decorate would add the start of each line the things you want to sort by and undecorate would remove them again.

comment 6y ago · link · parent

Yea, I used to do this with a little script. The strategy I used, which worked well when I was compressing and archiving workspaces (which might often contain checkouts of different branches of the same project) was essentially this:

    find * -print | rev | sort | rev |
    tar --create --no-recursion --files-from - |
    gzip
This clusters file types together and within file types and within that files with the same base name close together.

This worked surprisingly well for my use cases, though you can imagine that packing and unpacking times were impacted by the additional head seeks caused by the rather arbitrary order in which this accesses files.

comment 6y ago · link · parent

Yes, facebook is blocking the creation of new posts with links to Dreamwidth. Or at least, they did so when I attempted to create a post containing a link to the post under discussion here about 5 minutes ago. I am located in Austria if that makes any difference.

comment 6y ago · link · parent

I'm familiar with this conundrum. I've been taking notes, managing tasks and appointments on paper since 2015; before that I took most notes in Emacs org-mode and managed some tasks there, and some in OmniFocus.

Lack of search is a definite disadvantage of handwritten notes. Here's what I've done to blunt that:

(1) Every notebook begins with a few pages for a table of contents. (2) When a notebook is full, I scan it in as a PDF. (3) I type up the table of contents to make it searchable and add that to the PDF. (4) The PDFs are all available on my phone.

I am generally able to find things this way, but it is not as convenient as i-searching around a giant buffer in Emacs or using something like deft.el. For the moment I am continuing in this fashion, but I do periodically consider switching back to using a computer for note taking. Perhaps some day I will.

comment 6y ago · link · parent

What a blast from the past! Logo was my first exposure to programming in elementary school (1981-1986). This was fun to play with and the tutorial is well done. I was surprised by the lack of any kind of "run" button, but I think this was a good choice for this kind of learning environment. Neat!

comment 6y ago · link · parent

"Educt, is a substance separated from a mixture in which it already existed, as opposed to a product, which is newly generated by a chemical reaction." So, in this context, the substances consumed by the cell's chemical processes.

comment 6y ago · link · parent

Colossus was used to crack Tunny (Lorenz cypher machine) used by German High Command, while the Bombe machines were used to attack Enigma.

comment 6y ago · link · parent

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

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

comment 7y ago · link · parent

For the case of accidentally closing a Viewer: The command System.Recall restores the most recently closed Viewer. Just find or type that command anywhere on the screen and then execute it by clicking it with the middle mouse button.
12