[-] BB_C@programming.dev 1 points 2 days ago

why gcc couldnt do this automatically? i mean its supposed to do this right?

Because gcc is a compiler, not a build tool.

Maybe you come from a language where the two tasks are combined, but that's not the case here.

and another important issue that clang ls (language server) showed the same error? i thought fixing this would fix that too, but that isnt the case here.

For the same reason stated above, clangd needs to know how you build your code. This is done via a JSON file called compile_commands.json.

In your trivial case, running this should be enough:

clang -MJ- main.c `pkg-config --cflags --libs dbus-1` > compile_commands.json
[-] BB_C@programming.dev 2 points 2 days ago
% pkg-config --cflags dbus-1
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
% pkg-config  --libs dbus-1
-ldbus-1
gcc main.c `pkg-config --cflags --libs dbus-1`

You don't need to link against the library yet, but you will.

Linking might become a separate step when you have multiple files, not just main.

[-] BB_C@programming.dev 1 points 2 days ago

how does that help when I’m searching a non-Rust project via the GitHub web search interface

Fair.
But you are writing a comment under a topic regarding a Rust-flavored IDE, posted to a Rust community. With neither the IDE nor Rust involved, your quoted problem statement is 100% off-topic.

[-] BB_C@programming.dev 1 points 3 days ago

There is a YouTube video in Servo's homepage.
The first minutes of that video answer your question.

[-] BB_C@programming.dev 35 points 3 days ago

A reminder that the Servo project has resumed active development since the start of 2023, and is making good progress every month.

If you're looking for a serious in-progress effort to create a new open, safe, performant, independent, and fully-featured web engine, that's the one you should be keeping an eye on.

It won't be easy trying to catch up to continuously evolving and changing web standards, but that's the only effort with a chance.

[-] BB_C@programming.dev 6 points 3 days ago* (last edited 3 days ago)

I for one am happy we’re getting an alternative to the Chrome/Firefox duality we’re stuck with.

Anyone serious about that would be sending their money towards Servo, which resumed active development since the start of 2023, and is making good progress every month.

I would say nothing but "Good Luck" to other from-scratch efforts, but It's hard not to see them as memes with small cultist followings living on hope and hype.

[-] BB_C@programming.dev -1 points 4 days ago* (last edited 4 days ago)

My post was a showcase of why there is no substitute for knowing your tools properly, and how when you know them properly, you will never have to wait for 5 minutes, let alone 5 years, for anything, because you never used or needed to use an IDE anyway.

This applies universally. No minimum smartness or specialness scores required.

[-] BB_C@programming.dev 0 points 4 days ago

Not sure how what I write is this confusing to you.

  • Tests don't necessarily live in paths containing test.
  • Code in paths containing test is not necessarily all tests.
  • cargo expand gives you options for correctly and coherently expanding Rust code, and doesn't expand tests by default.
  • rg was half a joke since it's Rust's grep. You can just pipe cargo expand [OPTIONS] [ITEM] output to vim '+set ft=rust' - or bat --filename t.rs and search from there.
[-] BB_C@programming.dev 1 points 6 days ago

What part are you struggling with?
The ripgrep (rg) part, or the cargo expand part?

[-] BB_C@programming.dev -2 points 6 days ago

You two bring shame to the programming community.
Just ripgrep cargo expanded output for f**** sake.

10
20
[-] BB_C@programming.dev 51 points 2 months ago* (last edited 2 months ago)

Examples ARE usage documentation.

What value is this blog supposed to be adding exactly?
The fact that top-level and API descriptive explanations are important?
The fact that some projects don't have complete documentation?
To whom exactly would this be considered new information?

[-] BB_C@programming.dev 28 points 7 months ago

What’s interesting is that this problem is largely solved for C and C++: Linux distributions like Debian

[closes tab]

view more: next ›

BB_C

joined 1 year ago