
| # | User | Message | Date |
| 15441 | Steeve | hey ? | 13-Jan 14:26 |
| 15440 | Henrik | does anyone have a rebol based bracket checking tool? preferrably something that can be integrated into a diagnostic tool. | 13-Jan 13:52 |
| 15439 | WuJian | Good stufff | 9-Jan 12:47 |
| 15438 | Janko | as anyone tried to run cheyenne or rebol on sheevaplug ( http://www.globalscaletechnologies.com/t-sheevaplugdetails.aspx ) | 9-Jan 10:49 |
| 15437 | Henrik | rephrasing that: not "easiest way", but easiest to use in the end. | 9-Jan 8:27 |
| 15436 | Henrik | From all this, the easiest way would be to produce a dialect that does its own escaping, so you don't have to write JS at all. | 9-Jan 8:25 |
| 15435 | Terry | Steeve, it's cumbersome.. I spend more time joining and escaping than anything else. | 9-Jan 7:24 |
| 15434 | Terry | Should probably put this in rant.. but just spent the last hour wondering why my function wasn't working result: sofp 'firstname' the solution? change the single quotes to double.. aye carumba | 9-Jan 7:22 |
| 15433 | Steeve | I say it again, you didn't give us the real output. Doing some assumptions, i got this. varA: { \'hello\'s ^{Worlds \';} varB: { 'and ^{so "on'; } print rejoin [{<button onclick="alert('} varA {');">CLICK ME</button>} varB ] <button onclick="alert(' \'hello\'s {Worlds \';');">CLICK ME</button> 'and {so "on'; So where is the burden ? i don't see one | 9-Jan 0:19 |
| 15432 | Terry | via AJAX | 9-Jan 0:11 |
| 15431 | Terry | If it was a smple matter of replacing variables with values.. i have some °7° code that does that. The problem is well formed javascript to send back to the DOM. | 9-Jan 0:10 |
| 15430 | Terry | Although, i would be impressed if it didn't choke while trying to escape stuff. | 9-Jan 0:07 |
| 15429 | Gregg | I need a spec first. ;-) | 9-Jan 0:05 |
| 15428 | Gregg | Needs a different name too, as Ladislav has a nice BUILD func that works on blocks. | 9-Jan 0:04 |
| 15427 | Terry | Spend 6 :) | 9-Jan 0:04 |
| 15426 | Gregg | Well, what do you in five minutes? ;-) | 9-Jan 0:03 |
| 15425 | Steeve | yes seems a little messy Greg ;-) | 9-Jan 0:02 |
| 15424 | Gregg | Now, that's norribly naive, and doesn't work because of that. e.g. it needs a space before the $ marker, so a var at the beginning of the text gets missed. | 9-Jan 0:02 |
| 15423 | Gregg | build: func [ {Return text replacing $tags with their evaluated results.} content [string! file! url!] /quiet "Do not show errors in the output." /local out eval value ][ content: either string? content [copy content] [read content] out: make string! 126 eval: func [val /local tmp] [ either error? set/any 'tmp try [do val] [ if not quiet [ tmp: disarm :tmp append out reform ["***ERROR" tmp/id "in:" val] ] ] [ if not unset? get/any 'tmp [append out :tmp] ] ] parse/all content [ any [ end break | " $" [copy value to " " | copy value to end] (eval value) | copy value [to " $" | to end] (append out value) ] ] out ] | 9-Jan 0:01 |
| 15422 | Steeve | Terry, i don't think your output must be
{
\'hello\'s {Worlds \'; ...and prints... 'and {so "on'; } And yet, that's what you show us actually | 9-Jan 0:00 |
| 15421 | Gregg | There has been talk in the past of including a substituion function, REWORD being the R3 func for it. In R2 we have build-markup, which shouldn't be hard to hack, but I don't know of a version that anyone has done for a given substitution syntax. | 8-Jan 23:55 |
| 15420 | Terry | no comments.. that's functioning php.. and if you don't escape it, it doesn't function as JS | 8-Jan 23:55 |
| 15419 | Steeve | don't mess it with escaping characters or comments. | 8-Jan 23:53 |
| 15418 | Steeve | I just can't figure the exact string output you want. | 8-Jan 23:50 |
| 15417 | Terry | Show me the 'simpler way' | 8-Jan 23:39 |
| 15416 | Terry | um.. i don't think that was the point | 8-Jan 23:39 |
| 15415 | Steeve | I see nothing you can't do with rebol, so what ? | 8-Jan 23:06 |
| 15414 | Terry | so.. the result is a button that alerts.. \'hello\'s {Worlds \'; ...and prints... 'and {so "on'; after the button | 8-Jan 22:39 |
| 15413 | Terry | (output is JS) | 8-Jan 22:37 |
| 15412 | Terry | <<< is a here-doc in php | 8-Jan 22:37 |
| 15411 | Terry | $varA =<<<VA
\'hello\'s {Worlds \';
VA; $varB =<<<VB 'and {so "on'; VB; $n=<<<HD <button onclick="alert('$varA ');">CLICK ME</button> $varB HD; echo $n; | 8-Jan 22:36 |
| 15410 | Claude | terry: var={coucou} print rejoin [{hello + } var { ŕ vous}] | 8-Jan 22:03 |
| 15409 | Steeve | did you tried REWORD ? | 8-Jan 22:03 |
| 15408 | Steeve | Terry, show use case you think is cumbersome and we'll show you a simpler way (i hope) | 8-Jan 21:43 |
| 15407 | Steeve | there is plenty of functions to do such, the simple one is the one you can do | 8-Jan 21:41 |
| 15406 | Henrik | well, how else would you do it? I guess you need kind of an escape sequence to evaluate a word or something. | 8-Jan 21:40 |
| 15405 | Terry | That's not too bad, but when you start including single quotes, double quotes, multiple variable etc, it becomes more difficult | 8-Jan 21:39 |
| 15404 | Terry | Rebol var: "Hello World" print rejoin ["This is " var "in the sentence"] | 8-Jan 21:38 |
| 15403 | Terry | ie: Comparing to PHP $var = "Hello World"; echo "This is $var in the sentence"; | 8-Jan 21:37 |
| 15402 | Terry | Is it just me, or does anyone else find JOIN and REJOIN cumbersome? | 8-Jan 21:36 |
| 15401 | Dockimbel | BIND on a block! does a full recursive traversal of the block! and for each word! found, does a fast lookup in the target context (probably hashed). So the cost is directly proportional to the size and depth of the argument block!. | 8-Jan 14:06 |
| 15400 | Dockimbel | Object! and function! have different creation and usage semantics, AFAIU, they share a common internal parent datatype, context!. So, context! (which is not directly accessible) should be "cheaper". Objects and functions have different purposes, so this might be like comparing apples and oranges...in a closed blackbox. | 8-Jan 13:58 |
| 15399 | Dockimbel | "if rebol binds hidden ctx to function body" => It's the other way around, "binds body to ctx". BIND will only link the words that match those defined in the target context, to that same context, nothing more. | 8-Jan 13:48 |
| 15398 | Janko | if function uses objects and bind internally or something like that, then objects in rebol and bind should be cheap right? and then an object is cheaper than function ? | 8-Jan 13:31 |
| 15397 | Janko | ok .. query/clear will find me seek out leaking globals so this problem has got a solution in a way | 8-Jan 13:30 |
| 15396 | Janko | hm.. if rebol binds hidden ctx to function body then it really can't do anything to trigger warning on global words. (if I understand things aroung bind correctly) | 8-Jan 13:29 |
| 15395 | Janko | huh.. plenty of info, might need some time to process this to get all that you two meant . but I did already know first :foo second: foo stuff (I was playing with rebol to js compiler) and I did know that context is object | 8-Jan 13:27 |
| 15394 | Henrik | trying: source context might be a revelation too. | 8-Jan 12:27 |
| 15393 | Dockimbel | Janko, a function is a context! value like objects. You can use the following mental analogy to see how it is related : foo: func ["for demo" a [integer!] /local b][...] would be *roughly* equivalent to constructing an object like that : foo-def: make object! [ hidden-ctx: make object! [a: none local: none b: none] body: [...] spec: ["for demo" a [integer!] /local b] ] The body is bound to the 'hidden-ctx context at function creation. When calling 'foo, the interpreter will set the 'hidden-ctx object words values according to passed arguments and refinements and then DO 'body. There's no differences on how REBOL treats "arguments" and "local words", it's part of the illusion. The /local refinement is used by *convention* only, to set "local words", you could just decide to use any other refinement for the same job. Here's an example : >> a: func [/local b][print b] >> a/local 5 5 Additionnaly, when you apply the ordinal natives on a function! value, you get : >> first :foo == [a /local b] ;=> the hidden context words >> second :foo == [...] ;=> the function body block >> third :foo == ["for demo" a [integer!] /local b] ;=> the original spec block | 8-Jan 12:27 |
| 15392 | Henrik | Janko, try: http://blog.revolucent.net/2009/07/deep-rebol-bindology.html | 8-Jan 12:27 |
| 15391 | Janko | Doc .. thanks a lot for that query word ... it' awesome to see on a page what all got set in the process.. this will help me the to make code more strong A LOT! Doc.. how does the runtime binding to function local words work? func is probably not a mezzaine or something where we could peek into what it does with /local words ? Henrik: I need to learn more about them and how to use them .. are there any good docs to read about what contexts are used for maybe? | 8-Jan 11:54 |
| 15390 | Henrik | janjo, you'll find that using contexts will help you solve these problems. it's the next best thing to modules. | 8-Jan 11:46 |
| 15389 | Dockimbel | Detecting at runtime is the only way. So, you could write your funcstrict function using this 'query trick, but that would cost you 2 'query calls each time the function is called... | 8-Jan 11:46 |
| 15388 | Janko | cool! I was looking at system/words but had no idea how to see my words in there ! didn't even know for query word so far .. cool | 8-Jan 11:41 |
| 15387 | Dockimbel | >> query/clear system/words == [end! unset! error! datatype! context! native! action! routine! op! function! object! struct ! library! port! any-type! any-word!... >> context [set 'a 5] >> query system/words == [a] | 8-Jan 11:36 |
| 15386 | Dockimbel | Just remembered about querying system/words, that would give you a mean to detect new global words. | 8-Jan 11:34 |
| 15385 | Janko | I am changing to using a context now for all words that are defined outside functions on rps pages to make them local to that pageload | 8-Jan 11:25 |
| 15384 | Janko | Henrik: but I don't want to make each function a context (probably:) ) .. I have to admit I don't know much about contexts .. only that it's like object | 8-Jan 11:23 |
| 15383 | Janko | I imagine when you now set some word in some function it looks at /local words and it it's there it creates a local word, if not it just sets a word (globaly).. let's say that there is funcstrinct that in second case just throws an error (probably something like that could be made in rebol itself) | 8-Jan 11:22 |
| 15382 | Henrik | setting no global words: use a context | 8-Jan 11:21 |
| 15381 | Janko | yes analysis could be hard or impossible if you look at more unusual things you can do.. but at least so that all. about second, maybe you mean the same.. but I just want that my certain functions set no global words, at least not directly with word: ~expr~ or set 'asd set [ asd asd ] .. | 8-Jan 11:21 |
| 15380 | Dockimbel | Btw, R3 modules would minimize this issue to the local module only. | 8-Jan 11:19 |
| 15379 | Dockimbel | Regarding capturing of globally defined words in a local context, as Gabriele likes to say : "for every code you would write that would work for you, I can write an example code that will break it" ;-) | 8-Jan 11:15 |
| 15378 | Dockimbel | AFAIK, static code analysis cannot be used on REBOL source code to infer the runtime behaviour accurately , word! values can be constructed and dynamically bound at runtime. Same reason why REBOL is not compilable. | 8-Jan 11:13 |
| 15377 | Janko | it would be very helpfull if rebol could let you define functs that would warn you if you used or defined any global words .. I suppose my programs are 100% more uncertain because I forget to include some of the words I defined in words as local. If some 'funcstrict' for example would warn me of any such mistake I would sleep much better. Other but worse option is that there would be some lint like tool that would look at code and warn you of these | 8-Jan 10:47 |
| 15376 | Rebolek | Hm, I understand that now: >> a: [1] == [1] >> reduce [a append a [1]] == [[1 1] [1 1]] Interesting. I never knew that. | 7-Jan 0:18 |
| 15375 | Rebolek | This works as I expected: >> a: [1 2] == [1 2] >> compose/deep [[(a)] [(swap a next a)]] == [[1 2] [2 1]] | 7-Jan 0:12 |
| 15374 | Rebolek | >> a: [1 2]
== [1 2]
>> reduce [a swap a next a]
== [[2 1] [2 1]]
Why it doesn't return [[1 2] [2 1]] ? | 7-Jan 0:10 |
| 15373 | Graham | http://www.rebol.org/view-script.r?script=color-code.r | 6-Jan 0:51 |
| 15372 | Graham | anyone got a code color rinser for R source? | 6-Jan 0:48 |
| 15371 | BrianH | I'm not waiting. | 5-Jan 19:08 |
| 15370 | Graham | Can't wait forever ... | 5-Jan 19:08 |
| 15369 | BrianH | No, let's not. | 5-Jan 19:05 |
| 15368 | Graham | Ok, let's create a new r3 group ... | 5-Jan 19:04 |
| 15367 | BrianH | Reichart hasn't yet restored the right group. | 5-Jan 19:04 |
| 15366 | Graham | and this is in the wrong group ... | 5-Jan 19:03 |
| 15365 | Graham | we non gurus need to wait for the gui .. or is it out now?? | 5-Jan 19:03 |
| 15364 | BrianH | If non-gurus can't use the GUI, it's a design flaw that needs to be fixed. | 5-Jan 19:02 |
| 15363 | BrianH | If you are interested in the GUI, get involved. We *really need* non-gurus - the GUI is designed for them. | 5-Jan 18:58 |
| 15362 | james_nak | Thanks Graham. | 5-Jan 18:56 |
| 15361 | BrianH | There will be no miracle that will bring the GUI or database to the first R3 release - they just aren't done yet, and can't be done with the level of community involvement that the alpha releases have engendered. Too many critical people are waiting for a beta or full release before they will even start to get involved. Fortunately we are on the rapid release model, so there is no such thing as a "final" or "full" feature set, just the feature set of a particular release. | 5-Jan 18:55 |
| 15360 | Claude | i just want to see more info and screen on the new GUI of R3 (i am very curious :-) ) | 5-Jan 18:53 |
| 15359 | Claude | i am just like an end user on R3. and for me i am not a guru like you and others !!!!! | 5-Jan 18:52 |
| 15358 | Claude | thank you for your effort on R3 and R2 | 5-Jan 18:50 |
| 15357 | Claude | thank you for your effort on | 5-Jan 18:50 |
| 15356 | BrianH | It's a little flexible - outside circumstances have affected the timing already. | 5-Jan 18:49 |
| 15355 | Claude | do you have a plan for the beta realase ? one week, month, | 5-Jan 18:48 |
| 15354 | BrianH | "some miracle" in this case meaning a community member with the time volunteering to do the work. | 5-Jan 18:48 |
| 15353 | BrianH | R3 Status: The beta will come out without GUI, database or (unless there is some miracle) SSL. | 5-Jan 18:46 |
| 15352 | BrianH | The R3 GUI is still in development. The database model hasn't even been designed yet. You can make wrappers for ODBC and MySQL if you want to write the extensions - Robert has already started doing so for SQLite. Once device extensions are supported, we can start to get to work on the database model. | 5-Jan 18:44 |
| 15351 | Claude | what about R3 status ? make uptodate R2 is very fine but i would prefer a R3 version with GUI and ODBC or MYSQL ..................; | 5-Jan 18:36 |
| 15350 | Graham | If the firewall is off, but no one is listening ... then you'll get a closed port same as if the firewall is on, and someone is listening... | 5-Jan 18:30 |
| 15349 | Graham | what the code checks for is if anyone is listening at a certain port ...not whether the firewall is open or closed. | 5-Jan 18:30 |
| 15348 | james_nak | Thanks Doc. | 5-Jan 16:50 |
| 15347 | Dockimbel | Cheyenne has such opened listen port detection capabilities (added recently), you can extract the code from the SVN repo (search for 'list-listen-ports function) : http://code.google.com/p/cheyenne-server/source/browse/trunk/Cheyenne/misc/win32.r Linux and OS X versions are also available in %misc/unix.r and %misc/macosx.r | 5-Jan 16:47 |
| 15346 | james_nak | Thanks Graham and Sqlab. One step further if you please. What would you suggest the steps would be to test the code. Right now when I run the test I get no opened ports. I've turned the firewall off and on but the results are the same. I've been studying the nettools.r code and thinking that maybe I'm not thinking this right. What I want to know is if a certain port will allow it to be open so that this particular application has can use.it. What is happening is customers are installing the app and having trouble because these certain ports are unavailable. What I wanted to create was a quick and easy pre-install test to verify these ports were open. This partly due to the fact that they way the software was written it doesn't tell you that a closed port is the problem. It simply stops worting. I appreciate the feedback you have given. | 5-Jan 16:42 |
| 15345 | Graham | 'prin | 5-Jan 9:16 |
| 15344 | Graham | or shorten it to 'prn ... | 5-Jan 9:15 |
| 15343 | sqlab | of course, you can also omit the print | 5-Jan 9:15 |
| 15342 | Graham | for i 1 ... | 5-Jan 9:14 |
| 15341 | Graham | for i 65536 1 [ attempt [ print i close open join tcp://server: i append opened i ] ] | 5-Jan 9:13 |
| 15340 | Graham | how about attempt [ print i close open join tcp://server: i append opened i ] and do without the p, and the all .... | 5-Jan 9:12 |
| 15339 | Graham | oh .. I isee it doesn't | 5-Jan 9:11 |
| 15338 | sqlab | I do not follow ? | 5-Jan 9:11 |
| 15337 | Graham | won't attempt always return the same value? | 5-Jan 9:10 |
| 15336 | sqlab | do you regard the all [..] ? | 5-Jan 9:09 |
| 15335 | Graham | if you want to only see those successfully opened, I would put the 'append after server: i | 5-Jan 9:08 |
| 15334 | Graham | won't opened contain all the i's? | 5-Jan 9:07 |
| 15333 | sqlab | This should work, where server is the ip adress or dns name of the relevant machie opened: [] for i 1 65536 1 [ all [ print i attempt [p: open join tcp://server: i ] attempt [close p] append opened i ] ] | 5-Jan 9:04 |
| 15332 | Graham | if you want to check if there is a server port listening then you can do open tcp://localhost:8881 and if you want to see if that port is open to the outside, then you need to use another PC to probe that port address | 5-Jan 6:19 |
| 15331 | Graham | all that does is trying to open a server port | 5-Jan 6:18 |
| 15330 | james_nak | Smart guys. This may seem elementary but I need to check if certain ports are open on a windows machine. For example, port 8881. I use something like error? try [close open to-url "tcp://:8881"] (building these strings with various port numbers). My problem is I don't know how to check if it is working. I turn on the firewall and it doesn't seem to make a difference. Perhaps my thinking is all wrong and all I am doing is checking within the firewall. Any thoughts? | 5-Jan 5:51 |
| 15329 | Gregg | Very nice Graham! | 4-Jan 18:35 |
| 15328 | Rebolek | Pavel, yes it is. But you can say that binary! is subset of vector! - 8bit unsigned vector. With vector! You can generate for example 16bit signed stream and then just add WAV/AIFF header. So vector! is superior to binary! from this point of view. | 4-Jan 14:36 |
| 15327 | Pavel | Rebolek How much differ vectors from binary in sound application isn't it pure record of numbers only? | 4-Jan 14:32 |
| 15326 | Pekr | Whole document is here - http://rebol.com/r3/docs/project.html .... there are even some sound related changes planned, although with lower priority ... | 4-Jan 13:49 |
| 15325 | Pekr | High priority for Vector says - Basic vector! conversions and ops ... dunno how Carl sticks to the published project plan though ... | 4-Jan 13:49 |
| 15324 | Rebolek | Pekr, vectors are really great. But they need few improvements and bugfixes here and there. I wrote a document what doesn't work and should some time ago (has been two years already? I think so). I haven't looked at them recently, so maybe they're improved already. I should check my R3 AIFF/WAV loaders/savers wheter they work as they have been the best test for vectors I had. | 4-Jan 13:32 |
| 15323 | Pekr | Rebolek - do vectors help you with sounds? There are some high-priority changes planned for vectors for the 3.0 beta IIRC. | 4-Jan 13:24 |
| 15322 | Rebolek | Anton, I'm glad to hear that. In which way are you interested to use it in sound/music generation? One of my first thoughts was howe to use this together with Sintezar. It should probably be used for oscillator wavetables generation... I'm not sure. | 4-Jan 13:21 |
| 15321 | Pekr | Anton - still experimenting with sound? Maybe R3 Extension based on fmod is waiting for you to bring it to REBOL? :-) | 4-Jan 13:20 |
| 15320 | Anton | Bolek, that's very interesting for me because I was searching for just such a declarative dialect for sound generation and music composition. | 4-Jan 13:15 |
| 15319 | Graham | spell: func [ check [string!]
/local req result suggestions
][
req: reform compose copy [
<spellrequest textalreadyclipped="0" ignoredups="1" ignoredigits="1" ignoreallcaps="0">
<text> (check) </text> </spellrequest>
]
result: load/markup read/custom https://www.google.com/tbproxy/spell reduce [ 'POST req ]
either parse result [ tag! tag! tag! set suggestions string! tag! tag! end ][
parse suggestions none
] [ none ]
] >> spell "rebol" connecting to: www.google.com == ["reboil" "rebel" "reboils" "Reebok" "rebook"] | 4-Jan 10:05 |
| 15318 | Gregg | I think that's the point Steeve. Looking for new ways to express things, that may be useful, and may inspire more useful adaptations. | 4-Jan 5:26 |
| 15317 | Steeve | Well it's interesting as a study dialect. But to be honest guys, i don't see the interest to have them in Rebol.
Because we can do much of the use cases rebolek showed us with one or two lines of rebol code.
And i don't need to say that it will got lightning speed by comparison But anyway, It's lot of fun to do such things with Rebol. | 3-Jan 22:16 |
| 15316 | BrianH | I was talking about the functional-language filter operation, not Bolek's (much cooler) FILTER :) | 3-Jan 21:42 |
| 15315 | Rebolek | well, add the missing "]" ;) | 3-Jan 21:41 |
| 15314 | Rebolek | Brian: FILTER is REMOVE-EACH on steroids. Gregg, Doc: Thanks! What I'm working on right now is this: divisor: func [x][filter serie [1 .. x][zero? x // i]] prime?: func [x][equal? 2 length? divisor x filter [1 .. 50][prime? x] this must work. | 3-Jan 21:40 |
| 15313 | BrianH | The REBOL equivalent of the functional-language operation fiter is REMOVE-EACH. | 3-Jan 21:05 |
| 15312 | Dockimbel | Rebolek: thanks for the link, lots of good food for thought here. That would be great to support it at native level (using a R3 extension). I also wonder how much of it could be implemented efficiently using 'map-each and 'apply. Anyway, this could be a really great addition to R3 (or even R2). Keep up the good work. | 3-Jan 20:07 |
| 15311 | Gregg | Cool Bolek. | 3-Jan 19:37 |
| 15310 | Rebolek | I was reading http://www.chalicegames.com/swym/SwymWebIntro.html and some concepts were interesting to me(especially ETC), so I made REBOL equivalents: http://box.lebeda.ws/~rebolek/rebol/swyv.r There's a documentation in the script, so just few examples of what it can do: SERIE: >> serie [etc 1 2 4 .. 20 cycle [1 2 3] length 5 iterate [x: x + 10] from 10 5] == [1 2 4 8 16 1 2 3 1 2 10 20 30 40 50] COMPARE: a: [1 2 3 4 5 6 7 8 9] b: [2 4 6] >> compare a b [some a > every b] == true >> compare a b [one a > every b] == false FILTER: >> filter serie [iterate [x: x + 1] 10 ] [[x > 2] [x < 5]] == [3 4] >> filter etc [3 6 9] 100 [x > 250] == [252 255 258 261 264 267 270 273 276 279 282 285 288 291 294 297 300] >> filter serie [1 .. 10] [[x > 5][zero? x // 2]] == [6 8 10] It's written in R3 but should also work in R2 (not tested). It's not optimized so if you're interested in it, feel free to do whatever you want to improve it (more patterns that ETC can recognize...). | 3-Jan 10:43 |
| 15309 | Gabriele | and, how many of them do something like: var: unless ... | 22-Dec 10:36 |
| 15308 | Sunanda | There are 45 scripts on FREBOL.org that appear to use UNLESS (there may be a few false positives in this -- if, say, the word UNLESS has been reused): http://www.rebol.org/search.r?find=unless+[b] | 20-Dec 13:15 |
| 15307 | Gabriele | Brian, how many scripts on rebol.org use the result of UNLESS? | 20-Dec 8:24 |
| 15306 | BrianH | Sorry Bolek, I should have been more specific. I meant Steeve's POP proposal and the CONCAT example wouldn't work (for reason's stated above). Gabriele's IT proposal and Steeve's sample implementation of it would work a little, but would need modification. | 20-Dec 1:01 |
| 15305 | Rebolek | Brian, Steeve's examp;e works, you just have to do >>secure none | 20-Dec 0:15 |
| 15304 | BrianH | Oh, and suffix-map is used by the codec system, afaik. | 19-Dec 23:48 |
| 15303 | BrianH | The reason Steeve's proposal doesn't work is because the result of the prior expression is thrown away, not pushed on a stack. | 19-Dec 23:47 |
| 15302 | BrianH | Paul, you won't need stack tricks to get user-defined operators in R3 - we'll just use user-defined op! functions. | 19-Dec 23:46 |
| 15301 | BrianH | Gabriele, UNLESS has been around for many years - just not used by many people because of personal preference. They used the slower IF NOT instead. | 19-Dec 23:44 |
| 15300 | BrianH | IT would need to search up the stack to find the nearest appropriate function call frame - it doesn't just apply to the next call up. | 19-Dec 23:42 |
| 15299 | Steeve | With R3, currently we can do... >> it: does [first stack/args 2] >> if 1 + 1 [print it] 2 | 19-Dec 16:05 |
| 15298 | Steeve | If it was possible, the 'IT function could be emulated like this: IT: does [push pop] ; pop the and repush the last stacked value (just to read it without modifying the stack). | 19-Dec 15:38 |
| 15297 | Steeve | Brian, even if the Rebol's VM is not a true stack machine. It has a data stack, so that, the POP function could be emulated in some way. A forth kernel, is nothing else than that. To simulate a stack machine on a processor that is not designed that way initially. However, your response suggests that the cost would be high. | 19-Dec 15:30 |
| 15296 | Paul | wha tis the suffix-map in REBOL used for? | 19-Dec 14:56 |
| 15295 | Paul | Yeah that is fine Henrik. | 19-Dec 14:49 |
| 15294 | Henrik | well, this allows you to put together any condition for the item you want to stop at, so I think it's OK. it's something else, if the code pattern occurs very often (never used this one). | 19-Dec 14:49 |
| 15293 | Paul | I guess that is my point. I would think we simply would have one function that does that. | 19-Dec 14:47 |
| 15292 | Paul | yeah Henrik, I'm suprised that we need to combine functions though to achieve that. | 19-Dec 14:46 |
| 15291 | Henrik | it must be the same block, not just an identical one | 19-Dec 14:43 |
| 15290 | Paul | Steeve, I love your thinking about the pop function. I have wanted that feature before for operators myself. | 19-Dec 14:43 |
| 15289 | Henrik | a: [b c d] copy/part a find a 'd == [b c] | 19-Dec 14:43 |
| 15288 | Henrik | you can do that with copy/part, as long as the /part is the same block | 19-Dec 14:42 |
| 15287 | Paul | Seems such usefulness that it would be built in - so I keep thinking I'm missing something. | 19-Dec 14:42 |
| 15286 | Paul | This function returns a copy of everything until it finds the value specified and then it breaks. | 19-Dec 14:41 |
| 15285 | Paul | no as that would just put the initial values in the series | 19-Dec 14:40 |
| 15284 | Henrik | array/initial? | 19-Dec 14:39 |
| 15283 | Paul | Isn't something like this code already built-in in REBOL and I'm just missing it: copy-to: func [series [series!] arg /local cpd d][ cpd: make type? series 10 foreach item series [ either not-equal? arg item [insert tail cpd item][break] ] cpd ] | 19-Dec 14:31 |
| 15282 | Gabriele | Re: IT - the problem in looking up the stack is knowing which argument to look it up. I guess the first would work and be useful enough, though. | 19-Dec 9:17 |
| 15281 | Gabriele | Brian: a lot of code uses IF returning none, agreed, on UNLESS i'm not really sure, it's quite new. besides, it's not like R2 scripts run unchanged on R3; but anyway i was just thinking out loud, not really proposing anything. | 19-Dec 9:16 |
| 15280 | Gregg | I have an old IF-IT function, which just does a bind/copy. I used it a bit when I first wrote it, but it hasn't become a part of my daily life. | 18-Dec 22:00 |
| 15279 | Janko | I have to admit I was also thinking about some simple stack capabilities few times :) (I came back to rebol from factor) | 18-Dec 21:50 |
| 15278 | BrianH | Your Forth focus is showing :) | 18-Dec 21:20 |
| 15277 | BrianH | Steeve, R3 evaluation doesn't work that way - it's not a stack machine. | 18-Dec 21:20 |
| 15276 | BrianH | Gabriele had two ideas - I liked one of them: IT :) | 18-Dec 21:19 |
| 15275 | Steeve | yeah, i didn't understood what u meant :-) | 18-Dec 20:47 |
| 15274 | Maxim | (those two sentences should have been two posts) | 18-Dec 20:46 |
| 15273 | Maxim | I like Gabriele's idea. I am one of those that has been using the if/unless return value for years, and quite often. | 18-Dec 20:45 |
| 15272 | Steeve | the stack function can return the prvious stacked value, but without removing it from the stack | 18-Dec 20:38 |
| 15271 | Steeve | I don't know how the values evaluated are stacked by the VM. But i see the advantage of having a POP function.
We could easly create postfix functions.
e.g:
CONCAT: func [v][join pop v] >> "a" concat "b" =="ab" All sort of new operators would be easy to construct | 18-Dec 20:34 |
| 15270 | BrianH | No, it would have to search back. Simply popping wouldn't be enough. What I'm really interested in is seeing if I can add CASE support. | 18-Dec 19:05 |
| 15269 | Steeve | a sort of native POP function | 18-Dec 19:03 |
| 15268 | BrianH | The value returned by IT would not be evaluated, so that you can work with active values safely. | 18-Dec 18:58 |
| 15267 | BrianH | R3-only of course. | 18-Dec 18:41 |
| 15266 | BrianH | The advantage to this approach is that it would be error-throw-safe, as well as thread-safe, and require no changes to IF or UNLESS :) | 18-Dec 18:40 |
| 15265 | BrianH | Gabriele, it occurs to me that if IT was native it could look up the stack to get its value. I'll try writing a (security hole) REBOL version of the function later today - it would require debug privileges to run so that it can call the STACK function. | 18-Dec 18:37 |
| 15264 | BrianH | It doesn't always apply to the task at hand though. The IF and UNLESS return values have been applied to the general R3 control flow model, as have the changes to the ordinal return values, map! behavior, ... | 18-Dec 18:32 |
| 15263 | BrianH | I prefer CASE too, and have rewritten many mezzanines to use it :) | 18-Dec 18:30 |
| 15262 | Steeve | For complex control flow rules, i rather prefer CASE. Most of the time, combitations of ALL ANY, can be replaced by a CASE structure (which is faster and more readable) | 18-Dec 18:22 |
| 15261 | Steeve | i use it too,but not so much | 18-Dec 18:16 |
| 15260 | BrianH | It is mostly used in combination with ANY and ALL for control flow. | 18-Dec 18:16 |
| 15259 | BrianH | More every day. Every time another developer learns about this (5+ year old) trick they start using it. It's even used in mezzanines. | 18-Dec 18:15 |
| 15258 | Steeve | A *lot* ? somewhat exaggerated :-) | 18-Dec 18:12 |
| 15257 | BrianH | A *lot* of code uses the trick of having IF or UNLESS return none when the condition is not met, so your other suggestion is unlikely. | 18-Dec 18:10 |
| 15256 | BrianH | IT could be a function that returns the thread-local top of the stack of implied subject values. IF would then push a value on that stack, and pop the value off when it returns. Might be tricky to make error-throw-safe, but easy to make thread-safe :) | 18-Dec 18:08 |
| 15255 | Gabriele | just thinking out loud... | 18-Dec 5:21 |
| 15254 | Gabriele | while thinking about that, i also thought that maybe UNLESS should return the "condition" value when it is "true". we use this all the time with ANY: x: any [select block value "default"] maybe it would be more readable as: x: unless select block value ["default"] | 18-Dec 5:20 |
| 15253 | Gabriele | I guess it could trip some users, otoh, we have many things that trip some users. | 18-Dec 5:18 |
| 15252 | Gabriele | i don't think there would be that much code to add in the actual native. the same thing could be done to other similar control functions. | 18-Dec 5:17 |
| 15251 | Gabriele | so, I thought, can we avoid the bind/copy in any way? actually, i think we can. some people would run in horror maybe, and Brian will complain about it not being thread safe (we still have no threads though), but what about the native was changed to do something like: func [condition block /local it*] [ set/any 'it* get/any 'it it: :condition also if :condition block set/any 'it get/any 'it* ] | 18-Dec 5:15 |
| 15250 | Gabriele | i was just thinking again about the idea of IF (etc.) keeping a reference to the condition argument for you, that is, so that instead of writing: if x: select block value [do-something-with x] you can write: if select block value [do-something-with it] The reason people say it's not worth it is usually that of having to bind/copy the block - you don't want that in every IF call and probably not even in the ones where it would be useful (and, there's really no other name you could use for the function). | 18-Dec 5:10 |
| 15249 | Pavel | Thanks for info Maxim. | 16-Dec 7:55 |
| 15248 | Maxim | (the callback framework is currently called wired) | 15-Dec 21:49 |
| 15247 | Maxim | this way we can create rebol code directly from strings and native data very easily. there is currently a size limit on executed strings, its a simple question of optimisation. this means we can't use the wiredf function for creating large datasets via strings (for now). but I'm already doing stuff like: wiredf("rogl-event-handler make wr-event [new-size: %p]", win-w, win-h); calls rebol's do with %p replaced by a pair, using 2 ints. this is a varargs function. | 15-Dec 21:48 |
| 15246 | Maxim | I am also building little helper funcs like a REBOL datatype centric version of sprintf which acts a bit like a C-side rejoin for REBOL. | 15-Dec 21:41 |
| 15245 | Maxim | I will be rebuilding the callback example with a much better/simpler design. but they work very well, basically I have mapped the Reb_Do_String() and Reb_Print() functions so that they can be called from within any extension. | 15-Dec 21:40 |
| 15244 | Pavel | yes I've understand your anouncement this way | 15-Dec 21:23 |
| 15243 | Maxim | you mean calling code from the host within extensions? | 15-Dec 18:28 |
| 15242 | Pavel | I'd glad to try, but internals are quite well hidden now. Anyway any hint about handle or crossreferencing from extension you have found Maxim? | 15-Dec 12:04 |
| 15241 | Maxim | you seem to be already knowledged about this, so you'd be the best one to implement it IMHO (pavel). | 15-Dec 0:00 |
| 15240 | Maxim | when map! will added to extensions, you might be able implement an example for us and Carl might consider adding your code directly in the host or r3lib if you agree to it. :-) | 14-Dec 23:59 |
| 15239 | Pavel | For those interrested a Fastbit webpage is good source of docs. | 14-Dec 13:46 |
| 15238 | Pavel | Transfering memory based hash! (map! in R3) datatype into disk based shema automatically keeping the hash table computation and lookup hidden from user gives you a RIF. Holly grail of all rebollers :) long long time promissed, still waiting to be done. Anyway hash tables are always usually unsorted, when necessary to search in usually some type of additional index is used (B-tree for example), for simple information if the key is in the set, bitmap vectors are used with advantage, when the set is really big (and bitmap vector doesn fit into memory) comressed bitmap may be used and usually bitwise operations on those vectors are much quicker than on uncompressed. Thisi is why it should be used for bitset! datatype anyway. The number of byte aligned (BBC,Packbit,RLE)od word aligned (WAH) schemes exists. It is used in very large datasets when index also resides in disk file. Once again bitwise operation may be much quickier even in memory on those schemes. | 14-Dec 13:44 |
| 15237 | Janko | Maxim: yes, I am aware that retrieving data from hashtables is really fast... I wasn't aware it will just as fast even with 1M records so I was quite amazed before when I tried it | 13-Dec 21:11 |
| 15236 | Graham | Von, I think I just mean that your password for emstp will have to be in the script ( if it is needed .. ) | 13-Dec 19:00 |
| 15235 | Maxim | but janko... if you test it, you will that hash tables are extremely faster at retrieving data... the larger the set the bigger the difference. on millions of records indexed with strings , it could be hundreds or thousands of times faster :-) | 13-Dec 18:12 |
| 15234 | Maxim | a: make hash! [ "33" 33 "44" 44 "55" 55] select a "33" change find a "44" ["88" 88] == make hash! ["33" 33 "88" 88 "55" 55] | 13-Dec 18:01 |
| 15233 | Maxim | append works on hash tables. in fact they are exactly the same as if you where using blocks, except that the internal representation is different than what you look at through code. | 13-Dec 17:58 |
| 15232 | Maxim | yep. | 13-Dec 17:57 |
| 15231 | Janko | hm.. I have a very newbie question .. do you most effectively add new pairs to hashtable by appending to it as a block ? can't figure out how to change a value .. set doesn't work that way | 13-Dec 17:53 |
| 15230 | Janko | aha, I see that it depends .. I increased the length of string and block increased in size while hash stayed the same | 13-Dec 17:42 |
| 15229 | Maxim | hehe | 13-Dec 17:41 |
| 15228 | Janko | I am nevbie a little longer each day :) | 13-Dec 17:41 |
| 15227 | Maxim | in REBOL, we're a newbie a few minutes... every day.... even after a decade of using it ;-) | 13-Dec 17:40 |
| 15226 | Janko | stats is a cool command , with many refinements also .. I didn't know about it | 13-Dec 17:40 |
| 15225 | Maxim | but... filled up.... b: make hash! 5000010 m: stats loop 5000000 [append b copy random "1234567890" append b random 10000000] print stats - m == 188430448 here its half the space. a ha! depending on the string input... hash tables can actually be smaller... :-) | 13-Dec 17:39 |
| 15224 | Janko | :) | 13-Dec 17:39 |
| 15223 | Janko | >> a: stats b: make block! 1000 repeat i 1000 [ append b random "abcdef" random 100000 ] print stats - a 48671 >> a: stats b: make hash! 1000 repeat i 1000 [ append b random "abcdef" random 100000 ] print stats - a 81454 | 13-Dec 17:39 |
| 15222 | Maxim | hum... lets see: ;-) a: stats b: make block! 5000010 print stats - a == 80001039 a: stats b: make hash! 5000010 print stats - a == 80005071 | 13-Dec 17:34 |
| 15221 | Janko | (it does, cool :) I was looking at processes to see how much it will eat) | 13-Dec 17:34 |
| 15220 | Janko | hm.. does stats return ram used?? | 13-Dec 17:31 |
| 15219 | Janko | Maxim .. thanks a lot for your answers.. very interesting .. I know from distance how hashtables work internally but I don't know details.. should a block take roughly the same space as hashtable of the same block (in rebol) or factor(s) different? | 13-Dec 17:31 |
| 15218 | Maxim | (oops 'strings and pairs' > 'string and *integers*' ) | 13-Dec 17:02 |
| 15217 | Maxim | but when things are in the millions, sometimes using a disk-based on-demand caching algorithm is fastest... it really depends on the application. cause think of it this way. every byte used by each element becomes a MB so adds up quickly. 5 million pairs of (10 byte) strings and pairs... is just about 350MB ! >> b: make block! 5000010 >> m: stats == 84172417 >> loop 5000000 [append b copy random "1234567890" append b random 10000000] == ["5862713409" 4765171 "2546013987" 2726704 "9528013746" 3565380 "4591302786" ... >> stats - m == 348435008 | 13-Dec 17:01 |
| 15216 | Maxim | I've had REBOL use up over 700MB of RAM without isues or dramatic speed drops... but having millions of items, make sure you pre-allocate your hash-table, cause if you keep-appending to the same table for each entry, it will get exponentially slower. | 13-Dec 16:36 |
| 15215 | Maxim | hash tables for such a big set are the only way to go... they will be magnitudes faster on access. | 13-Dec 16:34 |
| 15214 | Janko | (let's say I want to use key-value (string-int) pairs for 5M words .. hash tables are probably more memory consuming for such a big set of data?) | 13-Dec 15:20 |
| 15213 | Janko | could you create something like a trie in rebol or would you have to go lower level for it to be normally eficient? | 13-Dec 15:18 |
| 15212 | sqlab | If you write with different rebol instances into the same file at the same time, you are out of luck. I | 13-Dec 12:24 |
| 15211 | Henrik | sometimes empty lines occur as well | 13-Dec 11:07 |
| 15210 | Henrik | would there be instances where write/lines/append would write a quarter or half a line? I'm logging tests of several script instances into the same file and write/lines/append sometimes produces only half a line in the log. | 13-Dec 11:06 |
| 15209 | Von | Graham, you mentioned that I should encode the password. Is this in case someone hacks into my host? If I use the encloak function, couldn't someone also find my readable key in the script and then decloak my password using Rebol? | 13-Dec 9:33 |
| 15208 | Maxim | and who said we coudn't make profit by reboling ;-) | 13-Dec 3:50 |
| 15207 | Graham | Thanks Von .. will certainly encourage others to help you out :) | 13-Dec 3:49 |
| 15206 | Von | Done, I've submitted via PayPal :-) Thanks for your help, I get can some rest now :-) Thanks Maxim for your help also! | 13-Dec 3:45 |
| 15205 | Graham | .. help pay .. not pay for the whole lthing! | 13-Dec 3:42 |
| 15204 | Graham | great .. can pay for my new USB LCD monitor :) sales@compkarori.co.nz :) | 13-Dec 3:40 |
| 15203 | Von | Hey, I'd be happy to send some $, if it means speeding up my learning curve! I'll PayPal some money over, seriously! | 13-Dec 3:39 |
| 15202 | Graham | too slow ... | 13-Dec 3:38 |
| 15201 | Maxim | (hahaha was gonna say... "bills in the mail" ;-) | 13-Dec 3:37 |
| 15200 | Graham | My paypal account is ... | 13-Dec 3:36 |
| 15199 | Maxim | the best developper community in the world :-D | 13-Dec 3:36 |
| 15198 | Von | Wow, that's it! :-) I've spent almost 10 hours trying to resolve this and I had the wrong smtp relay, duh me! I really appreciate your help! | 13-Dec 3:35 |
| 15197 | Graham | limit of 1000 email per day | 13-Dec 3:32 |
| 15196 | Graham | this is the correct smtp server relay-hosting.secureserver.net | 13-Dec 3:30 |
| 15195 | Graham | you have to use this .... http://help.godaddy.com/article/1073 | 13-Dec 3:29 |
| 15194 | Graham | yeah ..port 25 is being blocked | 13-Dec 3:27 |
| 15193 | Maxim | that looks like an outgoing firewall issue. | 13-Dec 3:26 |
| 15192 | Von | log.txt: Content-Type: text/plain Net-log: ["Opening" "tcp" "for" "esmtp"] Net-log: [none "220"] ** User Error: Server error: tcp connection failed ** Near: smtp-port: open [scheme: 'esmtp] either only | 13-Dec 3:25 |
| 15191 | Graham | I get this >> set-net [ sales@coolexample.com smtpout.secureserver.net ] >> send someone@gmail.com "testing" Net-log: ["Opening" "tcp" "for" "esmtp"] connecting to: smtpout.secureserver.net Net-log: [none "220"] Net-log: {220 p3plsmtpa01-02.prod.phx3.secureserver.net ESMTP} Net-log: [["EHLO" system/network/host] "250"] Net-log: "250-p3plsmtpa01-02.prod.phx3.secureserver.net" Net-log: "250-AUTH LOGIN PLAIN" Net-log: "250-8BITMIME" Net-log: "250 PIPELINING" Net-log: ["Supported auth methods:" [login plain]] Net-log: ["MAIL FROM: <sales@coolexample.com>" "250"] Net-log: "250 Sender accepted." Net-log: ["RCPT TO: <someone@gmail.com>" "250"] ** User Error: Server error: tcp 553 Sorry, that domain isn't in my list of allowed rcpthosts. | 13-Dec 3:20 |
| 15190 | Graham | make it a cgi script and see what is written to %log.txt | 13-Dec 3:19 |
| 15189 | Graham | try this rebol [] echo %log.txt set-net [ sales@coolexample.com smtpout.secureserver.net ] trace/net on send self@somewhere.com "test" | 13-Dec 3:18 |
| 15188 | Graham | if sendmail works .. maybe you can use set-net [ localhost sales@coolexample.com [ | 13-Dec 3:14 |
| 15187 | Von | I have to create one but the GoDaddy system says that I'll have to update my database name due to the conversion. | 13-Dec 3:13 |
| 15186 | Graham | from godaddy? | 13-Dec 3:13 |
| 15185 | Graham | do you have a shell account? | 13-Dec 3:12 |
| 15184 | Von | In the past I've always used /usr/sbin/sendmail to send e-mails via cgi but I'm lost on how to do it via Rebol. | 13-Dec 3:12 |
| 15183 | Graham | well, then you need to a trace/net to see where the issue is | 13-Dec 3:11 |
| 15182 | Von | I've supplied all necessary info in set-net, which includes username and password. | 13-Dec 3:10 |
| 15181 | Graham | and if you're not on your ISP ... it probably won't even let you send the email | 13-Dec 3:10 |
| 15180 | Graham | so you need to encode the password somewhere if you're going to use a script | 13-Dec 3:09 |
| 15179 | Graham | esmtp requires a password | 13-Dec 3:09 |
| 15178 | Graham | well, doesn't it ask you for a password?? | 13-Dec 3:08 |
| 15177 | Von | It works when I send an e-mail from my home laptop but not on my hosting account. | 13-Dec 3:08 |
| 15176 | Von | I have the following smtp in my set-net: smtpout.secureserver.net | 13-Dec 3:06 |
| 15175 | Maxim | set-net is the rebol networking setup function. it is usually run on install and is stored in your user.r | 13-Dec 3:05 |
| 15174 | Maxim | so, von, if you have a godaddy mail account setup, you can connect to its smtp server directly. is your hosted machine's set-net function setup to connect to something like smtp@godaddy ? | 13-Dec 3:04 |
| 15173 | Graham | godaddy has it's own smtp server | 13-Dec 3:01 |
| 15172 | Von | Does this mean, I'll need to use perl: sendmail? | 13-Dec 2:59 |
| 15171 | Von | SMTP Relay lets you send email messages through your email account using your existing email service. For example, you can continue to use Microsoft Outlook to compose, receive, and send email messages, but the actual email messages are processed through our SMTP relaying services. This lets you bypass ISP restrictions on your outbound email messages and allows you to use your professional looking "sales@coolexample.com" email address rather than a general “sales@ispname” address. | 13-Dec 2:58 |
| 15170 | Maxim | its possible GoDaddy has an smtp relay you can connect to, which will accept connections from the hosted machine. your internet provider will not allow anyone else than its own allocated ips to make an smtp connect... for sure. | 13-Dec 2:48 |
| 15169 | Von | Yes, it's a shared hosting account; my provider is GoDaddy. | 13-Dec 2:46 |
| 15168 | Maxim | when you say hosting account, you mean a server on the net with its own dns/ip which is different than the ip being served to you by your access provider... yes? | 13-Dec 2:44 |
| 15167 | Von | Even though I'm able to send e-mails from my home computer via rebol console using my host's SMTP Relay? | 13-Dec 2:40 |
| 15166 | Maxim | that is ... if I understand your setup correctly. | 13-Dec 2:35 |
| 15165 | Maxim | you'd have to setup an smtp server on the hosting account. | 13-Dec 2:35 |
| 15164 | Von | Sorry for the redundant posts. Altme was updating and msg board wasn't being updated at the time. I thought I was losing the info. | 13-Dec 2:34 |
| 15163 | Maxim | most smtp servers do ip filtering on the input. this allows them to know who is sending the email to them and will only allow ips they serve to connect. since your hosting account is probably on a remote server, it won't be allowed to send data via your home smtp server account. | 13-Dec 2:34 |
| 15162 | Von | Hello! I'm having trouble with my hosting account to send via e-mail a cgi form response. I can get rebol to post the data to the page, I just can't get it to send the data to me via e-mail. I'm able to send e-mails from my laptop but when I use the same set-net settings on my host account I get the following error: ** User Error: Server error: tcp connection failed ** Near: smtp-port: open [scheme: 'esmtp] either only | 13-Dec 2:30 |
| 15161 | Von | Hello! I'm having trouble with my hosting account to send via e-mail a cgi form response. I can get rebol to post the data to the page, I just can't get it to send the data to me via e-mail. I'm able to send e-mails from my laptop but when I use the same set-net settings on my host account I get the following error: ** User Error: Server error: tcp connection failed ** Near: smtp-port: open [scheme: 'esmtp] either only | 13-Dec 2:30 |
| 15160 | Von | ** User Error: Server error: tcp connection failed ** Near: smtp-port: open [scheme: 'esmtp] either only | 13-Dec 2:30 |
| 15159 | Von | Hello! I'm receiving the following error when processing a cgi form to send an e-mail of the response. I correctly can send from my laptop, Rebol/Core -- command line, with my set-net settings in user.r but when I do the same thing on my hosting account I get the following error: | 13-Dec 2:30 |
| 15158 | Henrik | looks like the change was made between 2.7.5 and 2.7.6. | 12-Dec 9:29 |
| 15157 | Henrik | I'm debugging some code here and found that the ARRAY mezzanine has at some point been rewritten during R2 versions. Does anyone know when this happened? | 11-Dec 16:26 |
| 15156 | Graham | Just testing my script that logs into hotmail with gmail instead .. to download new email, and detach any attachments. Seems to be working now. | 11-Dec 8:27 |
| 15155 | Graham | headers: import-email email either parse headers/content-type [ thru "boundary=" opt {"} [ copy boundary to {"} to end | copy boundary to end ]][ print ["Boundary string:" boundary] ][ boundary: none ] | 11-Dec 8:17 |
| 15154 | Graham | Hmm. Boundary won't have a value if the parse fails ... so either parse ... [ ][ boundary: none ] | 11-Dec 8:16 |
| 15153 | Graham | I discovered this when trying to detach files from gmail where there is not quote used, whereas hotmail uses the quote in the boundary string. | 11-Dec 8:13 |
| 15152 | Graham | the first line is redundant, and the second line can be changed to a parse ... if parse headers/content-type [ thru "boundary=" opt {"} [ copy boundary to {"} to end | copy boundary to end ]][ ;remove back tail boundary print ["Boundary string:" boundary] ] which I think fixes it. | 11-Dec 8:12 |
| 15151 | Graham | Looks like Sterling's fix in that thread is also incorrect. The problem is here boundary: headers/content-type if boundary: find/tail boundary {boundary="} [ remove back tail boundary print ["Boundary string:" boundary] ] where it looks for boundary=" but fails to take into account where there is not " | 11-Dec 8:10 |
| 15150 | Graham | See http://www.mail-archive.com/list@rebol.com/msg07169.html | 11-Dec 8:09 |
| 15149 | Graham | Looks like Sterling's detach.r script in the library to detach attachments from emails has a bug. | 11-Dec 8:06 |
| 15148 | eFishAnt | wow, thanks guys, for the "launch buffet" I was hungry, and you gave me to eat. | 11-Dec 2:50 |
| 15147 | sqlab | Ok, this way launch works as I would expect launch {-sq" test.r arg1 arg2 } | 10-Dec 14:32 |
| 15146 | sqlab | I use call too in my scripts, but the question was for launch.) | 10-Dec 10:01 |
| 15145 | Graham | Launch is broken that's why Gabriele is suggesting using call instead | 10-Dec 9:57 |
| 15144 | sqlab | with launch you can probably come next to what you want with launch {-s --do " script.r arg1 arg2"} | 10-Dec 9:52 |
| 15143 | Gabriele | when you use file! call does a to-local-file automatically, and wraps it in quotes. | 10-Dec 9:19 |
| 15142 | Gabriele | Steve: call reduce [system/options/boot %myscript.r "argument1" "argument2"] | 10-Dec 9:18 |