AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 4382 |
r3wp | 44224 |
total: | 48606 |
results window for this page: [start: 7801 end: 7900]
world-name: r3wp
Group: Parse ... Discussion of PARSE dialect [web-public] | ||
Brock: 30-Jan-2005 | eFish... 1.2.40, also tried latest beta 1.2.57, and went back to 1.2.8 to see if it handled it any different. | |
Brock: 30-Jan-2005 | Tom: Yes, I was aware of read/lines and how it is similar (apparently not the same) as parse/all series "^/". read/lines worked just fine. I don't know why last night I wasn't happy with read/lines - must have been tired! | |
Graham: 30-Jan-2005 | and what do you do if the text is not a file ? Write your own parse rule. | |
Graham: 8-Mar-2005 | How do you break a parse rule and still have it be true ? | |
Graham: 10-Mar-2005 | Actually, what I was wondering was how to break out of an action in a rule and still let it return true | |
Graham: 12-Mar-2005 | I'm using these rules in my server side implemention to the top command one-line-rule: [copy line thru {^/} ( if line = ".^/" [ line: join "." line ] write-client line)] header-rule: [copy header thru {^/^/} (write-client header write-client )] msg is the email message including header and body lines is the number of lines requested by the TOP command parse msg compose [ header-rule (lines) one-line-rule ] Now, I can't check the parse syntax as rebol.com is down, but I seem to always get the whole email with my header-rule and not just the header. | |
Brett: 13-Mar-2005 | Graham, I'd probably use parse/all rather than parse. Also don't forget the parse-header function and all the associated bug fixing work related to it in view 1.3 project. May or may not be of use to you. | |
BrianW: 20-Mar-2005 | It wouldn't have to be industrial-strength, but it would like a security blanket for developers experimenting with the new language. PCRE is found all over the place in languages on Linux machines, and the absence makes some developers uncomfortable - despite the fact that Parse is better. | |
Tomc: 20-Mar-2005 | yea but then rebol programs would start getting comtaminated with unfriendly gobbeldy gook and rebol developers would have to learn pcre | |
BrianW: 20-Mar-2005 | What about a parse rule that takes pcre strings as input and produces a parse rule as output? | |
Tomc: 20-Mar-2005 | I am not totatly against REs I use them all the time in shells, and having them built in would make writing "work alike" programs easier but over all , it seems to me like a step down | |
Tomc: 20-Mar-2005 | I will be a few to make concreat but basicly you work with what is common to all lines , in this case colons and newlines | |
Tomc: 20-Mar-2005 | so once you have done some header-lines and got the ones you are interested in you skip the rest with thru "^/^/" | |
Graham: 20-Mar-2005 | actually, I copy the header and body out first and process them separately. | |
Tomc: 20-Mar-2005 | and if you had a header with a line that did not begin with 'Date, From, Subject or To then you could prematurely break out of header-rule before you got all your bits | |
Graham: 20-Mar-2005 | While we're here .. what this taint thing that Perl has, and is it a concern for Rebol ? | |
Tomc: 20-Mar-2005 | tainting forces you to consider the users input and explicitly allow it to pass | |
Vincent: 20-Mar-2005 | Graham: for your header, like Brett said, parse/all is needed when you work on strings with newlines and spaces. last line should be: parse/all header [header-rule some [ thru "^/" header-rule]] | |
Tomc: 20-Mar-2005 | and being very careful to never effectivly do [ user-input] without being sure user-input could not cause unintended side effectd | |
Robert: 6-Jun-2005 | I like CamelCase words. Simple to remember and use. IIRC camelCAse is not a valid CamelCase word. But anyway, it depends how I teach my users :-)) | |
Graham: 6-Jun-2005 | http://en.wikipedia.org/wiki/CamelCase... CamelCase is referred to UpperCamelCase, and camelCase is referred to as lowerCamelCase | |
Robert: 6-Jun-2005 | Tom, your example doesn't terminate, like mine. The thing IMO is that the last Word is a CamelCase word and the 'end condition is somehow missed. It nevery reaches the halt. | |
Tomc: 6-Jun-2005 | Robet you also have to worry about YaBaDaBaDoCamelCases (even and odd) to get it to return true , figure out what is left when the outter most some finishes. parse ...[ some [ ... ] copy remenant to end ( print remenant) ] then make the your rule cpnsume the remenant ok if you don't care just put a to end there | |
sqlab: 7-Jun-2005 | You can either put your parse in a catch [] and throw a true if not flowtext or something like this parse/all/case test-text [ some [ copy camelcase-word [upper-case some rest-chars upper-case any rest-chars] ( if not empty? text [?? text clear text] print ["CamelCase word found:" camelcase-word] ) | copy flowtext [some [rest-chars | upper-case] any delimiters] ( append text flowtext ) | copy flowtext [some delimiters] ( append text flowtext ) ] to end ] | |
Graham: 7-Jun-2005 | what you could do, is extract Didier's implementation of the TOP command, and then get the first line of each header in your mailbox. If it has the return-path set to <>, then note it in a list. When finished, go thru and issue deletes on all of those. | |
Robert: 8-Jun-2005 | Hmm... my parse still not termines the 'some part. I never reach the end. The problem is that the rest of the string is "" and this seems not to be handled. | |
MichaelAppelmans: 9-Jun-2005 | newby here: can anyone direct me to a sample of code which matches a pattern over multiple text lines? I need to process a 5MB text file and remove all patterns of multiple consecutive email address es eg. [foo-:-my-:-com]; [foou-:-you-:-net] except the multiple email address string spans mulitple lines. Thanks for any pointers | |
MichaelAppelmans: 9-Jun-2005 | and the multiple email address string occurs multiple times ;) | |
Brock: 9-Jun-2005 | Michael, this is going to be a very general response to your request. Review setting up parse rules and use something like... parse text any [rule1 | rule2 | rule3] | |
Brock: 9-Jun-2005 | Here's some Parse documentation from the Rebol/Core guide to get you started. Share your progress and questions, maybe a line of sample data or two and maybe I can be of more help. | |
Volker: 11-Jun-2005 | Sometimes it helps to parse in two steps. a loop for each line-group and parsing that group seperately. becaus ethen 'to/'thru work better. | |
MichaelB: 16-Jun-2005 | Can somebody explain me why 'parse fails in the first case and returns true in the second case ? r: [any into ['a (print 'a)]] t: [[a][a][a]] print parse t r -> a a a false r: [any [into ['a (print 'a)]]] print parse t r -> a a a true In the second 'r(ule) the additional [ ] make it kind of explicit, but shouldn't return the first version true as well ? Am I forgeting something what 'parse "thinks" when looking at the first 'r(ules) ? Thanks for hints. :-) | |
Pekr: 22-Jun-2005 | I have CSV file and I have trouble using parse one-liner. The case is, that I export tel. list from Lotus Notes, then I save it in Excel into .csv for rebol to run thru. I wanted to use: foreach line ln-tel-list [append result parse/all line ";"] ... and I expected all lines having 7 elements. However - once last column is missing, that row is incorrect, as rebol parse will not add empty "" at the end. That is imo a bug ... | |
Pekr: 22-Jun-2005 | I used csv = semicolon separated values and no quotes in-there ... | |
Pekr: 22-Jun-2005 | yes, it is, as I expect all lines having 7 elements ... once there is not such an element, I can't loop thru result ... well, one condition will probably solve it, but imo it is a gug .... rebol identifies ;; and puts "" inthere, but csv, at the end, will use "value;", and rebol does not count that ... | |
Pekr: 22-Jun-2005 | append/only will not help, result of parse will varry, and it should not ... | |
Gabriele: 22-Jun-2005 | append/only will, because pick returns none if a column is not present, and set works with that too | |
Pekr: 22-Jun-2005 | but I like to use flat structure and foreach [real name of vars here], so I need consistent record length :-) | |
Pekr: 22-Jun-2005 | oh no, I am at the ends ... so bye bye beautifull oneliners ... I just found item which contains set of quotes :-) rebol will not translate that and my block is confused once again :-) | |
Pekr: 22-Jun-2005 | damned, I will delete that contact and I will be done ;-) One contact from 3 000 does not count, even if that is secreatery of general director :-) | |
Chris: 6-Jul-2005 | How many possibilities are there for the values "team one" and "team two"? Could you use a team repository? -- | |
Rebolek: 3-Aug-2005 | Ingo I made simple test and it seems it's something like 512 | |
shadwolf: 13-Aug-2005 | I have some problems to translate RULE based on PERL regular expression to rebol parse rules. Maybe this group can help me. For example: PERL REGULAR EXPRESSION RULE: [[ c ]] (e|è|é|ê|i|î|y) -> s we need to match the #"c" char and test the next char to know if we trap S phonem. example "Ce" must be emited S et E. I plan to have 2 rules rule: [ .../... "c" etc... | "e" etc... ] More complicated rule: an [[ c ]] T -> like for "banc" | |
Volker: 13-Aug-2005 | you know p: and :p in parse-rules? | |
Graham: 13-Aug-2005 | and your code is mixing rebol code with the parse dialect. | |
Graham: 13-Aug-2005 | oops .. should be "2 skip" and not "skip 2" | |
BrianW: 13-Aug-2005 | That *is* a nice and easy solution, thanks a lot! | |
BrianW: 13-Aug-2005 | Working on a textile parser over here to build my 'parse skills and make it easier to build my website with Rebol | |
BrianW: 13-Aug-2005 | and all of my pages are already in textile format, and I think a few of my friends would be more interested in Rebol if I had a textile parser for them | |
shadwolf: 14-Aug-2005 | Volker thank you it works great now and the code rule is tiny ;) | |
Henrik: 18-Aug-2005 | you probably need to count them and see where you end up after finding all parens. I'm not sure if it can be used to see which are missing... | |
Henrik: 18-Aug-2005 | count one up on #"(" and one down on #")". If correct, the end result is zero. | |
BrianH: 22-Aug-2005 | You can make it a little more complicated to add more markup types, but the basic structure is the same. The trick is the :a before the paren - otherwise it won't work, and you can crash older versions of REBOL. | |
BrianW: 22-Aug-2005 | That works nicely too! I'll look more at NicomDoc later, but BrianH's tip makes tests for "*test*" and "*test" pass | |
BrianH: 22-Aug-2005 | No nesting, but with a little recursion and different start and end tags, this can be adapted to handle that too. | |
BrianH: 22-Aug-2005 | If you want to determine whether there have been any replacements, change the second any to some and parse will return true only when replacements have been made. Be careful to avois use of the markup characters in your replacement text. | |
BrianH: 22-Aug-2005 | Tomc, that will crash older versions of REBOL, and not work on newer versions. You need to reset the parse position to before the change, before the paren where you make the change. Otherwise parse will be referencing a point off the end of the string at the end of the paren, before you can reset it. This used to crash REBOL so bad the interpreter disappeared. | |
Tomc: 22-Aug-2005 | yes, shortening the string you are parsing would pull the rug out from under the interperter, (and I was aware that the string was being lengthened) note: setting the parse pointer back to :here will position you before the "*" you may be better off with :here skip to gaurentee progress in the case the change fails | |
BrianH: 22-Aug-2005 | OK, I tried this: parse "abc" [to "bc" a: "bc" (change/part a "b" 2)] It returns true on View 1.3 and Core 2.6, but false on View 1.2 and Core 2.5.0. | |
BrianH: 22-Aug-2005 | Here's a simplified version of my example that can handle multiple instances of multiple markup types and be adapted to different end tags (thanks Tomc for the idea!): markup-chars: charset "*~" non-markup: complement markup-chars tag1: ["*" "<strong>" "~" "<i>"] tag2: ["*" "</strong>" "~" "</i>"] parse/all data [ any non-markup any [ ; This next block can be generated if you have many markup types... [a: copy b "*" copy c to "*" copy d "*" e: | a: copy b "~" copy c to "~" copy d "~" e: ] :a (change/part a rejoin [tag1/:b c tag2/:d] e) any non-markup ] to end ] | |
Group: SDK ... [web-public] | ||
Ashley: 23-Feb-2005 | The intent of the licence is to prevent on-selling a REBOL-like took which does little more than expose the REBOL API. This is no different from other [commercial] programming languages where they don't want you buying a licence for $2,000 and then distributing essentially the same functionality (i.e. a language / compiler) for $5. An easy way to express this notion is: "You are not permitted to use this product to create a product that could be construed by a reasonable person to be the same or a derivative." Finding the reasonable person is the trick! ;) | |
Graham: 22-Mar-2005 | so even something as simple as <% print {hello %> kills rsp and subsequent rsp | |
[unknown: 5]: 1-Apr-2005 | I believe the icons are needed because I was experimenting with it and found without it I couldn't not get the results I wanted on XP. | |
Graham: 5-Apr-2005 | ie. this fails ... read what-dir and you have to read dirize what-dir instead? | |
Chris: 7-Apr-2005 | IconSushi. It's not so much an editor as a compiler, importing PNG (including 32-bit) and BMP... | |
Ashley: 7-Apr-2005 | Hmm, I tracked down pngcrush (http://sourceforge.net/project/showfiles.php?group_id=1689&package_id=6641), and while its usage seems clear enough: pngcrush.exe -bit_depth 4 24bit.png 4bit.png it dosen't seem to work. | |
Ashley: 7-Apr-2005 | Not quite the batch solution I had in mind, but MSPaint lets you save a PNG as a 4, 8 or 24 bit BMP ... which is good enough for IconSushi ... which works with good old ResHacker ... which lets me, wait for it, change the default REBOL icons in an encapped program ... and folks wonder why REBOL isn't mainstream yet! ;) (An "Encap: [icons %my-icons.ico]" type option would be a good thing IMHO). | |
Graham: 15-May-2005 | Has anyone seen his message before? I tried typing into a view application under windows 2000, and got this The ordinal 6467 could not be located in the dynamic link library MFC42.DLL | |
Group: DevCon2007 ... DevCon 2007 [web-public] | ||
Henrik: 10-May-2007 | 240 kb kernel... is this completely barebones and is this bigger or smaller than R2? | |
[unknown: 9]: 10-May-2007 | The idea is to open source a lot, and just keep the low level stuff closed, but RT will post something official. | |
Pekr: 10-May-2007 | so now Ruby can finally have their View clone? :-) They will take rebol.dll, create one function "do-rebol", and voila :-) | |
Pekr: 10-May-2007 | Gabriele - this is actually good, you know? First Ruby guys will think they got View for Ruby, next they will realise, they don't actually need Ruby, to just start and use Rebol, so they will drop Ruby :-) | |
Sunanda: 10-May-2007 | Henrik -- Maxim has mentioned your styles for Glayout several times, and demoed them. Said he was up at 04:00 last night, and it took him 20minutes to integrate your styles into Glayout. | |
Pekr: 10-May-2007 | along with coders like Anton, Volker and Henrik ... | |
Gabriele: 10-May-2007 | nah, we'll do our own thing and don't want external influences ;) | |
Will: 10-May-2007 | me for sure and I hope someone teach me surfing.. 8-) | |
Anton: 10-May-2007 | Carl's comments on merging of VID dialect and global namespace. It took me a long while to learn it, but I appreciate it more and more. | |
Sunanda: 10-May-2007 | Especially as lunch includes free wine and coffee :-) | |
[unknown: 9]: 10-May-2007 | Free wine?!? Don't let Carl near it, he will start comparing it to his own Vineyards...and it will be a 3-4 hour lunch! | |
Henrik: 10-May-2007 | and they'll all be drunk, which won't look good on the live stream | |
Anton: 10-May-2007 | obviously there must be a solution to this problem already, but I'm just thinking two mics, one soft, one loud, and a "compressor" box that selects the loudest signal which does not clip. | |
[unknown: 9]: 10-May-2007 | Also cuts down on pink noise and static. | |
[unknown: 9]: 10-May-2007 | It is pretty good given teh room (which is all walls and windows, not much to absorb sound) | |
[unknown: 9]: 10-May-2007 | So the mic is hot, and the room is hot TOO! | |
[unknown: 9]: 10-May-2007 | Yes, putting foam over the mic would help a little, but it would also mean that it would not work as well iat a distance. What you really want is a mic wired on the person (which has foam built in), and no mic on the room. | |
[unknown: 9]: 10-May-2007 | So you localize the sound and the source. | |
Anton: 10-May-2007 | I bought a really cheap mic recently - I think it was $3 - and the frequency range is abysmal. | |
[unknown: 9]: 10-May-2007 | Mics have dropped in price, just like optics for cameras...but $3 is still TOO CHEAP. Pay $50+ and you will get a good mic. I always trust Plantronics for headsets. | |
[unknown: 9]: 10-May-2007 | I have bougfht maybe several hundred mics and headsets over teh yers. | |
[unknown: 9]: 10-May-2007 | The ER 4 are pretty good. And I like traveling with them. | |
Henrik: 10-May-2007 | geomol, I just put the address into the URL in quicktime and it worked. | |
Ashley: 10-May-2007 | Watching this on Safari/Quicktime I get sound and a green image? | |
[unknown: 9]: 10-May-2007 | Best I can tell, if yoru CPU gets bogged with other stuff (opening other windwos, virus checkers, etc.) then it loses sync, and you have to refresh. | |
[unknown: 9]: 10-May-2007 | OK, I'm done looking at Richard and Gab, move 45' left. : ) | |
[unknown: 9]: 10-May-2007 | And that he has a name badge!!!! | |
Pekr: 10-May-2007 | Anton - me too - I sent google to Rebol.com and net and guessed, but no luck :-) | |
Gabriele: 10-May-2007 | ge ahead and try about the server | |
Anton: 10-May-2007 | I reloaded and it worked. | |
Gabriele: 10-May-2007 | (btw docbase is already running, as carl said this morning, and carl has been writing a lot of things in it.) | |
Maxim: 10-May-2007 | considers allowing object! to define the port handler... like a feel.. .MUCH easier to Tweak and scan handler |
7801 / 48606 | 1 | 2 | 3 | 4 | 5 | ... | 77 | 78 | [79] | 80 | 81 | ... | 483 | 484 | 485 | 486 | 487 |