ChristosArgyrop, to random
@ChristosArgyrop@mstdn.science avatar

LLVM Clang 16 vs. GCC 13 Compiler Performance On Intel Raptor Lake https://www.phoronix.com/review/gcc13-clang16-raptorlake via @phoronix

seems faster than

hywan, to rust
@hywan@fosstodon.org avatar
kylewritescode, to programming
@kylewritescode@allthingstech.social avatar

Hey my programming friends, I have a question. My daughter is taking a C class in college and is using CLion to write her stuff. One of the comments her professor keeps saying is “remember to work in a Unix environment.”

I’ve always used an IDE when I program so I’m not sure what that means. Anyone able to help?

Thanks 🙏🏼

synlogic, to golang
@synlogic@toot.io avatar

quality of a better programming language:

  • compiler is your Best Fren

quality of a worse programming language:

  • compiler is your Frenemy

The former:



vs

The latter:
#C



hywan, to random
@hywan@fosstodon.org avatar

bfs 3.0: the fastest find yet!, https://tavianator.com/2023/bfs_3.0.html.

The article presents bfs, a tool written in C, to find files in a file system, like find or fd. It uses a breadth-first approach. It appears to be pretty effective in practise for the usecase described by the author of the article, which is also the author of the tool.

The benchmark is not well-designed and focus on one use case, but it opens doors for other tools to improve.

#clang #find #filesystem #performance

orbifx, to programming
@orbifx@mastodon.social avatar

#c #clang
If your #C library function doesn't mutate memory passed to it but wants to return modifiable pointers, do you const the parameter but cast-away the const on return?
Or do you not const the parameter at all?

The standard library seems to favor the first.

#cprogramming @C @c #programming

gamingonlinux, to random
@gamingonlinux@mastodon.social avatar

What is an actually controversial Linux opinion you hold?

kkarhan,
@kkarhan@mstdn.social avatar

@gamingonlinux This is why Distributions like #AlpineLinux and #ChimeraLinux / @chimera_linux actively remove & replace #GNUtils and work to get #Linux built by #LLVM / #Clang instead of #GCC...

Even I do want to yeet tools out of my workflow...

But @ncommander went into the details re: #RMS!
https://www.youtube.com/watch?v=R2SKenHRhMg

ccgargantua, to programming

When moving to a compiler like from and , what speed pitfalls should I be aware of that optimizations in those compilers typically hold our hand with, but tcc does not?

Any input would be great!

#c

ChristosArgyrop, to random
@ChristosArgyrop@mstdn.science avatar

I've always used #swig to create #perl interfaces to #clang #c , but I noticed there is a #metacpan package Platypus that is a wrapper over libffi.
Any comparative experience?

openmp_arb, to hpc French
@openmp_arb@mast.hpc.social avatar
f_lombardo, to php Italian
@f_lombardo@phpc.social avatar

Current status: building #php from #clang sources. Do you have any pointer to good documentation related to this process?

drahardja, to random
@drahardja@sfba.social avatar

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.

hywan, to random
@hywan@fosstodon.org avatar

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!

#clang #terminal #clipboard

Yank running live.

hywan, to linux
@hywan@fosstodon.org avatar

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!

#linux #safety #clang

cstrotm, to random
@cstrotm@mastodon.social avatar
miquerinus, to random Portuguese
@miquerinus@fosstodon.org avatar

Go language is a C with garbage collection and slower than C.

Change my mind 😏 #golang #clang

Mek101, to programming Italian
@Mek101@fosstodon.org avatar
Mek101, to programming Italian
@Mek101@fosstodon.org avatar

Standards-compliant* alloca() - tavianator.com
https://tavianator.com/2014/alloca.html #c #clang #programming

Mek101, to programming Italian
@Mek101@fosstodon.org avatar

Memory allocation failures are notoriously hard to handle correctly

OOMify - tavianator.com
https://tavianator.com/2020/oomify.html #c #clang #programming

TehPenguin, to programming
@TehPenguin@hachyderm.io avatar

Are there any 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

TehPenguin,
@TehPenguin@hachyderm.io avatar

And the second change that adds CodeView debug info for jump tables: https://reviews.llvm.org/D149367/new/

fell, (edited ) to programming
@fell@ma.fellr.net avatar
ChristosArgyrop, to programming
@ChristosArgyrop@mstdn.science avatar

Why are people stuck in the ANSI #C standard from 1989 when writing new code ?
Even if one does not want to go full 21st century, numerous features that were introduced with the 1999 ISO C standard could make life a lot easier for professionals & hobbyists alike
#clang #programming

ChristosArgyrop, to Perl
@ChristosArgyrop@mstdn.science avatar

WTF is wrong with people and their hatred for #perl ?
@Perl

image/jpeg

ChristosArgyrop,
@ChristosArgyrop@mstdn.science avatar

@mjgardner @kyleha @Perl I see same stuff being passed around about #c #clang by people who are stuck into the 1st edition of K&R.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines