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

World: r3wp

[Core] Discuss core issues

Dockimbel
27-May-2009
[13872]
REBOL/Core 2.7.6.4.2 on 32-bit Ubuntu 7.10
>> i
== 1705
Henrik
27-May-2009
[13873]
REBOL/Core 2.7.5.2.4 on MacOSX Leopard:
>> i
== 1334
Dockimbel
27-May-2009
[13874]
So WindowsXP is more recursion-friendly than Leopard...finally a 
good argument to not switch to MacOSX! ;-)
Geomol
27-May-2009
[13875]
REBOL/Core 2.5.8.3.1
>> i
== 3150
REBOL/View 2.7.6.3.1
>> i
== 14265

Both on WinXP.
Maxim
27-May-2009
[13876x2]
1334 parameterless functions... that's not nearly enough for many 
algorythms!  :-(  this really has to be addressed in R3.
its strange that view on XP has TEN times the amount of lowest target.
Steeve
27-May-2009
[13878]
because of the compiler option /Strange in GCC i guess
Maxim
27-May-2009
[13879]
but why did that get set differently on winxp... maybe its something 
that carl never really officially set as part of the distribution 
specifics.
Oldes
27-May-2009
[13880]
Because Carl is not using GCC for Win builds?
Izkata
27-May-2009
[13881x2]
Here's something stranger
>> i: 0 a: func [z][i: i + 1 a 1] a 1                    == 1704
>> i: 0 a: func [z y][i: i + 1 a 1 2] a 1 2            == 1706
>> i: 0 a: func [z y x][i: i + 1 a 1 2 3] a 1 2 3    == 1705
Steeve
27-May-2009
[13883x2]
One stack for calls, one other for parameters perhaps
all is possible
Maxim
27-May-2009
[13885]
possibly the stack includes a single payload block for calls... this 
would make sense, in preventing stack depth variance.
Steeve
27-May-2009
[13886]
meaning parameters are not stored in the call stack :)
BrianH
27-May-2009
[13887x2]
Carl would not be using GCC for Win builds, because REBOL is older 
than the short time period that GCC has been good on Windows
It would also depend on platform-specific stack handling.
Maxim
27-May-2009
[13889x4]
possibly, yes, by indirection.  push stack [func args-block]

and args-block is a mem copy of the args block with local values
this is all speculation though... hehehe
what I am surprised overall is that rebol does not simply increase 
stack space.  isn't that possible in current OSes?
I mean, the interpreter, dynamically.
BrianH
27-May-2009
[13893]
Function argument stacks are handled in function-specific value frame 
stacks in R2. They are stored in stack frames in R3, which changed 
the stack allocation to be more task-safe and have faster function 
calls.
Steeve
27-May-2009
[13894]
Brian, i would be very suprised.

Rebol uses his own way to handle stacks, if not it would be unportable.
Maxim
27-May-2009
[13895]
I think that last post from brian wasn't speculation... I think he 
actualy knows, being in the R3 internal loop  ;-)
Steeve
27-May-2009
[13896]
i mean it's not platform specific.
BrianH
27-May-2009
[13897x2]
This is one aspect of the internals that I actually am aware of, 
since it affects contexts. It's true: REBOL implements its own stacks, 
and doesn't use the C stack to call REBOL functions, just natives.
The platform-specific aspect could be affected by page and/or pointer 
alignment.
Steeve
27-May-2009
[13899]
well, it an easy deduction, if not Rebol could not be portable
BrianH
27-May-2009
[13900]
REBOL is not fully portable. The platform-specific parts are wrapped 
in APIs internally.
Steeve
27-May-2009
[13901x2]
yes but the VM need to be fully portable
the core engine must be
BrianH
27-May-2009
[13903]
This is why the R3 host code is separate, and will be open-sourced. 
The host code is non-portable. The VM can call API functions provided 
by the host code. This would be necessary for a variety of reasons, 
not the least of which is that memory management, tasking, networking, 
any number of things are implemented by different platforms differently.
Henrik
29-May-2009
[13904]
http://www.openldap.org/lists/openldap-devel/200304/msg00123.html


Anyone made a REBOL version of this? It's a UTF-8 <-> ISO-8859-1 
converter in C.
Maxim
29-May-2009
[13905]
hasn't peterwood just uploaded a pretty nice string en/decoder on 
rebol.org?
Henrik
29-May-2009
[13906]
will check
Sunanda
30-May-2009
[13907]
Peter's code detects the encoding, and can do several comversion 
between encoding types:
http://www.rebol.org/view-script.r?script=str-enc-utils.r
Henrik
30-May-2009
[13908]
wow, very nice. thanks.
Maxim
30-May-2009
[13909x2]
used on rebol.org I suppose ?  :-)
peterwood can I make a wish?


I really need a function which can detect if a file is binary or 
text... do you think its possible to have such capabilities in your 
module?
Sunanda
30-May-2009
[13911]
I have a printable? function that checks if a string has only ASCII 
printable characters. Would that meed your need, Maxim?
Maxim
30-May-2009
[13912]
its already very usefull, its for detection of how to process files 
in distro-bot.  right now it just treats any non rebol script as 
a binary, but I'd like to add some processing to other text files.


maybe peter can extend the concept and figure out if there are only 
printable characters in other encodings  :-)
amacleod
6-Jun-2009
[13913]
just "discovered" 'alter' fuction...very handy
Sunanda
7-Jun-2009
[13914]
Sadly, 'alter has not made it into R3:
http://www.rebol.net/r3blogs/0124.html
Graham
7-Jun-2009
[13915x4]
Doesn't seem a very suitable name for what it does ...
How about 'swap instead ?
>> flags: []
== []
>> swap flags 'resize
== true
>> flags
== [resize]
>> swap flags 'maximize
== true
>> flags
== [resize maximize]
>> swap flags 'resize
== false
>> flags
== [maximize]
Does it read better than 'alter ?
Sunanda
7-Jun-2009
[13919]
'alter was always a poor choice of name -- short for 'alternate apparently, 
but too short to be obvious.
Anton has suggested 'toggle as a better name for it.
Graham
7-Jun-2009
[13920x2]
toggle implies something is always there ... but in a different state. 
 Swap is to imply that something goes in and out :)
Rotate is another possibility