Benjamin Kalman
c5a6382d25
Implement compoundList Set/Insert/Remove/RemoveAt.
2015-12-14 13:23:48 -08:00
Benjamin Kalman
9a3e73779d
Make types.Ref implement the OrderedValue interface.
...
This fixes the bug where compoundSets/Maps of refs are ordered by their
type.Ref's Ref, rather than their type.Ref's TargetRef.
2015-12-14 11:28:38 -08:00
Erik Arvidsson
7c43a2b49d
Merge pull request #751 from arv/encode-numbers-as-strings
...
Go: Encode numbers as strings
2015-12-14 09:49:34 -05:00
Erik Arvidsson
796c11b0f7
Make sure floats are encoded in a more restricted format
2015-12-12 17:34:47 -05:00
Erik Arvidsson
40d164fe47
Go: Encode numbers as strings
...
Because JSON encoders encode numbers differently we cannot just use
numbers in the output.
This still encodes the NomsKind as numbers.
Towards #749
2015-12-11 16:30:07 -05:00
Benjamin Kalman
26848de0e7
Implement compoundList.Slice.
2015-12-10 15:46:24 -08:00
Rafael Weinstein
dc58008226
Fix crunchbase importer
2015-12-09 15:16:00 -08:00
Benjamin Kalman
5ab90e8ae1
Change list/blob chunk values to be their length, not cumulative length.
...
This is simpler for chunking, since it no longer needs to "normalize"
the values when re-chunking. It's a bit less efficient because instead
of binary searching we need to linear search through chunk values.
2015-12-09 10:38:06 -08:00
Rafael Weinstein
d198036618
Compound Map & Set
2015-12-08 16:25:02 -08:00
Benjamin Kalman
71072e81ed
Combine metaSequenceCursor/sequenceChunkerCursor as sequenceCursor.
...
Then add a bunch of tests for sequenceCursor. This ends up changing the
behavior of sequenceCursor to make it more consistent, but the behavior
of sequenceChunker and compoundList (etc) shouldn't change.
2015-12-04 17:01:02 -08:00
Rafael Weinstein
e5409f2698
Remove MetaSequenceKind from serialization
2015-12-04 13:34:30 -08:00
Ben Kalman
27c498e032
Merge pull request #716 from kalman/buz-window-size
...
Correctly distinguish between chunking window size and buzhash window…
2015-12-03 15:26:56 -08:00
Benjamin Kalman
338de4e583
Correctly distinguish between chunking window size and buzhash window size.
...
Previously the buzhash boundary checker used a single value for the
window size, both as the buzhash buffer size when constructing a hash
object, and reported as its window size to the boundary checker
interface. This was wrong because we don't always pass single byte
values to the hasher, for example refs are 20 bytes.
The compound list chunking compensated for this by only passing the
first byte of each list leaf's ref rather than the full ref. This is bad
because there is obviously less entropy in 1 byte vs 20 bytes.
The meta sequence chunking compensated for this by multiplying the
chunking window size by 20, but this also had the effect of
unnecessarily considering 20 times more chunked elements than would fit
in the buzhash buffer.
2015-12-03 14:58:35 -08:00
Rafael Weinstein
e0b368302d
listLeaf & compoundList implement List interface
2015-12-02 13:54:25 -08:00
Rafael Weinstein
4c1f4464af
Compound & Leaf values now have same Type()
2015-12-02 10:19:27 -08:00
Erik Arvidsson
698c21bc67
NomDL: Change type syntax to use <> instead of ()
...
Fixes #678
2015-12-02 12:30:00 -05:00
Erik Arvidsson
61f14f8c9a
Rename noms UInt* to Uint*
...
Fixes #673
2015-12-02 12:01:42 -05:00
Rafael Weinstein
9cf1896940
Simplify retrieval of tuples from metaSequences
2015-12-01 12:44:27 -08:00
Rafael Weinstein
7caa08bc5c
Complex Types embed a ChunkStore
2015-12-01 10:40:47 -08:00
Dan Willhite
7dd540d5d5
Make generated files stable and consistent with go fmt.
2015-11-24 16:15:35 -08:00
Rafael Weinstein
7ad26393a0
fix TestEnsureRef
2015-11-21 14:27:28 -08:00
Benjamin Kalman
4b901cdc84
Support compoundList.Append.
2015-11-20 16:40:19 -08:00
Rafael Weinstein
710fcc3708
Minor fix for meta_sequence_cursor_test
2015-11-18 17:13:43 -08:00
Rafael Weinstein
12d88c769d
Correctly construct metaSequenceCursor
2015-11-18 14:05:54 -08:00
Erik Arvidsson
eb4b3cbece
Update encode/decode tests to use typed constructors
2015-11-16 18:38:43 -05:00
Rafael Weinstein
e75f5097c7
Allow Map & Set to order by natural ordering of element type if available.
2015-11-16 14:30:30 -08:00
Rafael Weinstein
da2c7461df
CompoundList lives again
2015-11-16 11:27:47 -08:00
Erik Arvidsson
b6e034c77e
Go: Rename type ref files too
2015-11-13 18:04:05 -05:00
Erik Arvidsson
a72ce41a1d
Go: TypeRef -> Type
...
Remaining identifiers
2015-11-13 17:54:53 -05:00
Erik Arvidsson
6ca2511a9d
Merge pull request #618 from arv/type-describe
...
Clean up output of Type Describe
2015-11-13 17:48:47 -05:00
Benjamin Kalman
efa52fed84
Implement a generic sequence chunker, and use it to create blobs.
2015-11-13 14:21:26 -08:00
Erik Arvidsson
f95602a32b
Clean up output of Type Describe
...
Fixes #541
2015-11-13 17:10:11 -05:00
Rafael Weinstein
1653ffdf30
metaSequenceCursor
2015-11-12 19:56:17 -08:00
Rafael Weinstein
f0ebce2d74
Added metaSequence + enc/dec & tests
2015-11-10 15:29:44 -08:00
Chris Masone
eda9b92870
Rename types.TypeRef to types.Type
...
There are probably still a lot of variable names and comments to fix,
but this updates all the Go code.
Towards #441
2015-11-09 08:26:32 -08:00
Chris Masone
96221c5079
Remove types.test test binary
...
I don't think this should have been checked in.
2015-11-06 17:59:05 -08:00
Chris Masone
6b31cf7bc9
Reduce size of test data in Set and Map IterAllP() tests
...
Building up these big Sets and Maps is really slow, and the purpose of
this test is not to stress-test the code with huge data, but rather to
verify correctness. Since Set and Map are being replaced soon, it doesn't
make sense to improve the existing implementations.
2015-11-06 09:04:13 -08:00
Aaron Boodman
69a86f3036
Rewrite walk() to walk value tree instead of chunks
...
Also fix quad_tree to take advantage of that to be generic again.
Fixes #445 , #497
2015-11-05 16:12:02 -08:00
Chris Masone
b54fd91c82
Add Filter() to List
...
And update collection templates to be backed by the untyped
Filter() implementations.
Fixes #578
2015-11-05 15:15:46 -08:00
Chris Masone
c40b57fc41
Generated code
2015-11-05 15:15:07 -08:00
cmasone-attic
7fad0856c3
Merge pull request #579 from cmasone-attic/issue564
...
IterAllP for typed Maps
2015-11-05 15:14:47 -08:00
Erik Arvidsson
cc89fb2d90
Remove the channel from struct reader/builder
...
Instead use a slice of Value
2015-11-05 16:34:03 -05:00
Erik Arvidsson
329e13e0ae
Generated code
2015-11-05 16:33:25 -05:00
Chris Masone
2e68c39b14
Fix xml_importer and pitchmap/index to correctly use typed containers.
...
Fixes #554
2015-11-05 12:08:22 -08:00
Chris Masone
4e79367d1a
IterAllP for typed Maps
...
Fixes #564
2015-11-05 12:06:10 -08:00
Erik Arvidsson
460841e3ed
Clean up registration of Ref values
...
Ref values use the TargetRef to get the internal implementation
RegisterFromValFunction and ToNomsValueFromTypeRef were only used by
ref values at this point so these were renamed and simplified to be
more specific for ref values
2015-11-05 14:32:45 -05:00
Chris Masone
7b55efa9b6
Generated Code
2015-11-05 08:42:22 -08:00
Chris Masone
d66151b4c1
Add IterAllP() to all typed Lists and Sets
...
Also added IterAllP() to types.Set so it could be used by generated
set code.
Towards #564
2015-11-05 08:42:22 -08:00
Erik Arvidsson
9ba1c4a508
Remove InternalImplementation() from List, Map & Set
...
Instead register a function to extract the internal backing store.
2015-11-04 18:57:36 -05:00
Erik Arvidsson
8c98964fee
Generated code
2015-11-04 18:57:27 -05:00