Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haberman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
1656 ms
·
3601.
▲
by
haberman
17y ago
Your description of these two algorithms sounds accurate; I think your point of confusion is with the term "deterministic." The fact that packrat parsing is based on search-and-backtrack by definition means it is not deterministic. Determi
3602.
▲
by
haberman
17y ago
> I think this is the same thing as a "pack rat" parser (which from memory has a very straightforward implementation, but isn't an academic concept). Also, packrat parsing was popularized in the academic literature by Bryan Ford's Maste
3603.
▲
by
haberman
17y ago
> The table of contents doesn't seem to mention LL(* ) grammars, which are used by ANTLR. It's true, this book mentions LL(* ) only in passing. There is a short section (8.3.3), which concludes by saying: "LL-regular is probably of the
3604.
▲
by
haberman
17y ago
Protobufs are actually pretty fast to encode and decode (in the neighborhood of 200-300MB/s on my core2 desktop, when using the C++ bindings). It's just the Python implementation that is slow. I'm working on a Python implementation that wi
3605.
▲
by
haberman
17y ago
If you're analyzing complexity and your algorithm needs malloc(), then you implement and analyze malloc(). For example, see Knuth section 2.5. By the way, do you have a point to make, or do you just enjoy being brusque?
3606.
▲
by
haberman
17y ago
You don't need the C standard library to write algorithms in C. Therefore you can do computational complexity analysis that is independent of the C language implementation. (I don't actually think you could name a function from the ISO C s
3607.
▲
by
haberman
17y ago
Your initial claims were much broader than that ("I think that people talk about C as an important language because it is difficult to write programs in.", "Every year that goes by, C becomes less useful. How is this a good language to teac
3608.
▲
by
haberman
17y ago
> Someone with no understanding of C can just as easily read man pages. If all you know is Python, or Java, or another high level language, how would you even know that manpages that document system calls exist? How would you interpret
3609.
▲
by
haberman
17y ago
> I'm not purposely trolling here, it is my opinion that C is a poor language to teach students. If you don't teach students C, you're denying them a deep understanding of how all of the higher levels are implemented. If all you know is
3610.
▲
by
haberman
17y ago
Yes but what if your declaration was: T::bar * x; Now the parse is ambiguous. While the language could say "you only need to use typename if the declaration would otherwise be ambiguous," it's simpler and more consistent to say "a
3611.
▲
by
haberman
17y ago
It's not about making compiler implementations easier -- it's about protecting template authors against having someone write: class MyBadClass { static int bar; }; foo<MyBadClass> y; By writing "typename", the
3612.
▲
by
haberman
17y ago
In C++ that problem gets worse. To parse: Template<params>::InnerDef * y; ...you have to know whether InnerDef is a type or a number. If it's a type, this is a declaration of a pointer y. If it's a number, it's a multipl
3613.
▲
by
haberman
17y ago
I disagree; what takes extreme self discipline and organization is doing in 3,000 lines of code what a less organized developer would have done in 15,000. Code is a liability; developers who can get to the point save you in complexity and
3614.
▲
by
haberman
17y ago
> Some others have also hinted at using an array of function pointers and indexing by switch variable. Doing this explicitly makes no sense -- I'm pretty sure the compiler will compile the switch this way if its heuristics determine tha
3615.
▲
by
haberman
17y ago
> Tables for layout didn't really take off until the late 90's Which was coincidentally when websites started having sidebars. Are you arguing in favor of pre-1995 web design? Are you arguing that there is a more natural way than ta
3616.
▲
by
haberman
17y ago
Sounds good, except for the part where they are going to help find people to work with you. There is no way in hell I'd go into a venture like with someone I didn't already know and respect.
3617.
▲
by
haberman
17y ago
The "tables vs. CSS" argument has a clear answer and I can't believe we are still arguing about it. CSS people who argue against tables are obeying their instinct that content and presentation should be separate. They are mostly right abou
3618.
▲
by
haberman
18y ago
nkurz is right about the intention of the title, but if TLSF is only intended for real-time systems, then why does it claim that it is general-purpose, and not include any caveats of the sort you do? Like all memory allocators I've encount
3619.
▲
by
haberman
18y ago
Article author here -- apologies for making you dumber. I would love to hear any data you have about when I should choose one malloc() implementation over another; the theory that malloc implementations have trade-offs is basic enough, but