HostileFork
blog.hostilefork.com · Personal blog · on HN since 2014
HostileFork is a programmer who writes about Rebol, Red, and the Ren-C language fork, plus C64 machine language and debugging topics.
What HN saysHN commenters link it for explanations of Rebol's parse dialect as readable regexes and for his post on location-parameterized assertions.
20HN people shared it
12linked it in comments
12stories submitted
306story points
12 months agolast shared
2014people per year2026
Most-shared posts
- 1Why Rebol, Red, and the Parse Dialect Are Cool (2013)6 people · 2 points · first shared 2014 · discussion on HN
- 2Where the Printf Rubber Meets the Road (2010)5 people · 82 points · first shared 2014 · 43 comments on HN
- 3Rebol vs. Lisp Macros3 people · 124 points · first shared 2016 · 38 comments on HN
- 4Machine Language for the Commodore 64 and 128 (2014)2 people · 4 points · first shared 2014 · discussion on HN
- 5Location parameterized assertions2 people · first shared 2016
- 6.Trashes, .fseventsd, and .Spotlight-V1001 people · 89 points · first shared 2015 · 66 comments on HN
- 7Stopping Exploitation from Being Profitable1 people · 2 points · first shared 2017 · discussion on HN
- 8The Central Newbie Question about Rebol/Red1 people · 2 points · first shared 2015 · discussion on HN
- 9Computer Languages as Artistic Medium1 people · 1 points · first shared 2016 · discussion on HN
- 10Rebol vs python performance1 people · first shared 2019
- 11Poison memory without asan1 people · first shared 2019
What HN people wrote when they linked it
rgchris · 2017-10-20
Note that Ren-C (a fork of Rebol that is only tangentially related to Ren) uses `blank` or literal `_`.
The language concept is a bit more fundamental than config files. Rebol (and Ren-C and cousin Red) is a fully homoiconic language that itself has tools for parsing and interpreting DSLs ('Dialects' to use the language's nomenclature) that use the same language rules. In essence you do indeed get the lexer for free.
Would recommend a wee read of:
http://blog.hostilefork.com/why-rebol-red-parse-cool/
I've argued that Ren is somewhat redundant as it fills the same space that Rebol does though Rebol lacks a formal specification at this time.
alexisread · 2023-09-27
...Swap your language prefs to say, arabic? ;)
More seriously though, I think it depends what your background is. Maths works in prefix notation eg. f(g(x)) but I appreciate that you can hold the stack in your head easier with postfixLR.
Many people who are used to lisp would probably prefer prefix notation. non-stack or array langs have a nice tradeoff that you can look at the code without having to keep a model in your head, notably many forth users annotate their code with stack diagrams to help. Personally I'm quite taken with rebol syntax, passing a stack/array as the rightmost operand.
http://blog.hostilefork.com/rebol-vs-lisp-macros/
nkurz · 2019-01-30
Instead of switching to the debug allocator, might it instead be possible to teach ASAN about the pool allocator? I think I did this at some point in the past for Valgrind. I don't know if it would be sufficient, but with ASAN it's at least possible to "poison" and un-poison memory manually with macros: http://blog.hostilefork.com/poison-memory-without-asan/
Leace · 2018-11-29
Rebol's parse dialect is basically easily readable regexes (actually even more, but that's not relevant here).
For some examples see: http://blog.hostilefork.com/why-rebol-red-parse-cool/
mabynogy · 2017-06-13
Found it on /r/proglangdesign ;-)
I'm a big fan of stack-based languages and I like a lot the name of your language.
It reminds me this post too: http://blog.hostilefork.com/location-parameterized-assertions/
draegtun · 2017-02-10
>> Rebol and Red are both like Lisp in being homoiconic
With regards to this I do like Hostilefork's companion blog post regarding macros - http://blog.hostilefork.com/rebol-vs-lisp-macros/ (HN comments - https://news.ycombinator.com/item?id=11587952)
QuantumAphid · 2017-02-09
More than a decade later, Rebol (and its newer offspring Red red-lang.org) are still in regular use on my team.
A cool thing about Rebol's (and Red's) PEGs are that they can easily parse and process the diverse datatypes of its parent source.
REBOL Parser in 10 Lines
http://www.rebol.net/cookbook/recipes/0042.html
And:
http://blog.hostilefork.com/why-rebol-red-parse-cool/
"But even more impressively, it can work on the symbolic structure of code itself. While Rebol and Red are both like Lisp in being homoiconic, when you see something like PARSE applied on code itself... you know you're looking at something very cool."
nickpsecurity · 2016-06-10
Oh, it gets much better. Here's printf being traced in detail:
http://blog.hostilefork.com/where-printf-rubber-meets-road/
Seeing this, one realizes there is something fundamentally wrong with how their language or libraries work. ;) Personally, I think these things are perfect examples of where a language providing macros, DSL's, and/or generic interfaces can be much more readable. You could just describe the grammar or whatever with ties to specific, low-level functions for the results. Compiler does the rest. Racket people do that kind of stuff all the time. So, do tools from sklogic, REBOL, RED, Julia, Nim... Inherent limitations of C and their coding approaches combining to create trouble. Plus legacy effects.
vmorgulis · 2016-02-29
Another original idea for debugging with "codeplaces":
http://blog.hostilefork.com/location-parameterized-assertions/
vezzy-fnord · 2015-06-28
Here's an article from the musl wiki that explains differences from glibc: http://wiki.musl-libc.org/wiki/Functional_differences_from_glibc
All the bugs discovered by musl, and how many are glibc-related: http://wiki.musl-libc.org/wiki/Bugs_found_by_musl
If you want to know why someone would want to replace glibc, then I give you a challenge: figure out how glibc implements printf(3). Good luck.
The answer is: http://blog.hostilefork.com/where-printf-rubber-meets-road/
hjek · 2019-01-07
> > If anything, it sounds too easy, making me think "what's the catch?
> This is rude and uncalled for.
I think she/he raise a fair point about how the Red language is advertised, and it's actually a rather friendly to assume that it's due to language barrier.
Many posts about Red/Rebol are unequivocal praise with very few details or any acknowledgements of short-comings or limitations of the languages.
Just to dig up some random ones:
Here's a speed comparison between Rebol and Python[0]: Rebol is faster (surprise!), but the post doesn't contain or link to any of the code used for the comparison
Here's some grand self-praise from the Why Rebol/Red[1] on why it's just better than all other languages:
> You may be familiar with Clojure, Python, Ruby, Lua, frameworks like Ruby on Rails, or any of the multitude of Javascript frameworks which are purpose-built to "ease" particular types of development work. Such languages/tools/environments are certainly productive compared to traditional tools like plain old C++, Java, etc., but they are absolute behemoths when compared to Rebol. Virtually every other well known development tool in popular use is built upon bloated layers of existing technology, and encumbered by mainstream language syntax and development procedures which introduce an extraordinary volume of unnecessary complexity at many levels. Most developers have just never experienced the sort of self dependent architecture, lightweight tooling, bare language and…
knight17 · 2018-01-31
> I can't shake the feeling that Regexp could be written just as efficiently as a fluent interface with a more human friendly syntax.
You can use SRL - Simple Regex Language (https://simple-regex.com/) for making readable regex/matching rules. It is supported in C++, Java, C#, PHP, Javascript, and Python. Also, you can use the web version to generate equivalent regex if your language is one of the above.
Here is an example from the website for matching an e-mail address:
begin with any of (digit, letter, one of "._%+-") once or more,
literally "@",
any of (digit, letter, one of ".-") once or more,
literally ".",
letter at least 2 times,
must end, case insensitive
Regex to do the same:
/^(?:[0-9]|[a-z]|[\._%\+-])+(?:@)(?:[0-9]|[a-z]|[\.-])+(?:\.)[a-z]{2,}$/i
The first one is readable, second one is cryptic. https://simple-regex.com/examples has more examples.
SRL was previously discussed here in 2017, see https://news.ycombinator.com/item?id=12384862
Also, the parse feature (DSL) of Rebol language is an excellent regex alternative:
1. Why Rebol, Red, and the Parse dialect are Cool (http://blog.hostilefork.com/why-rebol-red-parse-cool/)
2. Rebol's answer to Regex: parse and Rebol types (https://rebol-land.blogspot.in/2013/03/rebols-answer-to-regex-parse-an…