Hacker News new | ask | show | jobs
by fock 2693 days ago
and I still don't get what's so special about it compared to the bunch of other embeddable languages (Lua, Tcl/Tk (which is 16MB in a batteries included package, mature, and shows why building a platform independent GUI into your language just doesn't age well)
2 comments

I'm language agnostic, I don't care much about them, I just wants to get things done. Red have features that ease things like its unique parse engine https://redlang.red/parse-html which avoid regex headache (recently javascript recognized the problem and tried to add methods to ease parsing it's far from being as elegant as red. I don't remember the research paper from which Carl Sessenrath inspired fromn but it is clearly closer to natural language processing, though still not close enough in my opinion so I'm working on making a dialect that would almost feel the gap and allows anybody to create its own AI for example ;)

So at this stage for me, Red being in alpha stage (not even 1.0. yet and roadmap goes up to 2), you cannot use it like you would use nodejs. Tcp/ip has just being implemented, I hope to have something like async nodejs https server and an independant framework similar to express instead of full blown monolitic server but I don't know what the future will be.

But it is very usable for meta-programming stuff. readable.red is only one brick, I have other projects which will use red to generate code easily in other programming languages in much more friendly way that traditional DSL made for PHD people only ;)

And what I present today about readable.red is just the core, I have many ideas in the tube for it, like adding many other tags for mindmapping & timeline (because I just need them) and since I cannot do all, I'll intend to create a plugin architecture for others to implement more amazing stuffs than me.
Oh yeah, let's write a parser for html, because regex is too hard https://blog.codinghorror.com/parsing-html-the-cthulhu-way/
Red is not about writing a parser for html, it's about creating DSL. As Brian Kernighan: said "Domain Specific Languages are smaller and simpler than mainstream general purpose #programming languages. That's pretty raisonnable. Thinking of building the next version of C++ not so reasonnable." https://www.youtube.com/watch?v=Sg4U4r_AgJU
16MB is >10x more than Red (batteries included) and also Red takes different approach to GUI - it's platform independent but with OS widgets - so it ages with OS, unlike custom solution.

However, GUI is not the main point of Red, just a part of it. IMO the really special thing is it's ability to create and use dialects (DSLs) very easily, so the 1 MB package can handle tasks from device drivers, through GUI, to natural language processing, with specialized dialects (DSLs).

Unfortunately at the moment Red does not really include a lot of batteries (take a look at IO in their documentation)... Also what's the point of a platform-independent GUI-toolkit if you have to abstract a multitude of different OS-provided-libraries, when you could just use the library as is (which itself is an abstraction over the basic OS-rendering-primitives)?

Also could you elaborate what's so special about an DSL if all of these are locked into a specific syntax (or does the almighty red also include some super-easy grammar-description tools?)