<commit_before># Notes for Dhop Hackers!

If you're working on the code, you might appreciate these tips:

## The `README.md` File

If you modify the README, you will likely also want to update dhop's `help` text. To do this, see the info about [the \_\_END\_\_ block](#the-__end__-block).

## The `dhop.rb` File

### The `__END__` block

The text after the `__END__` statement, which is printed when someone types `dhop help` or simply `dhop` (with no
arguments) is exactly what you get when you run [pandoc][] with the following options:

    pandoc -f markdown -t plain -o dhop_info.txt README.md

If you make changes to the code that affect its interface or usage, make changes to README.md, and then use the
preceding command to generate the `__END__` block text.

[pandoc]: http://johnmacfarlane.net/pandoc/index.html
<commit_msg>Updated hacker notes with insight regarding the dhop.sh and dhop.bat files.<commit_after># Notes for Dhop Hackers!

If you're working on the code, you might appreciate these tips:

## The `README.md` File

If you modify the README, you will likely also want to update dhop's `help` text. To do this, see the info about [the
\_\_END\_\_ block](#the-__end__-block).

## The `dhop.rb` File

### The `__END__` block

The text after the `__END__` statement, which is printed when someone types `dhop help` or simply `dhop` (with no
arguments) is mostly what you get when you run [pandoc][] with the following options:

    pandoc -f markdown -t plain -o dhop_info.txt README.md

If you make changes to the code that affect its interface or usage, make changes to `README.md`, and then use the
preceding command to generate the `__END__` block text.

After pasting the `__END__` block test, snip out the information about installing dhop. Obviously, if they have the
program running they've installed it. :P

## The `dhop.sh` and `dhop.bat` files

These files, that invoke `dhop.rb`, are necessary because dhop runs in its own process space: any changes it makes to
the current working directory are made only within dhop's own context, and not the user's. However, it *can* write
a file (a memory), and an external process (the .sh file) can read that file (remembering the deceased process' desire
of what to do). This is essentially what's happening here:

* Dhop.rb writes the location to `cd` to in the .dhopcmd file.
* Dhop.sh, which was invoked with `source` (on Linux/Unix/BSD/Mac OS X) changes the current working directory in the
user's terminal session to the one read from .dhopcmd.

On Windows, the process is similar, but slightly different:

* Dhop.rb writes the entire `cd` command, including the location to move to, in the .dhopcmd.bat file.
* Dhop.bat `call`s that batchfile, executing it in the user's cmd session.

[pandoc]: http://johnmacfarlane.net/pandoc/index.html

{'fraction_non_alphanumeric': 0.08368794326241134, 'fraction_numerical': 0.0, 'mean_word_length': 4.214417744916821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6294167', 'n_tokens_mistral': 867, 'n_tokens_neox': 842, 'n_words': 425}