xonix
Does the language give any guarantee that TCO was applied? In other words can it give you an error that the recursion is not of tail call form? Because I imagine a probability of writing a recursion and relying on it being TCO-optimized, where it's not. I would prefer if a language had some form of explicit TCO modifier for a function. Is there any language that has this?
https://github.com/xonixx/prolog-experiments/blob/main/Prolo...
This was super funny, but obviously absolutely useless
- need to learn secondary API which still doesn't cover the whole scope of SQL
- abstraction which is guaranteed to leak, because any time you'll need to optimize - you'll need to start reason in terms of SQL and try to force the ORM produce SQL you need.
- performance
- deceptive simplicity, when it's super-easy to start on simple examples, but it's getting increasingly hard as you go. But at the point you realize it doesn't work (well) - you already produced tons of code which business will disallow you to simply rewrite
(knowledge based on my own hard experiences)
If someone has some particular domain problem to which they need to introduce the new programming language, then, probably, it should look somehow different to all existing languages, otherwise they would be used.
Alternatively, the motivation could be: OK I need ExistingLanguageX(-alike) but in the domain/environment where it's not present yet, for example, WASM.
The motivation question is always of interest to me since it allows to judje for the long-term perspectives of the project.
However don't take this as a discouragement rant, learning case is a good motivation/raison d'être too.
I can see some problem here. Probably, it means the author is under heavy influence of the implementation language, that limits their thinking and creativity scope to the concepts of that language.
email:string( regex(".*@.*\\..*") )
This is incorrect regex for email. The correct one is https://pdw.ex-parrot.com/Mail-RFC822-Address.htmlOnce I did some experiments at programming in Java using only sun.misc.Unsafe for a memory access: https://github.com/xonixx/gc_less. I was able to implement this way basic data structures (array, array list, hash table). I even explicitely set a very small heap and used Epsilon GC to make sure I don't allocate in heap.
Just recently I decided to check if it still works in the latest Java (23) and to my surprise it appears - it is. Now, apparently, this is going to change.
Also, I was considering adding the same feature (generating the equivalent shell script) to my tool, but after doing some analysis decided not to pursue this idea for the following reasons: https://github.com/xonixx/makesure/issues/83#issuecomment-98....
Strange, should be much less failures: https://github.com/xonixx/gron.awk/blob/e5040a7b1384c5839dca...
Could you please file a bug with the details?
Usually in REST APIs the auth token is passed via some HTTP header.
No doubt Perl is much more powerful than AWK. But from other side it’s astonishing that such succinct and clear language as AWK was turned into a monstrosity called Perl.
Therefore, for me when it goes to text processing/manipulation I prefer AWK much better than Perl. Cleaner syntax, better portability, absolute minimalism. Now, thanks to GoAWK [0] CSV-processing with AWK is a piece of cake too.
I personally see no reason nowadays for me to write any Perl code, but I’m totally fine to use the software written in it.
Not long ago I was really fascinated by this example I came across: https://pmitev.github.io/to-awk-or-not/Python_vs_awk/.
To my knowledge the major dialects in use are:
- One True Awk (aka bwk) (https://github.com/onetrueawk/awk) - this one is bundled in all *BSD/macOS
- Gawk (https://www.gnu.org/software/gawk/) - this one is bundled in most Linux
- mawk (https://invisible-island.net/mawk/) - bundled in some Linux distros (?), known as the fastest byte-code compiled implementation.
All three have very good compatibility, but Gawk is super-set over POSIX standard. I have some evidence here, since I regularly test [1] against these implementations and even some others, like GoAWK.
[1] https://github.com/xonixx/makesure/actions/runs/1830978431
I myself been dedidacted Python lover in past for many years now came to a conclusion that what can be scripted with AWK, should be scripted in AWK (over Python, Ruby, Perl, etc.). I'm not saying that you should write big apps though, but for small scripts AWK is absolutely fine alternative to major scripting languages with lots of benefits. Been universally available (as part of POSIX) and very compliant (language standard is almost unchanged for over 30 years now). As they say: "Good programmer chooses the most powerful tool for the job, best programmer chooses the least powerful tool for the job". Also see [1].
There is absolutely nothing wrong in learning AWK. It's very small language you can grasp fully in hours or days, and be sure you know it all, since it's very unlikely it chanages any time soon. Besides the classical book [2] by A., W., K. is absolute pleasure to read. Amazing, but it's still totally relevant, despite been published in 1988.
Shameless plug. I'm the author of a task/command runner [3] implemented almost 100% in AWK and I still think this was perfect choice of a language for this project.
[1] https://en.wikipedia.org/wiki/Rule_of_least_power
[2] https://archive.org/download/pdfy-MgN0H1joIoDVoIC7/The_AWK_P...