Jump to content

Recommended Posts

@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 :D  

Edited by zbyti
  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 by zbyti
and
  • Thanks 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by zbyti
more fizz less buzz
Link to comment
Share on other sites

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 by zbyti
Link to comment
Share on other sites

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.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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 :P 

Edited by zbyti
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...