Commit Graph
115 Commits
Author SHA1 Message Date
Kare Morstol a377eb18fd Add better error reporting to “open” function. Add public function "printErrorAndExit". 2014-11-23 23:31:06 +01:00
Kare Morstol 05fb61a4ab Remove unnecessary whitespace, courtesy of Xcode. 2014-11-23 23:19:30 +01:00
Kare Morstol 30f30baa07 Fixed small typo. 2014-11-23 20:22:51 +01:00
Kare Morstol 0fc373937c Add link to a SwiftShell script, trash.swift.
Also removed the word "very".
2014-11-21 21:12:13 +01:00
Kare Morstol 6be3d656e3 Clean up playground. 2014-11-21 20:19:00 +01:00
Kare Morstol 7d667165fd Clarify note about crashing when reading from streams.
It is the compiled code that crashes, not the compiler itself.
2014-11-21 20:14:53 +01:00
Kare Morstol 4b1e6d2689 Change countOccurrencesOfto use String.findAll. 2014-11-19 22:48:13 +01:00
Kare Morstol a63bc3b536 Changed to the MIT license.
Because I don't really care that much about enforcing the sharing of changes.
2014-11-14 19:19:59 +01:00
Kare Morstol cd5abf31d8 Add version of replace method with limit.
Also rename parameters in original version.
2014-11-06 00:04:51 +01:00
Kare Morstol 4254364b74 This indentation was brought to you by Xcode (6.1). 2014-11-06 00:02:24 +01:00
Kare Morstol d557f6a5fd Add take function. 2014-11-05 20:41:33 +01:00
Kare Morstol b870c209e8 Add findAllmethod to String. 2014-11-05 19:57:13 +01:00
Kare Morstol e67f465457 Add "countOccurrencesOf" to String. 2014-11-05 17:40:13 +01:00
Kare Morstol 548e0740d4 Tidy up the code some more. 2014-10-30 00:28:20 +01:00
Kare Morstol e4272d043c Tidy up the code. 2014-10-30 00:11:46 +01:00
Kare Morstol e393c3d7a5 Change readme.md to use writeTo. 2014-10-25 21:07:40 +02:00
Kare Morstol 977888c03b Rename "write" functions to "writeTo".
Because it makes more sense.
2014-10-25 19:17:07 +02:00
Kare Morstol ba2fee299f Clarify note about crashing when optimisations are turned on. 2014-10-24 22:24:09 +02:00
Kare Morstol 6ce3a3ab26 Add "writeln" functions to WriteableStreamType. 2014-10-24 21:05:18 +02:00
Kare Morstol c04cd0d84b Add function “drop” for discarding elements from a sequence. 2014-10-24 20:26:00 +02:00
Kare Morstol 1b78cab9fd Add a space before result of the parameters function.
So you don't have to remember to add it after the command.
2014-10-24 20:24:07 +02:00
Kare Morstol 7c0048820a Enable build for running again, so SwiftShell will work in a playground. 2014-10-24 20:21:55 +02:00
Kare Morstol e116a29a4a Rename array to toArray. 2014-10-23 19:19:11 +02:00
Kare Morstol 0edc3d30dd Deactivate unnecessary builds. 2014-10-23 19:11:56 +02:00
Kare Morstol 1587679b0b Simplify writing to streams by using "toString".
Had I only known how awesome toString is.
2014-10-23 02:20:32 +02:00
Kare Morstol 6d588bfe29 Add "parameters" function for turning a sequence into valid parameters for a shell command, properly quoted. 2014-10-23 01:41:53 +02:00
Kare Morstol 991da5fd39 Add “array” function for turning a sequence into an array, used after the |> operator. 2014-10-23 00:14:10 +02:00
Kare Morstol 838b5ee617 Make “Debug” the default command line configuration.
The Swift compiler (Xcode 6.1) crashes when reading from streams when SwiftShell is built with optimisations turned on (anything but "SWIFT_OPTIMIZATION_LEVEL = -Onone").
2014-10-22 22:12:28 +02:00
Kare Morstol 8441d5e87b Add missing newline at end of file 2014-10-22 21:37:50 +02:00
Kare Morstol 7328c7c32e Note how release builds from 6.1 GM 2 still crash when using streams. 2014-10-15 23:45:39 +02:00
Kare Morstol 9136d17843 Use "|> write(standardoutput)" instead of " |> standardoutput". And support writing of sequences of strings.
Avoids the special case of "|> WriteableStreamType".
2014-10-15 23:03:42 +02:00
Kare Morstol d09aa63f3e Add test testChainWithSequenceOfStreamsPrintedToStream. 2014-10-13 22:00:53 +02:00
Kare Morstol a144bc2650 Fix small typo and excessive whitespace. 2014-10-09 18:36:28 +02:00
Kare Morstol f56f7a0371 Use SwiftShells environment. 2014-10-07 19:03:56 +02:00
Kare Morstol 5cc4e33cb4 Small cleanup. 2014-10-07 18:53:26 +02:00
Kare Morstol 715cb3ef14 Test callswiftscriptfromswift last to test its components first. 2014-10-07 18:39:05 +02:00
Kare Morstol b111afa8d8 Add bash script to test all Swift scripts. 2014-09-24 21:15:25 +02:00
Kare Morstol c6734b8825 Add testSequenceOfStreamsToStream. 2014-09-24 21:03:09 +02:00
Kare Morstol c19d7537c6 Edit README to be less bad. 2014-09-23 01:18:10 +02:00
Kare Morstol 96eb12b9fe Enable "sequence of readable streams |> writeablestream".
Updated test script and README.
2014-09-18 00:51:50 +02:00
Kare Morstol dd6e0d3a8f Clean up double spaces. 2014-09-17 23:41:38 +02:00
Kare Morstol 7810c38765 pathForTestResource still won't work outside of a method (6.1 beta 2). 2014-09-17 23:40:52 +02:00
Kare Morstol f0d4c34f9b Add versions of global Swift functions that can be used with the |> operator.
-   Moved overloads of |> operator for WriteableStreamType to Stream.swift.

Note: it takes forever to compile if you put too many |> operators in a row.
2014-09-17 23:39:21 +02:00
Kare Morstol 022bf75b76 Fix indentation of install command in README 2014-09-17 17:15:12 +02:00
Kare Morstol f3de629868 Include note in README on using debug builds on Xcode 6.1 2014-09-17 17:09:52 +02:00
Kare Morstol 1aa06b20f5 Make debug build installable.
Have to use debug builds instead of release in Xcode 6.1 beta 2. See issue #2.
2014-09-17 16:36:31 +02:00
Kare Morstol 7ef52b67bf Move XCTestCase.pathForTestResource to a file common for all unit test targets. 2014-09-15 22:17:06 +02:00
Kare Morstol e296555499 Silence warning from 6.1 beta 2.
"Treating a forced downcast to 'String' as optional will never produce 'nil'" is no doubt true, but I'm not treating it as an optional so I don't see the relevance.
2014-09-15 21:16:19 +02:00
Kare Morstol 36e217c0c3 Make piping one stream to another lazy. 2014-09-12 01:12:50 +02:00
Kare Morstol 1d6788c08e Add readme to scripts folder. Move test area.playground. 2014-09-11 21:39:35 +02:00