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

World: r4wp

[#Red] Red language group

Andreas
1-Oct-2012
[2466x2]
I think most SD problems are solved with recent boot loaders, anyway.
I have a few SanDisk Class 10 Extreme myself, which didn't work initially 
when I got my first RPi, but work just fine now.
Gerard
1-Oct-2012
[2468]
http://uk.farnell.com/raspberry-pi-accessories#operatingsystem
has some more SD cards and accessories - as described in my new book 
: The Raspberry Pi - a quick start guide - by Maik Schmidt pubished 
by pragmatic programmers
DocKimbel
1-Oct-2012
[2469x2]
Thanks Gerard!
Implemented IF and EITHER, I just wanted to share their implementation 
with you (extract from Red compiler source)::

	comp-if: does [
		comp-expression		
		emit compose [	
			if (logic-true?)
		]
		comp-sub-block
	]
	
	comp-either: does [
		comp-expression		
		emit compose [	
			either (logic-true?)
		]
		comp-sub-block
		comp-sub-block
	]

Shouldn't be more complex than that, no? ;-)
Kaj
1-Oct-2012
[2471]
Turing is calling
GrahamC
1-Oct-2012
[2472]
forth computers are single stack .. they haven't conquered the world
Kaj
1-Oct-2012
[2473]
Are you sure?
Steeve
1-Oct-2012
[2474]
I wonder for some time why you give long c-like prefix names to every 
functions. 
Is the context not enough? like rebol style does prefer.
Or is that you fear to forget what's doing your own code ? ;-)
Or maybe there is a technical reason behind it I missed.

No offense intedended here Doc, just a genuine question about your 
prefered coding style.
DocKimbel
1-Oct-2012
[2475]
I'm not sure what you mean by "long c-like prefix names to every 
functions."?
Steeve
1-Oct-2012
[2476]
comp-*
DocKimbel
1-Oct-2012
[2477]
You talk about the "comp-" prefixes I use in the compiler code?
Steeve
1-Oct-2012
[2478x4]
yep
is the context not enough ? I mean you use a dffierent context when 
compiling.
Well I'm not sure if what I'm saying makes sense even for me, sorry 
;-)
I should go read some manga and relax
DocKimbel
1-Oct-2012
[2482]
It adheres to REBOL convention for naming functions (starting with 
a verb) but it also serves other purposes:


- as a way to classify the compiler internal functions by category 
or compilation stages, e.g., comp-* functions do the translation 
+ code generation, fetch-* just fetch source code, check-* perform 
type or spec verifications, emit-* just generate target code, etc...


- as a way to stratify the code in compiler context. As I want to 
keep the compiler internal code in one piece (because of too many 
common dependencies). It helps me navigate quickly in the code when 
searching for a bug for example.
Steeve
1-Oct-2012
[2483]
Ok I see your point with the depedencies, different contexts could 
be annoying.
DocKimbel
1-Oct-2012
[2484x2]
They might do more harm than good.
(in this specific use case)
Steeve
1-Oct-2012
[2486x3]
The model you're using to compile is nested functions which in the 
end emit code.

Don't you think several well separated stages which emit their own 
dialect would avoid to much depedencies in your code ?

Another benefit of stages is that you can easly add/remove specific 
phase like optimization ones
In return it would be slower
but more flexible
DocKimbel
1-Oct-2012
[2489]
Good point and I totally agree with that. That's basically the plan 
for Red/System v2. But, as you say, it can become quickly very costly, 
so it needs to be done carefully (needs time) and *sparingly*.
Steeve
1-Oct-2012
[2490]
yeah but you could have different path containing different stages 
to allow fast or slow compilation (with full optimization)
DocKimbel
1-Oct-2012
[2491x3]
My goal with the bootstrapped current version was to try some experiments, 
as all the current REBOL code will be trashed at the rewrite in Red 
stage. I wanted to see how far I could get with very simple design, 
so I can test how REBOL features can help or get in the way for writing 
complete compilers.
Also, the implementation speed factor also weighed a lot in architectural 
choices for the bootstrap code.
I could have gone by the (Dragon) book and done it in classic way, 
but that would have been a shame IMHO, to not try new approaches 
with a language like REBOL.
Gregg
1-Oct-2012
[2494]
I think the way you've approached it so far is great Doc, though 
I haven't said much.
Bas
2-Oct-2012
[2495x7]
This coming saturday october the sixth,  Kaj will show his work (in 
progress) to get the Red Programming Language running on the Raspberry 
Pi.
http://www.hardwarefreedomday.nl/2012/Red-Rasperry-Pi.html
Please tweet this etc. if possible.
This during Hardware Freedom Day.
at the TkkrLab Hackerspace Enschede
At walking distance from Enschede Railway Station.
Entrance is free, registration required.
DocKimbel
2-Oct-2012
[2502]
Great news!
Arnold
2-Oct-2012
[2503]
Bas, the link is working but should be Red-Raspberry-Pi.html?
DocKimbel
2-Oct-2012
[2504]
Too late for changing the URL (unless Bas puts a redirection).
Bas
2-Oct-2012
[2505x4]
Arnold, thanks for pointing this out.
Wrong link will now redirect to
http://www.hardwarefreedomday.nl/2012/Red-Raspberry-Pi.html
(with b)
Gerard
3-Oct-2012
[2509]
In a near future we can hope to program our own NAO robot with Red, 
isn't it ? http://fr.wikipedia.org/wiki/Nao_%28robotique%29 or http://en.wikipedia.org/wiki/Nao_%28robot%29
DocKimbel
3-Oct-2012
[2510]
Funny you're mentioning NAO, I was thinking just before starting 
Red, to apply at Aldebaran Robotics who's building them. ;-) (I was 
living not far from their office in Paris).
Kaj
3-Oct-2012
[2511]
It runs Intel Linux, so it should be no problem, even right now
DocKimbel
3-Oct-2012
[2512]
Actually, I'm using the much more affordable Robotis Bioloid to play 
a bit with robotics, Red/System AVR8 experimental port (targeting 
Atmel328) was meant to let me, not only play with Arduino boards, 
but also drive Bioloids. ;-) Too bad I don't have time these days 
to go further on that port.
Gerard
3-Oct-2012
[2513]
Nice Doc, you could afford to get  your own robot to play with - 
and I agree it's unpleasant having to pause playing with it so long 
 - more often than we can afford to - for now, at least. Keep up 
the good work ...
Pekr
4-Oct-2012
[2514]
I know I asked in the past, but - what is the minimal HW requirement 
for Red to be ported onto, and still being efficient? I mean - we 
were looking into Ubicom chipset replacement, and specifically at 
some PIC32 controllers, as well as ARM M controllers. I know some 
commercial development tools, which span across various chipsets 
....
DocKimbel
4-Oct-2012
[2515]
The minimal requirements for Red would be something like: a 32-bit 
CPU or MCU and 1MB of RAM. 


For Red/System, a 32-bit CPU/MCU and 32KB of RAM (at least 1KB for 
stack) would be enough to run some small programs. A 8-bit version 
is still possible though.


ARM Cortex-M controllers: no problem for running on them as long 
as we implement a Thumb instruction-set backend (could be merged 
with current ARM backend).