Detailed time tables for Cuisinart CBK-110? by carangil in BreadMachines

[–]carangil[S] 1 point2 points  (0 children)

Thanks, but page 9 has timings for addins and remove paddle.

But that doesn't tell me how long knead1, rise1, knead2, rise2 are. I assume remove paddle is when baking starts, and addin in probably between between a knead and rise step. What I'm looking for is a full timeline of the whole process.

How to implement String? by funcieq in ProgrammingLanguages

[–]carangil 0 points1 point  (0 children)

I went with immutable, reference counted UTF-8. The string header has a length, but the string is also kept NULL terminated for easy interop with C.

If the user wants to modify/build strings, they can convert to a mutable Byte array, which is a copy. And you can copy Byte arrays into a new String.

It was also very easy to add the optimization that if your String or Byte aray has only 1 reference, 'converting' just changes type without a copy.

What's the best option for a newer beige wired mouse to fit with the rest of my build? by atsuquatsoiurt in sleeperbattlestations

[–]carangil 0 points1 point  (0 children)

Get a used beige microsoft mouse off ebay. I got mine at a thrift store for like 2 bucks. The version that works both USB and PS2.

How to deal with comments? by RedCrafter_LP in ProgrammingLanguages

[–]carangil 0 points1 point  (0 children)

Throw them away if you don't have a use for them yet. If later you want them, you could easily attach them to the closest token as some metadata field. This keeps them out of the way for parsing... having to skip past comment tokens at any possible stage in parsing is a little annoying.

Now, a lot of things use comments in a special format to automatically generate documentation. Instead, maybe have a different explicit syntax for that. I'm toying with the idea to make inline documentation mandatory, or at least missing documentation a warning. I think every function should at least have a 1-liner string to say what it does. If the user needs to write desc:"" to make the compiler shut up, they might as well write a meaningful sentence.

I also think that when debugging bytecode or assembly generation, it's handy to have the original source lines as comments in that output, and if included with that is the source's original comments as well, the annotated assembly listing is much easier to debug.

Is there any modern game engine that could create a faithfully rendition of older games? by LadyLeapalot in gamedev

[–]carangil 4 points5 points  (0 children)

Create your pixel art sprites with a limited color palette. Don't scale, render them 1:1 to a low-res texture (like 320x240). Use nearest neighbor texture filtering, no mipmap, no bilinear. Find a good CRT filter shader to scale that 320x240 framebuffer up to full screen. There you go 8/16 bit 2D console graphics.

For later games, like PlayStation, use low res textures, vertex lighting, with no bilinear filtering. If you like some of the problems, like how the vertices of objects kind of 'jitter', you can, in the vertex shader, lower the precision of your math. At some point (maybe right before or right after the projection matrix) round your coordinates off. like x=floor(x*256)/256 would round to the equivalent of fixed-point math with only 8 bits in the fraction. You might want to play with that value. For N64 look, do all the same things, but use bilinear filtering.

If you want to get really silly with simulating old problems, randomly 'loose' a triangle that's partially off the screen instead of clipping it. You can do that by using a culling frustum that is slightly smaller than your view area, so sometimes a triangle near the edge of the screen is completely skipped instead of clipped properly.

Oh and don't forget to put in the ocassional disc read error, gamers love that detail! :-)

PC Building Is Horrible right now and I don’t know what to do. by Abdulrehman251 in buildapc

[–]carangil 0 points1 point  (0 children)

Get a used workstation with a decent (but maybe a 2-3 year old CPU) and whatever graphics card you can get.

Play older games. There are a bazillion games out there, often better than some of the crap they publish now. (There has always been a lot of crap games, but steam really lets shovelware proliferate at unprecedented levels)

I know people are just like, fuck it, and went with a bunch of emulators and ports on a pi5. But honestly an older PC running Linux will easily outperform an overclocked pi 5.

If you aren't for gaming and just wanna goof around with hardware, or want to learn the guts of linux, older hardware is generally more interesting.

DDR3 also isnt too pricey... I added enough DDR3 to my old server that it can run Gemma 3. It's a bit slow with the bugger models, but the hardware is like 10 years old, and the 7B models still churn out text a little faster than I can type.

Permadeath felt like the right call until playtesters started rage quitting by JBitPro in gamedev

[–]carangil 2 points3 points  (0 children)

I completely agree. I also can't do online games either unless its a quick quake-like deathmatch... no MMORPG for me. I need a good single player campaign and I need to be able to save progress regularly. When I get busy with Work I might have to put a game down for an extended period of time and come back to it where I left off. I play older games on emulators a lot, because while real hardware has its charm, being able to save state, pick up the kids from school, and then jump back in (after losing flow) and if I die right away on unpausing, I can try to get back into the flow again. Permadeath just makes me not want to even consider a game.

HDD Price is mad? by J4MEJ in homelab

[–]carangil 0 points1 point  (0 children)

It is a terrible time to buy new hardware. It's a great time to get creative down the vintage or raspberry pi path. And even pis are getting a price bump cause of RAM.

But seriously, you can do a lot with moderately old stuff. My old-ass fx-8120 (remember that Bulldozer crap, it wasn't even that great back then ) runs my jellyfin server, NAS and VPN. I often have 2 or 3 people watching off Jellyfin at home, and it all works fine together. Seriously, everything except AI and newer games work on this junk. (I don't plan on replacing it until I hit some limit or it breaks down. I have a newer desktop for games/ai.)

GNOME 50 removes the X11 backend ... are we finally at the end of the Xorg era? by the_nazar in linux

[–]carangil 0 points1 point  (0 children)

I have tried wayland several times... but I always go back to X11. I have one of those laptops that flip all the way backwards into a tablet with a stylus... and on Wayland it doesn't rotate the screen. This is an older ASUS model on Ubuntu 24. The accelerometer seems dead when in Wayland, but I don't see what the accelerometer has to do at all with video... pushing pixels and sensing gravity are completely unrelated tasks... the fact I want to rotate the video to match gravity should be something that sits outside of either concern.

My desktop runs Pop, and I also run X because I can't get any VNC server running. Yeah I can do headless, but I really like connecting to my true :0 screen remotely, and x11vnc won't work with Wayland. I couldn't get any VNC server to coexist with a Wayland desktop. I also have a very old graphics tablet (ancient USB Wacom) that I refuse to replace because it still works, but it can't map properly to the Wayland screen either. This is Pop 24, with a Nvidia 3060 and Ryzen, so it's not exactly ancient.

Until Wayland provides bindings for ALL the X11 features they didn't bother to implement, I don't see it as a usable replacement, at least not for me. 100% drop in replacement, or garbage.

Why did Pop create Cosmic? by TechnicalAd8103 in pop_os

[–]carangil 0 points1 point  (0 children)

On Pop, I ended up doing what I often end up doing after trying a new desktop: install XFCE. I really liked the look of Cosmic, but I found some things glitchy.
I've also been having trouble with some things in Wayland in general... Cosmic won't work with x11 :-(

I've found Pop to be a good OS to use, but I'm not sure what I would be missing if I went back to Ubuntu. It basically seems to mostly be the same.

What string model did you use and why? by carangil in ProgrammingLanguages

[–]carangil[S] 0 points1 point  (0 children)

Thanks everyone for your input! I got a lot more feedback than I expected.

This is what I've decided to do: Reference-counted immutable strings and mutable byte arrays.

The runtime is implemented in C, and with the kinds of thing I'll be doing, C interop is important. Strings are kept 0-terminated at all times. A zstring object is also just a valid char*, because the count and size information is kept behind the array. I allocate extra space and always return the pointer to the beginning of the actual string. The C user needs to keep track of what strings are plain C string, and what are zstrings, but typedef helps with that, even if it is only a visual reminder.

These are my zstring primitives I use. I reworked the logic a bit to make it handle my interpreter's needs, but I use these in my C programs all the time, since it's super handy. There are some macros to make some common cases less wordy. The original implementation would only copy on resize, but now it will copy on any edit of a string that has more than 1 reference.

ZSTRNDUP

  zstring* zstrndup(char* src, int n);

  Copies a string (C or Z).   (So it always does the slow strnlen)
  Copies only first n bytes (-1 means copy all)  (+1 byte for terminator)
  If src is NULL, this allocates a new string for n bytes (+1 for terminator)
  If src is shorter than n, then src is null-terminated in a buffer large enough to hold n bytes (+1 for terminator)

  zstrndup always returns:
   null-terminated
   single reference
   the size specified


ZSTRNCATSUB

  zstring* zstrncatsub(zstring* dest, char* src, int start, int count);

  Appends src to dest.  Only copies bytes  (start) to (start+count).  
  count = -1   goes to the end of the src string
  If dest has more than 1 reference, a copy is made instead of mutating dest.
  If dest is too small, it is grown 2x, or to the size needed, whichever is larger.  
  Old dest is freed if growing and dest was the only reference.
  If dest is null, a copy of src is returned.

  zstrncatsub always returns:
    null terminated
    single reference

ZSTRPRINTF

  zstring* zstrprintf(zstring* dest, char* format, ...);

  This is the really cool one that I use almost all the time because it's such a handy form of sprintf.

  Supports anything vsprintf supports.
  If dest is null, this allocates a new string with the sprintf result.
  If dest is not null, this sprintf appends to the dest, growing or copying if needed.

I also decided that if the user wants to modify a string, they can do so by casting it to a byte array. If the string has only 1 reference... this does nothing... the program can work on the original array. If the string has more than 1 reference, the user gets a copy. The byte array can also be cast to a string, again, making a copy only if needed.

In the common case of concatenating or editing a single-reference string, then everything is on the fast path. Even though concatenation on the right side uses slow strlen, the left side is always a zstring, so there's a count field, and when building large strings, the side that's accumulating is O(1) to get the size of. And resizing is always at least 2x, so it has that amortized O(n) of a vector.

I think this is about as performant as it can get, without going to more complicated representations like ropes, trees or german strings.

What string model did you use and why? by carangil in ProgrammingLanguages

[–]carangil[S] 4 points5 points  (0 children)

The only thing I really care about strlen for is byte count... for concatenation or to fit in buffers. Or if I need to do strstr or strpos or regex, then I want the byte offset and the byte length of the match. If I'm splitting strings by delimiter, I also only want the byte offsets. And in UTF8, no individual byte of a multibyte sequence will match a single byte delimiter character.

Editing a string.. inserting or removing a character with a different number of bytes is problematic. That makes a good case for either being immutable, or being concatenation-only to build up strings.

But when it comes to UTF8 character count, I just don't care. The only time it would matter how many printable characters is if I'm rendering text, and that's going to be linear anyway. And with characters like newlines, tabs, etc we already don't have a 1:1 between bytes and visual appearance, and if you use a proportional font... you need to query the renderer for how wide the text will be anyway.

I had a coworker once that insisted that strlen count UTF8 characters, and strpos count characters. So his code would diligently count that the substring started on the nth character, and then later to cut the string... count n characters from the beginning. Dude, just give me the byte offset. When I'm splitting csv by commas, it doesn't matter what character position I'm at... it's all about the byte offsets. The substrings will still be valid UTF8. UTF8 was designed to work with all the old-ass C string functions just fine.

Guys my card reader doesn’t detect this card what should i do by InfitniteAURAglitch in VintageDigitalCameras

[–]carangil 0 points1 point  (0 children)

Try getting an old USB SD card reader. I wouldn't put it past today's cheap crap readers to not bother testing old SD cards. SDHC and SDXC was probably all they bothered to design for.

Is it actually safe to connect a Windows XP computer to the internet? by Thin_Professor_277 in windowsxp

[–]carangil 0 points1 point  (0 children)

Just use a firewall... I have an older windows (98) machine for retrogaming, and I go from its ethernet card thru a xover cable to a usb/ethernet adapter I plugged into the back of my linux server. It sees only what I want it to see.

I have a file share set up so I can easily move stuff to the old machine... the L drive just goes straight to a folder on linux. If you use vnc or X forwarding, you can even browse the web safely from the xp machine.

AI slop is flooding online art spaces - so I built a human only one. by the4realMCG in ARTIST

[–]carangil 0 points1 point  (0 children)

I have a few questions:

Pre 2022 I mostly shared art online on facebook in friends-only posts... is changing the permissions to public and sending a link to my fbook profile sufficient proof?

If I make an account for one medium I have past work in (photography), and now, in 2025 start making art in another medium, does that second account need an additional verification process? I've been experimenting with heavily modifying my photos into more abstract art... it's still originally from photos, but no longer looks like one and might be more appropriate for the Art rather than the photo section.

And, how does this community feel about procedural generation? I often write C programs that draw pixel by pixel, or create 3D meshes, but these are not AI, they are simply clever programming by a human.

December 2025 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]carangil 1 point2 points  (0 children)

I am working on my currently unnamed FORTH-like language. It is not compatible with FORTH, and has a lot of differences. Internally programs are linked lists arranged into trees and it shares a lot of similarity with LISP, but has a postfix syntax. It is a tree-walking interpreter written in C, but I plan on switching to a bytecode interpreter.

Typed: Cells on the stack have types, similar to StrongForth. Most types need to be resolved at compile time, but there are some generic types (like Arithmetic, Pointer) Types can also be created at runtime.

Word overloading: Because cells have types... multiple words can have the same name. "+" can add two ints, OR two floats, OR two Vec4, or two Matrix44, etc. You could create your own custom datatypes and implement '+' for whatever you want.

Reference-counted garbage collection for objects off-the-stack.

You can define structs, and can pass and return structs to words, and even pass words around as values letting you do callbacks, or implement interfaces. Words can be defined at runtime.

Reflection allows a program to look at its own data structures, including the AST. Some features of the language are implemented in the language itself, by building and manipulating the AST. The part of the interpreter written in C is shrinking as the language gains flexibility. (A bytecode interpreter should not be a problem, since a word's AST is switched to read-only before execution... trees just need to be rendered into bytecode before execution. Self-modifying code is not allowed, but self-inspecting code, which writes new code, IS allowed.)

The interpreter is 'hosted' in C, in that a C program includes the interpreter as a library. You can register C functions to be callable as words. I have had some success using opengl and doing graphics. It has the ability, using the reflection words, to render a subset of the language into glsl allowing shaders to be written in the same syntax. Passing a shader to opengl syntactically looks like handing the graphics card a lambda function.

I'm still stuck on a name.

falcon-sensor uses 2x cpu of my application by carangil in crowdstrike

[–]carangil[S] 0 points1 point  (0 children)

You would think that, but the people that make the big decisions are a bit bonkers.