World: r4wp
[#Red] Red language group
older newer | first last |
Gregg 29-May-2013 [8089] | Red HELP func made some decent progress, but I stopped work on it because of some issues, and I didn't want to distract Doc until he's done with Android. |
Geomol 29-May-2013 [8090] | I looked at REBOL WHAT function, Kaj mentioned. I don't think, I've ever used it. Is it commonly used by you guys? |
Gregg 29-May-2013 [8091x4] | Almost never for me. |
BTW, my Red HELP experiment is here, under %Red/mezz/. You can paste it into a Red console to test. | |
Ah, yes. One issue was that calling HELP with no arg crashes the interpreter. | |
I might have stopped until we have errors in Red, because debugging by crashing is hard. ;-) | |
Geomol 29-May-2013 [8095] | yeah :) |
Gregg 29-May-2013 [8096] | But also shows that you can still do a lot in Red, even without it. Most of the mezz code I did works. |
Kaj 29-May-2013 [8097] | WHAT is quite essential on Try REBOL for new users |
Gregg 29-May-2013 [8098] | It's never struck me as a great name. I just always use HELP. e.g. HELP function! |
Kaj 29-May-2013 [8099x3] | It's very introductory, like What, Why, When, Where. You need that before you know to do HELP function! |
I found a bug in the interpreter that currently prevents me from overriding DO: | |
https://github.com/dockimbel/Red/issues/482 | |
Gregg 29-May-2013 [8102] | Except, we don't have WHY, WHEN, or WHERE. ;-) |
Geomol 29-May-2013 [8103] | World should have a WHY??? :) |
Kaj 29-May-2013 [8104x2] | I don't see how that devalues WHAT. :-) And R3 has WHY? |
I don't remember which, but I think there are old computer systems that list available commands with WHAT | |
Arnold 30-May-2013 [8106] | WHAT is to find out what stuff is attached under an object. I use (d) it a lot with VID, finding out which field was filled with what value to see how I could go about dynamically change the properties like captions and values and colors. |
Geomol 30-May-2013 [8107] | Arnold, isn't that what HELP (or the ? short) is used for? WHAT seems to "Prints a list of globally-defined functions.". |
Arnold 30-May-2013 [8108] | You are completely right, I stand corrected. Sorry, mixed them up, not using it as much lately. |
Geomol 30-May-2013 [8109] | Would it makes sense to add languages like Verilog as target / code backend to Red/System? |
Arnold 30-May-2013 [8110] | Probably the WHAT has served an important purpose during development of REBOL? |
Geomol 30-May-2013 [8111] | I couldn't say. I don't have any memory of WHAT, until it was mentioned here yesterday. |
sqlab 30-May-2013 [8112] | I used WHAT many times, and also when showing/demonstrating rebol to other people, what is built in |
Gregg 30-May-2013 [8113] | If someone needs verilog, they can add it (or pay Doc to). I need I/O and some networking, and the core stuff like errors and objects. |
Geomol 30-May-2013 [8114] | Yeah, I was just thinking, if it makes sense at all to include a language like Verilog in the way, Red/System is made today. I haven't looked deeper into it. Maybe it makes more sense to create a cross-compiler from Red/System to Verilog and such, totally independent of the code backend found in Red/System? Maybe Red/System could be the base for all different kind of hardware. |
Gregg 30-May-2013 [8115] | I would probably think to implement as a high level dialect in Red that compiles down. |
Geomol 30-May-2013 [8116] | Isn't that the other way around? I want to go from Red/System source to Verilog and other similar languages for different hardware. I don't want to start with a Verilog program and end up with what Red/System produces. |
Kaj 30-May-2013 [8117] | Doc wants to program FPGA CPUs dynamically one day, so there is a sensible route in there somewhere |
Gregg 30-May-2013 [8118] | What I mean is, I want to write the Verilog/VHDL dialect in Red, and have it compile down. |
TomBon 30-May-2013 [8119] | Gregg, you have a fine taste of useful tech ;-) I guess this is a huge task. If you look at the Xilinx ISE Pack and the prices they are asking... There is a free Web version but this one only supports the very small units with max. 24k LC, not enough todo usefull things. But of course a Verilog/VHDL dialect would be more than cool. Meanwhile OpenCL/CUDA would be nice as well. |
Marco 1-Jun-2013 [8120] | @Doc: found problem about console windows. I use the function _system() twice so I have two windows so it is my fault, sorry. |
Gregg 2-Jun-2013 [8121] | Doc, is your plan for Red PARSE to use R2 dialect, or R3's? |
Pekr 2-Jun-2013 [8122] | I am for R3 including enhancements, but Doc does not plan to support features like to [a | b | c]. Whereas I am almost refusing to use parser without it, Doc seem to be against stuff, which would eventually slow down the parser. And as the parser will be most probably implemented by Gabriele, we might get some compile rules or something like that. I am for R3 compatibility though ... |
Kaj 2-Jun-2013 [8123] | I agree that TO [a | b] is very important in a parser. I was surprised when I found that R2 doesn't do it |
Geomol 2-Jun-2013 [8124] | Isn't it just a nice thing to have? You write less, yes, but you could just parse for [to a | to b] Some might even argue, that if you have a lot of alternate rules, it is more readable to have the keyword, TO, together with the alternates. |
Ladislav 3-Jun-2013 [8125] | Geomol, [to a | to b] is not equivalent (not even nearly) to to [a | b] |
Geomol 3-Jun-2013 [8126] | ok Then it's a good argument. |
Ladislav 3-Jun-2013 [8127] | However, it is questionable whether a user unable to replace to [a | b] by an idiom like recursive rule: [a | b | skip rule] can be actually able to use Parse... |
Geomol 3-Jun-2013 [8128x2] | I feel, you need to explain this. If I replace a with "abc" and b with "str", and I want to parse ["abc"] : (From R3 prompt:) >> parse ["abc"] [to ["abc" | "str"]] == false >> rule: ["abc" | "str" | skip rule] == ["abc" | "str" | skip rule] >> parse ["abc"] rule == true |
Or did you mean rule: [to a | to b | skip rule] ? | |
Pekr 3-Jun-2013 [8130x2] | Ladislav - I am able to user parse, used it even for some more complicated stuff, including recursive rules. But - it was mostly trial and error on my side. OTOH - parse should not be reserved just for gurus imo. |
Geomol - try to understand your example. Imagine html file for e.g. Your [to a | to b ...] is wrong ... imagine 'a is at the end of the file. Simply "to a" will find it, before "to b" is even given chance to be applied. What we want is - find what is first - 'a or 'b .... | |
Ladislav 3-Jun-2013 [8132] | Geomol, I certainly did not mean the idiom you suggested. I just used an idiom for THRU, which can be adapted as follows:: a: [here: "abc" :here] b: [here: "str" :here] rule: [a | b | skip rule] |
Geomol 3-Jun-2013 [8133] | Pekr, ah :) Early in the morning here, so I need to get in gear. Good point! |
Pekr 3-Jun-2013 [8134] | 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 [8135] | But - it was mostly trial and error on my side. - yes, Pekr, agreed with that. Once it is just "trial and error", that is what I call a question whether you actually are able to use Parse. |
Pekr 3-Jun-2013 [8136] | What I don't agree with Doc and Gab is - if you are a guru, just don't use idioms! But plese - don't take them from those, who might find them usefull! I remember, during the parse history, that exactly such idiom was often requested and ppl were not able to use parse without it, because they were not able to understand the rule Ladislav provided. And - will we suggest them not to use parse? That's imo not rebolish .... |
Geomol 3-Jun-2013 [8137] | I try to think about, how I solved such situations in R2, or maybe I never had to. Hmm |
Ladislav 3-Jun-2013 [8138] | if you are a guru, just don't use idioms - did they really say something like that? |
older newer | first last |