World: r3wp
[!REBOL3]
older newer | first last |
Andreas 14-Feb-2010 [772] | And if I want to use filenames as keys, I already need to do `to-binary to-string` |
BrianH 14-Feb-2010 [773] | You can use filenames as keys as-is, if your code is portable. |
Andreas 14-Feb-2010 [774x2] | No, I can't |
Portability has nothing to do with it :) | |
BrianH 14-Feb-2010 [776] | Ah, your code must not be portable - if it was then you couldn't be using filenames that differed only by case. |
Andreas 14-Feb-2010 [777x3] | Let's say I write a script that displays the number of files in all current subdirectories |
Let's say I want to store those numbers in a map! associating the subdirectory name with the count of files | |
Perfectly portable code, but fails on case-sensitive filesystems | |
Paul 14-Feb-2010 [780] | Yeah can't use different case names in map. |
BrianH 14-Feb-2010 [781x2] | Right. Case-sensitive filesystems aren't portable to the main client OS'es, or even all server OS'es. |
This is why portable use of those filesystems tends to not use filenames that only differ by case. | |
Andreas 14-Feb-2010 [783x3] | Yes, but that is totally besides the point |
There is perfectly portable code that can work as expected both with case-sensitive and case-insensitive filesystems | |
But to write such code in R3, we _can not_ use filename as map! keys as-is | |
Paul 14-Feb-2010 [786x2] | There is a way around that on windows I think. |
Just collected the short name for all the files using dir/x and then you can create a map for all of them. | |
Andreas 14-Feb-2010 [788x2] | non-posix ntfs is case insensitive anyway, so it's not really an issue on most windows systems |
the workaround to write portable rebol code in this situation is either not using map! or transcoding the file! keys to binary! | |
Paul 14-Feb-2010 [790] | yeah that should work. |
BrianH 14-Feb-2010 [791x2] | Yeah, on Windows the filesystems are case-preserving, not case-sensitive. You can mount a filesystem as case-sensitive, but most programs will fail when using such files. And most modern Windows don't use short-names, since that limits the number of files that a directory can hold. |
On Win9x there were always short-names, but on NTFS its an option. | |
Paul 14-Feb-2010 [793] | you just use dir/x on NTFS |
BrianH 14-Feb-2010 [794x2] | No, I mean it's an option at filesystem creation time, and a rarely chosen option at that nowadays. |
It's not an issue on OSX most of the time either since they act case-preserving too, afaik. | |
Paul 14-Feb-2010 [796] | no rebcode in R3? |
BrianH 14-Feb-2010 [797] | No rebcode in R3. Rebcode got its speed from certain tricks that don't work as well in R3 due to the changes in the context model. However, you can make your ow3n rebcode as an extension if you like (one of my pending projects). |
Paul 14-Feb-2010 [798] | Cool Brian. |
BrianH 14-Feb-2010 [799] | It won't likely be compatible though - I'm planning to make a more REBOL-like dialect. A compatible dialect would be slow. |
Paul 14-Feb-2010 [800] | Yeah was looking for the speed. |
BrianH 14-Feb-2010 [801] | It should even be easier with the changes to the command! type that are to be upcoming with the new host kit. |
Paul 14-Feb-2010 [802x3] | what is the command type? |
Also can you tell me how to use tasks? | |
Also can you tell me how to use tasks? | |
BrianH 14-Feb-2010 [805x2] | A command is the type of function that you currently use to access extensions. Soon it will be more. |
Tasks currently don't work. | |
Paul 14-Feb-2010 [807] | they do something. |
BrianH 14-Feb-2010 [808] | But that something isn't currently multitasking. What they currently do is crash REBOL :( |
Paul 14-Feb-2010 [809x2] | >> do b Begin Task End Task>> |
Didn't crash it but not sure of the spec | |
BrianH 14-Feb-2010 [811] | Much of the code in R3 isn't task-safe yet. There is a planned tasking model, but it isn't implemented yet. |
Paul 14-Feb-2010 [812x2] | k |
Really look foward to tasks. | |
BrianH 14-Feb-2010 [814] | As do we all (especialy Doc and Pekr). |
Maxim 14-Feb-2010 [815] | an me... even if I haven't ranted about this... liquid is waiting for parallel node processing... which requires threads. |
Steeve 15-Feb-2010 [816x2] | time events need that too. |
actually i use current tasks to generate time events | |
Gregg 15-Feb-2010 [818x2] | Regarding Robert's question about not erroring out when accessing non-existent object words, I tend to agree with the current implementation, but not necessarily Brian's rationale that errors are our friends. There are a number of places where REBOL could raise an error, but doesn't, and more have been added in R3. It's a balancing act, and depends on what we think most people will use, and will lead to common cases being clearer and more correct. I think it would be great to collect language design questions, and have Carl answer them. It would be good for REBOL. Some answers may be "we tossed a coin", and that's OK too, but many will have deep or important answers that may just appear as caprice from a user's perspective. |
On STRICT-EQUAL?, I'll also cast my vote that keeping doc strings short is a good idea. But if a doc string is unclear, incomplete, or just plain wrong just so it won't wrap on a text console in a HELP listing, Our priorities are severely out of whack.. Let me know if I need to take that opinion directly to Carl. | |
Paul 15-Feb-2010 [820] | Proposal - Templates Summary: Templates would be code blocks that can be bound into other code and become part of the context in which they are called. implements a Template! type template function template word block The word argument is the template word that you define The block argument is [some [word! block!]] where word is the different words you define for the template and the block is the code that gets reduced when the template word is encountered. Operation: mytemplate: make template! [count [print c] release [clear blk]] mytemplate/release Since I used /release which was defined in the spec all code where the word mytemplate is used will take on the action of the release which is to clear the blk word! |
PeterWood 15-Feb-2010 [821] | Rather than add a new datatype for case sensitive map!s, I've added a ticket #1494 requesting the hash! datatype be added to Rebol 3. |
older newer | first last |