/dpt/ - Daily Programming Thread

i've been out of the loop for a while
can you give me an update on rust

is it more popular now
is it still fast

Get a loads this (((compiler dev)))

It's a step up, but not quite what I want to do since it copies my inner array to each element in the outer array.

How do I use SDL2 to stream to an indexed texture with a custom palette?

Here's the problem. There doesn't seem to be any way to access the palette of an indexed texture. You can create one, by passing an indexed pixel mode to SDL_CreateTexture, but since you can only pass the flag for the pixel mode, not the entire pixel mode data structure, you can't specify a palette.

You can create a texture with an arbitrary palette by first creating a surface with that palette (since there are functions available to freely manipulate the palette of a surface) and then using SDL_CreateTextureFromSurface. However, SDL_CreateTextureFromSurface is documented as always allocating and returning a static texture. I need a streaming texture. There also do not seem to be any functions for creating a texture from an existing texture, except SDL_RenderCopy[Ex] with a texture as the render target -- which would defeat the purpose, as neither pixel mode nor streaming mode would not be preserved, so in order to create an indexed streaming texture to copy to, I'd be faced with the same problem as before.

Pls. All I want is to directly manipulate the pixels on my 8-bit emulator.

Current workaround is to store the texture as RGBA8888, have a separate 8-bit indexed pixel array in static memory as well as a palette for it, and manually convert every pixel from indexed 8-bit to RGBA8888 every frame. This works but it would be more efficient to just have the texture itself be indexed 8-bit with the palette I want.

Still ugly, compiler still exceeds the 32-bit address space when being linked, still pushed by loud, insufferable people who ride on Haskell's coattails.

You are right about light themes being patrician, bul low contrast increases eyestrain

This but unironically

That's still good contrast.

How do I get good haskell integration with emacs?
I'm trying to setup haskell-ide-engine but it's not working. I'm on archlinux btw

Just get hlint and ghcid, you don't really need anything else