balfebs
Re:MIT SICP Book in JavaScript
on Sunday July 23, 2023 @07:48PM (#36841274)
Not sure what you mean, but ternaries are right-associative in Perl just like most other languages. PHP is the odd one out.
Re:The Oldest Known Blueprints Depict Stone Age ‘Megastructures’
on Thursday May 18, 2023 @11:05AM (#35988999)
I believe that 9,000 years ago there wasn’t as distinct a pole star due to axial procession. Celestial north would probably have been somewhere between Vega and Tau Hercluis with a fairly wide separation.
Re:Programing Best Practices 2023
on Thursday May 11, 2023 @03:30PM (#35907243)
Unfortunate that the repo name and header text of the README both misspell “programming”
Re:Why Gravity Is Not Like the Other Forces
on Thursday April 27, 2023 @12:20PM (#35730412)
If you define fall as the size of the gap. You could also take it as acceleration towards the barycenter, which would be the same. These are indistinguishable for everyday objects so could argue that the word “fall” could be interpreted either way.
Re:Adding “invariant” clauses to C++ via GCC plugin to enable Design-b...
on Sunday January 01, 2023 @06:11PM (#34212113)
That is a concern, but this makes invariants something the compiler can reason about more easily, since they happen at function boundaries and are distinct from regular code, unlike “vanilla” assertions.
Re:Adding “invariant” clauses to C++ via GCC plugin to enable Design-b...
on Sunday January 01, 2023 @05:58PM (#34212001)
The post assertions do look very similar to a unit test, but the pre assertions seem really useful; it can sometimes be difficult to know every code path that leads to your function, and though tools exist for this, assertions on inputs help you catch errors arising from unusual conditions.
This seems like it’s mostly syntactic sugar for assertions, keeping them at the interfaces of the function (in and out).
It can also be sometimes useful to have these conditions right there alongside the implementation and not just somewhere else in your unit tests.
Re:Earth might be experiencing 7th mass extinction, not 6th
on Wednesday November 23, 2022 @08:21PM (#33726764)
Without other planets to examine, we have no way of knowing whether this is survivorship bias.
Is life truly that tenacious or are we incredibly lucky? Perhaps best not to tempt fate if the latter.
Re:The Wa Programming Language
on Friday November 11, 2022 @11:06AM (#33562524)
There is a great deal more to learning a language than its alphabet, and English is probably one of the worst languages to learn that use the Latin alphabet, with many inconsistencies and exceptions in grammar and pronunciation. The reason so many people learn it is because they have to, not because it's easy to learn or use.
English is the JavaScript of human languages.
Re:Reddit’s database has two tables (2012)
on Wednesday August 10, 2022 @11:30AM (#32413633)
When I was a Perl programmer, in our shop we amended the motto "There's more than one way to do it" to "There's more than one way to do it, but most of those ways are wrong."
The Perl community themselves eventually extended the motto to "There's more than one way to do it, but sometimes consistency is not a bad thing either"