General Programming Discussion

9156 readers
10 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 6 years ago
MODERATORS
1
2
3
4
5
6
7
8
 
 

cross-posted from: https://lemmygrad.ml/post/9715658

I'd love suggestions for apps for note taking that comrades use, ideally just free/open source ones that work on multiple platforms and can sync between devices.

9
 
 

Hi everybody, this is the JPlus development team.

JPlus is a Java superset programming language, extending standard Java syntax with additional features. So far, we have introduced null-safety and boilerplate code generation features. Currently, we are planning to add Named Parameter support to JPlus. This feature allows specifying parameter names explicitly when calling methods or constructors.

The point we would like to discuss is whether to support Default Values.

Option A: Named Parameter only

  • Pros: Simpler syntax, minimal implementation and learning overhead

  • Cons: Call sites may become longer in some situations

Option B: Named Parameter + Default Value

  • Pros: More concise code, allows omitting some arguments when calling

  • Cons: Can make code slightly harder to read if too many defaults are used

We would like to gather opinions on whether default values are truly necessary in practical coding scenarios.

If you want to learn more about JPlus, please refer to the links below:

10
-1
Against SQL (www.scattered-thoughts.net)
submitted 3 weeks ago by nutomic@lemmy.ml to c/programming@lemmy.ml
11
 
 

I'm new to Fish and really liking it so far but the list type is really confusing me.

Something that I find really non-intuitive about fish is the list data type.

You can set a list like this

set my_list a b c
echo my_list[1] #a

But if you try this it doesnt work:

function mklist
  echo a b c
end
set lst (mklist)
echo $lst[1] # a b c

Putting the echo in quotes doesnt work either.

You can do:

function mklist
    echo a b c
end
set lst (string split " " -- (mklist))
echo $lst[1] # a

But needing to always split your return values is kinda terrible.

So it seems like what fish expects you to do is echo multiple lines.

function mklist
    echo a
    echo b 
    echo c
end
set lst (mklist)
echo $lst[1] # a

Its just very weird to me that it doesnt understand a comma delimited string to be a list.

I feel like I must be missing something.


Edit: FWIW I think I get why they designed it like this after thinking some more. It just feels weird.

This requires you to be explicit about returning lists. Otherwise any echo with spaces would be treated as a list and not a single value

12
 
 

I haven't freelanced since the Craigslist / Fiverr days but I'm looking to get back in the game.

Figured this question might be helpful to others as well.

13
14
 
 

cross-posted from: https://lemmy.eco.br/post/17894331

From the video description:

Stop recompiling your C code just to change a number. adjust.h is a single-header library that lets you edit variables while your program is running - no rebuilds needed. Just include the header, mark your variables, and watch them update live as you edit your source file. In this video, I'll show you how to set it up and demonstrate why this simple tool can save you time.

Works with any C99 compiler and integrates perfectly with Raylib, ImGui, and other popular libraries. Whether you're tweaking game physics, adjusting graphics parameters, or fine-tuning algorithms, adjust.h will make your life simpler. Zero dependencies, minimal setup, maximum productivity.

15
2
Rendering surfaces (clojurecivitas.github.io)
submitted 1 month ago by yogthos@lemmy.ml to c/programming@lemmy.ml
16
 
 

Qt Creator 18 adds experimental support for Development Containers and many more improvements.

17
18
19
20
21
 
 

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

Hans-Kristian Arntzen wites:

There’s no shortage of examples of beginners rendering a simple triangle (or a cube), and with the new APIs having completely displaced the oxygen of older APIs, there is a certain expectation of ridiculous complexity and raw grit required to tickle some pixels on the display. 1000 lines of code, two weeks of grinding, debugging black screens etc, etc. Something is obviously wrong here, and it’s not going to get easier.

I would argue that trying to hammer through the brick wall of graphics is the wrong approach in 2025. Graphics itself is less and less relevant for any hopeful new GPU programmer. Notice I wrote “GPU programmer”, not graphics programmer, because most interesting work these days happens with compute shaders, not traditional “graphics” rendering.

Instead, I would argue we should start teaching compute with a debugger/profiler first mindset, building up the understanding of how GPUs execute code, and eventually introduce the fixed-function rasterization pipeline as a specialization once all the fundamentals are already in place. The raster pipeline was simple enough to teach 20 years ago, but those days are long gone, and unless you plan to hack on pre-historic games as a hobby project, it’s an extremely large API surface to learn.

22
 
 

In my decade-plus of maintaining my dotfiles, I’ve written a lot of little shell scripts. Here’s a big list of my personal favorites.

  • Evan Hahn
23
 
 

The ghosts of ancient Hackers past still roam the machines and—through the culture they established—our minds. Their legacy of the forging of craft lingers. A deep and kinetic craft we’ve extended and built a passionate industry on. We are driven by the same wonder, sense of achievement, and elegance of puzzle-solving as they were. Still driven by “The Right Thing.” These constitutional ideas, the very identity of programmers, are increasingly imperiled. Under threat. The future of programming, once so bright and apparent, is now cloaked in foreboding darkness, grifts, and uncertainty.

24
25
view more: next ›