home.social

#clang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #clang, aggregated by home.social.

fetched live
  1. My Summer course is over. I didn’t learn much because I don’t think 5-weeks is enough time to internalize the many different parts of a proper Data structure and algorithms course. So rather than wingding and complaining I just went ahead bought a physical #computerscience textbook and I’m going work through that from start to finish. It’s in #clang but I’m sure all the general use information will be applicable to any other language. If my school isn’t going to educate me I’ll do it myself.

  2. My Summer course is over. I didn’t learn much because I don’t think 5-weeks is enough time to internalize the many different parts of a proper Data structure and algorithms course. So rather than wingding and complaining I just went ahead bought a physical #computerscience textbook and I’m going work through that from start to finish. It’s in #clang but I’m sure all the general use information will be applicable to any other language. If my school isn’t going to educate me I’ll do it myself.

  3. Виды связываний (external, internal, no linkage) для самых маленьких

    Если вы когда-нибудь собирали проекты на C++, то практически наверняка получали ошибку от линковщика формата: /usr/bin/ld: /tmp/ccYa2eaO.o: в функции «foo()»: foo.cpp:(.text+0x0): повторное определение «foo()»; /tmp/ccKEs5I7.o:main.cpp:(.text+0x0): здесь первое определение collect2: error: ld returned 1 exit status Опытным C++ разработчикам эта проблема известна как ODR (One Definition Rule). Но корень этой ошибки выходит далеко за рамки «используй inline в .hpp » и «не определяй ничего в .hpp ». В этой небольшой статье мы попробуем разобраться, как наши объектные файлы, которые мы создаем, видит линковщик и другие единицы трансляции, и при чём здесь таблица символов.

    habr.com/ru/articles/1063468/

    #C++ #clang++ #g++ #ld #cpp

  4. I'm very confused because I was seeing a memory leak on #libcurl on #macos :mac: but not on #linux :linux:
    I reduced the repro to a very simple app, and turns out the problem was that the *Address Sanitizer itself* leaks memory in the mac version???

    Happens with both #Clang and #GCC, so maybe this is actually a #LibreSSL problem that #OpenSSL doesn't have?

    Anyway, it's way past my bedtime, so I'm just leaving this mini-rant here in case anyone that knows about this sees it. 🤞😴

  5. Things I've learned today:
    - Valgrind does not support AVX512 instructions. That was an adventure because I was writing purposefully bad code at the time...
    - However, changed strategies and used `clang` with the `fsanitize=address,undefined` option which seems to work perfectly fine.

    #clang #programming #troubleshooting

  6. Things I've learned today:
    - Valgrind does not support AVX512 instructions. That was an adventure because I was writing purposefully bad code at the time...
    - However, changed strategies and used `clang` with the `fsanitize=address,undefined` option which seems to work perfectly fine.

    #clang #programming #troubleshooting

  7. Парсер C++ на своем DSL: попытка обогнать компилятор

    Проекты растут. Кодовая база растёт. Время компиляции растёт вместе с ними и переходит все границы разумного. В какой-то момент я решил: а что если попробовать написать свой компилятор? Пока только для разработки, не для прода . На замену Clang++/G++/CL.EXE. Эта статья — о первом шаге на этом пути. О парсере C++, который я написал на своём DSL специально сделанном для этого изначально. Матчинг запущен? Кооперация предложена?

    habr.com/ru/articles/1058150/

    #С++ #компиляторы #Парсеры #генераторы_парсеров #разработка #алгоритмы #open_source #C #g++ #clang

  8. Introducing fmetrics: Fast Image & Video Fidelity Metrics in C, Zig

    halide.cx/blog/fmetrics/

  9. 🚀 Android NDK r30 Beta 2 is here!

    Highlights:
    ✅ LLVM updated to clang-r574158b
    🐛 Compiler & LTO fixes
    🔍 Better LLDB debugging
    ⚡ Improved ARM dot product code generation

    Details: github.com/android/ndk/release

    #Android #AndroidDev #NDK #LLVM #Clang #CPP

  10. Why it required a compiler-specific language extension (although thankfully all the compilers that matter, ie and , have converged on the same extension) is beyond me. Being able to detect an overflow is such an obviously useful thing to do that it was implemented in the very first microprocessor, the . I used it heavily in code on the in the 1980s. A mechanism for making use of that flag should have been in the C standard for *decades* by this point. 4/4

  11. Why it required a compiler-specific language extension (although thankfully all the compilers that matter, ie #gcc and #clang, have converged on the same extension) is beyond me. Being able to detect an overflow is such an obviously useful thing to do that it was implemented in the very first microprocessor, the #Intel4004. I used it heavily in #assembler code on the #Z80 in the 1980s. A mechanism for making use of that flag should have been in the C standard for *decades* by this point. 4/4

  12. I just found an error in my printed edition of "Pointers on C":

    The Programs 5.1 (page 96) & 5.2 (page 100) use a left shift, when it should be a right shift.

    (And this error has been corrected in the PDF version that I have)

    However, I really like the book overall! It was a great recommendation, and I enjoy reading it so far! 🙂

    @xexyl @sirwumpus

    #c #cProgramming #clang #pointersOnC

  13. I just found an error in my printed edition of "Pointers on C":

    The Programs 5.1 (page 96) & 5.2 (page 100) use a left shift, when it should be a right shift.

    (And this error has been corrected in the PDF version that I have)

    However, I really like the book overall! It was a great recommendation, and I enjoy reading it so far! 🙂

    @xexyl @sirwumpus

    #c #cProgramming #clang #pointersOnC

  14. Quick and dirty VSCode project for WSL/Ubuntu for getting started with coding in #C for #C64 :
    codeberg.org/csepp/llvm-mos-sa

    Made for my partner and generally for people who might be new to C and for some reason want to learn it while they also learn Commodore 64 programming. She hasn't tried it yet, so I can't vouch for the followability of the docs.

    Uses #LLVMMOS / #Clang / #clangd to make things a bit more ergonomic. I know about CC65 and its debug info and VICE support was tempting, but better code navigation and static analysis IMHO wins.

    PRs that set up support for other IDEs are welcome, as long as they don't break VSCode.

    cc: #theWorkshop

  15. Quick and dirty VSCode project for WSL/Ubuntu for getting started with coding in #C for #C64 :
    codeberg.org/csepp/llvm-mos-sa

    Made for my partner and generally for people who might be new to C and for some reason want to learn it while they also learn Commodore 64 programming. She hasn't tried it yet, so I can't vouch for the followability of the docs.

    Uses #LLVMMOS / #Clang / #clangd to make things a bit more ergonomic. I know about CC65 and its debug info and VICE support was tempting, but better code navigation and static analysis IMHO wins.

    PRs that set up support for other IDEs are welcome, as long as they don't break VSCode.

    cc: #theWorkshop

  16. [$] Hardening the kernel with allocation tokens and bootpatch-SLR

    There is a lot of work going into eliminating exploitable bugs from the kernel and preventing the addition of new ones. Even if this work is maximally successful, though, there is [...]

    lwn.net/Articles/1078699/ #LWN #Linux #kernel #GCC #LLVM #Clang #Git

  17. [$] Hardening the kernel with allocation tokens and bootpatch-SLR

    There is a lot of work going into eliminating exploitable bugs from the kernel and preventing the addition of new ones. Even if this work is maximally successful, though, there is [...]

    lwn.net/Articles/1078699/ #LWN #Linux #kernel #GCC #LLVM #Clang #Git

  18. [$] A helper library for BPF arenas

    BPF arenas are areas of memory (potentially shared with user space) where programs have free reign to build their own data structures, unburdened by the verifier's bounds checks. M [...]

    lwn.net/Articles/1078526/ #LWN #Linux #kernel #GCC #Clang #Git #BPF #LSFMMBPF

  19. [$] A helper library for BPF arenas

    BPF arenas are areas of memory (potentially shared with user space) where programs have free reign to build their own data structures, unburdened by the verifier's bounds checks. M [...]

    lwn.net/Articles/1078526/ #LWN #Linux #kernel #GCC #Clang #Git #BPF #LSFMMBPF

  20. It is not difficult to reproduce most of the functionality in FAISS with hand rolled <2k LOC #OpenMP device code, with equivalent performance if one were to use a reasonably modern #clang compiler (I have blacklisted #gcc for offloading). Benefit: one does not need a full conda environment

  21. Using #sdl2 I finally got my sound working for my PAC-MAN clone in #clang Most of my audio code is pretty much lifted and shifted from LazyFoo (see the link below), I got some .wav files from Sprite Resources and I got them coded up into my game project. I think I have almost all the bones on the skeleton of the project. I just need to get the scoring, and the scene transitions and I'll be all good. As always my code is in my Git repository.

    [lazyfoo.net/tutorials/SDL/21_s]

  22. [$] The first half of the 7.2 merge window

    The 7.2 merge window started with the 7.1 kernel release on June 14. As of this writing, just over 7,000 non-merge changesets have been pulled into the mainline for the next kerne [...]

    lwn.net/Articles/1078068/ #LWN #Linux #kernel #LLVM #Clang #Rust #Git #XFS #BPF

  23. [$] The first half of the 7.2 merge window

    The 7.2 merge window started with the 7.1 kernel release on June 14. As of this writing, just over 7,000 non-merge changesets have been pulled into the mainline for the next kerne [...]

    lwn.net/Articles/1078068/ #LWN #Linux #kernel #LLVM #Clang #Rust #Git #XFS #BPF