Hacker News new | past | comments | ask | show | jobs | submit | brianon99's comments login

LOC is not a good way to measure the "bloatness" of a software. There is a significant amount of device driver code in linux kernel. With the number of devices exponentially increasing, it is inevitable, but it does not make the kernel more complex.

A truck is not more complex than a car. A truck is bigger because it is designed to carry more load.


Things have changed over the years. Even if the developers have patched gcc, or "own" gcc, linux still have to be built with gcc 4.4 otherwise many distro will have problems, so it does not solve the problem.

Moreover, change the semantics of C as you have suggested will break other non-linux-kernele existing programs. There may exists programs depending on the K&R version of max with side effect. Who nows?


I think asking the GCC developers for a builtin form of __is_constant would be a sensible step, so that the worst of those macros can eventually be retired.


There are many projects recently titled like "xxx in Rust" or "xxx in Go", rewriting an existing software, seems to be built not because there is a problem in the existing software, but without a clear reason.

For learning a new language, it can be a good practice. But if you hope the project to grow successfully I think there is no hope.


relibc is built to solve a problem in the existing software, namely newlib. It has a clear reason.

Redox is an opearting system. An operating system needs a C library. Redox used to use newlib, but developers found it unsatisfying.


I think what most people mean when they say 'regex' is actually 2 thing:

1. The syntax of that pcre-like regex engine accept.

2. regular language, a kind of formal language.

Many regex engine nowadays like the one in perl5 and onigmura already breaks 2, but still makes 1 compatible. I think what perl6 does is also breaks 1. (I am not experienced in Perl6. Please correct me if I am wrong.) I don't think it is a problem, though.


In Perl 6 regexes are a type of method, and you can use them in grammars which are a type of class. (You can use them on their own as well)

Which means you can subclass grammars, compose in regexes with roles, and have parameterized regexes.

The syntax has also had an overhaul to make it more consistent with itself as well as the rest of Perl 6. Since you can embed Perl 6 code, some features of other regular expression engines haven't been implemented as they aren't needed.

The result of using a regex or grammar is also now a parse tree rather than True/False or the matched substring.

I generally recommend reading the code for JSON::Tiny::Grammar as a quick example of what it is like. https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...


> I think what perl6 does is also breaks 1.

No, you can use the backward-compatible syntax if you don't want to spend any time porting to the newer improved syntax.

https://docs.perl6.org/language/regexes#Perl_5_compatibility...

http://design.perl6.org/Differences.html#New_regex_syntax

https://docs.perl6.org/language/5to6-nutshell#Add_:P5_or_:Pe...


Agree that using vector instruction is not crazy at all. I am quite interested when I see the article title, and then deeply disappointed after I read it. I was expecting something like the strlen shown in the book The Hackers Delight, which loads 4 bytes into a int, ad then some bit masking and subtraction and a nlz (number of leading zero) to index the first 0 byte. Please read it first and that is what really what meant by crazy.


It is difficult to build a TUI. Just to draw several progress bars might take a whole day to implement.


I think this issue is more one of poor modern TUI libraries than an issue with the underlying technology.

Drawing a progress bar with OpenGL is probably more difficult than the “go to start of line, reprint my characters” logic needed in the terminal, and yet raster graphics APIs are undoubtedly more powerful than VT escape sequences.


Dear Tanenbaum, in case you are reading this, thank you for creating Minix. I have the first edition of your Design and Implementation of OS. That enjoyable read makes me a programmer now. Your insights is ever-lasting. Your humbleness marks you as the best computer scientist. Thank you.


Agree. Though micro looks very good as a light weight editor for programmers, arguably better than vim in some way, it cannot move (neo)vim users like me away. Borrowing Linus Torvalds words on why he is using micro-emacs,

"My fingers cannot be retrained."


Don’t abuse the term “isomorphics”. To prove 2 groups are isomorphic mathematically you have to show there exists a product preserving map between the groups.

Just kidding.


Flame war between bash/fish/zsh/powershell is almost meaningless to beginners, because the basic skills are common to all shells. (That said, you will love zsh once you use it)

I learned to use shell, about 7 years ago, by reading O'Reilly "Classic Shell Scripting". It is well written, and teach you something that you can hardly learn from google. But don't try to remember everything, especially those advanced string manipulation syntax, because one would usually use a scripting language such as ruby for advanced job.


> I learned to use shell, about 7 years ago, by reading O'Reilly "Classic Shell Scripting".

I can second this recommendation. :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: