Corbin

@Corbin@programming.dev

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Corbin,

python3Packages.scikit-image appears to be available and non-broken in nixpkgs; on my machine, I get /nix/store/w8681ncsw92cn4gq6gyraw4z19r0r6c3-python3.11-scikit-image-0.21.0. Do you have an actual example?

I understand your point, but given nixpkgs’ position in the community, it might be a moot point.

Corbin,

There are subfields of computer science dedicated to this question. A good starting point for the theory would be Pessimal algorithms and simplexity analysis, which lays out two concepts:

  • The time & space simplexity of an algorithm indicates best-case lower bounds on resource usage, and
  • An algorithm is pessimal if no equivalent algorithm wastes more time/space/etc.

For example, common folklore is that sorting has O(n lg n) time complexity, depending on assumptions. In the paper, they give that sorting has Ω(n ** (lg n / 2)) time simplexity; any algorithm which takes more time, like bogosort, must do so through some sort of trickery like non-determinism or wasting time via do-nothing operations.

Corbin,

A PDF is available here, and analysis from Colyer 2016 is good.

This paper is fascinating in terms of ethnography. Consider: the paper mentions “branch” or “branches” dozens of times, but only says “tree” four times, and every instance is in the phrase “working tree”. The paper never mentions “blob” or “blobs”, “DAG” or “graph” or “poset”. The authors either chose to omit git’s data model, or they don’t know about it. The implication is that the UX and UI don’t reflect the data model, I suppose, but it is a very curious omission.

Now, contrast this with Git’s documentation. When sysadmins teach git, we focus on the data first. git is a kind of database which stores four different flavors of object, and the git UI is merely a collection of commands for programmatically manipulating the database. All of the various UX is purpose-built, on a per-command basis, for development workflows. New commands can be implemented as plain UINX-style executable scripts in any language.

In summary, this paper looks at git as a version-control product, while its developers and users look at git as a version-control framework.

There was a followup paper from a few years later, also with Colyer 2016 analysis; this paper has too many glaring defects to discuss here.

On a personal note, I saw this and am happy to note that science has marched along:

We plan to extend our notation to make it more expressive in the future, but are cognizant of the fact that diagrammatic syntaxes for first order logic have a long and troubled history.

Not long after this paper, ontology logs were figured out, which can be made as expressive as needed for the case of relations; see Patterson 2017.

Corbin, (edited )

The nix-shell advice is cogent enough that somebody might use it. Instead of a bare bash script, consider direnv, which scopes each shell session to a directory and has upstream builtin Nix support.

Edit: When laning with two mages in bot, focus on harassing enemy champions instead of farming. For Veigar, line up each Q to hit a minion and a champion, combining the farm and harass into a single action. Do not be aggressive in the early game; AP takes time to build. The deaths at 13min and 15min were due to aggression, and by 18min it looks like tilt. Ward more; at 22min, Veigar is alone in lane with no visibility into nearby bushes, and 4/5 enemy champions can burst him down if he misses his cage. Rod of Ages is a good call, but an Hourglass would be an even better call, as it can nullify damage from Ahri and Zed combos. Finally, don’t do fadeaway ults at the end of Veigar combos; it feels satisfying, but isn’t as much damage as carefully-timed Q.

'Don't parse markup languages with Regex' is an annoying trollpost and it should die... right?

Look 0 of my work involves HTML, well maybe 1-2 percent does; however, about 60% of my work involves regular expressions, grammar, lexical scanning and syntactic parsing, so it still irks me, and will irk me beyond my grave, when people say shit like ‘Don’t parse HTML/Markdown/etc with regex! Use a parser generator!’...

Corbin,

[HTML and Markdown] are not grammatically Type 2 (Chomsky-wise, Context-Free); rather, they are Type 3 (Chomsky-wise, Regular).

This is at least half-wrong, in that HTML is clearly not regular. The proof is simple: HTML structurally embeds a language of balanced parentheses (a Dyck language), and such languages are context-free and not regular. I don’t know Markdown well and there are several flavors; it’s quite possible that some flavors are regular. However, traditional Markdown embeds HTML, so if HTML is not regular than neither is Markdown.

I once did a syntax-directed translation of Markdown to HTML in AWK!

Sure. The original Markdown implementation was in Perl and operated similarly. However, note that this doesn’t imply that either language is regular, only that a translation is possible assuming the input is valid Markdown. Punting on recognition means that invalid parse trees have undefined translations, presumably at least sometimes generating invalid HTML.

I created rcp, an OSC52 copy tool for your remote server (codeberg.org)

I have been searching for a simple way to copy loads of text from remote servers for a while. This includes files, but is sometimes also only multiple lines from stdout of a program. Oftentimes this is kinda hard to do in terminal emulators, so I wrote a very small program to copy text via Operating System Commands....

Corbin,

In addition to the sibling comment, note that reproducible build systems from Docker to Nix require a lockfile in order to be reproducible, and if you don’t provide one, then somebody downstream will provide it instead. By checking in Cargo.lock, you ensure control over the precise versions of your dependencies for all downstream users.

Corbin,

Yeah, this list of sites is making me think of asking for a book by loudly asking a library, a series of coffeeshops, a chud microbrewery, and an 11-year-old bully. Try quietly reading in the library first, I guess.

Corbin,

I’ve only skimmed the paper, so let me know if I’ve missed something, ideally with a page number. Also, it’s late and I’m tired, so I’m not hyperlinking anything; sorry.

I’m not sure what a “full semantic analysis” entails, but always keep Rice’s theorem in mind: there aren’t any interesting semantic analyses available for Turing-complete systems.

Python is a descendant of Smalltalk. Like several of its cousins, particularly the famous ECMAScript, Python doesn’t have types or classes in the Smalltalk sense, but prototypes which form a class-like hierarchy. From the static-analysis point of view, whether a type is created or instantiated is a matter of Rice’s theorem.

The ability to invoke type() at runtime is not lazy. Python is eager and strict; even generators are eager and strict, although they can cause stack frames to become “stale”; whether a stale stack frame is cleaned up is also a matter of Rice’s theorem.

None of this prevents compilation of Python. The RPython toolchain first imports an application, evaluating all calls to type() and pre-building all classes; then, it statically analyzes all of the Python objects in memory and decompiles their bytecode to determine their behaviors. The resulting executable behaves as if it were started from a snapshot of the Python heap.

Yes, CPython sucks. Use PyPy instead; also, use cffi to wrap C libraries.

Corbin,

It’s because most of the hard questions and theorems can be phrased over the Booleans. Lawvere’s fixed-point theorem, which has Turing’s theorem and Rice’s theorem as special cases (see also Yanofsky 2003), applies to Boolean values just as well as to natural numbers.

That said, you’re right to feel like there should be more explanation. Far too many parser papers are written with only recognition in mind, and the actual execution of parsing rules can be a serious engineering challenge. It would be nice if parser formalisms were described in terms of AST constructors and not mere verifiers.

Corbin,

You are very close to a deep truth of language design: all large popular languages slowly die from committees overloading them with cruft and redundant features, and at the end of their healthspans, they become painful for all involved. In your list, this includes both PHP and ECMAScript; Perl 5 avoided this fate, but Raku certainly suffers from it.

Corbin,

You are correct. For the example of regular languages, we have Kleene algebras, which are special cases of *-semirings. Similar algebras exist for the rest of the Chomsky hierarchy.

Before going up the hierarchy, I would recommend checking out what we can do with semirings alone. Two great papers on the topic are “Fun with Semirings”, Dolan 2013 and “A Very General Method of Computing Shortest Paths”, O’Connor 2011. Don’t be fooled by the titles; they both involve surprise guest appearances from regular expressions.

Corbin,

Lucky 10000: It’s a pun. A quaver is a duration of a musical note in the UK, equivalent to a USA eighth note; a semidemihemiquaver is a sixtyfourth note, used to notate e.g. certain kinds of trumpet trills.

Corbin,

Don’t use OpenAI’s outdated tools. Also, don’t rely on prompt engineering to force the output to conform. Instead, use a local LLM and something like jsonformer or parserllm which can provably output well-formed/parseable text.

Corbin,

Object-oriented design is about message-passing; messages are more important than objects. Classes are completely irrelevant – there’s an entire branch of object-oriented language design without classes!

Corbin,

The conversation was in English, though. I’m sympathetic to your argument – if we all spoke Lojban, as we ought to, then pronouns would be computable from display names and nouns would be non-gendered; however, when speaking English, please be aware of the centuries of colonialism baked into the linguistics.

Corbin,

Walter Bright has fairly odious political opinions; like many social conservatives these days, he likes to complain about wokeness and communism, and I would completely understand a community fork simply to remove his control over various parts of the D language.

Also, just for a quick sanity-check: Which languages have you invested/migrated to, only to find that “political stunts” had a “negative impact” on your planned development?

Corbin,

As a society and as individual computer scientists, none of us actually know what a computer is or how to use them. All programming languages are guesses, mere attempts to encode our natural-language reasoning and philosophy in the purely syntactic and formal fashion required by computers. Don’t let yourself become biased in favor of specific languages; instead, understand that all languages are bad in different ways.

Corbin,

Most consumer-grade NICs have a default MAC address which is retrievable with device drivers, but delegate (Ethernet) packet assembly to the OS. If the OS asks the NIC to emit a packet, then the NIC often receives the packet as a blob, DMA’d from main memory, and emits the bytes as octets. Other NICs do manage packet assembly, but allow overwriting the default MAC address. By the time I was learning Linux, we had GNU MAC Changer available in userland with the macchanger command, and many distros have configuration for randomizing or hardcoding MAC addresses upon boot.

I want to say that this is all because olden corporate network management policies could require a technician to replace a NIC without changing the MAC address, but more likely it is because framing and packet assembly was not traditionally handed to a second controller, and was instead bit-banged or MMIO’d by the CPU.

Corbin,

Hi! Please don’t link anything from this subdomain again. It was considered a plague back on Reddit, and this sort of content-free post shouldn’t be encouraged here either.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • InstantRegret
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • rosin
  • everett
  • Durango
  • Youngstown
  • slotface
  • cubers
  • kavyap
  • DreamBathrooms
  • megavids
  • ethstaker
  • mdbf
  • Leos
  • GTA5RPClips
  • osvaldo12
  • tester
  • modclub
  • khanakhh
  • cisconetworking
  • provamag3
  • anitta
  • normalnudes
  • lostlight
  • All magazines