frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Alternatives to Nested If Function

https://medium.com/@crispomwangi/7-alternatives-to-nested-if-function-a9cb07f3df1e
1•andsoitis•7m ago•0 comments

LXM: Better Splittable Pseudorandom Number Generators (and Almost as Fast) [video]

https://www.youtube.com/watch?v=XXh86oA-WOE
1•matt_d•8m ago•0 comments

The Unbearable Cheapness of Open Weight Models

https://jamesoclaire.com/2026/06/25/the-unbearable-cheapness-of-open-weight-models/
1•ddxv•9m ago•0 comments

Europe swelters under deadly 'Omega' heatwave, more records broken

https://www.reuters.com/business/environment/power-cuts-france-leave-thousands-sweltering-amid-sc...
1•rawgabbit•11m ago•1 comments

This One's Not AI

https://blog.tacoda.dev/this-ones-not-ai-992c95537790
1•tacoda•11m ago•1 comments

Calculus in Coinductive Form (1998)

https://ieeexplore.ieee.org/document/705675
1•measurablefunc•15m ago•0 comments

Tldr we built the fastest and most compact embedded vector database in the world

https://github.com/Egoist-Machines/LodeDB
1•erinmeryl•18m ago•1 comments

Ask HN: Where is our profession (programmer) going?

1•syntaxbush•19m ago•0 comments

China's Electric Vehicle Exports Reach Record High in May

https://www.bloomberg.com/news/articles/2026-06-24/china-s-electric-vehicle-exports-reach-record-...
2•xbmcuser•19m ago•0 comments

Home Feed does not show releases

https://github.com/orgs/community/discussions/146124
1•oaix•20m ago•0 comments

Supeintelligence Future

1•Siarchitect•22m ago•1 comments

Satteri: A Markdown pipeline forged in Rust for the JavaScript world

https://satteri.bruits.org/
1•handfuloflight•28m ago•0 comments

Show HN: Drive your already-logged-in Chrome from any AI agent

https://github.com/leeguooooo/chrome-use
1•leeguoo•29m ago•0 comments

Medical students are using popular research tool to pump out misleading studies

https://www.science.org/content/article/medical-students-are-using-popular-research-tool-pump-out...
2•rndsignals•31m ago•0 comments

Chinese scientists unveil glowing Avatar-like plants that could light cities

https://www.euronews.com/next/2026/04/02/chinese-scientists-unveil-glowing-avatar-like-plants-tha...
3•thunderbong•32m ago•0 comments

Are you better than the screen watchers?

https://sailsandcommas.com/2026/05/30/are-you-better-than-the-screen-watchers/
1•Curiositry•42m ago•0 comments

Cloudflare launched self-managed OAuth for all

https://blog.cloudflare.com/oauth-for-all/
4•terryds•43m ago•1 comments

Libaui – Tk clone in XCB and C

https://github.com/onanaxm/libaui
2•onuelito•44m ago•0 comments

Zombie unicorns are haunting Silicon Valley

https://www.economist.com/business/2026/06/21/zombie-unicorns-are-haunting-silicon-valley
1•andsoitis•45m ago•1 comments

Electronics can now be printed onto living tissues

https://www.economist.com/science-and-technology/2026/06/24/electronics-can-now-be-printed-onto-l...
2•andsoitis•46m ago•0 comments

Scbkr – an owner-signed responsibility-chain workbench for local LLMs

https://github.com/HIJO790401/scbkr-local-responsibility-model
1•look888•48m ago•0 comments

SystemVerilog

https://en.wikipedia.org/wiki/SystemVerilog
1•handfuloflight•54m ago•0 comments

Accidental Anonymity

https://macwright.com/2026/06/24/accidental-anonymity
1•maxutility•55m ago•0 comments

Mr. Big (Police Procedure)

https://en.wikipedia.org/wiki/Mr._Big_(police_procedure)
3•killingtime74•57m ago•0 comments

Duolicious – Open-source dating app

https://github.com/duolicious/duolicious
4•roger_penrose•58m ago•0 comments

TronBrowser is an open-source, privacy-first, AI-native web browser

https://tronbrowser.dev/
1•buffer_overlord•1h ago•1 comments

Remembering the life and artwork of Ron Spears

https://magic.wizards.com/en/news/feature/remembering-the-life-and-artwork-of-ron-spears
1•WalterGR•1h ago•0 comments

Writers and Drugs

https://lithub.com/are-writers-intrinsically-vulnerable-to-alcohol-and-drugs/
5•dang•1h ago•1 comments

The effortless genius of Super Mario 64

https://ravi64.com/messi-effortless-genius-super-mario-64/
1•merlioncity•1h ago•0 comments

Paintings by Adolf Hitler

https://en.wikipedia.org/wiki/Paintings_by_Adolf_Hitler
3•num42•1h ago•0 comments
Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•1y ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•1y ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).