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

World: r4wp

[#Red] Red language group

DocKimbel
26-Apr-2013
[7283]
Kaj: I don't understand what you are talking about. If you cared 
about giving an example or any useful information I could look at 
or work on, your post would look a bit more constructive.
Kaj
26-Apr-2013
[7284x6]
I've been working on adding UTF-8 support for the past week, so you'll 
see construction soon
Here's what happens when I paste UTF-8 in the console on Linux:
-=== Red Console alpha version ===-
(only Latin-1 input supported)

red>> s: "Espaņol"
== "Espa"
red>> length? s
== 4
A very similar thing happens when I paste Latin-1 into Windows
Here's what happens when I try to compile Latin-1 source code:
-= Red Compiler =- 
Compiling /home/kaj/Red/common/examples/Latin-1.red ...
*** Syntax Error: Invalid string! value
*** line: 5
*** at: {"Espa\ufffdol.txt" "Espa\ufffdol"^M
}
DocKimbel
26-Apr-2013
[7290x3]
Compiling: 
	Red [ ] print s: "Espaņol"
works fine here and prints the correct output when run.
Red input sources must be UTF-8 encoded.
You can't paste UTF-8 in the console, it supports only Latin-1.
Kaj
26-Apr-2013
[7293]
Yes, so the Latin-1 promise is false
DocKimbel
26-Apr-2013
[7294]
??
Kaj
26-Apr-2013
[7295]
You can't paste Latin-1
DocKimbel
26-Apr-2013
[7296]
Are you sure you're pasting Latin-1 and not UTF-8?
Kaj
26-Apr-2013
[7297x4]
Yes, tried many times many ways
The printing backend doesn't fully support Unicode, either. This 
works on Linux:
print read "http://syllable.org"
But on Windows the output is truncated somewhere between the Spanish 
and Russian text parts
DocKimbel
26-Apr-2013
[7301]
Does READ create a red-string!?
Kaj
26-Apr-2013
[7302x3]
Yes
With the only function in Red that supports Unicode: string/load
string/load can only load UTF-8, so only ASCII and UTF-8 files can 
be read, not Latin-1
DocKimbel
26-Apr-2013
[7305]
You caught me while in the middle of work on pic-emitter, I switched 
to master branch without saving my changes, and now my local git 
repo is messed up (not sure why it happened). I can't test anything 
anymore before finding a way to fix it...
Pekr
26-Apr-2013
[7306]
Kaj, are you anyhow pressed for time with your solution? I can smell 
some push here, and Doc is now working on another priority. I would 
let him finish pic emitter and then ask for eventual rescheduling 
of priorities ...
DocKimbel
26-Apr-2013
[7307x4]
I've just fixed my repo with the help of Andreas.
Kaj: I think you're right about the console, it handles correcty 
only ASCII input.
For: print read "http://syllable.org", do you feed string/load with 
an UTF-8 input even on Windows?
With the only function in Red that supports Unicode: string/load

 Red string! is fully supporting Unicode. Your issue is related to 
 I/O and Red has no support for that yet (except for the currently 
 hardwired stdout).
Pekr
26-Apr-2013
[7311]
Doc, would you mind, if I would, from time to time, republish some 
of your tweets or other stuff on FB channel? I can still believe 
it has some value, maybe I am just used to the FB ...
DocKimbel
26-Apr-2013
[7312]
Franckly, I've reached my limit wrt to communication channels. Also 
it would be counter-productive to me to do such tasks, I see no reason 
why it couldn't be done by someone else?
Gregg
26-Apr-2013
[7313]
I think having comm lieutentants is a good idea.
DocKimbel
26-Apr-2013
[7314]
Yes, that would be helpful.
Pekr
26-Apr-2013
[7315]
OK, I'm on it :-)
Kaj
26-Apr-2013
[7316x3]
Petr, I'm not pressed for time, except for my career in general. 
I only posted examples because Doc asked for them
I'm only pushing in so far as I have been inquiring about encoding 
support for several weeks, and the state of things has been downplayed, 
so I want it to be noted
Further, I'm working Unicode conversions directly into my I/O routines, 
so I need to know how Red currently functions and what the future 
plan is
Pekr
26-Apr-2013
[7319]
ok, fair enough. I believe that Doc would wish Red development would 
go faster, but there's only 24 hourse per day, we know :-)
Kaj
26-Apr-2013
[7320x2]
For example, there's an internal single byte encoding that's marked 
"Latin1", but I now know there is no way to get Latin-1 data in or 
out, so I wonder if this encoding will ever be used for more than 
7-bit ASCII
Yes, that's why I've been helping with the coding for over two years
Pekr
26-Apr-2013
[7322]
yes, and as a contributor, you have been surely noticed :-) I am 
still somehow satisfied with how Red development goes, eg. even in 
comparison with R3. Nothing against R3, I wish Cyphre takes us to 
Android, but for general purpose needs, untill R3 gets protocols, 
multiline console, etc, stuff noticed on SO, it is no go for me. 
So, I keep my fingers crossed as far as Red development goes - it 
is nice to have a strong leader around ...
Kaj
26-Apr-2013
[7323]
I'd better not comment on the Git issue, because it will be considered 
unconstructive :-)
Andreas
26-Apr-2013
[7324]
Especially as it had nothing to do with Git, yes.
Kaj
26-Apr-2013
[7325]
See?
Andreas
26-Apr-2013
[7326]
As far as I understood the plan, the internal "Latin 1" encoding 
is used to store Unicode codepoints 0-255. So this should be used 
already.
DocKimbel
26-Apr-2013
[7327x2]
Kaj: why don't you open a ticket with a code example on github if 
something is broken or not working as advertised? I thought that 
was our process to get issues solved.
Andreas: that's what is supposed to be implemented, but now I have 
a doubt about it. Will need to check the code tomorrow.
Kaj
26-Apr-2013
[7329x2]
Because you said it's not a priority and because I'm trying to ananlyse 
and fix things myself first. I'm just reporting my findings
Actually, I did one test that confirms Andreas' statement. The only 
way to get 8-bit data in is to compile a UTF-8 string literal that 
fits into Latin-1
Andreas
26-Apr-2013
[7331]
Sounds like it works as advertised, then.
Kaj
26-Apr-2013
[7332]
No, the console says you can input Latin-1, and you can't, not even 
through UTF-8