Programming

26189 readers
146 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
201
202
 
 

Hey there,

I'm doing some mainlining stuff for Linux phones, so it'd be helpful for debugging to know C.

Sometimes I just have to figure out what a driver does that makes it fail, which is hard without really understanding the syntax.

So the question is: What are some good resources for learning C?

I mean, I roughly know what a variable or function is, as I've played with Arduinos before. I don't need an explanation that covers what programming is, but I also don't know enough to pogram an Arduino without googling the most basic syntax all the time.

I prefer guided stuff that makes me type and think over just reading specs as purely reading specs does not mean it'll stay in the head.

203
204
 
 

Hi,

How can I become a team/department lead? I guess I'm starting to feel tired of having a vision and not being able to implement it because I have 0 political power in a company.

I thought that the easiest way was to join a startup as the first person of a "department" in a company, but now I'm not sure how it's possible to get hired to a startup on the early stage.

205
 
 

Major new features:

  • The ISO C23 free_sized, free_aligned_sized, memset_explicit, and memalignment functions have been added.

  • As specified in ISO C23, the assert macro is defined to take variable arguments to support expressions with a comma inside a compound literal initializer not surrounded by parentheses.

  • For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

  • The ISO C23 typedef names long_double_t, _Float32_t, _Float64_t, and (on platforms supporting _Float128) _Float128_t, introduced in TS 18661-3:2015, have been added to <math.h>.

  • The ISO C23 optional time bases TIME_MONOTONIC, TIME_ACTIVE, and TIME_THREAD_ACTIVE have been added.

  • On Linux, the mseal function has been added. It allows for sealing memory mappings to prevent further changes during process execution, such as changes to protection permissions, unmapping, relocation to another location, or shrinking the size.

  • Additional optimized and correctly rounded mathematical functions have been imported from the CORE-MATH project, in particular acosh, asinh, atanh, erf, erfc, lgamma, and tgamma.

  • Optimized implementations for fma, fmaf, remainder, remaindef, frexpf, frexp, frexpl (binary128), and frexpl (intel96) have been added.

  • The SVID handling for acosf, acoshf, asinhf, atan2f, atanhf, coshf, fmodf, lgammaf/lgammaf_r, log10f, remainderf, sinhf, sqrtf, tgammaf, y0/j0, y1/j1, and yn/jn was moved to compat symbols, allowing improvements in performance.

  • Experimental support for building with clang has been added. It requires at least clang version 18, aarch64-linux-gnu or x86_64-linux-gnu targets, and a libgcc compatible runtime (including libgcc_s.so for pthread cancellation and backtrace runtime support).

  • On Linux, the openat2 function has been added. It is an extension of openat and provides a superset of its functionality. It is supported only in LFS mode and is a cancellable entrypoint.

  • On AArch64, support for 2MB transparent huge pages has been enabled by default in malloc (similar to setting glibc.malloc.hugetlb=1 tunable).

  • On AArch64 Linux targets supporting the Scalable Matrix Extension (SME), the clone() system call wrapper will disable the ZA state of the SME.

  • On AArch64 targets supporting the Branch Target Identification (BTI) extension, it is possible to enforce that all binaries in the process support BTI using the glibc.cpu.aarch64_bti tunable.

  • On AArch64 Linux targets supporting at least one of the branch protection extensions (e.g. Branch Target Identification or Guarded Control Stack), it is possible to use LD_DEBUG=security to make the dynamic linker show warning messages about loaded binaries that do not support the corresponding security feature.

  • On AArch64, vector variants of the new C23 exp2m1, exp10m1, log10p1, log2p1, and rsqrt routines have been added.

  • On RISC-V, an RVV-optimized implementation of memset has been added.

  • On x86, support for the Intel Nova Lake and Wildcat Lake processors has been added.

  • The test suite has seen significant improvements in particular around the scanf, strerror, strsignal functions and multithreaded testing.

  • Unicode support has been updated to Unicode 17.0.0.

  • The manual has been updated and modernized, in particular also regarding many of its code examples.

206
207
208
209
 
 

Nel 1997 il supercomputer IBM Deep Blue sconfisse il campione mondiale di scacchi Garry Kasparov, segnando un evento storico. Grazie a una potenza di calcolo senza precedenti, Deep Blue era in grado di analizzare milioni di mosse al secondo utilizzando un approccio brute force, ovvero valutando tutte le possibili mosse per scegliere la più vantaggiosa.

L’11 maggio 1997, dopo una sfida di sei partite, il computer vinse l’incontro con due vittorie, tre pareggi e una sola vittoria per Kasparov. La competizione, durata diversi giorni, attirò una vastissima attenzione mediatica a livello mondiale, diventando un simbolo del confronto tra uomo e macchina. A fare la differenza fu, tra le altre cose, una pausa casuale inserita nella macchina tra una mossa e l'altra dai programmatori della IBM.

210
211
 
 

Girard's insight was that communities resolve internal conflict through scapegoating: the selection of a victim to bear collective guilt, whose expulsion or destruction restores social cohesion. The scapegoat need not be guilty of the crime attributed to it; it need only be acceptable as a target.

Some dangerous individuals, however, institutionalize such ritualistic practices into what I call Casus Belli Engineering: the use of perceived failure as pretext to replace established systems with one's preferred worldview. The broken feature is the crisis that demands resolution. The foundation becomes the scapegoat, selected not for its actual guilt but for its vulnerability and the convenience of its replacement. And in most cases, this unfolds organically, driven by genuine belief in the narrative.

The danger is not the scapegoating itself; humans will scapegoat. The danger lies in those who have learned to trigger the mechanism strategically, who can reliably convert any failure into an opportunity to destroy what exists and build what they prefer.

The linked article title is “Casus Belli Engineering: The Sacrificial Architecture”, which I didn't find particularly descriptive. I used the second headline, “The Scapegoat Mechanism”. It doesn't include the architecture or strategy aspects, but serves well as a descriptor and entry point in my eyes.

212
 
 

There exists a peculiar amnesia in software engineering regarding XML. Mention it in most circles and you will receive knowing smiles, dismissive waves, the sort of patronizing acknowledgment reserved for technologies deemed passé. "Oh, XML," they say, as if the very syllables carry the weight of obsolescence. "We use JSON now. Much cleaner."

213
214
215
216
217
 
 

Abbiamo visto come scrivere in una pagina web e come aplicare lo stile grassetto, corsivo e sottolineato al testo. Ci chiediamo come si fa a mettere una nota a piè di pagina?

Bene, la risposta è semplice. Per mettere una nota a piè di pagina bisogna usare il tag che significa superire e si trova perchè noi lo dobbiamo mettere al di sopra della parola.

Consideriamo le seguenti righe di testo:

L’HTML è un linguaggio di markup che serve per creare ed abbellire paginer web

Quale sarà il corrispondente codice e la corrispondente pagina?

218
219
220
 
 

Found it interesting.

Lobste.rs thread : https://lobste.rs/s/1qmcac/tools_built_on_tree_sitter_s_concrete

221
38
submitted 2 months ago* (last edited 2 months ago) by HaraldvonBlauzahn@feddit.org to c/programming@programming.dev
 
 
 Many of us got hit by the agent coding addiction. It feels good, we barely sleep, we build amazing things. Every once in a while that interaction involves other humans, and all of a sudden we get a reality check that maybe we overdid it. 
In His Dark Materials, every human has a dæmon, a companion that is an externally visible manifestation of their soul. It lives alongside as an animal, but it talks, thinks and acts independently. I’m starting to relate our relationship with agents that have memory to those little creatures. We become dependent on them, and separation from them is painful and takes away from our new-found identity. We’re relying on these little companions to validate us and to collaborate with. But it’s not a genuine collaboration like between humans, it’s one that is completely driven by us, and the AI is just there for the ride. We can trick it to reinforce our ideas and impulses. And we act through this AI. Some people who have not programmed before, now wield tremendous powers, but all those powers are gone when their subscription hits a rate limit and their little dæmon goes to sleep.
 Looking at Gas Town (and Beads) from the outside, it looks like a Mad Max cult. What are polecats, refineries, mayors, beads, convoys doing in an agentic coding system? If the maintainer is in the loop, and the whole community is in on this mad ride, then everyone and their dæmons just throw more slop up. As an external observer the whole project looks like an insane psychosis or a complete mad art project. Except, it’s real? Or is it not? Apparently a reason for slowdown in Gas Town is contention on figuring out the version of Beads, which takes 7 subprocess spawns. Or using the doctor command times out completely. Beads keeps growing and growing in complexity and people who are using it, are realizing that it’s almost impossible to uninstall. 
222
223
224
 
 

inb4hope it's ok to advertise new communities here, thx!

Hey everyone! I like writing code and I don't really have people in my circles who I can share my creations with so I opened a community for all of to beable to!

Come share your all your git repos, hardware projects, inventions and more! We (i guess I rn) welcome all!

https://programming.dev/c/show_and_tell

And while you're at it, spread some stars around.

!show_and_tell@programming.dev

Edit: i tried to fix the link but [!show_and_tell@programming.dev](/c/show_and_tell@programming.dev) is not a valid url on the lemmy frontend, can't figure out what I'm doing wrong

225
view more: ‹ prev next ›