Live data from Hacker News

Show HN: Write your BPF programs in Go, not C

github.com

1–10 of 58 posts

Re: Show HN: Write your BPF programs in Go, not C

#5
In eBPF-land you're going to be calling C functions in the kernel, and using (generally) C data types like structs and null-terminated strings. You can't do loops (loops are unrolled by the compiler), you can't do variadic functions, and you definitely can't take advantage of all the cool Go stuff like goroutines, select, context, etc.

I'm not really sure why you'd want to use this. If you're writing eBPF, you already need to know how to read C kernel source.

Re: Show HN: Write your BPF programs in Go, not C

#8
post #4

What is BPF?

I'm guessing Berkeley Packet Filter: https://en.wikipedia.org/wiki/Berkeley_Packet_Filter

This is why National Aeronautics & Space Administration (NASA) guidance is the following:

> Acronyms often confuse readers. Avoid them whenever possible. If an acronym is necessary for future reference, spell the full word and follow with the acronym in parentheses on the first reference. For example, The General Services Administration (GSA).

https://nasa.github.io/content-guide/abbreviations-and-acron...

There is also this longer memo on the NASA Technical Reports Server: https://ntrs.nasa.gov/citations/19950025292

Re: Show HN: Write your BPF programs in Go, not C

#9
post #4

What is BPF?

I'm guessing Berkeley Packet Filter: https://en.wikipedia.org/wiki/Berkeley_Packet_Filter This is why National Aeronautics & Space Administration (NASA) guidance is the following: > Acronyms often confuse readers. Avoid them whenever possible. If an acronym is necessary for future reference, spell the full word and follow with the acronym in parentheses on the first reference. For example, The General Services Admini…

To be honest BPF is one of those acronyms that I think might be more recognizable as the acronym than what it actually stands for.

Not quite as much as Radar or Laser, but halfway there.

Post reply on HN