World: r3wp
[Core] Discuss core issues
older newer | first last |
Anton 28-Apr-2006 [4185] | Yes, I find all those interspersed concatenation operators tiresome and ugly. |
Terry 28-Apr-2006 [4186] | 'rejoin' sounds like it was already joined once |
Anton 28-Apr-2006 [4187] | uhuh. |
eFishAnt 28-Apr-2006 [4188] | If I knew nothing if programming languages, I would think "a" + "b" = "c" ;-) |
Pekr 28-Apr-2006 [4189] | when I first met programming language - basic on 8 bit home computer, I could not get how A = A + 1 can be valid :-) |
eFishAnt 28-Apr-2006 [4190x2] | to try to patch ubuntu REBOL/Core today for serial ports, I did: reb-orig: read/binary %rebol replace/case reb-orig "ttyC0" "ttyc0" write/binary %rebol-patched reb-orig ...but when I try to run the patched binary it gives some crazy line errors. I differenced the two executibles in REBOL and got some crazy differences more than just what I thought I was changing. |
(2 of my computers died, so I don't have the hex-edit.r of Ryans...so was seeing if I could just patch the binary with REBOL itself. Perhaps the replace by strings did some inherent conversion of the REBOL executible...not sure. | |
Maxim 28-Apr-2006 [4192] | you might want to count how many there are first? if only a few, maybe replacing one at a time will end up working? |
JaimeVargas 28-Apr-2006 [4193] | I think there is a way to specify your serial ports. I don't remember how. I but I have done it the past. I should search my files. |
eFishAnt 28-Apr-2006 [4194] | If anyone has hex-edit.r and could post to library...or link...it would be appreciated. I didn't plan to have my computers down. It is IOS/Developer/Users/Ryan-Cole/Utilities ... IIRC |
JaimeVargas 28-Apr-2006 [4195x4] | Have you tried this? |
append System/ports/serial 'ttyc0 | |
port: open serial://port3/9600/8/none/1 | |
This way you don't need to modify the binary et all. | |
Gregg 28-Apr-2006 [4199] | Hi Jerry, "I know that we can use the JOIN function, but a + operator for string would be nice too. Why doesn't REBOL do so?" Do you think it would be nice because it's more readable, or because it's familiar to people coming from languages that have it? I came to REBOL with a long BASIC history, and it didn't take me long before I didn't miss + for concatenation at all. + is really a math op; I like REBOL's consistency, and I like the way REBOL concat code reads. |
eFishAnt 29-Apr-2006 [4200x3] | Jaime...thanks, but I get the same error ... Access Error: cannot open ttyc0 |
ttyc0 is actually there, and ttyC0 is not (in the /dev directory) and I have tried root and normal passwords. | |
but I am running AltME on ubuntu now. | |
Gabriele 29-Apr-2006 [4203] | did you try with ttyc1 etc as well? ttys0? |
Edgar 29-Apr-2006 [4204x5] | Why won't you just copy ttyc0 to ttyC0 so you will have both versions? |
Never mind. That doesn't seem to work. | |
Try this: | |
system/ports/serial: [ttyS1] | |
port: open serial://port1/9600 | |
JaimeVargas 29-Apr-2006 [4209] | Steve, Regarding "access error" are you sure you have enough user rights? |
eFishAnt 29-Apr-2006 [4210x3] | I tried logged on as root and as normal user, both give the same error. |
Edgar...that WORKED!...yahoo! | |
still need to test with the devices...(so how did you ever figure that out? | |
Edgar 29-Apr-2006 [4213x2] | Search the net for normal C-serial port access. |
Linux uses ttySx and Cygwin uses comx. | |
eFishAnt 29-Apr-2006 [4215x2] | now the whole controller can be done in REBOL. |
Are you from Italy? | |
Edgar 29-Apr-2006 [4217] | No, I am from LA. |
eFishAnt 29-Apr-2006 [4218] | you city's name can be juggled to "Legs On Sale" |
Edgar 29-Apr-2006 [4219x2] | I was experimenting with CoLinux. Got tired of DualBoot. |
Actually my City is Norwalk but LA is more known. | |
eFishAnt 29-Apr-2006 [4221] | well, thank you very much...this is very exciting. I had tried ttys0 but never thought to try ttyS0, since in /dev it is ttys0 |
Robert 30-Apr-2006 [4222x10] | Hi, I need some help with BIND (I think that's what I need to use): I have a storage context, that has a bunch of function to handle the storage of other contexts. That those storage functions can work, they need to have access to the other context. I could do: storage/save-record context-to-save ... |
but I would like to do: context-to-save/save-record. | |
and avoid dubplicating the storage code in every context, or write stub-functions that reference the storage stuff. | |
Is it possible to bind the storage functions dynamically to the context that should be saved and switch this binding in the app depending on which context should be stored? | |
In other languages this is called delegates (IIRC). | |
Example: context A [a: 1 b: 2 c:3 list-words: none] context storage [list-words: does [probe first self]] | |
How can I execute storage/list-words in the context of A? So that I get back [a b c list-words] | |
I think I need to switch the way it works: do bind [first object] storage | |
Is this the correct way? | |
no it isn't... | |
Anton 30-Apr-2006 [4232x2] | >> c1: context [a: b: none] >> c2: context [a: b: none] >> do bind [a: 1 b: 2] c1 == 2 >> probe c1 make object! [ a: 1 b: 2 ] >> do bind [a: 100 b: 200] c2 == 200 >> probe c2 make object! [ a: 100 b: 200 ] |
Oh sorry, you specifically want to bind a function's body to the context. Let's see, I think this will work: bind second get in storage 'list-words A storage/list-words | |
Robert 30-Apr-2006 [4234] | What's this SECOND about? |
older newer | first last |