edn_turbo 0.7.4 → 0.8.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 +4 -4
- data/.github/workflows/ruby-ext.yml +4 -1
- data/CHANGELOG.md +18 -1
- data/LICENSE +1 -1
- data/README.md +29 -9
- data/Rakefile +2 -2
- data/bin/ppedn +1 -2
- data/bin/ppedn-ruby +0 -1
- data/ext/edn_turbo/edn_parser.cc +1 -1
- data/ext/edn_turbo/edn_parser.rl +1 -1
- data/ext/edn_turbo/extconf.rb +2 -2
- data/ext/edn_turbo/main.cc +2 -2
- data/ext/edn_turbo/parser.h +1 -1
- data/ext/edn_turbo/parser_def.cc +3 -3
- data/ext/edn_turbo/util.cc +1 -1
- data/ext/edn_turbo/util.h +1 -1
- data/ext/edn_turbo/util_unicode.cc +1 -1
- data/ext/edn_turbo/util_unicode.h +1 -1
- data/lib/edn_turbo/edn_parser.rb +1 -1
- data/lib/edn_turbo/version.rb +3 -3
- data/lib/edn_turbo.rb +1 -1
- data/spec/edn_turbo/edn_parser_spec.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da22623049c7e0a04737a2fb26d0670a686e2ddd0caa7f7d4b1ac5df34fbc495
|
4
|
+
data.tar.gz: '0802c895dcf8f7b41716e68a11086e86413534e884ea860bc79b8b9b136b6880'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 231b1b07c817d956dcc08186b9f820418129fb1587f92dd7a3b26b6a8bf34a7c420b62938fee2e8f7e9b5bdfe7b3b5a675edcc818c35580a72ee1414112a74cf
|
7
|
+
data.tar.gz: e87f2d5ad07ee3fc6c59a80e64a6f06a708a0f46d07d2bad428951b2f4fc131ea9afda4383dbf0c07f663f1d6131287e80156950dd107445421d25e958438f30
|
@@ -19,6 +19,9 @@ jobs:
|
|
19
19
|
- '2.7'
|
20
20
|
- '3.0'
|
21
21
|
- '3.1'
|
22
|
+
- '3.2'
|
23
|
+
- '3.3'
|
24
|
+
- '3.4'
|
22
25
|
runs-on: ${{ matrix.os }}
|
23
26
|
steps:
|
24
27
|
- run: sudo apt-get install -y libicu-dev libreadline-dev ragel
|
@@ -26,7 +29,7 @@ jobs:
|
|
26
29
|
with:
|
27
30
|
ruby-version: ${{ matrix.ruby }}
|
28
31
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
29
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v3
|
30
33
|
- run: bundle install
|
31
34
|
- run: bundle exec rake
|
32
35
|
- run: bundle exec rspec
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
3
3
|
|
4
|
+
## [0.8.1] - 2025-05-09
|
5
|
+
### Added
|
6
|
+
* bigdecimal as explicit dependency.
|
7
|
+
|
8
|
+
### Changed
|
9
|
+
* remove extra argument to Parser#next (caleb).
|
10
|
+
* changed compile flags to use c++17.
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
* coerce char to fix endless loop in aarch64 linux systems (#20).
|
14
|
+
|
15
|
+
## [0.8.0] - 2023-03-12
|
16
|
+
### Changed
|
17
|
+
* switch edn-ruby dependency to use edn2023.
|
18
|
+
|
4
19
|
## [0.7.4] - 2022-05-03
|
5
20
|
### Fixed
|
6
21
|
* empty strings should use utf-8 encoding (#11).
|
@@ -56,7 +71,9 @@ All notable changes to this project will be documented in this file. This change
|
|
56
71
|
### Added
|
57
72
|
* initial version of docker configs for testing on Ubuntu.
|
58
73
|
|
59
|
-
[Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.
|
74
|
+
[Unreleased]: https://github.com/edporras/edn_turbo/-/compare/0.8.1...devel
|
75
|
+
[0.8.1]: https://github.com/edporras/edn_turbo/-/compare/0.8.0...0.8.1
|
76
|
+
[0.8.0]: https://github.com/edporras/edn_turbo/-/compare/0.7.4...0.8.0
|
60
77
|
[0.7.4]: https://github.com/edporras/edn_turbo/-/compare/0.7.3...0.7.4
|
61
78
|
[0.7.3]: https://github.com/edporras/edn_turbo/-/compare/0.7.2...0.7.3
|
62
79
|
[0.7.2]: https://github.com/edporras/edn_turbo/-/compare/0.7.1...0.7.2
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
edn_turbo 0.
|
1
|
+
edn_turbo 0.8.1
|
2
2
|
===============
|
3
3
|
|
4
4
|
Fast [Ragel](http://www.colm.net/open-source/ragel/)-based EDN parser for Ruby.
|
5
5
|
|
6
|
-
`edn_turbo` can be used as a parser plugin for
|
7
|
-
|
8
|
-
`edn_turbo`
|
9
|
-
|
10
|
-
magnitude faster.
|
6
|
+
`edn_turbo` can be used as a parser plugin for [edn-ruby]. With a few
|
7
|
+
exceptions `edn_turbo` provides the same functionality as the edn gem,
|
8
|
+
but since the `edn_turbo` parser is implemented in C++, it is an order
|
9
|
+
of magnitude faster.
|
11
10
|
|
12
11
|
Some quick sample runs comparing time output of file reads using `edn`
|
13
12
|
and `edn_turbo` (see [issue 12](https://github.com/relevance/edn-ruby/issues/12)):
|
@@ -38,9 +37,9 @@ Ruby 2.6 or greater.
|
|
38
37
|
|
39
38
|
- ruby gems:
|
40
39
|
- [rake](http://rake.rubyforge.org)
|
41
|
-
- [rake-compiler
|
42
|
-
- [
|
43
|
-
- a C++-
|
40
|
+
- [rake-compiler](http://rake-compiler.rubyforge.org)
|
41
|
+
- [edn2023]
|
42
|
+
- a C++-17 capable compiler.
|
44
43
|
- [icu4c](http://icu-project.org/apiref/icu4c/)
|
45
44
|
|
46
45
|
Notes:
|
@@ -48,6 +47,11 @@ Notes:
|
|
48
47
|
|
49
48
|
- `edn_turbo` uses a ragel-based parser but the generated .cc file is
|
50
49
|
bundled so ragel should not need to be installed.
|
50
|
+
- If your system updates the installed version of icu4c, you'll likely
|
51
|
+
get symbol errors when trying to use `edn_turbo` as the libraries it
|
52
|
+
was linked against when first installed will no longer exist. To
|
53
|
+
resolve this, reinstall the gem so it is built against the new icu4c
|
54
|
+
libraries.
|
51
55
|
|
52
56
|
Usage
|
53
57
|
=====
|
@@ -114,3 +118,19 @@ calls into the ruby side.
|
|
114
118
|
`Float::INFINITY` and `##NaN` as `Float::NAN`.
|
115
119
|
|
116
120
|
- As of v0.7.1, `edn_turbo` requires ruby 2.5 or greater.
|
121
|
+
|
122
|
+
- As of v0.7.4, `edn_turbo` requires ruby 2.6 or greater.
|
123
|
+
|
124
|
+
- As of v0.8.0, `edn_turbo` replaces its [edn-ruby] with [edn2023].
|
125
|
+
|
126
|
+
Building and running tests
|
127
|
+
==========================
|
128
|
+
|
129
|
+
```sh
|
130
|
+
bundle install
|
131
|
+
bundle exec rake
|
132
|
+
bundle exec rspec
|
133
|
+
```
|
134
|
+
|
135
|
+
[edn-ruby]: https://github.com/relevance/edn-ruby
|
136
|
+
[edn2023]: https://github.com/edn2023/edn2023
|
data/Rakefile
CHANGED
@@ -50,8 +50,8 @@ task :graph, %i[machine] do |_t, args|
|
|
50
50
|
machine = args[:machine]
|
51
51
|
|
52
52
|
# assumes graphviz is installed
|
53
|
-
sh "ragel -Vp -S #{machine} -o #{tmpfile} #{EXT_PATH}/#{RAGEL_PARSER_SRC} && "\
|
54
|
-
|
53
|
+
sh "ragel -Vp -S #{machine} -o #{tmpfile} #{EXT_PATH}/#{RAGEL_PARSER_SRC} && " \
|
54
|
+
"dot -Tpng #{tmpfile} -o #{machine}.png"
|
55
55
|
end
|
56
56
|
|
57
57
|
task build: %i[clean ragel compile chmod]
|
data/bin/ppedn
CHANGED
data/bin/ppedn-ruby
CHANGED
data/ext/edn_turbo/edn_parser.cc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#line 1 "edn_parser.rl"
|
3
3
|
// The MIT License (MIT)
|
4
4
|
|
5
|
-
// Copyright (c) 2015-
|
5
|
+
// Copyright (c) 2015-2025 Ed Porras
|
6
6
|
|
7
7
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/edn_parser.rl
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/extconf.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2025 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -47,7 +47,7 @@ else
|
|
47
47
|
$warnflags.sub!(f, '')
|
48
48
|
end
|
49
49
|
end
|
50
|
-
$CXXFLAGS << ' -std=c++
|
50
|
+
$CXXFLAGS << ' -std=c++17 -std=gnu++17'
|
51
51
|
|
52
52
|
abort "\n>> failed to find icu4c headers - is icu4c installed?\n\n" unless
|
53
53
|
find_header('unicode/uversion.h')
|
data/ext/edn_turbo/main.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -167,7 +167,7 @@ namespace edn {
|
|
167
167
|
|
168
168
|
//
|
169
169
|
// gets the next token in the current stream
|
170
|
-
static VALUE next(VALUE self
|
170
|
+
static VALUE next(VALUE self)
|
171
171
|
{
|
172
172
|
return get_parser(self)->next();
|
173
173
|
}
|
data/ext/edn_turbo/parser.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/parser_def.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -128,14 +128,14 @@ namespace edn
|
|
128
128
|
// read as much data available
|
129
129
|
if (core_io) {
|
130
130
|
// ruby core IO types
|
131
|
-
|
131
|
+
int c;
|
132
132
|
while (1)
|
133
133
|
{
|
134
134
|
c = fgetc(core_io);
|
135
135
|
if (c == EOF) {
|
136
136
|
break;
|
137
137
|
}
|
138
|
-
str_buf += c;
|
138
|
+
str_buf += static_cast<char>(c);
|
139
139
|
}
|
140
140
|
|
141
141
|
} else if (read_io != Qnil) {
|
data/ext/edn_turbo/util.cc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/ext/edn_turbo/util.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// The MIT License (MIT)
|
2
2
|
|
3
|
-
// Copyright (c) 2015-
|
3
|
+
// Copyright (c) 2015-2025 Ed Porras
|
4
4
|
|
5
5
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
// of this software and associated documentation files (the "Software"), to deal
|
data/lib/edn_turbo/edn_parser.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2025 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/edn_turbo/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2025 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -23,6 +23,6 @@
|
|
23
23
|
# THE SOFTWARE.
|
24
24
|
|
25
25
|
module EDNT
|
26
|
-
VERSION = '0.
|
27
|
-
RELEASE_DATE = '
|
26
|
+
VERSION = '0.8.1'
|
27
|
+
RELEASE_DATE = '2025-05-09'
|
28
28
|
end
|
data/lib/edn_turbo.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# The MIT License (MIT)
|
4
4
|
#
|
5
|
-
# Copyright (c) 2015-
|
5
|
+
# Copyright (c) 2015-2025 Ed Porras
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2015-
|
3
|
+
# Copyright (c) 2015-2025 Ed Porras
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
metadata
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edn_turbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Porras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bigdecimal
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: edn2023
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
@@ -154,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
168
|
- !ruby/object:Gem::Version
|
155
169
|
version: '0'
|
156
170
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.4.19
|
158
172
|
signing_key:
|
159
|
-
specification_version:
|
173
|
+
specification_version: 4
|
160
174
|
summary: Read EDN files
|
161
175
|
test_files: []
|