@floooh@mastodon.gamedev.place avatar

floooh

@floooh@mastodon.gamedev.place

This profile is from a federated server and may be incomplete. Browse more on the original instance.

thephd, to random
@thephd@pony.social avatar

Something that bothers me a lot in Python is not really Python's fault but when I use it and make a bug and my brain immediately goes

"Nye heh heh heh, if you just had a type system that wouldn't have happened!"

It's just really hard to argue with "this thing that would have otherwise stopped the build and told you to fix your shit is now a runtime error that manifests under specific conditions with a client" and it's just so much wasted comms 'n' work for an easily-caught problem.

This isn't meant to be type system propaganda or whatever, it just keeps smacking me in the face every time I go work in some dynamic language, and every time it just makes me mad. Like, yeah, I get it, I'm an idiot, but that's why we have the tool.

To cover me being stupid.

floooh,
@floooh@mastodon.gamedev.place avatar

@vitaut @thephd I tried to convert my one big python code base (https://github.com/floooh/fips) to type hints and it was a pain in the ass TBH, because it quickly turns into a "generics-puzzle".

IMHO Python's "journey" towards a "proper" programming language is a dead end, Python shines for quick'n'dirty cross-platform scripting and sloppy glue code (and Python 2.x was just right for that).

mcc, to random
@mcc@mastodon.social avatar

Question for Rust programmers:

When you see this sequence of characters in a Rust program:

|_|

Never mind whether you would ever say it out loud— in your head, what do you think of the name of this sequence of symbols being? Do you have a name for it at all?

I have an answer but I am curious about yours.

floooh,
@floooh@mastodon.gamedev.place avatar

@mcc 'discard' or 'ignore'

floooh,
@floooh@mastodon.gamedev.place avatar

@mcc disclaimer: I'm not actually a Rust programmer, at best an occasional tinkerer

pervognsen, to random
@pervognsen@mastodon.social avatar

Days like today I look at my food log and realize being a fruitarian wouldn't be half bad.

floooh,
@floooh@mastodon.gamedev.place avatar

@pervognsen congrats! I'm currently trending in the opposite direction again and it sucks :D

floooh, to random
@floooh@mastodon.gamedev.place avatar

I just merged a (surprisingly small) PR which adds a NOAPI mode to the sokol_app.h Windows backend:

https://github.com/floooh/sokol/pull/1034

...NOAPI support for other platforms will follow in the future.

floooh,
@floooh@mastodon.gamedev.place avatar

@castano apologies for not merging your original PR btw, but I much prefer to merge in smaller pieces which only each affect a single platform :)

floooh, to random
@floooh@mastodon.gamedev.place avatar

I wonder if @andrewrk just added the "unused variables are errors" Zig feature as a honeypot for drive-by-critics to have a common and easy to identify thing to complain about without ever having used Zig or investing the time to provide constructive feedback :D

In that sense it's very similar to the "WASM can't access the DOM" complaint (which is a non-issue but nonetheless a critic's darling).

floooh,
@floooh@mastodon.gamedev.place avatar

@ewerybody hah, haven't actually seen this, but pretty much every HN or Lobster thread is hijacked with this.

floooh,
@floooh@mastodon.gamedev.place avatar

@ewerybody https://lobste.rs/, invite only though (I'm just lurking)

TomF, to random
@TomF@mastodon.gamedev.place avatar

Computers like the ZX Spectrum had each 8x8 block have 1 bit per pixel, and that 1 bit selects between two colours chosen by an 8-bit attribute. For the Spectrum the attribute had 3 bits for colour 0, 3 bits for colour 1, 1 bit to make them bright, and a completely pointless "flash" attribute.

But what if you had twice as many bits?

Well, you'd have four colours per pixel to choose from, and a 16-bit attribute chunk. So 16/4 = 4 bits per colour. Same as the Speecy. Buuuut....

floooh,
@floooh@mastodon.gamedev.place avatar

@TomF @mcmartin @mogwai_poet the little known East German KC85/4 had 8x1 color attributes, and (best and AFAIK unique feature) a "vertical" linear video memory layout at 320x256 pixels (e.g. 40 columns at 256 rows). Writing 8 consecutive bytes fills an 8x8 pixel block. 8x LDI to blit a character, or 16x LDI to blit a character with color.

The big downside of 8x1 color attributes is of course that you had to move so much more data (the predecessor had 8x4 color attribute blocks).

floooh,
@floooh@mastodon.gamedev.place avatar

@TomF @mcmartin @mogwai_poet ...which let's you do stuff like this in half a PAL frame all done with bruteforce CPU copying (WASM emulator demo here: https://floooh.github.io/kcide-sample/kc854.html?file=demo.kcc)

video/mp4

floooh,
@floooh@mastodon.gamedev.place avatar

@TomF @mcmartin @mogwai_poet PS: also important to note: this thing is clocked at only 1.75 MHz.

A 3.5 MHz KC85/4 would have been a dream, but the 4 MHz Z80 clones were all allocated for "serious" office computers in East Germany :/

floooh,
@floooh@mastodon.gamedev.place avatar

@TomF it would also have helped a lot if Speccy colors were a bit more "diverse". For comparison KC85 again: 3 bits background, 4 bits foreground, 1 bit blinking. The foreground colors were all brighter than the same background color number.

floooh,
@floooh@mastodon.gamedev.place avatar

@TomF btw, the "useless" blinking bit could be used for an interesting "fullscreen effect" on the KC85 (AFAIK not on the Speccy though), because the blink frequency was controlled by a Z80 CTC timer channel. This sets the blink frequency to the duration of somewhere between 4 and 5 PAL scanlines which causes this "running image" effect, all without programmable color palette :)

floooh, to random
@floooh@mastodon.gamedev.place avatar

I merged a metric shitton of PRs over the last few days, mainly related to the Sokol Odin bindings, but also a nice debug feature for D3D11 (debug resource labels are communicated to D3D11), and some warning fixes when compiling the D3D11 backend in GCC. Many thanks to @jakubtomsu and GH user @edubart!

https://github.com/floooh/sokol/blob/master/CHANGELOG.md#13-apr-2024

floooh, to random
@floooh@mastodon.gamedev.place avatar

Interesting but wrong

video/mp4

floooh,
@floooh@mastodon.gamedev.place avatar

@sinbad damn, you're right, Talking Heads basically invented glitch art :D

https://youtu.be/5IsSpAOD6K8?si=L20g3fEJAZUrq_bx&t=120

floooh, to random
@floooh@mastodon.gamedev.place avatar

A side-effect of the current storage-buffer work in sokol_gfx.h:

"Bufferless rendering" will finally be possible, e.g. here's a triangle without any resource bindings:

C: https://github.com/floooh/sokol-samples/blob/storage-buffers/sapp/triangle-bufferless-sapp.c

GLSL: https://github.com/floooh/sokol-samples/blob/storage-buffers/sapp/triangle-bufferless-sapp.glsl

floooh, to random
@floooh@mastodon.gamedev.place avatar

Actually found a use case where C flexible array members are useful:

In GLSL, SSBO structs can have a 'non-repeating header', followed by repeated data. This GLSL struct could map directly to a similar C struct by a shader compiler like sokol-shdc...

This doesn't map to non-C languages though, that's why I will probably not allow such header data, at least when using sokol-shdc.

eiZen, to retrocomputing

/ bubble, are there retro computers which emitted ?

floooh,
@floooh@mastodon.gamedev.place avatar

@eiZen @jermar yes it was PAL, even though East Germany used SECAM for TV broadcasts.

Most (all?) color TVs manufactured and sold in East Germany had dual PAL/SECAM decoders.

andrewwillmott, to random
@andrewwillmott@mastodon.gamedev.place avatar

So, I don't really understand the point of Google search any more.

I just checked back in with it for a search query, for the first time in forever, as I wasn't turning up much with the alternatives I use. (Due to the web slowly collapsing under its own weight, sigh.) The first two pages were solid "sponsored" links trying to sell me something, often from stores that demonstrably have nothing to do with the term, and large pictures of the same thing.

Why bother? The PSNR is terrible.

floooh,
@floooh@mastodon.gamedev.place avatar

@andrewwillmott the worst thing is when you search for regular words or events and Google search just blasts you with products/movies of a similar name. I guess most 'muggles' use Google as exactly that (a shopping guide), but it's infuriating.

It's also interesting because the "western world" and especially the US has been built upon "individual freedom" (dare I say: "extreme individualism"), while Google seems to follow the Chinese/Russian model of "individuals don't matter" :D

GrantMeStrength, to random
@GrantMeStrength@hachyderm.io avatar

In the early 80s there was the belief that AI was just a matter of time. That quickly ground to a halt. But now we’re back! For real this time 🤔

image/jpeg

floooh,
@floooh@mastodon.gamedev.place avatar

@GrantMeStrength just the wheel of (tech hype) reincarnation going round and round ;)

wanninger, to random

Very excited to announce that our paper,

Getting a Handle on Unmanaged Memory
by @wanninger @tommy, Simone Campanoni, and Peter Dinda

has been accepted to ASPLOS 2024!

A preprint is available here: https://nickw.io/papers/asplos24-alaska.pdf

This work enables a runtime to transparently and automatically relocate heap objects in unmanaged languages like C or C++ with no changes to the source code.

We do this using a level of indirection well known in the managed languages world: the handle. We present an LLVM compiler transformation that automatically translates these handles whenever they are used. This indirection allows us to relocate objects freely, which enables heap defragmentation in unmodified C programs like Redis and Memcached.

Looking forward to seeing folks in La Jolla!

floooh,
@floooh@mastodon.gamedev.place avatar

@wanninger @tommy Very interesting! (moving the handle management into the compiler more so than the 'object mobility' feature). Are you aware of tagged handles where the tag is a generation counter for temporal memory safety (aka Generational References)? E.g. see:

https://floooh.github.io/2018/06/17/handles-vs-pointers.html

https://verdagon.dev/blog/generational-references

floooh,
@floooh@mastodon.gamedev.place avatar

@wanninger I wonder if it's feasible to somehow inject user-provided code for creating, 'resolving' (e.g. convert into ptr) and destroying a handle, while keeping the ability of the compiler to track handles and remove redundant 'resolve' calls. Would probably require some serious C attribute magic :)

eiZen, to retrocomputing

Remember: If you can't just draw a line on your screen it's not a "personal" computer at all.

floooh,
@floooh@mastodon.gamedev.place avatar

@isaackuo @eiZen ...the other advantage is that a character can be rendered with an unrolled loop of 8x LDI instructions (LDI copies the byte at address in register DE to the address in register HL and then increments both DE and HL in 16 clock cycles, so an 8x8 character can be blitted in 128 clock cycles.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • InstantRegret
  • ethstaker
  • osvaldo12
  • magazineikmin
  • cubers
  • rosin
  • mdbf
  • Youngstown
  • Durango
  • slotface
  • everett
  • kavyap
  • DreamBathrooms
  • JUstTest
  • thenastyranch
  • tacticalgear
  • cisconetworking
  • provamag3
  • modclub
  • GTA5RPClips
  • khanakhh
  • ngwrru68w68
  • tester
  • megavids
  • Leos
  • normalnudes
  • lostlight
  • All magazines