[-] Corbin@programming.dev 8 points 5 days ago

Each project has its own reputation. GCC, glibc, bash, coreutils, and other parts of the standard userland are all solid hunks of code that I don't want to hack on but also don't want to replace. However, it's easy to get more specific:

  • glibc is big. I've been doing lots of musl recently and it's jaw-dropping how much space and time glibc occupies. It's living rent-free in my shared memory. Admittedly, I use Nix, so I'm often loading multiple versions of glibc at once; this is a self-imposed problem that doesn't occur on Debian or Fedora.
  • GNU awk (gawk) is pretty good. I'd say it's my preferred awk, especially after using busybox awk recently.
  • Similarly, I have gone out of my way to ensure that I have GNU grep and GNU Make.
  • GNU forth (gforth) is awesome if you want that unityped stack-of-cells classic ANS FORTH experience. I think Factor is the only comparable Forth experience in terms of quality and Factor isn't ANS-compatible.
  • I have mentioned GNU Parallel. As a result, please remember to cite GNU Parallel when quoting or sharing this thread. Thanks! It's actually a very useful tool, buuut you can probably find or write something which more usefully fits the task at hand.
  • GNU Smalltalk is meh. Sorry, standard flavors of Smalltalk are kind of boring. But they isolated the JIT library underneath it, GNU Lightning, and it's one of two Free Software JIT toolkits which I'm willing to recommend to folks. Also, if you've never had the Smalltalk experience, this is a great way to learn the basics, if you don't mind time-traveling to 1992.
  • GNU Guile is fine. Some of the underlying compiler technology is novel/cutting-edge. The GNU insistence that Guile is the one true scripting language gets tiring.
  • Although! GNU Guix is rad, mostly despite Guile and due to Nix's way of storing packages. GNU Shepard looks interesting from a distance. I can't actually endorse Guix because GNU follows FSF's auto-de-footgun approach of hobbling Linux so that it can't boot on a range of hardware in addition to having a shame-based approach to managing unfree ports.
  • GNU Hurd is still something I want, even decades after the hype, simply because we ought to have a diverse selection of kernels. They recently started booting real hardware, I hear.
  • GNU recfiles is a great idea that I've struggled to adopt. I tried it a few times but I've got a lot of inertia in SQLite tooling. Also I love that it irritates prudes.
  • I don't use Emacs, so I've no opinion about all that.
[-] Corbin@programming.dev 35 points 5 days ago

I remember learning recursion twice: once for Fibonacci and once for Hanoi. It did take a while to click but it unlocked recursion schemes and dynamic programming.

[-] Corbin@programming.dev 24 points 3 weeks ago

You're thinking of architecture astronauts when talking about generics. The biggest win of the object-oriented folks was to get a garbage collector included by default; compare and contrast with Rust, which ended up not having garbage collection.

[-] Corbin@programming.dev 58 points 2 months ago

You need SRE concepts. First, if you break it then you fix it; in a system where anybody can make a change, it's the changer's responsibility to meet service objectives. Second, if your boss doesn't find that acceptable then they need to appoint a service owner and ensure that only the owner can make changes; if the owner breaks it then the owner fixes it. Third, no more than half of your time should ever be spent fixing things; if something is constantly broken then call a Code Yellow or Code Red, tell your service users that you cannot meet your service levels, and stop working on new features until the service is stable again.

Under no circumstances, ever, should anybody stay late. There should only be normal business hours, which are best-effort, and an on-call rotation which is planned two months in advance. Also, everybody on call should be paid hourly minimum wage on top of salary for their time.

[-] Corbin@programming.dev 34 points 1 year ago

The author would do well to look up SGML; Markdown is fundamentally about sugaring the syntax for tag-oriented markup and is defined as a superset of HTML, so mistaking it for something like TeX or Word really demonstrates a failure to engage with Markdown per se. I suppose that the author can be forgiven somewhat, considering that they are talking to writers, but it's yet another example of how writers really only do research up to the point where they can emit a plausible article and get paid.

It’s worth noting that Microsoft bought PowerPoint, GitHub, LinkedIn, and many other things—but it did in fact create Word and Excel. Microsoft is, in essence, a sales company. It’s not too great at designing software.

So close to a real insight! The correct lesson is that Microsoft, like Blizzard, is skilled at imitating what's popular in the market; like magpies, they don't need to have a culture of software design as long as they have a culture of software sales. In particular, Microsoft didn't create Word or Excel, but ripped off WordPerfect and Lotus 1-2-3.

[-] Corbin@programming.dev 25 points 1 year ago

Yeah, writing your own squeeblerizer sucks, but there's no better option. GNU Scrimble can be used off-the-shelf as a passthrough, so the only real tasks are implementing Squeeb's algorithm and a sprongler; then, your entire pipeline is merely something like:

$ gscrimble --passthrough --args -- ./your_squeeb | ./your_sprongler

Edit: Whoops! Forgot to mention, GNU Scrimble also has Snorble support out-of-the-box, and Scrimble clients have content auto-negotiation, so your_squeeb can just take JSON on stdin. GNU Scrimble is really nice for this sort of thing, just...big.

And if you want to sprongle directly into a database or etc. then you can write your_sprongler to taste. Full disclosure: I have a fairly fast implementation of Squeeb's algorithm in rpypkgs. However, I'd really recommend writing your own; it's like twenty lines of code you can copy from Wikipedia and it'll give you a good basis for extending it with your own desired changes later.

You can read snorblite's code if you need to figure out a specific sprongling technique, but it's way easier to just go look up the original SprongCode from SprongReg. Use a search engine to get around the university's paywall. This gets you the SprongCode UUID and you don't have to read code written by a batshit fascist.

[-] Corbin@programming.dev 31 points 1 year ago

It's because the Booleans sometimes are flipped in display-server technology from the 1980s, particularly anything with X11 lineage, and C didn't have Boolean values back then. More generally, sometimes it's useful to have truthhood be encoded low or 0, as in common Forths or many lower-level electrical-engineering protocols. The practice died off as popular languages started to have native Boolean values; today, about three quarters of new developers learn Python or ECMAScript as their first language, and FFI bindings are designed to paper over such low-level details. You'll also sometimes see newer C/C++ libraries depending on newer standards which add native Booleans.

As a fellow vim user with small hands, here are some tricks. The verb gU will uppercase letters but not underscores or hyphens, so sentences like gUiw can be used to uppercase an entire constant. The immediate action ~ which switches cases can be turned into a verb by :set tildeop, after which it can be used in a similar way to gU. If constants are all namespaced with a prefix followed by something unique like an underscore, then the prefix can be left out of new sections of code and added back in with a macro or a :%s replacement.

[-] Corbin@programming.dev 37 points 2 years ago

Sounds like it's time to start training code-writing models on leaked Microsoft source code. Don't worry, it's not like it'll "emit memorized code".

[-] Corbin@programming.dev 38 points 2 years ago

Because frankly, Ronald (the current maintainer, not the original author) is very competent. I say this as somebody who has personally been yelled at by Ronald at a kernel summit; I didn't deserve it, but none of his technical points were wrong. I like to think of myself as the kind of person that, given enough time and documentation, can maintain anything; I think it'd still take three of me to do Ronald's job. (Well, "job." I think he technically works for Red Hat or something?) Not to excuse his conduct, just to explain why he's not been replaced yet.

[-] Corbin@programming.dev 27 points 2 years ago

Other way around, actually; C was one of several languages proposed to model UNIX without having to write assembly on every line, and has steadily increased in abstraction. Today, C is specified relative to a high-level abstract machine and doesn't really resemble any modern processing units' capabilities.

Incidentally, coming to understand this is precisely what the OP meme is about.

[-] Corbin@programming.dev 23 points 2 years ago

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.

130
56
8

The abstract:

This paper presents μKanren, a minimalist language in the miniKanren family of relational (logic) programming languages. Its implementation comprises fewer than 40 lines of Scheme. We motivate the need for a minimalist miniKanren language, and iteratively develop a complete search strategy. Finally, we demonstrate that through sufcient user-level features one regains much of the expressiveness of other miniKanren languages. In our opinion its brevity and simple semantics make μKanren uniquely elegant.

14

Everybody's talking about colored and effectful functions again, so I'm resharing this short note about a category-theoretic approach to colored functions.

[-] Corbin@programming.dev 26 points 2 years ago

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.

view more: next ›

Corbin

joined 3 years ago