more
This commit is contained in:
1 parent
b41b342760
commit
8b0963c67f
11 files changed
+685
No files matched your search
+71
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: "Evening project - building a spiritual successor language to what could pass as a replacement for C64 boot BASIC boot but on a x86-64 machine ..."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/NOTimothyLottes/status/2099688997194711371"
|
||||
author: "NOTimothyLottes"
|
||||
handle: NOTimothyLottes
|
||||
post_id: "2099688997194711371"
|
||||
date: 2026-09-15
|
||||
archived: 2026-09-15
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- NOTimothyLottes
|
||||
description: "Evening project - building a spiritual successor language to what could pass as a replacement for C64 boot BASIC boot but on a x86-64 machine ..."
|
||||
in_reply_to: ""
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/NOTimothyLottes/status/2099688997194711371
|
||||
- Author: NOTimothyLottes (@NOTimothyLottes)
|
||||
- Posted: 2026-09-15 02:37:21
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** **@NOTimothyLottes** ^2099688997194711371
|
||||
|
||||
Evening project - building a spiritual successor language to what could pass as a replacement for C64 boot BASIC boot but on a x86-64 machine ...
|
||||
|
||||
**2/** **@NOTimothyLottes** ^2099690063755870582
|
||||
|
||||
Constraints
|
||||
(1.) Must directly interpret from ascii txt
|
||||
(2.) Must be tiny, core language fits in a few hundred bytes [fraction of I$]
|
||||
(3.) Sticking with similar double character max string size for 'variable' name
|
||||
(4.) But swapping BASIC for something FORTH like instead
|
||||
|
||||
**3/** **@NOTimothyLottes** ^2099690978298786054
|
||||
|
||||
I'm using 128-bytes for ascii reordering (so 0-F is 0-F, etc). Doing a byte[128] sized lookup for the interpreter which gets converted to a jump table for 7-bit characters. So each character is a branch, and likely some get predicted (like when using hex literals).
|
||||
|
||||
**4/** **@NOTimothyLottes** ^2099691470043103730
|
||||
|
||||
Yet this language is actually a serious effort, something trivial to understand, and powerful enough to use for system level scripting (doing syscalls) and function as a macro assembler for CPU+GPU code. Also something fast enough to be effectively free for iteration-time
|
||||
|
||||
**5/** **@NOTimothyLottes** ^2099692261399248990
|
||||
|
||||
I've got a crazy useful system for comments,
|
||||
ThisPartIsIgnored_gg
|
||||
The _ clears the string (prefix comment)
|
||||
The 'gg' is the physical index to the dictionary entry
|
||||
So it's possible to comment all the abbreviations
|
||||
|
||||
**6/** **@NOTimothyLottes** ^2099693204312404281
|
||||
|
||||
Tooling is just writing it out in binary form.
|
||||
I use https://defuse.ca/online-x86-assembler.htm#disassembly to grab disassembly bytes to write into a hex stream. And https://ref.x86asm.net/coder64.html for x86-64 opcode reference.
|
||||
|
||||
**7/** **@NOTimothyLottes** ^2099693914085016007
|
||||
|
||||
Probably going to merge this into my prior effort for a Linux self modifying binary, as it's language. Then just need to build out the in-binary editor for a complete working dev platform for Linux x86-64 that fits in a few KiB.
|
||||
|
||||
**8/** **@NOTimothyLottes** ^2099694772260675908
|
||||
|
||||
The x86-64 self modifying binary shell with not the smallest ELF header is currently clocked in at 290 bytes. So yeah not joking, a full hardcore Linux dev env in a few KiB (language, editor, debugger).
|
||||
|
||||
**9/** **@NOTimothyLottes** ^2099695168253284559
|
||||
|
||||
The irony being this would be portable, no library support, everything in raw system calls. So will need to roll over my prior user-space AMD compute GPU driver as well.
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: "Exploring minimum size compilers on x86-64, specifically branch-free logic (one predicted jnz to loop per input token)."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/NOTimothyLottes/status/2103076419379339498"
|
||||
author: "NOTimothyLottes"
|
||||
handle: NOTimothyLottes
|
||||
post_id: "2103076419379339498"
|
||||
date: 2026-09-24
|
||||
archived: 2026-10-06
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- NOTimothyLottes
|
||||
description: "Exploring minimum size compilers on x86-64, specifically branch-free logic (one predicted jnz to loop per input token)."
|
||||
in_reply_to: ""
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/NOTimothyLottes/status/2103076419379339498
|
||||
- Author: NOTimothyLottes (@NOTimothyLottes)
|
||||
- Posted: 2026-09-24 10:57:46
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** **@NOTimothyLottes** ^2103076419379339498
|
||||
|
||||
Exploring minimum size compilers on x86-64, specifically branch-free logic (one predicted jnz to loop per input token). A minimum forth-like language can be built with a 17-instruction/token loop. Source uses {2-bit tag, 14-bit dictionary index}.
|
||||
|
||||
**2/** **@NOTimothyLottes** ^2103078363422146662
|
||||
|
||||
So the instructions of the compiler itself fits on one x86-64 cacheline, less than 64 bytes total.
|
||||
|
||||
**3/** **@NOTimothyLottes** ^2103079055113195747
|
||||
|
||||
From a data perspective, it's 16384 entry dictionary that contains direct 32-bit chunks of pre-compiled instructions that can be spiced together.
|
||||
|
||||
**4/** **@NOTimothyLottes** ^2103079963658469860
|
||||
|
||||
2-bit tag/token,
|
||||
00 : write value from dictionary 'V'
|
||||
01 : write V-nextInstructionPointer (for call/jmp)
|
||||
02 : ignore (for comments)
|
||||
03 : write instructionPointer into dictionary (for define)
|
||||
|
||||
So like a direct mapped tiny color-forth
|
||||
|
||||
**5/** **@NOTimothyLottes** ^2103081099068899412
|
||||
|
||||
Haven't timed code generation speed, but it's probably peaks around 1/2 GB/sec of code gen on a 2 GHz x86-64. Meaning fast enough to support recompiling the whole program each frame if you wanted to.
|
||||
|
||||
**6/** **@NOTimothyLottes** ^2103082320853094619
|
||||
|
||||
Designing the language around making something forth-like to be the macro assembler for GPU binary generation, but also fast enough to be the entire x86-64 code as well. Meaning can do x86-64 assembly too for important raw loops.
|
||||
|
||||
**7/** **@NOTimothyLottes** ^2103083570550223191
|
||||
|
||||
Apparently AMD's Zen line doesn't have sub-register stalls like Intel, so one can take advantage. Also used the 2-for-1 {SAR ax,15} trick, which produces a full 0/~0 mask along with putting the last shifted out bit 14 in CF. Quite useful for branch-free logic (like cmovCC ops).
|
||||
|
||||
**8/** **@NOTimothyLottes** ^2103084229420597601
|
||||
|
||||
x86-64 is actually really poor ISA for branch-free logic for many reasons, like cmovCC doesn't have an IMM operand form so you burn registers for immediate constants, and not having a separate destination register means extra MOVs to duplicate, with some exceptions like LEA.
|
||||
|
||||
**9/** **@NOTimothyLottes** ^2103084603682562173
|
||||
|
||||
Anyway this whole system was another exploration of a minimal x86-64 based setup. Last I was trying a text interpretered one (with branches), and I think this new one is substantially better.
|
||||
|
||||
**10/** **@NOTimothyLottes** ^2103085001730658640
|
||||
|
||||
There is also a lot of nice things about working in Linux and having the easy ability to guarantee code/data in the lower 32-bit address space. This is for no-library execution (meaning only kernel interfaces, including for the GPU).
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: "@NOTimothyLottes Funny that they say \"actual fp32 compute\"."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/SebAaltonen/status/2106630618859639291"
|
||||
author: "Sebastian Aaltonen"
|
||||
handle: SebAaltonen
|
||||
post_id: "2106630618859639291"
|
||||
date: 2026-10-04
|
||||
archived: 2026-10-06
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- NOTimothyLottes
|
||||
description: "@NOTimothyLottes Funny that they say \"actual fp32 compute\"."
|
||||
in_reply_to: ""
|
||||
parent_post_id: "2106566586819609002"
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/SebAaltonen/status/2106630618859639291
|
||||
- Author: Sebastian Aaltonen (@SebAaltonen)
|
||||
- Posted: 2026-10-04 06:20:53
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** **@SebAaltonen** ^2106630618859639291
|
||||
|
||||
**@NOTimothyLottes**
|
||||
|
||||
Funny that they say "actual fp32 compute". Meaning without the second ALU pipe, like it would be useless. Double ALU rate isn't useless, even if it requires pairing and even if it only makes games 20% faster on average. And they use the single ALU pipe math in their ALU/BW chart.
|
||||
|
||||
**2/** **@SebAaltonen** ^2106631423306195057
|
||||
|
||||
**@NOTimothyLottes**
|
||||
|
||||
The reason we don't see higher gain from the second ALU pipe is that there's so many shaders that are bound by samplers or memory. ALU/BW rate is already going down 42%, even with double ALU pipes, and that's the problem right there. Lots of BW bound shaders.
|
||||
|
||||
**3/** **@LeviathanGamer2** ^2106649813001314342
|
||||
|
||||
**@SebAaltonen** **@NOTimothyLottes**
|
||||
|
||||
Here is also the Dual-issue supporting instructions on RDNA3 onwards, which is quite limited:
|
||||
|
||||

|
||||
|
||||
**4/** **@LeviathanGamer2** ^2106650148780536074
|
||||
|
||||
**@SebAaltonen** **@NOTimothyLottes**
|
||||
|
||||
Here is CDNA5. So far driver side this is identical for RDNA5. They have a new encoding VOPD3 as well as expanded VOPD:
|
||||
|
||||

|
||||

|
||||
|
||||
**5/** **@SebAaltonen** ^2106736298186944626
|
||||
|
||||
**@LeviathanGamer2** **@NOTimothyLottes**
|
||||
|
||||
Yeah. AMD chose manual dual-issue. Leans 100% on ILP. While Nvidia chose 100% TLP. Second pipeline runs different wave. Feels like history repeating (VLIW vs SIMT back in the day).
|
||||
|
||||
**6/** **@SebAaltonen** ^2106736928951304342
|
||||
|
||||
**@LeviathanGamer2** **@NOTimothyLottes**
|
||||
|
||||
But Nvidia’s approach to double FP ALU pipes didn’t provide more than 30% average gains in games either. Most game shaders are not heavily ALU bound. Or there’s not enough parallelism, especially below 4K resolution.
|
||||
|
||||
## Related
|
||||
|
||||
- Spine: [[archive/threads/NOTimothyLottes/2026-10-04-thread-serious-talk-on-steamdeck-2-speculation]]
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
---
|
||||
title: "Thread: Serious talk on SteamDeck 2 speculation starting with numbers based on the nice summary here https://www.youtube.com/watch?v=QSg5pjkcg9E - TLDR, actually this is exciting if true."
|
||||
type: archive
|
||||
source: twitter
|
||||
source_url: "https://x.com/NOTimothyLottes/status/2106566586819609002"
|
||||
author: "NOTimothyLottes"
|
||||
handle: NOTimothyLottes
|
||||
post_id: "2106566586819609002"
|
||||
date: 2026-10-04
|
||||
archived: 2026-10-06
|
||||
draft: false
|
||||
tags:
|
||||
- archive
|
||||
- twitter
|
||||
- NOTimothyLottes
|
||||
description: "Thread: Serious talk on SteamDeck 2 speculation starting with numbers based on the nice summary here https://www.youtube.com/watch?v=QSg5pjkcg9E - TLDR, actually this is exciting if true."
|
||||
in_reply_to: ""
|
||||
---
|
||||
|
||||
## Source
|
||||
|
||||
- URL: https://x.com/NOTimothyLottes/status/2106566586819609002
|
||||
- Author: NOTimothyLottes (@NOTimothyLottes)
|
||||
- Posted: 2026-10-04 02:06:27
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** **@NOTimothyLottes** ^2106566586819609002
|
||||
|
||||
Thread: Serious talk on SteamDeck 2 speculation starting with numbers based on the nice summary here https://www.youtube.com/watch?v=QSg5pjkcg9E - TLDR, actually this is exciting if true.
|
||||
|
||||

|
||||
|
||||
Branches: [[archive/threads/NOTimothyLottes/2026-10-04-thread-serious-talk-on-steamdeck-2-speculation/2026-10-04-SebAaltonen-funny-that-they-say-actual-fp32-compute-meaning]]
|
||||
|
||||
**2/** **@NOTimothyLottes** ^2106568550907552156
|
||||
|
||||
Lets talk 2 configurations based on Moore's Law is Dead (MLID) and The Phawx speculation numbers,
|
||||
|
||||
Estimated SteamDeck 2/
|
||||
RDNA3.5 3.2 GHz * 12 CU = 38.4
|
||||
|
||||
MLID estimate of another handheld
|
||||
RDNA5 1.2-1.65 GHz * 16 CU = 19.2-26.4
|
||||
|
||||
Given that estimated comparison, I'd go Deck2
|
||||
|
||||
**3/** **@NOTimothyLottes** ^2106569141523980382
|
||||
|
||||
SteamDeck has historically had rather amazing power slosh ability - if they keep this with the Deck2 and focus on higher peak clocks, it will be easy to get the CPUs to idle and actually leverage what the GPU can do!
|
||||
|
||||
**4/** **@NOTimothyLottes** ^2106569394864148635
|
||||
|
||||
As for ALU:BANDWIDTH, I'll be ALU-bound, so it's ok to be thin in the bandwidth department IMO.
|
||||
|
||||
**5/** **@NOTimothyLottes** ^2106570564768862394
|
||||
|
||||
As for RDNA 3.5 vs RDNA 5 - no plublic RDNA 5 ISA guide yet. RDNA 3.5 already has the one interesting thing of scalar FP32 ops. MLID says 40-50% more "raster" for RDNA 5 vs 3.5, but I doubt it. 3.5 already has dual issue FP32. Where you going to find 50% more IPC?
|
||||
|
||||
**6/** **@NOTimothyLottes** ^2106571626569711985
|
||||
|
||||
Can easily push near 100% VALU issue on prior RDNA architectures before dual FP32 issue. With dual FP32 issue (3.5 has), get some amount above that of effective IPC. The next logical evolution is polishing some of the dual corner cases, but that won't bring 50% IPC in practice.
|
||||
|
||||
**7/** **@NOTimothyLottes** ^2106572522846147019
|
||||
|
||||
RT is effective useless on bandwidth and cache constrained portable. And ML scaling is crap. So whatever RDNA5 brings to the table for RT and ML is simply more static parasitic power draw.
|
||||
|
||||
**8/** **@NOTimothyLottes** ^2106573070970306793
|
||||
|
||||
In the end if the rumored Deck 2 specs are true, in optimized code like what I'd do, you'd see a 3x realized perf increase. And that would be way better than any RDNA5 portable that didn't have matching clock*CU count capability.
|
||||
|
||||
**9/** **@NOTimothyLottes** ^2106573791384215909
|
||||
|
||||
IMO Valve would be genius to just ship the same 800p OLED. A 3x ALU perf boost with no need to push 2x or more pixels, would make devs quite happy, something that actually feels quite a bit faster.
|
||||
|
||||
**10/** **@NOTimothyLottes** ^2106574254456111306
|
||||
|
||||
But I'd expect the obvious mistake of going to 1080p or 1440p. And I'd mitigate that with a CRT emulation scaling to simulate a lower resolution display. That would be a little perf tax, but nothing horrible like an ML TAA pass.
|
||||
|
||||
**11/** **@NOTimothyLottes** ^2106578083260289486
|
||||
|
||||
The real danger that this possible Deck 2 presents is this: it's Linux, you don't have to use Vulkan, you can go direct to the kernel driver. Someone could use AI to write a PS5 shader binary to RDNA 3.5 binary translator, and then do direct emulation of system libraries.
|
||||
|
||||
**12/** **@NOTimothyLottes** ^2106579520711242085
|
||||
|
||||
If Deck 2 would release with similar sales as Deck 1, it's past the threshold of being interesting for a single indie for a to-the-metal non-portable game too, ie something going direct to the kernel drivers with assembly shaders.
|
||||
|
||||
**13/** **@NOTimothyLottes** ^2106580194249281995
|
||||
|
||||
Also one has to wonder this, if the AI slop-gramming tools are as good as people claim they are, why use C? why use Vulkan? Why not just slop-gram direct to assembly on GPU? Challenge someone to go there.
|
||||
@@ -152,3 +152,6 @@ tags:
|
||||
- [[archive/threads/NOTimothyLottes/2026-08-26-tech-overlords-have-long-since-realized-just-like]]
|
||||
- [[archive/threads/NOTimothyLottes/2026-08-27-thinking-about-visible-pipelining-in-the-isa]]
|
||||
- [[archive/threads/NOTimothyLottes/2026-09-04-nothing-changes-the-physical-reality-of-the]]
|
||||
- [[archive/threads/NOTimothyLottes/2026-09-15-evening-project-building-a-spiritual-successor]]
|
||||
- [[archive/threads/NOTimothyLottes/2026-09-24-exploring-minimum-size-compilers-on-x86-64]]
|
||||
- [[archive/threads/NOTimothyLottes/2026-10-04-thread-serious-talk-on-steamdeck-2-speculation]]
|
||||
Reference in new issue
Block a user