Programming

26237 readers
332 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
251
252
 
 

This is an older blog post I came across while reading this related one on syntax highlighting:

I am sorry, but everyone is getting syntax highlighting wrong @ tonsky.me. It was posted here 3 months ago.

I think both make great points and has pushed me to into a rabbit hole of re-writing my current Nord theme into something a bit more minimal, only for me to eventually realize Nord theme with barely any syntax highlighting (mostly white text) looks very bleak and I didn't want to spend the time to hunt all the highlight groups to make things look good, so I tried out the Alabaster theme, which the guy from the 2nd article created and I love it, feels like it really hits that middle spot between too much highlighting and not enough.

Here's the theme I used for nvim :

https://github.com/p00f/alabaster.nvim?tab=readme-ov-file

I changed some things (matching bracket background color for visibility, comments grayed out and property names of tables should be yellow, instead green).

You can see the picture of how it looks here

253
254
 
 

I found it fascinating this OS/VM and what it can do. Thought I would share when they started to share their system in full. If your interested, its a great talk from start to finish!

https://100r.co/site/uxn.html

https://100r.co/site/projects.html

255
256
257
258
259
 
 

We recently wrote about Torvalds' atypically subtle and nuanced position on the use of LLM bots in coding. It seems that the reasons have suddenly become a little clearer.

Google's Antigravity LLM has been winning other friends of late, including Register columnist Mark Pesce, who wrote that "vibe coding will deliver a wonderful proliferation of personalized software." Some other big names in the world of FOSS have also come out in favor of LLM coding assistants recently, including Redis creator Salvatore "Antirez" Sanfilippo, who wrote "don't fall into the anti-AI hype." Said hype is, of course, a subject about which Torvalds opined previously.

Torvalds' position has been more moderate, which is not entirely like his former self. He is famed for his outbursts at Nvidia, GitHub, third-party companies, and kernel contributors. We could go on, but you get the picture.

260
261
262
263
264
265
266
 
 

Im on windows i would like to have a .exe file which is a 3d viewer, similar to blender.
Which language do i code it?
Which libraries would i need to use?
Note: when i mean creating my own 3d engine i mean that i would do myself the maths, i dont want a prebuild one Thanks

267
268
269
 
 

Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another. Rosetta Code currently has 1,339 tasks, 397 draft tasks, and is aware of 984 languages, though we do not (and cannot) have solutions to every task in every language.

270
271
272
 
 

Is it even possible? It seems every third-party tool that did it is abandoning the feature and I can't get the deprecated but still present feature to work in Detekt or ktlint. I didn't realise the biggest challenge with Kotlin would be detecting unused import statements so I can easily remove them.

Edit: Thanks for the help everyone, but I could not get anything working so I eventually just did it manually with a little help from the android linter.

273
21
WebGL CRT Shader (blog.gingerbeardman.com)
274
 
 

cross-posted from: https://lemmy.ml/post/41409887

I've been building a bytecode VM in Rust and recently implemented NaN boxing for value representation. Sharing here for anyone interested.

I needed all VM values (booleans, integers, string pool indices, bytecode references) to fit in 64 bits (stack is Vec).

My implementation encodes 5 distinct types using a 3-bit tag and 32-bit payload, all within a single u64. It also has 15 unused bits, they may be used later for types expansion.

I'm using a 64-bit layout:

  • Bits 63-51: Quiet NaN signature (0x7FFC...)
  • Bits 50-18: 32-bit payload (integers, string pool indices, etc.)
  • Bits 17-3: Unused/ (15 bits)
  • Bits 2-0: 3-bit type tag

So it allows me to have 5 tagged types: TRUE_VAL, FALSE_VAL, STRING_VAL, CALLDATA_VAL, U32_VAL

275
view more: ‹ prev next ›