Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rui314
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
rui314
10y ago
The document is outdated and needs updating. Linker script support has improved a lot since 3.9, and that's why it can now link the entire FreeBSD base system including kernel. It's still in active development (e.g. it can't
92.
▲
by
rui314
10y ago
Would it be easier to write a HTTP server in C and compile to Brainfuck using ELVM ( https://github.com/shinh/elvm )?
93.
▲
A C compiler for Brainfuck
(gist.github.com)
3 points
by
rui314
11y ago
|
0 comments
94.
▲
by
rui314
11y ago
The standard says too little about the preprocessor. I don't think you can implement a preprocessor that can read system header files only with the standard.
95.
▲
by
rui314
11y ago
That's what I want to try next time. There are pros and cons in using the parser generator, but the tool seems to be useful at least if you want to create a small compiler which don't aim Clang-level diagnostics.
96.
▲
by
rui314
11y ago
I was already working at Google full-time (for an unrelated project) when I was writing this in my spare time.
97.
▲
How I wrote a self-hosting C compiler in 40 days
(sigbus.info)
429 points
by
rui314
11y ago
|
120 comments
98.
▲
by
rui314
11y ago
This self-referencing naturally occurs if you are writing a self-hosting compiler. I have read the Ken's paper, but when I was writing my C compiler in C ( https://github.com/rui314/8cc/blob/master/le
99.
▲
by
rui314
11y ago
One thing we could learn is that the pre-war Japanese Constitution had a serious problem. The Constitution gave all powers to the Emperor and let him govern the country through the parliament, cabinet, courts, army and navy. That was interp
100.
▲
by
rui314
11y ago
As I wrote in the blog post, we didn't take a closer look at the performance difference, and I know that "measure, don't guess" is maxim. But if I risk it, I believe there are some differences that could make a differenc
101.
▲
by
rui314
11y ago
If you are talking about archive files (.a files), then the answer is yes. lld is not sensitive to the order of archive files in the command line. For any undefined symbol, if there exists a file that defined the symbol, the file gets linke
102.
▲
by
rui314
11y ago
LD_PRELOAD and LD_AUDIT are the features of the dynamic linker or ld.so. The dynamic linker is a process to read an executable and DSOs in memory, fix up images in memory to make it really ready to be executed by a CPU. lld is a linker whic
103.
▲
by
rui314
11y ago
In 90s, emojis were not interchangeable. Mobile careers were adding new emojis to their proprietary character sets to differentiate their services from others. Standardization would ruin that marketing efforts.
104.
▲
by
rui314
12y ago
Another reason why I prefer this style is modularity. Each file does only one thing (in this compiler a file is a compiler pass or defines a data structure) and exposes only a limited set of functions. Other functions are marked as "st
105.
▲
by
rui314
12y ago
It's not correct to say that I'm working with Rob Pike. I contributed code to Go project in my spare time but that was a hobby. I'm working for LLVM team at Google and not for Go team. And the naming is, although it may sound
106.
▲
by
rui314
12y ago
C is not a simple language as a CIL guy says [1]. I wrote my own C compiler [2] and I can say that writing a parser was harder than I thought. It would take more than half a day at least. [1] http://www.cs.berkeley.edu/~necu
107.
▲
by
rui314
13y ago
If you are interested in this, you may find one of my Lisp implementation interesting too. It's implemented less than 1k lines of heavily-commented C, but it even supports a macro system and copying GC in addition to the common feature