News for hackers. Stuff that matters.

ratzkewatzke

Re:Building a Shell on Tuesday March 17, 2026 @12:31PM (#47414949)
There's a very good exercise on Codecrafters (https://app.codecrafters.io/courses/shell/overview) to walk you through writing your own shell. I found it enlightening, as well as a good way to learn a new language.
Re:Tiny C Compiler on Saturday February 07, 2026 @09:32PM (#46930763)
There are several good suggestions in this thread already, but I think Nora Sandler's newish book (https://www.amazon.com/Writing-Compiler-Programming-Language...) is approachable and fun if you want a less academic approach.
Re:Steel Bank Common Lisp 2.3.5 released on Sunday May 28, 2023 @08:23PM (#36109185)
Back in 2009, before the acquisition, a developer ITA software presented at the SBCL workshop (audio here: http://www.sbcl.org/sbcl10/materials/cracauer-talk.ogg), talking about the company's use of SBCL. They'd also talked about using CCL; the last I heard was that they used one on desktops, the other in prod deployments.
Re:Learn Lisp the Hard Way on Tuesday January 10, 2023 @02:10PM (#34329902)
I'm an Emacs partisan, but the VSCode support for Common Lisp has come along way. Interested parties might look at https://marketplace.visualstudio.com/items?itemName=rheller.... .
Re:What is a programmable programming language? (2019) on Monday June 06, 2022 @11:36AM (#31641819)
Without rat-holing on "should," here's something I had to do the other day:

I am providing language-level APIs for a complex web service, one in Python and one in Common Lisp. The service has dozens of operations, all of which are wrapped around a REST API that takes query strings and headers in its inputs, and produces very different outputs. Model for this is something like S3.

In most languages, I have two choices: I can push the complexity to the users, making them plug the query string values into a big map or option object; or I can write dozens of functions, most of which are boilerplate.

In Python I wrote dozens of functions (I obviously reused a set of central ones, but there's lots of scaffolding to do, e.g., translation of arguments from user types to strings appropriate HTTP headers). In Lisp I wrote a macro that operates on a set of query string and header inputs, and then defines a function appropriate for the user-level API. When I fix bugs in the macro, I automatically fix all of the functions.

The trade-off is that the macro is itself a function that's operating at two different semantic levels (pre- and post-compilation), and it might be challenging to read for newcomers to Lisps. But this let me hide all the nasty API complexity from my users while writing substantially fewer lines of code. New additions are a single defmacro line.

Re:On Repl-Driven Programming (2020) on Thursday May 05, 2022 @08:00PM (#31279616)
I write Lisp for a living (in a couple of different forms), and I've never seen this. You do occasionally get problems where the state drifts a bit and you end up with order dependencies in files, but everybody I know works on source code and pushes it back and forth to the REPL via their editor.
I'm not going to gainsay your experience, but it doesn't match mine. Much of what you do in graduate school is to discover where the accessible areas of research are--where do we have a foothold, and are making progress, and what are some achievable results?

There are big and hairy problems that are bad investments for a young mathematician. I would steer students clear of the Collatz conjecture. But once you get up to speed in your research area, you usually find interesting problems thick on the ground.

Tenure-track positions are competitive, but I don't think there are a lack of interesting things to work on.

Re:Why income share agreements did not work out on Wednesday March 23, 2022 @03:42PM (#30782441)
I think that the explanation about credit scores probably applies here; much as people with good credit scores had better options than ISAs, people with some cash to put up do as well.
Re:A complete guide to TypeScript’s 'never' type on Friday March 11, 2022 @11:09AM (#30641612)
This is widely attributed to Sidney Morgenbesser (https://en.wikipedia.org/wiki/Sidney_Morgenbesser).
Re:So you want to study mathematics on Monday March 07, 2022 @02:39PM (#30592378)
I'm a fan of functional analysis, but even in my (very competitive) undergraduate curriculum, it wasn't required for a bachelor's in mathematics. I think Susan's guide covers most of what the undergraduate programs I've seen require.
Re:Teach Yourself Programming in Ten Years (1998) on Tuesday March 13, 2018 @02:58PM (#16578786)
Clojure was built in 2007, so it's clear there have been some changes.
The Supreme Court was careful not to rule on that; they ruled only that it was a search, not that it was constitutionally unreasonable. There is good coverage of this decision by Orin Kerr at http://www.washingtonpost.com/news/volokh-conspiracy/wp/2015... .
Re:Amazon Glacier on Tuesday August 21, 2012 @01:22PM (#4413657)
So multiply it by your download speed. Let me know when you get to $22k.
Re:Amazon Glacier on Tuesday August 21, 2012 @11:49AM (#4413225)
First, the reason the "peak hourly retrieval rate" of "1 gigabyte per hour" is there in the article is to answer this question. At a relative allowance of 5.12 GB/day and 1 GB/hour transfer rate, that gives you a "peak hourly retrieval" of .79 GB (at 5.12/24, your first .21 is free), and so we multiply:

.79 * 720 * .01

Giving me a little less than $6.

Now, do you think Amazon is likely to think they can get away with selling a service that charges you $22k for a 3TB retrieval?

Second, you have ranged GETs and tape headers; use them to avoid transferring all of your data out of the system at once. [Edit: looks like ranged GETs are on job data, not on archival retrieval itself. My bad.]

Re:Amazon Glacier on Tuesday August 21, 2012 @09:51AM (#4412672)
They're not using tape storage. The ZDNet story confirms this: http://www.zdnet.com/amazon-launches-glacier-cloud-storage-h....

There are any number of reasons why deletes would be discouraged. One is packing: if your objects are "tarred" together in a compiled object, discouraging early deletes makes it more cost-effective to optimistically pack early.

This article is a mess, and people need to stop voting it up. For example, it contains this perplexing passage:

"Let’s say we have the string “hello world”, and let’s assume that its hash is hash(‘hello world’) = 12345. So if hash(‘he’) = 1 we can say that the pattern “he” is contained in the text “hello world”"

What the heck is he talking about here?

His hash function is O(m), where m is the length of the pattern being searched for. This makes the implementation trivially O(mn), which he notes, writing in another passage:

"The Rabin-Karp algorithm has the complexity of O(nm) where n, of course, is the length of the text, while m is the length of the pattern. [...] However it’s considered that Rabin-Karp’s complexity is O(n+m) in practice"

Next time I submit a code review, I'm going to "consider" my complexity this way.

This isn't a good guide to Rabin-Karp, which is effectively discussed on Wikipedia, in Cormen, etc. It is probably a very effective way of attracting ad dollars for the banners all over the page.

Avoid, avoid.