|
|
|
|
|
by fathrowaway12
1296 days ago
|
|
It's very good at iterating from a description to working code. You still need to know what you're doing, but it can handle a lot of details. prompt: How would you design a distributed key value storage system? Assume the values are about one megabyte. We will need to scale up to store petabytes of data.
gpt: describes data distribution techniques, consistency, durability issues.
prompt: What techniques can you use for the data distribution?
gpt: sharding, replication, partitioning, hashing
prompt: Can you show me an example of the sharding technique in python?
gpt: spits out code for hash sharding a dictionary
prompt: What are some pitfalls of the hash function you used?
gpt: not guaranteed to unique hash values, not guaranteed to be the same for different python installations, not cryptographically secure
prompt: Can you implement the stub for a GRPC key value service in rust? The service should have a Put API that takes a key and a value and returns a status code enum. The status code can be SUCCESS or FAILURE.
gpt: spits out code using tonic
prompt: Can you show me the protocol buffer?
gpt: spits out the protocol buffer schema
prompt: Can you implement the put method by storing the data in sqlite?
gpt: spits out the code with a kv_pairs table
prompt: Can you show me the sqlite schema for the table?
gpt: spits out the sql to create the table
|
|
I was also able to make it write a boot loader, a simple kernel, and give me instructions to run it on qemu.
The iterative process is fantastique to dig into something new. It’s not an authoritative source of information but a buddy with whom to explore topics.
I want something like that integrated in my OS. With such capabilities I can see myself talking to my AI assistant while I’m working on something.
Edit: it’s also quite good at writing test cases for a given function