#clang
My own #MD5 library in C. It's a little faster than openssl, probably because it's less general (but it still handles any string length). Mainly it was a good exercise to implement it. https://github.com/ednl/c/blob/master/mymd5.c
#Clang #Cprogramming #cryptography (but don't rely on this! Md5 has been cracked)
#clang #ld #linker question: If I create a dylib libD.dylib that links against static libS.a, by default libD will contain a copy of all (referenced) symbols from S, and any users of libD would not need to link S to get all their needed symbols.
The problem comes along if there’s another dylib libE.dylib that *also* links against static libS.a. An executable that loads both libD and libE will now get duplicated symbols from S. Anything that should be globally unique in S will no longer be unique; there will be two copies of them.
Is there a way to make ld *not* include a copy of S in D and E (i.e. leave D’s and E’s references to symbols in S as unresolved externals)? It’s OK that users of D need to also link S; I want to make sure that there’s only one copy of the contents of S in the final executable.
The obvious answer is to turn S into a dylib as well, but I want to know if there’s actually a way to do what I want.
It turns out that it's possible to have associated types and values in #c using a few extensions supported by #gcc and #clang . The basic foundation for this is zero-length arrays: you can insert a unit-alignment zero-length array field into any `struct` or `union`, and although it won't affect the layout or storage of the type, the array element type (which can be a `struct`) can be extracted with `typeof()`.
Nice addition to c programming https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-c-fbounds-safety/70854 #clang #llvm
yank, https://github.com/mptre/yank.
Yank terminal output to clipboard:
> The yank(1) utility reads input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard. Fields are either recognized by a regular expression using the -g option or by splitting the input on a delimiter sequence using the -d option.
Looks so easy to use. Great idea!
Library of #Generic and #TypeSafe containers in pure #C language ( #C99 or #C11 ) for a wide collection of container (comparable to the C++ STL).https://github.com/P-p-H-d/mlib
Progress on Bounds Checking in C and the Linux Kernel, https://outflux.net/slides/2023/lss-na/bounds-checking.pdf.
Talk given by @kees and @gustavoars at the Linux Security Summit 2023.
Agenda:
• Goal: Memory safety
• 50 years of missing bounds checking
• Problems with existing work-arounds
• Current mitigations lack sufficient coverage
• Improve coverage: Refactor for unambiguous arrays
• Improve coverage: Annotate dynamic array sizes
• Compiler work
• Metrics
Really impressive work. Congrats!
About 300 installs of my Flipper resistance calculator app, now. I'm really happy about that 😊 https://flipc.org/instantiator/flipper-zero-experimental-apps?branch=main&root=resistors
#FlipperZero #Resistance #Electronics #App #Embedded #C #clang
#LLVM #Clang 16 vs. #GCC 13 Compiler Performance On @Intel Raptor Lake
https://www.phoronix.com/review/gcc13-clang16-raptorlake
Original tweet : https://twitter.com/phoronix/status/1656649475216097280
I am kinda sad that #clang knows to say "unimplemented pure virtual method X in class Y", but doesn't have a Fix Me yet to actually add that method.
OTOH, it gives you the class name now. That's great! <3
The tale of -mrtd in GCC and Clang
Off the back of my experience writing apps for the #FlipperZero, I've put together a tutorial for first-time app #devs
1/ Part 1: Getting started
https://instantiator.dev/post/flipper-zero-app-tutorial-01/
Found in string.h in the #FlipperZero firmware... 😂🧡
#c #clang #comment #code #community #xp
#LLVM #Clang Now Exposes -std=c++23 Rather Than -std=c++2b
https://www.phoronix.com/news/LLVM-Clang-std-cpp-23
Original tweet : https://twitter.com/phoronix/status/1654228186962579456

Beautiful new graphics from Kuronons now incorporated into v1.1 of the app.
https://flipc.org/instantiator/flipper-zero-experimental-apps?branch=main&root=resistors
#FlipperZero #resistance #calculator #electronics #app #developer #clang #community
oh, and of course the original PR from Derek Jamison to help fix a crash caused by an unexpected pointer type bug! https://github.com/instantiator/flipper-zero-experimental-apps/pull/1
#FlipperZero #BugHunting #Bugs #C #clang #developer #community
Also, a pull request from hedger that adds the official ufbt GitHub Action. Super kind 🙏 https://github.com/instantiator/flipper-zero-experimental-apps/pull/8
#developer #community #C #clang #ufbt #FlippzerZero #BuildTools #GitHub #GitHubActions
Amazing new graphics designed by Kuronons! #FlipperZero has a fun, collaborative community. I'll be incorporating them soon 🙌
https://github.com/instantiator/flipper-zero-experimental-apps/issues/6
#developer #community #C #clang #design #graphics #1Bit #PixelArt #BlackAndWhite #electronics #resistance #calculator
And the second change that adds CodeView debug info for jump tables: https://reviews.llvm.org/D149367/new/
#llvm #rust #clang #cpp
To be precise:
- msvc emits too many definitions of non-inline destructors of exported classes and requires invalid C++ to work around that. 😱
- clang emits too many v-tables for non-exported (exported too?) classes that are part of exported classes with no known workaround for this issue. 😭
Apparently I'm a C developer now. My first #FlipperZero app!
🐬 https://github.com/instantiator/flipper-zero-experimental-apps
Are there any #llvm contributors/reviewers on here? I'm making some changes to improve Windows (CodeView) debug info and would love for someone to have a look. First change is here: https://reviews.llvm.org/D148761
#rust #clang
Let's settle this once and for all.
#programming #gamedev #webdev #cpp #java #javascript #python #c #csharp #html #typescript #kotlin #go #golang #rust #rustlang #clang #texteditor #ide #coding #code #poll #automation #shell #bash #powershell #basic
Shout out and h/t to Derek Jamison who has very kindly spent time helping me out with a thorny issue in C. The project isn't ready yet, but it wouldn't have been possible to get this far without his kind help, or his #FlipperZero tutorials.
Check out: https://youtube.com/@MrDerekJamison/featured
The two types of C programmers (a provocative thesis) #GoLang #RustLang #CLang
https://utcc.utoronto.ca/~cks/space/blog/programming/CProgrammersTwoTypes
This is a thing now: #clang 16.0 passes my module test suite for the {fmt} library 🎉
With some additions to the primary interface unit related to the C++ standard library, it compiles the BMI and runs the test in the MSYS2 environment, too.
It looks like *importing* user-defined literals dosn't work yet: the namespace is visible, but 'operator""_cf ' isn't. This test is disabled for now.

I wonder what the difference between Swift and clang is, (which, from what I casually picked up over the years, should have been roughly the same core dev teams?) that clang's error messages are so much better than Swift's.
Was it persons who didn't come along onto the Swift team? Is it Swift's large number of syntax constructs but small number of unique syntaxes?
Qt Creator 10 Open-Source IDE Released with #LLVM 16 Support, CMake and C++ Improvements https://9to5linux.com/qt-creator-10-open-source-ide-released-with-llvm-16-support-cmake-improvements
Sure you read K & R, and you know the folklore about Ken Thompson and Dennis Ritchie and the rest.
But that's not really how the C programming language started, the story of C begins in England, in Oxford and Cambridge at different times, with a colleague of Alan Turing. A man who envisioned a checkers program that never came into existence, dreamt of a language that never came into being.
And yet, somehow...
https://arstechnica.com/features/2020/12/a-damn-stupid-thing-to-do-the-origins-of-c/
I heard that Apple and Google pulled out resources from #clang to focus respectively on Swift and... what was it called... Carbon? I wish them the same blazing success of Google Plus. 🤦
@simontoth #cpp #programming
#LLVM 16.0.0 has entered #Gentoo yesterday. Notably, #Clang 16 is more strict than before. If you're using it as a system compiler, then you may hit breakage, including silent misconfigurations.
If you can, please help verifying the bugs filed against our Clang 16 tracker and possibly fixing them or marking the reported configure checks as false positives (QA_CONFIG_IMPL_DECL_SKIP) appropriately:
https://bugs.gentoo.org/870412
LLVM and Clang 16 are out with more complete C++23 and C23 support.
https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html
I wonder if "import std" is finally usable in a real-world codebase?
Our superfast #DNS zone file parser now has fallback functionality to support architectures for which no #SIMD
implementation is available yet. #OpenSource #clang https://github.com/NLnetLabs/simdzone/commit/88028c6e96ffe0fa85fb2c54fced7b4517a3c303
Should we use #c #cprogramming or #clang for the C programming language?
Multiple choice #poll
Implementing DNS-over-QUIC in Unbound is turning out to be quite an adventure, but we're making good progress! #DNS #DoQ #OpenSource #clang #SoftwareDevelopment https://github.com/NLnetLabs/unbound/commit/aa8c9c4367792c674c76181c3fbfdee9996e9be8
In what order did you learn your #programming languages, and what years were you active with them? I'll start:
1. #Ruby 2005-2007 2013-2016
2. #CSharp 2006-2012
3. #AdaLang 2010-2012
4. #CLang 2010
5. #Java 2011
6. #Python 2011-2022
7. #CPlusPlus 2011-2022
8. #RustLang 2016-
This Saturday in the #DNS Devroom at @fosdem Jeroen will be presenting his work on simdzone, a fast and standards compliant DNS zone file parser. 🚀
Running simdzone on an Intel Core i7-1065G7 against an older .com zone file of 12482791271 bytes under Linux (Fedora 37).
GCC 12.2.1, release mode:
$ time ./parser ../../zones/com.zone
parsed 341535548 records
real 0m17.755s
user 0m16.602s
sys 0m1.105s
Hurrah, our #TubularBell has been retrieved from the lift shaft it was dropped down!!
We were rehearsing in a school back in October and had a *bit of an accident when moving the percussion equipment back to the van... The bell made an almighty #clang as it rattled down the void!
Thankfully the school called an engineer and 3 months later the bell has been retrieved in one (straight!) piece. We no longer have to hear DONG DONG (..?..) DONG! 😄
Hello #llvm #clang #objectivec #ObjC folks! What is the significance of the `__got` section in the executable binary? I stumbled upon it when looking at the new objc_msgSend stubs output. https://github.com/llvm/llvm-project/issues/56034
I'm a #c newbie- c has no equivalent of async/await? Not at the language level nor the library level?
By popular demand, I have scanned my copy of Draft #1 of #Kernighan and #Ritchie's C Programming Language book. Here: https://drive.google.com/drive/folders/1OvgKikM8vpZGxNzCjt4BM1ggBX0dlr-y #ComputerHistory #UNIX #CLang
While I'm waiting for the backup to finish, let's do an #introduction !
Howdy y'all! I'm muirrum, and I'm the administrator of social.dino.icu. By day I'm a CS/EE student, network operator, and systems administrator at my university. By night I'm a film projectionist, event producer, and (sometimes) quality code writer.
Please feel free to talk to me about #radio #gentoo #linux #film #events #rust and #clang!
Who are you (as a C person)?
Here's my #introduction
I'm Bert! I've been in #Software development for a long time. I've worked on everything from embedded systems in digital cameras to autoscaling #cloud #architectures.
I learned BASIC in elementary school, Pascal in middle school, #clang in high school, and then went on to #java and now mostly #csharp, although I can find my way in just about any language.
I learned to play #hockey (poorly) as an adult and think it is the best sport out there.
Nice to meet you!