Coder Social home page Coder Social logo

gotypist's Introduction

Gotypist Build Status

A simple touch-typing tutor that follows Steve Yegge's methodology of going in fast, slow, and medium cycles.

Screenshot of a Gotypist session, normal mode

The TL;DR of this methodology is that you make three passes for each phrase.

  • Fast - type as fast as you can without any attention to proper technique or correctness
  • Slow - use proper technique at all costs, go as slow as needed to achieve that
  • Normal - type at target speed, try to make no mistakes

Gotypist will score each pass accordingly: errors do not matter in the first pass, speed does not matter in the second pass, and both matter in the final pass. Check out score.go for details (which are subject to change).

This project was mainly motivated by trying out termbox-go, but it is definitely ready for productive learning.

Installation

From source

Go version 1.16 or newer is required.

go get github.com/pb-/gotypist

Using a package manager

Debian

Grab .deb from barnumbirr/gotypist-debian, then

dpkg -i gotypist_<version>_amd64_<debian_version>.deb

Usage

gotypist [-f FILE] [-s] [-n PROB] [-c] [WORD]...

WORD...     Explicitly specify a phrase
-f FILE     Use FILE instead of a built-in dictionary
-n PROB     Sprinkle in random numbers with probability 0 <= PROB <= 1
-c          Tread -f FILE as code and go sequenntially through the lines
-d          Run in demo mode to take a screenshot

Key bindings

ESC   quit
C-F   skip forward to the next phrase
C-R   toggle repeat phrase mode
C-I   toggle finger usage hints

Code organization

The code loosely follows an Elm-like architecture. In a nutshell that means all interesting and Gotypist-specific code resides within pure functions. This is quite experimental and some corners were cut since Go is not primarily a functional language, but it still enjoys a lot of the benefits of this architectural style!

gotypist's People

Contributors

adamryman avatar barnumbirr avatar eggman64 avatar pb- avatar ssimono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gotypist's Issues

Module path should be "github.com/pb-/gotypist", not "github.com/eggman64/gotypist"

Background

Module path is inconsistent with go import path.
GO111MODULE=on, as README said, run go get github.com/pb-/gotypist:

go: downloading github.com/pb-/gotypist v0.0.0-20200518181917-072901ed1503
go: github.com/pb-/gotypist upgrade => v0.0.0-20200518181917-072901ed1503
go get: github.com/pb-/[email protected]: parsing go.mod:
        module declares its path as: github.com/eggman64/gotypist
                but was required as: github.com/pb-/gotypist 

Solution

Fix the module path:

1)Rename the module path to "go get github.com/pb-/gotypist": https://github.com/pb-/gotypist/blob/master/go.mod#L1

module github.com/pb-/gotypist
go 1.14
require (
	…
) 

2) Warning the users not to use the module, get "github.com/pb-/gotypist" in GOPATH mode.

Implement flag to pass lines of a file rather than a word file.

-l FILE
  use lines from FILE

Allows the user to pass specific lines of text they want to practice, rather than using the words in a random order.

I highly suggest that by default it plays the lines sequentially from top to bottom.

That way a user could save files as lessons, and they would be reproducible.

Example, I want to learn ? and ;. I use this file.

; ??? ; ??? ; ??? ; ??? ; ??? ; ??? ; ??? ; ???
??? ;;; ??? ;;; ??? ;;; ;?; ;?; ;?; ;?; ;?; ;?;
??; ??; ??; ;;? ;;? ;;? ?;? ?;? ?;? ?;? ?;? ?;??

Possibly another flag

-r bool
   randomize line output with -l

To get that effect.

I would be happy to put up a PR with this functionality if desired.

Broken characters

Please see the attached image:

image

My terminal emulator is using UTF-8, and I tried Noto Mono, Ubuntu Mono, Monospace, Liberation Mono, Courier New, and Andale Mono... Not sure how to fix this.

i love it <3

 ____       _       ____   _____    ___    _   _   ___   _____
|  _ \     / \     / ___| | ____|  / _ \  | | | | |_ _| |_   _|
| |_) |   / _ \   | |  _  |  _|   | | | | | | | |  | |    | |
|  _ <   / ___ \  | |_| | | |___  | |_| | | |_| |  | |    | |
|_| \_\ /_/   \_\  \____| |_____|  \__\_\  \___/  |___|   |_|

[Feature Request] Support keyboard shortcuts

You know, stuff like C-delete, and C-backspace? (Option-Delete, Option-Fn-Delete, etc for macOS)

Maybe you can add support for them, because sometimes they're useful, and afaik there's no reason to block their usage. Heck, maybe you can add an option to support keyboard shortcuts for shells too.

Accept list of files in -f flag

Currently -f can only take one file.

Would be nice if one could practice against a multiple files e.g. -f foo bar or -f foo,bar etc.

Proposal: Remove word minium or make it configurable.

	if err != nil || len(words) < 9 {

I want to pass in text that looks like this:

; ??? ; ??? ; ??? ; ??? ; ??? ; ??? ; ??? ; ???
??? ;;; ??? ;;; ??? ;;; ;?; ;?; ;?; ;?; ;?; ;?;
??; ??; ??; ;;? ;;? ;;? ?;? ?;? ?;? ?;? ?;? ?;??

To practice typing punctuation.

Possibly remove this len(word) < 9 limit?

Could you explain the logic here? I am going to guess it relates to the /usr/share/dict/words having one word per line?

Thanks.

Create tags/release

Hello,

thanks for creating gotypist, I've really been enjoying using it. I'd be interested in creating and maintaining a Debian package for it and I was wondering if you would consider using tags/releases for the project? This would help a lot in packaging as I won't have to build from some "random" commit on master.

Cheers.

Please add a License

Hello, I would like to use this source code for personal use and to distribute changes to friends.

Please add a License file, to publicly declare how this source code may be used.

https://help.github.com/articles/licensing-a-repository/

https://choosealicense.com/licenses/

I recommend using the unlicense, it is what I use for all of my projects. I believe it creates the least friction for people sharing code, and I love when people use what I build \ʕ◔ϖ◔ʔ/~

http://unlicense.org/

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

Thanks for this cool little go typing app! I am really enjoying it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.