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

World: r4wp

[#Red] Red language group

DocKimbel
12-Dec-2012
[4699]
More than ever. ;-)
GrahamC
12-Dec-2012
[4700]
Hopefully we will see some synergies with the two projects.
DocKimbel
13-Dec-2012
[4701]
I just had a very short look on R3 code yesterday's night, what striked 
me the most at first look is how both R3 and Red are struggling (in 
different ways) to avoid writing C code as much as possible. :-)
Pekr
13-Dec-2012
[4702]
in what way is R3 struggling to write C code? Isn't it written purely 
in C?
DocKimbel
13-Dec-2012
[4703]
It seems that is uses some REBOL templates to generate some additional 
C code during the building process, like this one:

https://github.com/rebol/r3/blob/master/src/boot/types.r
Endo
13-Dec-2012
[4704]
r3 / src / tools section is great :) I especially like make-make.r
BrianH
13-Dec-2012
[4705]
R3's source also avoids direct C code by doing a lot of the work 
in macros. With the macros, the C source of a native doesn't look 
that much different than mezzanine code.
Arnold
13-Dec-2012
[4706]
I noticed some similarities too in actions
Pekr
13-Dec-2012
[4707]
Doc, as R3 got released on 12.12.2012, you should prepare some release 
or nice Red surprise for 21.12.2012, to be on pair :-)
Cyphre
14-Dec-2012
[4708]
Pekr, something like "The end of World and Red"?(no offense,  just 
a  joke Doc and John) :-)
Pekr
14-Dec-2012
[4709]
Actually old stuff will die off - Mayans thought about the date as 
of the new fresh era, new oportunities, so quite the opposite :-)
Rebolek
14-Dec-2012
[4710]
World has already ended with its closed-source nature :)
DocKimbel
14-Dec-2012
[4711]
Cyphre: don't count on that (at least for Red)! ;-)
Geomol
14-Dec-2012
[4712]
I don't agree. (of course) World is on hold because of lack of finances 
to bring the development forward.
Arnold
14-Dec-2012
[4713]
The World has ended the Maya's before the Maya's could end the World.
Pekr
15-Dec-2012
[4714]
Donated 50 EUR so that Nick has at least something to match :-)
DocKimbel
15-Dec-2012
[4715]
Thanks! :-)
Gregg
15-Dec-2012
[4716]
Other donations have been made as well, but it's great to remind 
people that we need to support Doc so he can focus and keep making 
great progress. Thanks Petr.
Pekr
15-Dec-2012
[4717]
Ah, glad to hear that :-)
Janko
15-Dec-2012
[4718]
I yesterday donated just 15EUR (just for a pizza, and didn't intend 
to mention it here), but if Nick will match it will be 2 pizzas :P
Pekr
15-Dec-2012
[4719]
:-)
DocKimbel
15-Dec-2012
[4720x2]
If I cut each pizza in four parts, that's almost 8 lunches! :-)
Actually, good decent pizza in restaurant is about 3-5€ here, so, 
15€ is at least 3 pizzas!
Gregg
15-Dec-2012
[4722]
Janko, every bit counts. I've donated this month, but I will match 
December donations in a January donation, up to USD$200. So, donations 
in December get double matching up to USD$200, if Nick matches as 
well.
DocKimbel
15-Dec-2012
[4723x2]
Red 0.3.1 released: http://www.red-lang.org/2012/12/red-v031-functions-support-added.html

- function support
- path get/set notation support
- refinement support for native functions
- expressions in parentheses compilation

- new datatypes: function!, paren!, path!, lit-path!, get-path!, 
set-path!

- new actions and natives: find, select, copy, reflect, type?, halt,...

- extended mold, form and comparison operators to all new and existing 
datatypes
- many new mezzanines functions

- modulo and remainder operators on floats implemented for ARM backend
- Quick-Test testing framework ported to Red
- a truckload of new unit tests
- many bugfixes
- about 200 new commits to the Github repository
- updated Red/System formal description document
Gregg: thank you very much!
Gregg
15-Dec-2012
[4725x2]
Wow! That's great Doc.

We'll try to keep you supplied with plenty of pizza. :-)
Is http://www.red-lang.org/p/roadmap.htmlcurrent? You've been making 
so much progress, I'm guessing it's a little out of date.
Marco
15-Dec-2012
[4727]
Why default red's functions refinements value is false?
DocKimbel
15-Dec-2012
[4728x4]
To avoid having to use to-logic when using refinements to pick a 
value in a series. For example:

In REBOL:
    foo: func [/only][pick [1 2] only]
    foo

    ** Script Error: pick expected index argument of type: number logic 
    pair
    ** Near: pick [1 2] ref

In Red: it should return 2.
Note that PICK taking a logic! value is not yet implemented, it will 
be added in the next days.
This is a code pattern I use often, but always find it annoying to 
have to add a to-logic call each time in front of refinements.
Gregg: It will need to be updated a bit, right
Kaj
15-Dec-2012
[4732]
Thanks for supporting Red, Gregg! The others, too
GiuseppeC
15-Dec-2012
[4733]
Great Doc !
BrianH
15-Dec-2012
[4734]
Funny, I usually just reverse the order of the PICK elements and 
use NOT.
Kaj
16-Dec-2012
[4735]
Are only the refinements FALSE, or also extra arguments?
DocKimbel
16-Dec-2012
[4736]
Unused refinements only. Extra arguments are set to none.
Kaj
16-Dec-2012
[4737]
OK, that sounds useful
DocKimbel
16-Dec-2012
[4738]
It is also more consistent, as used refinements are set to TRUE.
Kaj
16-Dec-2012
[4739x2]
Just specifiying a return type adds 68 bytes to a function. Why is 
that?
(In Red)
DocKimbel
16-Dec-2012
[4741]
It shouldn't have any effect on the generated code size. Can you 
send me the function?
Kaj
16-Dec-2012
[4742]
It's the Fibonacci function in the C library binding. I checked in 
a Red version. If you add return: to that it becomes 68 bytes bigger
DocKimbel
16-Dec-2012
[4743]
Does the function becomes bigger or the whole binary?
Kaj
16-Dec-2012
[4744]
The binary. The function would be hard to estimate
DocKimbel
16-Dec-2012
[4745x2]
Then, that's normal, the added size is for dynamically creating the 
extra literals you've added to the spec block. Remember that the 
source code of your function is built-in the final binary, so you 
can use reflection and soon, rebuid the function dynamically at runtime.
Also, you won't find the source code of block literals in text format 
if you scan the binary, because they are stored as code and not data. 
That is the only way currently they can be stored in compiled binaries. 
Storing them as text would need a way to load them and then compile 
them at runtime (it will be possible in the future, but not right 
now).


Anyway, the probably best way to store all those series literals 
is to allow the use of a redbin format. We will have that too at 
some point.
Kaj
16-Dec-2012
[4747]
Ah, thanks
DocKimbel
17-Dec-2012
[4748]
New features of the day: 
- SWITCH implemented (/default refinement supported)
- CASE implemented (/all refinement supported)

- FIND and SELECT extended to handle datatype values matching. Example:

    find ["hello" 2 red] integer!
    == [2 red]