World: r3wp
[Core] Discuss core issues
older newer | first last |
Gabriele 29-Nov-2005 [2866] | >> word: to lit-word! 'literal == 'literal >> parse [literal] [word] == true |
Henrik 29-Nov-2005 [2867x2] | lots of different solutions to my problem... thanks everyone :-) |
a comment on ATTEMPT. I think it's a wonderful function, but don't overuse it because it can make your code hard to debug when nothing happens where there should be an error. | |
DideC 29-Nov-2005 [2869] | true |
Volker 29-Nov-2005 [2870] | i only use it for single calls. |
Anton 30-Nov-2005 [2871] | Steve, when it comes to SIXTH, I wouldn't worry too much. |
Graham 30-Nov-2005 [2872] | Is there a way to set and read windows environmental variables ? |
Pekr 30-Nov-2005 [2873] | 'get-env ? |
Graham 30-Nov-2005 [2874x3] | thanks. |
Does it work ? | |
works with "path" .. | |
Chris 30-Nov-2005 [2877x2] | env |
'scuse me... | |
Graham 30-Nov-2005 [2879] | Perhaps I need to reboot for rebol to pick up user env variables ? |
Gabriele 1-Dec-2005 [2880] | >> get-env "APPDATA" == {C:\Documents and Settings\Gabriele Santilli\Dati applicazioni} |
Graham 1-Dec-2005 [2881] | I had to reboot for this to work. |
Anton 2-Dec-2005 [2882x2] | You mean, you set a new user env variable, and rebol wasn't able to pick it up straight away ? |
logout and login probably sufficient | |
Graham 2-Dec-2005 [2884] | didn't try that ... |
RobertDumond 2-Dec-2005 [2885] | i'm running into a strange issue with the prerebolizer... it is taking a part of one line from my main rebol file and then a few blocks of another rebol file and overwriting another seemingly random rebol file with this data... has anyone run into this problem or have any idea what could be causing the problem? i am using Preprossor 2.0.0 |
Gregg 5-Dec-2005 [2886] | I haven't seen that Robert. Can you narrow it down to a very small example? |
Henrik 6-Dec-2005 [2887x2] | >> o: make object! [time: does [now]] >> third o == [time: func [][now]] >> reduce third o == [7-Dec-2005/3:23:23+1:00] >> third o == [time: 7-Dec-2005/3:23:23+1:00] >> o: make object! [time: does [now]] >> third o == [time: func [][now]] >> reduce copy/deep third o == [7-Dec-2005/3:25+1:00] >> third o == [time: 7-Dec-2005/3:25+1:00] Why is the block not copied? |
ah, using GET instead of THIRD allows me to copy it | |
Pekr 7-Dec-2005 [2889x3] | I have one question regarding security - can actually rebol words be secured/protected? I noticed, when looking at get-net-info and trying to execute it, that get-reg is probably being unset internally after get-net-info gets executed. Isn't it sign rebol's security model is not sufficient? |
I am not trying to say that we need modules, but I would like to know your opinion? Can some rebol word/value be really protected? We have 'unprotect available, so actually what is 'protect good for? | |
can I e.g. create word in context, which would be visible only in terms of such context? Being it value, function, whatever, prevented to be outputted by 'get, 'probe, 'print, 'source and other functions? | |
Gabriele 7-Dec-2005 [2892] | Henrik: what happens there is that the word TIME is set to the result of the function. |
Volker 7-Dec-2005 [2893] | AFAIK not. 'protect is for debugging AFAIK. But i can work secure if you use 'secure. The way is, as long as i dont touch user-data, i am secure. Thats why rebol has get-reg on startup, no user-code loaded, no harm possible. Before i touch user-code (or data), i tighten security as much as possible. unset dangerous words (if i am paranoid i disable "make struct!". I use secure to restrict file-access only where needed, disable shell and library, maybe network-access. A script/bug can not undo this things, and IMHO that is quite secure. |
Gabriele 7-Dec-2005 [2894] | Petr: you're not talking about security, you're talking about encapsulation, i.e. making parts of your code unaccessible from other code. |
Volker 7-Dec-2005 [2895] | Henrik, copy/deep does not copy functions. and you have a function here, try mold/all instead of probe. |
Gabriele 7-Dec-2005 [2896x2] | volker: it's just that TIME is bound to the object, and he's changing its value to that date... |
so even if copy/deep copied functions, he'd still get that result above. | |
Volker 7-Dec-2005 [2898] | Got it. was to hastily. good riddle :) |
Henrik 7-Dec-2005 [2899] | volker, I don't get what serialization with mold/all does? |
Volker 7-Dec-2005 [2900] | i misunderstood, you can ignore that. mold molds functions like their sourcecode. mold/all molds functions specially, so that you see what a function and what only source is. Thought that would give a hint to the problem. |
Henrik 7-Dec-2005 [2901x2] | I don't think it's useful to solve my problem, but very interesting anyway, so I asked :-) |
I'm actually looking for a way to get input data as a block: [a: 1 b: 2 c: 3] made into an object which is: make object! [a: b: none c: does [something to make the c value]] so I would get an object like this: make object! [a: 1 b: 2 c: <return value from object function>] | |
Pekr 7-Dec-2005 [2903] | Gabriele - encapsulation is kind of security. And in fact, if some code is encapsulated, or not being able to be called from outside of some context, it is kind of secure |
Gabriele 8-Dec-2005 [2904] | yes, but that is another level of security, where you trust some modules of a script but not others. i guess that will come with REBOL 3 |
Pekr 8-Dec-2005 [2905] | Interesting question on ml: join 'a 'b == "ab" type? join 'a 'b == string! Is that correct? Should not be a word instead? |
Chris 8-Dec-2005 [2906x3] | My guess is that as word! values are not series! then join doesn't produce them... |
In the same way that, eg. >> join 1 2 == "12" | |
>> join true false == "truefalse" | |
Gordon 8-Dec-2005 [2909x2] | How do you include a space in a directory name for Request-file/file? |
Nevermind. It turns out that if you use FireName: to-file request-file/file "/C/Program Files/" that it will split the path and name at the space. OTOH if you use Filename: to-file request-file/file "/C/Program Files/*" (note character after the path) that this will work. The character after the path can be any character. | |
Louis 8-Dec-2005 [2911] | What is the correct code for ftp to a site when the user id is [john-:-smith]? |
Sunanda 8-Dec-2005 [2912] | Something like: read [scheme: 'ftp user: "[john-:-smith]" pass: "****" host: "_____"] |
Louis 8-Dec-2005 [2913] | Many thanks, Sunanda. My debt to you keeps piling up! |
Davide 9-Dec-2005 [2914x2] | Hi all, I'm trying to read from a newsserver, what's wrong ? >> p: open/lines tcp://news.aioe.org:119 >> first p == {200 aioe.org InterNetNews NNRP server INN 2.4.3 (20050923 snapshot) ready (posting ok).} >> insert p "LIST" >> first p ** Script Error: Out of range or past end ** Near: first p |
Every command that I send seems produce nothing: >> insert p "GROUP net.unix-wizards" >> print copy p none | |
older newer | first last |