Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
augustk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
augustk
3y ago
DSL = Domain-specific language (I guess). Always a good idea to expand an abbreviation the first time it's used.
92.
▲
by
augustk
3y ago
Standard Pascal has 35 reserved words compared to ANSI C 89 which has 32. Not a big difference in terms of English-heaviness. https://wiki.freepascal.org/Standard_Pascal https://en.cppreference.com/w/c&
93.
▲
by
augustk
3y ago
Niklaus Wirth also removed the BEGIN keyword from control statements in Modula-2 and in Oberon. Oberon: IF a < b THEN ... END Pascal: IF a < b THEN BEGIN ... END
94.
▲
by
augustk
3y ago
The programming language itself is also a complexity on top of the problem's essential complexity and the complexity of the algorithm solving the problem.
95.
▲
by
augustk
3y ago
One nice property with (pure) structured programming is that the statement do { ... } while (p); guarantees that p is false after the loop and this makes it easier to reason about the program. With breaks, however, the loop
96.
▲
by
augustk
3y ago
Thanks, now corrected.
97.
▲
by
augustk
3y ago
> if !e->inuse but e == ent->client->chase_target, the original will loop but yours will exit. No, the continue statement will jump to the test part also for `do' loops: "The continue statement is related to break, but
98.
▲
by
augustk
3y ago
Talking about clear and coherent, does anyone know if there is a deeper reason for using `break' and `continue' instead of pure structured programming? The snippet i = ent->client->chase_target - g_edicts; do { i+
99.
▲
by
augustk
3y ago
I also wonder if perfection is reached when there is nothing more to add ;-) Current popular languages seem to converge.
100.
▲
by
augustk
3y ago
I would recommend everyone to learn Oberon just to see how concisely defined an imperative, structured, procedural and modular language with support for object oriented programming (extended types) can be. The language reference is only aro
101.
▲
by
augustk
3y ago
Here is the language specification: https://miasap.se/obnc/oberon-report.html
102.
▲
by
augustk
3y ago
I think the main reason for keywords being uppercased in Oberon (which is case sensitive) is to free up the space for user-defined identifiers. As long as the programmer sticks to lowercase and mixed case identifiers, new keywords and prede
103.
▲
by
augustk
3y ago
Does Zig have a formal grammar (like C)?
104.
▲
by
augustk
3y ago
The next step could be to write a script which uses telnet and the other commands in the article to automatically pinpoint the connection problem, something like whatstheproblemwith hostname port
105.
▲
by
augustk
3y ago
Even without array bounds checking, a bit of discipline and smart conventions will go a long way of reducing errors: 1. Define a macro function for retrieving the length of an array: #define LEN(arr) (sizeof (arr) / sizeof (arr)[0]
106.
▲
by
augustk
3y ago
I wish you could specify the x-height of a font in CSS. If you mix serif and sans serif you want them to look like they have the same size. It would have been nice if the default browser fonts were selected to have the same x-height.
107.
▲
by
augustk
3y ago
Almost all of the top ten are based on either Debian or Arch.
108.
▲
by
augustk
3y ago
ShellCheck can check for POSIX compliance with the option `--shell sh', e.g. shellcheck --shell sh myscript.sh
109.
▲
by
augustk
3y ago
> My biggest issue with POSIX is the use of the backtick which is difficult to read and parse. I always use $(...) or rather "$(...)" instead of backticks. Command substitution shall occur when the command is enclosed as fo
110.
▲
by
augustk
3y ago
This article is not specifically about Bash, but about the shell command language sh. The POSIX Shell is a standardized subset of Bash which has even better portability. I would recommend learning and using sh unless you really need Bash.
111.
▲
by
augustk
3y ago
If you prefer a freestanding network application, connman-gtk is an alternative.
112.
▲
by
augustk
3y ago
Thanks! That's an even better image showing the default theme.
113.
▲
by
augustk
3y ago
I have been using the Blackbox Window Manager for more than ten years now and I'm quite happy with it. I really like it's austere looks. http://www.stokebloke.com/cygwin/blackbox0701.jpg
114.
▲
by
augustk
3y ago
One strategy that never fail me is the The Pomodoro Technique. I usually only do one and then I stay motivated to complete the task. https://en.wikipedia.org/wiki/Pomodoro_Technique
115.
▲
by
augustk
3y ago
Functional versus imperative programming is a bit like socialism versus liberalism; the best solution is probably a combination of both.
116.
▲
by
augustk
3y ago
Among non-pure functions I can think of two interesting subclasses: 1. A functions with no side effects which (possibly) returns different values each time it's called, for instance a function which reads a global variable and returns
117.
▲
by
augustk
3y ago
Or -std=c89 and -pedantic for improved portability.
118.
▲
by
augustk
3y ago
> I don't know why anyone would pick Pascal today over Nim, Zig, Rust, Julia, Go etc. Pascal evolved into Modula-2 and then Oberon which is both smaller and more powerful. https://miasap.se/obnc/oberon-report.ht
119.
▲
by
augustk
3y ago
Indeed. In the "correct" version the search field looks almost like a highlighted item in the list. With many modern user interfaces you really need to be trained in the current conventions to see which elements you can interact w
120.
▲
by
augustk
3y ago
https://en.wikipedia.org/wiki/Not_invented_here
More ›