HN user

EliasWatson

121 karma

contact@eliaswatson.dev

https://github.com/EliasWatson

HackerSmacker profile: https://www.hackersmacker.org/user/EliasWatson?hs=Tquh8JAC2vIzbmXgoH

Posts3
Comments30
View on HN

https://code.claude.com/docs/en/prompt-caching#on-a-claude-s...

"On a Claude subscription, Claude Code requests the one-hour TTL automatically. Usage is included in your plan rather than billed per token, so the longer TTL costs you nothing extra and only affects how long your cache stays warm. If you’ve gone over your plan’s usage limit and Claude Code is drawing on usage credits, you are billed for that usage, so Claude Code automatically drops the TTL to five minutes."

A couple things off the top of my head:

- You aren't forced to resolve rebase/merge conflicts immediately. You can switch branches halfway through resolving conflicts and then come back later and pick up where you left off. You can also just ignore the conflicts and continue editing files on the conflicted branch and then resolve the conflicts later.

- Manipulating commits is super easy (especially with jjui). I reorder commits all the time and move them between branches. Of course you can also squash and split commits, but that's already easy in git. Back when I was using git, I would rarely touch previous commits other than the occasional squash or rename. But now I frequently manipulate the commit history of my branch to make it more readable and organized.

- jj acts as a VCS for your VCS. It has an operation log that is a history of the state of the git repository. So anything that would be destructive in git (e.g. rebase, pull, squash, etc) can be undone.

- Unnamed branches is the feature that has changed my workflow the most. It's hard to explain, so I probably won't do it justice. Basically you stop thinking about things in terms of branches and instead just see it as a graph of commits. While I'm experimenting/exploring how to implement or refactor something, I can create "sub-branches" and switch between them. Similar to stashes, but each "stash" is just a normal branch that can have multiple commits. If I want to test something but I have current changes, I just `jj new`. And if I want to go back, I just make a new commit off of the previous one. And all these commits stick around, so I can go back to something I tried before. Hopefully this made some sense.

Also note that jj is fully compatible with git. I use it at work and all my coworkers use git. So it feels more like a git client than a git replacement.

jj is very flexible when it comes to workflow. One thing to note is that commits don't have to have messages. What I tend to do is to run `jj new` frequently while I work on something and leave all of them without messages. Then when I'm ready to make my actual commit, I squash the temporary commits together and then add a message. If my changes are separable, I can split the commits before squashing. This workflow acts as a kind of undo history. I can easily go back to what I had 5 minutes ago and try a different approach, but then also jump back to my original changes if I want. It makes experimentation much easier compared to git.

The DGX Spark is probably the best bang for your buck at $4k. It's slower than my 4090 but 128gb of GPU-usable memory is hard to find anywhere else at that price. It being an ARM processor does make it harder to install random AI projects off of GitHub because many niche Python packages don't provide ARM builds (Claude Code usually can figure out how to get things running). But all the popular local AI tools work fine out of the box and PyTorch works great.

The issue is that you usually aren't buying the ebook. You are buying a license to access that ebook and they can revoke that license at any time. Maybe you're okay with that, but many people want to permanently have access to the things they purchased.

Yes, I agree that Monero is likely a better option. I am also a big fan of Nano because of its instant transactions and zero transaction fees. However it has the same privacy problem as Bitcoin. It would be interesting to see a hybrid of Nano and Monero.

I've been working on something just like that off and on for a couple months. It's a MUD where all the NPCs are controlled by LLMs that interact with the world with the same commands that players use. I got it to the point where the NPCs can navigate the world, interact with each other, and even create things. But they often get on rabbit trails and forget their original task, so I need to build a memory system and something like the task list in Claude Code. My goal is to have a fully simulated town that the player can interact with.

I wonder how the latest version of Grok 3 would stack up to Gemini 2.5 Pro on the web dev arena leaderboard. They are still just showing the original early access model for some reason, despite there being API access to the latest model. I've been using Grok 3 with Aider Chat and have been very impressed with it. I get $150 of free API credits every month by allowing them to train on my data, which I'm fine with since I'm just working on personal side projects. Gemini 2.5 Pro and Claude 3.7 might be a little better than Grok 3, but I can't justify the cost when Grok doesn't cost me a penny to use.

Google results have gotten so terrible over the years. I switched to Kagi long ago and haven't looked back. Whenever I use Google on another computer, I'm shocked by how awful the results are compared to Kagi.

As for AI search, I do find it extremely useful when I don't know the right words to search for. The LLM will instantly figure out what I'm trying to say.

I'm working on something similar. I'm building a MUD with an LLM playing the role of GM. Currently it just controls NPCs, but I eventually want it to be able to modify the game rules in real time. My end goal is a world that hundreds of players can play in simultaneously, but has the freedom and flexibility of a TTRPG (while still remaining balanced and fair).

It would be interesting to modify this for optimizing BrainF programs. It has a very simple instruction set and there are lots of example programs available.

To avoid generating useless things like "++--", you could have the optimizer generate instructions that are translated to BrainF operations. So instead of ">>>--", the optimizer would generate "Move +3; Add -2".

I think you could produce the same effect without worrying about overdraw/sorting and without translucent materials:

1. Render the terrain to a separate buffer

2. Copy the terrain's depth buffer to the main depth buffer

3. Render all non-terrain objects normally

4. Smoothly blend the terrain buffer into the main buffer based on depth

This sounds similar to the method used in BotW, but allows for depth culling since the terrain is rendered first. I'm not familiar enough with Unreal Engine shaders to attempt making it there, but I made a demo in ShaderToy: https://www.shadertoy.com/view/ct3SDN

I disagree personally, but I don't use Obsidian like most people. The majority of my notes just have a couple sentences. I mainly make notes about new project ideas, cool things I find online (eg. a note for each new programming language I discover), and cheatsheets (eg. a bash scripting cheatsheet).

I probably spend 15 minutes total writing in Obsidian each week. I'm not writing down things that I don't have difficulty remembering or things that are very easy to search for online. Obsidian is a place for me to store info that I might want later but would have difficulty finding/remembering again.

I use Obsidian for this exact purpose. Anytime I have an idea, I open up Obsidian, hit ctrl+n for a new note, give it a title, tag it with '#idea', and write whatever I think is nessecary to understand it in the future. Since each idea is a separate file, I won't be tempted to worry about ordering. Obsidian also lets me link related ideas together and it's easy to find an idea again in the future and add some notes to it.

Like the author, I've found that writing down my ideas greatly increases the amount/frequency of new ideas I have. I went from having a decent new idea maybe once a week to now having multiple decent new ideas a day. The problem now is focusing on one idea at a time without getting distracted by all the shiny new ideas.

I disagree with the author's view that any project that isn't used by other people is a waste of time. Does that mean that all homework projects in college are a waste of time? Or that beginner programmers should skip writing simple programs and jump straight into writing a sellable product? Of course not. The point of those projects is to learn, not to make anything that will change the world. If a project is enjoyable to you and you learn something useful from it, then it is not a waste of time.

I used a Levinson[0] for about a year and then switched to a Kyria[1] in August. My Kyria is fully wireless by using two nice!nano microcontrollers and ZMK firmware. I absolutely love small keyboards like this. It takes a couple days/weeks to get used to the positions of everything, but once you do it's amazing. Not having to move your hands/wrists constantly is a game changer. I've ordered PCB's for a Ferris Sweep[2] and plan on building it soon.

[0] https://keeb.io/collections/levinson-keyboard

[1] https://splitkb.com/collections/keyboard-kits/products/kyria...

[2] https://github.com/davidphilipbarr/sweep

SDF Fractal Noise 5 years ago

I'm not the greatest at explaining things, but I'll give it a shot.

Just so everyone is on the same page, an SDF is a function that simply returns the distance to the closest surface for any input point. If the distance is positive, the point is outside of the geometry. If the distance is negative, the point is inside the geometry. The gradient of the SDF is calculated by sampling the SDF across multiple points, so the SDF itself doesn't return a gradient.

An SDF is no longer a valid SDF if the distance isn't the true distance to the closest surface. This is usually caused by transforming the SDF non-uniformly, such as adding a sine wave. Another way to think about this is that a valid SDF is in euclidean space while an invalid SDF is in non-euclidean space. Applying a displacement function will compress and stretch space non-uniformly.

Imagine you have an SDF function that just represents a sphere. Then you transform the vertical position of the sphere based on the absolute value of the horizontal position of the input point. This will turn the sphere into a V shape. However, the SDF is no longer a valid SDF. If you sampled a point next to one of the inner walls of the V shape, it wouldn't return the distance to the wall, it would return the distance to the point on the shape below it.

The gradient for every possible point in a valid SDF will be a unit vector because space is uniform. A non-valid SDF will contain non-unit-vector gradients between areas of non-uniformity.

Hopefully that made sense. If you are still confused, I would suggest writing a simple raymarcher on Shadertoy and playing around with distorting SDFs yourself. A simple raymarcher is only a couple lines of code (probably less than 20 lines of GLSL).