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

World: r4wp

[#Red] Red language group

DocKimbel
26-Sep-2012
[2275]
Just copy/paste the code from piratepad to %hello.red
Pekr
26-Sep-2012
[2276x4]
When copying back to piratepad, it looks ok, but I will make a screenshot 
...
Maybe it is a font problem with the console then?
http://xidys.com/pekr/red/red-unicode-bugs.jpg
as you can see in my output, Chinese is not there, and third greek 
char is not there too ... but when copying from the console and pasting 
into Notepad, it shows the chars ...
DocKimbel
26-Sep-2012
[2280]
Ah, the squares were for Chinese characters...that's normal, Consolas 
cannot display CJK on western Windows.
Pekr
26-Sep-2012
[2281x2]
yes, chinese, plus one greek char ...
I know about the chinese, you talked about it here, but the third 
greek char?
DocKimbel
26-Sep-2012
[2283x3]
Strange, that character displays fine on my Windows 7...
See: http://static.red-lang.org/hello_unicode.png
My Windows version is 6.1.7600 while yours is 6.0.6002. That might 
explain the differences.
Pekr
26-Sep-2012
[2286]
I am still on Vista, in 2 months on Windows 8 - another adventure 
:-)
DocKimbel
26-Sep-2012
[2287x2]
Are you sure you're not using Lucida? When I switch to Lucida, I 
get that 3rd greek character issue.
Vista, then Win8...you're not skipping the right Windows versions. 
;-)
Pekr
26-Sep-2012
[2289x2]
I know, but I need new NTB after almost 6 years - at least core i5, 
8GB RAM, SSD disk :-)
yes, my font is Lucida Console. There is only one other option - 
raster ... I can't select any other font in that dialog ...
DocKimbel
26-Sep-2012
[2291]
If you want you can manually install Consolas font as explained here: 
http://www.hanselman.com/blog/UsingConsolasAsTheWindowsConsoleFont.aspx
Pekr
26-Sep-2012
[2292]
OK, but the other reported things helped to find some bugs? All was 
it all just a font issue?
DocKimbel
26-Sep-2012
[2293]
No, there were bugs and that last one is a font issue.
Pekr
26-Sep-2012
[2294]
Downloaded Console2, which allows to have tabs, and allows me to 
change fonts, so I just choosed Consolas and the output is correct 
...
Andreas
26-Sep-2012
[2295x2]
Happy to report that Unicode on Linux with an all-UTF8 setup works 
just fine for me.
I noticed that the red/tests/hello.red file is UTF-8 with a BOM -- 
I'd suggest dropping the BOM, as using a BOM with UTF8 is not recommended.
DocKimbel
26-Sep-2012
[2297]
No problem to drop the BOM(b)! :-)
Andreas
26-Sep-2012
[2298]
Now off to try what happens with a Latin1 environment, but I guess 
it won't work :)
Pekr
26-Sep-2012
[2299]
OK, so now I am back after the reboot, so my default Vista console 
uses nice Consolas font, and it now displays everything (apart from 
Chinese) correctly ...
DocKimbel
26-Sep-2012
[2300x2]
Red currently maps only to Unicode C printing functions. We could 
tweak the code to detect (for Unix platforms) the locale and fall 
back to Latin1 if required.
Pekr: good!
Pekr
26-Sep-2012
[2302]
So, what's next? :-)
DocKimbel
26-Sep-2012
[2303x3]
Andreas: do you think we should add Latin1 locale support too or 
just assume that now everybody use Unicode-capable terminals?
Next: char! and all series actions already present in block! implemented 
for string!
Should be just a couple of hours of work, but I need first to fix 
one or two tickets for Kaj.
Arnold
26-Sep-2012
[2306]
Now Red can output texts it can produce strings with html code? And 
so theoretically is up to CGI processing maybe with a little help 
from REBOL. Or is that too early?
GrahamC
26-Sep-2012
[2307]
Can red access stdin and stdout ?
Pekr
26-Sep-2012
[2308x4]
Not yet imo. There's imo no I/O apart from print ....
but - Red apps is an executable, so theoretically, on systems like 
Linux, maybe it can be piped?
hmm, but it would have to support stdin/out for that probably anyway 
:-)
Kaj wrapped some libraries, maybe those cover some ground there, 
e.g. Curl binding allows you to work with networking:

http://www.red-lang.org/p/contributions_20.html
Kaj
26-Sep-2012
[2312x2]
There are functions capable of stdin/out in the C library binding. 
Some of them are included in Red/System itself
Those can be inlined in Red, but Red itself currently only has print 
to stdout
DocKimbel
26-Sep-2012
[2314x2]
We'll add stdin proper support when we'll implement console:// scheme.
We could add CGI support earlier though.
Pekr
26-Sep-2012
[2316x2]
Console scheme? We will have console? :-)
Nice though, I always liked schemes like console://, clipboard://, 
those were just under-utilised imo :-)
DocKimbel
26-Sep-2012
[2318]
Of course, as soon as it will be possible to make Red work in a console.
Kaj
26-Sep-2012
[2319]
Can we call it E: like on my Atari 8-bit? ;-)
Arnold
26-Sep-2012
[2320]
That would give a little showcase to Red. Pls do not feel pushed 
Doc! One fool can ask more than ten wise men can answer ;-)
DocKimbel
26-Sep-2012
[2321]
What was the Amiga device name for that? CON:?
Pekr
26-Sep-2012
[2322]
yes
Kaj
26-Sep-2012
[2323]
If it was like DOS :-S
Pekr
26-Sep-2012
[2324]
I just got an idea - we will reimplement Amiga OS in a modern way 
:-)