sos, to programming
@sos@mastodon.gamedev.place avatar

Some cursed C for Wednesday morning.

#cprogramming #programming

sos, to programming
@sos@mastodon.gamedev.place avatar

I hate CMAKE. That's the post. Just hate it.

Why the FUCK does CMAKE generate VS project files that depend on having CMAKE installed on your system? And it has to be in a fixed path? And EVERYTHING has to be in a fixed path?

Have CMAKE developers ever compiled something or used version control? This is unusable and I am very angry and it's Monday and I haven't had my coffee yet.

EDIT: AND IT HAS TO HAVE VS INSTALLED AT A FIXED PATH TOO WHO MADE THIS CRAP????

sos,
@sos@mastodon.gamedev.place avatar

Just look at this. Look at this and tell me why do people use Cmake!

#cmake #programming #cprogramming

sos,
@sos@mastodon.gamedev.place avatar

Ok, I finally managed to make this project work on a different machine it ran CMAKE and just regenerated the project discarding all my changes.

What in the actual hell is this?

#cmake #programming #cprogramming

sos, to programming
@sos@mastodon.gamedev.place avatar

Out of 6 languages recommended by the NSA, 4 are patended bvy multibillion comanies who can pull the plug on them at any time (and Oracle already tried that).

C# - PATENTED by Microsoft,
Go - PATENTED by Google
Java - PATENTED by Oracle, NOT FREE
Python - not too shabby
Rust - not too shabby
Swift - PATENTED by Apple

james, to ChatGPT

Learning how to draw things on the Agon Light

I’ve been having a bit of a play around with my Agon Light, trying to come up with some ideas for a future video. I’ve discovered it has quite a nice 320×240 64 colour video mode that has just enough pixels to be interesting.

Here’s a little thing I managed to create.

TIt started off as a little discussion with ChatGPT and ended with a Python and PyGame program that drew one spinning shape in the middle of the screen. I’m finding ChatGPT is quite good for coming up with code that I would have otherwise spent hours trying to figure out.

The code isn’t the most efficient, I’m using floating point maths all over the place – on a device with an eZ80 CPU that doesn’t have an FPU. Writing this to use fixed point maths is an exercise for future me.

https://ncot.uk/wp-content/uploads/2024/03/Screenshot-2024-02-29-21.57.49-1024x239.png### Related posts:

https://ncot.uk/agon-light-c-development/https://ncot.uk/devlog-02-layer-2-graphics/https://ncot.uk/gamedev-music-art-and-being-creative/https://ncot.uk/agon-light-c-programming-an-introduction/

#AgonLight #CProgramming #ChatGPT #Graphics

https://ncot.uk/?p=1657

sos, to programming
@sos@mastodon.gamedev.place avatar

Wanted to look up how to open files for reading and writing.

Google assumed I meant Python and shoved only python results in my face.

Tried Bing and it did the same thing.

We are so fucked.

#programming #cprogramming #python #gamedev #indiedev

image/png

suprjami, to golang

Please enjoy this meme I made as a goof.

sos, to programming
@sos@mastodon.gamedev.place avatar

Cursed fact: $ is a valid identifier in C/C++/C#.

sos, to gamedev
@sos@mastodon.gamedev.place avatar

My talk about making an ultra-portable game engine from scratch has been voted the best talk of the GiC conference!

https://www.youtube.com/watch?v=2cOqAHzIfQE

I am talking about McPixel 3 Engine that I wrote from scratch in C.

It has been ported to Windows, Max, Linux, Switch, Xbox One, Xbox Series, PS4, PS5, iOS, Android, Windows 95, Raspberry Pi, FreeBSD, Haiku OS, RISC-V, Windows 3.51, MS-DOS and Linux Terminal.

#gamedev #indiedev #indiegame #programming #gameprogramming #cprogramming

ramin_hal9001, to scheme
@ramin_hal9001@emacs.ch avatar

Why Program in C+Python when you can program in Zig+Scheme?

Another bit of gold from by Pjotr Prins of the University of Tennessee. The actual title of the talk is "Why code in Python+C if you can code in Lisp+Zig?" but the "Lisp" in this case is actually Guile Scheme. I didn't know this, but Zig uses the C ABI so it binds to any language that can do FFI bindings to C, including most Scheme and Common Lisp implementations. But why don't I just post the abstract here:

> "Most bioinformatics software today is written in Python and for performance C is used. Lisp has been around for over half a century and here I don’t have to tell how or why programming Lisp is great. I will talk about Zig as a minimalistic new language that is unapologetically focused on performance, tellingly with a blazingly fast compiler. It is advertised as a replacement for Thompson, Ritchie, and Kernighan’s C, but it may even replace C++ in places. Zig uses the C-ABI and does not do garbage collection, so it is ideal for binding against other languages. In this talk I will present combining GNU Guile Lisp with Zig. I’ll argue that everyone needs two languages: one for quick coding and one for performance. With Guile and Zig you get both at the same time and you won’t have to fight the Rust borrow checker either."

sos, to gamedev
@sos@mastodon.gamedev.place avatar

Hmmm... I'm trying to implement multithreaded software rendering but no matter how many threads I throw at it, the result is always the same... why?

Concurency Profiler shows there is no redundancy or blocking, and they're all render their proper share of sprites.

Help!

#c

suprjami, to random

A Perlin noise terrain generator in C and Curses. This has been fun.

orbifx, to programming

#c #clang
If your #C library function doesn't mutate memory passed to it but wants to return modifiable pointers, do you const the parameter but cast-away the const on return?
Or do you not const the parameter at all?

The standard library seems to favor the first.

#cprogramming @C @c #programming

mxk, to random
@mxk@hachyderm.io avatar

It's 2023 and there are still buildsystems, which do not warn about a empty list of source files as input.
If my glob does not match anything, I probably want a warning and not an empty shared library as output.
#workwork #cprogramming

tilton, to random

I think I can do it. I think I can get through my entire professional software development career without ever learning C++ beyond the basics. I’ve done more than my fair share of C, Java, Ruby, Rust, Go, Python, JavaScript, and even Perl, but somehow I’ve escaped C++ except for one TINY work project that I somehow didn’t fuck up too badly.

kakurady,
@kakurady@fursuits.online avatar

@tilton you need to know that modern (post-2015) C++ is not like C. While much of C syntax is still accepted, don't write C in C++ unless you're interfacing with legacy code. In particular, avoid managing memory yourself, use containers and local variables instead.

On that note: C is not a "portable assembler", think of it as running on a VM that's just really good at generating code—the VM behavior (or "abstract machine") may or may not match your hardware. #cPlusPlus #cLanguage #cProgramming

maeve03, to random

I am learning #c and I am pretty much a beginner both with that language and in programming in general. I am looking for a mentor to help me to make sure I am on the right track and help me avoid bad habits as much as possible. I really want to learn C and I need the help and motovation to evolve. One of the reasons why is because I want to try to become a Linux kernel developer on the C part of it. So is there anyone with relatively good grasp around C and who can help me and be my mentor?

#cprogramming

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