Repository navigation
Redesign #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Redesign #23
Changes from 1 commit
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
53c7b23
ripping out untrue functionality of arraybuffers
athanclark 97a49c6
rename to stay true to implementation
athanclark d650148
converting to Effect.Uncurried, using exception catching, naming
athanclark a4c7cd0
module documentation
athanclark addf664
preparing for major redesign of typed interface - supporting all
athanclark 5200641
polyfill
athanclark 5d49921
module doc
athanclark 75a91e6
using `new` as binder - also, remainder function
athanclark 827b29e
copyWithin
athanclark 7a3435f
all, any ~ every, some
athanclark ba3f089
fill semantics
athanclark b203cd9
toString
athanclark e2b70aa
subarray
athanclark 16f384c
in-place sort
athanclark 95a79cb
slice
athanclark b281b9d
moving `set` around a little
athanclark f8ae9ad
reverse in-place
athanclark be5e28b
typed map
athanclark f2be9a4
joining an array
athanclark fa53dca
filter
athanclark a3da940
toArray typed properly
athanclark 588284d
folds
athanclark 3b246b9
elem, need to do find and indexing
athanclark 4759fe4
better arraybuffer slice, more stuff
athanclark aa789b7
the uint library stores values greater than 2^31 as a negative integer -
athanclark d0c4038
index of
athanclark 2ffbb00
more instances
athanclark 3c7066e
honestly I forgot about floating points
athanclark fd29b0b
the binary serialization of javascript Numbers for TypedArrays follows
athanclark ea66b5f
Remove text encoding dependency
AlexaDeWit 00d4a2e
Remove show and update readme
AlexaDeWit 71b5b08
generation functions - need to generate a bona-fide float32
athanclark 4a83a72
arbitrary floating point values
athanclark 3adab9e
more correct
athanclark e84aec7
more generators
athanclark 350c48f
simple byteLength / bytesPerValue === length test
athanclark b848ecb
fromArray <<< toArray iso
athanclark f7b256e
better docs
athanclark 875662e
cosmetic
athanclark 89da71d
using uint
athanclark f939172
fill y xs => all (== y) xs
athanclark 3b0f0ab
generic instance of `WithOffset` structure
athanclark cb63506
cosmetic, with offset
athanclark fa8d1b6
removed funky show module
athanclark bb4f0f3
set singleton is eq
athanclark d73a98c
all implies any
athanclark e8324a1
filter, all / any
athanclark 9f09755
elem with unsafeAt
athanclark 2d7e141
any implies find
athanclark 097e8ad
findIndex implies at
athanclark ab5d578
indexOf implies at
athanclark 2764959
lastIndexOf imples at
athanclark 24ff499
quickcheck combinators
athanclark 7fb380c
cosmetic
athanclark 9415877
sort is idempotent, reverse tests
22326b1
sort is correct
1031fd2
toString
7482f4d
dual subArray and slice references
44cc05d
really weird test results - subArray isn't mutable when supplied with…
d585392
peculiar behavior of subArray
2233a4d
verifying the mutability of whole subArrays
1919471
better docs
e892216
misimplementation
75d5c6c
copy within self
ca0b7d3
copyWithin verified
8bd3651
more verification for copyWithin
b3c0a1f
gen arraybuffer and dataview
1a65829
more qualified imports
daa72e0
using inline ternary op
c909bd4
different gen paradigm
bcd0877
moving classes around - safe dataView modification
7148150
generating a data view with an offset, for a particular value
athanclark 4f455d3
properly using uint
athanclark 1dcde72
runners
athanclark 2776488
using type-declared value sizes
athanclark 5ce319b
verified data views
athanclark 2fe5c9a
cosmetic
athanclark e4aed3a
better docs, noting how subArray / new use Data.ArrayBuffer.ArrayBuff…
d00e77b
reformatting arguments
2e5bf9f
final touch-ups
95bf30e
removing obsolete tests
e1689db
removed generated docs
29a14f8
omitting `try` in DataView.js
athanclark 70e864b
Merge branch 'redesign' of github.com:athanclark/purescript-arraybuff…
athanclark 289a9e9
better code re-use
athanclark 9e8b567
fixing implementation
c5a1af4
reorganized setter
7f4819e
better design
f9f9d2b
omitting Arbitrary constraint
b066a6c
cosmetic
03469ac
Merge v9-redesign2
jacereda fdccca3
Some cosmetic changes and fixes.
jacereda 6576b17
Sort includes
jacereda 970351c
Sort includes
jacereda a880ebb
Still not happy with the names, renamed generators
jacereda 2a2795b
toNullable Nothing -> null
jacereda 316f099
toNullable . Just - > notNull
jacereda cfd98c5
Typo
jacereda 83370eb
pure functions for filtering & querying
1b4aad4
Cherry-pick 83370eb9f96aa1638f1c532d0d4c10bdad295d1c, Uint32 instance…
d17d6c7
Fix the tests
jacereda eac7856
These share the implementation...
jacereda 8ae9e7c
... and don't need to be part of the type class
jacereda c11a9c0
These can also be removed from the type class
jacereda be68a82
Simplify slice
jacereda ab94c97
Simplify subArray
jacereda 120a692
Merge branch 'v9' of git://github.com/jacereda/purescript-arraybuffer…
48cff7a
unsafeAt should be like unsafeIndex in arrays
jacereda 48d5826
Simplify fill
jacereda e08e284
Better name
jacereda 17cf881
Use notNull
jacereda 2b7b502
WIP, generate arrays with the size provided by QC, split functions th…
jacereda b4a9b19
Cleanup
jacereda a30e602
Fix set/setTyped
jacereda 42f588f
Cleanup
jacereda 8ee1263
Fix allImpliesAnyTests
jacereda 7cde026
Use unsigned
jacereda 95c4abc
Disable DataView tests
jacereda 01c657e
Simplifying
jacereda 491c92e
Introduce overAll1 to test over non-empty arrays
jacereda fa85219
using external float32 library
58cd006
WIP, making API more consistent with foldable-traversable methods
jacereda 436819b
Merge master
jacereda 07a501f
Enabled DataView tests
jacereda fde881b
Saturate arguments for runEffectFnX
jacereda 4968226
Saturate arguments for run(Effect)FnX
jacereda 23c5135
Make empty effectful
jacereda 86fd6e8
Restore specific setters/getters in the API, changed implementation
jacereda e06a9a2
Merge branch 'v10' of git://github.com/jacereda/purescript-arraybuffe…
athanclark 0fa0d7a
fixing tests
athanclark 45f310a
restricted imports
athanclark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Restore specific setters/getters in the API, changed implementation
- Loading branch information
commit 86fd6e84c1324089a46a18fc2245d3f492e64845
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this? AFAIU a
DataViewis just a raw chunk of memory that you can access any way you want (peek/poke). It's what you would use to read from a raw buffer (think in binary serialisation protocols).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So technically, and this is as far as I understand too, ArrayBuffers are the lowest level interface. DataViews are just as you are saying - byte-indexable array with castable setting and getting - you can caste how a value is set and received (via the
AProxy), like a 32bit little-endian int or something. TypedArrays are just uniform DataViews for every observed value, and only in big-endian.Is there something wrong with this binding you're seeing? I'm using the AProxy to help decide how much data to set / get.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I got confused reading the signatures, it's clear now.
I'll work on this again in a couple of days.