Add copyright headers. sounds.go doesn't have a copyright header, because the file is generated by a program. I don't want to make it output the copyright header, because users can generate sounds themselves, and the copyright status of such generated files can be different.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 24 May 2011 11:05:31 +0200
Better Russian sounds.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 12 May 2011 14:41:00 +0200
generate: use filepath instead of path.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 12 May 2011 12:59:58 +0200
generate: add new line after digitSounds.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 12 May 2011 12:43:22 +0200
Update README.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 11 May 2011 23:40:00 +0200
Mention Russian in package doc.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 11 May 2011 23:29:46 +0200
example: add language dropdown.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 11 May 2011 23:27:57 +0200
Add Russian sounds (ru).
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 11 May 2011 23:10:29 +0200
Support other languages in audio captchas. Server accepts parameter lang, e.g. xxx.wav?lang=en. NewAudio and WriteAudio accept the target language.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 11 May 2011 22:16:35 +0200
Better error descriptions.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 08 May 2011 12:14:43 +0200
image: s/img/m/
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 08 May 2011 12:12:11 +0200
Update example.wav.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 04 May 2011 17:30:58 +0200
audio: increase level of background sounds.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 04 May 2011 17:21:31 +0200
Update generate with new waveHeader.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 01 May 2011 13:37:58 +0200
audio: proper RIFF header generation. At last! [RIFF][following size][WAVE]fmt[...]...data[data size][padded data]. Also, update example.wav.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 01 May 2011 13:31:16 +0200
audio: error handling; pad byte is 0, not 128.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 01 May 2011 12:48:01 +0200
audio: write pad byte when data length is odd. This is specified in RIFF format, but I forgot to implement. ckData Binary data of fixed or variable size. The start of ckData is word-aligned with respect to the start of the RIFF file. If the chunk size is an odd number of bytes, a pad byte with value zero is written after ckData. Word aligning improves access speed (for chunks resident in memory) and maintains compatibility with EA IFF. The ckSize value does not include the pad byte. (From http://www.kk.iij4u.or.jp/~kondo/wave/mpidata.txt)
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 01 May 2011 12:33:27 +0200
image: rename a few variables.
Dmitry Chestnykh dmitry@codingrobots.com
Fri, 29 Apr 2011 15:26:14 +0200
random: seed with Nanoseconds.
Dmitry Chestnykh dmitry@codingrobots.com
Fri, 29 Apr 2011 04:51:24 +0200
Remove dependency on uniuri. Add random.go. Captcha ids are now 20 characters long.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 23:12:29 +0200
Add store set/collect benchmark.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 21:02:19 +0200
image: forgot to use circleCount const in NewImage.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 20:29:34 +0200
image: use paletted image. This simplifies code and makes it faster. It also produces smaller PNGs. Before: captcha.BenchmarkNewImage 500 6198230 ns/op captcha.BenchmarkImageWriteTo 100 17517110 ns/op 0.14 MB/s After: captcha.BenchmarkNewImage 500 3869968 ns/op captcha.BenchmarkImageWriteTo 200 7237604 ns/op 0.23 MB/s (Core 2 Duo @ 2.26 GHz, MacBook) Currently the background is white, not transparent, because PNG encoder doesn't support paletted images with alpha channel. Submitted CL: http://codereview.appspot.com/4432078 Change alpha to 0x00 once it's accepted to make captcha transparent.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 20:09:50 +0200
capgen: update for StdLength -> DefaultLen rename.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 15:58:04 +0200
Report MB/s in audio and image benchmarks. Also, audio benchmark uses the new ioutil.Discard.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 14:58:53 +0200
audio: do not change final background level. Instead, change level of individual reversed sounds when making background to the appropriate values. This speeds up makeBackgroundSound ~3%. Before and after. captcha.BenchmarkNewAudio 50 30436940 ns/op captcha.BenchmarkNewAudio 50 29435780 ns/op Also, level up white noise a bit.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 11:06:56 +0200
audio: preallocate reverse sounds (~5% speed up). Also: - use ranges everywhere - optimize makeWhiteNoise a bit Before and after: captcha.BenchmarkNewAudio 50 32128580 ns/op captcha.BenchmarkNewAudio 50 30436940 ns/op
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 01:20:11 +0200
Add image and audio benchmarks.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 01:19:56 +0200
Update README again.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 00:13:39 +0200
Update README.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 00:12:19 +0200
Fix tests.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 28 Apr 2011 00:02:57 +0200
image: remove random variations in drawDigit's x,y. For the standard size and width with new font they no longer had any effect anyway (were always +0).
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:37:21 +0200
image: precalculate dx in distort and strikeThrough.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:28:27 +0200
server: better names for arguments to Server.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:17:28 +0200
New now returns captcha with default length. NewLen is now like the old New (accepts captcha length as the argument). Also, rename StdLength to DefaultLen.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:11:38 +0200
captcha: remove Collect method. Garbage collection is an internal detail of a Store, and requiring to export this method seem to be not very useful. The default memory store, of course, still has garbage collection, but it's not the unexported method, called in Set as usual.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:00:06 +0200
image: fix terminology again.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 21:20:21 +0200
image: refactor, fix terminology.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 21:14:22 +0200
Update README again.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 20:54:49 +0200
Update README.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 20:53:41 +0200
Update example.png.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 20:51:13 +0200
image: new wave distortion, and strike-through.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 20:44:24 +0200
example: print the address of server.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 20:43:43 +0200
font: more readable 1 and 7.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 19:16:35 +0200
image: use font with better resolution.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 18:41:58 +0200
image: simplify skew randomization. Use rndf instead of rand.Float64 voodoo.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 15:55:36 +0200
example: add "Try another one" link; ignore /xxx. Only return page for root path /, return 404 for any other, such as /favicon.ico.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 15:54:27 +0200
server: fix "multiple response.WriteHeader calls". The server no does nothing for errors other than ErrNotFound (for which it calls http.NotFound). This is becase when getting error on writing, we already wrote headers, so can't respond with status 500. Possibly log errors in future?
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 15:52:32 +0200
example: update with recent download changes.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 13:12:28 +0200
server: serve downloads from "/download/". Also, refactor methods.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 13:09:22 +0200
Move server parts to server.go.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 12:30:13 +0200
Server: disable uppercase extensions (.PNG, .WAV). Also fixes comment typo.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 00:41:52 +0200
example: use io instead of fmt; add error handling.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 21:32:16 +0200
store: fix potential race.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 19:16:09 +0200
store: rename ids to digitsById, exp to idByTime.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 18:57:16 +0200
Update docs.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 18:36:54 +0200
Add examples captchas.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 18:34:52 +0200
Use new GitHub-flavored Markdown syntax for types.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 15:22:52 +0200
Rename README to README.md
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 14:59:32 +0200
Add README.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 14:58:42 +0200
Example: make HTML5 valid.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 13:18:06 +0200
Example: implement reloading; fix audio in Safari.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 13:14:01 +0200
Server: reload captcha when given ?reload=x in URL.
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 26 Apr 2011 13:04:11 +0200
Add notice about Chrome 10 bug to BUGS.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:53:22 +0200
Add notice about Image.WriteTo to BUGS.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:43:27 +0200
Remove "Std" from StdCollectNum and StdExpiration.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:35:53 +0200
Add Store interface. Standard storage is now known as memoryStore (created with NewMemoryStore exported function). It's still default, however there's now an option to replace it with a custom store by implementing Store interface and calling SetCustomStore.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 23:25:39 +0200
Add example HTTP server that uses the package.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 17:34:47 +0200
Thinner strike-through on captcha image.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 12:26:12 +0200
Add Audio.EncodedLen. Workaround for Chrome WAV bug.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 02:16:01 +0200
Add VerifyString function.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 25 Apr 2011 00:42:43 +0200
Add CaptchaServer.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 23:57:29 +0200
Fix comments, apply gofmt.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 22:49:14 +0200
generate: rename to main.go, add Makefile. Fix adding extra space in the generated sounds.go.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 21:54:32 +0200
Rename cmd to capgen, originals to generate.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 21:45:37 +0200
Add captcha test.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 16:09:55 +0200
Add store test.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:58:05 +0200
Fix collection (locking and getting next value).
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:53:45 +0200
newStore: accept collectNum and expiration time. Prevoiusly, Expiration and CollectNum were hard-coded into store.go. This change moves these constants to captcha.go (renaming to Std*), and makes newStore accept them as arguments. This will enable setting these paraments by package users sometime in the future, if needed, and also allows testing of the store garbage collection.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 15:19:49 +0200
Add ErrNotFound, return it from WriteAudio/Image.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 14:34:11 +0200
Export RandomDigits. Remove NewRandom* functions.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 13:30:31 +0200
Rename "numbers" to "digits" everywhere. Plus fix comments.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 13:23:17 +0200
Set capacity for audio buffer. Rename makeStaticNoise to makeWhiteNoise.
Dmitry Chestnykh dmitry@codingrobots.com
Sun, 24 Apr 2011 12:56:02 +0200
Rearrange code and fix docs.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 21:20:12 +0200
Implement a single captcha test command. The new command replaces old test command-line utilities from cmd/image and cmd/audio directories. It can now generate both image and audio captchas, and accepts a few useful flags. Edit .gitignore to reflect changes.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 21:17:23 +0200
Add NewRandomAudio function. Audio test cmd now writes to stdout.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:53:26 +0200
Replace PNGEncode with WriteTo for Image.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:48:58 +0200
Add WriteAudio function.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:44:02 +0200
Rename CaptchaImage -> Image, CaptchaAudio -> Audio.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 18:41:00 +0200
Apply gofmt; fix comment in generate.go.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:50:37 +0200
Better randomize background and sounds. Shorten intervals between prelude beeps.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:41:48 +0200
Lower level of beep sound.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 15:39:51 +0200
First version of audio captcha.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 13:13:51 +0200
Move image generation test program to cmd/image.
Dmitry Chestnykh dmitry@codingrobots.com
Sat, 23 Apr 2011 11:24:17 +0200
image: move border calculation to calculateSizes().
Dmitry Chestnykh dmitry@codingrobots.com
Fri, 22 Apr 2011 00:05:19 +0200
Fix comments.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:43:47 +0200
Move rand initialization to image.go.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:08:58 +0200
Clarify docs.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 23:07:23 +0200
image: refactor; add more color variations.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 22:43:25 +0200
Refactor store into its own file.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 22:28:52 +0200
Accept the length of the random sequence of numbers.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:18:00 +0200
Call Collect on a separate goroutine.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:14:28 +0200
Update documentation.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 18:05:53 +0200
cmd: use standard width and height for image.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:53:34 +0200
Document functions and types in captcha.go.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:53:08 +0200
Refactored image captcha ready, and documented.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 17:41:44 +0200
Numbers are now laid out correctly. Next commits will introduce perturbations.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 16:48:12 +0200
Started work on code cleanup.
Dmitry Chestnykh dmitry@codingrobots.com
Thu, 21 Apr 2011 01:12:31 +0200
Gofmt font.go.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 13:18:51 +0200
Move image-related functions into image.go.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 03:14:29 +0200
Add line that strikes through digits.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 03:05:45 +0200
Reorganize code. Add storage.
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 20 Apr 2011 01:24:30 +0200
Initial version (numbers).
Dmitry Chestnykh dmitry@codingrobots.com
Tue, 19 Apr 2011 20:32:40 +0200