lasp 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9312193019f4743a32ec2100be7bf63cac20939
4
- data.tar.gz: cd4b86e5da7c423f1f9a5f6fdf185d1823bc9ff7
3
+ metadata.gz: 381e41bcebb8866b57ce8e12c1fae2e6f0ec399b
4
+ data.tar.gz: fb12d78b778f646298d85db2563d83d6e8d92308
5
5
  SHA512:
6
- metadata.gz: 99656390019064ffa472043d8cba2c56462a5adc0c9528c90dd8267e04063343b4de9600d2d9f39cc7299795f9bd598ab5205b80b46c6919452e3479a8d74f67
7
- data.tar.gz: d56405b1afedc2646ce615ea5bef5942c20ee28adfbee5db9f69e789acb777b4e4cdc5713d331a4771ee2af38190b446db826da4ccdb6bc38b2149d8cb2009c4
6
+ metadata.gz: de8fa110484e874537da3c2e328205ed8fe5b209556eff571bd9aea2dc5679ff916f121dcdca6caac59a04d6d21fd0cc45ba1b971dfa5eff65c9e345464cd6d3
7
+ data.tar.gz: d7005142bca0d159e3af25515bb61698fb97a76e6968abfec82a2112509c3fd80a0b425284acc4fb240a3bd2dcdbf1b3ef34adc78ecb02ece89e8c604bdca318
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Läsp changelog
2
2
 
3
+ ## v0.3.1
4
+
5
+ Make readline support actually work once released to rubygems by implementing it directly in Ruby.
6
+
7
+ It does not seem to remember history between runs like rlwrap did, but trying
8
+ to deploy an interactive bash script to rubygems is just too much of a headache
9
+ and this is almost as nice with just a single line of Ruby.
10
+
3
11
  ## v0.3.0
4
12
 
5
13
  Add readline support in the REPL using rlwrap, this makes the REPL a **lot** nicer to use.
data/README.md CHANGED
@@ -27,9 +27,6 @@ lasp-repl
27
27
  lasp path/to/program.lasp
28
28
  ```
29
29
 
30
- It is highly recommended that you also install rlwrap (`brew install rlwrap`),
31
- this gives the repl readline support and makes it **much** nicer to use.
32
-
33
30
  ## The language
34
31
 
35
32
  ### Examples
data/bin/lasp-repl CHANGED
@@ -1,7 +1,19 @@
1
- #!/usr/bin/env bash
1
+ #!/usr/bin/env ruby
2
2
 
3
- # Use rlwrap for readline support if it exists
4
- if hash rlwrap 2>/dev/null
5
- then rlwrap lasp-repl.rb
6
- else lasp-repl.rb
7
- fi
3
+ require "lasp"
4
+ require "readline"
5
+
6
+ Lasp::load_stdlib!
7
+
8
+ trap("SIGINT") { puts "\n\nBye!"; exit }
9
+
10
+ puts "((( Läsp v#{Lasp::VERSION} REPL (ctrl+c to exit) )))\n\n"
11
+ loop do
12
+ begin
13
+ input = Readline.readline("lasp> ", true)
14
+ result = Lasp::execute(input)
15
+ puts " => #{result.inspect}"
16
+ rescue
17
+ puts " *> #{$!}"
18
+ end
19
+ end
data/lib/lasp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lasp
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lasp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Börjesson
@@ -44,7 +44,6 @@ email:
44
44
  executables:
45
45
  - lasp
46
46
  - lasp-repl
47
- - lasp-repl.rb
48
47
  extensions: []
49
48
  extra_rdoc_files: []
50
49
  files:
@@ -57,7 +56,6 @@ files:
57
56
  - Rakefile
58
57
  - bin/lasp
59
58
  - bin/lasp-repl
60
- - bin/lasp-repl.rb
61
59
  - lasp.gemspec
62
60
  - lib/lasp.rb
63
61
  - lib/lasp/corelib.rb
data/bin/lasp-repl.rb DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "lasp"
4
- Lasp::load_stdlib!
5
-
6
- trap("SIGINT") { puts "\n\nBye!"; exit! }
7
-
8
- puts "((( Läsp v#{Lasp::VERSION} REPL (ctrl+c to exit) )))\n\n"
9
- loop do
10
- begin
11
- print "lasp> "
12
- result = Lasp::execute(gets.chomp)
13
- puts " => #{result.inspect}"
14
- rescue
15
- puts " *> #{$!}"
16
- end
17
- end