@chandlerc@hachyderm.io avatar

chandlerc

@chandlerc@hachyderm.io

Software, performance, optimization, programming languages, security, open source, #CarbonLang lead, #LLVM, #Clang, C++. ๐Ÿณ๏ธโ€๐ŸŒˆ http://pronoun.is/he or http://pronoun.is/they

This profile is from a federated server and may be incomplete. Browse more on the original instance.

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

Thanks to whoever mentioned Vivaldi the other day. I've been giving it a try and liking it so far. Not sure how I feel about it still being Chromium based but I like pretty much everything Vivaldi is doing in terms of usability and design, so far.

chandlerc,
@chandlerc@hachyderm.io avatar

@pervognsen I like their current models of revenue, but would really like it if they added an option to pay for the browser directly instead / in addition when that is a better option for folks.

chandlerc,
@chandlerc@hachyderm.io avatar

@pervognsen This isn't my area, so my ideas here may be hopelessly naive...

My current feeling is that this means you can't use mixed revenue models and pick the one that is "OK" for you. You have to be fundamentally "OK" with all revenue models. But if you are, it then seems fine to let you customize which mix you specifically partake in.

That keeps incentives healthy (you're OK with any of the revenue streams being incentivized), but also still gives you some agency?

chandlerc,
@chandlerc@hachyderm.io avatar

@pervognsen Dunno, my inuition is that this is more about moving goalposts and transparency.

So, I don't mind tiered price models, including "free, but we monetize X" (for non-toxic-X). But the really, really have to have up-front and complete disclosure of what is in all tiers, including the one you don't have.

Anything else inevitable feels like a rug-pull and super disrespectful.

Maybe this is what the games are hitting? (I don't know, I'm too far out of gaming world.)

JamesWidman, to random

take of unknown temperature: the concept of an search path (-Ifoo -Ibar ...) that names all header directories of all the libraries you use, all of which may be searched in each individual directive, was a mistake.

in nearly all cases in C/C++, when you include a header (or, in other languages, when you import a module), there is exactly one directory that you want that header to be found in, and so you want it to match with exactly one -I option.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 I think the biggest problem is that you'd need everyone to agree on these directory parameters. Both their spelling, and which ones are used by which project.

And I worry this is trickier than it seems because of transitive headers -- you need the internal includes to also resolve, not just the ones folks see superficially.

But fundamentally, I think a system like you describe could, in theory, work. Just not sure how it would graft onto existing code.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 Existing code currently uses super minimal include paths everywhere and so there isn't likely a directory component you could just re-purpose for this. You'd need everything to actually update to actively try to use the system, and at that point....

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 I mean, if you're thinking mostly about new code etc, you could pick a namespace that already has to have its clashes sorted. For example, the top-level namespace could be the identifier you use here. (This is also pretty close to how Carbon's packages and library names work.)

chandlerc, to llvm
@chandlerc@hachyderm.io avatar
chandlerc, to random
@chandlerc@hachyderm.io avatar

Saw this again, and it remains excellent.

chandlerc, to random
@chandlerc@hachyderm.io avatar

Northern lights in the SF bay area (up on our mountain), wild.

Thanks to @hanadusikova for having the right phone camera to get the great photo.

chandlerc,
@chandlerc@hachyderm.io avatar

More wild in some ways is one of our nest cameras looking out over half moon bay. It ... is sparkling. Like, you can see a few bright spots in this screen capture, but its constantly sparkling throughout the dark regions (need to turn up brightness to see).

I don't have any explanation for this other than the CME... We've zoomed in like this to look at the lights from half moon bay glowing in the night before, no sparkles. So weird.

chandlerc,
@chandlerc@hachyderm.io avatar

"Free dental X-rays" says @hanadusikova

steve, to random
@steve@discuss.systems avatar

The world is shit, but I got to write assembly for like two hours this morning, so life is OK.

chandlerc,
@chandlerc@hachyderm.io avatar

@steve Wait, assembly makes the world use a dimetric rendering??? ๐Ÿคก

chandlerc,
@chandlerc@hachyderm.io avatar

@rygorous @steve I had no idea about RCT, that's amazing! Thanks!

grinn, to emacs
@grinn@emacs.ch avatar

I'm still hopeful clang-format-indent-mode will eventually be accepted into the LLVM project, but for now you can try it out as a separate package:

https://gitlab.com/grinn.amy/clang-format-indent

If you are using clang-format in any of your projects, this might be useful to apply complex .clang-format rules as you type rather than after-the-fact.

Here's the pull request:

https://github.com/llvm/llvm-project/pull/78904

clang-format-indent package usage demo.

chandlerc,
@chandlerc@hachyderm.io avatar

@grinn Nice!! Do you know of any comparable / similar efforts for other editors?

chandlerc,
@chandlerc@hachyderm.io avatar

@grinn I use both vim and vscode, but a teammate I know uses emacs.

chandlerc, to random
@chandlerc@hachyderm.io avatar

Second edition of the Carbon Copy is out!

https://github.com/carbon-language/carbon-lang/discussions/3869

This one discusses Carbon's "unformed state" as a way to address safety risks of uninitialized data but maximizing the control over exactly which tradeoff should be taken, and maximizing the ability to diagnose or mitigate bugs.

chandlerc,
@chandlerc@hachyderm.io avatar

And also just arrived in Vienna Austria for EuroLLVM! Looking forward to seeing folks after way too long and catching up. Can even pester us with questions about unformed state on the Carbon panel!

JamesWidman, to random

i want to play with zig more, but for me the main stumbling block is the absence of a sane LSP server.

(If you're writing an LSP server and you find yourself implementing your own semantic analysis instead of using the compiler's semantic analyzer, you fucked up.)

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79

I think the degree of accuracy and utility provided by, for example, tree-sitter grammars for a large number of languages show just how effectively a gracefully-degrading parser can work to implement much (but not all) LSP functionality, without producing spurious or confusing error messages.

They do gracefully degrade. But they were designed that way, and at times deviate from the underlying language rules to achieve it (a good thing IMO!).

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 The more nuanced approaches taken in modern LSPs for modern languages (Swift and Rust at least) I think are even more powerful, at some complexity cost. But they, again, embrace graceful degradation to be effective.

Even ClangD does -- it uses hilarious amounts of recovery to go past missing headers and such in order to provide functionality, and even has multiple layers that can be used independently to fill gaps here due to the language design headwinds.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 I don't think there is one.

And I suspect it doesn't make sense for to add or support a configuration switch to disable something that has near universal demand from their users -- that's a significant complexity for what all research I have seen indicates is a near universally perceived as worse user experience. =/

I understand, cold comfort for someone who might be the exception.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 This makes sense, but FWIW, ClangD is a bit of an outlier there AFAIK. Even for C++ -- I know of two other LSPs, neither built on the same batch compiler logic.

But I understand your concern. When you duplicate the semantic logic, it can diverge. And when developers are exposed to that divergence, it hurts.

This is a real engineering trade-off, but I don't think it yields a clear single answer. While that is a real risk for an LSP, so is the header-missing UX.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 I mean, why do you trust ClangD at a different version from the Clang compiler? (A necessity if you support multiple versions)

Or why trust ClangD's model rather than looking at assembly -- the code gen layer or LLVM may disagree with what ClangD says. We've even seen bugs like this, where we generated code that could reach more destinations than source analyses built on Clang thought were reachable.

There's risk in trusting an abstraction. But you need abstractions.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 Probably.

My point is that IDE tooling isn't engineering with the primary constraint of constructively assuring that is the case. It is instead trying to achieve a more subjective goal of a good UX for the vast majority of interactions, which is only loosely coupled to exact match of phase X on entity Y.

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79

Most users spend a large fraction of their IDE time w/ incomplete code that does not (yet) compile. As you noted, we can't give constructively correct phase X for that, but it is much more important to give good UX. An LSP can and should prioritize a reasonably helpful mouse-over in incomplete code over a perfectly correct one in all edge cases of complete code.

That may mean inaccuracies in your usage that are not considered bugs by ClangD or any other LSP. =/

chandlerc,
@chandlerc@hachyderm.io avatar

@JamesWidman @dgregor79 AFAIK, this is both very rare and not something any LSP I know of is designed around.

Not saying your use case is invalid, just clarifying that I feel like you are using the LSP as an incredibly specialized tool for a very specific and narrow workflow that happens to mostly overlap the broad tool/workflow that exists.

Noticing the mismatch doesn't mean either is wrong in and of itself, but instead that the expectations of your workflow aren't reasonable for the tool.

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