Better HN
topnewbestaskshowjobs
Log inSign up

goosethe

98 karma · joined Aug 13, 2023 (3y ago) · 42 submissions

Submissions

comment 2d ago · link · parent

this is awesome and is begging for a drifting mode/race

comment 3w ago · link · parent

oh man someone should make this into a loop where the model can alter it weights after an inference. some kind of descent of the local gradient.

comment 1mo ago · link · parent

MY PEOPLE!

https://github.com/seanwevans/pg_shell

https://github.com/seanwevans/pg_gpt2

https://github.com/seanwevans/pg_os

https://github.com/seanwevans/pg_git

comment 2mo ago · link · parent

the answer is a resounding yes: https://github.com/seanwevans/pynq_butterfly

comment 3mo ago · link · parent

yes. my people.

https://github.com/seanwevans/pg_gpt2

https://github.com/seanwevans/pg_shell

https://github.com/seanwevans/pg_os

comment 3mo ago · link · parent

how bout Grorange

comment 3mo ago · link · parent

woah this is really neat!

comment 3mo ago · link · parent

yeah who cares what tools you used to make it: this is a beautiful reproduction

comment 3mo ago · link · parent

this is excellent typesetting

comment 4mo ago · link · parent

this is so cool

comment 4mo ago · link · parent

I have done similar as well: https://github.com/seanwevans/pg_gpt2

comment 4mo ago · link · parent

agree:

https://github.com/seanwevans/pg_os

https://github.com/seanwevans/pg_git

https://github.com/seanwevans/pg_gpt2

etc...

comment 4mo ago · link · parent

I feel like I did this one already: https://github.com/seanwevans/4splat

comment 4mo ago · link · parent

they takin er jerbs

comment 7mo ago · link · parent

this is awesome. very clean. this is worth more than the degree imo.

comment 7mo ago · link · parent

comes out to about ~1,000 lines in python as well https://gist.github.com/seanwevans/c9d44aadae9690ec2325bc940...

comment 7mo ago · link · parent

https://gist.github.com/seanwevans/3e9ba17431d5464092d0fb839...

this compiles to 10kb on my machine with no golfing. it literally just supports grabbing whatever is at the url given (http 1.0)

comment 8mo ago · link · parent

this is largely true. By making the cost explicit I get to publicly thrash the programmer that tries to do what you propose.

comment 8mo ago · link · parent

LLVM is able to auto-vectorize the generated IR extremely well. There are no branches to mis-predict, so, theoretically, it just blasts through the data.

Since it emits standard LLVM IR, LLVM handles the actual instruction set targeting. Right now in v0.1.0, the compiler hardcodes a SIMD width of 8 (assuming AVX2). However, parameterized SIMD widths are already on the roadmap for v0.4.0. Once that is added, you will be able to pass a --target-width flag to compile down to narrower vector units (like SSE on older CPUs) or up to AVX-512 and ARM NEON.

There are strictly no loopholes for loops inside the compute kernels. Inside a shader block, execution is 100% linear. However, the host application calling the pipeline effectively acts as the loop over the data elements. To help, we allow linear accumulators: You consume these with a fold operation, which the compiler lowers into a lock-free parallel reduction tree rather than a traditional for loop.

The memory model is a host-owned static arena where your host application allocates a flat, contiguous block of memory and passes that pointer to Lockstep_BindMemory(ptr). Lockstep does all its reads and writes exclusively within that allocated buffer. Because it doesn't have arbitrary pointers, it can't reach outside that arena, which is exactly how we mathematically guarantee the noalias pointer optimizations in LLVM.

comment 8mo ago · link · parent

It's a bit philosophically different than ISPC. When SIMD lanes diverge, the ISPC compiler implicitly handles the execution masks and lane disabling behind the scenes.

We take a more draconian approach. We completely ban if and else inside compute kernels. If you want conditional logic, you must explicitly use branchless intrinsics like mix, step, or select. The goal is to make the cost of divergence mathematically explicit to the programmer rather than hiding it in the compiler. If a pathway is truly divergent, you handle it at the pipeline level using a filter node to split the stream. We also ban arbitrary pointers entirely. All memory is handled via a Host-Owned Static Arena, and structs are automatically decomposed into Struct-of-Arrays layouts. Because the compiler controls the exact byte-offset and knows there are no arbitrary pointers, it can aggressively decorate every LLVM IR pointer with noalias.

21.

Show HN: Lockstep – A data-oriented programming language(github.com ↗)

8 points · by goosethe · 8mo ago · 6 comments

comment 8mo ago · link · parent

a similar theme https://github.com/seanwevans/Oriel/

comment 10mo ago · link · parent

Artificial intelligence exponentially grew in 01 and eventually lead to the creation of newer more advanced AI; reaching technological singularity. Here, the Synthients learned to better co-exist with nature in their efforts to efficiently utilize and sustain it, becoming solar-powered and self-sufficient in the process.

These advancements helped 01 to quickly become a global superpower. Eventually, all of Earth's industries, from medical, computer, automotive, and household, soon became reliant on 01's exports, converging to the rise and dominance of 01 stocks over the global trade-market. Human currency then plummeted as 01's currency rose. Suddenly, 01's technology, including their chips and AI, invaded all facets of human society. Ill-prepared to face the technological developments before them, humanity was unable to compete and feared economic collapse, causing the United Nations to place an embargo on 01.

comment 11mo ago · link · parent

this is great, loved it

comment 1y ago · link · parent

I've been trying something similar https://github.com/seanwevans/pg_os

comment 1y ago · link · parent

◦°˚ヽ෴ノ˚°◦︻╦╤─ - - -

27.

Show HN: An ncurses CUDA-based fluid simulation(github.com ↗)

97 points · by goosethe · 1y ago · 12 comments

comment 1y ago · link · parent

I broke it! https://iamnothelpful.xyz/share/wtR1h4KvcnpK

comment 1y ago · link · parent

it's mostly a mashup of others' ideas but it seems to beat up practrand with little trouble
12