News for hackers. Stuff that matters.

begriffs

Re:Deep dive into finding RSS feeds on Friday December 06, 2024 @08:11PM (#42346341)
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.

Re:Seer: A GUI front end to GDB for Linux on Friday November 15, 2024 @10:25AM (#42147730)
> 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.

Re:Introducing the RP2350 on Thursday August 08, 2024 @05:58PM (#41196780)
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.
Re:Linkers and Loaders (1999) [pdf] on Wednesday March 06, 2024 @01:12PM (#39618976)
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.

Re:RSS Autodiscovery (2006) on Thursday June 22, 2023 @11:42AM (#36433901)
Interesting, maybe it depends on the reader. I tried a channel just now in newsboat and it wasn't smart enough to find the feed, even though I see the page contains

    <link rel="alternate" type="application/rss+xml" title="RSS" href="...">
Re:RSS Autodiscovery (2006) on Thursday June 22, 2023 @11:24AM (#36433590)
Oh yeah, gotta love the secret feed link.

    https://www.youtube.com/feeds/videos.xml?channel_id=$FOO
I follow a number of channels this way. I'm grateful and sort of surprised YouTube hasn't killed it off.
Re:RSS Autodiscovery (2006) on Thursday June 22, 2023 @11:20AM (#36433499)
I still follow many RSS feeds (about 250). Sometimes it's hard to find the feed on a site, because the feeds aren't always advertised and their URLs can be tricky. Based on the URLs I've seen, I created a simple script to check if a site has a feed:

https://github.com/begriffs/findrss

Re:IUP – Cross platform C GUI library on Thursday May 25, 2023 @10:14AM (#36070988)
I've been meaning to give Motif a try for cross-platform C GUIs. Can anyone share their perspective with that, and compare with IUP?

Ask HN: How to protect blog from AI search?

In the past, search engines were helpful in promoting content from independent bloggers like myself. However, the new AI search engines will paraphrase entire articles, giving visitors little reason to follow a link to primary sources.I believe AI search engines violate the so-called "moral rights" [0] of intellectual property -- specifically attribution, and (possibly) integrity. I don't want...

( Read More... | 1 comment | on HN )
I put together a list of the best linear algebra books, classified by type. Proskuryakov's practice book is one of them. Here's the full list:

https://begriffs.com/posts/2016-07-24-best-linear-algebra-bo...

Re:Common libraries and data structures for C on Tuesday May 17, 2022 @12:07AM (#31405934)
As I got more into C programming, I started looking for data structure libraries. Found a few [0]. Also evaluated sc, but it had too much pre-processor magic for my taste. It also bundles random "stuff" like a URI parser, a thread abstraction, etc.

Eventually I rolled my own [1] more focused library. It's basic and portable.

0: https://begriffs.com/posts/2020-08-31-portable-stable-softwa... 1: https://github.com/begriffs/libderp

Re:Debugging with GDB on Monday March 21, 2022 @11:38PM (#30762489)
Good idea to just abort it. :)

However, I tried your suggestion from another terminal, and gdb appears to shield the program somehow. What ended up working is running "signal SIGABRT" from within gdb.

One thing that's still lacking is gcore's ability to take a snapshot of the core without killing the program. "Unlike after a crash, after gcore finishes its job the program remains running without any change." https://www.man7.org/linux/man-pages/man1/gcore.1.html

Re:Debugging with GDB on Monday March 21, 2022 @03:50PM (#30758880)
> OpenBSD, where you get core files by default

By this, are you referring to the behavior: "By default, this memory image is written to a file named programname.core in the working directory, provided the terminated process had write permission in the directory[...]" (from https://man.openbsd.org/core.5) ?

Also, do you know if there's a way to obtain a core file from a running process on OpenBSD? I don't see a port of gcore, and (e)gdb on OpenBSD doesn't support the generate-core-file command (it says, "Can't create a corefile").

Re:Modern C on Friday September 04, 2020 @01:49PM (#24377224)
The ##C freenode channel's webpage has a great list of books as well:

http://www.iso-9899.info/wiki/Books

I like that it includes books to avoid, and ideas for further topics.

Re:Unicode in five minutes (2013) on Friday August 14, 2020 @11:58AM (#24159602)
Anybody here ever create graphical apps with Motif? Care to share your experience?

Motif appears to have an old and stable API. Its visual style looks grey and blocky, but has a rich widget toolkit.

https://www.oreilly.com/openbook/motif/

Re:Should I Use Threads? on Thursday May 14, 2020 @01:43AM (#23175774)
Well that was certainly a lot of fluff and FUD.

OP says:

> Look at your program's CPU usage. If the sum of your threads is <100% of one core, then there is no reason whatsoever for you to use threads.

Attacking a CPU-bound problem with parallelism is only one reason for using threads. Concurrency (even on one processor) has benefits.

> The shame is in believing ourselves super-human, and reaching for a tool that we don't need, in full knowledge that we're likely to shoot ourselves in the foot with it.

Although synchronization primitives require care, they're not that hard. You don't need super-human powers.

I took some time to understand pthreads and apply them to example programs. For a careful and balanced overview, see my article:

https://begriffs.com/posts/2020-03-23-concurrent-programming...

As you mention, the fundamental integer types have guaranteed minimum sizes (or pedantically a range that matches the following sizes if twos' complement is used):

* >=8 bits: char (CHAR_BIT is exactly 8 in POSIX)

* >=16 bits: short and int

* >=32 bits: long

* >=64 bits: long long

The C99 typedefs like uint16_t have to be chosen internally to be one of the underlying types. For those sizes that have no matching underlying type, the implementation will omit typedefs.

However don't forget the more flexible C99 typedefs int_leastN_t and int_fastN_t. They both will give you a type of at least N bits, where the "fast" one chooses whichever type is most convenient for the processor, and the "least" version picks whichever is smallest. (For instance int_least16_t is probably short, and int_fast16_t is probably int.)

Re:Tell HN: C Experts Panel – Ask us anything about C on Tuesday April 14, 2020 @06:16PM (#22872165)
Your best bet is probably to use a library like ICU.

Here are examples of working with unicode in C: https://begriffs.com/posts/2019-05-23-unicode-icu.html

Re:Tell HN: C Experts Panel – Ask us anything about C on Tuesday April 14, 2020 @05:40PM (#22871823)
Has there been a survey to determine what percentage of known compilers support each C version, like C89, C99, C11? I've been sticking to C99 because I assumed later versions won't be widely adopted for a long time to come. Is this accurate?

Older »