World: r3wp
[Core] Discuss core issues
older newer | first last |
Dockimbel 5-Jan-2010 [15347] | Cheyenne has such opened listen port detection capabilities (added recently), you can extract the code from the SVN repo (search for 'list-listen-ports function) : http://code.google.com/p/cheyenne-server/source/browse/trunk/Cheyenne/misc/win32.r Linux and OS X versions are also available in %misc/unix.r and %misc/macosx.r |
james_nak 5-Jan-2010 [15348] | Thanks Doc. |
Graham 5-Jan-2010 [15349x2] | what the code checks for is if anyone is listening at a certain port ...not whether the firewall is open or closed. |
If the firewall is off, but no one is listening ... then you'll get a closed port same as if the firewall is on, and someone is listening... | |
Claude 5-Jan-2010 [15351] | what about R3 status ? make uptodate R2 is very fine but i would prefer a R3 version with GUI and ODBC or MYSQL ..................; |
BrianH 5-Jan-2010 [15352x3] | The R3 GUI is still in development. The database model hasn't even been designed yet. You can make wrappers for ODBC and MySQL if you want to write the extensions - Robert has already started doing so for SQLite. Once device extensions are supported, we can start to get to work on the database model. |
R3 Status: The beta will come out without GUI, database or (unless there is some miracle) SSL. | |
some miracle in this case meaning a community member with the time volunteering to do the work. | |
Claude 5-Jan-2010 [15355] | do you have a plan for the beta realase ? one week, month, |
BrianH 5-Jan-2010 [15356] | It's a little flexible - outside circumstances have affected the timing already. |
Claude 5-Jan-2010 [15357x4] | thank you for your effort on |
thank you for your effort on R3 and R2 | |
i am just like an end user on R3. and for me i am not a guru like you and others !!!!! | |
i just want to see more info and screen on the new GUI of R3 (i am very curious :-) ) | |
BrianH 5-Jan-2010 [15361] | There will be no miracle that will bring the GUI or database to the first R3 release - they just aren't done yet, and can't be done with the level of community involvement that the alpha releases have engendered. Too many critical people are waiting for a beta or full release before they will even start to get involved. Fortunately we are on the rapid release model, so there is no such thing as a "final" or "full" feature set, just the feature set of a particular release. |
james_nak 5-Jan-2010 [15362] | Thanks Graham. |
BrianH 5-Jan-2010 [15363x2] | If you are interested in the GUI, get involved. We *really need* non-gurus - the GUI is designed for them. |
If non-gurus can't use the GUI, it's a design flaw that needs to be fixed. | |
Graham 5-Jan-2010 [15365x2] | we non gurus need to wait for the gui .. or is it out now?? |
and this is in the wrong group ... | |
BrianH 5-Jan-2010 [15367] | Reichart hasn't yet restored the right group. |
Graham 5-Jan-2010 [15368] | Ok, let's create a new r3 group ... |
BrianH 5-Jan-2010 [15369] | No, let's not. |
Graham 5-Jan-2010 [15370] | Can't wait forever ... |
BrianH 5-Jan-2010 [15371] | I'm not waiting. |
Graham 5-Jan-2010 [15372x2] | anyone got a code color rinser for R source? |
http://www.rebol.org/view-script.r?script=color-code.r | |
Rebolek 6-Jan-2010 [15374x3] | >> a: [1 2] == [1 2] >> reduce [a swap a next a] == [[2 1] [2 1]] Why it doesn't return [[1 2] [2 1]] ? |
This works as I expected: >> a: [1 2] == [1 2] >> compose/deep [[(a)] [(swap a next a)]] == [[1 2] [2 1]] | |
Hm, I understand that now: >> a: [1] == [1] >> reduce [a append a [1]] == [[1 1] [1 1]] Interesting. I never knew that. | |
Janko 8-Jan-2010 [15377] | it would be very helpfull if rebol could let you define functs that would warn you if you used or defined any global words .. I suppose my programs are 100% more uncertain because I forget to include some of the words I defined in words as local. If some 'funcstrict' for example would warn me of any such mistake I would sleep much better. Other but worse option is that there would be some lint like tool that would look at code and warn you of these |
Dockimbel 8-Jan-2010 [15378x3] | AFAIK, static code analysis cannot be used on REBOL source code to infer the runtime behaviour accurately , word! values can be constructed and dynamically bound at runtime. Same reason why REBOL is not compilable. |
Regarding capturing of globally defined words in a local context, as Gabriele likes to say : "for every code you would write that would work for you, I can write an example code that will break it" ;-) | |
Btw, R3 modules would minimize this issue to the local module only. | |
Janko 8-Jan-2010 [15381] | yes analysis could be hard or impossible if you look at more unusual things you can do.. but at least so that all. about second, maybe you mean the same.. but I just want that my certain functions set no global words, at least not directly with word: ~expr~ or set 'asd set [ asd asd ] .. |
Henrik 8-Jan-2010 [15382] | setting no global words: use a context |
Janko 8-Jan-2010 [15383x3] | I imagine when you now set some word in some function it looks at /local words and it it's there it creates a local word, if not it just sets a word (globaly).. let's say that there is funcstrinct that in second case just throws an error (probably something like that could be made in rebol itself) |
Henrik: but I don't want to make each function a context (probably:) ) .. I have to admit I don't know much about contexts .. only that it's like object | |
I am changing to using a context now for all words that are defined outside functions on rps pages to make them local to that pageload | |
Dockimbel 8-Jan-2010 [15386x2] | Just remembered about querying system/words, that would give you a mean to detect new global words. |
>> query/clear system/words == [end! unset! error! datatype! context! native! action! routine! op! function! object! struct ! library! port! any-type! any-word!... >> context [set 'a 5] >> query system/words == [a] | |
Janko 8-Jan-2010 [15388] | cool! I was looking at system/words but had no idea how to see my words in there ! didn't even know for query word so far .. cool |
Dockimbel 8-Jan-2010 [15389] | Detecting at runtime is the only way. So, you could write your funcstrict function using this 'query trick, but that would cost you 2 'query calls each time the function is called... |
Henrik 8-Jan-2010 [15390] | janjo, you'll find that using contexts will help you solve these problems. it's the next best thing to modules. |
Janko 8-Jan-2010 [15391] | Doc .. thanks a lot for that query word ... it' awesome to see on a page what all got set in the process.. this will help me the to make code more strong A LOT! Doc.. how does the runtime binding to function local words work? func is probably not a mezzaine or something where we could peek into what it does with /local words ? Henrik: I need to learn more about them and how to use them .. are there any good docs to read about what contexts are used for maybe? |
Henrik 8-Jan-2010 [15392] | Janko, try: http://blog.revolucent.net/2009/07/deep-rebol-bindology.html |
Dockimbel 8-Jan-2010 [15393] | Janko, a function is a context! value like objects. You can use the following mental analogy to see how it is related : foo: func ["for demo" a [integer!] /local b][...] would be *roughly* equivalent to constructing an object like that : foo-def: make object! [ hidden-ctx: make object! [a: none local: none b: none] body: [...] spec: ["for demo" a [integer!] /local b] ] The body is bound to the 'hidden-ctx context at function creation. When calling 'foo, the interpreter will set the 'hidden-ctx object words values according to passed arguments and refinements and then DO 'body. There's no differences on how REBOL treats "arguments" and "local words", it's part of the illusion. The /local refinement is used by *convention* only, to set "local words", you could just decide to use any other refinement for the same job. Here's an example : >> a: func [/local b][print b] >> a/local 5 5 Additionnaly, when you apply the ordinal natives on a function! value, you get : >> first :foo == [a /local b] ;=> the hidden context words >> second :foo == [...] ;=> the function body block >> third :foo == ["for demo" a [integer!] /local b] ;=> the original spec block |
Henrik 8-Jan-2010 [15394] | trying: source context might be a revelation too. |
Janko 8-Jan-2010 [15395x2] | huh.. plenty of info, might need some time to process this to get all that you two meant . but I did already know first :foo second: foo stuff (I was playing with rebol to js compiler) and I did know that context is object |
hm.. if rebol binds hidden ctx to function body then it really can't do anything to trigger warning on global words. (if I understand things aroung bind correctly) | |
older newer | first last |