Nighttime hacks: playful creativity as a form of relaxation
 
 
Go to file
Mike Gerwitz 9478082e2e
env-{fixed,dyn}.sed: Accessing and manipulating envs
env-dyn kind of violated the spirit of this repository---to relax and simply
have fun.  While I did enjoy implementing it, there did become a point where
it got to be quite stressful and I just wanted to get it finished to move on
to other things.  Hopefully others find it interesting.

Keep in mind that, as explained in the comments, this could have been
implemented much more trivially using backreferences.  I chose not to do so,
since that is more of a challenge.  But it may be worth creating a version
of it that _does_ use backreferences to compare against and obviate the
limitiations of finite automata.

* regex/cmp.sed: Reference `env-dyn.sed'.
* regex/env-dyn.sed:
* regex/env-fixed.sed: New scripts.
2018-11-28 20:57:58 -05:00
regex env-{fixed,dyn}.sed: Accessing and manipulating envs 2018-11-28 20:57:58 -05:00
COPYING Initial commmit with fall script 2018-11-24 00:02:15 -05:00
COPYING.CCBYSA Initial commmit with fall script 2018-11-24 00:02:15 -05:00
README Initial commmit with fall script 2018-11-24 00:02:15 -05:00

README

Nighttime Hacks
===============
A repository of miscellaneous hacks.[0]

This repository is so named because I usually only have free time at night
after the kids are in bed.

The inspiration for this repository is largely entertainment: sometimes I
get burned out, and one tempting way to unwind is to play some sort of
game.  The problem is, although it's useful for unwinding, most games aren't
productive, so I feel that my limited time is wasted.

I found that my burnout isn't necessarily related to programming or research
as an act in itself---the burnout is caused from doing too similar of things
for extended periods of time.  But hacking is enjoyable, and can easily be
considered a game; as long as it's different than what caused me to burn
out, then it's a suitable alternative to playing games, and more rewarding.

On top of that, it can produce examples that are useful for others to learn
from.  I hope you find some of these as entertaining as I did.


[0]: The term ``hacking'' refers to playful creativity, not breaking
     security (which we refer to as ``cracking'').  For a good overview of
     the distinction, see <https://stallman.org/articles/on-hacking.html>.


Hack Criteria
-------------
I constrain myself to these criteria:

  1. The hack should be something that I wouldn't normally do;
  2. It has to have hack value; and
  3. It should be able to be done in small (e.g. 30m) increments.

#3 is particularly important so that these small hacks don't turn into
projects.  If it gets to that point, then they should be forked as such
rather than continuing to live here.

There may be much easier ways of accomplishing some of the hacks in this
repository.  For example, rather than a sed script trying to treat text as a
character matrix using regular expressions, I could write a trivial (and
significantly faster) C program.  But that wouldn't be a hack---it'd be a
trivial C program doing what C is good at doing.


License
-------
All programs in this repository are free/libre software.  See COPYING and
the header of each program for more information.

Free software refers to freedom, not price.
<https://www.gnu.org/philosophy/free-sw.en.html>



Copyright (C) 2018 Mike Gerwitz

This file is released under the Creative Commons Attribution-ShareAlike 4.0
International License.  See COPYING.CCBYSA for more information.