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

World: r4wp

[#Red] Red language group

AdrianS
3-Dec-2012
[4549]
sorry, Doc - we shouldn't be polluting this group
DocKimbel
4-Dec-2012
[4550x3]
EXIT and RETURN support have been added. Function! support is now 
complete. I plan to add closure! support too (and maybe R2-like functions 
also), but having object! seems like higher priority for now, as 
I want to implement port! datatype asap.
A mention about THROW function attribute: I will add support for 
it, but it won't be usable until we get  dynamic function creation 
support.
I need to process some pending tickets from the bugtracker, so I 
will probably start working on object! support tomorrow.
Pekr
4-Dec-2012
[4553]
btw - will you allow append to objects, like R3 does? (at least I 
think it does :-)
DocKimbel
4-Dec-2012
[4554x2]
I always had mixed feelings about it, on one side it allows to extend 
objects in-place, which is very useful when they are referenced (in 
a tree structure for example), but it also encourages a, IMHO bad 
coding pattern, which is using objects to store data when you should 
use (the much cheaper) blocks instead.
So far, I think that the pros are more important than the cons, so 
Red will probably support it too.
Pekr
4-Dec-2012
[4556]
Well, it would be strange from you to try to push us to recreate 
an object just to expand it, whereas in REBOL3 group you are wondering, 
why function bodies are not hot-patchable anymore, no? :-)
DocKimbel
4-Dec-2012
[4557x3]
Well, it is not the same thing. APPEND on object is blurring the 
semantic lines between an object and a block, that is not a good 
thing IMHO. It makes the choice more confusing between them for newbies 
(or maybe even some more experienced REBOL coders) while the distinction 
should be clear.
it would be strange from you to try to push us to recreate an object 
just to expand it


That is part of the basic semantics of the R2 object! datatype, it 
follows the prototype-based model. You construct new objects by copying 
existing ones, it can be just a copy (cloning the source object), 
or derivation (extending the source object with new words). Changing 
object context (adding/removing words) without creating a new one 
is not consistent anymore, so it can look like a big hack.
Correcting myself: "derivation" might not be the best word in such 
context, "extension" would be more neutral.
Gregg
4-Dec-2012
[4560]
On the subject of hot-patching, I've thought for a long time that 
the ability to instrument apps--like DTrace--would be very helpful. 
I know DTrace is deep kernel voodoo, and not available on all OSs. 
If Red supported probe points for DTrace, that would be great for 
those who use it. My question is whether it would be better to use 
a DTrace model, where the analysis happens from outside the app, 
or if having an instrumentation/tracing/logging model internally 
is better. Or can you support both with the same set of probe points 
in an app?
DocKimbel
4-Dec-2012
[4561x2]
It is in my plans since the beginning to support internal profiling 
feature for Red, though I was thinking about processing them in the 
IDE mainly. In the Red/System v2 specs, I have already made some 
provision for low-level profiling of native functions.


I know about DTrace but never used it. I would need to study how 
it implements probe points to see if same technic could be used internally.


Currently, it would be quite easy to add a profiler to Red layer, 
it would just need to extend the stack/mark*, stack/unwind* and stack/unroll 
function to collect the data. But as we have other high-priority 
features to implement first, it will probably wait a few months (unless 
someone wants to implements it, I would be glad to give the basic 
hints on how to achieve it easily).
I might make a 0.3.1 release tomorrow to set a milestone for functions 
support. If you have Red scripts, it's time to test them with latest 
commit.
Gregg
4-Dec-2012
[4563]
Thanks Doc. Excellent info.
Kaj
4-Dec-2012
[4564x3]
I agree that objects should be used sparingly, but not being able 
to expand them makes it expensive to implement VMs for substantial 
dialects. I did that and started out with blocks only, but over time 
I had to decide to use objects in places crucial to the user dialect
My conclusion was that, being fundamental to the language abilities 
of REBOL, contexts should be more flexible
I did a build run of the examples. It looks OK, but the many casting 
warnings on the GTK bindings are still there. I think that should 
be fixed
Jerry
4-Dec-2012
[4567]
Doc, Is is possible to support something like VFS in SQLite (http://www.sqlite.org/c3ref/io_methods.html), 
So we (OK, me) can develop a simple RDBMS on Red, instead of doing 
it using Red/System
DocKimbel
5-Dec-2012
[4568]
I'm not sure what you mean exactly by "support". I haven't implemented 
yet the interface for cross-access between Red and Red/System. A 
minimal interface will probably appear in the next weeks.
Kaj
5-Dec-2012
[4569x2]
That VFS is about the file system interface. Do you want to write 
your own RDBMS on top of it, or do you want to use SQLite?
Part of that VFS is covered by the REBOL file access methods, but 
not the advanced functions
DocKimbel
6-Dec-2012
[4571]
I am a bit short on time for testing on all platforms, did anyone 
find any regression in Red before I release v0.3.1?
Arnold
6-Dec-2012
[4572]
Hi I had a look at the last changes yesterday . For what it's worth, 
code was cleaner/prettier. That's a good sign in general :)
DocKimbel
6-Dec-2012
[4573x2]
It would be really nice to have automatic builds+tests running on 
all major supported platforms for each new commit on main branch, 
and an automatic report generated online. That would really saves 
us time and avoid missing some obvious regressions.


I know that Andreas started working on that. Andreas, do you already 
have a good plan to achieve it?  Do you need help/resources?


I can provide a Linux server for Linux/x86 targets. Having a Windows 
machine online + MacOS X would be great. Also a Linux/ARM (RPi for 
example) that is always up and reachable from the net could nicely 
complete the list.
Arnold: thanks! :-)
Arnold
6-Dec-2012
[4575]
youre welcome my friend ;) Did you find time to read my latest reply 
on the mailing list?
DocKimbel
6-Dec-2012
[4576]
Yes, I have even replied to it. ;-)
Arnold
6-Dec-2012
[4577x2]
I freed up some space on my mac I'll download latest version from 
github and have a little go. Anything specific to look for/try? Imho 
you are allowed to patch as much as you want, release or not. We 
will follow anyhow.
Great reply! Thanks.
Too bad they got old monitors at work without hdmi support or I could 
test my new Raspberri Pi there too :D
Kaj
6-Dec-2012
[4579x3]
Doc, I don't think you fixed the struct warnings on GTK yet?
Arnold, do the monitors have DVI?
Please test the example programs from the binary repository on Mac. 
I'm still looking for the correct library names of the dependencies
DocKimbel
6-Dec-2012
[4582]
Struct warnings: not yet, I will have a look at them before the release.
Kaj
6-Dec-2012
[4583]
Thanks
AdrianS
6-Dec-2012
[4584]
Doc, would this Linux server you could provide be able to run VMs 
with OS X and Windows in order to do multi-platform automated builds? 
I'm thinking we could set things up like Unity does (see the link 
below). JetBrains provides TeamCity (the continuous integration server) 
for free to OS projects with an active community.


http://blogs.unity3d.com/2011/10/21/build-engineering-and-infrastructure-how-unity-does-it/
Pekr
7-Dec-2012
[4585]
as for following wish - i: FFFFFFFFh ..... why i: #FFFFFFFF? The 
literal form with "h" - I almost missed the "h" at first sight ...
DocKimbel
7-Dec-2012
[4586]
Pekr: I guess the question is "why not i: #FFFFFFFF?"? Simply because 
# denotes an issue! value not an integer!. The hexadecimal format 
ending with an `h` character gets converted to an integer! value 
during the LOAD phase. If you have a better proposition for hexadecimal 
literal value, I would be glad to hear it.
Pekr
7-Dec-2012
[4587]
yes, FFFFFFFF# :-)
DocKimbel
7-Dec-2012
[4588x4]
From the Unity link: "Most of these are virtual machines running 
Windows, Mac OS X, and Linux." 


I though Apple was explicitly forbidding to install Mac OS X on anything 
other than Apple hardware? Do they sell special licenses for VM?
Ah, missed that part: "...using a combination of Apple and non-Apple 
hardware."
Kaj: I've fixed the extra struct warnings.
Pekr: your proposition is not as bad as it could be at first look. 
;-) 


REBOL allows to prefix binary values with a base integer, with base 
16 as default::

    #{F0}
    16#{F0}
    2#{1111111100000000}
    64#{8A==}


We could use a similar convention, but as a suffix, for specifying 
the base for an integer! value:

    123
     7B# 	(default base would be 16 too)
     7B#16
     01111011#2
     173#8


Such literal forms with base explicitly specified would be converted 
to integer! decimal form at LOADing stage. This is just me thinking 
loud, but how does that look like to you?
Henrik
7-Dec-2012
[4592]
If the REBOL format works, why is there a need to change it?
DocKimbel
7-Dec-2012
[4593x2]
Binary! <> integer!
It is not a change, it's an addition.
Henrik
7-Dec-2012
[4595]
ok, why is the new method useful?
DocKimbel
7-Dec-2012
[4596]
Specify literal integer values in base: 2, 8 or 16.
Henrik
7-Dec-2012
[4597]
Why can you not use the original datatype for this?
DocKimbel
7-Dec-2012
[4598]
So instead of the very costly:
    a: to-integer #{FFFF}
you could write it:
    a: FFFF#