]> git.wincent.com - hextrapolate.git/log
hextrapolate.git
5 years agoyarn upgrade-interactive
Greg Hurrell [Tue, 30 May 2017 13:51:52 +0000 (06:51 -0700)] 
yarn upgrade-interactive

Upgrade all the things.

5 years agoAdd yarn.lock
Greg Hurrell [Tue, 30 May 2017 13:50:25 +0000 (06:50 -0700)] 
Add yarn.lock

5 years agoDrop explicit strict mode
Greg Hurrell [Tue, 30 May 2017 13:45:32 +0000 (06:45 -0700)] 
Drop explicit strict mode

Implied by use of ES6 modules.

7 years agoMark package as private to prevent accidental publication
Greg Hurrell [Thu, 6 Aug 2015 06:48:47 +0000 (23:48 -0700)] 
Mark package as private to prevent accidental publication

7 years agoRemove .jshintrc
Greg Hurrell [Thu, 6 Aug 2015 06:23:36 +0000 (23:23 -0700)] 
Remove .jshintrc

7 years agoSwitch from local debounce() to NPM package
Greg Hurrell [Tue, 4 Aug 2015 17:41:21 +0000 (10:41 -0700)] 
Switch from local debounce() to NPM package

7 years agoMake `gulp watch` monitor CSS changes as well
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.

7 years agoAlign on baseline, not center
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.

7 years agoImprove vertical alignment within rows
Greg Hurrell [Tue, 4 Aug 2015 08:13:07 +0000 (01:13 -0700)] 
Improve vertical alignment within rows

7 years agoFix monospace styling
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.

7 years agoReorder some imports for consistency
Greg Hurrell [Tue, 4 Aug 2015 07:41:15 +0000 (00:41 -0700)] 
Reorder some imports for consistency

7 years agoRemove unnecessary lint override
Greg Hurrell [Tue, 4 Aug 2015 07:41:04 +0000 (00:41 -0700)] 
Remove unnecessary lint override

Used to be necessary. No longer so.

7 years agoUpdate copyright year ranges
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.

7 years agoAdd high-tech deployment script
Greg Hurrell [Tue, 4 Aug 2015 06:50:24 +0000 (23:50 -0700)] 
Add high-tech deployment script

7 years agoTweak script path to work locally and via server
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.

7 years agoDebounce history updates
Greg Hurrell [Tue, 4 Aug 2015 06:20:23 +0000 (23:20 -0700)] 
Debounce history updates

Because they're slow.

7 years agoAdd simple debounce module
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

7 years agoFix whitespace lint
Greg Hurrell [Tue, 4 Aug 2015 06:10:44 +0000 (23:10 -0700)] 
Fix whitespace lint

7 years agoUpdate URL with "permalink" to current value
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.

7 years agoWrite README
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.

7 years agoDrop unnecessary event meddling
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.

7 years agoSort CSS properties
Greg Hurrell [Mon, 3 Aug 2015 23:12:18 +0000 (16:12 -0700)] 
Sort CSS properties

7 years agoShow cutesy animation when copy to clipboard succeeds
Greg Hurrell [Mon, 3 Aug 2015 23:11:38 +0000 (16:11 -0700)] 
Show cutesy animation when copy to clipboard succeeds

7 years agoFocus first input on load
Greg Hurrell [Mon, 3 Aug 2015 22:44:19 +0000 (15:44 -0700)] 
Focus first input on load

7 years agoExtract <Size> component
Greg Hurrell [Mon, 3 Aug 2015 22:41:54 +0000 (15:41 -0700)] 
Extract <Size> component

Keeps things a little cleaner.

7 years agoUpdate broken test
Greg Hurrell [Mon, 3 Aug 2015 22:34:20 +0000 (15:34 -0700)] 
Update broken test

7 years agoClean up styles
Greg Hurrell [Mon, 3 Aug 2015 22:33:43 +0000 (15:33 -0700)] 
Clean up styles

7 years agoFix charset when "serving" from local filesystem
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.

7 years agoGenerate source map for production build
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.

7 years agoPut production bundle on a diet
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.

7 years agoMassive speed-up by avoiding Chrome de-opt in hottest function
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.

7 years agoShow byte and bit counts next to title
Greg Hurrell [Sun, 2 Aug 2015 06:05:56 +0000 (23:05 -0700)] 
Show byte and bit counts next to title

7 years agoAdd a couple of dynamic fields
Greg Hurrell [Sun, 2 Aug 2015 05:52:15 +0000 (22:52 -0700)] 
Add a couple of dynamic fields

7 years agoTweak Field.react
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.

7 years agoSilence a couple of lints
Greg Hurrell [Sun, 2 Aug 2015 05:18:58 +0000 (22:18 -0700)] 
Silence a couple of lints

7 years agoDown with require, long live import!
Greg Hurrell [Sun, 2 Aug 2015 03:40:37 +0000 (20:40 -0700)] 
Down with require, long live import!

7 years agoFix copy icon background ordering
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.

7 years agoAdd icon for copy button
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.

7 years agoAdd copy-to-clipboard functionality
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.

7 years agoAvoid unnecessary base conversions
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.

7 years agoAdd some styling to make layout sane
Greg Hurrell [Sat, 1 Aug 2015 03:26:19 +0000 (20:26 -0700)] 
Add some styling to make layout sane

7 years agoAllow user to fully clear input field
Greg Hurrell [Sat, 1 Aug 2015 03:00:15 +0000 (20:00 -0700)] 
Allow user to fully clear input field

7 years agoHook up convert() function to UI to show that it works
Greg Hurrell [Sat, 1 Aug 2015 02:49:46 +0000 (19:49 -0700)] 
Hook up convert() function to UI to show that it works

7 years agoImplement `convert` function
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

7 years agoDon't mutate input array in joinDigits()
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.

7 years agoExtract joinDigits() function
Greg Hurrell [Sat, 1 Aug 2015 01:31:22 +0000 (18:31 -0700)] 
Extract joinDigits() function

7 years agoSpeed up multiplyDigits even more
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.

7 years agoSpeed up multiplyDigits
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.

7 years agoAdd multiplyDigits and friends
Greg Hurrell [Sat, 1 Aug 2015 00:43:08 +0000 (17:43 -0700)] 
Add multiplyDigits and friends

7 years agoMore setup, blinking light demo
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.

7 years agoUse the right port number
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...

7 years agoPull across sinon "mock" from docvim project
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.

7 years agoForget about jsx extensions
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.

7 years agoIgnore built products
Greg Hurrell [Fri, 31 Jul 2015 17:16:19 +0000 (10:16 -0700)] 
Ignore built products

7 years agoReplace boilerplate server.js with gulp-based runner
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.

7 years agoAdd `add` module
Greg Hurrell [Fri, 31 Jul 2015 14:34:55 +0000 (07:34 -0700)] 
Add `add` module

7 years agoTailor package.json metadata to match project
Greg Hurrell [Fri, 31 Jul 2015 13:39:59 +0000 (06:39 -0700)] 
Tailor package.json metadata to match project

7 years agoAdd standard test tools
Greg Hurrell [Fri, 31 Jul 2015 13:32:55 +0000 (06:32 -0700)] 
Add standard test tools

7 years agoBoostrap using react-hot-boilerplate
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).

7 years agoCreate new unparented branch for JavaScript implementation
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.