World: r3wp
[Core] Discuss core issues
older newer | first last |
btiffin 14-Nov-2007 [8889] | It's on the discussion plate. Gabriele mentioned that unicode will help REBOL open up in Asia, so it's a topic at the high levels. A couple of rebols have done some very nice work on fonts and character sets. Jerry Tsai comes to mind ... check the Unicode group for some of his links. Oldes has also pulled off some nice translators...again links in the Unicode group. To name but two. Even Bi-Di is being discussed. |
Gabriele 15-Nov-2007 [8890] | Daniel, afaik, R2 words are already utf-8 compliant. (thanks to the way utf-8 is designed) |
Pekr 15-Nov-2007 [8891] | What is current R2 recursion limit? Bobik reports me, that he does some tree, and it hits the barrier with 2000 iterations .... |
Oldes 15-Nov-2007 [8892] | Daniel: just read Unicode group in this world. |
Sunanda 15-Nov-2007 [8893] | 2000 sounds about the limit for R2. There's a script here that tests various limits like that: http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=rebol-stress-test.r |
Anton 15-Nov-2007 [8894] | Pekr, I think it depends how many local vars are used in the function. With one local var, I got 14263 recursions before stack overflow. Maybe he can optimize by moving some variables out into a shared context. |
DanielSz 15-Nov-2007 [8895] | Thanks everybody, I'll follow your advice. |
amacleod 28-Nov-2007 [8896] | I'm tring to open a .pdf from rebol script using "call" function. It works but i get that MSwindows console window poping up too. I know if you call the application (acrobat reader) at the same time you do not get the console window. any otehr wat to suppress the console from popping up? |
amacleod 29-Nov-2007 [8897x5] | This works: call "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\acrobat.exe C:\Program Files\PDFS\file.pdf" |
What would be the rebol path notation of the above. I tried variations of this: call "/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe /C/Program Files/PDFS/file.pdf", but I can not get it to work... | |
This will show the pdf with console: call %"/C/Program Files/ACI32/PDFS/X11070003.pdf" | |
This will start acrobat with no cosole: call %"/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe" | |
But I can not combine them as I did with using windows file path notation | |
Henrik 29-Nov-2007 [8902] | AFAIK there is no way to supress the console window in R2. |
Oldes 29-Nov-2007 [8903x2] | >> to-rebol-file "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\acrobat.exe" == %/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe |
if you have PRO license, you should use ShellExecuteA routine from shell32.dll | |
BrianH 29-Nov-2007 [8905x3] | amacleod, try this: call [%"/C/Program Files/Adobe/Acrobat 6.0/Acrobat/acrobat.exe" %"/C/Program Files/PDFS/file.pdf"] |
If the application starts and returns immediately, the console will close before you get a chance to see it. I think acrobat is one of those programs. If you are opening this pdf in the free reader, I would seriously suggest upgrading to reader 8.1.1 for security reasons, and because it's better. | |
CALL will do the to-local-file translation for any REBOL files it is passed (even in that block above, though not in nested blocks), and even wrap the filenames in quotes just in case they have spaces in them. | |
amacleod 29-Nov-2007 [8908] | BrianH, Your suggestion above works. I had tried the same thing but without the block...stupid me. Thanks! |
Rod 5-Dec-2007 [8909] | Any binary parse wizards ever tried to tackle the on disk file format that postgresql uses to store row data? I'm looking through the docs trying to get a handle on how tough it is. http://www.postgresql.org/docs/8.1/static/storage.html and http://www.postgresql.org/docs/8.1/static/storage-page-layout.html give a fairly detailed starting place, plus the source of course but my C is so rusty I think reviewing the raw data is going to be easier. We are trying to recover some data that was deleted (marked for) by accident. We basically need to find the serial key value and associate it with a text value for each row so we can rebuild the table and not lose the relationships that key off that serial numeric value in other tables. There are some good examples of binary parsing in the rebol.org script library so I know rebol can help write out a text version of the two values if we can get a handle on the structures involved. I'm open to suggestions or advice, this is not critical but would be a nice win to recover the key data. |
Oldes 6-Dec-2007 [8910x4] | I'm quite interested and I may give it a try... but I don't know when |
but I have only Postgresql 8.0 I'm not sure how much it's different | |
the header is same | |
here is a basic... http://box.lebeda.ws/~hmm/rebol/pgsql-db.rthis reads the postrge's file per pages... but I'm not sure what to do with the data inside and have to do something else now | |
Rod 6-Dec-2007 [8914] | Oldes, thanks for getting us started on the postgresql data parsing! Thanks, Rod. |
Henrik 14-Dec-2007 [8915x2] | is it possible to get the name of the script that was run with 'do? |
from inside that script, that is | |
BrianH 14-Dec-2007 [8917] | system/script/path gets the directory of the script, and you can put the name of the script in its header with the File field. |
Henrik 14-Dec-2007 [8918x2] | ah yes, but it doesn't work if you 'do other scripts inside that script. I guess I'll figure out some other method. |
the goal is only to be able to relaunch the script. | |
BrianH 14-Dec-2007 [8920] | If script %a calls script %b, b's system/script/path is set to its directory, and b's system/script/parent/path is set to a's directory. |
Henrik 14-Dec-2007 [8921] | perhaps a quick routine to find the root script? |
BrianH 14-Dec-2007 [8922x2] | If we set b's File field to %b in its header, we can get that value for relaunching or whatever. |
x: system/script while [x: x/parent] [root-dir: x/path] | |
Henrik 14-Dec-2007 [8924x2] | does that work? x/parent keeps being an object here. |
perhaps also ask if x = x/parent | |
BrianH 14-Dec-2007 [8926x2] | The top parent is none. |
x will never equal a/parent. | |
Henrik 14-Dec-2007 [8928] | oh, I didn't get that before, but I do now. odd. |
BrianH 14-Dec-2007 [8929] | a/ -> x/ |
Henrik 15-Dec-2007 [8930x2] | I see the problem now. Or at least a problem: If you 'do the same script multiple times in the console, the system/script object depth increases. |
another note: parent equals none the same time as the script header does, so to properly check whether you really don't have a parent, if you want to see the header, you should check parent/header, not just parent. | |
BrianH 15-Dec-2007 [8932] | No, the script object depth only increases if the script depth increases. When a script ends, system/script is set to system/script/parent. |
Henrik 15-Dec-2007 [8933] | ok, now I'm wondering why the script depth would increase. |
BrianH 15-Dec-2007 [8934x2] | Is the script calling itself, or does it return and have an outer trampoline script call it again? |
Or is the script creating some functiona and objects and returning so the caller can use them, then being reloaded by the caller to do this all over again? I wrote a server application in 2000 that acted that way, with scripts migrating the data from the previous incarnation still in memory. | |
Henrik 15-Dec-2007 [8936] | the script calls 4 other scripts once. one of these contains an object that must know the name of the launched script. that's basically all. |
BrianH 15-Dec-2007 [8937] | Does the object need to know the name of its own script, the calling script, or the script that is calling the code in the object? |
Henrik 15-Dec-2007 [8938] | it needs to know the name of the launched script. there can be any number of levels down to the script that was used to launch the script containing the object. but I have solved the problem now. I was just wondering why the script object depth increased on each run of the main script. |
older newer | first last |