==================================================
Changes from 2019-01-13 00:00:00 +0000 to present.
==================================================
------------------------------------------
version 0.015 at 2020-01-13 20:30:16 +0000
------------------------------------------
Change: 58dc66c7c38886ea6ebd3b7238a6de050be0c3ee
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2020-01-13 21:29:33 +0000
fit_to_view: cope with undef children
The child summary logic inadvertently assumed that data structure
members were defined. This commit (and test) corrects that oversight.
Adding Test2::Plugin::NoWarnings as well, since the test output is
verbose enough that there's a risk of missing warnings.
------------------------------------------
version 0.014 at 2020-01-11 11:34:03 +0000
------------------------------------------
Change: c0ebd5d50693d6f5477fa936d8ea33fc72b34ed9
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2020-01-11 12:34:03 +0000
v0.014
Change: 37791ba740055882e00a466e307928b189acd3da
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2020-01-11 12:25:18 +0000
interpreter: quote scalars in error messages
Improve readability of the error messages slightly.
Change: c8f1251f8ecb5891f816c18e791c1ab6b6e9be0f
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2020-01-11 12:25:18 +0000
Fix outdated comments and documentation
These were leftovers from when `fit_to_view` might return a data
structure if it was small enough. Since the removal of Devel::Size in
f03d4e1d02, `fit_to_view` unconditionally summarizes.
------------------------------------------
version 0.012 at 2019-06-19 17:27:35 +0000
------------------------------------------
Change: f03d4e1d02911665fb8eb4a3cd55de0ac8073370
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-19 19:27:35 +0000
Remove Devel::Size.
Some profiling indicated that it was by far the most expensive part
of Devel::Optic. With it enabled, throughput on a "hello world"
Mojolicious app dropped to about 50% of normal. Without it, overhead
was small enough to be nearly unmeasureable.
This has the downside that Devel::Optic now _always_ summarizes.
A better conceptual approach would be to write a custom serializer:
start traversing the data structure and adding to the serialized
representation. When that representation becomes too big, stop and
send it. That would get maximum information for minimum size.
However, the current strategy (always do a basic one-level summary)
is much simpler to implement, so we'll start with this and await some
feedback.
------------------------------------------
version 0.011 at 2019-06-17 19:33:52 +0000
------------------------------------------
Change: 085ba28938539c460f28543329d78d57b2fad0f3
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-17 21:33:52 +0000
Package versions / ABSTRACT cleanups
------------------------------------------
version 0.010 at 2019-06-16 19:00:02 +0000
------------------------------------------
Change: 013fd433ce6a9f154e1e6945bdc9bbd033ff48fb
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-16 21:00:02 +0000
tests: add tests for nested resolution
Change: 21e6bf3d41ae229f72347f2504a715a769fa0d7b
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-16 18:56:31 +0000
cpants: META provides
Change: 80d4c9febfc32a2c90135c766c6928a5107b9215
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-16 18:53:34 +0000
cpants: strict/warnings
Change: 03d1de2e49d1e7abf926eb0e34546f72f198e904
Author: Mohammad S Anwar <Mohammad.Anwar@yahoo.com>
Date : 2019-06-16 18:52:59 +0000
Auto generate META.json using plugin [MetaJSON]. (#3)
------------------------------------------
version 0.009 at 2019-06-15 21:31:00 +0000
------------------------------------------
Change: 4df57a7e1649d21508f6c681f8d4d15ca4b0e844
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 23:31:00 +0000
@CARP_NOT tweak
So callers of Devel::Optic get errors thrown on the line where the
probe is defined, not inside of Devel::Optic.
------------------------------------------
version 0.008 at 2019-06-15 21:09:58 +0000
------------------------------------------
Change: e7da290494874cb012983eb691088c12e0a05050
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 23:09:58 +0000
fit_to_view: support coderefs
This commit introduces a dependency on Sub::Info in order to provide
some details on coderefs: name, package, file, and lines.
Change: 0aa1eb9d5b3225cb6f039d8cf120bfc9bf23f896
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 23:01:16 +0000
fit_to_view: support regexps/scalarrefs
Also clean up truncation messages.
Change: 00b2f2a5089b71f352e08fb46124fc5b61948c26
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 22:25:01 +0000
fit_to_view: fix sample count > data structure size
Summaries of hashes were not respecting the number of keys in the
hash, so if you had a sample key count of 10, and a hash like { a =>
1 }, Devel::Optic was going to misbehave.
Rename ref_key_sample_count -> sample_count along the way.
------------------------------------------
version 0.007 at 2019-06-15 17:08:14 +0000
------------------------------------------
Change: fb3c9d54da759058c92e64efe5be84fff87735fd
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 19:08:14 +0000
Syntax change to accommodate Perl < 5.18
Thank you, CPAN testers!
------------------------------------------
version 0.006 at 2019-06-15 13:02:06 +0000
------------------------------------------
Change: 7816a4894a020596e52157c05c39db0b94cdf2bf
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 15:02:06 +0000
tests: escape braces in regex
Change: 021031425483141c5540ab1e8c252aef709b1dbc
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-06-15 14:56:10 +0000
README: stray word
Change: 099ccc4e920bd912cd4817c892816330a7743268
Author: Ben Tyler <benjamin.tyler@gmail.com>
Date : 2019-06-15 14:52:18 +0000
Perlish parser (#2)
* Prototype: Perl-ish syntax for accessing vars in scope
This is potentially a really terrible idea, but it was fun to work on
the parser. Basically: JSON::Pointer syntax is probably a little too
simple -- Sawyer had good feedback on not just guessing whether
something is a hash or array access. So he wrote a nice, compact
lexer and parser to support quoted strings and spit out tokens with
types.
This commit takes that general idea, and goes a little nuts: the
parser now produces an AST describing a Perl-like syntax for
dereferencing and accessing Perl data structures. It supports simple
cases, like '$my_cool_hashref', but also fancy ones, like
'$my_cool_hashref->{$some_arrayref->[-1]->{nested_hashkey}->{$some_sc
alar}}';
It does not use Perl 'eval'; indeed, it violates normal Perl syntax
rules in several ways. For example, indexing into a data structure
_always_ uses '->', even if it isn't a ref, e.g.
'%my_cool_hash->{foo}'. As a result, this might be uncanny valley
territory.
TODO: tests, the interpreter, reviewing whether this is remotely a
reasonable thing to do.
* parser: export 'lex', 'parse', and ':constants'
':constants' will be used for testing, as well as interpreting the op
tree
* parser: these syntax names are never used
* lexer: die on empty or obviously bogus spec
Everything will always need to start with a Perl symbol name.
* parser: split hash/array parsing into subs
I think this makes it a bit easier to follow the flow.
* parser: be stricter about symbol names
Catch some obvious typos that will never be valid symbol names (like
'$fo o').
* parser: better error messages for Perl syntax
This is probably a signal that this langauge should conform more
closely to real Perl syntax, but I'm not ready to invest in doing
that just yet.
* lexer/parser: require strings to be quoted
This allows the parser to be more informative about bad input.
Legitmate use of single quotes in hash key literals can be managed
via backslash escapes.
* parser: flesh out test cases
Along the way the lexer was changed to return a list instead of an
arrayref. This has better symmetry with the input format for 'parse',
which is a list of tokens.
* parser: tests for invalid parses
* parser: make it an object
This makes it easier to introduce a 'parser' argument to Devel::Optic
which is any object which ->can("parse").
* parser: cosmetic reorganization
* interpreter: naive recursive interpreter
This commit introduces a basic recursive interpreter for the AST spat
out by the parser. With this, the basic functionality of Devel::Optic
is back in place, now with a much higher power language for data
access.
Ideally I'd like to change this and the parser to be non-recursive to
reduce the number of sub calls -- the interpeter code, at least,
might be running inside very hot parts of a system -- but I couldn't
quite picture how to do this with explicit stacks, and I wanted to
get something functioning to start with. Make it work, make it right,
make it fast, yada yada yada.
TODO: adapt tests, adapt main functions to use this, more human
readable error messages, performance measurements and optimizations.
The error messages are going to be quite a challenge -- the simple
(and non-nested) JSON::Pointer syntax made it easy to tell users
exactly where we were when things went pear shaped, so we could give
very useful feedback to guide iteration. That's a bit trickier with
recursive tree traversal.
* tests: move 'parser' earlier than 'full_picture'
full_picture uses the parser in order to work, so it should come
later in the sequence.
* sweeping code reorganization
stuff interpreter/parser inside a 'lens' (maybe the name wasn't so
bad?), which is self-contained as to what language it expects and how
it gets data out of Perl
update docs to reflect new syntax
some tests are commented out because introducing a full-blown mini
language for apertures has a lot of benefits, but simplicity of
contextful error reporting is not among them.
* die -> croak
many errors are caller errors
* 'aperture' -> 'query'
KISS terminology
* high quality error reporting
This commit restores the errors reported by the Perlish lens to more
or less the level of quality I had in the first, naive query syntax.
------------------------------------------
version 0.005 at 2019-04-12 21:25:35 +0000
------------------------------------------
Change: 15cb5cfbbb180d8371adb7f59f0eec9bb99ebc9c
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 23:25:35 +0000
Add CHANGES and github meta links
------------------------------------------
version 0.004 at 2019-04-12 21:17:26 +0000
------------------------------------------
Change: 3b987c5b75b1a1962903ff4f8e76304f89514507
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 23:17:26 +0000
Summarization size threshold varies by platform.
After several rounds of CPAN tester feedback that this module's tests
fail on every architecture aside from x86_64 (that is, my laptop), it
has become apparent that the module needs to be a little smarter
about how Perl's memory footprint varies according to arch. In order
to do so, I've introduced an 'exemplar' large data structure that
seems like a sane max size.
Additionally, this commit introduces the 'diagnostic' param to
Test2's 'like': future failed tests should be a little clearer.
Change: f1648657f3bcf7a3c915f533a60c5cf3f1b99e49
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 23:17:02 +0000
Scalar truncation size: 512 -> 256
This creates a bit of symmetry with the scalar sample size (64 bytes)
and ref key sample count (4).
I think this is still reasonable, but I suspect that rather than
trying to tune this size to be exactly right it'd be better to
support a 'slice'-ish syntax for people to be able to pick chunks out
of strings or arrays.
Change: fd63da821b3557a08a40273d692918c7145c4c02
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 23:16:11 +0000
CPANTS prefers a README in the dist
So include it by copying intead of moving it out.
Change: 81698fdc777bb8c7a4236522d92c120a7a17e96c
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 23:16:07 +0000
Focus on 'length', not 'bytes' for non ref scalars
'Size in bytes' is misleading when we're really talking about
'substr'.
Change: 80116adde79839ac7187cdcdb09fa05dbb39a37a
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-12 21:49:41 +0000
Silence Pod::Weaver warning about ABSTRACT
------------------------------------------
version 0.003 at 2019-04-11 16:31:42 +0000
------------------------------------------
Change: d223e70671f124d1982f2e9d377ed93a6a6e04ba
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 18:31:42 +0000
v0.003
Change: fa57b025d9371e3257986fb1134173cc4e582ca1
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 18:30:24 +0000
s/lens/route/g
'lens' was a little too whimsical. I'm not convinced "route" is
wildly better, but it is a little less out there.
Change: 863a26ef0c011a4ec13150e76f9ca17c77a96774
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 17:53:32 +0000
add generated README
Change: 44281df2b439f5f197c08bb20aeef6991150bc48
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 17:52:15 +0000
fetch README from build
------------------------------------------
version 0.002 at 2019-04-11 15:40:04 +0000
------------------------------------------
Change: 2255094d56054048877b61b0be55c3fa2ba8ce8d
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 17:40:04 +0000
Add Git::NextVersion
Change: 912b87fecc28e79d1e26c2f54475852c63647b5d
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 17:26:56 +0000
PodWeaver/README from pod
Change: 879c1f646d36adb47b3cdd327840b3139193146d
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 17:26:34 +0000
Perl 5.10 minimum
Change: 81f2bbccdc796a476806b62fe2ca5e33eca368b4
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 16:48:50 +0000
Change standard for "objectively large."
Tests were failing on 32-bit platforms because Devel::Size was
returning a small enough value to fall below the default threshold.
Change: afc54876394570c690414c84639474c2feb5db16
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 01:37:16 +0000
duplicates with the bundles
------------------------------------------
version 0.001 at 2019-04-10 23:17:02 +0000
------------------------------------------
Change: 5c69c5cb6b531f996591addc235075f01c35c8a4
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 01:17:02 +0000
Add CPAN release to dist.ini
Change: 628a8c836522e352bd44c73223a861d1ca1b0295
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 01:12:15 +0000
Tests for 'fit_to_view'
While writing the tests, realized that hash keys can also be
ginormous, and truncated them.
Making the default values constants allows for more robust tests.
Change: 7b79717b271714b319c1d5eed7dcd449d479d4c6
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-11 00:13:02 +0000
Flip 'got' and 'expected' to match Test2 docs
Change: d1d8935d40a1bc8c26f72152a42d1de5268906b7
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-10 23:21:12 +0000
Rename .t to match function name
Change: b9f2806dcb8840ac865a19b477a393c3866a6353
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-10 18:09:04 +0000
More validation for lenses
Change: 2dac75fe0972cd1ed1a93c1a533e553629b6571a
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-10 17:51:17 +0000
more tests for full_picture
* exception tests * negative index tests
Change: b55cfb2e06183a8fd4d3d6a11c193fe7eebcd638
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-10 12:13:29 +0000
Document motivations around the lens syntax
Change: 4937f70d445f88b4c80f9bbec3d60a0d864dc641
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-10 08:54:46 +0000
Test::More -> Test2
Change: 16bd385c4906a3e74de991fb0c4a4472eca1cb8e
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-09 19:50:59 +0000
Remove 'serialize' hook; initial tests
Change: 3683c6fae6a6ff09b8a1e6eb72d95ec745140980
Author: Ben Tyler <benjamin.tyler@booking.com>
Date : 2019-04-09 02:17:14 +0000
WIP
================
End of releases.
================