AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 178 |
r3wp | 2151 |
total: | 2329 |
results window for this page: [start: 2229 end: 2328]
world-name: r3wp
Group: #Boron ... Open Source REBOL Clone [web-public] | ||
JaimeVargas: 20-Sep-2006 | Diffs. I mean load the current base from the repository and generata a universal patch using the diff cmd on the two copies. Then we can check changes one by one. | |
Kaj: 21-Nov-2009 | A little, but you get to load the entire environment over and over again for each, possibly short-lived, REBOL process you start | |
Group: !REBOL2 Releases ... Discuss 2.x releases [web-public] | ||
BrianH: 9-May-2011 | Have you looked into what would be necessary to make a host DLL wrapper for R3 that could be loadable with LOAD/library? Is it possible to make a host with LOAD/library directly? | |
Group: Core ... Discuss core issues [web-public] | ||
Geomol: 15-Aug-2011 | Gabriele, if we continue with design flaws related to binding, the following is to me in that category: >> blk: [x] == [x] >> x: 1 == 1 >> context [x: 2 append blk 'x] ; 1st alternative x >> use [x] [x: 3 append blk 'x] ; 2nd alternative x just to show different ways to do this == [x x x] >> blk == [x x x] >> reduce blk == [1 2 3] I came to think of this from your comment on scope. To me, REBOL does have scope, it's just different from most languages. In REBOL, every word belong somewhere, and three times the same word in a block can belong to three different places. That's the scoping rules. Now I want to save and load that block: >> save/all %/tmp/ex1.r blk ; using /all , even if it makes no difference here, but this questions /all, doesn't it? >> blk: load %/tmp/ex1.r == [x x x ] >> reduce blk == [1 1 1] So doing that changes everything. This design flaw (you may call it a "design feature") can be the cause of so much confusion and program failures, that I might even call it a "bug". ;) | |
Ladislav: 15-Aug-2011 | Aha, so you do not want to suggest any LOAD/MOLD changes, you want to have C | |
Ladislav: 15-Aug-2011 | Example: x: 1 blk: [] context [x: 2 append append blk 'x 'x] reduce blk ; == [2 2] reduce load mold blk ; == [1 1] | |
Geomol: 16-Aug-2011 | In your last example here, blk is created outside the context block. What I suggest is, that when you append x to blk, it doesn't matter, where you do that. The block defines the binding. So reducing blk in your example should give [1 1], and reduce load mold blk should also give [1 1]. Appending words to a block should mean that: appending words. | |
Ladislav: 16-Aug-2011 | Just being curious how does the "the block defines the binding" apply to the following? dr: func [block /local r] [r: copy [] foreach sb block [append/only r reduce sb]] x: 1 blk: [[x]] context [x: 2 append/only blk [x]] use [x] [x: 3 append/only blk [x]] blk dr blk dr load mold blk | |
BrianH: 16-Aug-2011 | The FUNC used to load the mezzanine functions at startup doesn't copy either, for the same efficiency reasons. | |
Geomol: 29-Oct-2011 | Yet an alternative: >> load form [[1][2][3]] == [1 2 3] | |
Geomol: 30-Oct-2011 | Why shouldn't decimals work? >> b: load form [[1.5] [2.5]] == [1.5 2.5] >> type? b/1 == decimal! | |
Ladislav: 30-Oct-2011 | another example, which does not work: type? load form [1] ; == integer! (i.e. not block!) | |
Sunanda: 30-Oct-2011 | I suggested the same approach, geomol. I added a caveat that it works for some datatypes, not others. It is particularly bad for objects: load form reduce [make object! [a: 1]] So, a useful approach if we are mindful of its limitations. | |
Geomol: 30-Oct-2011 | type? load form [1] ; == integer! (i.e. not block!) Yeah, that's a pity, I think. I would prefer LOAD to always return a block, so the result from LOAD could always be sent to e.g. PARSE. I guess, it's made this way to kinda let LOAD and SAVE reflect each other. But that doesn't quite make sense, as we can't save to a string. And LOAD can load an empty file giving an empty block, while we can't save an empty file with SAVE, afaik. | |
Geomol: 30-Oct-2011 | Example of what I find a bit strange: >> load "" == [] >> load "1" == 1 >> load "1 2" == [1 2] | |
Geomol: 30-Oct-2011 | Regarding decimals in blocks, are you saying, that if I have a block with a decimal, then the decimal can be different after going through a LOAD FORM combo? | |
Andreas: 30-Oct-2011 | if they load at all ... | |
Andreas: 30-Oct-2011 | Geomol, re "I would prefer LOAD to always return a block" check out LOAD/all. | |
Geomol: 30-Oct-2011 | If a decimal changes by a LOAD FORM combo, isn't that a bug? (I haven't found an example yet, that does what you claim.) | |
Geomol: 30-Oct-2011 | Andreas, I think, LOAD should with like LOAD/ALL in cases, where there is just one element. | |
Ladislav: 30-Oct-2011 | If a decimal changes by a LOAD FORM combo, isn't that a bug? - it was intended | |
Geomol: 30-Oct-2011 | Many languages return inf in cases with math overflow. I would prefer load mold 1.7976931348623157e308 to return [inf] instead of the now: ** Math error: math or number overflow And that inf in the block should of course be of type decimal!. | |
Sunanda: 9-Feb-2012 | Something inconsistent in the way paths are handled: to-string load "path/item" == "pathitem" to-string to-path "path/item" "path/item" | |
Maxim: 10-Feb-2012 | it also looks in the current-dir... but that path will depend of how you launched rebol. use WHAT-DIR just before you try to load your dll to know where the current-dir is at that time and put your dll there. you can also add a path in the user or system path environment and place the dll there. | |
Pekr: 11-Feb-2012 | My observation is, that if there are one or more dependant DLLs, REBOL will load first one, but then the path is somehow not taking into account a present directory. Here's few pointns: - you can't do: do %my-dir/my-dll-script.r - nor you can do so after: change-dir But it works, when you launch REBOL from the directory where those DLLs are present. | |
Group: Red ... Red language group [web-public] | ||
BrianH: 28-Feb-2011 | My old version of LOAD used it a lot, but the new version uses the CASE/all style to get the same effect with less overhead. | |
BrianH: 28-Feb-2011 | Look at the source of LOAD and sys/load-header for some good examples of the CASE/all style. It's worth supporting. | |
Kaj: 13-Mar-2011 | So can't Red load dynamic libraries yet? | |
Kaj: 18-Mar-2011 | 0:bash::bash : Error: load_image() Invalid section size 0, expected 40 0:bash::bash : ERROR : execve(./empty) failed. Too late to recover, will exit | |
Dockimbel: 18-Mar-2011 | Should be 2 lines starting with LOAD. | |
Kaj: 18-Mar-2011 | [[kaj-:-syllable]:~/Red]readelf -l empty Elf file type is EXEC (Executable file) Entry point 0x8048074 There are 2 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x08048000 0x08048000 0x00184 0x00184 R E 0x1000 LOAD 0x000184 0x08048184 0x08048184 0x00032 0x00032 RW 0x1000 [[kaj-:-syllable]:~/Red] | |
Kaj: 18-Mar-2011 | Yes, I expect it not to work once loaded, but it doesn't even load yet | |
Dockimbel: 18-Mar-2011 | Ok it seems it relies on section headers rather than program headers: if ( sElfHdr.e_nSecHdrSize != sizeof( Elf32_SectionHeader_s ) ) { printk( "Error: load_image() Invalid section size %d, expected %d\n", sElfHdr.e_nSecHdrSize, sizeof( Elf32_SectionHeader_s ) ); nError = -EINVAL; goto error; } | |
BrianH: 19-Mar-2011 | It also helps when running Windows code on fake Windows-like OSes like SanOS that load at a different address. | |
Dockimbel: 29-Mar-2011 | For a simple reason: you can't use LOAD on not-REBOL datatypes names: #[pointer! 0] triggers a LOAD error. | |
Dockimbel: 29-Mar-2011 | Max: if you need to make commas LOAD-transparent in a string!, it is as easy as: replace/all string "," " " | |
BrianH: 29-Mar-2011 | Doc, if you match the serialized syntax for R2 structs then R2 can load your values to compile them. | |
BrianH: 29-Mar-2011 | Not at the source level, Doc. Just because that won't work in R2 doesn't mean it won't load. >> load "make struct! [a [pointer!]][0]" == [make struct! [a [pointer!]] [0] ] | |
Dockimbel: 21-Apr-2011 | Kaj: thanks for the report. I thought we were cleanly separating RO and RW sections in two different LOAD segments...maybe the flags are not correctly set in sections (or in section headers). I'll give it a look this weekend if Andreas has not the time to fix it before. | |
Kaj: 21-Apr-2011 | I remember that we had a similar problem many years ago when the standard GNU software that we incorporate started generating such a construct in new versions of the toolchain. I think our solution was a quick hack, so on the one hand we can load a lot of current software, but on the other hand it is also fairly easy to upset our loader | |
Kaj: 21-Apr-2011 | It is also possible that other adaptations need to be made to the format. Syllable can load Linux binary dynamic libraries if the dependencies are not Linux specific, but it can't load Linux binary program executables as far as I know - which we are trying now. There are subtle differences in their configurations, which we may need to adjust for | |
Kaj: 21-Apr-2011 | A page size of 1 works on Linux, but on Syllable the load error is still exactly the same | |
Kaj: 27-May-2011 | Red can load library functions with different calling conventions, but which convention does the emitter generate for its own functions? Cdecl? | |
Kaj: 27-May-2011 | We can load an awful lot of other software, so it seems prudent | |
Kaj: 5-Jul-2011 | The problem with the current GDb on Syllable is that it doesn't know how to load shared libraries, so it can't load cURL | |
Dockimbel: 15-Jul-2011 | Red/System relies on shared libraries dynamic linking at load time. CPU and ABI specific calling conventions are handled by respectively Red's target emitters and file emitters. I don't see how libffi could make it simpler or better. From what I understand from FFI (very short) descriptions, it is more suitable for high-level languages that can't or don't want to deal with low-level interfaces. | |
Geomol: 15-Jul-2011 | Ok, it's probably because I don't understand Red completely. At "load time", is that when the system starts up? (Maybe comparable to compile time.) FFI is, as I understand it, a way for high-level languages like Python, Ruby, Rebol, etc., to load a library at runtime and call its functions. Like we do in R2 with load/library and then some make routine! and finally call the functions. | |
Geomol: 15-Jul-2011 | (Actually FFI just handle the calling conventions, you have to load the libraries yourself with e.g. dlopen, dlsym, dlclose (POSIX) or LoadLibrary, GetProcAddress, FreeLibrary (Win32).) | |
Dockimbel: 15-Jul-2011 | Load time = Red executable load time. The OS does the job of binding the required shared library and making their functions available to Red/System programs. | |
Geomol: 15-Jul-2011 | So, when Red is running, you don't have functions to load another library and use its functions? | |
Dockimbel: 15-Jul-2011 | Not for now. In most use cases, binding at load time is enough. | |
Andreas: 16-Jul-2011 | R3 uses dlopen/dlsym/dlclose to load R3 extensions, which have a clearly defined exposed API (RX_Init, RX_Call). | |
Kaj: 7-Aug-2011 | Hm. I'm developing on Syllable Server. On Syllable Desktop, I can load the SDL library and print its version, but it segfaults on opening a window | |
james_nak: 22-Aug-2011 | Not that any of you would have issues with creating such a thing but here is an R2 version of the Colineau's (Jocko) Google translate app he created in Red. (Note, I didn't add all of the routines but if you take a look at Colineau's code it's all there.) Also, the female voice (use gTTS function instead of TTS function) is much better than the male in my opinion unless you want to hear "This is Amiga Speaking." and feel nostalgic. rebol [ title: {googletts.r} date: 20-aug-2011 usage: {gtts "Hello World." or tts "Hello World."} ] lib: load/library %tts-jc.dll TTS: make routine! [ lpStr [string!] return: [integer!] ] lib "TTS" gTTS: make routine! [ lpStr [string!] return: [integer!] ] lib "gTTS" ----- I created some nice memory tools for my son who is in law school with this by setting up the string and tweaking it and then recording it (I use Sound Forge). If I get some free time I'd like to create a dialect so that I can make an interactive tool with visual reinforcements. As I mentioned, you have to tweak the words and punctuation and that creates a problem with just reading the text normally, hence I'll require a mechanism to sort all that out. Oh, the dll is in the http://www.colineau.fr/rebol/downloads/demoTTS_Red.zip file | |
Kaj: 24-Aug-2011 | I can now load a GDK image and set it as the GTK window icon | |
Geomol: 9-Nov-2011 | Too bad, it's such a load to implement some security. :/ | |
Kaj: 2-Jan-2012 | However, x86 GNU/Linux does have atexit. Also, the cURL binding imports atexit through the C library binding, so if cURL programs load but GTK programs don't, that's sinister | |
Dockimbel: 7-Feb-2012 | Speed up the process: you'll be able to add easily new datatypes to Red. I won't code myself all the 50+ REBOL datatypes, only the basic and important ones. For example, I would very much appreciate if date! and time! could be contributed by someone. The basic types will be quick to add as soon as the underlying Red runtime (think MAKE, LOAD and a few basic natives) will be operational. | |
Kaj: 12-Feb-2012 | What your binding still does differently than the C code is that the C code loads the functions dynamically, while Red #import embeds loader symbols in the executable format. I think GetProcAddress is the standard Windows function to load symbols manually at run time | |
Kaj: 12-Feb-2012 | You should bind the GetProcAddress function (I think there are already Red/System Windows examples floating around that use it), find out how to get the value of the g_hLedCtrlInst library handle, and use them to load the functions like the C code does | |
Kaj: 12-Feb-2012 | If you can find the functions you need in there, it shouldn't be necessary to load them manually. If so, something else keeps your functions from working | |
Kaj: 12-Feb-2012 | Besides GetProcAddress, there's a set of a few function for loading libraries and symbols. You'd need to bind them and use them to load the library, which yields the library handle, and then load the functions. They're what load/library and make routine! in REBOL use | |
Pekr: 12-Feb-2012 | Hmm, so in my case the situation in Red/System is even worse than possibly in R2 and World, where I could get such a handle from load/library directive, whereas in Red/System, what you describe, is writing completly separate layer. In fact, C's LoadLibrary is not difficult to handle, but still - a C level coding, which I thought is almost eliminated for wrapping purposes ... | |
Kaj: 12-Feb-2012 | All in all, if it's possible to load the functions manually, it should also be possible to import them at load time with the regular #import method. So something else may be wrong in the binding | |
Pekr: 12-Feb-2012 | Kaj - so I defined following functions. It returns something :-) Hopefully I have an integer handle, representing the "address"? of the requested function. Now is the last step you described - how should I invoke it? "Kernel32.dll" stdcall [ load-library: "LoadLibraryA" [ name [c-string!] return: [integer!] ] get-proc-address: "GetProcAddress" [ library-handle [integer!] function-name [c-string!] return: [integer!] ] ] print ["load-library: " handle: load-library "LedCtrl.dll" lf] print ["get-proc-address: " get-proc-address handle "LSN_IsPower" lf] | |
Dockimbel: 14-Feb-2012 | Pekr: (short answer) Red/System (and Red) generate executable binaries while R2/R3, while World and all other interpreted languages just run code in an interpreter or VM. This is a big difference, because Red can use the OS to load libraries at "load-time" instead of having to write code to do it (as all others interpreted languages require). This is also faster than loading manually. Red/System doesn't have yet a x-platform extension for adding "run-time" library loading support, just because we don't need it at all for now, but it can be added easily, by wrapping libFFI for example, or implementing it purely in Red/System. | |
Pekr: 14-Feb-2012 | We tried to manual load library and get the proc address to be able to wrap a function, which crashes Red (as well as REBOL, World). It might be, that the library is not properly constructed for such a case. But Kaj mentioned something like parameter being a function! type, which is not supported, nor do we know, if it is planned, or if it even help our case .... | |
Pekr: 14-Feb-2012 | OK, so if I understand it correctly, Red/System loads the library at an executable load time, whereas load/library does so dynamically in the app run-time. Stil - I wonder, if we could get a handle to such a library? I mean, syntactically #import is just like preprocessor construct - you can't assign it to any variable. Not sure it would be usefull, to be able to retrieve a handle to such wrapped library plus handles (entry points) to wrapped function calls? | |
Dockimbel: 14-Feb-2012 | Pekr: you've mixed up completly "load-time" and "run-time" library loading. You don't need a library handle at "load-time" (unless you want to hack something in the OS). Also, you don't need any of your code above, just the #import declaration with the right function names (finding the right names seems to be the most complex part in the case of the library with the weird API you're using) | |
Group: Topaz ... The Topaz Language [web-public] | ||
BrianH: 26-Nov-2011 | Well, Topaz compiles to or is interpreted in JavaScript at the moment. There are several ways to run JS on Windows outside of web browsers - it is one of the ActiveScripting languages, so you can use cscript, for instance - or you can load the Topaz environment in a web page, which can be a local html file with no web server needed. None of this is tested yet, of course, so be sure to tell us how well that works for you :) | |
Maxim: 8-Feb-2012 | henrik, do you mean something like? : topaz: func [ block ][ load read/custom http://server/try-topaz.htmlreduce ['POST mold block] ] (where the post data above is replaced by whatever is required to properly fill in the form) | |
Group: World ... For discussion of World language [web-public] | ||
Pekr: 1-Dec-2011 | hmm, KWATZ, I think that Btiffin would be happy, because IIRC, he wanted to be able to load "any" data :-) | |
Cyphre: 1-Dec-2011 | Or maybe even better solution to enhance LOAD to support ON-KWATZ callback: load/on-kwatz "...anydata..." func [ kwatz [binary!] /local valid-data ][ valid-data: <do something with kwatz here> return valid-data ;or return FALSE to not change the data at the loaded block position ] This way you don't even need to use any new flag for the kwatz binary and the colision is detected and solved right during the LOADing as I think it is not neccesary to validate the data later than that. | |
BrianH: 2-Dec-2011 | When we tried something similar to the LOAD/on-kwatz trick in R3 (named LOAD/on-error there) it turned out to slow down LOAD so much that it made it unusable - something about switching back and forth between native and interpreter execution schemes. The alternative of having a kwatz! type returned had the effect of changing a load-time check for syntax errors in the source code into a runtime check for invalid values, but only if you are expecting such things and testing for them explicitly. Under normal circumstances a kwatz-accepting loader would often result in code that would run slightly wrong but not trigger an error to help you figure out why. This is why you should make sure that your regular code loader triggers errors by default when it encounters unexpected syntax. An option to be more forgiving would be helpful when loading dialects that explicitly support particular kinds of extended syntax - and thus are expecting kwatz! - or for loading user data for analysis. | |
Geomol: 6-Dec-2011 | Defining routines is very flexible, a bit against my simplistic philosophy for World, but now it's done. Having e.g. libc (OS X example): libc: load/library %/usr/lib/libc.dylib Defining PUTS can be as simple as: puts: make routine! [ libc "puts" [ [string!] pointer ] sint ] or as full of info and features as: puts: make routine! [ "Writes a string to stdout followed by a newline." [typecheck] libc "puts" [ string [string!] pointer "String to write to stdout" ] sint integer! ] | |
Geomol: 7-Dec-2011 | World should accept REBOL [] as header to run R2, R3 scripts through it without editing these. For now, it's possible to run REBOL scripts with this function: do-rebol: func [file][do skip load file 2] | |
Geomol: 13-Dec-2011 | That's cool, Brian! :) A note about KWATZ!, you suggest it to be text!, but it's not quite. It sure can be e.g. UTF-8 data: (Setting my Terminal program to character encoding Unicode (UTF-8) and trying to load 3 ASCII letters, 3 danish letters and 3 greek letters) w> load "abc ?????? ??????" == [abc #{C3A6C3B8C3A5} #{CEB1CEB2CEB3}] (Notice World isn't prepared to unicode yet, but can load it, as it can just be seen as bytes.) But beside text, KWATZ! can also handle all other data, like escape codes or any binary format maybe combined with more understandable data, you wanna load. | |
Geomol: 15-Dec-2011 | In the above example, libc is defined as: libc: load/library %/usr/lib/libc.dylib | |
Geomol: 15-Dec-2011 | There seem to be a problem with routines returning a handle. A library like MagickWand (part of ImageMagick) works this way. I'm not able to test it with MagickWand, as I'm not able to load that library for different reasons, and I don't wanna use too much time on it. So I'm after another library, that has a routine, which returns a handle, so I can test. A library easily to get for OS X, Linux and Windows would be nice. Any suggestions? | |
Geomol: 15-Dec-2011 | I was able to load MagickWand under Linux, and it seems to work with uint32 datatypes to hold the handle (a C pointer). But it doens't work so well when using the handle! datatype for that. It would be nice, if it worked, I guess. It's probably some type casting problem. | |
Pekr: 12-Feb-2012 | Geomol - could you please explain, how wrapping libraries in World are done? Call me dumb, but I can't understand it from a website. OK, found more in PDF docs. I just wonder, if I always should use typecheck? Eg. I wanted following function to return 0 or 1. I tried with variou int types on the C side, and integer! datatype on the World side. I was receiving very large integer numbers as a result, untill I put [typecheck] in there. Maybe I just had incorrect argument type on the C side selected? led: load/library %ledctrl.dll led-is-power?: make routine! [ [typecheck] led "LSN_IsPower" [] uint integer! ] | |
Group: REBOL Syntax ... Discussions about REBOL syntax [web-public] | ||
Ladislav: 14-Feb-2012 | Thank you, Peter. It is of note, that some (including myself) might prefer to use the "interpreter dialect naming convention", which gives it the LOAD dialect name... | |
Maxim: 14-Feb-2012 | actually, the rule should load the digits and fail if the integer it represents is higher than 255. | |
Ladislav: 16-Feb-2012 | hmm, just tested, and load "=>" does not work in R2 either | |
Ladislav: 16-Feb-2012 | hmm, it looks that #"^@" "works" as "END LOAD" | |
Ladislav: 16-Feb-2012 | Check END-LOAD | |
Ladislav: 17-Feb-2012 | A question for Brian: do you think the case: load "a<a>" ; == [a <a>] shall be mentioned in CC? (and, eventually, where?, a new ticket or an old one?) | |
Ladislav: 17-Feb-2012 | yes, load "aaaa/" reports an "invalid path". However, the word is valid. | |
Ladislav: 17-Feb-2012 | >> p: load "aaaa/1" == aaaa/1 >> type? first p == word! | |
Ladislav: 17-Feb-2012 | that is not a valid path, but this one is: >> type? second load "a/1.2.3/b" == tuple! | |
Gregg: 17-Feb-2012 | Otherwise, they load as a block. | |
Ladislav: 17-Feb-2012 | Hmm, this must be a LOAD bug, I think | |
Ladislav: 17-Feb-2012 | >> type? second load "a/1.1" == decimal! | |
BrianH: 17-Feb-2012 | >> load "a<a>" == [a <a>] Looks good to me. | |
Ladislav: 18-Feb-2012 | #[[BrianH >> load "a<a>" == [a <a>] Looks good to me. ]]BrianH Well, it does not look problematic at the first sight, but it does look problematic once we compare it to: >> load "1.2.3<t>" ** Syntax error: invalid "tuple" -- "1.2.3<t>" ** Where: to case load ** Near: (line 1) 1.2.3<t> | |
Ladislav: 18-Feb-2012 | Similarly the above load "+<tag>" and load "-<tag>" look like an inconsistency in syntax. | |
Ladislav: 18-Feb-2012 | When compared to load ".<tag>" | |
BrianH: 19-Feb-2012 | When people wanted to refer to the < word in R2, and they can't use the lit-word syntax for arrow words in R3 and pre-a97 R3, one way is to store that word in a block and use FIRST to get the value. However, in R2 that resulted in a value that LOAD choked on. The <] tradeoff was made really early on in the R3 project to solve that issue. The alternative would be to make MOLD mold [<] as [< ], or more specifically to make < mold as "< ", with an extra space every time. | |
BrianH: 23-Feb-2012 | Do you know if the REBOL syntax parser (LOAD and TRANSCODE) handles the unescaping and puts the decoded data into the url! structure, or if that is handled by the DECODE-URL mezzanine code? I'm hoping it's handled by the mezzanine, because it's broken in both R2 and R3 and mezzanine changes are the only kind we can make at the moment. | |
BrianH: 23-Feb-2012 | I've been hoping to fix that. I can load a hot-patch into R2, and include a patch in a host kit build in R3 or replace functions from %rebol.r if necessary. |
2201 / 2329 | 1 | 2 | 3 | 4 | 5 | ... | 20 | 21 | 22 | [23] | 24 |