Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
int0x80
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
Show HN: A C Compiler written with help of Claude
(github.com)
4 points
by
int0x80
5d ago
|
0 comments
2.
▲
by
int0x80
2y ago
There is one common pattern which is required in many use cases when working and representing ASTs - having a `parent` node, or having access to parents and children. This complicates ownership implementation. Additonally, is essential to
3.
▲
by
int0x80
3y ago
>In this formulation, a language server needs to just enough analysis to drill down to a specific node. Does rust-analyzer compute semantic information on the fly and incrementally?
4.
▲
by
int0x80
3y ago
Very interesting and inspiring post. I am considering also to start my own indie software business, this is great information.
5.
▲
by
int0x80
3y ago
One thing that is risky about git reset --hard is that any non-committed changes are lost. That has bitten me a few times.
6.
▲
by
int0x80
3y ago
Sometimes, you have to make a complex feature or fix. You can first make a prototype of the code or proof of concept that barely works. Then you can see the gap that remains to make the change production ready and the implications of your
7.
▲
by
int0x80
3y ago
Exceptions are a very useful tool. In your example, the main program logic is buried in error handling which makes it more difficult to read the code and the code becomes more complex, leading to more bugs. In many cases, it's preferab
8.
▲
by
int0x80
3y ago
I know very well what it means to care about a memory allocation cost or an atomic operation in a fast path. In some applications though, that is not the dominating performance factor, instead the algorithm dominates. For example, with C+
9.
▲
by
int0x80
3y ago
When I mention constructors I am talking about initializer lists and all the subtleties and special cases around them. Basically most of the complexity I mention comes from memory management. It's just a lot of details to know about a
10.
▲
by
int0x80
3y ago
I find today's C++ extremely challenging to pick up speed for someone coming from let's say, Java. Smart pointers, pointer/references, rvalue reference, copy/move semantics, (perfect) forwarding, constructors, and how a
11.
▲
by
int0x80
3y ago
If a static analyzer is sound, which is something that can be mathematically proven (formal method), will find ALL existing issues plus some false positives if it's not complete (which is almost always the case).
12.
▲
by
int0x80
3y ago
Fuel taxes don't address the same issue. Availability of chargers is a blocker for EV adoption. The measure directly helps with that problem, while fuel taxes is a more indirect push. In other words, even if you are heavily pushed b
13.
▲
by
int0x80
3y ago
Very useful learning project. It's written in C mostly. Would be cool to do something similar in Rust.
14.
▲
by
int0x80
4y ago
gobject is trying to add OOP to C. C already has a type system indeed, however it can be considered weakly typed.
15.
▲
by
int0x80
4y ago
Neat! The implementation is simple, clean and well structured -- a good way to understand in more detail how a FUSE filesystem is implemented.
16.
▲
by
int0x80
4y ago
Because most problems like merging and resolving correctly, or rebasing or squashing if needed don't get resolved by cloning a new repo. If you avoid learning the tool and you just clone a new repo when you have a problem you won'
17.
▲
by
int0x80
4y ago
I find this as being indirect and dancing around the issue. When I do e.g. a code review and I see a glaring defect on it - I point it out very clearly and directly to make sure there is no misunderstanding - I say, XYZ is incorrect. Beca
18.
▲
by
int0x80
4y ago
There is __attribute__((aligned)) that some compilers provide (e.g. gcc, clang) but it's non-standard.
19.
▲
by
int0x80
4y ago
You say "be a programmer" to make it sound demeaning. I am not a "programmer" I am a software engineer, which is a very different way to put it. Studying CS to be a software eng is definitely not over kill.
20.
▲
by
int0x80
4y ago
"Principles of Program Analysis" covers the subject very well. It's not an easy or beginner book because it's very formal, but very complete and with plenty of examples.
21.
▲
by
int0x80
4y ago
The problem is what I mentioned at the end of my other comment -- complex programs will get inputs from web APIs, console, database, so it's not possible to have complete runtime coverage for all paths in the interpreter on the general
22.
▲
by
int0x80
4y ago
Something very close to this can be done and it's in fact done already by static analysis. Static analysis doesn't have any Turing complete problem. Static analysis has a limitation of providing complete answers because of the
23.
▲
by
int0x80
4y ago
First of all, because it makes reviewing the code for reviewers much easier. Reviewing a messy set of random uncurated commits is really suboptimal. Second, you might have more than one commit you want to merge to master, not just a single
24.
▲
by
int0x80
4y ago
Nobody mandates developers about their private repos and commits, nobody cares about that. This is about what gets merged into master or what gets submitted for review.
25.
▲
by
int0x80
4y ago
>C++ syntax is Turing-complete, so due to the halting problem, finding the declaration can take a long time, potentially unlimited in pathological cases. Absolutely not unlimited time. Once it's parsed and semantically analyzed you
26.
▲
by
int0x80
4y ago
Because lots of small functions increase the system complexity by creating interdependencies. You also don't have context in each function to understand the big picture and very small functions can be meaningless on its own. You have
27.
▲
by
int0x80
4y ago
Final decisions are made by totally independent folks like Linus, Greg or Andrew. They set the rules and also the community, corporate has to adapt to them or go away. Also, what happens is that rewrites happen progressively, in small step
28.
▲
by
int0x80
5y ago
I know were you are comming from, but it was very much not the only thing. The elegant model of C pointers to model memory and CPUs are definitely good aspects of C as well as its speed, transparency and overall simplicitity. Trying to cla
29.
▲
by
int0x80
5y ago
I spend most of my time thinking what needs to be done, and how to do it. Then I make the simplest possible prototype/POC and re-check my ideas. Then I think about use cases (test cases, actually) and keep iterating making small modi
30.
▲
by
int0x80
5y ago
> Energy production problem, not a blockchain problem Yeah. But blockchain energy requirements are definitely a blockhain problem. That's the main problem.
More ›