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: 33 end: 132]
world-name: r4wp
Group: #Red ... Red language group [web-public] | ||
DocKimbel: 24-Aug-2012 | So for ppl where it loads, we have msvcrt rev >= 7600, for ppl where it doesn't load, we have rev 2600 and 6002 (Vista). Rebolek, are you running on a pre-RTM version of W7? | |
DocKimbel: 24-Aug-2012 | Anyway, it should load even on XP, so I really suspect a relocation need for boxes with older msvcrt. | |
DocKimbel: 24-Aug-2012 | I have changed 'on-load definition in last commit: You can now _optionally_ defined 4 callbacks when producing a DLL: on-load: func [hModule [integer!][...] on-unload: func [hModule [integer!][...] on-new-thread: func [hModule [integer!][...] on-exit-thread: func [hModule [integer!][...] hModule is a handler on the DLL instance. They don't need to be added to #export block. | |
DocKimbel: 24-Aug-2012 | Pekr and Rebolek: could you try to use ProcessMonitor (PM) to see if we can get a clue about what is blocking the DLL loading from R2? 1) Download it from: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 2) Run it 3) Open a REBOL console and CD to the folder where the DLL is located 4) In PM, drag'n drop the "target" icon to the REBOL console window 5) Type in console: lib: load/library %temp.dll 6) Scroll down in the PM window to look for rebol.exe process entries, look for failure reports in Result and Detail columns... | |
DocKimbel: 25-Aug-2012 | Red/System [] on-load: func [a [integer!]][ print-line "on-load executed" ] on-unload: func [a [integer!]][ print-line "on-unload executed" ] i: 56 foo: func [a [integer!] return: [integer!]][a + 1] #export [foo i] | |
Pekr: 25-Aug-2012 | >> exists? %temp.dll == true >> lib: load/library %temp.dll >> | |
Rebolek: 27-Aug-2012 | Well that was too soon. If I compile your example (%shared-lib.reds), I cannot load it into R2 (R2 crashes). If I comment all the on-* actors, I can load the lib, but I cannot access any values from the lib (foo, bar, i has no value). | |
Rebolek: 27-Aug-2012 | I have this code for Red/System DLL: f-1423181: func [a [integer!] return: [integer!]] [a + 1] f-10584225: func [a [integer!] return: [integer!]] [a - 1] #export [f-1423181 f-10584225] and this code in R2 to load it which throws error: >> lib: load/library %builds/routines.dll >> foo: make routine! [a [integer!] return: [integer!]] lib "f-1423181" >> bar: make routine! [a [integer!] return: [integer!]] lib "f-10584225" ** Access Error: Cannot open f-10584225 Is it Red/System or R2 problem? | |
DocKimbel: 17-Sep-2012 | Ok, I've added (not pushed yet) a new directive for including Red/System libs outside of 'red context. Example: #system-include [%tests/hello.reds] will load and compile the hello.reds script. Notice that relative include paths are resolved from Red/System root folder (%Red/red-system/). Does that cover your need Kaj? | |
DocKimbel: 23-Sep-2012 | ...or maybe it's just an auto-corrective feature of LOAD that comes handy for dialects. ;-) | |
Pekr: 30-Sep-2012 | big change in their paradigm. And the one, which fits imo REBOL. IIRC Carl always wanted some stronger storage option to load/save blocks. IIRC Rebin was needed? He once was considering adding SQLite, but found it too big. IMO it would be good if we used SQLite for Red, to standardise. I doubt we can find more efficient, powerfull, and cross-platform tool with the right licence? Of course more efficient solution might be done by pure Red facitilities, but unless we need really extra efficient solution, why to reinvent the wheel? | |
DocKimbel: 15-Oct-2012 | There's something deeply wrong in the way most so-called "modern" OS/desktops are designed. My 133MHz Bebox with a poor PCI video card was able to provide a very responsive UI, even under heavy load. The RPi feels like dying as soon as you launch the lightweight (no kidding!) web browser Midori...Of course, the browsing is very slow...I'm quite disappointed by that and it's not the hardware fault, the RPi is a great platform, but the software stack sucks a lot. | |
Kaj: 19-Oct-2012 | I get a new error on GTK on Linux when it tries to load the Red-48x48.png logo: | |
BrianH: 20-Oct-2012 | The same goes for extensions - their embedded module wrapper is treated like any other module. You could AOT compile R3 extension wrappers that dynamically load the extension's native code at runtime. | |
DocKimbel: 23-Oct-2012 | It depends how you define "unneeded parts". It's more complicated to define that it seems at first look. For example, you might want to drop date! type from runtime library if your code is not using it...but if you LOAD some external data that might contain some date! values, you'll have a problem. Anyway, we'll provide options for stripping from end binaries everything that can be stripped without altering program behavior. | |
BrianH: 24-Oct-2012 | Pekr, runtimes interpreters are allowed on iOS now, as long as they are approved by Apple. What is prohibited is running external scripts or scripts downloaded from the internet. All interpreted scripts need to be bundled with the app, so the app can be evaluated as a whole by the app store gatekeepers. I've given this some thought, and it may be possible to cripple an R3-like interpreter sufficiently to meet these criteria; all you need to do is put some limits into the LOAD and DO mezzanine code. Red could be similarly crippled if you want. | |
PeterWood: 30-Oct-2012 | Probably the easiiest way would be to inculde the Red runtime and use red/unicode/load-utf8 to create a Red string and Red/Platform/print-ucs4 to print it. | |
DocKimbel: 6-Nov-2012 | AdrianS: the output of the lexer is nested blocks of Red values, same as REBOL with its own lexer (LOAD). The AST is not stored anywhere, AST nodes are created and consumed on the fly during the compilation. So the closest thing to an AST you can get currently is the output of the lexer. For the needs of a code editor, maybe you could just invoke it on the currently edited line (though you would need to deal with unmatched opening/closing delimiters). I haven't yet though how I will achieve it in Red IDE. | |
DocKimbel: 7-Nov-2012 | Pekr: the difference between AOT and JIT compilation is much thiner than you think. Just load Red/System compiler code to your R2 app, pass it any source code at runtime, use the link?: no option and you get compiled code and related data in form of binary! values...and voilą! :-) The rest is same as for Cyphre's JIT, you need a way to call native code in memory, something that is hardly possible in R2, but maybe Cyphre found a hole to achieve it anyway. | |
DocKimbel: 7-Nov-2012 | Kaj: that's right. If you want addresses to be resolved, we need to add a in-memory linker. It will basically just resolve all the addresses. But that would not work as is with the imports that expect to be statically linked. So, a custom dynamic loader would be required (same requirements as for implementing LOAD/LIBRARY and MAKE ROUTINE!). | |
DocKimbel: 10-Nov-2012 | Yes, that's the "runtime lexer" in Red's roadmap. It is required for implementing LOAD (or TRANSCODE if you prefer). | |
BrianH: 10-Nov-2012 | I do prefer, actually. LOAD being mezzanine and calling a separate parser lets you do a lot of nice tricks. The "mezzanine" might be native in Red, but the separation of concerns is still a value. YMMV of course. | |
BrianH: 10-Nov-2012 | Agreed. The weird set of options turned out to be essential though. Every combination of options is used in LOAD at different points. We even need a /part option like that of DECOMPRESS/part, for the same reason. | |
Jerry: 22-Nov-2012 | Doc, can you make both MOLD and LOAD support /BINARY refinement to input/output Redbin format? | |
Henrik: 23-Nov-2012 | Example: ; Packet header values (keep in-sync with load-header and mold-packet): ph-version?: :second ph-session?: :third ph-encode?: :fourth ph-req-len?: :fifth ph-pay-len?: :sixth | |
DocKimbel: 7-Dec-2012 | Pekr: I guess the question is "why not i: #FFFFFFFF?"? Simply because # denotes an issue! value not an integer!. The hexadecimal format ending with an `h` character gets converted to an integer! value during the LOAD phase. If you have a better proposition for hexadecimal literal value, I would be glad to hear it. | |
DocKimbel: 7-Dec-2012 | Steeve: I have fixed the lexer bug, so it should at least load correctly now. But paren! in path are not yet compiled, so you'll get a "feature not implemented" at compilation. Also, passing a function as argument is not yet correctly handled. Also I'm unsure if s/:step: will be compiled correctly, as we haven't yet much tests for path accesses. | |
Maxim: 7-Dec-2012 | the following are currently invalid REBOL notations (the first three load in R2 but get scrambled) I prefer the first tree, since they are pretty obvious without any knowledge of the language. 16#FFFF000F 8#7124554764 2#0110110101 H#FFFF000F O#7124554764 B#0110110101 | |
DocKimbel: 16-Dec-2012 | Also, you won't find the source code of block literals in text format if you scan the binary, because they are stored as code and not data. That is the only way currently they can be stored in compiled binaries. Storing them as text would need a way to load them and then compile them at runtime (it will be possible in the future, but not right now). Anyway, the probably best way to store all those series literals is to allow the use of a redbin format. We will have that too at some point. | |
DocKimbel: 26-Dec-2012 | I have fixed the main issue in Red runtime for the REPL to work properly, now I just need to extend a bit the tokenizer (LOAD) to handle blocks and a few more details before releasing the code. The current tokenizer is very crude, I will rework it in the next days. | |
DocKimbel: 28-Dec-2012 | Kaj: congrats on the first binding made available to Red! :-) I've noticed in %examples/do-sql.red the comment for #include: "FIXME: #252". Actually, #252 is for Red/System, Red implements its own #include which behaves differently than the Red/System version. I've tried to make it more intuitive, but it still needs some adjustments, so feel free to open new tickets about that (with simple concrete test cases I can reproduce). Also keep in mind that #include at Red level is intended to be a temporary feature until we get DO, LOAD and READ working with files. I would like an include system that could work both for the interpreter and compiler without having to change any code. I'm not sure this is achievable, so in worst case, we'll keep #include as fall-back. | |
Kaj: 29-Dec-2012 | version: routine [ ; Return SQLite version. ; return: [string!] /local version ][ version: sqlite/version SET_RETURN ((string/load version length? version)) ] | |
Kaj: 1-Jan-2013 | Since string/load-in caches the source string when under 64 bytes, should console/input not refrain from free'ing BUFFER? | |
DocKimbel: 3-Jan-2013 | Hardly, the symbol table purpose is to provide a mapping between an integer value (the symbol ID) and a string representation. If we could allow the removal of a symbol, we would need: 1) to be sure that a symbol is not used anymore anywhere (would require an equivalent of a full GC collection pass) before removing it. 2) maintain a list of freed "slots" in the symbol table for re-use. 3) being able to trigger the symbols-GC at relevant points in time. Even with that, it would still be hard to counter a LOAD-based attack on the symbol table. | |
DocKimbel: 3-Jan-2013 | screen for limited word use That would need to happen at the LOAD level...not very clean from a design POV. | |
DocKimbel: 3-Jan-2013 | Actually the best defense against such attacks is to never use LOAD on untrusted sources. | |
Pierre: 11-Jan-2013 | REBOL [] do/args %makedoc2.r 'load-only doc: scan-doc read file: system/options/script set [title out] gen-html/options doc [(options)] file: last split-path file replace file ".txt" ".html" file2: copy file insert find file2 "." "-light" replace out "$DARK$" file replace out "$LIGHT$" file2 write file out replace out "dark.css" "light.css" write file2 out | |
Kaj: 1-Feb-2013 | Red [] #include %GTK/GTK.red view/title [ text: area button "Do" [ unless any [ none? script: get-area-text text empty? script empty? code: load script unset? result: do code ][ prin "== " probe result ] ] button "View" [ all [ script: get-area-text text not empty? script not empty? code: load script view code ] ] button "Quit" close ] "Red GTK+ IDE" | |
Kaj: 7-Feb-2013 | There's also a basic binding to image loading in GDK, so that would load you all image types that GDK supports, including JPEG: | |
Bo: 8-Feb-2013 | Recalling from the days when I didn't have an assembler, I had most of the decimal equivalents of the commands remembered because I input values into memory manually when I was writing code. Going back in my brain 20 years, I believe LDA (Load the accumulator) was 169. :-) | |
Bo: 8-Feb-2013 | With the following code: #include %GTK.reds with gdk [ err: declare struct! [value [g/g-error!]] myimg: load-image "image.jpg" err ] I get the following error: *** Compilation Error: invalid literal syntax: [value [g/g-error!]] If I change it to: err: declare struct! [value [c-string!]] I get the following error: *** Compilation Error: argument type mismatch on calling: gdk/load-image *** expected: [struct! [value [g/g-error!]]], found: [struct! [value [c-string!]]] | |
Kaj: 8-Feb-2013 | There's an example of using load-image in GTK.reds in the icon function | |
Bo: 8-Feb-2013 | Thanks! When I use load-image, it looks like it is returning a pointer. Is that correct? | |
Bo: 8-Feb-2013 | If 'load-image returns a pointer, how do I know when I have reached the end of the image? | |
Bo: 8-Feb-2013 | Better yet, assuming 'load-image returns a pointer, how do I access the first memory location referenced by the pointer? | |
Bo: 2-Mar-2013 | Sometimes, I'm such a dunce! Something Kaj said in the past hit me as I lay awake in bed at 4:45am this morning. IIRC, he said that Red/System could be used to extend R3. My problem is that I need to perform some advanced processing on jpg images. I wanted to do this natively in Red/System, but had issues getting the jpgs loaded into bitmap form. R3 can already load jpgs into bitmap form, so why not call a Red/System compiled executable to do the processing? | |
DocKimbel: 2-Mar-2013 | The interpreter (DO) is much more capable than the current console with its currently limited tokenizer (LOAD). So, e.g., the interpreter fully supports paths and refinements while the console don't. | |
BrianH: 6-Mar-2013 | But syntax incompatibility for the same datatypes is a bug. The only question is which language needs to change to make it compatible. I am not going to constrain Red to match what R3 can do now when R3 can change too. They are related languages. Arbitrary incompatibilities that aren't related to the differences in semantic models are bugs. Of course this is all keeping in mind that LOAD is just a function, but that doesn't make arbitrary incompatibilities a good idea. They are in the same syntax family. If it's a good idea to do for Red, it's a good idea to do for R3 as well. And if it's not a good idea to do for R3, then it is likely also not a good idea to do for Red for the same reasons. And maybe there is a better idea for both. | |
Kaj: 7-Mar-2013 | Would it be possible to implement { } multi-line strings in LOAD before the release? | |
Kaj: 7-Mar-2013 | LOAD doesn't parse file! type: | |
DocKimbel: 8-Mar-2013 | Got multiline strings LOADing working, but now I need to find a way to efficiently (if possible) output the right delimiters: probe load { { Hello World! } } == [" Hello World! "] | |
Kaj: 8-Mar-2013 | LOAD doesn't understand empty strings: | |
Kaj: 8-Mar-2013 | red>> "" *** Load Error: string ending delimiter not found! == """ red>> print "" *** Load Error: string ending delimiter not found! | |
DocKimbel: 8-Mar-2013 | I just added char! to LOAD. It doesn't support the whole set of escaped sequences, only the most used once. Also, the molding of codepoints < 32 is not escaped yet, so you'll get strange results on screen. I'm working on improving MOLD on string! and char!, to better support escaping of special characters and correct usage of {} braces when required. | |
Kaj: 8-Mar-2013 | The Red interpreter can now actually load and run REBOL scripts, as long as they're compatible and they don't have a Unix shebang line | |
Kaj: 9-Mar-2013 | red>> {} *** Load Error: string ending delimiter } not found! == {}} | |
Kaj: 9-Mar-2013 | red>> "" *** Load Error: string ending delimiter not found! == """ | |
DocKimbel: 9-Mar-2013 | Sounds like we really need LOAD regression tests if we want to finish this... | |
BrianH: 9-Mar-2013 | It's on my todo list to do more LOAD tests for R3. You can use those then, at least as a start. | |
DocKimbel: 9-Mar-2013 | Where do I find LOAD tests? There are only these ones: https://github.com/rebolsource/rebol-test/blob/master/load-tests.txt | |
Kaj: 10-Mar-2013 | Oh, that's probably the missing load/all | |
Kaj: 12-Mar-2013 | red>> load x *** Error: word has no value! *** Runtime Error 1: access violation *** at: 08079DD7h | |
Kaj: 12-Mar-2013 | red>> load x/y *** Error: word in path has no value! *** Runtime Error 1: access violation *** at: 08079DD7h | |
Group: Announce ... Announcements only - use Ann-reply to chat [web-public] | ||
MaxV: 17-Oct-2012 | just push "load OFF file" and test the models | |
Kaj: 23-Dec-2012 | My 6502 emulator in Red/System now takes the name of a ROM file as a command line parameter. It can load any ROM that's a multiple of 2 KB in size: | |
Kaj: 13-Jan-2013 | I've extended the Red interpreter console with the ability to load and run a script file, given as an optional program argument. It also has CALL now, so you can run simple programs with the intepreter and script the operating system. As before, ready built binaries are available in the test repository, in */Red/console-pro: http://archives.esperconsultancy.nl/Red-test/dir?ci=tip | |
Kaj: 30-Jan-2013 | Red [] #include %common/input-output.red #include %GTK/GTK.red load-file: function [ field [integer!] ; "widget!" area [integer!] ; "widget!" return: [logic!] ][ all [ link: get-field-text field not empty? link data: read link set-area-text area data ] ] view/title [ "File/URL:" line: field "" [load-file face text] button "Load" [load-file line text] button "Save" [ all [ link: get-field-text line not empty? link data: get-area-text text write link data ] ] text: area button "Quit" close ] "Red GTK+ Text Editor" | |
Kaj: 31-Jan-2013 | Red [] #include %common/input-output.red #include %GTK/GTK.red link: argument 1 load-file: function [ field [integer!] ; "widget!" area [integer!] ; "widget!" return: [logic!] ][ all [ link: get-field-text field not empty? link data: read link set-area-text area data ] ] view/title compose [ "File/URL:" line: field (any [link ""]) [load-file face text] button "Load" [load-file line text] button "Save" [ all [ link: get-field-text line not empty? link data: get-area-text text write link data ] ] text: area (any [ all [ link not empty? link read link ] "" ]) button "Quit" close ] "Red GTK+ Text Editor" | |
Kaj: 21-Feb-2013 | It turns out that the C library on Windows converts Windows newlines in text files to standard Unix newlines, so when reading a file, it can return fewer bytes than requested. I have extended the Red/System read-file function in the C library binding to support this: http://red.esperconsultancy.nl/Red-C-library/dir?ci=tip This fix propagates to READ in common/input-output, console-pro, GTK-text-editor and GTK-browser. They can now load local text files with Windows newlines, including those that were originally in Unix format but converted when downloading. Thanks to Doc for helping test, and to Gerard and Sqlab for additional reports. | |
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
Chris: 25-Sep-2012 | I forget, is an R3 a superset of R2? Or are there R2 values that won't load in R3? (not including #[...] literals) | |
Chris: 25-Sep-2012 | So there's not likely many cases where R3 would not load a .r script? | |
BrianH: 25-Sep-2012 | OS libraries and R3 libraries are both libraries. However, with GPL2 they make an exception for linking to OS libraries even if they're closed source. With GPL3 they extended that exception to libraries that come with a runtime or VM, like Java, .NET, or closed-source REBOL. The exception doesn't go the other way though: It's not allowed to link to GPL'd libraries with closed code. Ladislav, the runtime library is used to implement the interpreters, and includes the interpreters for that matter, but it's still a library. The DO interpreter really doesn't do a lot; it resolves the op and path syntax and dereferences words, but everything else is done by the functions of the runtime library, which your code is bound to at runtime. But for the good news, it's at runtime, so afaict the GPL doesn't require you to release your source because of that binding, as long as you load the source at runtime, which you pretty much have to do at the moment for scripts. Encapping is a trick, but you can handle that with some limitations. Extensions will need to be GPL 2, and that means that they can't be used to wrap closed-source libraries unless they were included with the operating system you're running on. Encapping regular scripts and modules is semantically iffy, but you could handle that with a FAQ entry that explicitly says that loading a R3 script doesn't count as linking, even if you bind the words to GPL'd values. The same FAQ entry would apply to scripts in files, databases, whatever. | |
Kaj: 26-Sep-2012 | For REBOL, it would be reasonable to view binding as linking. When you load a binary C library (such as r3.so) the linking is also done at runtime | |
Arnold: 19-Oct-2012 | Fossil without problems? Last login: Fri Oct 19 21:59:19 on ttys002 MacBook-van-Arnold-160:~ Arnold$ /Users/Arnold/Downloads/fossil ; exit; dyld: unknown required load command 0x80000022 Trace/BPT trap logout [Proces voltooid] | |
Kaj: 19-Oct-2012 | http://asqueella.blogspot.nl/2010/12/dyld-unknown-required-load-command.html | |
Bo: 4-Jan-2013 | I got a slightly different message when I tried it with 3G instead of WiFi, for some reason: >> do http://development.saphirion.com/experimental/oneliner-prime-numbers.r ** Access error: cannot open: tcp://development.saphirion.com:80 reason: -12 ** Where: open open unless sync-op either read either read-decode case load -apply-do ** Near: open conn port | |
DocKimbel: 24-Mar-2013 | I will do it myself if nobody else steps in, once we get the target console implemented (Unicode LOAD, EXIT and RETURN supported,...) | |
Kaj: 30-Mar-2013 | What I'm doing now is just a Linux build. A build on Syllable Desktop yields a different host executable: that is not compatible. The library would also be internatlly different when compiled on Syllable Desktop, but Desktop can still load a library compiled on Linux | |
Group: Rebol School ... REBOL School [web-public] | ||
DocKimbel: 10-Oct-2012 | Ok, from the UniServe folder, this code works: uniserve-path: %./ do %uni-engine.r uniserve/boot I had to change your absolute path in %reminder.r to: - line 11: do uniserve-path/libs/scheduler.r - line 24: feeds: load uniserve-path/docs/feeds.r | |
Sujoy: 10-Oct-2012 | nope - the scheduler is just fine... i'm now thinking it may have to do with using the shared/do-task in the on-load function... | |
Kaj: 10-Oct-2012 | #! /usr/bin/env r2 REBOL [] here: what-dir program: dirize clean-path here/../../../cms/files/program/PowerMezz do program/mezz/module.r load-module/from program module [ imports: [ %mezz/trees.r %mezz/load-html.r %mezz/html-to-text.r ] ][ ; print mold-tree load-html read http://osslo.nl/leveranciers make-dir %data for id 1 169 1 [ print id page: load-html read join http://osslo.nl/leveranciers?mod=organization&id= id content: get-node page/childs/html/childs/body/childs/div/childs/3/childs/2 body: get-node content/childs/table/childs/tbody ; print form-html/with body [pretty?: yes] ; print mold-tree body ; item: get-node body/childs/10/childs/2 ; print form-html/with item [pretty?: yes] ; print mold-tree item ; print mold item record: copy "" short-name: name: none unless get-node body/childs/tr/childs/th [ ; Missing record foreach item get-node body/childs [ switch/default type: trim get-node item/childs/td/childs/text/prop/value [ "Logo:" [ ; if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ ; repend record ; ['icon tab tab tab tab get-node item/childs/2/childs/a/childs/img/prop/src newline] ; ] ] "Naam:" [ if get-node item/childs/2/childs/1 [ repend record ['name tab tab tab tab name: trim/lines html-to-text get-node item/childs/2/childs/text/prop/value newline] ] ] ... "Adres:" [ unless empty? trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ street: get-node item/childs/2/childs/1/prop/value place: get-node item/childs/2/childs/3/prop/value number: next find/last street #" " street: trim/lines html-to-text copy/part street number unless empty? street [ repend record ['street tab tab tab tab street newline] ] unless empty? number [ repend record ['number tab tab tab tab number newline] ] unless place/1 = #" " [ where: find skip place 5 #" " repend record ['postal-code tab tab tab copy/part place where newline] place: where ] unless empty? place: trim/lines html-to-text place [ repend record ['place tab tab tab tab place newline] ] ] ] "Telefoon:" [ unless #{C2} = to-binary trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ repend record ['phones tab tab tab tab trim get-node item/childs/2/childs/text/prop/value newline] ] ] "Website:" [ if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ repend record ['websites tab tab tab trim get-node item/childs/2/childs/a/childs/text/prop/value newline] ] ] "E-mail:" [ if all [get-node item/childs/2/childs/1 get-node item/childs/2/childs/1/childs/1] [ repend record ['mail-addresses tab tab trim/all get-node item/childs/2/childs/a/childs/text/prop/value newline] ] ] "Profiel:" [ unless #{C2} = to-binary trim/lines html-to-text form-html/with get-node item/childs/2 [pretty?: yes] [ repend record [ 'description newline tab replace/all trim html-to-text form-html/with get-node item/childs/2 [pretty?: yes] "^/" "^/^-" newline ] ] ] ][ print ["Onbekend veld: " type] ] ] write rejoin [%data/ replace/all replace/all replace/all any [short-name name] #" " #"-" #"/" #"-" #"." "" %.txt ] record ] ] ] | |
MarcS: 12-Oct-2012 | henrik: so if i load the script, then do it, rather than doing the file? | |
MarcS: 12-Oct-2012 | >> x: load %foo.r == [ foo: [] append foo 1 ] >> do x == [1] >> do x == [1 1] >> foo == [1 1] | |
Ladislav: 12-Oct-2012 | However, when writing something like: a: [] into a file, you may not be totally sure that somebody does not LOAD your code and try to evaluate it twice.... | |
caelum: 31-Jan-2013 | So I have a block account: make object! [ name: "James" balance: $100 ss-number: #1234-XX-4321 deposit: func [amount] [balance: balance + amount] withdraw: func [amount] [balance: balance - amount] ] and I save it save %account-object account then I read it back in new-account: load %account-object account is an object, whilst new-account is a block. My question is, how do I load the object into new-account as an object? So I end up with another object, not a block | |
GrahamC: 31-Jan-2013 | Have you tried new-account: do load %account-object | |
Endo: 1-Feb-2013 | you can also use SAVE/ALL to save in serialized form: >> o: context [a: 1] save/all %file.r o p: load %file.r type? p == object! | |
Endo: 1-Feb-2013 | Yes, here is an example: >> save/all %file.txt o context [a: self] >> load %file.txt ** Syntax Error: Missing ] at end-of-script file.txt file is: #[object! [ a: #[object! [...] ;<--- ]] | |
BrianH: 1-Feb-2013 | In this case, you keep your code and data separate because code is best saved with MOLD and reconstructed with DO, but data of types that don't have a normal literal form (but aren't affected by binding) are often better saved with MOLD/all and restored with LOAD. The main thing is that we don't have a literal syntax to declare word bindings; instead, we have a way to construct them with code. Same goes for cyclic or DAG structures that aren't strictly nested. So, if you need to create such things, you need to run code. And you need to keep your untrustworthy data that you can't safely DO separate from that code. | |
GrahamC: 7-May-2013 | have you done 'load-gui before you run the script? | |
Endo: 27-May-2013 | Chris: is that normal? >> load-xml {<si><t xml:space="preserve">test</t></si>} == [ <si> [ <t> [ #space "preserve" %.txt "test" ] ] ] | |
Endo: 28-May-2013 | I see, I just confused if it's a bug or not. >> load-xml {<a>test</a>} ; == [ <a> "test" ] >> load-xml {<a b="c">test</a>} ; == [ <a> [ #b "c" %.txt "test" ] ] | |
Ladislav: 17-Jul-2013 | #[[DIdeC str: "abcdef" ==> Create a string! in memory, put "abcdef" as its content, create a word! 'str an make it point to its head. ]] - that is not true, in fact. The proper description is as follows: str: "abcdef" is a Rebol source (or a part of it). That source is first processed by LOAD. LOAD creates the Rebol value representing "abcdef". Also, LOAD does *not* set the 'str value (yet). Later on, when the DO function evaluates the (already LOAD-ed code), it just makes the 'str variable to refer to the string value not creating anything at all (this difference is crucial). | |
Ladislav: 18-Jul-2013 | Endo, you may know this case: my-code: [s: "" append s #"x"] do my-code do my-code ; == "xx" my explanation is accurate for this case as well. You can see that the string (the "" value following the s: set-word) was created by LOAD only once, while append occurred twice expanding the string to contain "xx". | |
Endo: 18-Jul-2013 | created by *LOAD* only once , Ok I got it now. Thanks for the explanation. | |
Group: Databases ... group to discuss various database issues and drivers [web-public] | ||
TomBon: 11-Dec-2012 | a quick update on elasticsearch. Currently I have reached 2TB datasize (~85M documents) on a single node. Queries now starting to slow down but the system is very stable even under heavy load. While queries in average took between 50-250ms against a dataset around 1TB the same queries are now in a range between 900-1500 ms. The average allocated java heap is around 9GB which is nearly 100% of the max heap size by a 15 shards and 0 replicas setting. elasticsearch looks like a very good candidate for handling big data with a need for 'near realtime' analysis. Classical RDBMS like mysql and postgresql where grilled at around 150-500GB. Another tested candidate was MongoDB which was great too but since it stores all metadata and fields uncompressed the waste of diskspace was ridiculous high. Furthermore query execution times differs unexpectable without any known reason by factor 3. Tokyo Cabinet started fine but around 1TB I have noticed file integrity problems which leads into endless restoring/repairing procedures. Adding sharding logic by coding an additional layer wasn't very motivating but could solve this issue. Within the next six months the datasize should reached the 100TB mark. Would be interesting to see how elasticsearch will scale and how many nodes are nessesary to handle this efficiently. | |
Pekr: 4-Jul-2013 | Has anyone tried to work with ODBC under R3? I somehow can't load following ODBC driver DLL: https://github.com/gurzgri/r3-odbc | |
Group: !REBOL3 ... General discussion about REBOL 3 [web-public] | ||
BrianH: 23-Dec-2012 | The only externally visible change is that sys/load-ext-module and sys/load-module return 3 values instead of 2. If you don't have any code that calls those functions directly, then all working code won't be affected. The only code outside of sys-load.r that could hypothetically call those functions would have been written by Ladislav for include, or Saphiron for their encapper, but even then it's unlikely. Andreas, you could grep Saphiron's sources to tell me if those functions are referenced outside of sys-load.r. | |
BrianH: 23-Dec-2012 | The only behavioral change is that length-specified embedding works. It was documented before, but didn't work because the code above sys/load-header didn't support it. With this it does. | |
Group: !R3 Building and Porting ... [web-public] | ||
Maxim: 22-Jan-2013 | so I'd use load/mold on the string from/to R3 ... |
1 / 2329 | [1] | 2 | 3 | 4 | 5 | ... | 20 | 21 | 22 | 23 | 24 |