HN user

zackoverflow

1,410 karma
Posts32
Comments34
View on HN
www.fieldnotes.nautilus.quest 4mo ago

San Francisco's DNA is mischief

zackoverflow
6pts1
www.fieldnotes.nautilus.quest 7mo ago

Kids who ran away to 1960s San Francisco

zackoverflow
158pts46
zackoverflow.dev 8mo ago

Template Interpreters

zackoverflow
3pts1
news.ycombinator.com 1y ago

Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

zackoverflow
355pts631
lang.garden 1y ago

Language Garden

zackoverflow
3pts0
bun.sh 2y ago

Bun’s New Crash Reporter

zackoverflow
368pts80
blog.jwf.io 2y ago

The day open source died

zackoverflow
1pts0
airplanes.pages.dev 2y ago

Fly around the Earth in the browser. whole earth available by Google Maps API

zackoverflow
2pts0
simonschreibt.de 2y ago

Render Hell 2.0

zackoverflow
2pts0
zackoverflow.dev 2y ago

I wrote a Flappy Bird game in TypeScript's type system

zackoverflow
7pts1
phoboslab.org 2y ago

The Absolute Worst Way to Read Typed Array Data with JavaScriptCore

zackoverflow
1pts0
www.youtube.com 3y ago

Building a video game company, depression (talk with Talin/David Joiner)

zackoverflow
7pts1
zackoverflow.dev 3y ago

Zig as an alternative to writing unsafe Rust

zackoverflow
308pts217
www.doc.ic.ac.uk 3y ago

You Can Have It All: Abstraction and Good Cache Performance [pdf]

zackoverflow
1pts1
www.ft.com 3y ago

Fusion energy breakthrough by Livermore Lab

zackoverflow
1065pts801
www.cnn.com 3y ago

Scientists finally know why people get more colds and flu in winter

zackoverflow
19pts5
www.youtube.com 3y ago

The Surprisingly Deep Connection of Math and Biology

zackoverflow
1pts1
ffmpeg.guide 3y ago

Show HN: FFmpeg Command Visualizer and Editor

zackoverflow
279pts50
en.wikipedia.org 3y ago

IP over Avian Carriers

zackoverflow
3pts0
www.youtube.com 3y ago

Visualizing Large Trees Using the Hyperbolic Browser (2021) [video]

zackoverflow
141pts41
www.youtube.com 4y ago

Rasterizer Algorithm Explanation

zackoverflow
3pts0
shop.serokell.io 4y ago

FP merch that doesn't suck

zackoverflow
4pts0
anno.so 4y ago

Show HN: Anno – Effortlessly annotate and comment on videos/audio

zackoverflow
122pts32
github.com 4y ago

Intuitive S-expressions editing for Clojure(Script)

zackoverflow
5pts1
www.youtube.com 4y ago

First 6 years of a life of Clojure project – Jarppe Länsiö

zackoverflow
2pts1
github.com 4y ago

Rust macro that uses GPT3 codex to generate code at compiletime

zackoverflow
3pts0
aussieplusplus.vercel.app 4y ago

Show HN: Aussie++, an Australian programming language written in Rust

zackoverflow
9pts8
soc.me 4y ago

Language Design: Stop Using Angle-brackets for Generics

zackoverflow
4pts0
www.youtube.com 4y ago

Rust's Memory Layout Visualized

zackoverflow
31pts1
www.aosabook.org 4y ago

Audacity – The Architecture of Open Source Applications

zackoverflow
1pts0

This is kinda possible already today with the Kitty graphics protocol, I made a demo here of rendering 3D graphics[1] with kitty. The actual important missing thing (and which ratty seems to also not include) is vsync.

If rendering is not aligned then it's possible for the terminal emulator to read the framebuffer while the application is writing to it, causing visual artifacts.

[1] https://x.com/zack_overflow/status/2035921425341763756?s=20

I recently came across this style of interpreter which V8 and HotSpot use. It works by actually writing the bytecode op handlers in assembly (or some other low-level language) and generating them to machine code, and having a dispatch table mapping bytecode_opcode -> machine code to execute it

I was pretty intrigued. How does it compare to techniques which require way less engineering cost like switch+loop, direct-threaded, and only using tail-calls (https://blog.reverberate.org/2021/04/21/musttail-efficient-i...)?

The main reason seemed to be that both V8 and HotSpot have an optimizing JIT compiler, and having low-level control over the machine code of the interpreter means it can be designed to efficiently hop in and out of JIT'ed code (aka on-stack replacement). For example, V8's template interpreter intentionally shares the same ABI as it's JIT'ed code, meaning hopping into JIT'ed code is a single jmp instruction.

Anyway, I go into more implementation details and I also built a template interpreter based on HotSpot's design and benchmarked it against other techniques.

Note that the context pointer came after the “standard” arguments. All things being equal, “extra” arguments should go after standard ones. But don’t sweat it! In the most common calling conventions this allows stub implementations to be merely an unconditional jump.

I didn't know this. Does this optimization have a name? Where can I read more about it?

Does anyone have any insight on why the PikeVM implementation is slower (it's based on the VM approach described here https://swtch.com/~rsc/regexp/regexp2.html)

I feel like compiling regex to bytecode and executing it should be faster than dealing with big graph like structures with NFAs/DFAs

Also, V8's regex engines are very fast because they get JIT compiled to machine code, so wouldn't bytecode just be one step higher in abstraction, and have worse but similar performance?

Hey HN, I got inspired by a recent hack someone did of creating flappy bird in MacOS Finder, so I tried to do the same with type-level Typescript.

If you don't know, Typescript's type annotations are Turing complete, allowing you to compute anything with some clever type trickery.

In order to render graphics from Typescript's types, I ended up creating a compiler that compiles Typescript's types into bytecode, and a custom VM that can execute that bytecode.

Each frame, the VM takes draw commands from type-level Typescript, and renders it using the configured graphics backend. It can run in the browser by compiling the VM to Wasm and using the web's Canvas API.

I don't do anything related to data science, but I feel like doing it in Rust would be nice.

You get operator overloading, so you can have ergonomic matrix operations that are typed also. Processing data on the CPU is fast, and crates like https://github.com/EmbarkStudios/rust-gpu make it very ergonomic to leverage the GPU.

I like this library for creating typed coordinate spaces for graphics programming (https://github.com/servo/euclid), I imagine something similar could be done to create refined types for matrices so you don't do matrix multiplication matrices of invalid sizes

These "clean code" principles should not, and generally are not, ever used at performance critical code, in particular computer graphics.

I agree that this is mostly true, but maybe not for beginners in the field

When I was reading "Raytracing in One Weekend" (known as _the_ introductory literature on the topic), I was very surprised to see that the author designed the code so objects extend a `Hittable` class and the critical ray-intersection function `hit` is dynamically dispatched through the `virtual` keyword and thus suffers a huge performance penalty

This is the hottest code path in the program, and a ray-tracer is certainly performance critical, but the author is instructing students/readers to use this "clean code" principle and it drastically slows down the program.

So I agree most computer graphics programmers aren't writing "clean code", but I think a lot of new programmers are being taught them because of introductory literature

Interesting that the wiki says that the performance enhancing effect comes from a lower heart rate, which is something you can influence with practice.

You can lower your resting heart rate naturally through exercise over time, and meditation and breathing techniques with practice give you control of your heart rate in the moment.

The active ingredient acetaminophen is anti-inflammatory which is where the reduced anxiety effects come from, perhaps you're not suffering from inflammation enough for it to take effect

I haven't played around much with ffmpeg-python, I used to use fluent-ffmpeg for a bit. They're an improvement over writing raw command strings, but they lack static analysis features to verify the correctness of your command at compile time. There's only so much you can do with the constraints of general programming languages.

I'm going to add the ability to export graphs as ffmpeg-python/fluent-ffmpeg code, and to import a graph from ffmpeg-python/fluent-ffmpeg code as well.

Honestly the pricing was selected kind of on a whim, I actually didn't think anyone would use the project. Will probably update the pricing.

I'm not sure how much information could be extracted from the binary, will need to do some more research. Maybe we could read the strings in the static part of the binary and extract some information.

`ffmpeg -i` prints out the configuration FFmpeg was built with, this mostly will let us know which encoder/decoders/container formats you can use. Will add a feature to parse and interpret that output.

I added an ffmpeg command string parser that converts the command stirng into graph nodes, but I temporarily disabled it to fix an infinite loop bug in my parsing code.

Hey OP here, I spend a significant amount of time generating complex FFmpeg filtergraphs for my project. They can get really long and cumbersome, so I made this tool that lets you visualize and edit them, and generates the FFmpeg command string for you.

It sort of became an IDE/LSP for FFmpeg filters. My biggest problems were having to constantly to flip to FFmpeg documentation and errors in my filters. So I added autocomplete and embedded the FFmpeg docs. It also verifies the correctness of filters/arguments, and does an analysis on the graph to verify connections/etc.

I used to feel the same way, but after learning Haskell I think whitespace is particularly suited for functional programming languages.

For Anno we are using HTML video elements / YouTube embeds which have the same frame inaccuracy from currentTime. For our editor we have a WebGL-based solution that seems to get better frame granularity but still has some floating point rounding errors converting frames <-> seconds

There's also requestVideoFrameCallback() and seekToNextFrame() in the Web APIs but they are still experimental/not supported by all browser. The WebCodecs API is also experimental/not supported to all browsers but would allow you to decode and grab the individual frames from a video and draw them to a canvas

Thanks! It's less about those that consume and more about the creation process, giving feedback/thoughts while working on a video or a song.

Also we use it internally to share looms with our eng team, where we leverage timestamped comments and annotations to enhance the sharing and discussion of ideas

Hey HN, I'm one of the founders of Modfy.video - we just shipped Anno.so which lets you add timestamped comments and annotations (drawings, scribbles, notes) to videos & other media files.

We currently use it to add comments and markup to Loom videos about dev problems we share among our engineering team, it’s been a great help.

Anno.so supports uploaded videos, audio, YouTube videos, Loom videos, SoundCloud audio. It’s free to use with no sign-up required.

This is a project we spun out from a video editor we’re currently working on https://modfy.video if interested.

Sorry you feel that way, it is meant to be a low-brow joke language, but definitely not supposed to feel mean-spirited. The language spec was originally designed by mostly Australians.

https://github.com/louis1001/c---/issues/5

So that gave me the sense that Australians were ok with this type of humor, though I did make some minor adjustments.

I'm open to suggestions for revising the syntax to make it feel like it's less mean-spirited.

This is a little experiment demonstrating the capabilities of the goscript project (https://github.com/oxfeeefeee/goscript) by compiling it to wasm.

Here's the source code (https://github.com/zackradisic/go-playground-wasm) if you would like to look at it and do something similar with your own projects.

I'm really excited for the future of goscript, Go is a great candidate for a scripting language thanks to its minimalistic design choices.