AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 917 |
r3wp | 9345 |
total: | 10262 |
results window for this page: [start: 5101 end: 5200]
world-name: r3wp
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
Janko: 14-May-2009 | I qould 1) split on comma to get list of entities 2) for each entity if it's a single num append it to block, else split again and append whole range to the block | |
PeterWood: 14-May-2009 | I usually try to take a few small steps rather than try to get the answer straight away. The test data: >> inp: {random 2/2,2/4-6,2/33-37} == "random 2/2,2/4-6,2/33-37" | |
PeterWood: 14-May-2009 | Let's start with 2/ and see how we get on >> parse/all inp [ any [copy range "2/" some digit (print range) | skip ]] 2/ 2/ 2/ | |
Maxim: 14-May-2009 | mhinson... If I can encourage you... once you will "get" it... it will all become <really> simple. you mind is just adapting to maping rules and seeing the inherent stack of what they imply. Don't give up, it will all become clear. I think we all feel the same anxiety at first. Most don't follow through, its a good thing that you persevere. :-) | |
mhinson: 14-May-2009 | I suppose any data can get damaged, so it is better for the rules to crash & burn than hide the fact that the data is damaged | |
mhinson: 14-May-2009 | I tried Peters rules & Steves first rules, then Ladislav gave me some more structure to it which seemed like a good idea when things get more complex. But I cant quite fit it all together. | |
mhinson: 14-May-2009 | is it because the skip never get called so the parse is stuck on the first position or match & parse needs to move to the tail to return true? | |
Maxim: 14-May-2009 | :-) I missed such a big feature of rebol for sooo long, just because I didn't get these nuances. and its hard to make a tutorial out of this, cause it sooooo boring, and you don't realize why its so important until you really start to use parse. | |
mhinson: 14-May-2009 | I agree, it needs to be interactively taught. I know I will still get it wrong, but I fee more confident to analyse what is going wrong now. | |
mhinson: 15-May-2009 | That looks exactly the structure I had in mind, but how do I get the data into the right part of the structure? if I have data of 3 2/1 & I know it refers to a vlan. I will have up to about 1500 of these for each file | |
mhinson: 15-May-2009 | In fact I do know the index structure, so your first example is exactly what I need. :-) How do I get the data back out of this structure please? I dont understand all the colons in it. | |
Geomol: 15-May-2009 | If you use integers and words as your indexâÊyou don't have colon, like in: data/2/35/vlan If you have a variable with the index, you need the colon to get the value of the variable, else REBOL will see it as a word, like in: idx1: 2 idx2: 35 data/:idx1/:idx2/vlan | |
mhinson: 15-May-2009 | I can't get it to work. >> data/1/2/vlan: 3 ** Script Error: Cannot use path on none! value ** Near: data/1/2/vlan: 3 | |
mhinson: 15-May-2009 | I tried to create a data structure like this i2: [[vlan []][disabled []][name []]] i1: [[i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2][i2]] data:[[i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1][i1]] but when I try to use the structure I get data/1/3/vlan: 3 ** Script Error: Cannot use path on none! value ** Near: data/1/3/vlan: 3 Have I just made a typo? or am I barking up the wrong tree? | |
Graham: 15-May-2009 | in the above, you're expecting 20 - 30 copies of i2, but you're going to get all of them exactly the same .... | |
sqlab: 15-May-2009 | I did not follow exactly your intentions, am I correct, you want to get a structure with 4 qualities? Then why you do not add for every line you are parsing your 4 elements: either with append data reduce [port disabled vlan name] or with append/only data reduce [port disabled vlan name] ? | |
sqlab: 15-May-2009 | then you would need a different structure with flat 13 * 48 elements first and you would get 13 * 48 lines output | |
sqlab: 15-May-2009 | maybe I still do not get what you want to do.( | |
mhinson: 15-May-2009 | I heard about Rebol because of parse, & it seems right to learn about it. I am stll very much a noob & appreciate the intensive help I get here very much. I think the only way I could have got more help would have been to use a cute girls name as my login. ;-) | |
Henrik: 15-May-2009 | mhinson, for your next scripts, maybe you should work a bit more on things that are completely unrelated to parse. it helps to get away from it a while and then get back to it later. | |
mhinson: 15-May-2009 | Thanks for point this out, I see it is very important. I will try to use your new function passing once I get it working in a basic form. Thanks. | |
Maxim: 15-May-2009 | every single day (and often a few times that day): - I open up a rebol console from quick-launch bar in windows (taking about 0.1 sec to appear) - type help 'some-func - test the 'some-func with some-data I'm using. - close the console. overall it takes about a few seconds, to do a unit test of something I'm adding. no bloat, no dangling window. python offers something similar... but: - python takes anywhere from 3-10 secs on load. - then you have to know in what lib the most basic function is (alread half as usefull) - the console itself is really bad, - previous commands browsing is really stupid - having to type so much more code to get the simplest function test going is a pain - in the end, its a non-feature. | |
Maxim: 15-May-2009 | I was just pointing out that rebol is sooo fast to launch that you can close it and its not a pain... I easily get up to 10-15 windows open at a time, and when you've got half of them as rebol consoles, its easier not to guess which one is the help window :-) | |
BrianH: 15-May-2009 | Oh, wait until we get going on the modularization - then you'll really see things getting removed :) | |
Maxim: 15-May-2009 | I really need to get my R3 chat setup... I'm fearing loosing to much time if I start chatting there... | |
Graham: 16-May-2009 | I get a 404 on that link at rebol.org | |
Henrik: 16-May-2009 | That's about as fundamental you can get. Now, a more complex layout consists of many faces and this works by grouping them in a tree of objects. In the FACE object, there is an entry called PARENT-FACE, which is how faces are grouped together in a tree. PARENT-FACE can be another face object or a block of face objects. This is fundamentally how a typical View layout works, and you can build a layout like this by hand, by creating each face, setting position and size, color, text, etc. for each face, and put them together in a tree and display them with View. | |
mhinson: 16-May-2009 | It seems too complex to get started... the examples seem to jump from childishly simple, right to very hard, with no middle ground. | |
Maxim: 16-May-2009 | this is simple, with gfx and goes over everything, just to get you going... Its the only docs we had for years! | |
mhinson: 17-May-2009 | Hi, I have read the recomended http://www.rebol.com/docs/view-guide.html so I have an idea of some of the stuff to expect from VID, but as soon as I try to do anything not explicity shown in that document I find my understanding is really very thin & flimsy. This is an example of me failing to get the results I expected. Perhaps there is just one basic step I have omitted that is messing everything else up? Any tips would be welcome & appreciated, but dont miss a Sunday snooze on my account please :-) mmm: layout [ space 0x0 ;; thought this would make items touch each other. dosnt work? my-sldr1: slider 300x10 [print "1 clicked"] ; ok my-sldr2: slider 300x10 [print "2 clicked"] ; ok space 1x1 ;; thought this would make items 1 pixel further apart. dosnt work my-sldr3: slider 300x10 [print "3 clicked"] ; ok name1: text "Inital text" 100x30 ; ok button "Change text" [name1/text: "Text now changed" show name1] ; ok button "Cente" [my-sldr2/size: 100x40 show mmm] ;; this breaks, but does make a change my-sldr1/step: 25 ;; imagined this did soemthing, but cant see or guess what, seems to break the lat button my-sldr3/edge/color: blue ;; this works but also applies its self to the last button my-sldr3/dragger/color: red ;; doesnt seem to work ] view mmm ;; ok ? mmm ;; shows components of object, reference for what they all mean is not available ? my-sldr1 ;; again guessing what they do is frustrating probe my-sldr1 ;; I know what the parts are but cant guess which ones work or what they do. | |
Maxim: 17-May-2009 | I am using it for my ssh-tool, which will be online within a few days (once I get my web server fully operational). | |
mhinson: 17-May-2009 | how do I get to the r3 console please? I just get a dos type box with a >> prompt. | |
Group: Rebol School ... Rebol School [web-public] | ||
PatrickP61: 8-Mar-2010 | Ok, I get the if x is modified it won't change the original, What I don't get is that and empty block [ ] is just empty. It is not like a word or anything is it? Yes, i did see the performance numbers. that is good to see! | |
PatrickP61: 8-Mar-2010 | I think I understand now Brian, In terms of just initializing a value, both of these are only done once, then they are essentially the same, But if at any time you eval X or Y a second time, then you get different results!!! Thank you for explaining it to me! | |
Sunanda: 10-Mar-2010 | Effectively, you are making x the _same_ as the string "a" so when one changes, they "both" do. as Henrik says, you want to initialise x to the _value_ of the string "a" instead. It may be clearer like this A: copy "a" loop 10 [ x: A ;; x is the _same_ as A ... you want [x: copy A] to get its value instead append x "b" ] | |
PatrickP61: 10-Mar-2010 | >> loop 10 [x: "a" append x "b"] And yet, if I repeat the exact same comand 10 times, I do NOT get the same result x: "a" append x "b" =="ab" x: "a" append x "b" =="ab" | |
Steeve: 12-Mar-2010 | you need to pass the values to map because the formula block only contains tag! which basically are strings (tags have no context, nor values). if instead you use get-words as tags, you don't need to. my-compose: func [code [block!] /local pos][ parse code rule: [ any [ to get-word! pos: (pos/1: get pos/1) skip | to any-block! into rule ] ] code ] >>x: 1 >>y: 2 >>z: 3 >>my-compose [print :x + (:y + :z)] ==[print 1 + (2 + 3)] | |
Steeve: 12-Mar-2010 | Correction: my-compose: func [code [block!] /local pos][ parse code rule: [ any [ pos: get-word! (pos/1: get pos/1) | into rule | skip ] ] code ] | |
Davide: 12-Mar-2010 | Steeve thanks, now it is much more clear. I'll use the get-word type as you suggest. (I have to change a bit my dialect, but it's not a problem) | |
Andreas: 15-Mar-2010 | And even if all functions get definitionally scoped RETURN/EXIT, they wouldn't become keywords at all. | |
Davide: 21-Mar-2010 | Just for fun (it's a slow sunday today) I've wrote a rebol version of the code used as benchmark in this page http://tinyurl.com/5nezt9 here's the code: REBOL [] person: make object! [ _count: none _prev: none _next: none _construct: func [n] [_count: n] get-prev: does [_prev] set-prev: func [pr] [_prev: pr] get-next: does [_next] set-next: func [nxt] [_next: nxt] shout: func [shout nth /local aux] [ if shout < nth [ return shout + 1 ] aux: get-prev aux/set-next get-next aux: get-next aux/set-prev get-prev 1 ] ] chain: make object! [ _first: none _last: none _construct: func [size /local current] [ repeat i size [ current: make person [] current/_construct i if none? _first [_first: current] if not none? _last [ _last/set-next current current/set-prev _last ] _last: current ] _first/set-prev _last _last/set-next _first ] kill: func [nth /local current shout] [ current: _first shout: 1 while [not equal? current current/get-next] [ shout: current/shout shout nth current: current/get-next ] _first: current ] ] start: now/precise iter: 100000 loop iter [ current-chain: make chain [] current-chain/_construct 40 current-chain/kill 3 ] print ["Time per iteration =" (difference now/precise start) / iter ] halt which give me: Time per iteration = 0:00:00.00080234 802 microsecond that is the slower time of the benchmark, but not SO slow, php is near with 593 microsecond, jython 632 ... .(the test system is pretty like mine so i can compare the result) There's a way to improve the performance? | |
Henrik: 21-Mar-2010 | get-prev: does [_prev] set-prev: func [pr] [_prev: pr] get-next: does [_next] set-next: func [nxt] [_next: nxt] These will also slow things down. I'm not sure if you can get rid of them. | |
BrianH: 14-Apr-2010 | And that REMOLD should be using get/any 'value instead of :value - an R3-ism that crept into the code. | |
Maxim: 14-Apr-2010 | is get/any 'value faster? | |
BrianH: 14-Apr-2010 | In R3 :value supports that - it means GET/any instead of GET. | |
Steeve: 14-Apr-2010 | Weird one :) remold: func [x /all /flat /only][ do head remove-each ref next copy 'mold/all/flat/only [not get in bind? 'x ref] reduce x ] | |
Steeve: 14-Apr-2010 | Jeez , I don't need of the bind stuff... remoldx: func [x /all /flat /only][ do probe remove-each ref copy 'mold/all/flat/only [not get ref] reduce x ] | |
Janko: 18-Apr-2010 | aha.. you get set-net not provided also... maybe you call set-user-name also in user.r and that produces the error | |
PeterWood: 25-May-2010 | I' m probably doing something wrong, when I use a color of none I get a gray backdrop not a transparent one. I'm trying to answer one of RebolTutorials questions. Here's the code: I' m probably doing something wrong, when I use a color of none I get a gray backdrop not a transparent one. I'm trying to answer one of RebolTutorials questions. Here's the code: >> b-t: layout [ [ backdrop [color: none] [ text "line 1" red [ text "line 2" blue [ ] >> y-b: layout [ [ b-b: box white 728x90 effect [gradient 0x1 sky] [ ] >> b-t/offset: 0x0 == 0x0 >> b-b/pane: b-t >> view y-b | |
PeterWood: 28-May-2010 | Thanks for pointing that out Anton. I a real beginner when it comes to view. When I added with I didn't get a transparent face but I did when I triued Steeve's suggestion to set the color of the face to none. | |
florin: 29-May-2010 | That was quick! Yet still don't get the 'range' part. I do understand the copy/part a 2, and the second copy/part next a 2. Maybe I don't understand how to interpret the API docs? | |
florin: 29-May-2010 | I think I get it. I find this a misnomer. It is not a range, it should be "ending position". It is a range because the starting position is implied. (?). | |
Henrik: 29-May-2010 | yes, the big disadvantage is that once you get used to REBOL, most other languages become painful to work with. | |
PatrickP61: 23-Sep-2010 | Chris, That is a good idea, for the quick and dirty, but I am having an issue with WHAT WHAT has what is supposed to be an optional field for module name that follows it. But if I do this: echo %tmp.txt what echo none This is processed as if it was this: echo %tmp.txt what echo <--- echo becomes the passed parameter into WHAT none How do I get around that other than specifying a dummy field? Try this: echo %tmp.txt what halt <--- halt will NOT be executed since it is pulled into the WHAT function!! echo none | |
PatrickP61: 23-Sep-2010 | Hey, this worked! first transcode/next read %tmp.txt ! <-- which is the first function name in my temporary file Now, how do I get the first literal for each line??? Parse?? | |
PatrickP61: 23-Sep-2010 | Here is the completed script to get only Function names (nothing else) in a file: echo %tmp.txt what () echo none funct-block: read/lines %tmp.txt funct-names: map-each x funct-block [to-word parse x [return to " "]] write/lines %Funct.txt funct-names | |
BrianH: 23-Sep-2010 | WHAT gets its words from the system/contexts/exports object. MAP-EACH takes a block, so the object is converted to a block. The :v is equivalent to GET/any 'v in R3. The () in the second EITHER block is to generate an unset! value, which will cause MAP-EACH to not add a value to the block for that round. And SORT sorts words in R3. | |
PatrickP61: 23-Sep-2010 | Hi Brian, Man, do you ever sleep -- you were up late last night, or are you somewhere around the globe? Yes the Decode did work when I did this: html-blk: decode 'markup to-binary read http://www.rebol.com/docs/reference.html Is there an easy way to parse out the html stuff and get ONLY the text parts? | |
PatrickP61: 24-Oct-2010 | Got a simple question: I defined a function called pref. Its purpose is to simply print a precise time and value (which could be one of several values), but it is not doing what I expect: pref: func [value][print [now/time/precise "-->" value]] pref ["Your current directory is" what-dir] ; <-- wanted hh:mm:ss:xxx --> Your current directory is ... but instead I got this: 15:04:43.968 --> Your current directory is what-dir the function did evaluate the now/time/precise correctly, but did not evaluate the what-dir. What can I do to get it to resolve all passed variables? | |
BrianH: 15-Dec-2010 | In R3, reference types are the types that aren't in the immediate! typeset (which is just documentation): >> print mold immediate! make typeset! [none! logic! integer! decimal! percent! money! char! pair! tuple! time! date! datatype! typeset! word! set-word! get-word! lit-word! refinement! issue! event!] | |
alemar: 18-Jan-2011 | well guys i have to say the community works and i am pleasntly impressed.I am checking the libraries now and trying to get the script to work since i am getting ** Access Error: Cannot open /C/users/alemar/download/test.r ** Where: halt-view ** Near: do %/C/users/alemar/download/test.r i will figure it out eventually and i can get to real programing in this langueage** Access Error: Cannot open /C/users/alemar/download/test.r ** Where: halt-view ** Near: do %/C/users/alemar/download/test.r** Access Error: Cannot open /C/users/alemar/download/test.r ** Where: halt-view ** Near: do %/C/users/alemar/download/test.r | |
PatrickP61: 9-Feb-2011 | After each typed character, I do get the console to print each one out, but then I seem to loose the end value when I hit enter | |
PatrickP61: 9-Feb-2011 | Any ideas on how to get my end value in R2? | |
Awi: 11-Feb-2011 | Is it possible to get the value of variable number of occurences while parsing block? | |
Awi: 11-Feb-2011 | Is there a way I can get all three strings? Thank you very much! | |
Awi: 14-Feb-2011 | Is it possible to get the current context name in Rebol? I'm trying to write a log function (write log data to file, like nlog or log4net in .net world), surely it will be nice if I could also write the current function being logged. Example: log: func [to-log] [write/append/lines %log.txt reform [now current-context/parent-context/name to-log] plus: func [a b] [log reform ["adding" a "to" b] a + b] >> plus 1 1 == 2 >> read %log.txt == "14-Feb-2011/23:35:04+7:00 plus adding 1 to 1^/" What I'm asking if whether such a thing like current-context and it's parent context exist, and how to get them. Thanks! | |
Sunanda: 14-Feb-2011 | You can, sort of, by cheating and generating an error.....The error object usually contains the current context name, but not the parent's plus: func [a b /local name][ name: get in disarm try [0 / 0 ] 'where ;; cheat print name log reform ["adding" a "to" b "in" name] ;; and add name explicitly to log function call a + b ] | |
BrianH: 15-Feb-2011 | You can get the name of the word that the function was called through in the current call stack. This isn't *the* name of the function, but it's *a* name of the function. Note: "pity it can't be made into a function :-)" This is because if you put that trick in a function, then *that* function is the function that will be referenced. | |
Awi: 9-Mar-2011 | VID question (R2): Is it possible to get the cursor position in the scroll-line event? I wanted to use the scroll to zoom in (like in google maps), and to zoom in to the right area, I needed the cursor position. Thanks for the help. | |
Rebolek: 9-Mar-2011 | You can get cursor position using CARET-TO-OFFSET | |
Maxim: 9-Mar-2011 | yes, you need to hack the event engine a little bit. As gregg says, you need to have a memory of the last move event to get its position and store it (you can do this with an event-handler). glayout and GLASS do this for handling scrollwheel events. what I also do is find the top-level face which is under the mouse-cursor and fire off my own events from the scroll-wheel instead of relying on a text field. again, you can trap the scroll-wheel events in the event handler. if you want to have a ready-made solution, download glayout.r from rebol.org and look at the hacked WAKE-EVENT function. it already does all of this and wraps it up by adding new function you can add to your face/feel object in order to handle scroll-wheels. | |
Awi: 30-May-2011 | Is there a way to to get the time in a datetime value without using refinement? >> d: now >> d/time == 12:09:58 Is there something like select d 'time OR pick d 'time ? Thanks. | |
Awi: 30-May-2011 | I don't understand it, from 'probe', it seems like it already returned 1.0, why arcosine/radians still get > 1.0 | |
Awi: 30-May-2011 | If I got it correctly, using struct, we get access to the internal representation of decimal in R2. Then the third value in the struct is the number behind the comma, and we divide it into two section using struct! i, which will then reveals the last number. Hope I get it right. | |
Janko: 4-Jul-2011 | but I know there are more prominent things to change/fix (if any will get fixed at all) that I don't realistically expect anything changed about this in near future (but that sql dialect would be much cooler if it werent for , exception) | |
Janko: 6-Jul-2011 | because of all this factor programmers developed various nice conventions where they use ! >> to better show what is going on: like int->string or words that get values out of tupple (object) person name>> .. etc (it's been more than a year since I did anything in factor, rebol replaced it) | |
Janko: 6-Jul-2011 | yes, it's good to know and it is true that rebol can be very fastly typed when you get into zone (although I don't have US kyb layout) | |
Ladislav: 8-Jul-2011 | A delimiter is "used to specify the boundary between separate, independent regions in plain text or other data streams". That means, that when using e.g. a,b , and using the #"," as a delimiter, we get just two words a and b, the #"," being used only as a delimiter separating the words, not having any additional meaning. As opposed to that, the | word in the Parse dialect is interpreted as the "choice operator". | |
Ladislav: 8-Jul-2011 | No, if you write a|b you get just one word, i.e. the #|" character is not used as a delimiter at all | |
Janko: 8-Jul-2011 | My understanding is that our last discussion was that you say it's a different game because "," is a delimiter and "|" is an operator, I say I don't see mayor difference... who f* cares .. you think your way and I'll think my way. I just work on hayfield for 2 hours and this "," issue is the smallest of things I care about. Even if I limit on Rebol it's unimportant. Especially in the light that R3 (which fixes tons of issues I have with rebol) might not ever materialize for all I know. I respect you, you wrote closure (and a bunch of other wizard level stuff) for R2 which I am ***very*** happy I can use, and I still hope I will get your Bindology when I get time to read it. Let's move on. Same for Gabriel. But if you will keep writing why "," must be forbidden and I will see (what are in my oppinion) flaws in your reasoning, I will reply with my counterpoints. If I have time. | |
Gabriele: 9-Jul-2011 | I can do string parsing in any language with getchar() while() - oh well, but PARSE is no getchar(). :-) You guys make it sound like block parsing is an order of magnitude easier than string parsing. Actually, it's the same, if you can get block parsing to work, you can definitely get string parsing to work as well. The level of difficulty is exactly the same. (Actually... I think I could write a translator from a block parsing rule to a string parsing one.) | |
Gabriele: 12-Jul-2011 | Henrik, my problem is that is see block and string parsing as equally difficult, especially for newbies that have probably never heard of the concept, and that have no experience in designing languages, BNF rules and grammar parsers. if you can get block parsing to work, then you figured out the hard part already, and can get string parsing to work with only minor extra effort. String parsing may be hard, but so is block parsing. | |
Henrik: 12-Jul-2011 | No, I don't lose the ability. I just get a much better impression of it. It doesn't matter how it's connected, but if you know how, it's much easier to figure out the rest. | |
james_nak: 12-Jul-2011 | This was a great discussion on an important topic. When I look at the participant's names and think, man, if you guys think it's hard, just think what it is for the regular person. :-) Last week I wrote a simple x-10 dialect and used the info from reboltutorial to get me started and I often go back to www.codeconscious.com/rebol/parse-tutorial.html for Brett's "sort of" parse tutorial. But you're right, to get answers to "why" something doesn't work would be helpful. It may seem obvious to Ladislav, but my friend I know you are a genius. I remember your presentation at the first devcon and wondering, "What in the world did that guy say?" | |
shadwolf: 21-Aug-2011 | and be aware I'm not this noob around I' m a ten year contributor of rebol bringing stuff I was the only one to bring sone how I managed to get myself helped this has to be acknoleged liek the fact that now in day the only rebol dicionary in french is due to me | |
Henrik: 21-Aug-2011 | Marco, that is problematic, as copying face objects may destroy certain bindings in a face, essentially causing faces to be "entangled", some functions work only with the old face and some only with the new face. It depends on the style and how it was written. Memory, speed and complexity of the operation gets worse, the bigger the layout. It's easier to just generate the face once, store the values and use GET-FACE and SET-FACE on the layout. | |
Henrik: 21-Aug-2011 | store the values and use GET-FACE and SET-FACE - more accurately, "store and retrieve the values using GET-FACE and SET-FACE". | |
shadwolf: 21-Aug-2011 | who cares henrik get face set face who cares there is no r3gui | |
Henrik: 21-Aug-2011 | Marco, the one thing that VID then doesn't do so well is allow groups of faces to be SET-FACEd and GET-FACEd easily, which is probably what scared you. The VID Extension Kit solves this by allowing these functions to work on entire layouts. | |
shadwolf: 21-Aug-2011 | worst when I gently take on my free time to give some advice as a professional that get 7K euros every month to do websites in php javascript c /C++/java/.net since more thamn 20 years .. I'm just ignored liek you can see henriok ignores me hoping my rage wares off on its own to resume it's futile routine | |
shadwolf: 21-Aug-2011 | I can't beleive rebol get such a pathetic endign | |
shadwolf: 21-Aug-2011 | and trust me I'm teared ... I stupidly love rebol and all the things rebol tryed to create --- but I like nenad's guts to get ride of your doing the same thing .... cause that was you really deserve | |
Henrik: 21-Aug-2011 | Marco, my response to you seems to have scrolled away. Did you get it? | |
todun: 6-Oct-2011 | What does a misplaced item error mean? I get it when I try to read a file like so: lines: read/lines %file.txt | |
Pekr: 6-Oct-2011 | todun - a little bit more dynamic version of counter: counter: func ['var add-value][if not value? var [set var 0] set var (get var) + add-value] counter x 10 ; --- x does not have to exist, and if is inicialised and set to 0 | |
todun: 6-Oct-2011 | @Geomol, when I run the script with the DO include, I get the following: | |
BrianH: 24-Dec-2011 | Note: In R2, if you use the old-style reflectors to get at the spec then you can replicate the R3 weirdness because it returns a reference to the original spec. The SPEC-OF reflector is much safer, even in R2, because it returns a deep copy instead. Have I mentioned lately just how bad it is to use the R2-style ordinal reflectors instead of the R3 style *-OF reflectors? | |
BrianH: 24-Dec-2011 | HELP uses WORDS-OF to show the arguments at the top, but uses SPEC-OF to get the detailed argument help below. The spec returned by SPEC-OF doesn't have any effect on the execution of the function - it's just documentation. | |
BrianH: 24-Dec-2011 | The inconsistency between R2 and R3 is because R3's reflection model was changed to be more secure, and easier to sandbox. In R3 you can't get a reference to the real spec and body of a function after the function is created, at least from non-native, non-debug code. That is why the hack above required saving a reference to the spec from before the function was created; if you don't do that, you won't be able to get at the spec or body afterwards if your security settings are set to the defaults (and turned on - that's another story). | |
BrianH: 24-Dec-2011 | The inconsistency between R2's and R3's spec and body copying behavior during MAKE function! was an efficiency issue. The startup code of R3 uses a non-copying version of FUNC, and this speeds up startup quite a bit. However, the function builder mezzanines copy the spec and body, moving the copying behavior from the MAKE action to the mezzanine code - it's still about as fast because the actual copying is done by the same native code. As a side benefit, we get a bit more flexibility when we need it, especially when you don't leak references to the original spec and body that were passed to the MAKE action. MAKE module! does the same non-copying behavior for the same reason, though MODULE doesn't make a copy because the body is generally even bigger, and is not saved at all in the constructed module. |
5101 / 10262 | 1 | 2 | 3 | 4 | 5 | ... | 50 | 51 | [52] | 53 | 54 | ... | 99 | 100 | 101 | 102 | 103 |