The default Chicken Scheme command line interpreter does not have readline support enabled by default. Here’s how you set it up:
First install the readline-dev packages for your OS. For Ubuntu I installed the libreadline6-dev package using apt-get, but this may vary a bit depending on which OS you’re running.
sudo apt-get install libreadline6-dev
Then you need to get the readline egg from the egg repository and install it. Fortunately chicken-install makes this a snap!
Then create a new file called .csirc in your home directory and also a .csi.history file:
touch ~/.csirc touch ~/.csi.history
And put the following in .csirc:
(use readline irregex) (current-input-port (make-gnu-readline-port)) (gnu-history-install-file-manager (string-append (or (get-environment-variable "HOME") ".") "/.csi.history"))
That’s it! Readline and history should now work in Chicken!
Recently I made a stupid, sleep-deprived error. I won’t go into too much detail, as it’s unimportant, however I made some sweeping changes to a number of of my git repositories. Rather than properly merging the changes into my project’s respective Github repositories I decided to simply delete the Github repos, create new ones and upload the changes from my local repo.
Had I been more careful, or paid more attention to the numerous warnings during this process, I would have made backups of my wiki and issue tracker data. Unfortunately I did not and the next day when I went to make some updates to the wiki of one of my projects I was hit with the realization that the data was lost forever.
Issues and documentation are part of your project
The overall insight this experience has given me is that issues and documentation are part of your project. Every file in your project is stored in the same repository, why isn’t the issue tracker and wiki data stored in that same repo?
Granted my mistake was a stupid one, stemming from carelessly performing operations which cannot be undone. However consider the case of moving your central repository from Github to another service or private host. The move isn’t as simple as changing the origin and pushing to the new repo, instead you have to backup the issues/wiki and transfer that in a second step. Sometimes transferring that data is difficult, especially if the tools provided by the new host are radically different.
Having all your issue/wiki data stored in the same repo as your source code means that there are (likely) multiple copies of that data on many different machines. Changing hosts for the central repository is a simple matter of pushing to a new origin. Developers can use their preferred tools to work with issues and documentation.
I’ve done a cursory search for issue trackers/wikis which are designed to be included in the main git repository and have found ticgit which takes care of issue tracking. I haven’t had a chance yet to evaluate it, but plan on doing so in the near future. I haven’t yet found a solution for a wiki.
Ideally I would like both an issue tracker and wiki with a similar interface (as much as that is possible). If I’m unable to find a suitable solution I will likely take this up as my next project. Here are some of the features that I’m looking for:
- Version Control
- Changes to issues or wiki should be tracked by version control.
- New issues or changes should be associated with a user (git name + email + key).
- Editing should be allowed through a number of tools (web, command line, text editor/IDE) and should support markdown format.
- A program can monitor the repo for changes and alert users via email when changes occur.
I have resumed development of the JamochaTrade project and there has been a lot of progress over the last week or so. The last article left off with a very rudimentary candlestick chart that got its data via cross-domain JSON. I am pleased to announce that a UI has been added, along with the ability to buy and sell stocks, limit and stop orders, 5 different chart types (candlestick, bar, ohlc, hlc and line), a portfolio view, pending orders view, advancing time by week/month is animated as well as a host of other improvements.
Unfortunately the speed at which these features have been added has ended the step-by-step nature of this series. I will continue to provide progress updates and hope to produce a number of articles based on architecture or challenges that arise during development. Though there is not much discussion, you can still follow along with the commit log of the project. Each commit is relatively small and, in most cases, addresses a single concern. There is also some information provided in the issue tracker, which I have been making heavy use of and almost every commit has an associated issue.
The project is not yet ready for release, however there is a preview version available. Criticisms, comments, bug reports and feature requests are more than welcome. You can leave comments below or file a bug report or feature request on the issue tracker.
- 5 chart types (candlestick, bar, ohlc, hlc, line)
- 15, 30, 60 and 90 day charts
- Change chart colors
- Advance time by day, week or month (animated)
- Buy/sell stocks
- Portfolio view
- Sell directly from portfolio view
- Market, limit and stop orders
- Pending order pane
- Cancel pending orders
- Change theme of site
- Previously viewed stock data is cached for fast switching
- Most features auto-hide when not necessary to reduce clutter
- Account balance and total portfolio value show gains/losses