Live data from Hacker News

The “Build Your Own Redis” Book Is Completed

build-your-own.org

121–130 of 131 posts

Re: The “Build Your Own Redis” Book Is Completed

#121

Earlier quoted context omitted.

Sounds like I might as well not pay them a penny though if its research that I can do myself instead.

It's more complex than that. People may need stimulation in order to follow through a certain learning process. Providing a structured path and (automated) test means can be stimulating, and can make the difference between (deciding to) learning something or not. Some people are certainly entirely autonomous, but at the very least, there is a spectrum of need for stimulation when approaching a topic of study.

I get you, but, I can get subscriptions elsewhere with way more resources for significantly less.

Re: The “Build Your Own Redis” Book Is Completed

#122
post #26

I actually build minimal Redis clones in every new language or runtime, or when I want to explore threading models. It all started with https://github.com/rcarmo/miniredis (which I forked to add and experiment with pub/sub), and I just found myself doing it again and again because Redis is the quintessential network service: By implementing it, you learn about socket handling, event loop for a specific runtime, threa…

Shameless plug; I've been playing with a [Redis Server implementation in Go](https://github.com/jan-carreras/ddia) for the past weeks. Mainly as a way to try out things explained in Designing Data-Intensive Applications book (favourite of mine!). Those are the [commands implemented](https://github.com/jan-carreras/ddia/blob/master/commands.md), + TTL + AoF files (for state replication) + config file, ... The "challenge" was to do it without any external dependency other than go stdlib.

> I actually build minimal Redis clones in every new language or runtime, or when I want to explore threading models.

100% agree with your advice; I'll definitively try to implement other parts of the Redis service in Go (eg: pub/sub, replication, clustering...) and probably repeat the same exercise when learning any new language.

Re: The “Build Your Own Redis” Book Is Completed

#123

Earlier quoted context omitted.

Do you provide educational licenses/pricing? It looks really interesting but I can't afford it as a student.

We do. Feel free to email me sarup@codecrafters.io

Will do, thank you for replying :)

Re: The “Build Your Own Redis” Book Is Completed

#124

Earlier quoted context omitted.

Of course you're more than welcome to use whatever tech for whatever purpose. Personally, I'm not confident that ChatGPT wouldn't hallucinate facts when prompted to 'just' proof-read. I would rather poor English than confident factual errors.

For example, here's a section from the Build Your Own Redis book: Our server will be able to process multiple requests from a client, to do that we need to implement some sort of “protocol”, at least to split requests apart from the TCP byte stream. The easiest way to split requests apart is by declaring how long the request is at the beginning of the request. Let’s use the following scheme. The protocol consists of…

What prompt did you use? and how big chunks of text would you say it can handle reliably.

Re: The “Build Your Own Redis” Book Is Completed

#125
post #83

This take on "building blocks of modern computing" is fairly opinionated though. They mention "NGINX, SQLite, PostgreSQL, Kafka, Linux kernel, etc." - of which I'd only consider NGINX and the Linux kernel (and Redis) as "building blocks". The others might be part of their own preferred stack, but if you mention Postgres, why not MySQL? If Kafka, why not RabbitMQ? But yeah, NGINX, Redis, and the Linux kernel are basic…

They are all arbitrary (including nginx) in the sense that there are many stacks out there that don't use any of them. But I don't think it's a controversial selection as they are all extremely popular.

Re: The “Build Your Own Redis” Book Is Completed

#126
post #56

Earlier quoted context omitted.

Not everyone speaks English as their native language.

True, but looking at author name - James Smith - it does not seem to be the case.

Potentially, but on the other hand, James Smith is exactly the sort of name you'd choose to use in the Anglosphere if your birth name was difficult to pronounce for English speakers.

Re: The “Build Your Own Redis” Book Is Completed

#127

Earlier quoted context omitted.

It's more complex than that. People may need stimulation in order to follow through a certain learning process. Providing a structured path and (automated) test means can be stimulating, and can make the difference between (deciding to) learning something or not. Some people are certainly entirely autonomous, but at the very least, there is a spectrum of need for stimulation when approaching a topic of study.

I get you, but, I can get subscriptions elsewhere with way more resources for significantly less.

AFAIK there are no other services that provide multiple languages, automated testing and team features, but if you know of any, it's certainly useful to report them in this thread.

Exercism is the closer service I can think of, but it's based on simple exercises, not real-world projects.

There are a few books that have a similar target (build X), but much narrower in scope (either a single language or pseudocode, and certainly no automated testing/team features).

Re: The “Build Your Own Redis” Book Is Completed

#128

Earlier quoted context omitted.

For example, here's a section from the Build Your Own Redis book: Our server will be able to process multiple requests from a client, to do that we need to implement some sort of “protocol”, at least to split requests apart from the TCP byte stream. The easiest way to split requests apart is by declaring how long the request is at the beginning of the request. Let’s use the following scheme. The protocol consists of…

What prompt did you use? and how big chunks of text would you say it can handle reliably.

Me: Hey, I need some help cleaning up some language with a lot of grammatical errors, can you help?

GPT: Yes, I'd be happy to help you clean up language with grammatical errors. Please provide the text for me to review.

Me: Our server will be able to process multiple requests from a client, to do that we need to implement some sort of “protocol”, at least to split requests apart from the TCP byte stream. The easiest way to split requests apart is by declaring how long the request is at the beginning of the request. Let’s use the following scheme.

The protocol consists of 2 parts: a 4-byte little-endian integer indicating the length of the following request, and a variable length request.

Starts from the code from the last chapter, the loop of the server is modified to handle multiple requests:

GPT: "Our server will process multiple requests from a client by implementing a protocol to separate requests from the TCP byte stream. The simplest method for separating requests is to include the length of each request at the start. The protocol consists of two parts: a 4-byte little-endian integer indicating the length of the request and a variable-length request. The server code from the previous chapter has been modified to handle multiple requests in the following manner:"

---

That's the entirety of the interaction!

I haven't tested much but for the last day or so I've been thinking a lot about Kant, Frege, Quine and Wittgenstein!

GPT opens the door for some kind of empirical philosophy... like, what are the error rates for various kinds of tasks? Can we use a Kantian framework? How about Frege? How about Quine?

I mean, Quine is actually my favorite of the analytic philosophers because of his indeterminacy of translation argument and the notion that there really is no analytic/synthetic divide when you get down to it resonates well with me.

Death to metaphysics!

But there seems to be some use in differentiating between "All bachelors are unmarried" and "All bachelors are unhappy" if only because I'm now seeing how making a distinction can have a profound impact on the usefulness of GPT completions.

Briefly and half-assed, Quine's argument is that because you would have to be familiar with language and culture in order to understand "All bachelors are married" that the meanings of those words are fact-like and outside the scope of the proposition.

If GPT is able to do some Frege-like substitution of synonyms it is because it has this compressed language model which seems to lend credence to Quine's arguments.

Re: The “Build Your Own Redis” Book Is Completed

#129
post #103

Is anyone aware of an in-depth explanation about how key-value store persistence, such as Redis RDB, is built? A guide on compaction would be really interesting and useful.

Highly recommending Martin Kleppmanns „Designing Data-Intensive Applications“ book (O‘Reilly). Covers virtually any topic around database implementation. Well written, big source of knowledge. Introduces concepts gradually and with many examples. Lots of references to actual software out there, and how they are done.

KV persistence is covered in Chapter 3, right from the start. Redis is also mentioned as an example for an in-memory store with „weak durability by writing to disk asynchronously“.

Re: The “Build Your Own Redis” Book Is Completed

#130

Earlier quoted context omitted.

What prompt did you use? and how big chunks of text would you say it can handle reliably.

Me: Hey, I need some help cleaning up some language with a lot of grammatical errors, can you help? GPT: Yes, I'd be happy to help you clean up language with grammatical errors. Please provide the text for me to review. Me: Our server will be able to process multiple requests from a client, to do that we need to implement some sort of “protocol”, at least to split requests apart from the TCP byte stream. The easiest…

Thanks,

I find the quality of answers you receive out of GPT drastically changes with the way you phrase questions.

I don't think I would ever have come up with asking the question in the way you did.

As someone who has english as a second language I found GPT ofthen produced incorrect and low quality answers while most of my native english speaking colleagues were getting high quality answers. Looking at their prompts compared to mine it's all down to differences in how questions are phrased.

Post reply on HN