lasp 0.2.0 → 0.3.0

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: 68dbe78c047584740bc6f5347986c79f91509e9f
4
- data.tar.gz: 59e1576d2daba17a0a3226d19582e01f5f645f64
3
+ metadata.gz: b9312193019f4743a32ec2100be7bf63cac20939
4
+ data.tar.gz: cd4b86e5da7c423f1f9a5f6fdf185d1823bc9ff7
5
5
  SHA512:
6
- metadata.gz: 86c24ac9ca3517ce90176832250197d27508dc2ab9fc4823c2e22195b0f9ae9f8f724f0d8e13837bbf17809553f4b06de91c84b3f3a37d667782d801da032931
7
- data.tar.gz: 3d20db7ce8ffba5e3e6aba5fffbbfc064fb91f5058910987ee5b0bf26bc0e4373fdd7e064d92883cb1c882e0d99e9d022cd1de53ae00f484c1b88420e15875f9
6
+ metadata.gz: 99656390019064ffa472043d8cba2c56462a5adc0c9528c90dd8267e04063343b4de9600d2d9f39cc7299795f9bd598ab5205b80b46c6919452e3479a8d74f67
7
+ data.tar.gz: d56405b1afedc2646ce615ea5bef5942c20ee28adfbee5db9f69e789acb777b4e4cdc5713d331a4771ee2af38190b446db826da4ccdb6bc38b2149d8cb2009c4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Läsp changelog
2
2
 
3
+ ## v0.3.0
4
+
5
+ Add readline support in the REPL using rlwrap, this makes the REPL a **lot** nicer to use.
6
+
3
7
  ## v0.2.0
4
8
 
5
9
  Add support for hash-maps with the following added functions to the core library:
data/README.md CHANGED
@@ -27,6 +27,9 @@ 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
+
30
33
  ## The language
31
34
 
32
35
  ### Examples
data/bin/lasp-repl CHANGED
@@ -1,17 +1,7 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/env bash
2
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
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
data/bin/lasp-repl.rb ADDED
@@ -0,0 +1,17 @@
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
data/lib/lasp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lasp
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Börjesson
@@ -44,6 +44,7 @@ email:
44
44
  executables:
45
45
  - lasp
46
46
  - lasp-repl
47
+ - lasp-repl.rb
47
48
  extensions: []
48
49
  extra_rdoc_files: []
49
50
  files:
@@ -56,6 +57,7 @@ files:
56
57
  - Rakefile
57
58
  - bin/lasp
58
59
  - bin/lasp-repl
60
+ - bin/lasp-repl.rb
59
61
  - lasp.gemspec
60
62
  - lib/lasp.rb
61
63
  - lib/lasp/corelib.rb