Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
augustk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
271.
▲
by
augustk
7y ago
> In Oberon, safe and unsafe operations are clearly distinguished. Indeed! To use the unsafe (predefined) procedures you must import the pseudo-module SYSTEM.
272.
▲
by
augustk
7y ago
I think a device with a camera/microphone should have a physical on/off button and a LED which indicates when it's on. At least, that's how I would design it.
273.
▲
by
augustk
7y ago
And Modula-3 but not Modula-2, Pascal or Oberon.
274.
▲
by
augustk
7y ago
I was thinking about the Oberon operating system, which also already exists.
275.
▲
by
augustk
7y ago
But why throw something away which is not physically broken? I currently use a Mac Mini from 2009 with Debian and I have no complaints... well, except that software keeps getting slower.
276.
▲
by
augustk
7y ago
Sooner or later you will have to buy a new device due to planned obsolescence, i.e. when (security) updates are no longer released. But then you can of course install a free operating system instead.
277.
▲
by
augustk
7y ago
You can achieve that using pipes, see https://stackoverflow.com/questions/17071702/c-language-read... . With OBNC you can easily implement an Oberon module in C which interfaces to the POSIX function `pipe'.
278.
▲
by
augustk
7y ago
What sets Oberon apart is that it has become smaller and simpler over time, something which is not true for the languages you mention.
279.
▲
by
augustk
7y ago
The Oberon language is an exception, it goes the other direction. https://www.miasap.se/obnc/oberon-report.html
280.
▲
by
augustk
7y ago
What I miss is a low-resource email client with a GUI, something I (in principle) can run on a 20 year old computer.
281.
▲
by
augustk
7y ago
Or maybe better: awk '! visited[$0] { print $0; visited[$0] = 1 }'
282.
▲
by
augustk
7y ago
And here is the ungolfed version: awk '{ if (! visited[$0]) { print $0; visited[$0] = 1 } }'
283.
▲
by
augustk
7y ago
When I have a slow internet connection I use the Dillo browser with CSS and image loading disabled. Dillo is also really snappy even on an old computer. https://www.dillo.org/
284.
▲
by
augustk
7y ago
My suggestion would be: Learn basic POSIX Shell (sh). It's smaller than Bash and more portable. https://pubs.opengroup.org/onlinepubs/007904875/utilities/xc...
285.
▲
by
augustk
7y ago
If you are implementing a compiler you do what makes most sense for the target language/machine. On the other hand, if you specify exactly how each ill-defined operation should be handled you 1. restrict the freedom of compiler writers
286.
▲
by
augustk
7y ago
The programmer should make sure that an integer is within the range of a byte before assigning it to a byte variable. It's no more complicated than that.
287.
▲
by
augustk
7y ago
Oberon-07 is simply the latest version of Oberon, like Python 3 is the latest version of Python. Other non-Wirthian Oberons are best viewed as forks of the original. The result of assigning an integer > 255 to a byte is unspecified; it&#
288.
▲
by
augustk
7y ago
The designer of Pascal, prof. Niklaus Wirth, evolved the language into Modula-2 and then Oberon. Oberon is a refreshingly lean language. The specification is only 17 A4-pages long: https://www.miasap.se/obnc/oberon-repo
289.
▲
by
augustk
7y ago
But why change the meaning of one of the most common mathematical symbols? Every new generation of programmers must then relearn what "=" means. If you see "=" in a comment you are never really sure what it means, is it
290.
▲
by
augustk
7y ago
"Choosing the equal sign to denote assignment is one notoriously bad example that goes back to Fortran in 1957 and has been copied blindly by armies of language designers since. This bad idea overthrows a century-old tradition to let =
291.
▲
by
augustk
8y ago
Sometimes idiomatic code results in code which is hard to understand, as exemplified by the C idiom `while ( s++ = t++);' for copying a string from t to s. It's always good to be able to read idiomatic code, however.
292.
▲
by
augustk
8y ago
Or with common mathematical notation: O(2*n) = O(n)
293.
▲
by
augustk
8y ago
Implementation-wise, with message passing the operation to be performed is sent as a parameter to a message handler. A method call, on the other hand, is simply the invocation of a subroutine stored in a record field (a function pointer).
294.
▲
by
augustk
8y ago
OBNC is just a compiler. Whereas other languages evolve by adding more and more features, Oberon seem to converge to a set of features which are tried, tested, orthogonal and (most important) essential. Wirth has been very careful not to in
295.
▲
by
augustk
8y ago
For those interested, Oberon is the current Pascal. It is also designed by Niklaus Wirth. I use the OBNC compiler ( https://www.miasap.se/obnc ).
296.
▲
by
augustk
8y ago
That's why quite a few languages don't have block comments. But then it gets very tedious to comment out a section of code without a language aware editor. For me, having comments and strings highlighted is essential.
297.
▲
by
augustk
8y ago
Indeed. Clipart is low culture.
298.
▲
by
augustk
8y ago
Using a proportional font is also common (recommended) when programming in Bertrand Meyer's Eiffel or Niklaus Wirth's Oberon.
299.
▲
by
augustk
8y ago
Check out Oberon which is the current Pascal. I use the OBNC compiler ( https://www.miasap.se/obnc ).
300.
▲
by
augustk
8y ago
If you are interested, I can recommend the Oberon compiler OBNC: https://miasap.se/obnc/
More ›