World: r3wp
[Red] Red language group
older newer | first last |
Dockimbel 8-Aug-2011 [2862x3] | 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] | |
Kaj 9-Aug-2011 [2878x2] | Very nice. This takes Red/System a step beyond C |
The only thing I'm not wild about is the print-ws name. Do you think something like print-wide would be too long? | |
Dockimbel 9-Aug-2011 [2880x2] | Well I consider PRINT-WS already too long, but -WIDE is nicer, so it might be a good alternative. |
I use a lot of PRIN-* functions every day for debugging purpose, so this new, much more powerful PRINT alternative, will save me a few hundred keystrokes each day (just not having to type PRIN NEWLINE anymore makes me happy). :-) | |
Kaj 9-Aug-2011 [2882] | :-) It also reads a lot more elegant |
Dockimbel 9-Aug-2011 [2883] | Indeed. |
Endo 9-Aug-2011 [2884x2] | In PureBasic, there are Print and PrintN functions. PrintN adds new-line to the end. For Print-ws, what about Print-Form ? |
we can use PrintN for single argument: PrintN "Hello" --> Print ["Hello" lf] | |
Dockimbel 9-Aug-2011 [2886x2] | I considered PRINT-FORM but I've found it not meaningful enough. PRINT-WIDE is a better hint at what the function does. |
I will publish these changes tomorrow morning and will bump the version number, as they would break most of existing scripts. I will write a blog entry to describe the changes. | |
Kaj 9-Aug-2011 [2888] | Did you do any performance improvements? I just updated after a bit over a month and my SDL test, drawing a gradient, is a lot faster :-) |
Pekr 9-Aug-2011 [2889] | I wonder why we use lf, instead of a newline. Then we add a description to the doc, something like lf adds a newline :-) |
Kaj 9-Aug-2011 [2890] | LF is shorter, and newline was already defined |
Dockimbel 10-Aug-2011 [2891] | Did you do any performance improvements? I did a few small code optimizations, but they should not have noticeable effects. Maybe your code relies on a tight loop that benefited from them? |
Pekr 10-Aug-2011 [2892] | btw - what's the resolution re floating support in Red/System? Kaj is now trying to port SDL, so I wonder if for the gfx (which was not planned to be the RED's target),it will be the necessity,or not? |
Dockimbel 10-Aug-2011 [2893] | Floating point support will come to Red/System when the float! Red datatype will be implemented. |
Pekr 10-Aug-2011 [2894] | And float is planned, right? |
Dockimbel 10-Aug-2011 [2895x2] | Of course, there is just a lot of other feature that are much higher in priority. |
features | |
Kaj 10-Aug-2011 [2897x3] | Basic SDL does not require floats yet, so I have some room left to grow :-) |
What's becoming a problem first is the lack of 16 bits integers. They're in structs and arrays, so I have to do trickery now to access them | |
Maybe I imagined the speed improvement. My previous experiments were the night before, and I don't have those executables anymore | |
Pekr 10-Aug-2011 [2900] | Will Arduino support bring us an ARM support? Hmm, maybe not - it seems to be an Atmel, not ARM? |
Kaj 10-Aug-2011 [2901x2] | The small Arduinos are AVR, the bigger Netduinos are ARM |
The first embryonic support for both is already done, if I'm not mistaken | |
Dockimbel 10-Aug-2011 [2903x2] | Arduino boards use AVR 8-bit MCU (microcontroller), the Netduinos use a 32-bit MCU equivalent to an ARMv4 IIRC. The port for AVR 8-bit has started but it is still highly experimental. The ARM port started by Andreas targets ARMv5 architecture IIRC. |
16-bit integers: Red/System does not need them, but interfacing with external libraries might require it, especially for struct members. I wonder if adding support for a int16! pseudo-datatype, only limited to struct members would be hard to add...Will have a look at it, once all the current pending tasks will be done. | |
Pekr 10-Aug-2011 [2905] | as for "pending tasks" - is there any list,of what is being currently worked on, other than the website roadmap? |
Kaj 10-Aug-2011 [2906x2] | 16 bits arrays also need to be manipulated, with 16 bits access and pointer arithmetic |
Lots of external functions take 16 bits arguments. Are they 16 or 32 bits on the stack? | |
Dockimbel 10-Aug-2011 [2908x2] | For IA-32 CPU, it is always 32-bit on stack. |
List of tasks: yes, on my paper notebook. They usually cover 1 to 3 days of work and are updated frequently. | |
Pekr 10-Aug-2011 [2910x2] | so still mostly working on Red/System, to be powerfull enough to write RED in? |
I just wonder - if Carl would decide one day to "port" R3 to Red/System, would it mean, that the resulting executable would run at the target platforms supported by Red/System? | |
older newer | first last |