26
4
submitted 9 months ago by [email protected] to c/[email protected]

I’m not sure if the base model is enough or not. Anyone have experience?

27
66
submitted 9 months ago by [email protected] to c/[email protected]
28
9
submitted 9 months ago by [email protected] to c/[email protected]

I tried searching on google, but I need to apply "effects" as in mathematical equations (especially sine waves) for around 8192 values. All of this should ideally be around a few milliseconds, but should not take longer than 10ms.

Similarly, I need to run Input on 8192 values too. This most likely will happen with memcpy, from one array to another, but this might take longer as it can have multiple inputs (network/serial/usb).

In this case, I have to guarantee, that both steps before outputting do not take longer than around 25 ms.

Is there a way to definitely limit these functions to timeframes, so they will be killed/returned if taken to long?

I cannot spawn new threads for each input/effect step, as it takes some time to build these threads. Both methods will be called in a loop, directly after another, so they will run approx. 30-45 times a second.

Whats the way to limit these? I can surely guarantee the read-time where I copy a buffer, but running maths operations seems like something that could potentially take too long.

Realtime-Operating Systems also can somehow guarantee those times, so whats the way here?

(BTW, this all is going to run on a minimal debian linux system, with the GUI decoupled from the actual mehhanism.)

One of my ideas would be to pre-calculate those values in some other thread, lets say the next 100 ops for a given value and then just replay them, so I have some buffer.

Other ideas?

29
9
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]

For a while now, I had this idea in my head of making a small 2D side scroller game that helps people learn programming, and I'm looking for honest opinions and feedback from others. I know that such a game is niche and I wouldn't expect to earn a lot with it. Spending time on development would only make sense for me, however, if there is at least some interest in playing it. Whether the game will have some success, is not a question that can be answered here, but my hope is, that I'll be a bit more confident in my decision after hearing more feedback from others.

I have been teaching C/C++ and Python for years now and have developed a small application that gives students, without a specific goal, something to work towards to. It is just a console application that offers various programming tasks to be solved, submitted and compared against previous results. The student just has to run the application, import my interface library and start coding. I usually go over the theory and try to help them while they are figuring it out. Just to give you an example of such a task:

"There is a sequence of N unsorted and unknown numbers. You can compare, whether any number is greater than any other one by specifying their positions in the sequence. You can swap two numbers, save copies of them on a stash, and replace any number in the sequence with stashed ones. Try to sort the sequence of unknown numbers with as little operations as possible."

The idea of the side scroller would be, to give that application a compelling frontend and to "gamify" these tasks even more. Aside from the usual game mechanics like "find and fetch items", "talk to this or that person" or "solve simple terrain puzzles", I want the programming tasks to be the main quest which unlocks new parts of the world and ultimately completes the story line. There will be some kind of quest book that goes into more detail and tries to help the player understand the task and to find solutions. Aside from that, the player is expected to use their own development environment (which can be as simple as: Notepad and GCC/Python Interpreter). The quest book is just meant as a starting point, and players would have to do additional research to learn more about algorithms and how to implement them.

I think, at this point, I have described the rough idea enough, and I apologize for the wall of text so far. For that reason, everything below this is optional TLDR as far as I'm concerned.

The last thing I wanted to mention here is the rough sketch of the lore I had in mind. A medieval world containing steam punk elements that is slowly but surely overtaken by these alien looking artifacts. You, the protagonist, have figured out that some of these artifacts can be controlled by using the language that can be derived from the carvings on them. Around the artifacts, a contamination that destroys everything is slowly spreading. No one has figured out how to stop this, but it becomes clear over the course of the game, that interacting with these artifacts and solving the programming tasks, slowly reverses the spread. The ultimate conclusion is, that an alien species put these artifacts in this world to slowly terraform it. Because they didn't want to wipe out any intelligent species in the process, they created an off-switch. If a species is intelligent enough to figure out these tasks, the whole terraforming process is terminated.

30
1
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]

I have never dug into low level things like cpu architectures etc. and decided to give it a try when I learned about cpu.land.

I already was aware of the existence of user and kernel mode but while I was reading site it came to me that "I still can harm my system with userland programs so what does it mean to switch user mode for almost everything other than kernel and drivers?" also we still can do many things with syscalls, what is that stopping us(assuming we want to harm system of course) from damaging our system.

[edit1]: grammar mistakes

31
1
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

Hi, I'm somewhat new to Kotlin programming and so far it's becoming my favorite language. I was browsing some Kotlin projects when I found Komac, which recently switched to the Multiplatform target from only having the JVM target.
As far as I know, JVM can also run on all platforms without the use of minGW except for iOS but I don't have a developer certificate or incentive to work beyond CMD scripts so far, so is there an advantage for Kotlin Multiplatform?

32
1
submitted 10 months ago by [email protected] to c/[email protected]

cross-posted from: https://programming.dev/post/2433863

Hi, does anybody know the state of recent (2020 and onward) FX releases regarding supporting Wayland? Thank you.

33
1
submitted 10 months ago by [email protected] to c/[email protected]
34
1
submitted 10 months ago by [email protected] to c/[email protected]

I find this really useful since it hides most of the ads and other annoyances GitHub has now. Luckily I don't really use GitHub that much but when I'm forced to interact with it, this makes it more pleasant experience.

35
13
submitted 10 months ago by [email protected] to c/[email protected]

Hi all! Data scientist here, trying professionalise a group of hobby programmers who've somehow found ourselves doing it for a living. The programming we know; it's the infrastructure we're lacking. None of us knows how to organise a programming team, myself very much included.

Can anyone recommend resources, books, courses on software engineering suitable for data scientists?

36
10
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

Zig Build System & How to Build Software From Source - Andrew Kelley

https://www.youtube.com/watch?v=vKKTMBoxpS8

@programming

37
21
submitted 10 months ago by [email protected] to c/[email protected]

Read the doc, what are your thoughts?

38
20
submitted 10 months ago by [email protected] to c/[email protected]

A post with id 1 in lemmy.world has a different id in lemmy.ml (or any instance). How do I get the post id in lemmy.ml?

39
12
submitted 10 months ago by [email protected] to c/[email protected]
40
67
submitted 10 months ago by [email protected] to c/[email protected]

My wife didn't understand why I got so excited reading this article.

41
9
submitted 10 months ago by [email protected] to c/[email protected]

cross-posted from: https://lemmy.one/post/2707178

An interesting blog post that reflects some ideas I've been thinking about lately.

Since nothing close to the environment described in the article has entered the mainstream since ten years, it's safe to say that it's probably too hard or maybe too inconvenient.

I'd still like programming to go into this general direction, our tooling is really limited in comparison with how complex software has become.

42
7
submitted 10 months ago by [email protected] to c/[email protected]

cross-posted from: https://programming.dev/post/1941671

Details in the link of the headline.

43
7
submitted 10 months ago by [email protected] to c/[email protected]

cross-posted from: https://programming.dev/post/1923251

Some frontend developers know the BEM methodology as a naming convention for CSS and they create a disgusting #webcomponents. I've explain the essence of BEM and shown the benefits for your frontend projects.

Feel free to share it with a people who tells you "i use CSS-modules, so i no needs a BEM"

44
37
submitted 10 months ago by [email protected] to c/[email protected]
45
3
What is Connascence? (connascence.io)
submitted 10 months ago by [email protected] to c/[email protected]

cross-posted from: https://programming.dev/post/1890996

(That's the title of this page.)

46
4
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

cross-posted from: https://lemm.ee/post/4524568

Paper: https://www.cs.virginia.edu/~evans/cs655/readings/steele.pdf

If you find the wording weird, wait until (or skip to) 8:44 for the explanation.

TL;DR generated with claude.ai:

The main theme is that programming language design has changed. Previously languages were designed fully upfront by a small team. Now languages need to be designed for growth, starting small but with patterns enabling users to extend the language. This allows rapid evolution driven by user needs.

The speaker advocates designing programming languages that empower users to define new types, operators, etc. He argues this is better than trying to design a huge language upfront, which will fail, or using a small language long-term, which is too limiting.

Overall the message is that language designers should create an initial framework to allow organic collaborative growth. The speaker relates this philosophy to the "bazaar" model of open source development.

From the video description:

Guy Steele's keynote at the 1998 ACM OOPSLA conference on "Growing a Language" discusses the importance of and issues associated with designing a programming language that can be grown by its users.

47
20
submitted 10 months ago by [email protected] to c/[email protected]
48
19
submitted 10 months ago by [email protected] to c/[email protected]

This is sad as fuck, to be honest. Reliably the best tech conference — inclusive, interesting, varied, diverse, language-agnostic, just absolutely fantastic.

49
22
submitted 10 months ago by [email protected] to c/[email protected]

As a programming student i feel sometimes we go a bit too technical and we lose the philosophy and the main point of what we are doing.

What are some great books (classics and none) to read on programming?

I'm interested to the topic of programming and computer science in general but especially to the cypherpunk philosophy and to concepts like the story of internet, the philosophy that led to the beginning of it etc..

50
8
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]

Hello! I'm writing my application in QML, and inside a TextArea formatted with RichText I want to display this:

a header

(an empty line)

another header

my first thought was to go with a <br> tag, but it has a problem: it creates 2 empty lines, don't know why. so doing this

<h1>hello</h1>
<br>
<h2>world</h2>

produces

hello

(an empty line)
(an empty line)

world

I tried using the <pre> tag:

<pre>
</pre>

but no empty lines were displayed

the only working workaround was to use a non breaking space &nbsp;, but being it a TextArea, the user is able to edit the text, and so there would be a "rogue" space instead of an empty line. How can I display just a single line break between two headers (or even paragraphs, but in my case the header is needed)?

view more: ‹ prev next ›

Programming

13266 readers
7 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS