December 3, 2014
Brings together features from the social-networking site stocktwits.com and a tool for performing chart analysis. The user is presented options to get the last messages of trending stocktwits symbols, get the last messages from a specified user, get the last messages for a specified symbol, get the last messages of stocktwits suggested users and their usernames, get the list of all trending symbols and their titles, or open a chart tool for a given symbol.
- Lists, hash operations, lambdas and higher order procedures are used in conjunction to parse JSON responses.
- Recursion, lists and list manipulators and accessors are used to combine elements of lists and also to format lists for output.
- Data abstraction is demonstrated in the parsing procedures and by the single line of code that runs the program.
- Let is used to make a local binding in the body of the driver procedure from the user's input entered at the top-level input prompt.
External Technology and Libraries
- net/url is used for converting strings to URLs and for getting a pure port for the URLs.
- JSON is used to retrieve JSON from a URL.
- net/sendurl is used for opening of the chart tool.
Favorite Lines of Code
(define suggested-usernames-bodies (merge suggested-usernames suggested-bodies))
This code uses a list merge procedure to combine the corresponding elements of the two lists called
suggested-bodies that previously were individually parsed from JSON responses.