AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 5907 |
r3wp | 58701 |
total: | 64608 |
results window for this page: [start: 14501 end: 14600]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
Volker: 23-Jun-2005 | i guess bind returns a new word here, but does not change the old? so it must be d: bind d 'no-a | |
Volker: 23-Jun-2005 | >> c: context[a: 123] >> a: 234 == 234 >> b: 'a == a >> get b == 234 >> bind b c == a >> get b == 234 >> b: bind b c == a >> get b == 123 | |
Volker: 23-Jun-2005 | thats to-word and 'bind. your problem was that bind does not change its argument, but returns a new different bound word. which may confuse because with a block, it changes that block. | |
BrianH: 23-Jun-2005 | Piotr, REBOL doesn't really have local contexts like a language with nested scopes does. REBOL fakes nested scopes with iterations of applied binding. The "local" context of a word is really just the context associated with that specific word object. The "global" context is nothing special in that respect, and "outer" contexts are just a side effect of the binding rather than a real physical structure like it is in Smalltalk. There is no lookup chain - it's just [word thing]->[context (keyed value collection) thing]->[value thing]. | |
BrianH: 23-Jun-2005 | Binding is just associating a [word thing] with a [context (keyed value collection) thing], and that just fails if there is no existing key in the context of the symbol associated with the word. The only context that actually expands to include new words is system/words, the closest thing REBOL has to a "global" context, more of a default really, but not quite. | |
Pekr: 25-Jun-2005 | >> a: [1 1 2 2 3 3] == [1 1 2 2 3 3] >> b: [x y] == [x y] >> foreach :b a [print x] 1 2 3 >> foreach :b a [print b/1] x x x >> foreach :b a [print get b/1] ** Script Error: x has no value ** Where: halt-view ** Near: print get b/1 | |
Pekr: 25-Jun-2005 | foreach :b a [print bind b 'x] ? | |
Pekr: 25-Jun-2005 | and for gurus - what happens here? :-) foreach :b a [print bind b first :b] 3 3 3 3 3 3 | |
Pekr: 25-Jun-2005 | I want to use 'X, without using 'x :-), but somehow foreach :b a [print get b/1]] does not return result I expected (1 2 3), it returns (3 3 3) | |
Pekr: 25-Jun-2005 | I know, I just somehow wished to abstractly use b/1, to get x in a | |
Volker: 25-Jun-2005 | (but the foreach may be a little bit faster) | |
PeterWood: 25-Jun-2005 | Perhaps to allow image manipulation, for example in a CGI script? | |
Graham: 5-Jul-2005 | Regarding the question on the mailing list on extracting a series of duplicates, I wonder why Rebol doesn't allow us to subtract one series from another. If we are allowed to append one series to another, why not allow us to subtract? But I guess the problem then is sameness. | |
Volker: 5-Jul-2005 | we have that with set-operations. only it does not keep duplicates (i prefer it this way). And the duplicate-thing can be solved in a little loop, as gabriele showed. | |
Sunanda: 5-Jul-2005 | As Volker says, exclude acts as a sort of subtract, but does not handle duplicates in the way the questioner needs. >> exclude [1 2 3 4 5] [ 3 5] == [1 2 4] | |
[unknown: 5]: 8-Jul-2005 | Is there anyway to get the ip address of the local computer? My problem is that I use a VPN for some functions and have other techs that do also and wanted to make a utility that could simply determine what subnet they are on. Problem is that I get the local ip of the lan and not the other interface ip's. Anyway to get those? | |
[unknown: 5]: 8-Jul-2005 | This is one of my more major problems with REBOL - it is an internet language as advertised so you assume tasks like this would be simple or for example enumerating connected or listening ports, retrieving a routing table etc. At least I can use call to get some other application to do it for me. | |
MikeJ: 8-Jul-2005 | When I did the above, I was using a dhcp supplied address. When I change to a static ip, I get the same result. | |
Guest: 8-Jul-2005 | Paul - non ability to open port on specific device or stuff you mentioned should be submitted to RAMBO as a wish, or as a bug, if Rebol claims to be networking internet language ;-) | |
[unknown: 5]: 8-Jul-2005 | They should add that and we should have a command like the one you gave as a mezz function | |
[unknown: 5]: 8-Jul-2005 | yeah I know I actually have to do that now with a call to netstat -aon | |
[unknown: 5]: 8-Jul-2005 | I'm working on a project now that I want to send out but don't want it to look so much like a batch file as much as having its own capabilities inherent. | |
JaimeVargas: 8-Jul-2005 | Lower level access in rebol is only possible either through CALL or via a SYSTEM CALLS using the DLL access. | |
JaimeVargas: 8-Jul-2005 | Why not just use SDK. Surely a BigCo can afford it. Besides I think is better to distribute such tool in an encaped form. | |
JaimeVargas: 8-Jul-2005 | You don't want someone changing the src code of a script that manipulates the registry of a host environment. Too much security risk, 80% of security problems oringinate inside the companies infrastructure. | |
[unknown: 5]: 8-Jul-2005 | Its strange but they wont purchase things that are not accepted by the application development teams to support other clients. The only way to really penetrate the big companies in this regard is to have one heck of a salesman that can talk about standards and support or bring it in free where there is no costs or penalties. | |
JaimeVargas: 8-Jul-2005 | Really strange... What about "A build it and they will come strategy"? | |
[unknown: 5]: 8-Jul-2005 | One time I created a nice program that would go out and check backups on the servers. Because it was an executable file they got rid of the system - even though it was better than anything else we had. | |
[unknown: 5]: 8-Jul-2005 | They need to be able to pick up a phone and get results. We deliver Service Level Agreements that costs a lot of money when they are not met. | |
[unknown: 5]: 8-Jul-2005 | You gotta remember when I say we have 40,000 desktops that isn't a typo. We have teams dedicated to certain tasks including an application development team | |
JaimeVargas: 8-Jul-2005 | Why REBOL? (Thats a loaded question). Part of the answer is because it makes your life easier. So freeing your cycles and potentially the cycles of others, making the company more efficient. | |
[unknown: 5]: 8-Jul-2005 | Therefore, I see no way to penetrate the REBOL product into the environment unless I make a killer app or unless we can do the better work with REBOL at the same costs or better. | |
JaimeVargas: 8-Jul-2005 | (Better lets create a new group) | |
[unknown: 5]: 8-Jul-2005 | Jaime - I noticed that the broadcast address that returns from that ipconfig function is not correct in cases where the netmask is different than 255.255.255.0. Maybe a bug in get-modes when used on the interfaces. | |
JaimeVargas: 9-Jul-2005 | Thanks Gabriel. Here is a shorter version, thanks to your hint. ipconfig: has [interfaces] [ foreach dev interfaces: get-modes udp:// 'interfaces [ print reform compose [ join dev/name ":" "flags" mold dev/flags newline "^-inet" dev/addr "mask" dev/netmask (either dev/broadcast [["broadcast" dev/broadcast]][""]) (either dev/dest-addr [["dest-addr" dev/dest-addr]][""]) ] ] interfaces ] | |
eFishAnt: 9-Jul-2005 | I know how to set the title of the window in REBOL/View, but how can I change the title of a REBOL core console? | |
Graham: 9-Jul-2005 | with a system call | |
Graham: 10-Jul-2005 | A lot of people will appreciate this Brett. I haven't looked at the code yet, but just read the docs. Do you want to add support for the "CAPA" command ? | |
Brett: 10-Jul-2005 | If I was to add CAPA support, I would not do anything special with it, I'd just send it and get the response expecting the user script to know what to do with CAPA. But, I don't know if that is enough flexibility to be useful to a user script. The other change that CAPA would bring is, that I should not issue a STAT automatically after authorisation. Might need to look at this more. Have you used it and what for? | |
Romano: 13-Jul-2005 | What do you think about this? >> 97.0 = #"a" == false >> #"a" = 97.0 == true Is it per design? Is it a good design? | |
PeterWood: 14-Jul-2005 | >>97.0 = to-decimal #"a" == true | |
PeterWood: 14-Jul-2005 | If a = b implies converting the second value to the same type as the first then it would appear to be an implementation bug. | |
PeterWood: 14-Jul-2005 | But this looks like a bug: >> #"a" == 97.0 == true | |
Rebolek: 15-Jul-2005 | I've got a question. I don't know how to describe it, so here is the code | |
Rebolek: 15-Jul-2005 | >> a: context [b: 1 c: does [b: b + 1]] >> f: func [fn][loop 100 [fn]] >> a/c == 2 >> f a/c == 3 >> f get in a 'c == 103 | |
Rebolek: 15-Jul-2005 | Why there's difference between f a/c and f get in a 'c | |
Allen: 15-Jul-2005 | > type? get in a 'c == function! | |
[unknown: 5]: 17-Jul-2005 | anyone know what the 'run function does? I always get a message that its not available in this version of rebol but I am using sdk so not sure why. | |
Sunanda: 17-Jul-2005 | In Command: >> help run USAGE: RUN file /as suffix DESCRIPTION: Runs the system application associated with a file. RUN is a native value. ARGUMENTS: file -- The file to open (file, URL) or command to run (string). (Type: file url string) REFINEMENTS: /as suffix -- (Type: string file) | |
Graham: 17-Jul-2005 | run will call a native application to open the file in question eg. acrobat reader for pdf files. It is only enabled on IOS .. I have asked RT why it can't be enabled for the sdk as well. | |
[unknown: 5]: 18-Jul-2005 | Yes Graham that is what it looks like to me as well - looks similiar to a winshellexecute function. Would be good for them to activate it as that would be a very good function to have. | |
Ladislav: 21-Jul-2005 | or a "dynamic" object like o: make object! [data: make object! [x: 1]] usage: >> o/data/x == 1 >> o/data: make o/data [y: 5] >> o/data/x == 1 >> o/data/y == 5 | |
Ingo: 25-Jul-2005 | Q1: I want to replace all 'none in a block with _different_ empty strings, what's the fastest way to do this? (replace/all BLOCK none "" replaces all 'none with the same empty string) | |
Ingo: 25-Jul-2005 | Q2 again: Sorry, my axplanaition was a little unclear: I have a row from a database, and store away one block, and display the other for the user. The user may, or may not, change the data. >> orig: ["Mr" "Petr" "Ustinov"] >> data: ["Sir" "Peter" "Ustinov"] >> magic-changed-func orig data == [1 2] | |
Anton: 26-Jul-2005 | Ingo, I have similar feelings too sometimes. I need a higher level function to do some things like that, but it's not there.... | |
Anton: 26-Jul-2005 | I often wanted reduce and compose to not make a copy for you, but work directly on the block. (Perhaps new functions "induce" and "impose" ?) | |
Anton: 26-Jul-2005 | blk: [a b c] format: [(1 + 2) (random 100) c] impose: func [blk format][repeat n length? format [if paren? format/:n [poke blk n do format/:n]]] impose blk format ;blk == [3 95 c] | |
Anton: 26-Jul-2005 | induce: func [blk format][change blk reduce format] ; (except, as a native!, without creating a temporary block) induce blk [1 + 2 random 100 'c] ; == [3 67 c] | |
Brett: 26-Jul-2005 | ; Q1 Or if you know you can reduce it you could do something obtuse like: block: ["a" none "b" none none] use [none][none: does [copy {}] bind block 'none] reduce block | |
Anton: 27-Jul-2005 | Brett, your obtuse way will only work if you are replacing 'none (as a word), but not none! values. | |
Anton: 27-Jul-2005 | eg. reduce your input block: block: reduce ["a" none "b" none none] | |
Brett: 27-Jul-2005 | Agreed Anton and perhaps that shows the obtuse method is not a great idea for this situation - though perhaps an interesting one ;-) | |
Henrik: 30-Jul-2005 | Are there any other instances where the a: copy [] vs. a: [] "problem" appears? I'm have a bug where two arrays: 1. an array with data that can be manipulated 2. a similar one containing default data, which is used whenever I want to reset the first one They apparently "stick" together with synchronized values. When I manipulate array 1, array 2 changes too. This would be the old COPY problem, but I use COPY everywhere, whenever I need to create array 2. However I do frequently PICK values from array 2 and POKE it in array 1 at the same location to reset a specific location to a default value. Would that create a similar problem? | |
Volker: 30-Jul-2005 | if the arrays have multiple dimensions, you need copy/deep. And if there are objects inside, those objects are not copied, then you need explicit work (copying all objects in a loop using 'make) | |
Henrik: 30-Jul-2005 | Volker, the arrays are indeed both 2 dimensional and contain objects. I'll try a different init method. | |
Henrik: 6-Aug-2005 | a one liner I didn't see on rebol.com: Sum of all numbers in a block!: do do replace/all mold [1 2 3 4 5] " " " + " | |
Sunanda: 7-Aug-2005 | Clever! But crucially dependent on the block being contained on one line: xx: { do do replace/all mold [1 2 3 4 5] " " " + " } do xx But then you did call it a one-liner :-) | |
Volker: 7-Aug-2005 | Is there a function which cuts the suffix, so i can go from %file.txt to %file.html ? I remember darkly there is one now. | |
Henrik: 7-Aug-2005 | I think there is one which splits a file up in an object with path, filename and extension. can't remember which though.... | |
Rebolek: 8-Aug-2005 | >> b: func [value][print ["value:" value]] >> a: func [value][probe value] >> append second :a compose [b (first :a)] == [probe value b value] >> a 1 1 ** Script Error: value word has no context ** Where: a ** Near: b value | |
Rebolek: 8-Aug-2005 | I've tried to bind it to 'a or 'value but without success. Can somebody help me? | |
Volker: 8-Aug-2005 | !>f1: func[a[integer!]][?? a] !>third :f1 == [a [integer!]] !>f2: func third :f1 append second :f1 [print ["=" a]] !>source f2 f2: func [a [integer!]][?? a print ["=" a]] !>f2 24 a: 24 = 24 | |
Volker: 8-Aug-2005 | yes, expand a copy of the body (thats second :over), then make a new func with the same argument list. and the old vars are now bound to new function. | |
Ladislav: 8-Aug-2005 | Bolek, your first example would have worked too, if you did: append second :a compose [b (second second :a)] | |
Rebolek: 8-Aug-2005 | Or, more generally: append second :a compose [b (first find second :a 'value)] | |
Chris: 9-Aug-2005 | ; Similar, but you can ensure the position of a word to bind to -- b: func [value][print ["value:" value]] a: func [value][[value] probe value] append second :a bind [b value] first first second :a | |
Chris: 9-Aug-2005 | That makes it difficult -- to bind one context to another, you need that word from the target context. And functions don't have a 'self value like objects. Nor are 'first and 'third values bound to the 'second. | |
Chris: 9-Aug-2005 | eg. I don't think it'd be possible to bind any block to -- a: func [x y][] | |
Benjamin: 15-Aug-2005 | how can i know how many data is beeing uploaded to a site when using write ftp://........we have the read-net or read-thru to know how many data is beeing downloaded but what about writing ??? | |
Geomol: 16-Aug-2005 | The UNIX cd command (a one-liner) in REBOL: | |
Geomol: 16-Aug-2005 | I put REBOL versions of many often used UNIX commands in a "unix.r" script, that I put in my rebol/view directory, so I can easily get to them, when I have to use the REBOL prompt. Just an idea for others. | |
Graham: 18-Aug-2005 | *nix-sh is a private group ... | |
Henrik: 21-Aug-2005 | Suggestion: ATTEMPT offers no possibility to provide a default value in case of failure. How about: attempt/failure [2 / 0] "Invalid!" == "Invalid!" attempt [2 / 0] == none default-values: [a b c] values: copy attempt/failure [read %values-file] default-values 2% more elegance? Or a debugging trap? | |
Henrik: 21-Aug-2005 | not as clear, but I resorted to this when wanting to read out 0 when a numeric computation that is always positive failed: first maximum-of reduce [0 attempt [2 / 0]] ; what's going on? .... oh :-) attempt/default [2 / 0] 0 ; seems more clear | |
Henrik: 21-Aug-2005 | google thinks rambo is a movie character. how quaint! | |
Volker: 21-Aug-2005 | But why would an actor call himself after a broker?! | |
Pekr: 21-Aug-2005 | When will open/seek be added? It was supposed to be there with new async core, we had async core for a while, but I do not remember anyone mentioning open/seek is there ... | |
Anton: 21-Aug-2005 | It was in the experimental releases, like View 1.2.57.3.1 Test with a line like: print copy/part read/skip %user.r 10 40 ; compare 10 with 0 | |
Anton: 21-Aug-2005 | Now, how to add a link without killing the Korean language UTF-8... | |
Ladislav: 21-Aug-2005 | Re DEFAULT. It looks, that a version with implicit variable may be more popular: default: func [ {Execute code. If error occurs, execute fault.} [throw] code [block!] {Code to execute} fault [block!] {Error handler} ] [ either error? set/any 'code try code [ fault: make function! [[throw] error [error!]] fault fault code ] [get/any 'code] ] | |
Ladislav: 21-Aug-2005 | note: although it looks safe, it may become a victim of the GC bug I described in RAMBO group recently. A slower but safer implementation is: default: func [ {Execute code. If error occurs, execute fault.} [throw] code [block!] {Code to execute} fault [block!] {Error handler} ] [ either error? set/any 'code try code [ do make function! [[throw] error [error!]] fault ] [get/any 'code] ] | |
Volker: 21-Aug-2005 | gc-bug: i prefer the function which overwrites itself cares about that, else a lot code will be bloated. caring means plug somewhere reachable from global context, like dont-gc-me: :me | |
Volker: 21-Aug-2005 | the only time i trap about that bug is when i do a script i did before, thus overwriting the loading function. | |
Volker: 21-Aug-2005 | if a safe version is no effort or even shorter, thats ok, will not stop that. | |
Ladislav: 21-Aug-2005 | did you notice why the former version above may become a victim of the GC bug while not looking like overwriting the reference? | |
Volker: 21-Aug-2005 | hmm, started re-reading just a moment before. thought maybe i miss something. | |
Ladislav: 21-Aug-2005 | actually DO names the function as its argument in a sense, that is why the original name isn't needed | |
Anton: 22-Aug-2005 | I believe, since you can expect the crash to be fixed some time in the future, that the solution is to provide both versions of the function, the fast, vulnerable version commented, and a note explaining when to switch from the slow, safe version to the fast, vulnerable version (preferably with test code to prove if your interpreter has the crash or not). | |
MikeL: 22-Aug-2005 | Topic - needs or includes.... I am just cleaning up some scripts and want to use the dynamic load capability that I thought was enabled by pre-requisite setting in the REBOL header. The only link I can find is to the Values.R in the library. Is there a standard approach to this? Now I am using Carl's %include.r from the script library but it does not check for prior loading. | |
Geomol: 23-Aug-2005 | I don't think, it's initially possible to check, if a certain script has been loaded or not. One approach, that is often seen in C includes, is to have a big 'if' in the script around all the code there, which checks on a define, and inside the 'if' define the thing being checked on. I'm searching for a good 'include' myself from time to time. One where it's possible to include something without full path. Maybe variables like system/options/path, system/options/home or system/options/boot should be used. |
14501 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 144 | 145 | [146] | 147 | 148 | ... | 643 | 644 | 645 | 646 | 647 |