ammonite

How to issue a command that produces infinite output and return immediately

久未见 提交于 2020-01-04 09:09:06
问题 When I write the following code (in ammonite but i don't think it matters) ("tail -f toTail.txt" lineStream) foreach(println(_)) , the program give me the last line as intend but then hang, and even if i write more in the file, nothing come out. How does the API support process that have unbounded output ? I try to write val myStream = ("tail -f toTail.txt" lineStream_!) but it still does not return write away Here is what the scala doc says: lineStream: returns immediately like run, and the

VS Code execute current line or selection to in the integrated console

核能气质少年 提交于 2019-12-12 07:54:32
问题 This old Emacs user, who is used to elpy, is attempting to move onto VSCode with Scala & more specifically Ammonite repl. I used Ctrl+' to open the integrated terminal & all I have to do is type amm on the bash shell (ubuntu) to open the repl; however, I still miss being able to send the either the line or selection from the editor to integrated shell with Ctrl+Enter. I guess this means a bit of coding. Where can I start? Has anyone accomplished similar? Thanks much, 回答1: Actually, I found

VS Code execute current line or selection to in the integrated console

扶醉桌前 提交于 2019-12-03 13:37:58
This old Emacs user, who is used to elpy, is attempting to move onto VSCode with Scala & more specifically Ammonite repl. I used Ctrl+' to open the integrated terminal & all I have to do is type amm on the bash shell (ubuntu) to open the repl; however, I still miss being able to send the either the line or selection from the editor to integrated shell with Ctrl+Enter. I guess this means a bit of coding. Where can I start? Has anyone accomplished similar? Thanks much, user6273920 Actually, I found that adding VSCode Macros extension does the job: I just changed settings.json: { "window