]>
git.wincent.com - hextrapolate.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Greg Hurrell [Thu, 1 Jun 2017 14:03:16 +0000 (07:03 -0700)]
Allow 0x prefix on hex numbers
Means that users can type it as a prefix, or paste in a number with this
prefix.
Greg Hurrell [Wed, 31 May 2017 15:11:11 +0000 (08:11 -0700)]
Avoid calling `pop()` on stack
We only ever push as many as 3 items on this stack, so we don't have to
worry about unbounded growth. Let's just maintain an index for the top
of the stack. In a sample run under the Chrome profiler, this shaves off
several hundred milliseconds (hand-waves).
Greg Hurrell [Wed, 31 May 2017 15:08:24 +0000 (08:08 -0700)]
Add a clarifying comment
In case I forget why I have support in here for very large bases.
Greg Hurrell [Wed, 31 May 2017 15:06:45 +0000 (08:06 -0700)]
Correct spelling of spellCheck attribute
Ha.
Greg Hurrell [Wed, 31 May 2017 15:06:21 +0000 (08:06 -0700)]
Avoid repeated indexOf calls
Greg Hurrell [Wed, 31 May 2017 15:05:48 +0000 (08:05 -0700)]
Avoid unwanted spellcheck squiggly lines in input fields
Greg Hurrell [Wed, 31 May 2017 14:27:57 +0000 (07:27 -0700)]
Port tests to structure desired by create-react-app
Greg Hurrell [Wed, 31 May 2017 07:36:45 +0000 (00:36 -0700)]
Remove unused `add` module
Greg Hurrell [Wed, 31 May 2017 07:30:59 +0000 (00:30 -0700)]
Avoid needless work of converting number into its own base
Greg Hurrell [Wed, 31 May 2017 06:59:07 +0000 (23:59 -0700)]
Speed up by avoiding repeated regex construction etc
Avoid repeated regexp allocation, `slice`, `trim` and `toLowerCase`
calls.
Greg Hurrell [Wed, 31 May 2017 06:53:34 +0000 (23:53 -0700)]
Speed up joinDigits by avoiding an extra copy
Greg Hurrell [Wed, 31 May 2017 06:13:57 +0000 (23:13 -0700)]
Don't nest select and input inside label
Massively confuses the iPhone.
Greg Hurrell [Wed, 31 May 2017 06:10:01 +0000 (23:10 -0700)]
Peter Griffin CSS commit
Greg Hurrell [Wed, 31 May 2017 06:05:39 +0000 (23:05 -0700)]
Further attempt at avoiding zoom
Works fine in Chrome device emulation. Not so great on the real phone.
Can't focus the input, and changes to the select menu don't stick.
Greg Hurrell [Wed, 31 May 2017 05:57:39 +0000 (22:57 -0700)]
Disable zoom on select elements too
Greg Hurrell [Wed, 31 May 2017 05:56:11 +0000 (22:56 -0700)]
Increase input field size
In an effort to stop unwanted iOS auto-zooming:
https://stackoverflow.com/questions/
2989263 /disable-auto-zoom-in-input-text-tag-safari-on-iphone
Greg Hurrell [Wed, 31 May 2017 05:51:10 +0000 (22:51 -0700)]
Update fancy deploy script
Greg Hurrell [Wed, 31 May 2017 05:41:08 +0000 (22:41 -0700)]
Add responsive design
Greg Hurrell [Tue, 30 May 2017 14:50:21 +0000 (07:50 -0700)]
Fix wrong link in README
Greg Hurrell [Tue, 30 May 2017 14:25:38 +0000 (07:25 -0700)]
Update page title and favicon
Greg Hurrell [Tue, 30 May 2017 14:21:31 +0000 (07:21 -0700)]
Re-build with create-react-app
Because copying the src files over to a brand new base and tweaking them
is easier than getting a 2-year-old React codebase up-to-date.
Greg Hurrell [Tue, 30 May 2017 13:55:26 +0000 (06:55 -0700)]
gulp-spawn-mocha → gulp-mocha
gulp-mocha now spawns too.
Greg Hurrell [Tue, 30 May 2017 13:53:32 +0000 (06:53 -0700)]
babel → babel-cli
To avoid a deprecation warning.
Greg Hurrell [Tue, 30 May 2017 13:51:52 +0000 (06:51 -0700)]
yarn upgrade-interactive
Upgrade all the things.
Greg Hurrell [Tue, 30 May 2017 13:50:25 +0000 (06:50 -0700)]
Add yarn.lock
Greg Hurrell [Tue, 30 May 2017 13:45:32 +0000 (06:45 -0700)]
Drop explicit strict mode
Implied by use of ES6 modules.
Greg Hurrell [Thu, 6 Aug 2015 06:48:47 +0000 (23:48 -0700)]
Mark package as private to prevent accidental publication
Greg Hurrell [Thu, 6 Aug 2015 06:23:36 +0000 (23:23 -0700)]
Remove .jshintrc
Greg Hurrell [Tue, 4 Aug 2015 17:41:21 +0000 (10:41 -0700)]
Switch from local debounce() to NPM package
Greg Hurrell [Tue, 4 Aug 2015 08:27:22 +0000 (01:27 -0700)]
Make `gulp watch` monitor CSS changes as well
Seeing as CSS is getting bundled via webpack, we should really be
triggering the webpack:build task whenever it changes.
Got rid of the misleading "js" task in the process.
Greg Hurrell [Tue, 4 Aug 2015 08:19:40 +0000 (01:19 -0700)]
Align on baseline, not center
Strictly speaking, this is more correct, although it does look
too high to the naked eye at first glance.
Greg Hurrell [Tue, 4 Aug 2015 08:13:07 +0000 (01:13 -0700)]
Improve vertical alignment within rows
Greg Hurrell [Tue, 4 Aug 2015 08:12:56 +0000 (01:12 -0700)]
Fix monospace styling
This was meant to apply to the input field but was instead
targeting the surrounding span, effectively doing nothing.
Greg Hurrell [Tue, 4 Aug 2015 07:41:15 +0000 (00:41 -0700)]
Reorder some imports for consistency
Greg Hurrell [Tue, 4 Aug 2015 07:41:04 +0000 (00:41 -0700)]
Remove unnecessary lint override
Used to be necessary. No longer so.
Greg Hurrell [Tue, 4 Aug 2015 07:05:35 +0000 (00:05 -0700)]
Update copyright year ranges
Just to show how old this frickin' thing is.
Greg Hurrell [Tue, 4 Aug 2015 06:50:24 +0000 (23:50 -0700)]
Add high-tech deployment script
Greg Hurrell [Tue, 4 Aug 2015 06:29:55 +0000 (23:29 -0700)]
Tweak script path to work locally and via server
This makes file:// URLs work and the webpack dev server at the same
time. I think this will work fine once I've uploaded this to a remote
host.
Greg Hurrell [Tue, 4 Aug 2015 06:20:23 +0000 (23:20 -0700)]
Debounce history updates
Because they're slow.
Greg Hurrell [Tue, 4 Aug 2015 06:18:42 +0000 (23:18 -0700)]
Add simple debounce module
Copy-pasta'd from:
https://github.com/wincent/corpus/blob/
a41b05e0a38f5bdb4c630c206780cae0db91dbea /src/app/debounce.js
Greg Hurrell [Tue, 4 Aug 2015 06:10:44 +0000 (23:10 -0700)]
Fix whitespace lint
Greg Hurrell [Tue, 4 Aug 2015 06:08:07 +0000 (23:08 -0700)]
Update URL with "permalink" to current value
Use Base 62 for compactness. Note that this requires us to upgrade the
internals to handle bigger bases, even though we don't expose base > 36
elsewhere in the UI.
This fulfils the promise in the README that this feature exists.
Greg Hurrell [Tue, 4 Aug 2015 04:24:17 +0000 (21:24 -0700)]
Write README
And update the copyright year ranges, too, to reflect the full
lineage of the project.
Greg Hurrell [Mon, 3 Aug 2015 23:12:53 +0000 (16:12 -0700)]
Drop unnecessary event meddling
Was trying to stop unwanted selection behavior. We still get it, even
with `user-select: none` and this. So, let's just drop it.
Greg Hurrell [Mon, 3 Aug 2015 23:12:18 +0000 (16:12 -0700)]
Sort CSS properties
Greg Hurrell [Mon, 3 Aug 2015 23:11:38 +0000 (16:11 -0700)]
Show cutesy animation when copy to clipboard succeeds
Greg Hurrell [Mon, 3 Aug 2015 22:44:19 +0000 (15:44 -0700)]
Focus first input on load
Greg Hurrell [Mon, 3 Aug 2015 22:41:54 +0000 (15:41 -0700)]
Extract <Size> component
Keeps things a little cleaner.
Greg Hurrell [Mon, 3 Aug 2015 22:34:20 +0000 (15:34 -0700)]
Update broken test
Greg Hurrell [Mon, 3 Aug 2015 22:33:43 +0000 (15:33 -0700)]
Clean up styles
Greg Hurrell [Mon, 3 Aug 2015 17:27:48 +0000 (10:27 -0700)]
Fix charset when "serving" from local filesystem
React converts the entity to a UTF-8 character, which works fine when
serving using the Webpack dev server (which presumably passes an HTTP
Content-Type header), but for testing with a local file:// URL, things
don't work unless we explicitly indicate the type.
Greg Hurrell [Mon, 3 Aug 2015 17:16:23 +0000 (10:16 -0700)]
Generate source map for production build
So that I can meaningfully profile the production build.
Greg Hurrell [Mon, 3 Aug 2015 16:49:18 +0000 (09:49 -0700)]
Put production bundle on a diet
Build was previously at a ridiculous 903,456 bytes.
Restructured config to have entirely separate production settings
without any hotloader stuff in the way, dropping it to 132,015 bytes.
This is still too big, as the app is just a production build of React,
11 small JS modules, and a CSS file, but it's a big improvement.
Greg Hurrell [Sun, 2 Aug 2015 06:19:05 +0000 (23:19 -0700)]
Massive speed-up by avoiding Chrome de-opt in hottest function
I became suspicious of the Math calls thanks to this thread:
https://groups.google.com/forum/#!msg/google-chrome-developer-tools/Y0J2XQ9iiqU/H60qqZNlQa8J
Turns out, those were the culprit.
Greg Hurrell [Sun, 2 Aug 2015 06:05:56 +0000 (23:05 -0700)]
Show byte and bit counts next to title
Greg Hurrell [Sun, 2 Aug 2015 05:52:15 +0000 (22:52 -0700)]
Add a couple of dynamic fields
Greg Hurrell [Sun, 2 Aug 2015 05:34:47 +0000 (22:34 -0700)]
Tweak Field.react
Edits for brevity, and add a title attribute to the copy
link span.
Greg Hurrell [Sun, 2 Aug 2015 05:18:58 +0000 (22:18 -0700)]
Silence a couple of lints
Greg Hurrell [Sun, 2 Aug 2015 03:40:37 +0000 (20:40 -0700)]
Down with require, long live import!
Greg Hurrell [Sun, 2 Aug 2015 03:38:49 +0000 (20:38 -0700)]
Fix copy icon background ordering
I had this working, then sorted the properties, which made it stop
working, because `background` is a shorthand form, and when it came
after the other `background-*` properties in the list it effectively
overrode them.
Make it `background-image` instead, so it doesn't override, and is
immune to sorting vagaries.
Greg Hurrell [Sun, 2 Aug 2015 02:47:38 +0000 (19:47 -0700)]
Add icon for copy button
Got the SVG from: https://icomoon.io/app
Compressed it with svgo (`npm install -g svgo`; see
https://github.com/svg/svgo)
Converted to data URI with: https://gist.github.com/puppybits/
1565441
Did consider skipping the base64-encoding step (ie.
https://css-tricks.com/probably-dont-base64-svg/) but decided against
it. It won't work in old browsers, and isn't much of a space saving
anyway.
Greg Hurrell [Sat, 1 Aug 2015 18:08:33 +0000 (11:08 -0700)]
Add copy-to-clipboard functionality
Should work in recent Chrome, at least.
Greg Hurrell [Sat, 1 Aug 2015 14:06:14 +0000 (07:06 -0700)]
Avoid unnecessary base conversions
Instead of converting to a canonical hexadecimal base format, let the
updating component juts pass back the raw value + base. This should cut
the number of conversions by about 25%. For example, if I change the
binary field, instead of converting to hexadecimal once, then from
hexadecimal to some other base for three of the four fields (ie. four
total conversions), we instead just convert three fields.
Greg Hurrell [Sat, 1 Aug 2015 03:26:19 +0000 (20:26 -0700)]
Add some styling to make layout sane
Greg Hurrell [Sat, 1 Aug 2015 03:00:15 +0000 (20:00 -0700)]
Allow user to fully clear input field
Greg Hurrell [Sat, 1 Aug 2015 02:49:46 +0000 (19:49 -0700)]
Hook up convert() function to UI to show that it works
Greg Hurrell [Sat, 1 Aug 2015 02:46:18 +0000 (19:46 -0700)]
Implement `convert` function
Along with some illustrative tests. More to come (will fill in the blank
`it` blocks).
Based on the technique described at:
http://www.danvk.org/hex2dec.html
Greg Hurrell [Sat, 1 Aug 2015 01:54:37 +0000 (18:54 -0700)]
Don't mutate input array in joinDigits()
`reverse()` is a nasty API. It returns the reversed array, but also
mutates it in place. Noticed while using `joinDigits()` to log stuff
while developing.
Greg Hurrell [Sat, 1 Aug 2015 01:31:22 +0000 (18:31 -0700)]
Extract joinDigits() function
Greg Hurrell [Sat, 1 Aug 2015 01:20:25 +0000 (18:20 -0700)]
Speed up multiplyDigits even more
Implement the algorithm described in the last commit message.
Greg Hurrell [Sat, 1 Aug 2015 00:56:43 +0000 (17:56 -0700)]
Speed up multiplyDigits
If we can double the length of the result in a single operation, we do.
This makes us faster for larger multipliers.
Note that I could make this even faster for really big multipliers by
employing some kind of memoization:
eg. multiply X by 1000:
- iteration 0: X + X (2X)
- iteration 1: 2X + 2X (4X)
- iteration 2: 4x + 4X (8X)
- iteration 3: 8X + 8X (16X)
- iteration 4: 16x + 16X (32X)
- iteration 5: 32X + 32X (64X)
- iteration 6: 64X + 64X (128X)
- iteration 7: 128X + 128X (256X)
- iteration 8: 256X + 256X (512X)
- iteration 9: 512X + 256X (768X) [use largest possible prev value)
- iteration 10: 768X + 128X (896X) [largest possible is smaller now)
- iteration 11: 896X + 64X (960X) [and smaller]
- iteration 12: 960X + 32X (992X) [smaller]
- iteration 13: 992X + 8X (1000X) [smaller still; note skip as well]
This might be hard to implement though. I was thinking it might call for
a heap but I don't think so; it just needs a stack, and we pop off until
we get a usable value from it.
Greg Hurrell [Sat, 1 Aug 2015 00:43:08 +0000 (17:43 -0700)]
Add multiplyDigits and friends
Greg Hurrell [Fri, 31 Jul 2015 18:23:37 +0000 (11:23 -0700)]
More setup, blinking light demo
This is a mess of things that should be committed separately, but rather
than do that I think I am just going to squash the history before
publishing. Or not. Possibly can't be bothered.
Greg Hurrell [Fri, 31 Jul 2015 17:25:54 +0000 (10:25 -0700)]
Use the right port number
I find this makes all the difference...
Greg Hurrell [Fri, 31 Jul 2015 17:22:12 +0000 (10:22 -0700)]
Pull across sinon "mock" from docvim project
Should have down this previously, but overlooked it.
Greg Hurrell [Fri, 31 Jul 2015 17:19:11 +0000 (10:19 -0700)]
Forget about jsx extensions
I don't use (and never have used) them.
Greg Hurrell [Fri, 31 Jul 2015 17:16:19 +0000 (10:16 -0700)]
Ignore built products
Greg Hurrell [Fri, 31 Jul 2015 17:11:33 +0000 (10:11 -0700)]
Replace boilerplate server.js with gulp-based runner
I want to use gulp as a uniform interface for building, running,
watching etc. This is a start.
Greg Hurrell [Fri, 31 Jul 2015 14:34:55 +0000 (07:34 -0700)]
Add `add` module
Greg Hurrell [Fri, 31 Jul 2015 13:39:59 +0000 (06:39 -0700)]
Tailor package.json metadata to match project
Greg Hurrell [Fri, 31 Jul 2015 13:32:55 +0000 (06:32 -0700)]
Add standard test tools
Greg Hurrell [Fri, 31 Jul 2015 06:12:53 +0000 (23:12 -0700)]
Boostrap using react-hot-boilerplate
I am too lazy to figure out how to use Webpack etc, so just using this
minimal boilerplate as a starting point:
https://github.com/gaearon/react-hot-boilerplate.git
This corresponds to the current HEAD of the master branch (commit
f66496ab2f068150fbeb7c95bb137e06e1a02b47 ).
Greg Hurrell [Fri, 31 Jul 2015 04:02:48 +0000 (21:02 -0700)]
Create new unparented branch for JavaScript implementation
Getting this ancient codebase building on Yosemite is going to be more
trouble than it's worth (Xcode has changed too much, and GMP was always
hard to compile at the best of times), so let's rebuild this in
JavaScript as a web app.