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: 45501 end: 45600]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
Steeve: 28-Aug-2009 | i use /part a lot, for example when i want to to find something in the first line of a text. >> find/part text "something" any [find text newline tail text] | |
Sunanda: 28-Aug-2009 | Looks like its a RAMBO report then, rather than curecode :) | |
james_nak: 28-Aug-2009 | Bind. I often use blocks of field (column) names from a db table in functions. Trouble is when I add a field I have to go back and add that field name to every place where I am using my fields. I was thinking of just creating a block at the beginning of my code and then using "bind" to create a local context. I just can't seem to make it local. It behaves as a global. Is there some trick? | |
Steeve: 28-Aug-2009 | columns: [a b c d e f] >> c1: use columns copy/deep reduce [columns] == [a b c d e f] >> c2: use columns copy/deep reduce [columns] == [a b c d e f] >> set c1 1 == 1 >> set c2 2 == 2 >> reduce c1 == [1 1 1 1 1 1] >> reduce c2 == [2 2 2 2 2 2] >> c1 == [a b c d e f] >> c2 == [a b c d e f] C1 and C2 are locals | |
james_nak: 28-Aug-2009 | Thank you Steeve. Never used "use" before and Bindology 101 was like Bindology 596 for me. :-) (no offense Ladislav ) Thanks. I also didn't know you could set all the members of a block like that. Appreciate your help. | |
Graham: 28-Aug-2009 | James, in my functions that fetch sql data I just setup all the variables as local and do a set on the record eg. func: [ get-sql /local name dob address ][ foreach record records copy db-port [ set [ name dob address ] record ] ] | |
Graham: 28-Aug-2009 | ooops .. need a reduce in there .. but you get the idea. | |
james_nak: 28-Aug-2009 | And so I was looking for a global way without the global (if you know what I mean) | |
Graham: 28-Aug-2009 | well, you can create a context inside your functions | |
james_nak: 28-Aug-2009 | Looking at "bind" it appears it should work. It even describes an example which is what I want to do: Binds meaning to words in a block. That is, it gives words a context in which they can be interpreted. This allows blocks to be exchanged between different contexts, which permits their words to be understood. For instance a function may want to treat words in a global database as being local to that function. | |
Graham: 28-Aug-2009 | I'll give it a go. | |
Graham: 1-Sep-2009 | Just wondering what it takes to write a "printer driver". If I pretend to be a network printer listening on port 9100 ... can I just capture all the data coming to me or do I have to respond to interrogation as well? | |
sqlab: 1-Sep-2009 | http://tools.ietf.org/html/rfc1179 I remember that I did once a rudimentary lpd/lpr, but i forgot on which pc | |
Geomol: 1-Sep-2009 | Graham, because we can write to a printer with: | |
Geomol: 1-Sep-2009 | write tcp://<ip-number>:9100 <some data> it should be straight forward to act as a printer listening on port 9100. | |
Graham: 1-Sep-2009 | Since you can dump to a port on a jet print server on port 9100 ... I assumed it was dumb. | |
Graham: 1-Sep-2009 | Yes, that's how I do it now .. I just write to port 9100 to print PS on a network printer. | |
Graham: 1-Sep-2009 | so if I have a daemon listening on port 9100 will windows recognise it as a IP printer?? | |
Graham: 1-Sep-2009 | basically the idea is to try and write a fax driver by acting as a printer port, and then sending the print to an internet fax. | |
Dockimbel: 1-Sep-2009 | Ah, good idea...a virtual printer in REBOL! That would make a nice framework if you can expose a simple API. | |
Graham: 1-Sep-2009 | I was just thinking that as soon as the driver receives a file, just popup a requester asking where to send it to .... | |
Graham: 1-Sep-2009 | and pehaps a simple address book. | |
Graham: 1-Sep-2009 | Cyphre's systray code could come in useful into making this a systray application | |
Graham: 7-Sep-2009 | Any value in a function that swaps the values of two variables? a: 1 b: 2 swap a b b => 1, a => 2 | |
BrianH: 7-Sep-2009 | a: also b b: a | |
BrianH: 7-Sep-2009 | In R3: >> help swap USAGE: SWAP series1 series2 DESCRIPTION: Swaps elements of a series. (Modifies) SWAP is an action value. ARGUMENTS: series1 (series! gob!) series2 (series! gob!) >> swap a: "abc" skip a 2 a == "cba" | |
Geomol: 8-Sep-2009 | Or we can do this: set [a b] reduce [b a] | |
Graham: 8-Sep-2009 | for english speaking countries, is it a reasonable assumption that if you have a negative timezone you use mm/dd/yyyy but if you're not negative, you use dd/mm/yyyy ? | |
Geomol: 8-Sep-2009 | Graham, write a format-date function, that also take country code as input and produce the correct viewing format for a date. Then upload it to the library. | |
Steeve: 8-Sep-2009 | hum, didin't check if month is a number before swapping it... Anyway, you see you don't need to make complex parse rules | |
Steeve: 8-Sep-2009 | and replace >> integer? attempt [first to block! trial/2] by >> attempt [to integer! trial/2] Optimizations are a never ending task with Rebol ;-) | |
Steeve: 8-Sep-2009 | ahah, a pain in the ass | |
Graham: 8-Sep-2009 | What I need is a utility that will take a rebol script, and parse it out by function, attempting to intepret it until it reaches an error. | |
Henrik: 8-Sep-2009 | We could use a static analyzer, like LLVM has: http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/9 | |
BrianH: 8-Sep-2009 | I use bracket matching in Notepad++, and a little patience. Still slow, but not that slow. | |
Graham: 8-Sep-2009 | shall I send you a picture of me tearing my hair out?? | |
Graham: 8-Sep-2009 | help the visualization process a little | |
BrianH: 8-Sep-2009 | (sorry, I'm having a typo day) | |
Graham: 8-Sep-2009 | Actually Henrik, it is composed of 1000s of nodes of small amounts of code .. which is reassembled to the final source. But I don't have a way of syntax checking each node. | |
Graham: 8-Sep-2009 | I get a stack overflow when I run the source from the interpreter | |
Anton: 8-Sep-2009 | You mean, from the rebol console, you >> do %synapse.r and you always get a stack overflow (not just when you have a bug like this)? | |
Anton: 8-Sep-2009 | Really? How does that cause a stack overflow? | |
Graham: 8-Sep-2009 | I redefine 'now to use real time taken from a NIST server | |
Anton: 8-Sep-2009 | How fast is encap with a file that large? Does it deliver the error message immediately? | |
Sunanda: 8-Sep-2009 | <What I need is a utility that will take a rebol script, and parse it out by function, attempting to intepret it until it reaches an error.> I think there was one in the Official Guide (the book). | |
Graham: 8-Sep-2009 | heh... I never got past the first chapter. After that I used it as a bookend. | |
Ashley: 10-Sep-2009 | Mostly around driver letter and slash direction handling. I suppose the question then is, why doesn't to file! do what to-rebol-file does ... I don't see the point in using to-file to create an "invalid" file ... a bit like having both a to-decimal and to-rebol-decimal for example. | |
Ashley: 10-Sep-2009 | Uh? All the to-* datatype conversion functions are implicitly to-rebol-* ... why the need for a to-file that can produce "invalid" rebol file types and to-rebol-file that produces "valid" rebol file types? I'm looking for the reason/case where you would want to use to-file in preference to to-rebol-file. | |
BrianH: 10-Sep-2009 | The file! type is just a datatype. There's no guarantee that the file! refers to anything, or is even the right syntax. | |
Izkata: 10-Sep-2009 | to-rebol-file and to-local-file are more like a pair, too. The other to-* are their own set. For a new user, it seems more obvious that to-rebol-file and to-local-file would go together, I think. | |
RobertS: 16-Sep-2009 | Could I ask why rebzip.r will only unzip a gzip if the console is launched from rebview ( in this case 2.7.6) but not from rebcore? thanks | |
Maxim: 17-Sep-2009 | anyone know of a way to get a persistent value based on someone's computer... the longer the string the better... (on windows) this is with a /command license, so any accessible rebol feature is usable. something like: -System install serial number -Disk serial number -CPU id I want to generate an encryption key which isn't stored as part of the code. It just makes it a bit more complicated to reverse engineer the stored password if the encryption key is different for all installations. | |
Pekr: 17-Sep-2009 | I am not sure get-modes gets you a mac address .... | |
Pekr: 17-Sep-2009 | you can as well use some power of command line - parse results of commands like ipconfig, arp -a, etc. | |
Maxim: 17-Sep-2009 | ahh. yes... doing a dir returns the volume name and serial number in one shot :-) perfect. | |
Maxim: 17-Sep-2009 | btw, thanks pekr don't know why I didn't of such a simple solution.... to much PITL dev I guess ;-) | |
Gabriele: 19-Sep-2009 | max, it always scares me when people think that obscurity is a form of security... | |
Maxim: 19-Sep-2009 | the idea is for the encryption key to a stored password is created dynamically via an algorythm. If the software is encapped, then its a pretty safe system IMHO. But if the software stays open source (and interpreted), at least I can use some natives for which the key-gen algorythm is hard to reverse engineer. Although someone with rebol know-how can obviously get the passwd by running the algorythm manually, there is no way around this AFAIK. | |
Gabriele: 20-Sep-2009 | There is no way to protect a password you are saving. Normally, you just want to obfuscate it so that it does not jump to the eyes when someone is looking. | |
Maxim: 20-Sep-2009 | but that is true of all passwords on a computer even login passwds. | |
Gabriele: 20-Sep-2009 | the only way to keep a password secret if your files are accessible to other people is to not store it into a file. | |
Maxim: 20-Sep-2009 | I have a record right now of 67 passwords I have to remember... I mean I can't remember all of them. | |
Gabriele: 20-Sep-2009 | I do remember dozens of passwords, but this is not the point. Now you're talking about a different thing, which is a password manager. | |
Gabriele: 20-Sep-2009 | A password manager encrypts all your passwords using a single password that you have to remember. so you remember just one. | |
Gabriele: 20-Sep-2009 | And, this is not a problem that *your* app has to solve. It is just wasted time for you. Either you make use of a password manager, or just use obfuscation. | |
Gabriele: 20-Sep-2009 | I'd just use encloak with some random text. If you think it's easy enough to get a system specific key, you might do that, but I don't know if users will be happy to find out that their passwords don't work anymore when they upgrade their PC or move to another computer. | |
Maxim: 20-Sep-2009 | its for a client app... so its not a big issue... its only so the software remembers the login for subsequent calls to the server... just like all the browsers & OS "do you want xxxxxx to remember this password" | |
Gabriele: 20-Sep-2009 | Right, and do you think that the browsers are secure, or use a secret algorithm for that? :) | |
Maxim: 20-Sep-2009 | its a choice I make. and I know every single piece of data on my computer is vulnerable. | |
Gabriele: 20-Sep-2009 | I'm saying that it's a waste of time to try to make it "more secure" | |
Gabriele: 20-Sep-2009 | is the client paying you to use a machine specific id and some secret encryption scheme? | |
Maxim: 20-Sep-2009 | he'll want the stored password toat least require effort and thus a real cracker to break the binary. this feature will be added later, if ever, it wont for initial public release specifically for the reasons you talk about and which I already had the same conclusions. | |
BrianH: 30-Sep-2009 | Then your second method is best, unless you are on a UNC path, then try this: copy/part find/tail next what-dir "/" | |
BrianH: 30-Sep-2009 | I use it a lot :) | |
Graham: 30-Sep-2009 | on a web server? | |
Henrik: 4-Oct-2009 | Ratio is giving me good opportunities to sharpen my skills. While writing a post, I bumped into this: http://www.rebol.org/view-script.r?script=substr.r What do you think? :-) | |
Graham: 8-Oct-2009 | Don't you think this is a little inconsistent? >> a: "" == "" >> a/1 == none >> last a ** Script Error: Out of range or past end ** Near: last a >> | |
BrianH: 8-Oct-2009 | >> a: "" == "" >> a/1 == none >> last a == none | |
Will: 15-Oct-2009 | SYSTEM/SCHEMES/FTP/PASS is a none of value: none set-net ['abc] ? system/schemes/ftp/pass SYSTEM/SCHEMES/FTP/PASS is a string of value: "abc" | |
Will: 15-Oct-2009 | the documentation says "The first value is your email address and it is used when sending email and connecting to FTP. This value is stored in the REBOL system object at: SYSTEM/USER/EMAIL". I don't think it's a good idea that the ftp password will be set to the email address as well, "used when connecting to FTP" maybe it should set the user instead | |
Maxim: 17-Oct-2009 | I am having a very hard time build a low-level function which reduces only bound words. | |
Maxim: 17-Oct-2009 | the bound? function is useless, it returns the global context when it hits a new word, cause it defines the word as it scans it. | |
Maxim: 17-Oct-2009 | false == (some magic trick) first load "[any]" true == (same magic trick) first append [] in system/words 'any the first is just an unbound word, using the string just makes this explicit beyond doubt. the second is the actual word func. added to a block. | |
Steeve: 17-Oct-2009 | you mea, you want to construct a block with ANY unbound to a context ? | |
Maxim: 17-Oct-2009 | >> value? first to-block "[any {a}]" == true | |
Steeve: 17-Oct-2009 | >> value? first to-block "any {a}" == false | |
Steeve: 17-Oct-2009 | So, do a double first >> value? first first to-block "[any {a}]" == false | |
Pekr: 17-Oct-2009 | and? 'any is a word. It surely does not have a value. What are you wondering about? | |
Steeve: 17-Oct-2009 | In the old past days, to-block "[any]" was returning only one block. It's returning a double block since some versions, never understood the interest of such change. >> to-block "[any]" == [[any]] | |
Steeve: 17-Oct-2009 | well, just bind yout rules in a specific context. con: context [ any: 'any some: 'some opt: 'op ... ] | |
Maxim: 17-Oct-2009 | so what I'll do is follow parse's functioning. if a word maps to a function or a native, ignore it... I know my rules don't bind functions, cause they'd fail anyways. | |
BrianH: 17-Oct-2009 | Maxim, BOUND? doesn't bind words to the global context - that was done by LOAD. Try this: >> bound? first to-block "a" == none | |
BrianH: 17-Oct-2009 | That was one of the first things changed in R3. If need be you write your own loader for R2 that uses TO-BLOCK and then does the binding itself - LOAD in R3 is a mezzanine that does the same. | |
Graham: 23-Oct-2009 | I can change the second component of a time! but now when it is part of date! ??? | |
Maxim: 23-Oct-2009 | once you use d/time, its a new value of type time! | |
Graham: 23-Oct-2009 | I'm accessing a time value .. not a date value | |
Maxim: 23-Oct-2009 | date is a point in time... time is an amount of time... they aren't the same thing. you can have time values with 50 hours in them, but you can't have 50 hour days. | |
Maxim: 23-Oct-2009 | but I would like to be able to interact with the time within a date directly anyways myself. | |
Maxim: 23-Oct-2009 | yep. it might already be there as a request. | |
Maxim: 23-Oct-2009 | the issue probably is that if you did date/hours: 50 its a logic error. so how is it resolved? ... an error... add two days, two hours? |
45501 / 64608 | 1 | 2 | 3 | 4 | 5 | ... | 454 | 455 | [456] | 457 | 458 | ... | 643 | 644 | 645 | 646 | 647 |