Skip to content
Browse files

Making Samples executable. #!/usr/bin/env io and chmod a+x *.io

  • Loading branch information...
1 parent 2bcea09 commit 4b665d90b1839e46aa41e32deb1702fe73002042 @quag quag committed May 27, 2007
Showing with 293 additions and 30 deletions.
  1. +2 −0 addons/AVCodec/samples/mp3filestream.io
  2. +2 −0 addons/AVCodec/samples/mp3netstream.io
  3. +2 −0 addons/AVCodec/samples/server.io
  4. +2 −0 addons/AVCodec/samples/video.io
  5. +3 −1 addons/AVCodec/samples/video2.io
  6. +2 −0 addons/AppleExtras/samples/pong.io
  7. +2 −0 addons/AppleExtras/samples/roller.io
  8. +3 −1 addons/AppleExtras/samples/test.io
  9. +0 −1 addons/AsyncRequest/samples/test.io
  10. +2 −0 addons/CFFI/samples/LibC.io
  11. +2 −0 addons/ContinuedFraction/samples/Sample.io
  12. +1 −0 addons/Contracts/build.io
  13. +3 −0 addons/Contracts/samples/Sample.io
  14. +1 −1 addons/Curses/samples/browser.io
  15. +1 −1 addons/Curses/samples/cli.io
  16. +1 −1 addons/Curses/samples/docsbrowser.io
  17. +2 −0 addons/DBI/samples/benchmark.io
  18. +2 −0 addons/DBI/samples/driver_info.io
  19. +2 −0 addons/DBI/samples/dummydata.io
  20. +2 −0 addons/DBI/samples/fetchobj.io
  21. +2 −0 addons/DBI/samples/queryOne.io
  22. +2 −0 addons/DBI/samples/simple.io
  23. +2 −0 addons/Flux/samples/Calculator/Calc.io
  24. +2 −0 addons/Flux/samples/China/china.io
  25. +1 −0 addons/Flux/samples/Debugger/debug.io
  26. +1 −1 addons/Flux/samples/Debugger/menu.io
  27. +1 −0 addons/Flux/samples/Diagram/main.io
  28. +1 −0 addons/Flux/samples/FileBrowser/main.io
  29. +2 −0 addons/Flux/samples/IRC/main.io
  30. +2 −0 addons/Flux/samples/Mix/Mix.io
  31. +1 −0 addons/Flux/samples/Self/main.io
  32. +1 −0 addons/Flux/samples/SheetTest/main.io
  33. +1 −0 addons/Flux/samples/Slideshow/main.io
  34. +2 −0 addons/Flux/samples/SongJam/main.io
  35. +2 −0 addons/Flux/samples/Test/main.io
  36. +2 −0 addons/Flux/samples/Test/main2.io
  37. +1 −1 addons/Font/samples/Terminal.io
  38. +2 −0 addons/Font/samples/fontTest.io
  39. +2 −0 addons/Font/samples/slides.io
  40. +2 −0 addons/Font/samples/test.io
  41. +1 −0 addons/Font/samples/test2.io
  42. +2 −0 addons/GLFW/samples/lesson01.io
  43. +2 −0 addons/GLFW/samples/lesson02.io
  44. +2 −0 addons/GLFW/samples/lesson03.io
  45. +2 −0 addons/GLFW/samples/lesson04.io
  46. +2 −0 addons/GLFW/samples/lesson05.io
  47. +2 −0 addons/GLFW/samples/lesson06.io
  48. +2 −0 addons/GLFW/samples/lesson07.io
  49. +2 −0 addons/GLFW/samples/lesson08.io
  50. +2 −0 addons/Image/samples/scale.io
  51. +2 −0 addons/Image/samples/test.io
  52. +2 −0 addons/LibSndFile/samples/loopback.io
  53. +2 −0 addons/LibSndFile/samples/mp3filestream.io
  54. +2 −0 addons/LibSndFile/samples/mp3netstream.io
  55. +2 −0 addons/LibSndFile/samples/server.io
  56. +2 −0 addons/LibSndFile/samples/sndplay.io
  57. +1 −0 addons/MD5/samples/md5.io
  58. +2 −0 addons/ODE/samples/extras/tutorial2.1.io
  59. +2 −0 addons/ODE/samples/extras/tutorial2.2.io
  60. +2 −0 addons/ODE/samples/extras/tutorial2.3.io
  61. +2 −0 addons/ODE/samples/tutorial1.io
  62. +2 −0 addons/ODE/samples/tutorial2.io
  63. +2 −0 addons/ODE/samples/tutorial3.io
  64. +2 −0 addons/ObjcBridge/samples/BridgeTest/main.io
  65. +2 −0 addons/OpenGL/samples/Mandlebrot.io
  66. +2 −0 addons/OpenGL/samples/balls.io
  67. +2 −0 addons/OpenGL/samples/cube.io
  68. +2 −0 addons/OpenGL/samples/events.io
  69. +2 −0 addons/OpenGL/samples/game.io
  70. +2 −0 addons/OpenGL/samples/game/client.io
  71. +1 −0 addons/OpenGL/samples/game/server.io
  72. +2 −0 addons/OpenGL/samples/grabTextureTest.io
  73. +2 −0 addons/OpenGL/samples/lines.io
  74. +2 −0 addons/OpenGL/samples/polygonSmoothing.io
  75. +1 −1 addons/OpenGL/samples/test2.io
  76. +2 −0 addons/PortAudio/samples/loopback.io
  77. +2 −0 addons/PortAudio/samples/sndplay.io
  78. +2 −0 addons/PostgreSQL/samples/pgsql-sample.io
  79. +2 −0 addons/Python/samples/UsingPython.io
  80. +2 −0 addons/Rational/samples/Sample.io
  81. +2 −0 addons/SampleRateConverter/samples/loopback.io
  82. +2 −0 addons/SampleRateConverter/samples/mp3filestream.io
  83. +2 −0 addons/SampleRateConverter/samples/mp3netstream.io
  84. +2 −0 addons/SampleRateConverter/samples/server.io
  85. +2 −0 addons/SampleRateConverter/samples/sndplay.io
  86. +2 −0 addons/Socket/samples/ChatServer.io
  87. +2 −0 addons/Socket/samples/ClientServer.io
  88. +2 −0 addons/Socket/samples/DOTest.io
  89. +2 −0 addons/Socket/samples/EchoServer.io
  90. +2 −0 addons/Socket/samples/EmailMessageTest.io
  91. +2 −0 addons/Socket/samples/Google.io
  92. +2 −0 addons/Socket/samples/GoogleTranslate.io
  93. +2 −0 addons/Socket/samples/IRC/CursesScreen.io
  94. +2 −0 addons/Socket/samples/IRC/EchoBot.io
  95. +2 −0 addons/Socket/samples/IRC/IoBot.io
  96. +3 −1 addons/Socket/samples/MinimalWebServer.io
  97. +2 −0 addons/Socket/samples/Radio.io
  98. +2 −0 addons/Socket/samples/TerminalServer.io
  99. +2 −0 addons/Socket/samples/URLTest.io
  100. +2 −0 addons/Socket/samples/WebDownload.io
  101. +3 −1 addons/Socket/samples/WebRequest.io
  102. +2 −0 addons/Socket/samples/WebServer/WebServer.io
  103. +2 −0 addons/Socket/samples/WebServer/test.io
  104. +2 −1 addons/Socket/samples/ptest.io
  105. +2 −0 addons/SoundTouch/samples/loopback.io
  106. +2 −0 addons/SoundTouch/samples/mp3filestream.io
  107. +2 −0 addons/SoundTouch/samples/mp3netstream.io
  108. +2 −0 addons/SoundTouch/samples/server.io
  109. +2 −0 addons/SoundTouch/samples/sndplay.io
  110. +2 −1 addons/Syslog/samples/sample.io
  111. +2 −0 addons/SystemCall/samples/pingtest.io
  112. +3 −1 addons/SystemCall/samples/test.io
  113. +3 −1 addons/SystemCall/samples/test2.io
  114. +2 −0 addons/TagLib/samples/tag.io
  115. +2 −0 libs/iovm/tests/run.io
  116. +2 −1 samples/misc/Account.io
  117. +2 −0 samples/misc/Ackerman.io
  118. +1 −0 samples/misc/BottlesOfBeer.io
  119. +2 −1 samples/misc/Brackets.io
  120. +1 −0 samples/misc/Cards.io
  121. +1 −0 samples/misc/CommandLineArgs.io
  122. +1 −0 samples/misc/Conditions.io
  123. +1 −0 samples/misc/Control.io
  124. +1 −0 samples/misc/ControlFlow.io
  125. +1 −0 samples/misc/Decompile.io
  126. +1 −0 samples/misc/Dir.io
  127. +1 −0 samples/misc/ErlangChallenge.io
  128. +1 −0 samples/misc/Foreach.io
  129. +1 −0 samples/misc/Hanoi.io
  130. +1 −0 samples/misc/HelloWorld.io
  131. +1 −0 samples/misc/Inheritance.io
  132. +1 −0 samples/misc/SimpleCoro.io
  133. +1 −0 samples/misc/Sort.io
  134. +1 −0 samples/misc/Super.io
  135. +1 −0 samples/misc/WeakLink.io
  136. +1 −0 samples/misc/except.io
  137. +1 −0 samples/misc/qsort.io
  138. +1 −0 samples/misc/tailtest.io
  139. +2 −1 samples/misc/vtest.io
  140. +3 −1 samples/shootout/binarytrees.io
  141. +3 −1 samples/shootout/chameneos.io
  142. +2 −0 samples/shootout/cheapconcurrency.io
  143. +3 −1 samples/shootout/fannkuch.io
  144. +3 −1 samples/shootout/fasta.io
  145. +3 −1 samples/shootout/mandelbrot.io
  146. +2 −0 samples/shootout/nbody.io
  147. +3 −1 samples/shootout/nsieve.io
  148. +3 −1 samples/shootout/nsievebits.io
  149. +3 −1 samples/shootout/partialsums.io
  150. +3 −1 samples/shootout/recursive.io
  151. +3 −1 samples/shootout/reverse-complement.io
  152. +3 −1 samples/shootout/spectral-norm.io
  153. +3 −1 samples/shootout/sumcol.io
  154. +2 −0 samples/speed/speed.io
  155. +2 −0 samples/speed/speedResults.io
  156. +2 −0 samples/speed/speedResults2.io
View
2 addons/AVCodec/samples/mp3filestream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioMixer := Object clone do(
init := method(
View
2 addons/AVCodec/samples/mp3netstream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice open
View
2 addons/AVCodec/samples/server.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Server clone do(
setPort(8000)
View
2 addons/AVCodec/samples/video.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
VideoDecoder := AVCodec clone do(
newSlot("internalCoro")
newSlot("externalCoro")
View
4 addons/AVCodec/samples/video2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Flux
VideoApp := Application clone do(
@@ -11,4 +13,4 @@ VideoApp := Application clone do(
)
)
-VideoApp run
+VideoApp run
View
2 addons/AppleExtras/samples/pong.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AppleSensors do(
lastLeft := 0
View
2 addons/AppleExtras/samples/roller.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Ball := Object clone do(
appendProto(OpenGL)
position := vector(25,0)
View
4 addons/AppleExtras/samples/test.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
loop(
l := AppleSensors getLeftLightSensor
@@ -13,4 +15,4 @@ loop(
writeln("-------------------------")
//TimerEvent waitOn(1)
//if (b != -1, AppleSensors setDisplayBrightness(1 - (b/1300)))
-)
+)
View
1 addons/AsyncRequest/samples/test.io
@@ -1 +0,0 @@
-
View
2 addons/CFFI/samples/LibC.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* CFFI - A C function interface for Io
Copyright (c) 2006 Trevor Fancher. All rights reserved.
All code licensed under the New BSD license.
View
2 addons/ContinuedFraction/samples/Sample.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* Example usages of ContinuedFraction */
cf := ContinuedFraction with(2) + SQRT with(2) + SQRT with(3) + E
View
1 addons/Contracts/build.io
@@ -1,2 +1,3 @@
AddonBuilder clone do(
+ disable # uses Message attached which doesn't exist any more
)
View
3 addons/Contracts/samples/Sample.io 100644 → 100755
@@ -1,4 +1,7 @@
+#!/usr/bin/env io
+
/* Example usages of Contracts */
+Contracts
/* This method only accepts numbers */
onlyNumbers := contract(a, b,
View
2 addons/Curses/samples/browser.io 100644 → 100755
@@ -1,4 +1,4 @@
-#!/usr/local/bin/ioServer
+#!/usr/bin/env io
Curses do(
begin
View
2 addons/Curses/samples/cli.io 100644 → 100755
@@ -1,4 +1,4 @@
-#!/usr/local/bin/ioServer
+#!/usr/bin/env io
Curses do(
begin
View
2 addons/Curses/samples/docsbrowser.io 100644 → 100755
@@ -1,4 +1,4 @@
-#!/usr/local/bin/ioServer
+#!/usr/bin/env io
Curses do(
begin
View
2 addons/DBI/samples/benchmark.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
recCount := if(args at(1), args at(1) asNumber, 50000)
c := DBI with("sqlite3")
View
2 addons/DBI/samples/driver_info.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
showInfo := method(d,
(" Name: " .. d at(0)) println
(" Description: " .. d at(1)) println
View
2 addons/DBI/samples/dummydata.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
createDummyData := method(c,
c execute("BEGIN TRANSACTION")
c execute("""CREATE TABLE people (id integer, first varchar(15),
View
2 addons/DBI/samples/fetchobj.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
doFile("dummydata.io")
c := DBI with("sqlite3")
View
2 addons/DBI/samples/queryOne.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
doFile("dummydata.io")
c := DBI with("sqlite3")
View
2 addons/DBI/samples/simple.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
doFile("dummydata.io")
c := DBI with("sqlite3") // pgsql, mysql, sqlite, sqlite3, etc
View
2 addons/Flux/samples/Calculator/Calc.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* Io Calculator - 2004 Mike Austin */
Flux
View
2 addons/Flux/samples/China/china.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// china.io
// A program for playing Chinese Checkers
// The program requires IoDesktop.
View
1 addons/Flux/samples/Debugger/debug.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
autoImportResources
View
2 addons/Flux/samples/Debugger/menu.io 100644 → 100755
@@ -1,4 +1,4 @@
-#!./ioServer
+#!/usr/bin/env io
writebr := method(
thisMessage arguments foreach(arg, write(sender doMessage(arg)))
View
1 addons/Flux/samples/Diagram/main.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Flux
View
1 addons/Flux/samples/FileBrowser/main.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Flux
View
2 addons/Flux/samples/IRC/main.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//debugCollector := 1
//write("launchPath = '", launchPath, "'\n")
View
2 addons/Flux/samples/Mix/Mix.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// an AudioPad inspired demo
// Steve Dekorte, 2003
View
1 addons/Flux/samples/Self/main.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Flux
View
1 addons/Flux/samples/SheetTest/main.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Flux
View
1 addons/Flux/samples/Slideshow/main.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Flux
View
2 addons/Flux/samples/SongJam/main.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//debugCollector := 1
autoImportResources
View
2 addons/Flux/samples/Test/main.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Flux
/*
View
2 addons/Flux/samples/Test/main2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Flux
Controller := Object clone do(
View
2 addons/Font/samples/Terminal.io 100644 → 100755
@@ -1,4 +1,4 @@
-
+#!/usr/bin/env io
Terminal := GLApp clone
Terminal do(
View
2 addons/Font/samples/fontTest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// fontTest.io
// Written by Jon Kleiser, 12-Dec-2006
// Based on IoDesktop/FreeType/_tests/test.io
View
2 addons/Font/samples/slides.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// [reg:~/IoProject/Io/binaries] steve% ./ioDesktop ../bindings/Font/_tests/slides.io
//doFile(Path with(launchPath, "GLApp.io"))
View
2 addons/Font/samples/test.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
monoFont := Font clone open("resources/library/fonts/Vera/Mono/Bold.ttf") setPixelSize(12)
writeln("top1")
View
1 addons/Font/samples/test2.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
sansFontBig := Font clone open("resources/library/fonts/Free/Sans/Bold.ttf") setPixelSize(200)
sansFontMedium := Font clone open("resources/library/fonts/Free/Sans/Bold.ttf") setPixelSize(25)
View
2 addons/GLFW/samples/lesson01.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson01/lesson01.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson02.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson02/lesson02.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson03.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson03/lesson03.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson04.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson04/lesson04.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson05.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson05/lesson05.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson06.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson06/lesson06.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson07.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson07/lesson07.html
appendProto(GLFW)
View
2 addons/GLFW/samples/lesson08.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://glfw.sourceforge.net/tutorials/lesson08/lesson08.html
appendProto(GLFW)
View
2 addons/Image/samples/scale.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
App := Object clone do(
display := method(
View
2 addons/Image/samples/test.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Viewer := Object clone do(
View
2 addons/LibSndFile/samples/loopback.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice openForReadingAndWriting
View
2 addons/LibSndFile/samples/mp3filestream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioMixer := Object clone do(
init := method(
View
2 addons/LibSndFile/samples/mp3netstream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice open
View
2 addons/LibSndFile/samples/server.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Server clone do(
setPort(8000)
View
2 addons/LibSndFile/samples/sndplay.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
if (?args == nil,
write("requires name of sound file as argument")
View
1 addons/MD5/samples/md5.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
File md5String := method(
digest := MD5 clone
View
2 addons/ODE/samples/extras/tutorial2.1.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial2.html
// (C) 2006 Jonathan Wright
// Based on glballs.io - A simple program (C) 2002 Mike Austin
View
2 addons/ODE/samples/extras/tutorial2.2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial2.html
// (C) 2006 Jonathan Wright
// Based on glballs.io - A simple program (C) 2002 Mike Austin
View
2 addons/ODE/samples/extras/tutorial2.3.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial2.html
// (C) 2006 Jonathan Wright
// Based on glballs.io - A simple program (C) 2002 Mike Austin
View
2 addons/ODE/samples/tutorial1.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial1.html
r := DynLib clone setPath("/opt/local/lib/libode.dylib") open
View
2 addons/ODE/samples/tutorial2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial2.html
// (C) 2006 Jonathan Wright
// Based on glballs.io - A simple program (C) 2002 Mike Austin
View
2 addons/ODE/samples/tutorial3.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Port of http://pyode.sourceforge.net/tutorials/tutorial3.html
appendProto(OpenGL)
View
2 addons/ObjcBridge/samples/BridgeTest/main.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
ObjcBridge autoLookupClassNamesOn
ObjcBridge debugOn
View
2 addons/OpenGL/samples/Mandlebrot.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
MandlebrotApp := GLApp clone do(
View
2 addons/OpenGL/samples/balls.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// glballs.io - A simple program
// (C) 2002 Mike Austin
View
2 addons/OpenGL/samples/cube.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// glcube.io - A simple Openprogram
// (C) 2002 Mike Austin
View
2 addons/OpenGL/samples/events.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// A program to test OpenGL events
// Steve Dekorte, 2002
View
2 addons/OpenGL/samples/game.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# game.io - A simple ship flying around a window
# (C) 2002 Mike Austin
# Updated by Steve Dekorte
View
2 addons/OpenGL/samples/game/client.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
doFile(Path with(launchPath, "Tank.io"))
View
1 addons/OpenGL/samples/game/server.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// --- Model -------------------------------------------------------
View
2 addons/OpenGL/samples/grabTextureTest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Screen := Object clone
Screen appendProto(OpenGL)
View
2 addons/OpenGL/samples/lines.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
debugCollector := 1
// a simple OpenGL program
View
2 addons/OpenGL/samples/polygonSmoothing.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// A program to test OpenGL events
// Steve Dekorte, 2002
View
2 addons/OpenGL/samples/test2.io 100644 → 100755
@@ -1,4 +1,4 @@
-
+#!/usr/bin/env io
b1 := Box clone set(Point clone set(0,0), Point clone set(100,100))
b1 print
View
2 addons/PortAudio/samples/loopback.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice openForReadingAndWriting
View
2 addons/PortAudio/samples/sndplay.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
if (?args == nil,
write("requires name of sound file as argument")
View
2 addons/PostgreSQL/samples/pgsql-sample.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
conn := PostgreSQL Connection clone setDatabase("iotest") open
excpt := try(
try(
View
2 addons/Python/samples/UsingPython.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
# Import a module
sys := Python import("sys")
View
2 addons/Rational/samples/Sample.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* Example usages of Rational Numbers */
r1 := Rational with(1, 2) /* 1/2 */
View
2 addons/SampleRateConverter/samples/loopback.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice openForReadingAndWriting
View
2 addons/SampleRateConverter/samples/mp3filestream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioMixer := Object clone do(
init := method(
View
2 addons/SampleRateConverter/samples/mp3netstream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice open
View
2 addons/SampleRateConverter/samples/server.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Server clone do(
setPort(8000)
View
2 addons/SampleRateConverter/samples/sndplay.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
if (?args == nil,
write("requires name of sound file as argument")
View
2 addons/Socket/samples/ChatServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// A simple chat server
ChatClient := Object clone
View
2 addons/Socket/samples/ClientServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Server := Object clone do(
socket := Socket clone setHostName("localhost") setPort(8080)
View
2 addons/Socket/samples/DOTest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//doFile(Path with(launchPath, "../_ioCode/DOConnection.io"))
//doFile(Path with(launchPath, "../_ioCode/DOServer.io"))
View
2 addons/Socket/samples/EchoServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Echo := Object clone do(
handleSocketFromServer := method(socket, aServer,
writeln("[Got echo connection from ", socket ipAddress, "]")
View
2 addons/Socket/samples/EmailMessageTest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
m := EmailMessage clone
m setFrom("bar@bar.com")
View
2 addons/Socket/samples/Google.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
SGMLTag do(
links := method(
View
2 addons/Socket/samples/GoogleTranslate.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// unfinished
GoogleTranslate := Object clone do(
View
2 addons/Socket/samples/IRC/CursesScreen.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
CursesView := Object clone do(
buffer := Buffer clone
View
2 addons/Socket/samples/IRC/EchoBot.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
IRCClient := Object clone do(
socket := Socket clone
View
2 addons/Socket/samples/IRC/IoBot.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Feed := Object clone do(
init := method(
self lastItemGuid := nil
View
4 addons/Socket/samples/MinimalWebServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
WebRequest := Object clone do(
handleSocket := method(aSocket,
@@ -17,4 +19,4 @@ WebServer := Server clone do(
handleSocket := method(aSocket, WebRequest clone @handleSocket(aSocket))
)
-WebServer start
+WebServer start
View
2 addons/Socket/samples/Radio.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
Connect to GroveSalad radio station example
View
2 addons/Socket/samples/TerminalServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Terminal := Object clone
Terminal handleSocketFromServer := method(aSocket, aServer,
View
2 addons/Socket/samples/URLTest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
URL with("http://www.google.com/") fetch println
write("\n\n")
View
2 addons/Socket/samples/WebDownload.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
// Example:
// ./ioServer Sockets/_tests/WebDownload.io http://64.236.34.161:80/stream/1018 GrooveSalad.mp3
View
4 addons/Socket/samples/WebRequest.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//DNSResolver addServerAddress("128.105.2.10")
@@ -19,4 +21,4 @@ if (socket error) then (
writeln(response)
writeln("\nReceived ", response size, " bytes")
-)
+)
View
2 addons/Socket/samples/WebServer/WebServer.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Socket write := Socket getSlot("streamWrite")
View
2 addons/Socket/samples/WebServer/test.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//debugCollector := 1
SocketManager setSelectTimeout(0.0)
Scheduler setSleepInterval(0)
View
3 addons/Socket/samples/ptest.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
List myCoroDo := method(
@@ -53,4 +54,4 @@ Date secondsToRun(urls pforeach(i, v, v fetch size println, 3)) println
2 0:06.23
3 0:05.79
10 0:03.86
-*/
+*/
View
2 addons/SoundTouch/samples/loopback.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice openForReadingAndWriting
View
2 addons/SoundTouch/samples/mp3filestream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioMixer := Object clone do(
init := method(
View
2 addons/SoundTouch/samples/mp3netstream.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
AudioDevice open
View
2 addons/SoundTouch/samples/server.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
Server clone do(
setPort(8000)
View
2 addons/SoundTouch/samples/sndplay.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/*
if (?args == nil,
write("requires name of sound file as argument")
View
3 addons/Syslog/samples/sample.io 100644 → 100755
@@ -1,4 +1,5 @@
-#!/usr/bin/env ioServer
+#!/usr/bin/env io
+
# Test by Jeremy Tregunna <jtregunna@blurgle.ca>
# Not all of these options are needed to log. Most basic you only need to call:
# open(fac, opt, ident), log(pri, msg), close
View
2 addons/SystemCall/samples/pingtest.io 100644 → 100755
@@ -1,2 +1,4 @@
+#!/usr/bin/env io
+
SystemCall with("ping www.yahoo.com") runWith(if(stdout readLine betweenSeq("time=", " ms") asNumber > 40, writeln("^V^G")))
View
4 addons/SystemCall/samples/test.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
-SystemCall clone setCommand("ls") run stdout readLines foreach(println)
+
+SystemCall clone setCommand("ls") run stdout readLines foreach(println)
View
4 addons/SystemCall/samples/test2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
-SystemCall clone setCommand("io") setArguments(list("-e", "1+2")) run stdout readLines foreach(println)
+
+SystemCall clone setCommand("io") setArguments(list("-e", "1+2")) run stdout readLines foreach(println)
View
2 addons/TagLib/samples/tag.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
TagLib do(
newSlot("path")
newSlot("title")
View
2 libs/iovm/tests/run.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
//Message useIoShuffle
//Collector debugOn
View
3 samples/misc/Account.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Account := Object clone
Account balance := 0.0
@@ -11,4 +12,4 @@ Account show
Account deposit(10.0)
"Final: " print
-Account show
+Account show
View
2 samples/misc/Ackerman.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
ack := method(m, n,
//writeln("ack(", m, ",", n, ")")
if (m < 1, return n + 1)
View
1 samples/misc/BottlesOfBeer.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
bottle := method(i,
if(i==0, return "no more bottles of beer")
View
3 samples/misc/Brackets.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// pythonish list and map syntax in Io
Object squareBrackets := Object getSlot("list")
@@ -11,4 +12,4 @@ curlyBrackets := method(
map
)
-{a := 1, b := 2} foreach(k, v, writeln(k, ": ", v))
+{a := 1, b := 2} foreach(k, v, writeln(k, ": ", v))
View
1 samples/misc/Cards.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// By Jason Sackett
Random setSeed(Date clone now asNumber)
View
1 samples/misc/CommandLineArgs.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// Try running this script with some command line arguments. Example:
// ./io CommandLineArgs.io a b c d
View
1 samples/misc/Conditions.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
a := "foobar"
View
1 samples/misc/Control.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// example of implementing control structures
myif := method(condition,
View
1 samples/misc/ControlFlow.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
exampleBreak := method(
b := Sequence clone
View
1 samples/misc/Decompile.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// evaluating a string
View
1 samples/misc/Dir.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
//Directory folders := method(items select(item, item type ==("Directory") and(item name != ".") and(item name != "..")))
writeln("")
View
1 samples/misc/ErlangChallenge.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
//Collector debugOn
View
1 samples/misc/Foreach.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
a := List clone append(1, 2, 3)
View
1 samples/misc/Hanoi.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
H := method(n, f, u, t,
if (n < 2) then (
View
1 samples/misc/HelloWorld.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
"Hello world!" println
// Or
View
1 samples/misc/Inheritance.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
// Define a Dog object
View
1 samples/misc/SimpleCoro.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
yieldLoop := method(s,
for(i, 1, 3, writeln(s, " ", i); yield)
View
1 samples/misc/Sort.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
words := "video killed the radio star" split
writeln("original: ", words join(" "))
words = words sortBy(method(a, b, a < b))
View
1 samples/misc/Super.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
isDebugging := false
objs := List clone
View
1 samples/misc/WeakLink.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
weakLink := WeakLink clone setLink(Object clone)
writeln("WeakLink to ", weakLink link asSimpleString)
View
1 samples/misc/except.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
e := try(foo)
e catch(
writeln
View
1 samples/misc/qsort.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
List do(
qsort := method(
if(size < 2, return)
View
1 samples/misc/tailtest.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
writeln("start")
View
3 samples/misc/vtest.io 100644 → 100755
@@ -1,3 +1,4 @@
+#!/usr/bin/env io
Vector := Sequence clone setItemType("float32") setEncoding("number")
@@ -31,4 +32,4 @@ with vectorize and fastmath
2.092639 GFLOPS
2.039853 GFLOPS
2.055593 GFLOPS
-*/
+*/
View
4 samples/shootout/binarytrees.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Computer Language Shootout
http://shootout.alioth.debian.org
@@ -36,4 +38,4 @@ for (depth, minDepth, maxDepth, 2,
)
check = longLivedTree itemCheck
-writeln("long lived tree of depth ", maxDepth, "\t check: ", check)
+writeln("long lived tree of depth ", maxDepth, "\t check: ", check)
View
4 samples/shootout/chameneos.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
@@ -46,4 +48,4 @@ Creature clone setBlue @@run
while(Coroutine yieldingCoros size > 1, yield)
-meetings println
+meetings println
View
2 samples/shootout/cheapconcurrency.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Computer Language Shootout
http://shootout.alioth.debian.org
Contributed by Gavin Harrison */
View
4 samples/shootout/fannkuch.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org/
contributed by Ian Osgood */
@@ -43,4 +45,4 @@ fannkuch := method(n,
n := args at(1) asNumber
f := fannkuch(n)
-writeln("Pfannkuchen(", n, ") = ", f)
+writeln("Pfannkuchen(", n, ") = ", f)
View
4 samples/shootout/fasta.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
@@ -62,4 +64,4 @@ Fasta repeat(2*n, ALU)
Fasta random(3*n, IUB)
">THREE Homo sapiens frequency" println
-Fasta random(5*n, HomoSap)
+Fasta random(5*n, HomoSap)
View
4 samples/shootout/mandelbrot.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Computer Language Shootout
http://shootout.alioth.debian.org
@@ -87,4 +89,4 @@ MandelbrotSet := Object clone do(
)
MandelbrotSet dim := args at(1) asNumber
-MandelbrotSet do( calc; printSet )
+MandelbrotSet do( calc; printSet )
View
2 samples/shootout/nbody.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
View
4 samples/shootout/nsieve.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Computer Language Shootout
http://shootout.alioth.debian.org
contributed by Robert Brandner */
@@ -29,4 +31,4 @@ nsieve := method(n,
n := args at(1) asNumber
nsieve( (2^n)*10000 )
nsieve( (2^(n-1))*10000 )
-nsieve( (2^(n-2))*10000 )
+nsieve( (2^(n-2))*10000 )
View
4 samples/shootout/nsievebits.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
@@ -28,4 +30,4 @@ sieve := Object clone do(
n := args at(1) asNumber
sieve show(10000 shiftLeft(n))
sieve show(10000 shiftLeft(n-1))
-sieve show(10000 shiftLeft(n-2))
+sieve show(10000 shiftLeft(n-2))
View
4 samples/shootout/partialsums.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* ------------------------------------------------------------------ */
/* The Great Computer Language Shootout */
/* http://shootout.alioth.debian.org/ */
@@ -37,4 +39,4 @@ for (d, 1, n,
(s5 asString(0,9) .. "\tHarmonic") println
(s6 asString(0,9) .. "\tRiemann Zeta") println
(s7 asString(0,9) .. "\tAlternating Harmonic") println
-(s8 asString(0,9) .. "\tGregory") println
+(s8 asString(0,9) .. "\tGregory") println
View
4 samples/shootout/recursive.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* ------------------------------------------------------------------ */
/* The Great Computer Language Shootout */
/* http://shootout.alioth.debian.org/ */
@@ -56,4 +58,4 @@ n := n - 1
// Use concatenation for simpler ones
("Fib(3): " .. fib(3)) println
-("Tak(3.0,2.0,1.0): " .. (tak(3.0, 2.0, 1.0) asString(0,1))) println
+("Tak(3.0,2.0,1.0): " .. (tak(3.0, 2.0, 1.0) asString(0,1))) println
View
4 samples/shootout/reverse-complement.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
@@ -34,4 +36,4 @@ while (line := input readLine,
seq revComp output empty; line println,
seq appendSeq(line) )
)
-seq revComp output
+seq revComp output
View
4 samples/shootout/spectral-norm.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Computer Language Shootout
http://shootout.alioth.debian.org
contributed by Gavin Harrison */
@@ -28,4 +30,4 @@ SNorm:=Object clone do(
MAv(n,v,u)
MAtv(n,u,AtAv)))
n:=args at(1) asNumber
-SNorm App(n) asString(0,9) println
+SNorm App(n) asString(0,9) println
View
4 samples/shootout/sumcol.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org
@@ -6,4 +8,4 @@
sum := 0
file := File standardInput
while (line := file readLine, sum = sum + line asNumber)
-sum println
+sum println
View
2 samples/speed/speed.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
oneMillion := 1000000
View
2 samples/speed/speedResults.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
write("""
View
2 samples/speed/speedResults2.io 100644 → 100755
@@ -1,3 +1,5 @@
+#!/usr/bin/env io
+
template := """
<table cellpadding=3 cellspacing=0 border=0>

0 comments on commit 4b665d9

Please sign in to comment.
Something went wrong with that request. Please try again.