World: r3wp
[World] For discussion of World language
older newer | first last |
Geomol 13-Dec-2011 [687] | Did you get cortex.w too? |
sqlab 13-Dec-2011 [688] | seems to be my fault.( |
btiffin 13-Dec-2011 [689x3] | Geomol; by text! I was referring to the old junk! argument. It's not really junk!, it's human text, encoded as humans see fit, gibberish or deep meaning symbolic. Naming things is hard. ;) KWATZ! is ok...but I don't get the 'ahhh, that's optimal in meaning and depth' from it - and I lean Buddhist and did see the Zen references. But kwatz is still sinking in, if it's going to (and perhaps that is the best kind of deep meaning). |
And if you don't mind, I may start poking around in your wiki as btiffin on GitHub. Feel free to tear any writings apart. I'll admit to having some deeply ingrained misunderstandings about REBOL, so those will likely slip right on over to World. (I've got notes from Ladislav, Gabriele and a few others that pointed out these misunderstandings (and when documenting, misunderstandings are simply untruths and need to be treated that way)). In particular, I still don't see clearly the 'value - premake - type - make (and) word' semantics of REBOL (at least in terms of trying to explain it) I'm hoping your World engine code is let out so I get a chance to view my problem from a different angle and hopefully 'see the light'. I'll add that if you want to send any snippets for markup in LaTeX, I'll sign up for grunt work too. | |
Ok, dug in a little. But still reading back matter... Regarding cortex.w - is that in the far-plan? Mezzanines ship with the binary instead of in? Should it be documented that way? | |
Geomol 14-Dec-2011 [692x3] | It's not really junk!, it's human text, encoded as humans see fit, gibberish or deep meaning symbolic. Funny, when I first implemented KWATZ!, I called it gibberish!, but I found KWATZ! better suited and more interesting. And it kinda give you the same feeling, as when you see a computer go down with a "Guru Meditation". :) And if you don't mind, I may start poking around in your wiki as btiffin on GitHub. Feel free to tear any writings apart. The idea with the wiki is, that it's for everybody to edit, so it's not really "mine". And as I have very little time for documentation right now, I will only contribute a little. It may be needed to step in at some point and clear things up, make different pages consistent with each other etc., and that may be me, who does that, but it could be somebody else too. For the dictionary, it may be an idea to write a script, which does most of the documentation (I think, there's an old REBOL script for that lying around somewhere, which may be suited with some modification). system/words may be needed to do that properly, and that's not in World yet. I produce LaTeX output with my NicomDoc format, so I'm covered there with the documentation, I'll do (a proper manual). Regarding cortex.w - is that in the far-plan? Yes, the binary will be as basic as possible. I even consider removing definitions of natives from the binary, as it's possible to define them in cortex.w. Same could be done with datatypes with a little change to World. Then the binary could only define MAKE and DATATYPE! (and probably also SYSTEM), and the rest could be build from that. It's a good idea to split the doc up in a native section and a mezzanine section. And then there's rebol.w, which will make it possible to run even more REBOL scripts. There could be a dictionary for that too. |
Btw. in World, natives are being called functions too (it's easier for the user to understand, I think). You can distinguish them with PICK, as the second item is an integer. Examples: w> type? pick :add 2 == integer! ; so ADD is a native function w> type? pick :loop 2 == block! ; so LOOP is a mezzanine function | |
If LOOP becomes a native, we can just move it in the dictionary. I try to create as few natives as possible to keep World simple, but my need for good performance too might lead to a few mezzanines becoming natives. | |
btiffin 14-Dec-2011 [695] | World is awesome John, I'm in. |
Richard 14-Dec-2011 [696] | + |
BrianH 14-Dec-2011 [697] | Don't use the old R2-style reflectors, like that pick 2 in your example above. Any support at all for that kind of reflection makes it harder to secure code. Use the R3-style reflectors. |
Gregg 14-Dec-2011 [698] | +1 Brian, though we can write mezz wrappers using the PICK interface. Is there a reason they need to be native? |
BrianH 14-Dec-2011 [699] | The important thing is to *not* use PICK for this, to use a different function instead. If you use PICK, it will make it more difficult for PICK to be useful in secure code that should have limited or no access to the reflectors. It slows down PICK too. That is why R3 uses REFLECT instead. |
Geomol 14-Dec-2011 [700] | I'm pretty sure, it doesn't slow down PICK, but I need to make test to be absolutely sure. |
BrianH 14-Dec-2011 [701x2] | R3 uses mezz wrappers around REFLECT, so mezz wrappers aren't the problem. The problem is having it be possible to use PICK for reflection. Consider what would be invloved in turning off reflection but keeping PICK working for non-reflection uses. |
Or we could consider a more practical situation directly related to World: If you can compile blocks, it would make sense to use the reflection facilities to get access to metadata about the compiled blocks (especially since that would be something that you might want to secure, or since functions would need similar reflectors), but PICK already has a defined meaning for blocks. | |
Geomol 15-Dec-2011 [703x8] | New release at https://github.com/Geomol/World |
- Added datatype, struct! - Ctrl-A at the prompt toggle auto-brackets - Ctrl-D at the prompt quits World - Fixed networking like: open tcp://8080 | |
This is first release with struct!, so not all features are there, and it needs further testing. | |
Struct can be made in different ways: make struct! [[float f] none] make struct! [[f float] [1.0]] ; var name before type And there is a STRUCT helper func: struct [float f] none | |
I'll write something about it in cortex_alpha.pdf | |
Example of using struct! in routine definition: my-routine: make routine! [ library "routine" [ [struct!] pointer ] ] | |
A real example under OS X: timeval: make struct! [[ slong sec sint32 usec ] none] timezone: make struct! [[ sint minuteswest sint dsttime ] none] gettimeofday: make routine! [ [typecheck] libc "gettimeofday" [ tp [struct!] pointer tzp [struct!] pointer ] sint ] w> gettimeofday timeval timezone == 0 w> timeval/sec == 1323951188 w> timeval/usec == 314011 w> timezone/minuteswest == -60 w> timezone/dsttime == 0 | |
In the above example, libc is defined as: libc: load/library %/usr/lib/libc.dylib | |
GiuseppeC 15-Dec-2011 [711] | Hi, I am interested into building an maintaining documentation for those programming languages based on REBOL. It would be nice to have a DOCBASE for them. What I search is: - Someone ABLE to SETUP the Linux and the Wiki Software - Someone which would share with me the cost of hosting. Do you like the idea ? Write me at [giuseppe-:-chillemi-:-eu] |
Geomol 15-Dec-2011 [712x2] | There seem to be a problem with routines returning a handle. A library like MagickWand (part of ImageMagick) works this way. I'm not able to test it with MagickWand, as I'm not able to load that library for different reasons, and I don't wanna use too much time on it. So I'm after another library, that has a routine, which returns a handle, so I can test. A library easily to get for OS X, Linux and Windows would be nice. Any suggestions? |
I was able to load MagickWand under Linux, and it seems to work with uint32 datatypes to hold the handle (a C pointer). But it doens't work so well when using the handle! datatype for that. It would be nice, if it worked, I guess. It's probably some type casting problem. | |
Maxim 15-Dec-2011 [714] | actually, any library which returns a string could use a handle! as a return value instead. the handle could be used to store the reference to the string as-is and give it to another routine which requires a string on input. |
Geomol 16-Dec-2011 [715] | Yes, I'll check that out. |
Geomol 18-Dec-2011 [716x2] | New release at https://github.com/Geomol/World |
- Added native function: TRY - Added set-path! notation to set values in structs (POKE) - Added support for: to string! handle - Added context: system/words - Added helper function: ROUTINE - Added mold support for routines (SOURCE) - Added debugging function: ?? - Bugfixes | |
PeterWood 18-Dec-2011 [718] | Fast work John! |
Geomol 18-Dec-2011 [719] | Yeah, I'm in a productive period. |
BrianH 18-Dec-2011 [720] | Does TRY have an /except option? |
Ladislav 18-Dec-2011 [721] | Geomol, what would happen if you evaluate something like try [return 1] |
Geomol 18-Dec-2011 [722x4] | World is free to use and can be found at https://github.com/Geomol/World Why don't you try those things out yourselves? I would like to comment, but I feel, you get most from it by trying it. |
For minimum install, just pick one of the world_* files and cortex.w | |
To get a binary, click it, then click raw. | |
Ladislav, if you did try and mean having that code inside a function, then there was a bug, which will be fixed in next release. | |
Oldes 19-Dec-2011 [726] | w> c: context [a: 1 print a print (a)] 1 ** Script error: a has no value ** Near: print (a) |
Geomol 19-Dec-2011 [727x2] | Good one, thanks! |
About bit operations, I looked at SHIFT. R2 got it at some point, but there is no ROTATE. Wouldn't that be useful too? I think about graphics operations and maybe other areas. | |
Maxim 19-Dec-2011 [729] | yes ROTATE is handy to have native when you need it. its the kind of function which will be much slower to build manually than having it native (or hand optimised by the language author ;-) |
sqlab 19-Dec-2011 [730] | copying from an opened, but not connected tcp port crashes world-lang, |
Geomol 19-Dec-2011 [731x2] | Don't do that! ;) |
I need to find a balance with World for how much should be tested for. I'm after good performance. | |
sqlab 19-Dec-2011 [733] | if you open and connect and the peer closes, this happens too |
Geomol 19-Dec-2011 [734] | ok, that's a good argument to do something about it. Thanks! |
Geomol 20-Dec-2011 [735x2] | New release at https://github.com/Geomol/World |
- Reimplemented bitset! as binary - Added native function: COMPLEMENT - Added native function: ROTATE - Added native function: SHIFT - Added << and >> operators to cortex.w - Added hex form for characters, ^(00) - ^(FF) - Added REFORM to rebol.w - Added DETAB to rebol.w - Added ENTAB to rebol.w - New test - Bugfixes | |
older newer | first last |