World: r3wp
[Rebol School] Rebol School
older newer | first last |
kib2 8-Feb-2009 [1912] | So mine overwrited Rebol's one ? |
Geomol 8-Feb-2009 [1913x3] | It may have changed in recent version. Let me check... |
You have build-tag, to-tag and build-markup. | |
Functions to help you make markup text. | |
Izkata 8-Feb-2009 [1916] | Does hash! work with nested blocks? |
Geomol 8-Feb-2009 [1917x2] | >> build-tag [a b 1] == <a b="1"> |
Izkata, I don't know. | |
kib2 8-Feb-2009 [1919x4] | powerful. |
a: 1 | |
build-markup "toto<%a%>" | |
so that's string interpolation too :) | |
Izkata 8-Feb-2009 [1923] | just tested, looks like it doesn't they way I mean: >> type? second Z: make hash! [One [F1 {Hi} F2 {Bye}] Two [F1 {Yes} F2 {No}]] == block! However, this works: >> Z/2: make hash! Z/2 |
Geomol 8-Feb-2009 [1924] | It seems, it does, if you do it like this: >> t: make hash! compose [a (make hash! [a 43 b 34]) b (make hash! [a 34 b 87])] == make hash! [a make hash! [a 43 b 34] b make hash! [a 34 b 87]] >> type? t/2 == hash! >> t/b == make hash! [a 34 b 87] >> t/b/a == 34 |
Izkata 8-Feb-2009 [1925] | yeah |
Geomol 8-Feb-2009 [1926] | kib, yes |
Izkata 8-Feb-2009 [1927] | When you mentioned it was faster, I got curious, as I need speed for some data mining algorithms I'm implementing in Rebol for a class |
Geomol 8-Feb-2009 [1928x4] | It states in the documentation, that using hash can increase the speed hundreds of times, if you have large tables. |
A simple timing function to test performance: time: func [:f /local t][ t: now/time/precise do f now/time/precise - t ] | |
>> time [loop 1000000 [pi ** 2]] == 0:00:00.468 | |
I've never used build-markup, I just realize. | |
Janko 8-Feb-2009 [1932] | it is normal that hash! will only hash "keys" of assoc on first level, if you want on sublevels you can iterate the list and turn it into hashes acordingly .. if you have a lot of data hash is a lot faster 650x in this test http://www.rebol.com/article/0020.html |
kib2 8-Feb-2009 [1933] | Geomol: funny, you can test any function like this, it's cool. |
Geomol 8-Feb-2009 [1934] | kib, yes :-) |
Janko 8-Feb-2009 [1935] | kib2: technically , that is not a function but a block of code (which is very usefull) :) .. sorry to be a smartass |
kib2 8-Feb-2009 [1936] | Is there any tool to edit and view at the same time rebDoc files ? I've an idea... |
Geomol 8-Feb-2009 [1937x2] | kib, like "Easy VID"? Go to ViewTop and REBOL.com/Demos/Easy VID When you read a page, you can click the code and see how it evaluate. |
The whole Easy VID is a 15.1 kb script. You can right-click an icon on the ViewTop to see source, size, etc. | |
kib2 8-Feb-2009 [1939x4] | Geomol: no, I mean something to write documentations for a rebol lib. |
but Easy VID is really great (but I don't like the fonts) | |
2 secs, I'm making a screenshot | |
Like this : http://tinyurl.com/cfetnn(that's the tool I've build to make my posts on my blog) | |
Geomol 8-Feb-2009 [1943x2] | Ok, got it. Carl use MakeDoc to make his documentation, I use NicomDoc (my version of MakeDoc). I don't know of a tool, that can show you the result, while you type. |
kib, so that's a good project for you! :-) | |
kib2 8-Feb-2009 [1945] | Geomol: I think so :) But for the moment it's in Python (and Qt4). Is there any browser-like widget in the Rebol GUI ? |
Geomol 8-Feb-2009 [1946x2] | VID has many of the things needed: view layout [h1 "Heading 1" h2 "Heading 2" text "some text"] |
Maybe someone wrote a HTML viewer in REBOL? You could try search the library: http://www.rebol.org/ | |
kib2 8-Feb-2009 [1948] | great ! and can you make some parts of text to be bold or italics, etc ? |
Geomol 8-Feb-2009 [1949] | view layout [text italic "italic text" text bold "bold text"] |
Henrik 8-Feb-2009 [1950] | there is limited freedom in VID for that in that each face must have one style, so if you want to render large chunks of formatted text, it may be a bit slow. this is solved in REBOL 3. |
Geomol 8-Feb-2009 [1951] | To make to look good with italic and bold text in the middle, you can use the function SIZE-TEXT to get the layout sizes. |
kib2 8-Feb-2009 [1952] | Geomol: so I've to study VID this week, but R3 seems so nice compared to R2 on this point. |
Geomol 8-Feb-2009 [1953x3] | Yes, it takes some more work to do it in R2. |
But still, compared with other languages, it's probably easy enough. | |
I'm going to bed. Night! And happy coding! :-) | |
Henrik 8-Feb-2009 [1956x2] | in R3, the DOC style is a miniaturized makedoc. |
night | |
kib2 8-Feb-2009 [1958x2] | good night Geomol, I follow you ! |
Good night Henrik, see you | |
Janko 8-Feb-2009 [1960] | incorporating webkit into rebol would certanly open whole new window of possibilites .. (but at this point it would also distract focus) |
Chris 8-Feb-2009 [1961] | K: If I could write the ALA article again, I would do it differently - even if the underlying principle endures. |
older newer | first last |