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

World: r3wp

[All] except covered in other channels

btiffin
1-Apr-2009
[3442]
This is very cool news ... I'll crank up wine again on an a40.exe 
to see ... time to catch up with recent developments again.
BrianH
1-Apr-2009
[3443x2]
I think upgrade works with the Linux version now, and there are Linux 
builds on the releases page.
Even cooler news from the upcoming LOAD:
>> load ["print 'hello" "print 'there"]
== [[print 'hello] [print 'there]]
Works with files and urls too - Carl's idea :)
Steeve
1-Apr-2009
[3445]
uh ?
btiffin
1-Apr-2009
[3446x2]
I've been trying upgrade ... just did a minute ago ... it stashed 
an r3-a40.exe  so I wouldn't have bothered to look ... but am now 
as you made me all keen and curious.   And yes, the releases page 
has updates I didn't notice.
Thanks Brian
BrianH
1-Apr-2009
[3448x3]
LOAD of a block will treat the block as a collection of things to 
load, so it will load all of them The code is this:
    map x source [apply :load [:x header next all unbound]]
Yeah, the upgrade returns anLinux binary with a Windows name :)
an -> a
Steeve
1-Apr-2009
[3451x2]
ahah i was about to said it was a shortcot for
map str ["print 'here" "print 'here"][load str]
to slow
BrianH
1-Apr-2009
[3453x2]
Yup, except with APPLY so the refinements can be propagated.
MAP and APPLY are native in R3, as fast as FOREACH and function calls, 
respectively.
Steeve
1-Apr-2009
[3455]
map is currently underated, it's a really cool function
BrianH
1-Apr-2009
[3456x3]
Even as mezzanines they would be useful, so MAP and APPLY are part 
of R2-Forward as well.
I use them in R2 every day :)
Well, APPLY more often than MAP, but still.
Gabriele
1-Apr-2009
[3459x2]
I still don't see the performance hit of a lexical scanner that defaulted 
to 

make foreign!"" - One word, backtracking. It needs MAGIC to do what 
you want. MAGIC is expensive.
Furthermore, I don't believe that this would attract even one more 
user to REBOL.
BrianH
1-Apr-2009
[3461]
Well put :)
Steeve
1-Apr-2009
[3462x2]
To be honest, i can see his point.

If instead of failing on the first error encountered, we could have 
a load-foreign which accept a user call back function, each time 
an error occurs.

Then, we could do some  handy conversions meanwhile the loading process.
Don't say it would be a useless thing guys.
it's easy to simulate with transcode and parse but we need speed 
here
BrianH
1-Apr-2009
[3464]
Failure is your friend. If it doesn't fail on errors, you can't trust 
the output and yo have to do the error checking in your code.
Steeve
1-Apr-2009
[3465]
i'm not talking about the standard behavior of LOAD here
BrianH
1-Apr-2009
[3466]
But he was.
Chris
1-Apr-2009
[3467]
I'd say there is a case for adapting Rebol's vocabulary, eg:


 measure! - proposed a long time ago - 2cm 3.4cl 5o (degrees) 1em 
 - found elsewhere, eg CSS

 date! - recognize some common alternate constructs - 12-Mar-2009T04:00
	money! - the suggested: $1,000.00


I'd love to see Rebol mature along these lines.  The literal types 
are the essense of Rebol's being, they make for expressive problem 
solving and efficient data exchange with some resemblence to terms 
we would use on paper - all with 'load as its core arbiter.  It'd 
be great to be able to extract meaning from any stream of data, and 
I think if any language can, it's Rebol - however, it just seems 
beyond the scope of 'load which has this specifically and valuably 
defined purpose.  Whereas 'parse can be used to describe anything! 
- even if you load junk!, you're still going to need 'parse to make 
sense of it...
Gabriele
2-Apr-2009
[3468x2]
callback on error
 - how is that different from using PARSE and LOAD/NEXT ??
Chris: that is a whole different issue. , in numbers does not work 
because REBOL allows 1000.00 and 1000,00 to be the same thing, though 
with some euristics we might be able to make that work. euristics 
are bad for a language's lexicon though. instead, like to date! does 
(wrt load) I'd rather have to decimal! (etc.) to be smarter.
Steeve
2-Apr-2009
[3470x3]
Has someone done some test with a JIT library ?
For example to be used with a little VM to replace rebcode ?
As I see the problem, it would be:

1/ create a compile function in Rebol using parse to translate a 
dialect into some bytecodes.
2/ call an external (dll or so) tiny virtual machine.

3/ The VM uses a JIT libray (ie. AsmJIT) to convert the bytecodes 
into ASM instructions.
4/ the VM execute the code
could be faster than rebcode (especially the loops)
[unknown: 5]
2-Apr-2009
[3473]
Well if your going to go that route why not just use REBOL to create 
a MACRO language that outputs assembly code?  That would be rather 
easy to implement.
Steeve
2-Apr-2009
[3474x2]
want to be done in real-time, with a jit library. Not with intermediate 
files and slow compile time
need to inject code
[unknown: 5]
2-Apr-2009
[3476]
SLOW compile time?  Assemblers are using macro's already and compiling 
extremely fast.
Steeve
2-Apr-2009
[3477]
but how do you inject code in your running application without a 
good framework to do that.
You can't just throw a bynary stream in the heaven
[unknown: 5]
2-Apr-2009
[3478x3]
I wasn't objecting to your comment about injection.
I'm not agreeing with it either.
But if that is what you desire go for it.
Steeve
2-Apr-2009
[3481x2]
give me a dll wich accept a binary stream and run it as a function 
and i'm ok to generate assembler with rebol
*which
[unknown: 5]
2-Apr-2009
[3483]
Go for it Steeve.
BrianH
2-Apr-2009
[3484]
Gabriele: "callback on error" - how is that different from using 
PARSE and LOAD/NEXT ??

It's *much* slower (according to Carl). That is why he decided to 
handle this with TRANSCODE/error (which returns the data so far, 
an error object, and the next position), rather than TRANSCODE/else 
on-error (which would have called the provided on-error function 
when there was a parse error).
btiffin
3-Apr-2009
[3485]
Gabriele; Ahh ... lights are coming on.  MAGIC lights.   ;)  Ok, 
I can see how the success backtracking could lead to more grief than 
I originally imagined.


So now I'll shutup on this ... until we see what comes of user types 
(if we get 'em) mixed with transcode/error.  Could be cool.
BrianH
3-Apr-2009
[3486]
Don't worry, I'll be sure to play with TRANSCODE/error until I can 
make it do magic tricks - it's already helped in LOAD :)
btiffin
3-Apr-2009
[3487]
Go Hawley Go!
Maxim
3-Apr-2009
[3488]
an accessor like /load ?    ;-)
Oldes
3-Apr-2009
[3489x2]
Steeve.. how can I help you? :)
It would be fine to have AsmJIT integrated in REBOL as it could be 
used to speed up blitting as well.
Pekr
3-Apr-2009
[3491]
What about JIT method for AGG I posted earlier?