World: r3wp
[I'm new] Ask any question, and a helpful person will try to answer.
older newer | first last |
BrianH 29-Nov-2010 [4015] | When you know what it is referring to it sounds weird in English too. It means that bindings are set at function, object or module definition time (ignoring explicit binding). |
Steeve 29-Nov-2010 [4016] | It should underline that the programmer choose the moment when the binding is processed |
BrianH 29-Nov-2010 [4017] | Perhaps "redefinitonal binding" would be more accurate, but it doesn't sound as cool. |
Steeve 29-Nov-2010 [4018] | Undefinitional binding - meaning it's not bound until you define it |
Ladislav 29-Nov-2010 [4019] | ...but that is not true, in fact |
Steeve 29-Nov-2010 [4020] | yeah there is a default binding during the loading,; I forgot... |
Ladislav 29-Nov-2010 [4021] | yes, that is the problem, as well, as the problem of a function inside a function, etc. |
BrianH 29-Nov-2010 [4022] | The important process to make people understand is how lexical binding is faked by rebinding code over and over again as more nested contexts are defined. |
Steeve 29-Nov-2010 [4023] | infinite binding ? |
BrianH 29-Nov-2010 [4024] | It is really quite similar to what a compiler for a language with lexical scoping does internally, but we do it at runtime instead. |
Steeve 29-Nov-2010 [4025x2] | boundless binding :-) |
Nested binding, it's my last proposal I go to bed Bye Folks | |
Ladislav 29-Nov-2010 [4027] | Me too, good night |
mhinson 22-Dec-2010 [4028x2] | 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. |
oops | |
Gregg 22-Dec-2010 [4030x3] | I haven't looked at that in a looooooong time. I hope someone else can chime in and help. |
Can you post what you're doing now, that isn't working? | |
e.g. are you using INSERT on the port? | |
Steeve 22-Dec-2010 [4033] | May the commands be terminated with crlf |
mhinson 22-Dec-2010 [4034] | 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 [4035] | I was confused by the insert function in the telnet scheme vs the use of INSERT in rebol but I have discovered that insert port "username" does what I was trying to do, looks like I need to sort out the crlf issues but I think I am getting somewhere with it now. I am also unable to identify the method to disconnect, the telnet RFC mentions an "Interrupt Process" code 244, bit I dont see that implimented in the code.. Thanks. |
Gregg 23-Dec-2010 [4036] | Sounds like you're getting started Mike. Read the Core docs on ports, though I don't know how the telnet scheme maps certain things. Basically know that you can use READ and WRITE as high level ops on HTTP ports, but you may need to use lower level calls like INSERT and COPY to write and read data, and UPDATE may be needed as well in some cases. |
mhinson 23-Dec-2010 [4037] | 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? |
GrahamC 23-Dec-2010 [4038] | It will be one of those DIY things i suspect |
nve 25-Dec-2010 [4039] | 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 [4040] | Hu ? Just download a free one |
GrahamC 25-Dec-2010 [4041x2] | use Cheyenne |
which is also free :) | |
alemar 18-Jan-2011 [4043] | 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 [4044x2] | welcome to REBOL Martin , C++ to REBOL is probably the biggest jump you can make, but I'm sure you'll see the light in the end ;-) If your feel like REBOL is breaking the rules (those which you are used to in other languages), in fact see it more like, there are much *less* rules in REBOL. although this freedom is dauting at first, I hope you'll come to appreciate it. |
I'll give you a convertion in a few secs... | |
Henrik 18-Jan-2011 [4046] | welcome to REBOL :-) |
alemar 18-Jan-2011 [4047x4] | wow thanks alot maxim that would really help me get my act together it`s just that basic flow control and inputs are my weacknesses in this langueage |
oh and oops the code does: 1+2^2+3^2+...+n^2 | |
yeah my bad :D | |
thanks for the worm welcome | |
Maxim 18-Jan-2011 [4051] | yea.. hehe I was wondering ;-) |
alemar 18-Jan-2011 [4052] | well copying from linux does that to you |
Maxim 18-Jan-2011 [4053] | in the above you use cin ... do you expect the input to be piped ? |
alemar 18-Jan-2011 [4054x3] | piped? |
basically c input | |
it inputs a vallue for a varriable | |
Maxim 18-Jan-2011 [4057] | ok. |
alemar 18-Jan-2011 [4058] | this >> is input and << is output |
Maxim 18-Jan-2011 [4059x2] | yeah.. I don't use the C++ console ops a lot, I do C mainly. |
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 [4061] | basically when you have cin>>n it awaits a vallue to be inputted in the console window |
Maxim 18-Jan-2011 [4062] | rebol returns 0 by default when you are the end of a script... so no need to add it at the end. |
alemar 18-Jan-2011 [4063x2] | aha |
ok so i just dont understand 2 lines of the code | |
older newer | first last |