World: r3wp
[Core] Discuss core issues
older newer | first last |
Gregg 26-Apr-2006 [4144x2] | When I first started in REBOL, I also aliased it as &H (as a func name), since that's the hex notation prefix in BASIC and can be used as a func name, unlike "0x" |
It is a little extra work to use a func to convert values, but not awful. If you need to use it heavily in a particular app, I'd consider using a dialect. | |
Henrik 26-Apr-2006 [4146] | binary tools powerpack then? |
Gregg 26-Apr-2006 [4147] | You bet. Outline the domain and we can cook up a killer dialect. |
Maxim 26-Apr-2006 [4148] | the problem I have with dialects is they are not extensible |
Henrik 26-Apr-2006 [4149] | it would be worthy of its own group, wouldn't it? |
Gregg 26-Apr-2006 [4150] | I think so Henrik, for better focus. |
Henrik 26-Apr-2006 [4151] | I'll create it now |
Maxim 26-Apr-2006 [4152] | I mean without rewriting the original dialect parser itself. |
Gregg 26-Apr-2006 [4153] | Who says Max? |
Volker 26-Apr-2006 [4154] | OT: regarding dialects: could 'any be an option in parse? i often have parse blk [ any[ .. ] ] would like parse/any blk [ .. ] |
Maxim 26-Apr-2006 [4155x2] | when I tried to plug within VID... man it was awfull. |
I ended having to piggy back on top of VID. | |
Gregg 26-Apr-2006 [4157] | The Logo interpreter I did (early in REBOL for me) allowed user defined functions; basically it just added things to the list of parse rules it knew about, naive, but semi-functional. :-) |
Volker 26-Apr-2006 [4158] | it predates the block-parser, and that shows. |
Maxim 26-Apr-2006 [4159] | and that means actually calling the VID parser many many times... |
Volker 26-Apr-2006 [4160] | rebgui looks much cleaner IMHO. |
Gregg 26-Apr-2006 [4161] | Dialects have to be planned for extensibility, just like languages. |
Maxim 26-Apr-2006 [4162] | gregg, exactly... you have to dialect your dialect's dialecting ability ;-) |
Gregg 26-Apr-2006 [4163] | ANY - Not sure what you mean Volker. |
Maxim 26-Apr-2006 [4164] | but that's usually harder than the dialect itself, and there are no ways to ensure that this door, won't corrupt your dialect itself.. |
Henrik 26-Apr-2006 [4165] | group created, lets move binary stuff to there |
Volker 26-Apr-2006 [4166] | i need two nested blocks. nearly everytime i use 'parse. |
Gregg 26-Apr-2006 [4167x3] | i.e. why would a refinement be better than using PARSEs ANY keyword? |
Ahhhh. | |
Would it always return TRUE if /any is used then? | |
Maxim 26-Apr-2006 [4170] | I will try to re-introduce the previous block parsing engine I had built for glass into the newer code. |
Volker 26-Apr-2006 [4171] | And that are often 3-liner, which are then 5-liner parse/any files[ file!(..) | url! (..) ] |
Maxim 26-Apr-2006 [4172] | that dialect (not parse based) could easily implement OOP style polymorphism within the dialect! |
Volker 26-Apr-2006 [4173] | No, only 'true if the whole rule matches. |
Gregg 26-Apr-2006 [4174] | I think that might be confusing, because ANY in a parse rule implies optionality. |
Volker 26-Apr-2006 [4175x2] | although an error would be nice too, if it does not parse/error blk [..] would throw an error on fail. maybe with hints about the position. |
In my use 'any means loop | |
Gregg 26-Apr-2006 [4177] | How about just using a PARSE-ANY wrapper mezz of your own? |
Volker 26-Apr-2006 [4178x2] | Ugly. parse/any looks nicer. And its a bit slower? But does the job. |
and its an extra definition in every short script (i never use %user.r for libs..) | |
Gregg 26-Apr-2006 [4180] | Well, post it as a wish then. I haven't needed it, and I'm concerned that the dual meaning of ANY in the context of PARSE might be confusing, but Carl has the final say. |
Volker 26-Apr-2006 [4181] | must not be 'any, its just what is now used inside the dialect. maybe parse/many ? |
Jerry 27-Apr-2006 [4182] | Most scripting languages (like Ruby) and even some programming languages (like Java) support the string-concatenation operator "+". >> "a" + "b" == "ab" I know that we can use the JOIN function, but a + operator for string would be nice too. Why doesn't REBOL do so? |
Anton 28-Apr-2006 [4183] | >> "a" + 2 + "b" ** Script Error: Cannot use add on string! value ** Near: "a" + 2 + "b" >> rejoin ["a" 2 "b"] == "a2b" What could be more elegant ? |
[unknown: 9] 28-Apr-2006 [4184] | :) (and reads well to). |
Anton 28-Apr-2006 [4185] | Yes, I find all those interspersed concatenation operators tiresome and ugly. |
Terry 28-Apr-2006 [4186] | 'rejoin' sounds like it was already joined once |
Anton 28-Apr-2006 [4187] | uhuh. |
eFishAnt 28-Apr-2006 [4188] | If I knew nothing if programming languages, I would think "a" + "b" = "c" ;-) |
Pekr 28-Apr-2006 [4189] | when I first met programming language - basic on 8 bit home computer, I could not get how A = A + 1 can be valid :-) |
eFishAnt 28-Apr-2006 [4190x2] | to try to patch ubuntu REBOL/Core today for serial ports, I did: reb-orig: read/binary %rebol replace/case reb-orig "ttyC0" "ttyc0" write/binary %rebol-patched reb-orig ...but when I try to run the patched binary it gives some crazy line errors. I differenced the two executibles in REBOL and got some crazy differences more than just what I thought I was changing. |
(2 of my computers died, so I don't have the hex-edit.r of Ryans...so was seeing if I could just patch the binary with REBOL itself. Perhaps the replace by strings did some inherent conversion of the REBOL executible...not sure. | |
Maxim 28-Apr-2006 [4192] | you might want to count how many there are first? if only a few, maybe replacing one at a time will end up working? |
JaimeVargas 28-Apr-2006 [4193] | I think there is a way to specify your serial ports. I don't remember how. I but I have done it the past. I should search my files. |
older newer | first last |