• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[#Red] Red language group

DocKimbel
14-Sep-2012
[1681]
Works! (was testing in the wrong console)
Arnold
14-Sep-2012
[1682x2]
That's good ;)

I take it for granted that this is just on the way to having maximum: 
max block-of-values ?
and it returns the max in maximum?
Gregg
14-Sep-2012
[1684]
I think he's just working on macro support in this example.
Arnold
14-Sep-2012
[1685]
that makes sense.
DocKimbel
14-Sep-2012
[1686x4]
Arnold: it's for Red/System, not Red.
Nice features of the new macro support: 


- the replacement in the argument block operates for any block series 
(includes paths types)

- nested macros in macros are resolved


- you can define the argument as paren! instead of block!, and paren! 
will then stay once macro resolved.
Here's a more complex example:
    
    #define MIN(a b) [ either a < b [a][b] ]
    #define MAX(a b) [ either a > b [ MIN(p/a p/b) ][p/b] ]

    p: "Hello"
    print MAX(2 1)

outputs: H
(in fine, MAX(2 1) resolves to: p/1)
Arnold
14-Sep-2012
[1690]
Nenad, thank you for the explanation. Good to know even the simple 
test works both ways, and I am a programmer not a tester ;)
DocKimbel
14-Sep-2012
[1691]
New macro system pushed online in the v0.3.0 branch. If anyone needs 
it in other branches, let me know.
szeng
14-Sep-2012
[1692]
hello.red segfaults on my ubuntu 12.04 system, any idea?
DocKimbel
14-Sep-2012
[1693]
No, I haven't yet tested the Red codebase on Linux, but I will in 
a few minutes.
szeng
14-Sep-2012
[1694]
So I am the first one to test it on linux? :)
DocKimbel
14-Sep-2012
[1695]
It looks like. ;-)
szeng
14-Sep-2012
[1696]
Cool, it compiles anyway.
james_nak
14-Sep-2012
[1697]
Doc, did you know you have a possible theme song? It goes back to 
when I was a young lad but it still rocks:  "Red" by Sammy Hagar. 
http://www.youtube.com/watch?v=sfdy7tC-Us0&feature=fvwrel
DocKimbel
14-Sep-2012
[1698]
Nice Red rock song. :-)
GrahamC
14-Sep-2012
[1699x5]
I did this 
$ git clone https://github.com/dockimbel/Red.git

so how come red.r doesn't come down?
I got the redme.md and the license ...
hmm..lots of files don't come down
ooops .. my bad
anyone know how to pull this branch down?
DocKimbel
14-Sep-2012
[1704]
If your `git clone`succeeded, `cd`inside the repo, and do a `git 
checkout origin/v0.3.0`
GrahamC
14-Sep-2012
[1705]
thanks .. found the answer on SO too
DocKimbel
14-Sep-2012
[1706x2]
Math operations now supported in Red (integer! values only for now). 
For example:

    a: 123
    a: a + 2
    print a * 6 - a

will correctly output 625.
@szeng: I will look into the Linux issue tomorrow.
Kaj
14-Sep-2012
[1708x9]
I'm awed by the great elegance of it all
The code is very accessible
I like the new macro system, too. I've wanted that for a long time 
(in silence :-)
We'll inform Peter Busser that Red supports round brackets now ;-)
I've updated the recipe in the Syllable build system to add Red:
http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/Red--current/
On Linux, the executable ends up in the directory of the compiler, 
instead of the working directory
I can confirm the segfault on Linux
Hm, I see Exec in the code :-)
DocKimbel
15-Sep-2012
[1717x2]
Thanks Kaj, now you can see how all pieces start fitting together. 
Say hello to Peter for me, tell him, I'm sorry we still don't support 
FreeBSD, but I'm looking forward to fix that next time I'll meet 
with him. ;-)
I've found the cause of the linux regression, it was this commit:


https://github.com/dockimbel/Red/commit/fabad833b6bb8b82f9efdf4933c18bfd997a863f

Fixing it...
Pekr
15-Sep-2012
[1719]
Doc - looks like you are having fun finally coming with Red :-), 
though it is clear it is a hard work :-)
Henrik
15-Sep-2012
[1720]
am I correct that there is no interactive console yet and you need 
to compile source code?
Pekr
15-Sep-2012
[1721]
yes, you are correct ...
DocKimbel
15-Sep-2012
[1722x4]
I would very much like to have a console, but it is not doable at 
this point (unless someone has a bright idea?). We'll add one as 
soon as possible.
Crashes on non-Windows platform fixed (was causing also quick-test 
to fail tests).
# rebol -qw red.r %red/tests/hello.red

-= Red Compiler =- 
Compiling red/tests/hello.red ...

...compilation time: 	 30 ms

Compiling to native code... 

...compilation time: 	 1282 ms
...linking time: 	 	 25 ms
...output file size: 	 	30912 bytes

# ./hello
42
Pekr: I had fun too working on low-level with Red/System, but it 
takes a lot of energy while working at Red level is a lot more relaxing. 
;-)


But this is short holidays, once Red gets mature enough (I bet on 
a couple of months), we'll start working on Red/System v2 (rewritten 
in Red, with a new compiler & linker architecture). This will give 
up the opportunity to reboot Red/System, fix a few design decisions 
if required, extend it, and get a clean and lean new code base in 
Red. I plan to write some architectural specs about the target compiler 
before starting, so all contributors will be able provide me with 
feedback before we implement it. Trust me, you _will_ like the final 
compiler! ;-)
Ashley
15-Sep-2012
[1726]
Sure I speak for many who are [silently] watching this and waiting 
for it to mature to the point where we can usefully contribute.
Henrik
15-Sep-2012
[1727]
Ashley, same here. I can't really do much right now other than watch 
this wonderful thing unfold.
DocKimbel
15-Sep-2012
[1728x2]
Ashley: that point is closer than you might think. Even at bootstrapping 
stage, once Red get enough Core features, you and any other reboler 
will be able to add new libraries or port existing one from REBOL 
(should be trivial in most cases). That's not limited to mezz code 
though, you'll be able to add bindings to pretty much anything, protocols, 
provide Red plugins for 3rd-party apps (browsers e.g.), even make 
a View clone if you want (that one could even be a community project). 
:-)
New macros system and Red/System fixes retrofitted from v0.3.0 to 
master branch.
Pekr
15-Sep-2012
[1730]
Which branch should we use? 0.3.0. or master again?