r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Red] Red language group

Kaj
7-Aug-2011
[2828]
Yes, exactly like cURL
Dockimbel
7-Aug-2011
[2829]
Have you investigated what is causing that difference on Syllable?
Kaj
7-Aug-2011
[2830]
Not deeper than the LSB spec you found that lists possible functionality 
that any implementation can put in there
Dockimbel
7-Aug-2011
[2831]
I mean: it looks like Syllable is not initializing the C lib the 
same way as other OS.
Kaj
7-Aug-2011
[2832]
It would be surprising if it would, because this is very OS specific
Dockimbel
7-Aug-2011
[2833]
Maybe you could find out what is causing that in Syllable and fix 
it?
Kaj
7-Aug-2011
[2834x2]
There's nothing to fix. This is how it's implemented in Syllable's 
case
Most of the adaptation of Syllable to standard software is in the 
C library. This is where the handshake between kernel and userland 
is done in common systems
Dockimbel
7-Aug-2011
[2836]
Well, then I am ok to add that libC init call in Syllable's runtime 
part (runtime/syllable.reds) as long as it doesn't need any other 
OS-specific additions in Red/System.
Kaj
7-Aug-2011
[2837x2]
OK, thanks. It will also be needed on other systems, though, in forms 
specific to their C library. I've already included the deviations 
for Linux
I haven't tested it yet, but I'm sure that without it, things such 
as get-env won't work
Dockimbel
7-Aug-2011
[2839]
I won't add it for other OS until it becomes mandatory for Red.
Kaj
7-Aug-2011
[2840]
That's fair enough. I also like to postpone things until they're 
proven necessary :-)
Dockimbel
7-Aug-2011
[2841]
BTW, this call could prevent Red from working on Syllable as that 
libC init is a blackbox. I especially fear a clash with Red and libC 
thread init routines.
Kaj
7-Aug-2011
[2842x2]
It would be much worse if it weren't a black box. :-) You'd have 
to duplicate all the initialisations done in there for all systems 
and all C libraries and all versions of them
If Red threading will be incompatible with C libraries, it will be 
usable in pure Red programs, but not in any program that uses any 
library that uses the C library
Dockimbel
7-Aug-2011
[2844]
Some incompatibilities with multi-threaded C libs might happen, but 
mono-threaded C libs should be safe.
Kaj
7-Aug-2011
[2845]
cURL is mono-threaded, though
Dockimbel
7-Aug-2011
[2846]
I don't know exactly what libC is doing in its thread init routine 
nor I have time now to investigate that. We'll see if any issue arises 
once Red gets multithreading support.
Kaj
7-Aug-2011
[2847]
I'm fairly sure they would be fixable
Dockimbel
7-Aug-2011
[2848]
BTW, Red will probably be distributed both as a standalone exe and 
as a dynamic library. So if people wants or needs to deeply rely 
on C libs, they could embed Red in a C project easily.
Kaj
7-Aug-2011
[2849]
For Syllable Desktop I have to disable CDROM support, because we 
have only recently ported that to SDL. But now I get the windows, 
both with and without border
Pekr
8-Aug-2011
[2850]
it should not be difficult to port View engine, no? SDL is surely 
very welcomed ....
Kaj
8-Aug-2011
[2851x2]
The View engine is under unknown licence, so it's useless
Do you see them as competing? If the View engine were BSD, I would 
still put it on top of SDL
Henrik
8-Aug-2011
[2853]
Isn't it enough to just make it behave like View?
Kaj
8-Aug-2011
[2854x2]
I hope so
There will always be subtle differences, though, so like Red, it 
won't be fully compatible
Henrik
8-Aug-2011
[2856]
View is events, basic graphics structure, DRAW and window handling, 
as I see it.
Kaj
8-Aug-2011
[2857x3]
All that except DRAW is done by SDL. For extra functionality, there 
are many libraries
This is what I want to make:
http://www.youtube.com/watch?v=8nA4WaJTc7Y&NR=1
Endo
8-Aug-2011
[2860]
GEOS on C64 is much better :)
http://www.youtube.com/watch?v=j1Mnvead8Tc
Dockimbel
8-Aug-2011
[2861x4]
Support for functions with variable number of arguments just released.
New attribute 'variadic documentation: http://static.red-lang.org/red-system-specs.html#section-6.3.3
New attribute 'typeinfo documentation: http://static.red-lang.org/red-system-specs.html#section-6.3.4
'typeinfo is a variant of 'variadic that provides also argument type 
at runtime.
Kaj
8-Aug-2011
[2865x2]
Shouldn't that be type-info?
Endo, it's in development
Dockimbel
8-Aug-2011
[2867x3]
I want attributes to be single words, so as callback is also wrote 
without an hyphen, I decided to do the same for typeinfo.
I might change 'typeinfo to 'type or 'info only, but these words 
alone are too common, so, not enough accurate.
If someone has a better proposition for 'typeinfo, I am ready to 
replace it.
Kaj
8-Aug-2011
[2870x2]
Callback is written like that in English (otherwise it would be a 
verb instead of a noun), but type info is written as two words
TYPED would also do
Gregg
8-Aug-2011
[2872]
TYPED sounds good, based on a glance at the docs.
Kaj
8-Aug-2011
[2873x2]
I can now draw a pixel on an SDL screen in a format of 32 bits per 
pixel
Humble beginnings, but I've had a series of issues already
Gregg
8-Aug-2011
[2875]
Getting the basics working is sometimes the hardest part.
Dockimbel
9-Aug-2011
[2876x2]
I had TYPED in my short-list, so I guess it would be a better choice 
for a single word.
Now that variable arguments and RTTI are available, I have re-designed 
the basic screen printing functions. I have inserted a _ character 
in front of all PRIN-* functions, as they should not be used anymore 
in the general case (I might drop them completly later if they are 
not useful anymore). 


Before releasing it, I would like to get some feedback first. Now 
only the polymorphic PRINT and PRINT-WS (inserting spaces) functions 
should be needed. LF, CR, TAB, SPACE have been declared, so can be 
freely used in print blocks (or anywhere else). Variadic and typed 
functions have now a relaxed syntax, allowing to pass a single argument 
without enclosing [ ] brackets.

PRINT: print one or several arguments one after each other.

PRINT-WS: print one or several arguments, inserting a space character 
between each arguments.

Here how it looks now:

* printing without newline

    print "hello"
    print 123
    print ["hello" 123 tab "world"]

* printing with newline

    print ["hello" lf]
    print [123 lf]
    print ["hello" 123 tab "world" lf]

* printing with space inserted

    print-ws ["hello" 123 "world"]
    print-ws ["hello" 123 tab "world" lf]