Skip to main content
Commonmark migration
Source Link

Smalltalk, 95 (or 68 if loophole is allowed)

#Smalltalk, 95 (or 68 if loophole is allowed) BeenBeen around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

Possible loophole

###Possible loophole ItIt should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

#Smalltalk, 95 (or 68 if loophole is allowed) Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

Smalltalk, 95 (or 68 if loophole is allowed)

Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

Possible loophole

It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

added 1 character in body
Source Link
cat
  • 6.1k
  • 2
  • 27
  • 45

#Smalltalk, 95 (or 68 if loophole is allowed) Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

#Smalltalk 95 (or 68 if loophole is allowed) Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

#Smalltalk, 95 (or 68 if loophole is allowed) Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

Corrected the code layout.
Source Link
Zgarb
  • 43.2k
  • 4
  • 84
  • 265

#Smalltalk 95 (or 68 if loophole is allowed) Been around since 1972
|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

#Smalltalk 95 (or 68 if loophole is allowed) Been around since 1972
|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

#Smalltalk 95 (or 68 if loophole is allowed) Been around since 1972

|i|[i:=0.[i<5] whileTrue: [(Delay forSeconds: 6480) wait.Transcript show: '4 8 15 16 23 42'.]]fork 

No experience with this one, saw it on wikipedia :P
Looked it up online how to loop and delay, syntax should be correct but couldn't find a way to run it.

###Possible loophole It should print the sequence every 108 minutes, but it doesn't state that it has to be 108 minutes.
This could make the code shorter

|i|[i:=0.[i<5] whileTrue: [Transcript show: '4 8 15 16 23 42'.]]fork 

Code will print the sequence with no interval, so its guaranteed that it will print after 108 mins too.

Source Link
Teun Pronk
  • 2.6k
  • 1
  • 16
  • 28
Loading