51
13
Everyday Use of GNU Guix (www.youtube.com)
submitted 10 months ago by mrh@mander.xyz to c/programming@beehaw.org
52
13
submitted 10 months ago* (last edited 10 months ago) by potterman28wxcv@beehaw.org to c/programming@beehaw.org

Cross-posting this here as I saw some misconceptions about Rust language

I think that blog describes well the pros of using a strongly-typed language like Rust is. You may fight the compiler and get slower build times but you get less bugs because of the restrictions the language imposes you.

The biggest con of Rust is that it requires learning to be used, even for someone who has already programmed before. It's not like Python or Ruby where you can just dive in a code base and learn on the go. You really need to read the Rust book (or skim through it) to get through the notions. So it has a higher entry level, with all the misunderstandings that come with it.

53
43
submitted 10 months ago by Paradox@lemdro.id to c/programming@beehaw.org
54
49
submitted 10 months ago by Five@slrpnk.net to c/programming@beehaw.org
55
13
submitted 10 months ago by reric88@beehaw.org to c/programming@beehaw.org

I have a couple sites on Google and since they sold to square space I thought I'd try to keep my stuff there. But I can't figure it out. Square space is a site builder with a GUI and I can't find anywhere to just deploy my site to them as a react app. I have found a few areas where I can add some code, but they are for specific areas of the provided templates. I've even tried to use developer mode, but it looks like you still need to follow their template rules to get anywhere.

It's been a huge headache, Google made it so easy.

56
11
submitted 10 months ago by Vitaly@feddit.uk to c/programming@beehaw.org
57
7
submitted 10 months ago* (last edited 10 months ago) by shortwavesurfer@monero.town to c/programming@beehaw.org

Any ideas? I am attempting to write a script that uses sed.

If done this way it fails

  • rmdec="sed 's/..................$//'"
  • i1xmr=$(echo "$i1p/$apiresponse*1000" |bc -l |$rmdec)

But if i do it this way it works

  • i1xmr=$(echo "$i1p/$apiresponse*1000" |bc -l | sed 's/..................$//')
58
22
submitted 10 months ago by cwagner@beehaw.org to c/programming@beehaw.org

I’m an accidental DBA, but I still never quite got the hate for ORMs. I thought this article does a good job explaining the issue, and why they aren’t so bad.

59
46
submitted 11 months ago by dontblink@feddit.it to c/programming@beehaw.org

Honestly all this world looks really overwhelming, there's too much stuff going on: each program uses its own languages, its own compilers, uses different tools, libraries, dependencies, package managers and frameworks. You need specific instructions and documentation to learn new stuff at every single thing you deal with.

Whenever i open a project on Github i just feel overwhelmed because there will always be something new and i'm afraid i won't ever get out of that way of operate that "somehow makes things work" and really understand my code and program interactions..

Honestly it's really complicated because you use a program you need and you just see it from the surface, you don't have the time to learn how things work in a slightly more linear way, it would take ages considering the fact you probably need other 10 programs like that. To me it looks just like modern programming is about grabbing different pieces of fragmented knowledge all around web forums, wikis (or chatbots, which for me are just the next way of giving up our ability to learn) and somehow making things work.

I just get overwhelmed even when i take a look to a github page sometimes, even the frontpage has so much stuff you won't ever learn.

Another thing is the online community is the most sparse thing, far from actual real communities there is, you can work with people who won't ever even talk to, and their contribute can be as sterile as just creating a pull request and then leaving forever. You are mostly on your own striclty speaking of human connections and ability to share ideas and feelings.

I'm very fought because i somehow feel like i really love how certain ideals and creativity can be expressed with programming: i love that you can use something practical to solve idealistic, creative and technical problems. I love stuff such as digital etic, cypherpunk movemenet and all the work that opensource devs do to make the industry just a bit better, sometimes even receiving donations for their work, which for me is the highest form of payment, i've never seen someone more happy to pay for something as in the opensource community. But at the same time i'm starting to loathe technology and the internet because, adding on top of everything i said above about the sterility of the community, the difficulty to concentrate on a single thing and the dispersion there can be, i'm also dealing with a 10 years porn addiction since 5 years ago, progresses happens but are really slow and using my computer or phone is a huge trigger even if i'm trying my best to make them as minimal and not addictive as possible. Trust me, in a world designed to get you addicted to your hardware and software, being grown up used to doom scroll every day, it takes a huge amount of time and effort to have your things all sorted up to guarantee yourself a bit more privacy and software that is actually useful and doesn't want to keep you hooked, and at the same time don't be too much of a social outcast. You actually have to re-learn computer, or better saying, to actually learn computer for the first time, because you realize you can't just rely on having everything ready, set up, and just working from scratch without paying in some way, and the price that most big techs set is even higher, and far more subtle than just paying with money.

The software industry right now is shit outside of the few developers that are actually building products FOR users, and not for money, and of course that does mean that if i follow my ideals, i won't nearly have these much economical opportunities as every "usual" developer gets. It's a huge headache having to deal with programs even when i do it for myself, i can't even think of doing that for someone else right now (with all the work and continuity that this requires) and i'm thinking if i should really put my efforts somewhere else.

60
11
submitted 11 months ago* (last edited 11 months ago) by Luka@beehaw.org to c/programming@beehaw.org

I've watched Bro code on YouTube for learning html and CSS and I enjoyed his explaining, teaching and such. After i completed his YouTube course I went onto numerous different sources to learn more. I found that he teached me most of the stuff that I found afterwards. When I was happy with my html and CSS skill to the point I can write some simple web page with the help of a few searches I decided to move onto js. I was looking to find what are some good places to learn and I found a ton of people talking about some net ninja so I checked him out. I am currently around episode 10 and I have grown to like his way of explaining and teaching. I haven't tried bro code's cource for js so idk if it's any better. That's why I am looking for help from you, have any opinions maybe watched both? Please let me know🙌

Bro code on YouTube: https://www.youtube.com/channel/UC4SVo0Ue36XCfOyb5Lh1viQ

Net ninja on YouTube: https://www.youtube.com/@NetNinja

61
37
Exercism (exercism.org)

Does anyone here use Exercism? I've started using it to learn Elixir, and it seems to be good. I'm thinking about having my kids use it as well for Python and JS/TS.

I'd be interested to hear if anyone's used it for a long time, and if there's any advantages or disadvantages to it. Or if there are other, better code exercise sites I should check out.

62
10
submitted 11 months ago* (last edited 11 months ago) by homoludens@feddit.de to c/programming@beehaw.org

Can anyone recommend a good introduction/book to TypeScript for people who already know some programming (e.g. Java, Python) but have no experience with JavaScript?

The only texts I've found so far assume prior JS knowledge (like The TypeScript Handbook https://www.typescriptlang.org/docs/handbook/intro.html) or seem rather unstructured to me (e.g. dropping a lot of different ways and shortcuts to do things without explaining concepts or making no clear distinction between basics/best practices and advanced use cases/edge cases).

Ideally it would explain core concepts (like functions, types, classes, ...) first, with their most common use cases. Later chapter would do deep dives into different topics.

Edit: when I'm talking about TypeScript I'm talking about the whole language, not just the "modifications" it makes to JavaScript.

63
8

Hello! In my Cordova android app I'd like to get the info (title, author, duration etc) of the currently playing song (in another application, like spotify or any mp3 player).
I didn't find any cordova plugin to do this directly, and on the web I only found android-only ways, but sadly I have 0 experience with java/kotlin. How can I do this in cordova?

thanks in advance!

64
30
submitted 11 months ago by lonewalk@lemm.ee to c/programming@beehaw.org

insomnia just enshittified itself and requires cloud login like postman, and force upgrades you from the old version even if you disable updates. this blocked me at work today.

this client looks great, wanted to boost it here in case anyone else got screwed by Insomnia this morning.

65
13

cross-posted from: https://lemmy.onlylans.io/post/111903

I've always understood the concept of compilers turning high-level languages into assembly for CPUs to actually execute, but I've never really considered how that sausage is made.

In this video series Pixeled pulls back that curtain and describes the logic and rationale on how compilers are actually created for high-level languages.

66
11
submitted 11 months ago* (last edited 11 months ago) by Lokoschade@feddit.de to c/programming@beehaw.org

I've had this game idea for a while but I have trouble finding the right keywords to research it properly.

In the end I want an animal breeding simulation, where the offsprings looks and stats are based on the parents genetics.

First I wanted to focus entirely on the fur color and pattern. So I want to make a program which I can feed the fur genetics of the mother and the genetics of the father and that then generates the genetics of the child which then also can be translated into an actual picture of the fur.

How could I do that? Where could I start?

67
53

Hello there,

I am an experienced programmer. I can do C/C++/Rust/assembly/Ruby/Perl/Python/ etc.. The language itself is not a barrier.

The barrier to me is that I have never coded a single web or android application. I guess it must be surprising but I am more of a low-level programmer in my job (I develop a compiler backend) and I never really had the opportunity or idea to work on an app.

What would be a good starting point for making an android application?

A quick search got me this: https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/unit-1-get-started/lesson-1-build-your-first-app/1-1-c-your-first-android-app/1-1-c-your-first-android-app.html

Would it be a good starting point?

Side note: my app will not have to interact with any service. If I were to code it as a command-line program, it would not take me more than a day or two. The actual app would involve (for now) no more than a text field, a button, some logic attached to it - the hard part for me being to choose a framework to build it, "upload it" to my phone and use it.

68
47

I would like to know what your hoppy coding project are. It doesn’t really have to serve a purpose, but what are you coding on in your free time that just is fun to you and you enjoy working on?

As a background: I am an experienced programmer and do earn my money with it. In my free time I always enjoyed trying out new stuff related to technology, learn new things and improve my skills by doing so. But lately I recognise that I just have no clue what I should do or what a fun toy project I could work on. I really have no ideas. My head just feels completely empty whenever I open my IDE.

So please, tell me what you are coding on for fun.

69
84

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

70
17

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

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

@programming

71
4

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

72
77
73
9

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?

74
8
submitted 1 year ago* (last edited 1 year ago) by SeaOfTranquility@beehaw.org to c/programming@beehaw.org

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.

75
29
submitted 1 year ago* (last edited 1 year ago) by SmoothSurfer@lemm.ee to c/programming@beehaw.org

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

view more: ‹ prev next ›

Programming

13097 readers
10 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