Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Any coding workflow for using the repl?
1 point by tonyle on March 9, 2016 | hide | past | favorite | 2 comments
There are times when I want to play around with some idea and I want to write some potentially throwaway code. There is no requirements, I'm just playing with some lib to see what is it capable of. The repl makes it really nice to explore.

One of my current workflow is for node.

1. go to the terminal and open node.

2. require some random library and play around with it.

3. export the command history to a file with '.save'

4. modify the file with a text editor.

5. load the new file with '.load'

6. Repeat and iterate till I have some proof of concept code.

I was previously tried using LightTable but it was kinda buggy. I'm kinda happy with this workflow except that I can't rerun a multiline command while in the repl which makes typos more painful.

Does anyone have a similar workflow, better editor or suggestions on how to improve it?




If you want to use JavaScript, Tonic (http://tonicdev.com) is exactly this workflow. It has every single package on npm already pre-installed (so absolutely no set up - straight to code), and gives you a complete node environment to play around with. It also has time-traveling abilities that can rewind the entire state of the computer (http://blog.tonicdev.com/2015/09/10/time-traveling-in-node.j... ). When you are done you can download the file and it will work exactly the same in node.

Would love to hear your thoughts if you try it.


This is very cool. It does a lot of what I want, it kinda reminds me of wakari/anaconda but for javascript.

It be cool if you added the ability to upload a file rather than having to download it to test something.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: