Programming

13384 readers
1 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 2 years ago
MODERATORS
76
85
submitted 1 year ago by dandelion to c/programming
 
 

I hear Sam Newman's - Monoliths to Microservices is worth a read.

77
 
 

To Audio and Back Again [using video and audio codecs for unintended purposes]

https://unascribed.com/junk/imgaudio/

@programming

78
 
 

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

79
80
 
 

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?

81
9
submitted 1 year ago* (last edited 1 year ago) by SeaOfTranquility to c/programming
 
 

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.

82
 
 

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

83
14
submitted 1 year ago* (last edited 1 year ago) by Aatube@kbin.social to c/programming
 
 

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?

84
 
 

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.

85
86
 
 

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.

87
 
 

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?

88
 
 

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

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

@programming

89
 
 

Read the doc, what are your thoughts?

90
 
 

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?

91
92
 
 

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

93
 
 

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.

94
 
 

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

Details in the link of the headline.

95
 
 

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"

96
97
 
 

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

(That's the title of this page.)

98
99
 
 

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

100
 
 

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..

view more: ‹ prev next ›