HackerTrans
TopNewTrendsCommentsPastAskShowJobs

begriffs

no profile record

comments

begriffs
·2 năm trước·discuss
I created a lightweight shell script to check many url combinations on a site for feeds.

https://github.com/begriffs/findrss

The combinations came from what I observed in the big list of blogs I follow. The script works pretty well for most sites.
begriffs
·2 năm trước·discuss
> DDD is still maintained?

Absolutely. I wrote about its features here https://begriffs.com/posts/2022-07-17-debugging-gdb-ddd.html

Since the article was written, the maintainers fixed the issues I pointed out. No need for many of those workarounds now. Versions 3.4.0 and 3.4.1 are substantial.
begriffs
·2 năm trước·discuss
I see CMSIS definitions for the RP2040 at https://github.com/raspberrypi/CMSIS-RP2xxx-DFP but none for RP2350. Maybe they'll eventually appear in that repo, given its name is RP2xxx? I thought vendors are legally obligated to provide CMSIS definitions when they license an ARM core.
begriffs
·2 năm trước·discuss
I have a hard-copy of this book, and it seems like the PDF isn't the final version, judging by the hand drawn illustrations at least.

The book does dive into some old and arcane object file formats, but that's interesting in its own way. Nice to get a comparison of how different systems did things.

After reading that book and other sources, I examined how people typically create libraries in the UNIX/Linux world. Some of the common practices seem to be lacking, so I wrote an article about how they might be improved: https://begriffs.com/posts/2021-07-04-shared-libraries.html

Edit: That covers the dynamic linking side of things at least.
begriffs
·7 năm trước·discuss
> If your buffer isn't a NUL-terminated, then don't call a function that is only defined for NUL-terminated buffers.

It's not that people want to pass strncpy source buffers that lack NUL termination, it's that strncpy in certain situations will not NUL terminate its results.

https://begriffs.com/posts/2019-01-19-inside-c-standard-lib....

> some people claim strlcpy() is 'broken'

Speaking of strlcpy, it thankfully doesn't have the problem that strncpy does. However strlcpy is not in the C standard or in POSIX, so can't be used portably. In C99 snprintf is a better choice.
begriffs
·7 năm trước·discuss
> the same expression broke on a lot of compilers as soon as optimization was turned on

C is not a "try it and see" language. If you stray from the spec then things will act differently and break between compilers. Section 7.13.2 specifies that only local variables declared as volatile will have a determinate value after a longjmp.
begriffs
·7 năm trước·discuss
> you can jump anywhere, not limited to the same function

Outside of the current function, yes. Anywhere, no.

Longjmp allows you to return to places you’ve already been and have saved with setjmp. Also attempting to longjmp to a function that has since returned is undefined behavior. Thus longjmp’s usual use case is like exceptions in other languages, going back up the call chain, skipping intermediate functions.