This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Message justSerialized := method(stream, | |
stream write(name) | |
if(arguments size > 0, | |
stream write("(") | |
stream write(arguments map(serialized) join(", ")) | |
stream write(")") | |
) | |
if (next, | |
if (next isEndOfLine not, stream write(" ")) | |
stream write(next serialized) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with IO | |
routine main() { | |
IO.stdout.write("Hello, world!\n".bytes()) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Class inheriting from this are be able to declare abstract methods that | |
# must be implemented by some other classes. Example: | |
# | |
# class A < Interface | |
# abstract :foo | |
# end | |
# | |
# class B | |
# implement A | |
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Once there was a young rat named Arthur, who could never make up his mind. Whenever his friends asked him if he would like to go out with them, he would only answer, "I don't know." He wouldn't say "yes" or "no" either. He would always shirk making a choice. | |
His aunt Helen said to him, "Now look here. No one is going to care for you if you carry on like this. You have no more mind than a blade of grass." | |
One rainy day, the rats heard a great noise in the loft. The pine rafters were all rotten, so that the barn was rather unsafe. At last the joists gave way and fell to the ground. The walls shook and all the rats' hair stood on end with fear and horror. "This won't do," said the captain. "I'll send out scouts to search for a new home." | |
Within five hours the ten scouts came back and said, "We found a stone house where there is room and board for us all. There is a kindly horse named Nelly, a cow, a calf, and a garden with an elm tree." The rats crawled out of their little houses and stood on the floor in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------- | |
-- SUDDENLY OOP!! -- | |
-------------------- | |
-- Let's simulate a class... But since it's Shirka, it has to be different. | |
-- Let's make an AGENT! It would just be a task spawner... | |
(agent => User) [ -- `agent` would wrap a list inside a `receive`, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(=> html) [ :body unquote split snd-fst -> header -> body "<html>" puts | |
"<head>" puts header ([length? 0 >] while) [ uncons :title= unquote = (!?) [ | |
"<title>" print uncons print "</title>" puts ] ] << "</head>" puts "<body>" | |
puts body ([length? 0 >] while) [ uncons -> w w :h1 unquote = (if) [ [ "<h1>" | |
print uncons print "</h1>" puts ] [ w type? :List = (if) [ [ "<p>" print w | |
print "</p>" puts << ] [ w :h2 unquote = (!?) [ "<h2>" print << uncons print | |
"</h2>" puts ] ] ] ] ] ] << "</body>" puts "</html>" puts ] | |
------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- floating point arithmetic errors now in Shirka! | |
0 [ 0.0001 + ] 10000 times | |
puts --> 0.99999999999991 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright (c) 2013, Jeremy Pinat. | |
------------------------------------------------------------------------------ | |
-- -- | |
-- PARSER TESTS -- | |
-- -- | |
------------------------------------------------------------------------------ | |
(with) "lib/test.shk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.ali | |
*.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with) "lib/atl.shk" | |
(test/runSuite) [ | |
("true" test/case) [ -- this test always succeeds | |
(test/assertions) [ | |
[ TRUE ] | |
] | |
] |
NewerOlder