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: 33301 end: 33400]
world-name: r3wp
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
rjshanley: 24-Nov-2010 | R3 is a little wierd in its handling of large hex numbers - it displays them in scientific notation with limited precision instead of as integers. | |
Sunanda: 24-Nov-2010 | That's not a hex number. It's a REBOL pair. For hex, try this: to-hex 333333333333 | |
Andreas: 24-Nov-2010 | Which exposes a nice bug in A110. There is no longer an issue! type which can be used for arbitrary base literal numbers. | |
BrianH: 24-Nov-2010 | First of all, we never had a type that could be used for arbitrary base literal numbers, except the string types. | |
BrianH: 24-Nov-2010 | Next, TO-HEX should probably not be removed, but it should return a string! instead. | |
BrianH: 24-Nov-2010 | A binary is only formatted with hex characters (if the binary-base is 16). A string would actually containthe hex characters themselves. | |
BrianH: 24-Nov-2010 | I expect that TO-HEX is a formatting function that is definitely not useless for web work, for example. | |
BrianH: 24-Nov-2010 | TO-HEX is a convenience function. Being lazy in a common situation is the whole point to convenience functions. | |
BrianH: 24-Nov-2010 | a nice bug in A110 - And which bug is that, exactly? Has it been reported? | |
BrianH: 24-Nov-2010 | Ah, OK then. The change in issue! has brought up a lot of issues, so to speak. We are hoping to collect them all and come up with a set of tweaks and enhancements that can make things work. It should be possible to make them work a lot like they did before, with only minor changes (like being non-modifiable). You can replicate a lot of the behavior of a series type in a non-series type by simply having the series functions also work on the other type, as closely as appropriate. Good examples of these are SELECT and APPEND on objects and maps. | |
Sunanda: 25-Nov-2010 | I should have given the example: to-binary 33333333 As the above discussion suggests, creating an issue! is a bit of a dead end in this case. A binary! is much more usable.....That is true in R2 as well as R3. | |
Duke: 29-Nov-2010 | A function like: [code] func [x] [subtract 6 x] [/code] strikes me as being a lot like an anonymous function or lambda expression. Is that correct? How would I execute the above function from Rebol CLI? I keep getting error messages, so I'm not getting a piece of the puzzle. | |
ChristianE: 29-Nov-2010 | I'd say, yes, those are anonymous functions - in the sense that they aren't assigned to a word. But in the stricter sense of a "named" function, REBOL doesn't have that concept at all. You can assign a function to one word, some words, or no words at all. | |
ChristianE: 29-Nov-2010 | Easy to see for example in code so simple as >> a: b: c: func [ ] [print "What's my name?"] >> do [a b c] | |
Izkata: 29-Nov-2010 | I consider them to be the same as anonymous functions/lambdas, due to how I was introduced to that concept in Scheme - and a similar ability to have multiple words/names reference the same function, as ChristianE shows in Rebol: (define foo (lambda () (print "Hi")) (define bar foo) | |
Duke: 29-Nov-2010 | @Christian E. Thanks for the examples! In the first one, it just dawned on me that perhaps Rebol is a stack-based language - a bit like Forth et al. Didn't you just put "5" on the stack, then the "apply func" simply pops the the stack for its parameters? | |
Duke: 29-Nov-2010 | @Izkata Ithought that I smelled a lambda - maybe a la Rebol - but close enough :) | |
BrianH: 29-Nov-2010 | REBOL has a stack, like most programming languages, but no explicit manipulation of it. DO function! just evaluates the arguments. One of the many gifts of using an interpreted language. | |
Duke: 29-Nov-2010 | @Brian So Rebol is not a stack-based language like Forth, or concatenative languages, like Joy, Cat etc? | |
BrianH: 29-Nov-2010 | Nope. I haven't used the others but like Cat a lot. Too bad the author has (temporarily?) abandoned the project. | |
BrianH: 29-Nov-2010 | REBOL is more like an interpreted Lisp, with a Forth-like direct binding model. | |
BrianH: 29-Nov-2010 | newLisp is more compiled than REBOL, and has dynamic binding, which is a completely different concept. | |
BrianH: 29-Nov-2010 | Unfortunately, it is a bit hard to explain direct binding to people already familiar with lexical or dynamic binding. | |
BrianH: 29-Nov-2010 | I run into these next levels pretty often, usually after a conversation with Carl or Ladislav. It's no problem to be new again :) | |
Ladislav: 29-Nov-2010 | One thing that attracted my attention in the article: ...interesting fact about REBOL blocks: By default, their evaluation is deferred. - not being a native speaker, I do not know, whether it means the same as: ...interesting fact about REBOL blocks: They are not evaluated (i.e. understood as 'data', not as 'code'), unless an evaluation is explicitly requested. | |
Steeve: 29-Nov-2010 | Well, about binding in Rebol, it's not that hard to understand. The context of any word is a hidden property. Meaning it can be changed at any time. | |
Ladislav: 29-Nov-2010 | yes to "The context of any word is a hidden property.", but "it can be changed at any time" is a bit complicated by the fact, that it is "immutable", meaning, that you create a new word with a different context, when you want it, instead of changing the original | |
Steeve: 29-Nov-2010 | if its an internal (silent) reconstruction we don't bother. the behavior acts like a change. a: [obj] bind a context [obj: 1] do a == 1 From my point a view the serie A has bit been modified. | |
Steeve: 29-Nov-2010 | *From my point a view the serie A has not been modified. | |
Steeve: 29-Nov-2010 | And the same word OBJ got a new context | |
Steeve: 29-Nov-2010 | Ladislav, I see your point, except it's not a problem from my point of view. ;-) | |
Steeve: 29-Nov-2010 | Probably we shoold invent new vocables. instead of "direct" binding like Brian said. I would say "space" binding. in the block: b: [ a a a a ] Each word 'A' may have different contexts. Beause they occupy diffenrt locations in "space" That"s all. :-) | |
Steeve: 29-Nov-2010 | It's not a spacetime law violation | |
Steeve: 29-Nov-2010 | After new binding, Even if you say that the "cell" contains (hidden)pointers to different locations in memory. The cell himself remains at the same location in the block and has the same "public" name. So that I can say : the same "cell" in the same block with the same name has a different context. | |
BrianH: 29-Nov-2010 | But the interesting thing is that the immutability of words makes BIND behave differently when passed a word (which it can't modify) versus a block (which it can). So when you bind a block, you aren't modifying the words in the block, you are modifying the block itself. This is an important distinction that we shouldn't gloss over because that tends to confuse newbies later. | |
Ladislav: 29-Nov-2010 | Yes, the main problem is, that the "From my point a view the serie A has not been modified." will shoot you in the foot, as demonstrated in the bindology article | |
BrianH: 29-Nov-2010 | I used to use the term "applicative binding order" for REBOL's binding model, but later on Carl started calling it "definitional binding", which is a bit less descriptive but sounds better. | |
BrianH: 29-Nov-2010 | Sounds better than "applicative binding order". Time will tell if the increased explanation needed will be outweighed by having a cooler term. | |
Ladislav: 29-Nov-2010 | I am a fan of the "definitional binding", since it is short enough (just two words, i.e. the same length as alternatives, like "dynamic binding" or "lexical scoping"), as well as different enough from the alternatives | |
Steeve: 29-Nov-2010 | yeah there is a default binding during the loading,; I forgot... | |
Ladislav: 29-Nov-2010 | yes, that is the problem, as well, as the problem of a function inside a function, etc. | |
BrianH: 29-Nov-2010 | It is really quite similar to what a compiler for a language with lexical scoping does internally, but we do it at runtime instead. | |
mhinson: 22-Dec-2010 | Hi, is anyone familiar with Frank Sievertsen Telnet protocol scheme please? I am trying to use it at a really basic level at first, just issueing the commands manually, but I think I am missing a trick or two. this is what I am doing port: open telnet://192.168.2.2/ t: copy port print t This shows me that I connected ok & got a password prompt, however I cant seem to work out how to send a string to the session & read the response. Any suggestions much appreciated. Thanks. Hi, is anyone familiar with Frank Sievertsen Telnet protocol scheme please? I am trying to use it at a really basic level at first, just issueing the commands manually, but I think I am missing a trick or two. this is what I am doing port: open telnet://192.168.2.2/ t: copy port print t This shows me that I connected ok & got a password prompt, however I cant seem to work out how to send a string to the session & read the response. Any suggestions much appreciated. Thanks. | |
Gregg: 22-Dec-2010 | I haven't looked at that in a looooooong time. I hope someone else can chime in and help. | |
mhinson: 22-Dec-2010 | Hi, I had to drive 100 miles to pick up my son nexpectedly. So my apologies for not responding straight away. Thanks very much for your responses. Gregg, I am not doing anything to send data to the session because I dont know how to I am afraid. you mention INSERT, but even after looking at the telent.r code I am afraid I can work out what to do. Steeve, the target device is a CIsco router so I think it would be happy with crlf or just cr I am afraid I will have to be off to bed now, but hopefully a few small pointers will get me thinking in the right direction. Thanks | |
mhinson: 23-Dec-2010 | Thanks Greg. I didnt realise the Telnet scheme "port" concept was a Rebol generic thing, I mistakenly thought it was specific to the undocumented telnet scheme. Looks like I need to do a close port This is great, I am now getting somewhere. Thanks again for your help. Will R3 impliment telnet as a native? Or is it too soon to ask? | |
nve: 25-Dec-2010 | Question from ThomasP : how can I create a local SMTP server? the SMTP server should run in the background, I just do: set-net [127.0.0.1] to send my mail I find simulator SMTP server on the web, but no real server. | |
Steeve: 25-Dec-2010 | Hu ? Just download a free one | |
alemar: 18-Jan-2011 | Hi,so i am quite new to the rebol community and have been assigned a project to work on.So to be frank i started reading rebol 2 days ago and i am quite confused since i worked with c++ before that.I am stuck at flow control and operators(sad i know).So basicaly i thought of when i moved from delphi to c++,basically if one of you guys can provide me with a rebol version of this small program i whipped up(flow control number check-the basics) it would be of great help to me,so here is my program and thanks in advance. It inputs an integer number n and outputs the sum: 1+22+32+...+n2.I use input validation for n to be positive. #include <iostream> using namespace std; int main() { int n; cin >> n; if (n < 0) return 1; int sum = 0; int i = 0; while (i <= n) sum += i*i; cout << sum; return 0; } | |
Maxim: 18-Jan-2011 | I'll give you a convertion in a few secs... | |
alemar: 18-Jan-2011 | it inputs a vallue for a varriable | |
Maxim: 18-Jan-2011 | yeah.. I don't use the C++ console ops a lot, I do C mainly. | |
Maxim: 18-Jan-2011 | but here goes... n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum | |
alemar: 18-Jan-2011 | basically when you have cin>>n it awaits a vallue to be inputted in the console window | |
Maxim: 18-Jan-2011 | rebol returns 0 by default when you are the end of a script... so no need to add it at the end. | |
Maxim: 18-Jan-2011 | note, I added a little probe which prints the value at each step. I did this to show you one powerfull aspect of REBOL... you can insert functions like *chains* | |
Maxim: 18-Jan-2011 | just a few functions don't return values (like print) in this case you will get an error, but the error should give you clues | |
alemar: 18-Jan-2011 | well in delphi you define a value by := and : only explaines the type (boolean,integer.. | |
alemar: 18-Jan-2011 | trying to compile the code now but the compiler from the site is a bit tricky | |
alemar: 18-Jan-2011 | ok is the Near error a syntax error in the cycle? | |
Maxim: 18-Jan-2011 | the main difference in REBOL is that everything you can manipulate is a value, even functions and objects don't have a special syntax to use... they are values just like anything else. | |
Maxim: 18-Jan-2011 | or you can make a function out of it.... right in the console. | |
Henrik: 18-Jan-2011 | the console is for one-line inputs, if you want to type in your code directly. that interactive use of REBOL. the way you want to do this, is create a script in notepad, and run the script from the REBOL console | |
alemar: 18-Jan-2011 | how do i input the code as a whole in the interpreter | |
Maxim: 18-Jan-2011 | my-func: func [] [ n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] | |
Henrik: 18-Jan-2011 | open a REBOL console and type: do %/path/to/test.r | |
Maxim: 18-Jan-2011 | the % character before a string of text identifies the whole string as a file path... ex: >> type? %/C/users/alemar/download/test.r == file! | |
Henrik: 18-Jan-2011 | alemar, is your console a black DOS like console? | |
alemar: 18-Jan-2011 | you are a magician | |
alemar: 18-Jan-2011 | as a vmachine at the moment | |
Maxim: 18-Jan-2011 | the R2 console can actually act like a shell. in the latest release (2.7.8) they added posix style shortcuts to the various file operations directly... so you can do: >> cd %/C/users/alemar/download/ >> ls | |
Maxim: 18-Jan-2011 | the advantage of opening the console first and executing do is that any console i/o will remain in the current console... if you just double click on a simple script, REBOL will open execute and close so fast, you might not even see it flash on screen! | |
alemar: 18-Jan-2011 | ok but now when i start the file directly i get ** Syntax Error: Script is missing a REBOL header ** Near: do/args script system/script/args | |
alemar: 18-Jan-2011 | my-func: func [] [ n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] | |
alemar: 18-Jan-2011 | REBOL[] my-func: func [] [ n: to-integer ask "enter a number" if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] | |
Maxim: 18-Jan-2011 | yep. and don't forget to run the function at the end... I'd also put a trailing ask "" REBOL[] my-func: func [] [ n: to-integer ask "enter a number: " if n < 0 [quit/return 1] sum: 0 i: 0 while [ i <= n ] [ sum: sum + probe (i * i) i: i + 1] print sum ] my-func ask "press enter to quit" | |
alemar: 18-Jan-2011 | ok trying that as well,on a side note now the file does not start :D | |
Maxim: 18-Jan-2011 | now try it with a negative number and the console will quit on its own (since I put a return/quit 1) | |
Maxim: 18-Jan-2011 | /quit is a Refinement a special function datatype which can be used in functions to supply additional parameters or instructions to a function. | |
alemar: 18-Jan-2011 | it`s barely 22:30 but i got a lot to do tommorow | |
Maxim: 18-Jan-2011 | and when its needed, you can force input types: fixed a few typos... this should work right: my-func: func [value /optional opt-value [string!] ] [ probe value if optional [ print length? opt-value ] ] my-func 33 my-func/optional 22 "tadam" my-func/optional 22 44 | |
alemar: 18-Jan-2011 | the name did seem a bit slav... :D | |
jack-ort: 8-Apr-2011 | thinking of using objects for the first time, using them to capture clinical data for patients. Need to capture data by time; still just a fuzzy idea. I have read how you can extend an object by simply redefining it with new values, but I wonder if there is a way to REMOVE elements from an object? TIA! | |
Henrik: 8-Apr-2011 | In R2, you can do this: 1. get the body of the object as a block 2. find the word you want to remove 3. remove the word and its value coming right after 4. make a new object from the block | |
Henrik: 8-Apr-2011 | In R3 you have more options for manipulating objects a little bit like series, without having to re-make the object, although I'm uncertain that you can remove elements from objects. But then you also have the map! datatype, which is more suitable for very quick adding and removing of key/value pairs. | |
BrianH: 8-Apr-2011 | You won't be able to remove elements from an object even in R3, because it would break binding. But you can create a new object without the field, or use a map!, just as Henrik says. Note that you can also TRIM objects in R3, which will make a new object based on the old one with unset fields and fields set to none not included in the new object. | |
BrianH: 8-Apr-2011 | >> trim context [a: 1 b: none] == make object! [ a: 1 ] >> trim context [a: 1 b: 2 unset 'b] == make object! [ a: 1 ] | |
jack-ort: 11-Apr-2011 | BrianH said: "But you can create a new object without the field,...." Sorry to be especially dense, but do you mean create the new object from scratch, or based on the old object? I've seen the examples to create new from old and also adding fields, or resetting the value of an existing field, but never excluding old fields. I look forward to more documentation on "map!"; maybe I should move to R3. Last I checked, there was no GUI in R3, even the Windows version, despite what the download page says? One last newbie question for the day - will there be a 64-bit REBOL? I'm thinking my data could get rather large before too long. Thanks to all of you! | |
Ladislav: 11-Apr-2011 | Last I checked, there was no GUI in R3, even the Windows version, despite what the download page says? there is R3-GUI, which can be downloaded. check the announcements, etc. A new version will be published this week | |
Ladislav: 11-Apr-2011 | It is possible to define a REBOL function doing that | |
BrianH: 11-Apr-2011 | I meant creating a new object from scratch, not based on a direct prototype. For example: >> x: make object! [a: 1 b: 2 c: 3] == make object! [ a: 1 b: 2 c: 3 ] >> y: make x [d: 4] ; creating based on a direct prototype: == make object! [ a: 1 b: 2 c: 3 d: 4 ] >> z: make object! head remove/part find body-of x 'b 2 ; making based on the body of x, but not directly on x == make object! [ a: 1 c: 3 ] | |
jack-ort: 12-Apr-2011 | Hello again! Cannot see how to make BrianH's example work in REBOL/View 2.7.8; hungup on how to FIND a set-word: >> x >> probe x make object! [ a: 1 b: 2 c: 3 ] >> z: make object! head remove/part find body-of x 'b 2 ** Script Error: head expected series argument of type: series port ** Where: halt-view ** Near: z: make object! head remove/part >> find body-of x 'b == none >> body-of x == [a: 1 b: 2 c: 3] >> find body-of x 'b: == none | |
BrianH: 12-Apr-2011 | The real R3ism was the FIND call, unfortunately. >> body-of context [a: 1 b: 2 c: 3] == [a: 1 b: 2 c: 3] >> find body-of context [a: 1 b: 2 c: 3] 'b == none >> find body-of context [a: 1 b: 2 c: 3] [b:] == [b: 2 c: 3] | |
BrianH: 12-Apr-2011 | I can't backport the FIND changes in R3 without breaking compatibility, so it's going to be a standing difference in the future. | |
BrianH: 12-Apr-2011 | Jack, it is not a good idea to use the ordinal reflectors (third object and such) unless you need to run on an old version of R2 (pre-2.7.7 with R2/Forward not loaded). It makes your code harder to read, and less forwards compatible with R3. | |
JosDuchIt: 22-May-2011 | How can i write a message larger than one line? | |
Henrik: 22-May-2011 | I don't think it can be used. It will probably be a while before the Amiga version resumes, as Carl, the main developer, is taking a break to work on other projects. We need some more development on the core of R3 before it can continue. | |
JosDuchIt: 22-May-2011 | Can i use a bigger font? I can't reach the resize button to reduce the window somewhatt. How can this be done? Is it possible to do a search in a group or the whole of ta world? | |
JosDuchIt: 22-May-2011 | Ther is no visible effect. When moving the window around, it seems to come back to its position. At least i have 3 empty lines to start a message with now. lI find it sore on the eyes though when typing messages lionger than 3 lines Remember the search question? | |
JosDuchIt: 22-May-2011 | Dragging the little white ridge allowed me to have 3 lblank lines visible gto start with. No setting to have a larger number of empty lines? Searching is OK, thanks; I did discover the help info for the other buttons; Nice too |
33301 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 332 | 333 | [334] | 335 | 336 | ... | 643 | 644 | 645 | 646 | 647 |