AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 1023 |
r3wp | 10555 |
total: | 11578 |
results window for this page: [start: 801 end: 900]
world-name: r4wp
Group: #Red ... Red language group [web-public] | ||
DocKimbel: 12-Mar-2013 | My point is: an undefined word error is a user error, and exiting the interpreter with an error message is currently the best thing to do. I've removed the exit points after such errors because you've asked me to for making your demos run without exiting. But I shouldn't have done that. | |
DocKimbel: 12-Mar-2013 | You should strip it from a LOADed block before passing it to DO. | |
DocKimbel: 20-Mar-2013 | PRIN/PRINT now do an implicit REDUCE of their argument. Internally, it does a `reduce/into` to re-use the same block buffer each time, diminishing significantly the stress on the memory manager. | |
DocKimbel: 21-Mar-2013 | I've removed Q from the console-specific module thinking it was in boot.red. :-) Needs some rest.... I will put Q back in console.red. Sorry Arnold. BTW, how do you manage to call quit the console if you redefine Q for custom usage? | |
Endo: 22-Mar-2013 | I use 'q A LOT on R2 console. In scripts no need that shortcut but on console it is a MUST for me :) I open/close R2 console every 30 seconds to do something like english-turkish translation, to see NOW, to use functions manipulating clipboard etc. then Q-it.. | |
Arnold: 22-Mar-2013 | Hi do not recall it exactly but I think it was when I was developing the checkersgame program and somehow I had a variable q and when the code was executed the program and the console closed forcing me to restart REBOL. The solution you have chosen now will pretty wel have prevented this behaviour, still offering a shorthand for quit in console mode is welcomed by many. Good thinking again! | |
DocKimbel: 23-Mar-2013 | For now, the best you can do is read all the files in red/runtime/ that will give you a good insight on how to add new features. | |
DocKimbel: 24-Mar-2013 | BTW, we need to add doc-strings to all functions in %boot.red, I like the Rebol short but meaningful strings, but I have a few questions first: 1) Could we borrow them from R3? 2) Does that fall under Apache license too (I guess so, but just checking)? 3) In such case, where and how do we to put proper credits? | |
Henrik: 25-Mar-2013 | What does this do (I don't have access to Red here): repeat i i: 3 [print i] | |
Gregg: 25-Mar-2013 | My first reaction was the same as Endo and Bolek, because I'm used to the way it is. I rarely have to alias a loop counter for access outside the loop, and I like the language being smart enough to help me, so I don't have to declare these things all the time, or worry about leakage. However, my recent work on the idea of a new, general LOOP func (%mezz/new-loop.r here for those who didn't follow it) made me keenly aware of loop costs. I've only had a few instances where it really mattered, but I've still almost always avoided FOR, for performance reasons. Doc thinks things through carefully, and he has already said that FUNCTION could probably be smart enough to handle things for us, but we would have to consider how that works, to avoid environment dependent behavior. And how it affects very simple map/filter funcs. That is, do those one-liners now need /local specs. | |
DocKimbel: 25-Mar-2013 | Gregg, I'm still open to counter-arguments. If you want the language to do the job for you, FUNCTION should be able to provide you that. | |
Arnold: 25-Mar-2013 | Compiling the console works out of the box as described on my Macbook. I am impressed. The Repeat by Endo does what I read it that it should be doing. The Doc: is it intentional? red>> repeat i 10 [ ] == 10 red>> i == 10 is what I expect it to be after the performing of the repeat. Unless you argue that i should only be valid inside of the repeat, but you should work with a function then not with a repeat. I do not see what is not to be liked about that? In REBOL and Red it is the human way that is leading not the programmers mind that is used to bend along with the computers view of the world. Again beautiful progress Doc. | |
Gregg: 25-Mar-2013 | For conditionals, do you want to use TRUE as a shortcut? Rather than... "If condition is not FALSE or NONE ..." "If condition is not TRUE ..." | |
Gregg: 25-Mar-2013 | Doc string question. Example: if: make native! [ [ "If condition is TRUE, evaluate block; else return NONE." cond [any-type!] "Test condition." then-blk [block!] "Block to evaluate." ] #get-definition NAT_IF ] 1) For simple funcs, do we want to include doc strings for params that seem self-explanatory? 2) Do we want to include periods at the end of param doc strings? REBOL includes them for function doc strings, but not param doc strings (it seems). | |
Oldes: 28-Mar-2013 | Anyway, you can read/write including networking with Kaj's cURL binding already, but not to do something basic like 1.1 + 2.2 yet | |
Gregg: 29-Mar-2013 | I've started on some Red mezzanines in %Red/mezz/ here. Early days, but my hat is off to Doc for how far Red has come already. Yes, I crash the console a lot, and I can't DO files yet, but I can paste code into the console, play, and still make really good progress. | |
Kaj: 29-Mar-2013 | You can also give console-pro a file or URL to DO on the operating system command line | |
Bo: 3-Apr-2013 | Do you propose using github or something to host the Red/System bindings? | |
Bo: 3-Apr-2013 | Kaj, I did a Google search on isNaN and cannot find a list of C libraries that don't support it (or that do). Do you have any ideas on how to do this check? | |
Bo: 3-Apr-2013 | AdrianS: Unfortunately, it won't work for me: From their FAQ: 1.3 Does Everything search file contents? No, "Everything" does not search file contents, only file and folder names. I find that I search within file contents at least as much as for filenames. It shouldn't be too hard to write a Rebol-based standalone exe that would do this. I'll add it to my growing list of scripts to write. | |
Gregg: 3-Apr-2013 | Yes I have. It's great fun. Starting from the basics, seeing what you need to build everything else, and re-thinking how to do things because things like PARSE aren't there yet. | |
Arnold: 7-Apr-2013 | A new dual core machine? Do they still manufactor those? I kind of had the idea the OS decides when to use more than one processor. | |
Gregg: 10-Apr-2013 | Doc, on stress testing, I was just trying to do eyeball speed testing of some mezz code. | |
Gregg: 12-Apr-2013 | Since it's early days in Red, I'm toying with a lot of ideas and revisiting old REBOL funcs as I port them. JS has an interesting spin on MAP. I thought I'd see how hard it would be to do in Red. | |
DocKimbel: 13-Apr-2013 | Another note: messing up with the stack (using push/pop) in a user-function is fine as long as you returned the stack clean before calling a function that could generate an exception. Failure to do so will result in a crash. It might be possible to make stack-unwinding for exception resistant to such cases, I will investigate that. | |
DocKimbel: 16-Apr-2013 | No need, I will process tonight as I need to do a bit more work on exceptions (like documenting them). | |
DocKimbel: 17-Apr-2013 | Anyway, you don't need any conversion for Latin1, so you just have to do it for the other two formats. | |
PeterWood: 17-Apr-2013 | I'd be happy to look at a UCS-2 to UTF-8 conversion function but I don't have the time to do it at the moment. | |
DocKimbel: 18-Apr-2013 | It would be best to do the conversions on the fly, that is why I want to wait for I/O get done to implement such conversion routines. Anyway, for doing it now, you need to allocate a new string, the best way to do it is: str: as red-string! stack/push* str/header: TYPE_STRING str/head: 0 str/node: alloc-bytes size The new string! value will be put on stack, so any other call to a Red internal native or action might destroy it. Also, keep in mind that the GC is not there yet, so intensive I/O might quickly eat up all your RAM. | |
PeterWood: 19-Apr-2013 | I didn't think that it was possible to mix using the Red Memory Manager and C memory management in the same program. Is it safe to do so? | |
PeterWood: 21-Apr-2013 | Really the thanks should go to Nenad. Without his help, I still be trying to work out how to do it. | |
Kaj: 21-Apr-2013 | How do you mean? What you seem to ask is already possible | |
Kaj: 23-Apr-2013 | Seeing how much trouble we had forcing us to call the C library setup in Red programs, I think libraries donīt need to do it, but thatīs conjecture | |
Kaj: 24-Apr-2013 | I've found a nice keyboard configuration that seems to do everything I want | |
Gregg: 26-Apr-2013 | If Doc needs to do updates another place, that's not good, as we need to help keep him focused. If someone else is responsible, that would be best. | |
DocKimbel: 26-Apr-2013 | Franckly, I've reached my limit wrt to communication channels. Also it would be counter-productive to me to do such tasks, I see no reason why it couldn't be done by someone else? | |
Andreas: 26-Apr-2013 | Especially as it had nothing to do with Git, yes. | |
Marco: 28-Apr-2013 | I'd like to know what your development environment for Red/System is especially that used by Doc. In the meantime... My development environment: OS: Windows 7 Editor: Notepad++ v5.0.3 not the latest version but I prefer this one, using "Python" as the language for syntax highlithing and coloring (there is not a "REBOL" language) and used mainly for the folding on indentation (I can not live without folding, and folding on indentation makes life even easier) I have added a menu item with a keybord shortcut to run REBOL with the currently shown file as argument. I have added also a menu item with a keybord shortcut to run my modified version of REBOL-Word-Browser At the end of the r/s file I add these lines (mostly taken from Bruno Anselme): #if OS = '???? [{ REBOL [] appname: "myprog" rs-dir: %../Red-master-0.3.2_Bruno/red-system ; locate here your red-system directory dest: rejoin [what-dir appname ] print [ "------ Compiling" appname "------" ] do/args rs-dir/rsc.r rejoin ["-o " dest " " dest %.reds ] print [ "Destination file:" dest ] call/wait/show/console dest halt ;}] This way pressing the shortcut I can run REBOL that compiles the program I am writing and than starts the program. Any suggestion is welcomed! | |
DocKimbel: 28-Apr-2013 | 5) "Yes, I think it's very dangerous to claim that Red has Unicode and Latin-1 support". Red *has* Unicode support, string! and word! value support Unicode, input Red scripts are Unicode, PRINT outputs Unicode characters. Latin-1 is used as an *internal* encoding format, I don't remember ever claiming that "Red supports Latin-1 for I/O" except for the console script (which is wrong, I agree). OTOH, I do remember thinking about supporting it at the beginning for printing, then I found it cumbersome to support in addition to Unicode mode and dropped it during the implementation. | |
DocKimbel: 28-Apr-2013 | So, currently, only 7-bit ASCII is safe to input in the console. This limitation has nothing to do with Red implementation or the interpreter, it's a console input issue, so generalizing it to whole Red is inaccurate and unfair. | |
Arnold: 29-Apr-2013 | There is as I read this a different issue. Dock want Red to be as complete as posible, Kaj wants it to officially useable. Kaj really needs UTF-8 (and or Latin-1) character support, for getting this, I guess this has to do with the Syllable operating system amongst others. I would like Red to support time and random functions as natives and (Gregg is one of your mezz funcs REJOIN ? I want that too) be able to connect to a MySQL database so I can dump PHP for some webdevelopment. Besdies that we all love to see a VID (like) solution for display and creating apps. We have to be patient agreed 100% amongst everybody? Where the roadmap mentions all things to progress Red, above things are not on that list. I want Red to have enough to make it useable in production and after that expand, imho that is the way to really attrackt more funding/enthousiast programmers and make sure current support does not fade/ loose interest. | |
DocKimbel: 29-Apr-2013 | Why is it such a problem to have some criticism, too? There is no problem with that, and believe me, you can't be more critical on Red that I am myself. But I find it really unfair to paint a bad picture of whole Red because some features that are planned are not yet implemented. I can't go faster than the music, to get I/O done with required encoders/decoders, I need to setup the ports/devices infrastructure. To do that, I need objects support done. Also, as shown by my entries on Red Trello page, error! (and typeset!) support and getting a Unicode runtime lexer are even more prioritary to make Red "more usable for real-world apps". Moreover, when you manage a lot of tasks, some of them marked as "important" that keep been postponed because of other more urgent ones, will at some point become "urgent" themselves. That is what is happening with shared libs support, which is a blocker for getting Red on Android and iOS. I'll also probably make a Java bridge prototype this week before getting back on other Red features. | |
Pekr: 29-Apr-2013 | Almost forgot about the Trello page. Do you use that page as an interim planning for what is actually being worked on? If so, and once you have few minutes of spare time (I can imagine you don't :-), maybe one sentence reference on the Roadmap page would make it a nice addition: You can find actual tasks we work on on the following Trello page .... it would make feel ppl more dynamic about the project, as Roadmap page is rather static. OTOH we can watch Git commits, twitter, but still if one needs to know, what is an actual priority, and as far as Trello page is being updated, it would make some sense. E.g. "Download" addtion was imo very nic simplification for those starting with Red ... | |
DideC: 30-Apr-2013 | Doc: what do you mean when you say Textpad doesn't support Unicode ? I use Textpad 5.4.2 and see options to set UTF-8 as default text encoding and others options for BOM and so on. | |
DocKimbel: 30-Apr-2013 | The #call directive invokes a Red function, it has nothing to do with Rebol's CALL native. | |
DocKimbel: 30-Apr-2013 | Actually, it's fairly simple, think about a GUI app that sends a click event to your Red/System binding, how do you pass the event to Red code if you can't call it from Red/System. ;-) | |
Gregg: 7-May-2013 | Is there a Red/System page that states its goals? e.g., Is Red/System meant to be bare bones, or do you see adding some higher level elements, like D. I ask because D has various array types, and didn't know if you planned to implment a few core elements at the lowest level, so they can be used in Red/System, and then just exposed to Red. | |
DocKimbel: 8-May-2013 | One of Red/System DSL goals is to be as close as possible to the hardware, not as far as possible. This implies that no arbitrary abstraction layers will be ever added to Red/System that can't be more or less directly mapped onto some hardware features. Exceptions exist when some targets do not provide a basic feature that others are providing. For example, ARMv5 family do not have integer division, nor modulo support, so I had to implement it manually in the ARM emitter in assembler: https://github.com/dockimbel/Red/blob/master/red-system/targets/ARM.r#L372 Another one is the runtime exception system recently added (THROW) to Red/System, which also required a specific assembler routine: https://github.com/dockimbel/Red/blob/master/red-system/targets/ARM.r#L2008 | |
DocKimbel: 8-May-2013 | Being able to do whatever C does without its outdated syntax and bloated toolchains is a dream coming true. ;-) | |
Arnold: 8-May-2013 | @Peter I took the liberty of commenting the document here https://github.com/dockimbel/Red/wiki/Ideal-array-capabilities We could add Nenad's comment on it too. It is a giant wishlist indeed :) @Nenad, "Being able to do whatever C does without its outdated syntax and bloated toolchains is a dream coming true. ;-)" it is :) | |
GrahamC: 8-May-2013 | @Kaj do you have a url that takes me directly to these files? | |
GrahamC: 9-May-2013 | Do you want to add using it with GET and POST ? | |
Arnold: 9-May-2013 | Very much so and connecting it to my MySQL database as well! But that is not yet possible at this time. I do not see a use for a form if I cannot save information from it. R2 has all these possibilities, on rebol.org are various examples of scripts. For Red we might train our patience muscle of finance Nenad in the 'right' direction. | |
Pekr: 9-May-2013 | Do you want me to send you an error log it generated in the working directory? | |
Oldes: 13-May-2013 | Hi Doc, I was messing around with the PE. Added section: [.rsrc [- #{00000000000000000004000000000000}]] in compiler (this should be just empty .rsrc, and trying to build it in PE.r using: oh/rsrc-addr: section-addr? job '.rsrc oh/rsrc-size: length? job/sections/.rsrc/2 but the address is pointing into wrong position (512B less). You probably don't know without some deeper examination, what may be the reason, do you? Btw. there should be: .rsrc #{40000040} ;-- [read initialized] at this line: https://github.com/dockimbel/Red/blob/master/red-system/formats/PE.r#L119 (the section name starts with a dot). | |
Oldes: 13-May-2013 | if the .res is just binary representation of the rsrc section, why not. But be able to append icon without need to use hacking tools would be nice as well. But we must do small steps here. At least we, who don't have Doc's brain:) | |
Pekr: 14-May-2013 | I might miss some basic OS understanding. Guys, how do you work with all the path? I have JAVA installed, REBOL installed, yet what I am strugling with, is path. When I follow docs, it always seems to be easy. Docs state: do/args %rsc.r "-dlib %bridges/java/JNIdemo.reds -o %bridges/java/JNIdemo" well, for normal user, in order to try that, user needs to understand, he has to start Rebol for that. So there are basically two options: - running REBOL from icon. Then you have to change-dir to where Red is - in my case, something like C:\!Rebol\Red - I thought, I might use just "pressing ENTER" upon Red.r, which launches console for me. But above still will not work, unless I change-dir into red-system subdir. It should be imo either stated in the docs, or some shortcuts provided, e.g. red-system.r, allowing me to launch console directly in that subdir, and then above command would run just OK. I am not stating anything is wronk, it is upon user to improve the workflow, but surely it is an obstacle for occassional user. Now back to docs: 2. Compile and run the JNIdemo.java app from console: $ javac JNIdemo.java $ java JNIdemo Well, when in console, my console does not recognise javac, nor java executables. Apparently a path problem, but I have JAVA installed via installer. So I have to go inside JAVA dir, which means: cd c:\Program Files (x86)\Java\jdk1.7.0_21\bin\ javac c:\!rebol\!Red\\red-system\bridges\java\ Any tips? :-) | |
DocKimbel: 15-May-2013 | I will do a prototype wrapping of the Android GUI API in a few days, so you'll be able to put your VID-like dialect on top of it. ;-) | |
Pekr: 16-May-2013 | Doc, tried to clone your examples, so that I could do some first tests by trying to adapt your code, I got into strange problem. I copied your hello.red into pekr.red and generated the pekr-lib.dll. Changed bridge.java to load pekr-lib.dll. And - it works. However - when I tried to clone bridge.java into pekr.java, or simply change "class bridge {" to e.g. "class fridge {", to generate differently named java app (fridge.class), it does not work. Is bridge class somehow hardcoded somewhere in the API? | |
Pekr: 16-May-2013 | btw - I was able to add the button: button: java-new [ java.awt.Button "Test" ] java-do [frame/add button] .... but then label does not display :-) The layout manager probably needs different technique to work with. Btw isn't AWT really old, something like 1995? :-) | |
Pekr: 16-May-2013 | Now question to API. On SO I found comparisong of AWT vs Swing: ... to add a child to an AWT frame you'd write: frame.add(child); However using JFrame you need to add the child to the JFrame's content pane instead: frame.getContentPane().add(child); How the above function could be invoked via API? Would java-do [frame/getContentPane/Add ...] work? | |
Kaj: 16-May-2013 | Or perhaps two java-do's in a row should do it. I'm not sure how to pass the child object, though | |
DocKimbel: 16-May-2013 | Is bridge class somehow hardcoded somewhere in the API? Yes, that's a Java/JNI requirement. The name of exported symbols from the shared lib have to include full Java class names. Do not change the name of Java classes in bridge.java. | |
DocKimbel: 16-May-2013 | Would java-do [frame/getContentPane/Add ...] work? No, as Kaj said, you need to split it in two parts. However we could extend the API to handle sur syntax, but at this point, it would be overkill. | |
Pekr: 18-May-2013 | Working in Android Studio a bit, looking into structures, what does it support, etc., I can't foresee, what our aproach is going to be, so lookinf forward to it. E.g. the IDE generates GUI definitions into XML files, ditto various configs, translations. So - what I expect is that you create basid .apk with certain featureset, and from that on, it will be manipulated from Red side. Justo wondering, if we will be able to dynamically generate UI elements, etc? Or will you suggest ppl to use your basic .apk, do certain work in Android Studio, and the supporting backend in Red? Or is your idea that ppl should not need to eventually touch sw like Android Studio? | |
Kaj: 22-May-2013 | That's going to be hard. A lot of information will be lost in compilation, especially for Red/System code and especially when the compilers will do optimisations | |
james_nak: 28-May-2013 | Kaj, not to interupt your interesting conversation with the other "doc" but I was wondering if you could briefly summarize what one can do with all the bindings you have created. I specifically am interested in what that all means to android. | |
Kaj: 28-May-2013 | To get a feel for what Red can currently do, it's best to run my GTK-browser example, here in the Red/ folder for your platform: | |
Kaj: 28-May-2013 | It uses only libraries known to be shipped with OS X, so it's just the one executable. But you do need 32 bit versions of those libraries | |
Geomol: 29-May-2013 | I think, string parsing is not 100% yet (need to do more tests), but block parsing should be there. | |
Geomol: 29-May-2013 | I got the red-core interpreter running here btw. That was easy. But I miss a HELP function in there. And I see a lot of functions, so it seems to have come quite a way, but no DO of scripts? | |
Kaj: 29-May-2013 | I/O is not in Red, only in my extensions. DO is the internal interpreter, so it doesn't know about my I/O. It's a good point, I should try to override DO | |
Geomol: 29-May-2013 | I think, it would be a lot easier for e.g. Gregg to create mezzanines, if he could do a script with them, like cortex.w and rebol.w in World. | |
Kaj: 29-May-2013 | It's very introductory, like What, Why, When, Where. You need that before you know to do HELP function! | |
Kaj: 2-Jun-2013 | I agree that TO [a | b] is very important in a parser. I was surprised when I found that R2 doesn't do it | |
Pekr: 3-Jun-2013 | Idiom I long time wanted - to [a | b] might be more expensive imo, as it will do incremental searches, evaluate the lower index and apply the rule. Whereas recursive [a | b | skip rule] will skip one positition at a time, trying to match rules .... or that is how I imagine the difference :-) | |
Ladislav: 3-Jun-2013 | I do not "reserve" anything for anybody. I just know that "using trial and error" is (unfortunately) not the way how to get things done. | |
Pekr: 3-Jun-2013 | Ladislav, so simple question - so would you discard to [a | b] from the R3? Do you find it as a performance penalty, or teaching ppl wrong habits, preventing them to actually understand, what is parse about, or something like that? | |
Ladislav: 3-Jun-2013 | Do you find it as a performance penalty, or teaching ppl wrong habits, preventing them to actually understand, what is parse about, or something like that? - The answer is "no" to all the above questions. It is neither a performance penalty, nor teaching people wrong habits or prevent them to actually understand... | |
Gregg: 3-Jun-2013 | I imagine Doc will profile things if performance becomes his argument. I support what makes it easier to use PARSE to get the job done, though sometimes there may be confusion between those who understand parsing at a deep level and those who don't. I would rather have support for TO [a | b], and other rules, even at the cost of them having lower performance, versus people not being able to do the job at all. In docs, we can note the tradeoffs, and people can optimize if necessary. | |
GrahamC: 3-Jun-2013 | Is Gabriele still going to do the parse implementation? Or was that just a rumour? | |
Gerard: 3-Jun-2013 | For your information, http://en.wikipedia.org/wiki/Parsing_Expression_Grammar gives some PEG related info that could be used to explain how REBOL uses PARSE to do almost ALL the same work ... and presents some fundamental differences with CFG and RegEx parsing. As you'll see for some simple (and not so simple) grammars REBOL Parse function works on par with the PEG theory. | |
Gabriele: 4-Jun-2013 | Parse: I simply wanted to try porting Topaz's PARSE. Not sure if that would or could become the built in one. I hope to still be able to do it eventually... we'll see. | |
Pekr: 6-Jun-2013 | well, not sure my English is OK for that :-) Nor do I feel technically skilled, to claim anything about the language and its characteristics .... | |
Arnold: 6-Jun-2013 | If you are not sure of your english being good enough, well go ahead and just do edit the site and we will tell you what can be approved. Nothing held against you! Happy to see a little more life (or is it live) on the site. together we can do more than on our own. It takes just some initiative now and then. | |
Arnold: 6-Jun-2013 | I could try to do something like that, but it will be a playlist under my account, not very findable/ related to REBOL/Red | |
Group: !REBOL3 ... General discussion about REBOL 3 [web-public] | ||
Gregg: 1-Apr-2013 | Anton, which is the behavior question. Do you expect SPLIT-PATH to return a target you can write to (i.e. a file)? | |
Gregg: 1-Apr-2013 | Let's widen the discussion a bit. Spitting a string at a delimiter. Easy enough to define clear behavior if the series contains the delimiter, but what if it doesn't? Most split funcs return an array, splitting at each dlm. If no dlm, return the original series as the only element in that array. What if we always want to return two elements? e.g., we have a SPLIT-AT func that can split a series into two parts, given either an integer index or value to match. Let's also give it a /LAST refinement, so it can split at the last matching value found, like FIND/LAST works. Given that, what do you expect in the case where the dlm (e.g. "=") is not in the series? SPLIT-AT "abcdef" "=" == [? ?] SPLIT-AT/LAST "abcdef" "=" == [? ?] | |
Maxim: 1-Apr-2013 | I haven't had the time to follow all the discussion in detail, but to me, the second part of split-path should NEVER return a directory path. when doing set [dir file] I should be able to count on the fact that the second part is either a file or none. The same for the first part which should always be none or a dir. I have my own implementation in R2 which makes this strict and it simplifies a lot of code. so we can do with absolute certainty: if second set [dir file] split path [ ] IIRC some of the versions of my split perform a clean-path to simplify and add robustness to the result. | |
Ladislav: 2-Apr-2013 | (I do not object against adjustment, but would expect the help string to be changed as well to be compatible with this) | |
Bo: 2-Apr-2013 | I prefer split-path %foo == [%./ %foo] The reason is because I believe split-path shouldn't require an extra check if all you want to do is read the base directory that a file is in. I think this is a common use of split-path. | |
Gregg: 2-Apr-2013 | Do our preferences come from the basic difference of whether we want SPLIT-PATH to be "smart" about file specs, or whether it should assume nothing (the REJOIN invariant case)? For example, Andreas's path invariant (p/:t) makes a lot of sense, but some of his examples' results look wrong when just viewed as results. e.g.: ; %/ [%/ %/] ; %// [%/ %/] ; %./ [%./ %./] | |
Andreas: 2-Apr-2013 | It could only do that in relation to a file system or with the simple heuristic used by DIR? as well: based on the presence of absence of a trailing slash. | |
Maxim: 2-Apr-2013 | Andreas, the trailing slash is the separator. Are you proposing that split-path do a system check to verify if its a file? like dir? does in R2? | |
Maxim: 2-Apr-2013 | if it where a generic string handling function I'd agree with you... but its not... it has added meaning, it splits filesystem paths. its not just a string. if it where, I'd use parse or some tokenize func. I see absolutely no merit in trying to make split-path act like a generic string handling func. the point of the func is to separate folder and file into two parts. to me it comes down to either you decide that when there is no data you invent a default, or use the internal one which is none, which works well with soooo many other funcs. if there is no directory part in the path, do not try to find a suitable value for it... there is none... funny, even when trying to explain my point of view, the actual sentence reads almost like a line of rebol source. :-) | |
Pekr: 9-Apr-2013 | The problem is, that while the R3-GUI is now more flexible by removing reactors, it is also more difficult to understand. I remember trying to understand the 'on-action issue in the past, now I briefly re-read the doc, and I still can't understand the design. I need following things to be cleared up for me, so that I can both use it, and possibly explain it to others: 1) If you look into Actors docs - http://development.saphirion.com/rebol/r3gui/actors/index.shtml# , there is no mention of 'on-action actors. There are many actors listed, but not the 'on action one 2) The 'on-action actor is mentioned in the attached doc at the same URL, describing, why reactors were removed. So here is the definition of 'on-action: a) "The ON-ACTION actor is useful if the style needs to call some default action from multiple places (actors) in the style definition." - understand the purpose, but why and when I would like to do such thing? Any example easy to understand? Just one sentence maybe? b) "For example, the BUTTON style needs to call the default style action from the ON-KEY actor and also from the ON-CLICK actor, so it is better to call the ON-ACTION actor from the both code points to avoid the necessity to override multiple style actors." - looking at button or even clicker style definition, I can see no such stuff, as 'on-key or 'on-click calling anything named 'on-action. That is the part that is most confusing for me, and which did not help to understand the 'on-action a little bit. Are we talking about the 'do-face here? There is also a question, if better name could be found for 'on-action. Unless I can fully understand, what happens here, difficult to suggest. Now to make it clear - I am not judging architecture, just trying to get my head around the docs and button/style examples. And being average reboller - if I have difficulcy to understand it, the chances are, there is more ppl, which will strugle in that area? | |
Ladislav: 9-Apr-2013 | Apart from Unicode, we have no comparison over REBOL2 for new and better feature which could motivate the programmer. - wrong again, you surely heard about: - essentially all cycles being natives in R3 - money implemented as a "truly decimal" format - functions implemented differently to be compatible with multithreading, etc. - closures implemented natively - Parse improved significantly - R3GUI improved - new modules feature - I do not even have the time to list all... | |
Robert: 9-Apr-2013 | From my experience one of the golden rules of life is (wow that gets philosophical): Waiting doesn't change thigns, you need to do it. | |
Pekr: 9-Apr-2013 | Imo MaxV is trying to do the stuff, just look into his blog. He is just comparing what he was used to, with his new experience imo | |
Ladislav: 9-Apr-2013 | Could you please complete the list of changes in REBOL3 - that is a problem: I do not think such a list can be made "complete". Some changes actually are "code cleanup", e.g. Also, there is a time problem: I would have to browse R3 Chat, CureCode, AltMe, DocBase, Carl's blog, Carl's R3 doc, GitHub, whatnot to do it. Why do you think I am the one who has got the time to do it? |
801 / 11578 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | [9] | 10 | 11 | ... | 112 | 113 | 114 | 115 | 116 |