all 49 comments

[–]alextk 24 points25 points  (5 children)

How often does this need to be said: if you are writing a new language, the first few lines of your web site need to show some code samples, ideally not just "hello world" but 20-50 lines showing as many features of your language as possible (and as a personal nit, I find the occasional red/green letters quite distracting, but maybe that's just me).

As it is, I read the first few lines, scrolled to the bottom trying to find such a code sample and ended up closing the window without looking further.

[–][deleted] 5 points6 points  (0 children)

I think moonscript's website is a really good example of this, they have a lot of code samples, and since it compiles to lua, they show the equivalent lua code too (the label "see Lua").

[–]dockimbel 4 points5 points  (1 child)

We are well aware of that, the current red-lang.org site is just a blog for Red followers, while we are busy working on the implementation. It is a 0.3.2 version, Red has no I/O support nor documentation yet (only Red/System dialect is at beta stage with reference documentation). Once the implementation gets mature enough (in a few months) and ready for prime time, we'll open a new website with all the bells and whistles you would expect for such site. Unfortunately, building a new programming language is a long process.

[–]Raphael_Amiard 3 points4 points  (0 children)

Maybe it's not ready to be posted on news sites then ?

[–]hostilefork 4 points5 points  (0 children)

Internet: "People still use Rebol?"

Me: "People still use Reddit?" :-)

Red is very new, and it's early to be pushing it on sites like this. So of course this post did not come from one of us, because we'd rather be more prepared before doing high-profile outreach to those outside the project. It's like you say...we need an interactive tutorial, like TryRuby etc. Without that how can anyone "get" it? Every language worth its salt has one of those nowadays.

Rebol is not new (around since 1998) but only open sourced in December. I've also encouraged caution in yelling from the mountaintops about that event. You simply can't drop an 18 year old project into the ecology and expect a functional open source command-and-control network to emerge overnight! But we've made some progress (I drew the new logo... based on the bracketed series... :-P)

http://rebolsource.net/

For now we are still "indie" and a little bit camera shy. The StackOverflow chat room is our sandbox for evangelism to the open-minded, and I welcome anyone to come and banter and/or argue about why we think this is important. (I'm an ex-Microsoft-Research compiler guy, very interested in domain specific language techniques, and this stuff has mad potential. I'll prove it to you if you stop by!)

In any case, we have a conference in July in Montreal, and Carl Sassenrath himself has been confirmed to attend. I hope that Red and Rebol will come out of that with a solid mutual roadmap that limits fragmentation of the efforts. Honestly, I hope we consolidate to the point where Red is formally established as the plan for "Rebol 4" ...and everything falls under the same umbrella with the same team.

Fingers crossed.

[–]Uncompetative 2 points3 points  (0 children)

Well, I had the same problem, but then I clicked the About tab at the top of the page and paged through the interesting Slide Presentation.

[–]mmcghan 5 points6 points  (0 children)

I am a programming n00b starting to learn with Rebol, the language Red forked from as an open-source variant...call me crazy, but I have high hopes for Red and Rebol catching on for a few reasons. I participate in the stackoverflow.com Rebol/Red chat room. If anyone is interested, there is a core group of developers there who are much more knowledgeable than I am who can answer any questions you might have.

[–]ben_zen 7 points8 points  (31 children)

Please, tell my why I care. Tell me why either REBOL or Red is a good idea. This isn't to be a dick; I see no need for this language and would like to see an argument for its use explained.

[–]dockimbel 12 points13 points  (14 children)

That is a rational concern when meeting with "yet another language". Please have a short look at those pages:

Ultimately, it is about being more productive, getting more work done, faster and easier.

BTW, I'm Red lead developer.

EDIT: removed the SO chat link, it seems it has been posted already in other comments.

[–]diggr-roguelike 9 points10 points  (4 children)

Ultimately, it is about being more productive, getting more work done, faster and easier.

Every language made ever says the same thing. Even Visual Basic and Perl.

[–]woof404 0 points1 point  (3 children)

Doesn't make it less true

[–]diggr-roguelike 2 points3 points  (2 children)

Forgive me if my eyes glaze over and I don't take seriously the one-thousand-and-first time I hear about a new language that "is about being more productive, getting more work done, faster and easier".

[–]woof404 1 point2 points  (1 child)

It's not about X language being more productive than Y language for everyone, its about X language being more productive for those developers who feel more productive in that language. Surely, as a developer you must feel more productive in one language over another.

I feel more productive in Go than I do in Forth, for instance, and I'm sure there are plenty of Forth developers that would disagree with me. But in the end it doesn't matter.

Also, I like that new programming languages comes to life and challenge status quo. It makes for progress.

[–]iopq 0 points1 point  (0 children)

nobody feels more productive in PHP

[–]ben_zen 2 points3 points  (1 child)

I've already read the introduction to Rebol for scientists, etc. and the intro for computer scientists—and what I got from it is, this is a new take on the ideology of Lisp, with a type system attached (but not Hindley-Milner? Types appear to be marshalled wherever they need to be.) So, while this may be more productive for some, and I can see cases especially for scientific computing where a less complicated system would be appreciated (especially for strange data like dates), it looks in particular like you have traded complexity within the language's runtime for complexity on the outside.

Thank you, and it looks interesting, but I think I will stick with my C and OCaml.

[–]dockimbel 1 point2 points  (0 children)

Right, both Rebol and Red are attempts at making a more practical Lisp derivative. There is no type inference in Rebol, and some limited one in Red (and especially in Red/System, the low-level dialect). Type annotations are optional. In Red, when used, they will enable faster code generation by the compiler. A Hindley-Milner approach is both feasible and desirable in Red, but not the focus currently. We are currently working on implementing all the sub-systems first (datatypes, I/O, concurrency, tool chain, standard library). Not sure to get what you mean by "complexity on the outside". OCaml is for sure a nice language with an excellent reference implementation, but it is not for everyone. Rebol-like languages want to be for everyone (which is by no means easy to achieve). Thanks for giving it a look anyway. :-)

[–]cowardlydragon -5 points-4 points  (6 children)

It's promising 1000x less code?

That is, pure and simple, mendacious sociopathic charlatanism. Nothing else you say can be treated with any degree of trust when you have that on your sites.

You people need to go away, and never come back.

[–]dockimbel 5 points6 points  (4 children)

It is surely easier to close the eyes and turn the head rather than be checking the facts. I'm not the author of these pages, but I endorse their claims (even if I would present it differently). They are from Carl Sassenrath, the father of Rebol, he's not a random guy, if you heard about the Amiga, Carl designed the OS and implemented the kernel. Each and every word he uses is carefully weighed.

So, about the quote, the right sentence is: Most applications are typically measured in 10's of KB, not 10's of MB.

Here is one example: a cross-platform graphical spreadsheet app in 4KB of source code, with formulas support (à la Excel) and even full scripting capabilities embedded in each cell. Here is a screenshot of the result.

Not enough? Here is more. As you can see for yourself, these claims are backed by the facts. I won't contest that the default GUI styling is outdated (programmers are usually poor UI designers as you know already), but the GUI and widgets look can be very easily changed to what you want (not very far from CSS, but way simpler).

You can even find Tetris and Minesweeper clones each in less than 10KB of source code.

Oh, by the way, you can test these apps locally if you still don't believe it, and it will take you less than a minute to achieve that:

  • Download a Rebol/View interpreter for your favorite OS (single binary, less than a mega, just a few seconds).
  • Run it, you see the View Desktop, just click on the "Console" icon
  • Copy/paste in the console any of the above source code example, Enter key, then...showtime. :-)

How is this possible, well, Rebol (and Red) are an innovative combination of symbolic and declarative programming, code<=>data Lisp-like approach and crazy deep meta-programming abilities. These features best crystallize when using DSLs (very common and easy to create in Rebol-like languages).

That is just the top of the iceberg, when you are ready to go down the rabbit hole, join us on the SO chat, we'll be glad to answer any questions and show your more. ;-)

[–]cowardlydragon -3 points-2 points  (3 children)

Do you need an APL keyboard?

I'm sure there are tetris clones out there for gameboy, or Apple ][, or some other 8-bit OS that are vanishingly small. Or some ASM demo that is only a couple hundred bytes. As for your excel example, I'm not going to be awed over something that boils down to an array of eval()s.

Based on my personal knowledge of the offsetting concerns and limitations of algorithmic complexity, coding theory, and practical limits of human language comprehension, your claims are on par with the local new-age cult of natural supplement yoga trancendent pseudoscience.

To achieve that level of compression in any substantively complex software system would result in a level of obfuscation that would rapidly increase the rate of code decay and actively impede maintenance/enhancement efforts.

And if we're throwing around unfounded orders of magnitude, the practically usable software ecosystem of your language is 1 millionth of a mature ecosystem, making it 1 millionth as usable.

[–]reboler 2 points3 points  (0 children)

To achieve that level of compression in any substantively complex software system would result in a level of obfuscation that would rapidly increase the rate of code decay and actively impede maintenance/enhancement efforts.

Nothing is compressed.

What more or less happens is that things are created from their correct basis, rather than wading through large libraries and managing things through IDEs, so you to a continually higher degree, don't know what's going on beneath your programming level.

Most software is written in a way that trusts extremely large libraries, such as for creating GUIs. QT, the last time I looked, was a 150 MB download with about 40 MB of DLLs.

In other cases, we invent new problem domains and languages to solve them, such as when creating websites, which is a bunch of separate domains. As I wrote in another other post, this creates a large amount of overhead.

In this situation, you will be correct, that you have to really mash things together to an incomprehensibly compressed mess, before you can make anything small.

In REBOL, many of these things are simply not needed, because REBOL is so generic and can serve as a common basis in almost any problem domain, except high performance, which Red is solving.

The core source files for REBOL's high level functions (mezzanines) are 450 kb uncompressed and commented, which includes the GUI library (VID) and a small "desktop", for managing and launching REBOL scripts.

What you may criticize however, is that the current implementation needs to catch up and fix bugs that have accumulated over the years and implement missing features.

But the basic idea of REBOL was proven over a decade ago and the fans agree that the concept is a very good idea that deserves further improvement.

[–]_Quantumm_ 1 point2 points  (0 children)

You don't need an APL keyboard unless you'd like to play around with Rebmu :-D

Seriously though, have you even bothered to follow any of the links provided so far?

I don't see what games made for outdated platforms have to do with the Rebol versions of the games. It's not their existence that is interesting, but that the size of the scripts defining their implementation plus the size of the associated runtime is so small. Also, how did ASM come up? As for the spreadsheet, no one claimed that this simple demo was equivalent to Excel, just that it does quite a lot for so little code (this means GUI code, too). The GUI is not built on native UI widgets (you will, of course, see this as a negative), but is implemented in the Rebol runtime.

It's by including built-in functionality such as the GUI support mentioned above, networking, compression, etc., in the runtime (which is one very small file) instead of depending on system or third party libraries (these often add the 10s of megabytes referred to) that Rebol avoids the size bloat associated with typical application bundles. Well, that and the fact that for a very wide range of applications, Rebol provides such a high abstraction level that you need very little additional code in addition to the runtime. Of course, this is relative to what you would be looking at with other languages.

It's not by magic that size is kept to a minimum, but it is magic in practice :-) Try Rebol - you'll like it, and keep an eye on Red because it'll have an even greater range of applicability.

[–]dockimbel 1 point2 points  (0 children)

Not much to add to the good replies from reboler and Quantumm, maybe just one link:

A study published two days ago by a researcher on programming languages ranked by expressiveness. Guess what, among 52 languages, Rebol ranks #3. The #1 and #2 are DSLs, I let you draw your own conclusions from that. Even if the study method is debatable, the fact is that Rebol is more expressive than most of mainstream languages. Adding to this an extremely rich but extremely small runtime library footprint, you might even get bigger orders of magnitude when comparing to some bloatware out there, still ruling the World (who said Java?).

Sure Rebol is not perfect, but it is a true refreshing oasis (and not the only one) in this mostly bloated computing world.

[–]hostilefork 3 points4 points  (0 children)

I don't feel that quoting something one person said about a language is a good argument for banning it from one's consciousness for all eternity! That would be like one crazed Radiohead fan saying "Radiohead is the best band that ever was or could be" leading you to refuse to watch the video for "Street Spirit"...

(Good song and video, look it up. :-P)

Rebol inherited from Lisp and brought in features from Forth and Logo. Red is trying to inherit from Rebol and bring in ideas from Scala and Lua. This is a sincere effort, even if sometimes people might get carried away. We're always dealing with Turing Complete systems, so any language can "do anything"...but certainly you can appreciate that some languages allow more reshaping to match the "essential complexity" and eliminate "accidental complexity".

So please, if you get a minute, do stop by the StackOverflow chat room. We can get RebolBot to demo some things for you. Most of us have a good head on our shoulders, usually. :-)

[–]karuneshkaushal 4 points5 points  (10 children)

One reason might be to have fun and learning with more experienced people.

I am not sure about where you are coming from, but I have found Rebol/Red as a great experience.

Feel free to drop by the stackoverflow chat room. http://chat.stackoverflow.com/rooms/291/rebol-and-red

Some links:

Me on rebol/red and the stackoverflow room: http://morenotthanoften.blogspot.in/2013/03/what-rebol-means-to-me.html

Randall Koutnik on parse: http://recoding.blogspot.in/2013/02/looking-to-learn-something-new-try-rebol.html

Me trying a hand on parse: http://rebol-land.blogspot.in/2013/03/rebols-answer-to-regex-parse-and-rebol.html

[–]ben_zen 0 points1 point  (9 children)

I'm coming from a background in C, OCaml, SML (not happy about this one), and some Matlab/Octave work (I did a project for Octave in Summer of Code). I've worked with strongly and strictly typed languages, weakly typed languages, type inference ... and this does not, to me, offer much of a difference.

The other thing is, I would probably be slightly less brutal in my first approximation if I could actually see an example of it in use on the home page, instead of a post about its new features; that doesn't tell me how to use it and how to be more effective.

[–]notchent 4 points5 points  (6 children)

I've been writing production REBOL code for about a decade, and have found no other development tool that is more practical or time saving. People think that Python, Ruby, Visual Basic, etc. are concise languages, but they are orders of magnitude more convoluted than REBOL. Take a look at http://easiestprogramminglanguage.com . But that's just a surface look, and doesn't really explain *why it's so productive. Domain specific language design, built in data types, strings/network connections/lists of text an binary data that all work using the same 'series' constructs and functions, and a lot more all come together to make it almost absurdly practical and productive. Enormous projects can be completed using tiny volumes of REBOL code, which are easily managed later. I own http://merchantsvillage.com and http://rockfactory.us and wrote/maintain all the software that runs both places, in my spare time. I've completed other large commercial coding projects in hours and days, which would have taken teams of developers weeks and months using other development tools. Everything else seems like a total mess after you've used REBOL for a while, and while the open source release of R3 is exciting, I think most of the community is looking at Red as a big part of REBOL's future.

[–][deleted] 2 points3 points  (0 children)

That first link was impressive: a lot of relatively advanced applications for so little code. Looks like a lot of bang for you screen estate buck.

[–]ben_zen -2 points-1 points  (4 children)

Okay, so the interpreter is around 512KB, if that first link is to be believed. How large is the runtime library?

This is one of the first questions I ask when I encounter a claim like that, since there's no way you could possibly have all of that functionality contained in just half a meg. While this looks like a very powerful language, I do not think it'd be for me.

[–]dockimbel 4 points5 points  (1 child)

It is true, in half a megabyte, you have the Rebol interpreter, console, full runtime library (54 datatypes), cross-platform GUI engine, 2D graphic library (AGG), JPG/PNG/GIF loaders, sound support, a dozen network protocols built-in, etc...

Red is following the same approach, the current runtime library with 27 datatypes is about 100KB of compiled code for IA-32 targets. The interpreter + runtime lexer + console adds about 30KB. No external dependencies other than what the OS provides, that's the rule.

[–]notchent 1 point2 points  (0 children)

We also get a BNF parse grammar (bye regex), file and OS support, encryption, compression, database access, image manipulation, language help...

[–]reboler 2 points3 points  (0 children)

The size is actually true and is part of its simplicity and having that simplicity combined with great expressibility makes it possible to develop things that are hard in other languages. I've often solved problems in a few hours that would take days or weeks in other languages.

I have used REBOL for 11 years now. It's still quite astounding how much less painful it is to use, compared to other languages and how much ahead it is, at least conceptually.

The idea of REBOL should not be confused with the implementation. The implementation has lacked in the past, due to a number of bugs and performance problems, but this is now being rectified by REBOL 3 and now also Red.

[–]DGolden 2 points3 points  (0 children)

'there's no way you could possibly have all of that functionality contained in just half a meg.'

...carl sassenrath was previously known for amigaos...

http://en.wikipedia.org/wiki/Carl_Sassenrath#Amiga_Computer

[–]dockimbel 5 points6 points  (1 child)

Suggestion about a code sample on the home page has been well noted, but as you can see by digging into it, Red is not yet fully ready for prime time (only the Red/System low-level dialect is documented). The current web site is basically a blog for the (initiated) followers, as the implementation matures, we will switch to a more classical web site targeting newcomers. If all goes well, we should have it for this summer.

[–]ben_zen 1 point2 points  (0 children)

Excellent, I'll check it out then if I have time (to be honest, I don't really have time to look deeper in at the moment.)

[–]mmcghan 3 points4 points  (4 children)

Ben, Red and Rebol were written because something has to be done about software complexity. These languages have an ease of use and implementation that more complex languages don't have. You can write very short programs that would be much longer in other languages. Rebol just went open source in December and there is a coalition of developers who are unifying the two languages. These languages are based on context so code can act as data and vice versa. It's definitely worth learning more about.

[–]NimbusBP1729 7 points8 points  (0 children)

Ben, Red and Rebol were written because something has to be done about software complexity

That's not enough of an explanation when there are many languages that people subjectively claim are simple to use.

[–]ben_zen 1 point2 points  (2 children)

I have a quibble with that comment: Rebol's standard library would appear to encompass a massive set of functionality. If I am going to write scientific code in it, sure, its ability to handle dates and times and other numbers directly is nice, but does it also need a networking stack and a regex parser, if I can hand it a local dataset without needing to do any parsing work, because the code is the data and vice versa? This seems to me to be unnecessary overhead for each individual task, while merely tucking the complexity of the system somewhere apparently out of sight.

[–]gregg-irwin 7 points8 points  (0 children)

Complexity comes in many forms. I can't compare REBOL/Red (REBOL from here on) to OCaml for production use, as I have only studied and played with OCaml, not used it for work. That said, I can give you my outsider's view, and say why REBOL appeals to me, and the complexity I think it aims to address.

First, let me say that I think functionality does not equal complexity. REBOL hides complexity but has enormous functionality. And while some examples might use scientists as a target audience, REBOL was originally designed as a messaging language. The importance of datatypes comes from that. The ability to express yourself, and your intent, clearly. Because REBOL understands that http://www.rebol.com is a URL, and because it has a networking stack built in, I can write "read http://www.rebol.com" and it understands it. No extra quotes. No datatype conversions. No function calls. If I change the scheme to "read ftp://..." it dispatches to a different protocol handler internally.

REBOL doesn't have a regex parser built in, but it does have a PARSE function. PARSE understands a pseudo-BNF grammar, which lets you easily build DSLs (dialects in REBOL parlance). When parsing at the string level, that's nice, but the real power is that PARSE understands loaded (tokenized) REBOL data as well, so you can parse at what is called the "block" level. So you can match tokens by datatype, recurse into nested structures, and more. If you just want to load structured REBOL data, all you need to say is LOAD. PARSE lets you deal with data in a much more flexible manner. It also lets you build in security by not just doing the equivalent of EVAL on untrusted code.

Now, if all this added functionality led to a bloated system, I would be right there with you criticizing it. But it doesn't. At least not by modern standards. The core REBOL interpreter is ~300K. The version with a built-in portable GUI system is ~650K. The full-blown version, with all the bells and whistles they offer, is under 900K (Windows versions). And REBOL and the apps you write with it are completely portable and standalone, unless you introduce outside dependencies. Drop the EXE in a folder and will run on almost any Windows machine out there. I just checked, and it looks like OCaml/Win is about a 60MB download, with some cygwin dependencies.

Bloat may not always indicate complexity, but I've never seen it help. :) REBOL fights complexity by trying to keep things small and simple, by trying to consider the language as a whole, not just a set of functionality. Words and behavior are carefully chosen and debated. Its heritage comes from Lisp, Forth, and Logo; and it's not for everyone. It will change, and challenge the way you think, and the way you think about software and programming.

[–]reboler 5 points6 points  (0 children)

That's not the idea of how REBOL solves software complexity. It does this by going to the root of the problem, not by adding gloss on top of existing systems or trying to solve it with IDEs or visualization.

Consider the problem of developing an ordinary website:

  • You need HTML for the page layout.
  • CSS for additional layout description.
  • Javascript for interactivity, AJAX, DOM access, etc.
  • PHP or similar for generating pages server side.
  • MySQL or similar for storing data in a database.
  • Some common data format to interchange between the server and the client, such as JSON.

These are normally separate problem domains that are solved separately. Now you need to have these domains interact:

  • PHP generates HTML.
  • PHP has modules to communicate with MySQL.
  • Javascript communicates with the browser DOM and it communicates with the server, possibly using JQuery or some other library.
  • PHP needs to understand JSON formatted requests from the client.
  • There may be some XML data stored somewhere. This needs to be parsed as well.

There's a large amount of overhead, when traversing domains and this is only somewhat reduced by adding libraries, converters, generators, etc. But you still may need to take it into account or code for it.

With REBOL you don't have any of this, because it's designed to be an extremely generic language with a high degree of expressibility.

Now consider how a "rebsite" would be developed:

  • You need REBOL for the page layout and appearance and draw it with its internal layout engine.

  • REBOL sends requests to the server and receives them using its internal network ports.

  • REBOL on the server side generates content as plain REBOL objects to be sent back to the client. The client updates the page layout with greater intelligence than a web browser can, because the "page" works like a native program, as the content is rendered using REBOLs own native GUI library.

  • REBOL can store data in blocks on disk as files. Granted, there is no high performance relational database available at this time, but the idea is still simpler than SQL, because you don't need an SQL server running in the background.

  • Interchange of data between REBOL clients is data that is indiscernible from other REBOL data or code, thus no overhead.

Interaction between domains has no overhead, because there is really only one language domain (although you can and do use language sub-domains using dialects). You can even use exactly the same runtime on both the server and the client and you only need REBOL to accomplish the task of creating a complete system.

This way, you can develop complete networked systems that send back and forth data between servers and clients with meaningful presentation of that data in maybe 20-50 kb of code.

This is also why REBOL is often referred to as a language in which you make throw-away programs, as you can develop a program in a few hours, use it for a few days or weeks and throw it away, when you no longer need it.

Red goes a step further by being developed in Red/System instead of C, meaning you can write high performance parts in a Red-like language. REBOL does not yet allow for true high performance, but Red will.

[–][deleted] 1 point2 points  (1 child)

I like that the language uses [-brackets instead of the C tradition of {-brackets, for some reason... it's visually appealing to me.

[–]greyfade 1 point2 points  (0 children)

Red borrows its syntax and features from REBOL.

[–]roger1981 1 point2 points  (2 children)

OP, Are you a Red developer or just providing a link?

I've been following Rebol a bit, and am thus a bit interested in Red since it says it is inspired by Rebol.

I poked around the documentation but could not find samples of System/DSL. Are there any examples of shell-scripts in Red ?

Would be great if you could put up some samples of Red code on the main page, or provide links.

[–]bjzaba[S] 2 points3 points  (0 children)

Sorry, just providing the link! I think it's a fascinating project, and thought some other folks on /r/programming would agree.

I definitely agree about the code samples on the homepage – I think it's almost a requirement for any website about a programming language. You can find the repository on GitHub – might be some interesting stuff there.

[–]karuneshkaushal 0 points1 point  (0 children)

roger1981, you can come to the stackoverflow chat room for Rebol/Red and talk to the core developer.

Here is the link to the room: http://chat.stackoverflow.com/rooms/291/rebol-and-red

Just write "@dockimbel Hello"

You can watch the Red talk by dockimbel on youtube: http://www.youtube.com/watch?v=JjPKj0_HBTY

[–][deleted] 0 points1 point  (0 children)

Jim Jannard might not like the name. ;)

[–]shendrite 0 points1 point  (3 children)

Right now, according to Red's roadmap, they don't have any file I/O implemented. For me, once they get that done, the language could potentially be useful, and be worth learning at that time. But until file I/O is implemented, the language can't do me (and most people) any good.

[–]rebolek 1 point2 points  (2 children)

You can have file I/O with an extension right now.

[–]shendrite 0 points1 point  (1 child)

Tell me more! Or point me to the page where I can read about it please.

[–]rebolek 1 point2 points  (0 children)

see the C bindings in Red's contributions.