zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) @ilmenit The more poetic something is, the more difficult it is to understand. I bet that the attempt to understand the above picture will depend on your temporary mood and the perception of me. So "if a = 0 then ..." no matter how boring it looks it does the job. But unless sounds interesting and I use it a bit Edited December 14, 2021 by zbyti 1 Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 unless was added to REBOL at my request a long time ago, when I had seen it in Ruby. I also requested if/else and unless/else, I believe, but Carl rejected that. He was right; my language design intuition has improved since then. Quote Link to comment Share on other sites More sharing options...
drac030 Posted December 14, 2021 Share Posted December 14, 2021 1 hour ago, zbyti said: The more poetic something is, the more difficult it is to understand. Actually, the poetry is difficult to understand only in two cases: 1) the poet was/is bad and it is bad poetry, 2) the poetry is good, but the reader does not understand the language. And I do not mean the language of the words, but the language of simple images being used to invoke other images in the reader's mind. Simple example: one could be confused when encountering a phrase like "the one who can see everything", unless we first learn the language of (this specific kind of) poetry and therefore know that this must be Helios, or the Sun. The same counts for sculpture or painting, a painted or carved figure will be completely anonymous, unless we know the language. E.g. if you find a sculpture of a woman in ancient dress and with an attic helmet, you would not need any caption to know that it is Athene. Similarly, if you see a religious picture of a man who defeated a dragon, it must be St. George, unless that man is winged, then it is Michael the Archangel. So, the principle here is as everywhere else: if something is difficult to understand, then it is either gibberish or you do not understand the symbols. 1 Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 Right, to say it unpoetically, everything is dependent on context. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) for counter 100 [ third?: unless modulo counter 3 [write "Fizz"] fifth?: unless modulo counter 5 [write "Buzz"] (third? and fifth?) write counter write " " ] Write new-line ./compile fizz.meta Compiling Atari 8-bit file fizz.meta % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 419 100 233 100 186 1159 925 --:--:-- --:--:-- --:--:-- 2084 ** Script error: "and" does not work on types combination: Parameter types: 1: logic! (third? and fifth?) 2: logic! (fifth?) At: (and fifth?) In: (third? and fifth?) Near: [ third?: unless modulo counter 3 [write "Fizz"] ... I'm disappointed Edited December 14, 2021 by zbyti and 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 On 11/19/2021 at 12:01 PM, Kaj de Vos said: Thanks! and and or should be fixed now. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 for counter 100 [ third?: unless modulo counter 3 [write "Fizz"] fifth?: unless modulo counter 5 [write "Buzz"] if not third? [if not fifth? [write counter]] write " " ] Write new-line works Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 1 hour ago, zbyti said: for counter 100 [ third?: unless modulo counter 3 [write "Fizz"] fifth?: unless modulo counter 5 [write "Buzz"] (third? and fifth?) write counter write " " ] Write new-line ./compile fizz.meta Compiling Atari 8-bit file fizz.meta % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 419 100 233 100 186 1159 925 --:--:-- --:--:-- --:--:-- 2084 ** Script error: "and" does not work on types combination: Parameter types: 1: logic! (third? and fifth?) 2: logic! (fifth?) At: (and fifth?) In: (third? and fifth?) Near: [ third?: unless modulo counter 3 [write "Fizz"] ... I'm disappointed They also work on logic! now. I implemented logic! after many of the standard methods. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 11 minutes ago, Kaj de Vos said: They also work on logic! now. I implemented logic! after many of the standard methods. Confirm, now its working! Good timing Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) for counter 100 [ third?: unless modulo counter 3 [write "Fizz"] fifth?: unless modulo counter 5 [write "Buzz"] if not (third? or fifth?) [write counter] write " " ] write new-line variants tested FIZZ= 3 BUZZ= 5 for counter 100 [ fizz?: unless modulo counter FIZZ [write "Fizz"] buzz?: unless modulo counter BUZZ [write "Buzz"] if not (fizz? or buzz?) [write counter] write " " ] write new-line Edited December 14, 2021 by zbyti more fizz less buzz Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 @Kaj de Vos how to define new words or redefine old ones? Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 You can define simple values, but not most complex values yet. What type do you want? Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) I just wanted to play with this concept. The last time I did this was 2 years ago in FORTH. What I really need is able to work with arrays. I was looking at: doors: array/initial 100 'closed repeat i 100 [ door: at doors i forskip door i [change door either 'open = first door ['closed] ['open]] ] and it looks like there's a lot of work ahead of you, unless you already have something more then static binary? Edited December 14, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 I have static and dynamic strings. Meta is not REBOL. The declaration for static arrays is as we showed before in the Sieve. As I said before, this is a project for the rest of my life. But you can do a lot with static arrays. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 2 minutes ago, Kaj de Vos said: But you can do a lot with static arrays. With pick&poke? c'mon I may not be as long live as you are, but I'll wait Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 They're series!, you can use all the series! methods. Though Ilmenit only wants to use pick and poke... Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 1 minute ago, Kaj de Vos said: They're series!, you can use all the series! methods. if it works I'll test it. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 doors= make static binary! 100 doors: skip doors 2 write new-line ./compile fizz.meta Compiling Atari 8-bit file fizz.meta % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 220 100 152 100 68 804 359 --:--:-- --:--:-- --:--:-- 1164 out.c:19: Error: Invalid left operand for binary operator '=' out.c:24: Warning: Parameter 'arguments' is never used 1 errors and 1 warnings generated. 1 1 Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 You can't change an immutable array reference. But the error should be caught by the Meta compiler. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) I have no clue how to use series! methods. Give me some short examples please. I looked at http://www.rebol.com/docs/core23/rebolcore-6.html#section-1 Edited December 14, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 Your attempt was fine, except you need to use doors-2 to create a reference to the immutable doors. 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) 2 hours ago, Kaj de Vos said: They're series!, you can use all the series! methods. Though Ilmenit only wants to use pick and poke... I don't believe it. first, head, tail, insert - I can't use it. I have reference because this works: size= 100 static-doors= make static binary! size dupa: static-doors for i size [ poke dupa i i ] repeat size [ write pick dupa 1 dupa: next dupa write " " ] write new-line but nothing more of what I have tried, compiler still talking about static reference Edited December 14, 2021 by zbyti Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 On 11/19/2021 at 11:28 AM, Kaj de Vos said: first is first-of in Meta. Quote Link to comment Share on other sites More sharing options...
Kaj de Vos Posted December 14, 2021 Author Share Posted December 14, 2021 On 11/16/2021 at 5:17 PM, Kaj de Vos said: head is at-head in Meta. tail is at-tail. Quote Link to comment Share on other sites More sharing options...
zbyti Posted December 14, 2021 Share Posted December 14, 2021 (edited) should I guess the rest?! I don't remember this thread by heart You could give it to me an hour ago! Edited December 14, 2021 by zbyti 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.