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: 39701 end: 39800]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
Graham: 31-Mar-2009 | I was posting the data to a web server | |
Anton: 31-Mar-2009 | That was a memory leak, not really caused by the "local vars not unset on R2 function exit" behaviour. (But perhaps contributed, by misunderstanding, to the leak bug.) | |
BrianH: 31-Mar-2009 | Closures are different though - a whole new context is created with each call, words and values both. | |
BrianH: 31-Mar-2009 | Unlikely, since most tail recursion optimizations require an optimizer, or at least a compiler. Manual access to the stack is a security hole (unless the language is Cat). Accept that REBOL has real loops and that imperative programming is more efficient in an interpreted language :) | |
BrianH: 31-Mar-2009 | REBOL 1 had tail-recursion optimizarion. REBOL 2 got rid of it on purpose, and got 30 times faster as a result :) | |
[unknown: 5]: 31-Mar-2009 | But I walked a way a bit at times as the lack of development waned. | |
BrianH: 31-Mar-2009 | I miss those guys. The beta list for R2 started a month after I arrived. | |
[unknown: 5]: 31-Mar-2009 | Yeah I found out about REBOL through a listserv I was on at the time with a bunch of Cisco Engineers. | |
Anton: 1-Apr-2009 | 4) It's used to avoid a temporary variable. | |
Gabriele: 1-Apr-2009 | Geomol: I never said I do my-port: also... if you need to use a local word then you don't need also. I need also all the time. | |
Geomol: 1-Apr-2009 | Gabriele, I wasn't very clear with my port example. I didn't mean a local word. I'll use your TAKE example. Let's say, we have this code: take: func [block] [also last block remove back tail block] ... item: take my-block Have TAKE makes the code smaller, but is it more readable? You have to know exactly, what take does, but you have to with many words. And is it worth the overhead? Let's compare it to this code, that does the same: item: last my-block remove back tail my-block The first version has the overhead of a function call and use of ALSO. The last version produce more code, if TAKE is used many times through the program. Let's look at a version of TAKE without use of ALSO: take: [block /local item] [item: last block remove back tail block item] This last version has a local word, item. To me, it seems like a tricky way to just save a local word. But maybe it's just me, that need to see this some more. | |
[unknown: 5]: 1-Apr-2009 | Just because Brian seems to be making a distinction. | |
Anton: 1-Apr-2009 | Geomol, "just save a local word" - this is very useful ! I think ALSO just might take a bit of getting used to. It's like many other Rebol functions that we are now familiar with and use without thinking of its internal variable use. Do you think LOOP and REPEAT should not exist because they can be implemented with WHILE and a temporary variable? I reckon they are so cool to have in the language, because they make the code cleaner. | |
BrianH: 1-Apr-2009 | No, R2 doesn't use registers. The context assigned to the function is reused, with the value block switched out on recursion. The original (non-recursive) value block is left alone when the function returns, and set to nones on function entry. This is where the memory leaks come from: unintentionally persistent references to local variables. R2 actually does have a stack (it's a block), but it is used differently. R3 just has a second context type that does stack-indirect word dereferencing. When the function starts a block of values is pushed on the task-local stack and the references to those values do an additional indirection to get the stack frame before getting the values - this is why function! word dereferencing is 28% slower than object! or closure! word dereferencing. R2 has two context types: object! and system/words (an expandable object!). R3 also has two context types: it doesn't have R2-style object! contexts - all are expandable like system/words - but it does add the stack-indirect type. | |
Geomol: 1-Apr-2009 | And a third context type is needed for microthreads? | |
BrianH: 1-Apr-2009 | Native code can call REBOL functions, but I don't know how it does so, just that it isn't a standard function call. | |
Oldes: 1-Apr-2009 | Sorry, but it's a known bug which is already fixed in R3: >> 1:00:-10 ** Syntax error: Invalid "time" -- "1:00:-10" ** Near: (line 1) 1:00:-10 ** Note: use WHY? for more about this error | |
Geomol: 2-Apr-2009 | And I'm concerned about complexity (like Carl blogged about lately). I don't want REBOL to go down the complex road. There are so many examples, where that will lead to. To me, one word less can be a good thing, but it depends, if it's really needed. | |
Geomol: 2-Apr-2009 | I'm a tool maker. I want my tools to be simple and functionel. | |
eFishAnt: 2-Apr-2009 | Note that the UNC with core works perfect. Better than Windoze console on a Windoze server! Kudo's to Carl for integrating repulsive technology with a beautiful console! Windows cmd does not let you cd to the UNC drive! | |
Izkata: 2-Apr-2009 | So, question. I know rebol has difference, intersect, and union - but is there a subtract for sets built in? | |
Izkata: 2-Apr-2009 | I know "difference a intersect a b" works, just wondering, though.. | |
Maxim: 2-Apr-2009 | >> help exclude USAGE: EXCLUDE set1 set2 /case /skip size DESCRIPTION: Return the first set less the second set. EXCLUDE is a native value. ARGUMENTS: set1 -- First data set (Type: series bitset) set2 -- Second data set (Type: series bitset) REFINEMENTS: /case -- Uses case-sensitive comparison. /skip -- Treat the series as records of fixed size size -- (Type: integer) | |
eFishAnt: 2-Apr-2009 | I wish I knew the best way to install a Core script as a "service" (service in the Windoze sense so it has a specific login rights, which map up to a UNC share rights) | |
Geomol: 4-Apr-2009 | I wrote: " --1:23 should be of type url!, shouldn't it?" Actually, it's not a valid url according to the definition: http://en.wikipedia.org/wiki/URI_scheme The scheme name consists of a letter followed by any combination of letters, digits, and the plus ( +"), period ("."), or hyphen ("-") characters; and is terminated by a colon (":")." So it should probably just be an invalid time. | |
Gregg: 4-Apr-2009 | Only if you add it as a field yourself. | |
Geomol: 4-Apr-2009 | An object can refer to itself with SELF, like: o: make object! [a: 1 b: self/a] (maybe not a very useful example.) | |
Janko: 4-Apr-2009 | Gregg.. aha, yes that was the option if there is no way.. Geomol .. thanks I wasn't avare of self.. but this probably doesn't enable me to see my name either because name of the object is name of the word is was asigned too .. so even if I do >> probe self << I dont have it ... looks like I really need to add it as a field | |
Anton: 4-Apr-2009 | a: b: c: make object! [val: 1] 3 words point to the same object. What should its name be? | |
Janko: 4-Apr-2009 | yes :) I thought of it too ... I will try to make something like a object factory function so I won't have to repeat myself ... to not do big-dog: make dog-agent [ name: "big-dog" .... ] I will see | |
Anton: 4-Apr-2009 | I believe that since the extra information can so easily get out of sync with reality, that it will just end up causing problems for you. Better to accept that there is no "reverse lookup" (not a quick one, anyway) of objects to words, and just adjust your debugging method somehow. | |
Graham: 10-Apr-2009 | Anyone got a script to encode html entities ?s | |
Ammon: 10-Apr-2009 | Yeah, you need to be escaping a lot more than just those characters to really do it right. I can't help you with building the table of escapes, but this version should be a lot faster if you're escaping large quantities of text... encode-html: func [ "Make HTML tags into HTML viewable escapes (for posting code)" text ][ parse/all text [ any [ h: #"&" (h: change/part h "&" 1) :h | h: #"<" (h: change/part h "<" 1) :h | h: #">" (h: change/part h ">" 1) :h | h: #""" (h: change/part h """ 1) :h | h: #"'" (h: change/part h "'" 1) :h | h: #"€" (h: change/part h "€" 1) :h | skip ] ] text ] | |
PeterWood: 10-Apr-2009 | Not yet. It is part of some encoding utilities that I am writing to help resolve the character encoding issues in REBOL.org. I have a number of other conversion functions to wrtie. I will then publish them on REBOL.org | |
Ammon: 10-Apr-2009 | Yes. I've tested it heavily. Well, not this particular implementation but one that's a lot similar. | |
Graham: 10-Apr-2009 | Especially since I using it in a rsp page ... | |
Oldes: 10-Apr-2009 | very long.. I think such a messages comes already very long time. | |
Graham: 10-Apr-2009 | In my defence, I was looking for encode-html which is a verb, whereas html-encode is not clearly such :) | |
Gabriele: 11-Apr-2009 | Peter: does not depend on me. The code is ready for release (actually, there is one thing i have to do first, but it should take a couple hours max), so it could happen "tomorrow" or in two months. | |
Henrik: 14-Apr-2009 | Is there documentation anywhere for using [catch] in a function header? It's a nice trick, but I can't figure out how it was deduced that this would work: f: func [[catch] var] [ if var = 'bad [throw make error! "Something bad happened."] ] I first saw Gabriele doing it a while ago. | |
eFishAnt: 16-Apr-2009 | Hmmn, I am running a script, but not as CGI, on a remote 'nix box. This script uses other scripts by 'do The main script runs, but at the first use of parse rules from a do script, it fails. Is there a magic setting of usage flags or file permissions to accomplish this? $rebol -s main.r runs main, but doesn't do the do %blah.r script from inside | |
eFishAnt: 16-Apr-2009 | It is weird, because from inside the REBOL console, a list-dir does not show the other scripts, like blah.r in the example above which main.r tries to do. | |
eFishAnt: 16-Apr-2009 | >list-dir ;after the file crashes...aha, I could see the files before doing the main.r. main.r main.r My scripts work fine on Windoze. I am now thinking from this...I do a change-directory to get the directory of where I am running and I write my data into the current directory. In Windoze, the change-directory seemed needed to pick up the directory I am in. I'll bet 'nix doesn't like that, and perhaps needs the full pathnamem from the root, or soemthing like that. | |
[unknown: 5]: 16-Apr-2009 | Ahhh, I did the same thing with Tretbase when I put on my webhost. But my problem was different as I used a /view option in my script that I needed to change. | |
amacleod: 17-Apr-2009 | Is there a way to get the name of the drives besides just the letters. >> list-dir %/ c/ d/ e/ f/ g/ h/ i/ j/ I want: Local Disk (c:), Removable Disk (G:) etc. | |
Graham: 21-Apr-2009 | I write a batch script to do this .. ie. write the new file name as temp.exe or something. | |
Graham: 21-Apr-2009 | Then do a call/quit to the update.cmd script. | |
eFishAnt: 27-Apr-2009 | Just pulled the bullet from my foot. buffer: copy {} ;works better than buffer: {} I was suspecting, then finally tried (fixed a random-looking problem) Anyone know the efishantsea between these? buffer: copy {} vs clear buffer | |
eFishAnt: 27-Apr-2009 | wow, nice analysis, Peter. Almost feel like AltME makes a good benchtop software scope...;-) Where does 'fastest come from? | |
PeterWood: 27-Apr-2009 | Fastest is a trivial script that I use. I think many people have better ones. >> source fastest fastest: func [ f s /local st en ][ st: now/precise loop 10000 [do f] ed: now/precise print ["The first code took" difference ed st] st: now/precise loop 10000 [do s] ed: now/precise print ["The second code took" difference ed st] ] | |
Geomol: 27-Apr-2009 | Making the GC (Garbage Collector) to as little as possible is a good thing! (TM) :-) | |
Robert: 27-Apr-2009 | This looks strange to me: >> a: [a1 b1 a2 b2 a3 b3 a4 b4] == [a1 b1 a2 b2 a3 b3 a4 b4] >> extract/index a 2 1 == [a1 a2 a3 a4] >> extract/index a 2 2 == [b1 b2 b3 b4] >> extract/index a 2 3 == [a2 a3 a4 none] >> extract/index a 2 4 == [b2 b3 b4 none] >> extract/index a 2 5 == [a3 a4 none none] Why is NONE returned? I would expect just a shorter block. | |
[unknown: 5]: 27-Apr-2009 | skip+: make function! [ {Returns a series matching the skip sequence} series [series!] "Series to return skip values from." interval [integer!] "Skip interval" start [integer!] "Series index to start skipping from." /local blk ][ blk: copy [] if interval > (length? series) [return none] series: at series start while [not tail? series][ if (index? series) = start [insert tail blk first series start: start + interval] series: next series ] series: head series if empty? blk [return none] blk ] | |
Robert: 27-Apr-2009 | Can I limit the end as well? Something like a SLICE? | |
Robert: 27-Apr-2009 | I have a long series of fixed width and need to extract starting from a current position backwad/forward the x-th value. | |
[unknown: 5]: 27-Apr-2009 | just copy that part of the series into a new series. | |
Graham: 27-Apr-2009 | Is there an easy way to break out of a nested loop? eg. forever [ forever [ if true [ break outside both loops ] ] ] | |
PeterWood: 27-Apr-2009 | You could try to convert one of your loops to a function and do something like this: >> y: func [] [ [ forever [ [ i: i + 1 [ print i [ if i > 3 [return [break]] [ ] [ ] >> i: 0 == 0 >> forever [do y] 1 2 3 4 | |
Geomol: 1-May-2009 | Continuing from Puzzle Answers. Isn't this a bit funny or strange? First some failed attempts to make 2 a word of value 1: >> 2: 1 ** Syntax Error: Invalid time -- 2: >> set '2 1 ** Syntax Error: Invalid word-lit -- '2 >> set [2] 1 ** Script Error: Invalid argument: 2 So 2 shouldn't be a word. But then it's possible anyway with this trick: >> set to-word "2" 1 == 1 2 is still a number: >> 2 == 2 But 2 as a word exists: >> get to-word "2" == 1 I think, it's a bit strange. If it's intentional or not, I don't know. | |
Dockimbel: 1-May-2009 | The only thing that blocks numbers to become word! values is the lexical scanner. When you type anything in console (or DO a file script), your input is first a string! value that gets LOADed (that's where the lexical scanner raises errors). TO-WORD allows to bypass the LOAD phase and force the conversion of any symbol to word! value. | |
Geomol: 1-May-2009 | Maybe it would be a good idea, if constructors like TO-WORD etc. would do a lexical scanning of the result? | |
Dockimbel: 1-May-2009 | Anyway, this gives us a probably unique method for strong code obfuscation. :-) | |
Geomol: 1-May-2009 | heh, yeah! It's fun at times, but is it really a good idea? | |
ICarii: 1-May-2009 | the set to-word "2 + 2" with spaces is a bit of a worry | |
Dockimbel: 1-May-2009 | I agree, TO-WORD should enforce word! syntax rules on argument and raise syntax errors accordingly. That would be a more logical behavior. Maybe Carl had some design issues to workaround by allowing this (or maybe it's just an implementation flaw). | |
ICarii: 1-May-2009 | R3 however does do a whitespace check thankfully | |
Sunanda: 1-May-2009 | Geomol <funny or strange> It gets odder ( or less consistent) as '+ does seem to be given special handing...... What I really wanted to do to solve the puzzle was: -- set to-word "2" 5 -- set to-word "+" none The block then becomes (in effect) do [5 none 5] == 5 But DOing the gimmicked block in R2 fell found of '+ being both a native and some hardwired syntax in the interpreter: set to-word "2" 5 set to-word "+" none blk: copy [] blk: reduce [to-word "2" to-word "+" to-word "2"] probe blk == [2 + 2] do blk ** Script Error: Invalid operator: + ** Near: 2 + 2 | |
Maxim: 8-May-2009 | I agree that adding a refinement to include a compare func would be pretty usefull! | |
[unknown: 5]: 8-May-2009 | Seem I'm always wanting this functionality and would be a very useful upgrade. | |
[unknown: 5]: 8-May-2009 | I know we can easily build a function to do this but it seems so well suited to the 'find function. | |
Maxim: 8-May-2009 | find/match series (6 = pick serie 1) would make a lot of sense to me. | |
[unknown: 5]: 8-May-2009 | We ave remove-each in R2 also but that is a bit different as it is doing removal - I don't want something removed just a subset returned. | |
Henrik: 8-May-2009 | it would be more like extract with a /find index. | |
Henrik: 8-May-2009 | have we had a discussion about a variable /skip based on FIND? I think it's a good idea in general. | |
Janko: 8-May-2009 | I think its a good idea to ahve find like that (so that it gives subset) but expression would have to be a block so you can put any code inthere and things are systematic | |
Maxim: 8-May-2009 | but even extract creates a new series, we just want to change the offset, its much more efficient in all cases... and yess I would have used that VERY often. | |
Maxim: 8-May-2009 | like /skip, maybe the /compare refinement could become more generalized. this would be a logical complement to the flat record concept which /skip enables... wrt SQL, in some cases /compare is used as a where clause, other times its the argument to TOP, somethimes its used as the ORDER-BY, its very symmetric and much simpler to have the same refinement for all of these IMHO | |
kcollins: 8-May-2009 | So the desired feature is to return the series at the position of the first element which meets a specified condition? | |
Anton: 9-May-2009 | (A better name for FORONLY would probably be FINDALL or something like that.) | |
Janko: 12-May-2009 | do any of you rebol gurus see a way to do something like coroutines / yield / generators with rebol - so far a lot was possible to be done in rebol on a library level because it can change it's own code and because primitives aren't really primitives, but I don't see how this could be done ( there is magical do/next but it would block until loop exits so for something like this example it won't work). I am not sure I know the exact definition of coroutines so I will give an simple fictional example.. ... retvieve-time: func [ node /local msg ] [ send-message node "get-time" while [ not msg: get-waiting-message ] [ yield ] print [ "the time is" msg ] ] append *processes* :retrieve-time retrieve-time *timer-node* forever [ foreach p *processes* [ continue p ] ] Yield returns controll from function, and next time continue is function continues at that point. I know the example isn't technically correct (for example when function exits it should be flagged and cleared from *processes* etc) , but just for illustration what I am asking | |
Janko: 12-May-2009 | I made progress with my simple actors library few weeks back but I still ahvent found time to make a blogpost about it.. it works nicely without something like yield and probably even has few advantages, but I am interested if somehow this can be made on top of rebol too | |
Group: View ... discuss view related issues [web-public] | ||
Volker: 13-Sep-2006 | i would try an event-func. You know how to catch a close-event for a specific window, drop events for that window the same way. | |
Gabriele: 13-Sep-2006 | in the detective, i had the same problem (but with network events coming). i just clear the wait list and show the inform. maybe you could also add a custom event func that filters events except for those regarding the popup. | |
Anton: 13-Sep-2006 | Henrik, maybe you can post us a cut-down example which shows the double-error bug, and we can try to handle it the best way. Sounds like it would be a useful technique in general. | |
Volker: 13-Sep-2006 | This is a working test-programm? | |
Anton: 13-Sep-2006 | Actually, I don't see the benefit in making the error window a modal popup. What would be cool would be to have a gadget to show multiple error messages stacked on top of each other, with a couple of arrow buttons to cycle through them and a button to discard the currently viewed one. | |
Henrik: 13-Sep-2006 | The goal of the error capture is to provide end users a means of reporting bugs to me over the internet in a uniform manner. Having them read me console output over the phone just doesn't work. To reach that goal I defined some rules: 1. The user must know what is going on when that window is popping up. Therefore it has to be very simple and clear that the program they were working in, has failed. 2. When I use the program, the error window must be useful to me as well, so I output the error object in that window. 3. The error window must pop up in front of the other windows and be modal. I've had way too many user cases with hidden new windows to great confusion of users. That's why I use an INFORM. 4. The program must stop dead in its tracks, because of two things: 4.1. The program saves to disk very often. If the program continues operating despite this error, there could be a risk of data corruption, which could be saved to disk, overwriting good data. 4.2. If the program crashes during receiving events from a moving mouse, the error log would become very big in no time, if the logging functions are triggered because of this mouse movement. It's important to see the first point where it breaks. I've got all bits working except the event blocking part. | |
Anton: 13-Sep-2006 | That's a pretty good logic. New windows can be brought to front (or if they are minimized, flashed in task bar) with: window/changes: [activate] show window which you could do insistently on new errors. But ok, you want to stop on the first error. Ok, so you're using a modal window. In that case, I would change inform-on-error [do event] to: filter-do event where the FILTER-DO function is the same as INFORM-ON-ERROR except it examines the event first. When event/face = error-window, then DO EVENT, else discard the event. | |
Anton: 14-Sep-2006 | Good question. I think it may be a deliberate offset added to the some edges of polygons, so polygons with common edges can be drawn in any order without any overlap. This is used in 3D modeling, where lots of triangles with common edges are drawn. | |
Graham: 15-Sep-2006 | I haven't seen it, but apparently Cyphre did one in at the last devcon .. so have a look at his presentation? | |
Anton: 16-Sep-2006 | Ask all your questions here about any facets, then we can collect the answers into a document. | |
Anton: 16-Sep-2006 | Someone made a very nice colour-wheel requester (at least I think it was a requester) at one time. I've found Oldes' color-lab.r which is just awesome, but I'd like to also find any others. | |
Robert: 17-Sep-2006 | This would be really a needed doc. I haven't done it myself yet, because the startup time to collect all information snippets is to high. | |
Anton: 17-Sep-2006 | It's a pretty huge task. | |
Volker: 17-Sep-2006 | There isnt much different to plain faces. There is a block /init which is called after all arguments are loaded by 'layout. Arguments are put in the appropriate facets, if there are some of the same type, they are put in a block instead. so two colors go into /colors. There is some magic with keywords, which needs more space to explain. but for quick things you can pass args in 'with. Styles have their own source in /facets, so you can look there. Best with deskop/tools/vid-style-tree. Start fresh things with 'image or 'box, examine things by with[probe self]. The rest is the same as plain faces, and there are some docs now. | |
Volker: 17-Sep-2006 | /init is a block so its extensible by appending own stuff to it, so text with[append init[ print "all args here" ]] | |
Anton: 17-Sep-2006 | Henrik, are you wondering what stylize/master does or how to use it ? Or are you looking more for a style-creation guide ? Usage of stylize/master itself is pretty simple, it takes a style spec and adds the new styles in it to system/view/vid/vid-styles, where all the default styles are kept, eg: stylize/master [my-box: box blue "hello"] view layout [my-box] I often felt the need for an official document explaining all the things a style should satisfy to be "VID-compliant" and explaining each facet in detail, where and how facets are used by existing styles. But no such doc exists. I've been growing a pile of demos and text documents as I discover things. | |
Henrik: 17-Sep-2006 | I'm not wondering about it. I used Cyphre's video to kickstart LIST-VIEW development. :-) But I think this is an area of VID that remains a mystery to most users, as there is very little documentation around to explain how it works. Maybe that's why there isn't that many custom VID faces around. I seem to remember a ton of custom classes for MUI on the Amiga. | |
Janeks: 18-Sep-2006 | If I am calling (loading) a layout from web server script with http://someurl?some=cgivarsand then displaying, than I cannot it unview: info-resp: read browseUrl reduce load info-resp either viewed? infowin [ unview infowin ;Does not work!? view/options/title/new infowin [all-over] "Info:" ][ view/options/title/new infowin [all-over] "Info:" ] F.ex. I want that there does not appear new windows. But I need to use /new refinement, because I need possibility for user to go back (activate) on another window. Is it connected with Rebol scopes? And how to avoid new window? | |
Graham: 18-Sep-2006 | unview/only infowin .. is the syntax for closing a single named window |
39701 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 396 | 397 | [398] | 399 | 400 | ... | 643 | 644 | 645 | 646 | 647 |