Better HN
topnewbestaskshowjobs
Log inSign up

dannas

366 karma · joined Nov 3, 2011 (15y ago) · 53 submissions

dannas.name twitter.com/dannas_

People to follow:

  roca
  glandium
  DannyBee
  pm215
  pcwalton
  tptacek
  psykotic
  lvh
  zx2c4
Submissions

comment 3mo ago · link · parent

Rui Ueyama has submitted an article to arxiv on his mold linker. Impressive engineering. The codebase, especially the first versions are a great resource for learning about linkers.

2.

Mold: A Parallel Linker(arxiv.org ↗)

5 points · by dannas · 3mo ago · 1 comment

comment 2y ago · link · parent

There's an ImHex WebAssembly build accessible online at: https://web.imhex.werwolv.net/.

comment 2y ago · link · parent

Here's the photo of different soldering handles: https://x.com/lukego/status/1308366430849716226/photo/1

comment 2y ago · link · parent

I recommend https://eleshop.eu/jbc-bt-2bqa-soldering-station.html

The handle is so light! Active tips! Heats up in 2 seconds. Goes to standby mode when you put away the handle to save the tips.

There's even a lighter compatible precision handle that you can buy.

Luke Gorrie posted a bunch of Twitter threads where he compare the sizes of soldering handles. Can't find it now but https://github.com/lukego/soldering might lead you to them.

comment 2y ago · link · parent

I'm still using Sourcetrail daily for inspecting C++ codebases. Works great. I paid for the first beta and was very sad that the company was not profitable. It really is a great product.

7.

A simple main game loop with ncurses(altdevarts.com ↗)

2 points · by dannas · 3y ago · discuss

comment 3y ago · link · parent

https://dannas.name

Notes on systems programming. Not that many posts but I've reached the HN frontpage on two occasions.

---

* Why should children program? A review of Seymour Papers Mind storms - https://news.ycombinator.com/item?id=12372330

* Views on error handling - https://news.ycombinator.com/item?id=23884505

comment 3y ago · link · parent

Rico Mariani gives his opinions on the future of system programming languages.

His main point is that C++ with EH introduces too much bloat; that the opaque error handling combined with no compiler assisted checking hides bugs; and that you can't write C++ codes from "the books" since it leads to more bugs!

With Rust you can write it like in the books!

"Modern C++ has so many hazards and is so costly that I can't but view it as anything less than a total failure in the systems space. I can't begin to tell you how disappointing this is to me. "

10.

Why I Think Rust Is the Way Forward(ricomariani.medium.com ↗)

7 points · by dannas · 3y ago · 1 comment

comment 4y ago · link · parent

=== Cut needless words ===

The article references Covingtons How to Write more Clearly, Think More Clearly [...] Powerpoint presentation [1]. I highly recommend it!

A fun part in that presentation is when Covington, in a series of steps, revises this sentence...

“One of the best things you can do for yourself to improve your writing is to learn how to cut out words that are not necessary.”

..Into this one:

“To improve your writing, cut out unnecessary words.”

OPs article calls for more words to provide context. But by revising you can often cut the length in half.

[1] https://www.covingtoninnovations.com/mc/WriteThinkLearn.pdf

comment 4y ago · link · parent

As for contributions from the gamedev industry, here's a EuroLLVM 2022 presentation from Orlando Cazalet-Hyams working at Sony: https://www.snsystems.com/technology/tech-blog/improving-deb...

comment 4y ago · link · parent

[gcc/gdb/LLVM outsider here]

If someone is interested in what's being done to improve LLVMs debuginfo, here's a talk by Djordje Todorovic from two years ago: https://www.youtube.com/watch?v=GpMLt1oecOk. It's about tracking dwarf locations for variables by keeping around information from the parent frame. According to that presentation, at least that work has been progressing.

14.

Kernighan Software Tools in Rust(dannas.name ↗)

3 points · by dannas · 4y ago · discuss

15.

What Metric to Use When Benchmarking?(tratt.net ↗)

30 points · by dannas · 4y ago · 13 comments

comment 4y ago · link · parent

Has anyone had a chance to read this yet? Is it a good complement to Brendan Greggs and Denis Bakhvalov books?

What more besides the ideas in Richards ACM Queue article are present? https://queue.acm.org/detail.cfm?id=3291278

How does his KUTrace Linux kernel patches differ from the existing tracing infrastructure? This talk [1] seems to suggest that the reason his KUTrace is so fast is because the other tracers collect more information.

How does the tracing capabilities here compared to what the Windows WPA subsystem can offer? Does it have less overhead for collecting such traces?

Sampling profilers like Superluminal claims to be able to recognize very small delays. For how many cases do you need something like KUTrace and when is Superluminal enough?

[1] https://www.youtube.com/watch?v=UYwWollxzAk I felt a little uneasy watching it due to Richard being so disagreeable to anyoone asking him questions

17.

Understanding Software Dynamics by Richard Sites(pearson.com ↗)

1 points · by dannas · 4y ago · 1 comment

comment 4y ago · link · parent

I thought the same thing when I read the blogpost.

19.

Computing Performance: On the Horizon by Brendan Gregg(usenix.org ↗)

12 points · by dannas · 5y ago · discuss

20.

C++ – how to read a file into a string(0x80.pl ↗)

2 points · by dannas · 5y ago · discuss

21.

Securing C Code – Ante Up by Rico Mariani(ricomariani.medium.com ↗)

1 points · by dannas · 5y ago · discuss

22.

Standard C Loop Idioms(dannas.name ↗)

2 points · by dannas · 6y ago · discuss

23.

Debugging Optimized Code by Rico Mariani(medium.com ↗)

1 points · by dannas · 6y ago · discuss

comment 6y ago · link · parent

Yes, providing good error message is a hard problem. Writing a parser that just bails out when it encounters and error is easy. Writing one that provides error messages that are useful to the user is a _lot_ more work. That's a dimension I didn't touch on in the article.

I would be interesting to do a follow-up to this post where I compare the error handling for some common libraries/programs and ask the authors on what trade-offs the faced when designing error handling. It's a subject, I beliveve, that is often overlooked.

comment 6y ago · link · parent

Speaking of C++ exceptions: Andrei Alexandruesco has investigated the performance impact of replacing exceptions with error codes. Dave Cheney made a summary of Andreis points in https://dave.cheney.net/2012/12/11/andrei-alexandrescu-on-ex...

* The exceptional path is slow (00:10:23). Facebook was using exceptions to signal parsing errors, which turned out to be too slow when dealing with loosely formatted input. Facebook found that using exceptions in this way increased the cost of parsing a file by 50x (00:10:42). No real surprise here, this is also a common pattern in the Java world and clearly the wrong way to do it. Exceptions are for the exceptional. * Exceptions require immediate and exclusive attention (00:11:28). To me, this is a killer argument for errors over exceptions. With exceptions, you can be in your normal control flow, or the exceptional control flow, not both. You have to deal with the exception at the point it occurs, even if that exception is truly exceptional. You cannot easily stash the first exception and do some cleanup if that may itself throw an exception.

comment 6y ago · link · parent

More context to that quote: >Per Vognsen discusses how to do course-grained error handling in C using setjmp/longjmp. The use case there were for arena allocations and deeply nested recursive parsers. It’s very similar to how C++ does exception handling, but without the downsides of the costly C++ memory deallocation on stack unwinding.

I have never used setjmp/longjmp myself. And I agree with you that my first instinct would be to use it in the similar manner as in many GUI programs: they have have a catch statement in the message loop that shows a dialog box of the thrown exception. You just jump to a point where you print a user friendly error message and exit.

But I still can imagine use cases where you've isolated all other side effects (locks, shared memory, open file handles) and are just dealing with a buffer that you parse. Has anyone used setjmp/longjmp for that around here?

Given your many years in the field and Cygnus background I guess you've used it a few times? Do you happen to have any horror stories related to it? :-)

12