Sterling

251 posts

Sterling banner
Sterling

Sterling

@schulkinator

Code. Graphics. AI. Hardware hacker. Autonomous Driving. EA, Limbic, Supernatural.

Bay Area, CA Katılım Mayıs 2012
638 Takip Edilen164 Takipçiler
Sterling
Sterling@schulkinator·
@KooKiz hey! same here! if i remember correctly screen mode 4 had double buffering. limited color space but at least you could do page flipping
English
0
0
0
30
Kevin Gosse
Kevin Gosse@KooKiz·
I first learned programming on a 80286 with Microsoft Qbasic. Out of curiosity I checked if this wireframe demo would have worked on that hardware (roughly 1500 cycles per second in dosbox). It is way too slow in QBasic 1.1 (interpreted), even in CGA mode. Much better in QuickBasic 4.5 (compiled), though it would need some double-buffering to fix the flickering. Now I'm almost tempted to try in C.
Kevin Gosse@KooKiz

If you missed this video, I strongly recommend watching it. It's a great introduction to 3D graphics, short and easy to understand. I had a lot of fun reimplementing it in Winforms and text mode.

English
24
19
660
64.7K
Sterling retweetledi
tender
tender@tenderizzation·
ZXX
17
207
3.5K
100.6K
Sterling
Sterling@schulkinator·
@chessMan786 yeah this is a problematic diagram for many reasons. you've mixed virtual and physical address space. there's no guarantee that your program will be laid out like this in physical address space. and in virtual address space that ordering is reversed.
English
0
0
0
61
Mohit Mishra
Mohit Mishra@chessMan786·
Win32 Memory Map
Mohit Mishra tweet media
English
8
82
827
29.9K
Sterling
Sterling@schulkinator·
well done sir!
Sterling tweet media
English
0
0
0
55
Sterling
Sterling@schulkinator·
@davepl1968 I'm curious, when you originally implemented this at MS how many other engineers did you talk to for information? There's cases for WOW and permissions quirks. Or did you just research the relevant code? Did you need to give a time estimate before doing this or you just did it?
English
0
0
3
372
Dave W Plummer
Dave W Plummer@davepl1968·
Ever wonder how Task Manager kills a process? Here's the actual code... It's 30 years old now! The only magic sauce is that I enable the SE_DEBUG_NAME privilege before attempting to call TerminateProcess, which makes it a fair bit more deadly...
Dave W Plummer tweet media
English
84
164
2.4K
108.1K
Sterling
Sterling@schulkinator·
@Hasen_Judi caching saves some computation, but the rest of the graphics pipeline still had to rasterize/rewrite all those pixels. for games that's fine. but retained UI skips all of that and lets it sit in the framebuffer, thats why dirty rects are a thing. minimize what the hardware does
English
1
0
1
55
Sterling
Sterling@schulkinator·
@Hasen_Judi It has always bothered me that immediate mode UI is re-rendering everything from scratch every frame. seems really wasteful computationally and energy-wise. React sits at a good inbetween.
English
5
0
3
427
hasen
hasen@hasen_95dx·
Immediate Mode API is obviously the right approach for GUI programming. The success of React in large part is due to it approximating this ideal. Instead of fiddling around with objects representing widget elements, you just describe what the UI should look like. React does not go far enough though, and that's where all of its problems come from. React fails to handle input "events" in immediate mode style, relying instead on callbacks. Callbacks are closures so their references are not stable across rendering cycles -> leading to performance problems and awkwardness writing the code. To this day most programmers don't know how to write callbacks in a way that does not create needless DOM updates. React does not want to re-render the entire DOM structure every frame, so it comes with a mechanism to selectively update only a portion of the DOM at a time, on an as-needed basis. This means that "state" that influences UI has to be a "special" kind of state. You can't just have a global variable like `let username = "..."` and then have it be reflected in the UI. You have to use a `let [username, setUsername] = useState("....")` hook, and the UI will update if you call `setUsername(...)`. This is very awkward and makes state management really weird and have many edge cases. In short: - The things that React got right come from embracing certain aspects of Immediate Mode APIs - All of Rect's short comings come from not going far enough into Immediate Mode style.
English
25
4
126
13.2K
Sterling
Sterling@schulkinator·
@esrtweet I had a 286 PC in the early 90's that did not have a soundcard. I would occasionally buy demo disks for it. One of the disks had a program that played actual music from the PC speaker! I almost fell out of my chair when I heard it. There was nothing like that back then.
English
0
0
1
81
Eric S. Raymond
Eric S. Raymond@esrtweet·
I was reminded today of a byway in my past - the wandering speaker driver. Long, long ago, in the mid-1980s before sound cards, I ran across an article in a PC magazine describing how to write a device driver for the PC console speaker, an anemic device meant mainly for issuing post beeps that could be tortured into admitting rather buzzy notes. I had a use case for this. I was working on Nethack at the time, and I thought it would be neat to be able to use the PC speaker to add sound effects to the game. This was 1985-86 and sound cards didn't exist yet. So I figured out how to write a device driver for the console speaker that would run on System V Unix. You see, Linux didn't exist yet either, and wouldn't for another 5 years. I succeeded. If you were playing Nethack in the right year, on hardware that had my driver installed, it would actually play music. Well...using the term "music" loosely. (I was also the guy who added color support to the game. That was back when color support on a display was still a big deal.) The neatest feature of my driver was that it created a character device you could ship strings to that would play tunes. I deliberately cloned the sound mini-language in IBM basic, which was actually rather cleverly designed. I shipped it, didn't think much about it, and lost track of the code. Years later I found out it had been incorporated in the open source BSDs. Annoyingly, they stripped out the feature I really enjoyed writing, which was the character device. Their version could only be activated by ioctl calls. Boring! It was never in Linux as far as I know. By the time Linux happened sound cards had already been a thing for a couple years, and the kernel guys just concentrated on driving those. I'm told most PCS don't even have console speakers anymore. Completely reasonable when they all have speaker jacks and sound synthesizers that don't suck.
English
26
10
202
10.3K
Sterling
Sterling@schulkinator·
@Jonathan_Blow I've had folks ask me why I like to build everything myself. if it breaks i know how to fix it! its not a blackbox
English
0
0
0
264
Jonathan Blow
Jonathan Blow@Jonathan_Blow·
Some people might read this and think, that's just not my world, I am stuck in this world where software breaks all the time and everything I build is disposable. Even if that is kind of the case for you, there is still good news, because this isn't an all-or-nothing problem. It's a dial that can be turned; you can turn that dial in a direction that reduces flailing and results in more-stable long-term progress. You don't have to remove all the dependencies, because every dependency you remove contributes to stability. Even getting rid of 1/3 of your dependencies can do amazing things. You can look at all the things you depend on and divide them into two categories: major and minor. Major dependencies are things that, realistically, you are never going to have your own version of. I am never going to make my own graphics API, so those count as major dependencies for me (DirectX12, Vulkan, Metal, etc). I am not going to write my own CPU-side font rasterization, so anything I choose to use there (FreeType, stb_truetype) goes in that category. With Major Dependencies, you limit your contact surface with them: You call only the functions you really need, and you do this only from the surface of your program -- you don't build data structures deep into your program that propagate the particular data structures or API decisions of any of these systems. A good API author will help you do this (stb_truetype), a bad API author will be trying as hard as they can to screw you up and force you to become tied to their system forever (anything from Microsoft or Apple). Understanding that many API authors are hostile can cause a big change of perspective here, and once you see it, the correct tactics become much more obvious. So, that's the major dependencies. Minor dependencies are things that are smaller, and that you want to use much more thoroughly throughout your program: for systems programmers this might be a data structure like an expanding array or hash table, for Web, maybe there are some string or file operations that you like to do. Minor dependencies can be eliminated and it's not even hard. You just do one at a time: hey, I need this data structure, I have been importing this other code to provide that functionality, I have suffered X, Y and Z problems because of this, how about if I just implement my own simple version of this one thing? People can get scared of implementing core stuff like this, because they look at the implementation they are using now, and it looks huge and complicated and hard to reproduce. But the thing to realize is most of this implementation is spam. It is mostly doing things for people who are not you, for reasons you don't necessarily agree with, chosen by a decision-making method that is deeply flawed. Your own implementation can be cleaner and smaller, and it can give you good feelings when you go look at it. You don't need all the functionality of the thing you are importing; you only need 8% of the functionality. Implementing that is easy. Once you do this a few times, you have your own stable body of code that you bring with you from project to project. It won't break unless you mess with it. You can keep improving it if you want, incrementally over time, but the cost of this is small because this code represents stable algorithms that don't change with fashion, so work on this is never forced. Every big company has their own internal version of this, but the problem in that scenario is that a big company is full of people who want different things, and have varying levels of decision-making skill, so these usually end up not so good. But when it's your own personal thing, it can in fact be very good, and help make you happy on a daily basis. And, your software will break much less often. Which is great. @NotAShelf @ThePrimeagen x.com/Jonathan_Blow/…
English
43
183
1.6K
101.6K
Sterling
Sterling@schulkinator·
@SebAaltonen yeah i could see a future where "code files" are just plain txt files and diagrams that get fed into an AI compiler and the code coming out then gets fed into an actual compiler.
English
0
0
0
91
Sterling
Sterling@schulkinator·
@GamersNexus i suppose nvidia could just put out a driver patch that reports the "correct" ROPs and no one would know.
English
2
0
0
831
GamersNexus
GamersNexus@GamersNexus·
If you have an RTX 5090 or RTX 5070 Ti with fewer ROPs than are supposed to be on the card, we are putting a bounty out. We will pay you the cost on your receipt + $500 USD. Applies to both. Email tips at gamersnexus dot net. We will cover your total receipt cost for the device, including shipping and your local taxes you paid, as well as shipping to us. Correct values are 176 on 5090 and 96 on 5070 Ti. If you see 88 on a 5070 Ti or 168 on a 5090, then you are affected. AFTER installing GPU drivers, you can install GPU-Z and check the first tab to see the ROPs count.
English
94
338
3.2K
152.3K
Dave W Plummer
Dave W Plummer@davepl1968·
Back in the 90s, Microsoft rewrote the graphics library, GDI32, in C++. The C++ version had issues with memory footprint and resource cleanup that were difficult to resolve, and long story short... it didn't work out.
tuōmo@7uomoki

linus torvald on C++ 😅

English
89
165
2.6K
358.7K
Sterling retweetledi
Panos Karabelas
Panos Karabelas@panoskarabelas·
Panos Karabelas tweet media
ZXX
8
63
1.2K
30.3K
Sterling
Sterling@schulkinator·
Something is extremely suspicious about this 5090 launch, as usual. I refresh the page to try to buy a 5090 right on time and everything is sold out immediately or not even there. nvidia had no listings. newegg had no listings either until several minutes after "out of stock"
English
4
1
13
2.3K
Sterling
Sterling@schulkinator·
@AThinksAloud Thats awesome! I had a similar experience! I drew ideas for toys when I was a kid and sent them in to Tyco Toys. they told me to find an agent and gave me a list. i sent the ideas to the agent. Months later my ideas were sitting on the toy shelves! (i got no $ for it but still!)
English
11
3
105
15.6K
A 🌸
A 🌸@AThinksAloud·
Oooops, I forgot to tell you what happened! Yes, I found an agent. You have no idea how hard it was to find people before Google existed, but it helped that I lived in So Cal and everyone knew someone in show biz. I resubmitted the scripts via my new writing agent, and got a letter from the desk of Lorne Michaels informing me that “I regret to inform you that your work was reviewed at a table read, but not selected for our show. Please try again.” I never tried again. Sometimes I wonder if I should have, but I was just all over the place in my early 20s, after high school. I got into music, started singing and playing and performing and was submitting my songs for radio contests while I was in college. Ultimately, I chose the more conventional and “safe” path to earning a living. I never really felt like I was a good enough artist to make a living at it, but I never really tried, so I guess I’ll never know.
English
98
54
6.2K
415.5K
A 🌸
A 🌸@AThinksAloud·
I wrote sketches for Saturday Night Live when I was in high school, and SNL called my house. I didn’t have a cell phone and was at some beach party, so my dad answered the phone and thought it was a prank call. It took the woman a few minutes to convince my dad it was real. He didn’t even know I wrote scripts and mailed them in, because I didn’t tell anyone. 😂
English
123
637
27.8K
2.3M
Sterling
Sterling@schulkinator·
@theo you can do all those things with symlinks!
English
0
0
0
29
Theo - t3.gg
Theo - t3.gg@theo·
Building a Google Drive clone and it's pushing my disdain towards file systems to an all time high. "Folders" are an arbitrary way to organize files. There are so many weird behaviors we just take for granted. Why can't a file be in another file? Why can't a folder have two parents? Why can't I filter for files that exist in two different folders?
English
345
47
2.5K
436.1K