World: r3wp
[Core] Discuss core issues
older newer | first last |
Maxim 9-Nov-2006 [6211] | and if he wants, he can just re-implement them natively, if the speed gains are worth it. |
Gregg 9-Nov-2006 [6212] | We can publish them, sure, but I don't know if they'll get into R3. |
Maxim 9-Nov-2006 [6213x3] | Carl is very open AFAICT. this is specifically walking on one issue which needs improvement in REBOL in general. |
part of why R3 is going to be so incompatible... I'd say its the perfect time to address this and actually propose stuff instead of just whine that they don't work ;-) | |
the speed is secondary at this stage... what we really need is to layout the logic and demonstrate a consistent path to conversion for all datatypes. two or three guiding principles will emerge out of the implementation... no need to try and define them too early on IMO. | |
Gregg 9-Nov-2006 [6216] | Agreed, but we don't have a community effort ogranized to propose and submit ideas, in general, for R3. Something *else* I keep meaning to do. :-) |
Maxim 9-Nov-2006 [6217] | revault ;-) |
Gregg 9-Nov-2006 [6218] | Yup. :-) |
Maxim 9-Nov-2006 [6219x3] | I have been toying with the idea to add system environment variable support in slim for the path resolution :-) |
I have the getenv all done... I think I prefer this method by far. | |
although the current "no install" solution will always stay... and works very well for testing and simple distribution of scripts. | |
Gregg 9-Nov-2006 [6222x2] | As an addition, correct, not the only way to specify SL:IM paths? |
I like "no install" solutions. :-) | |
Maxim 9-Nov-2006 [6224x2] | nope, the 5th option :-) |
btw, this is my buffer init procedure for routines: buffer: head insert/dup copy "" #"^@" 100 for a 100 byte buffer (99 max length C string) | |
Graham 9-Nov-2006 [6226] | Max, I think you'll find great difficulty in setting the environment |
Maxim 9-Nov-2006 [6227] | humm no I just want to read it. so that install can be setup by IT dept. instead of obsure and inconsistent user.r file |
Robert 10-Nov-2006 [6228] | What's the best way to avoid / handle "Math or number overflow" errors? How can I ensure that if the user inputs extrem big numbers, won't crash my app? Especially if I'm doing complex calculations. Do I have to wrap every calculation to catch this error? That would make the coding very cumbersome. |
Geomol 10-Nov-2006 [6229x2] | I guess, you'll need a validation routine to be called after each entering of a number by the user, and chech with something like if error? try [...] |
*check* | |
Robert 10-Nov-2006 [6231] | But as said, if you have formulars it depends on all input values if such an error can happen or not. |
Geomol 10-Nov-2006 [6232] | After validating the input, you should also put all calculations inside one big if error? try [...] and tell the user about overflow. It's not that strange! If you get an overflow, you get an error from REBOL, and you have ways to handle that, so it doesn't crash. |
Robert 10-Nov-2006 [6233x3] | Ok, but I have about 400 calculations in my app... |
So need to go through the complete code and wrap them all. | |
And those calcs are not one after the other. Scattered throughout the program. | |
Henrik 10-Nov-2006 [6236x2] | I have the same problem with networking operations. programs will halt to console if there is a networking error. the only real solution is to wrap your calculation code in a function. you could call it 'calc, and have that return a disarmed error on failure or a number or whatever fits to the situation. This way calc [2 / 0] wouldn't crash to console and it's fairly clean to insert. |
should read: The only real solution is to wrap your calculation code in a block and use that as a function argument. The function could be called 'calc. | |
Maxim 10-Nov-2006 [6238x3] | Rober, liquid is released... do try it out. |
(Robert, sorry) | |
since things are cached, only a value which changes cause any amount of processing... | |
Robert 10-Nov-2006 [6241] | Max, I will but this will need some test and a major rewrite of my app. So not for the 1.0 release. |
Maxim 10-Nov-2006 [6242x2] | anytime you need help, I'll be happy to give direction... |
more demos and tutorials comming shortly | |
Gabriele 10-Nov-2006 [6244] | robert, depending on your code, there may be an easier way than put try in every calculation; for example if you have a window and do the calculation when the user presses a button, you could just use try in the button's action; or, you could wrap the do-events (i.e. view) in try, and so on. it also depends on how easy it is to recover from a given point (the farther you are from the location of the error, the harder it is to recover, usually). |
Graham 17-Nov-2006 [6245] | What's the best available XML toolkit available for Rebol these days? |
Geomol 17-Nov-2006 [6246x2] | RebXML!? ;-) http://home.tiscali.dk/john.niclasen/rebxml/ |
Can't be much simpler than that, if simplicity is what you're after. | |
Graham 17-Nov-2006 [6248x3] | Looking now :) |
Is there a way to build a rebol object with these tools? | |
So, I can then identify elements using path notation? | |
Geomol 17-Nov-2006 [6251x8] | No, not with RebXML as it is now. |
Maybe we need rebxml2obj.r and obj2rebxml.r scripts!? | |
There is a problem with attributes. What if an attribute to a tag has the same name as another element within the content of the tag? | |
A rule could be made, that attributes are placed within a block named "attributes" within the object. But that you can't have a tag with the name "attributes". | |
But that = But then | |
Another solution could be, that attributes and content are treated the same, but then something like: <tag type="mytag"><type>mycontent</type></tag> will produce: tab: make object! [type: "mycontent"] and the attribute is lost. | |
tab: = tag: | |
(It's late here. Sorry about misspell.) | |
Graham 17-Nov-2006 [6259] | perhaps the content should be made an attribute of the tag. |
Geomol 17-Nov-2006 [6260] | That's a solution, but it can't cope with all XML. What should you call the content attribute? You might call it something, that another attribute is called already. |
older newer | first last |