Hacker News new | ask | show | jobs
by nomilk 335 days ago
Observations:

- Easy to use (very little friction, although command + L to open chat could be nice, first time using I couldn't locate the chat pane, although the humility to have it tucked away was nice :) )

- It generates and asks to run preliminary code e.g. str(object) to see what it's working with), wasn't expecting this, nice!

- Has most (all?) the niceties cursor has slowly added over the months

- Small thing, but I'd definitely prefer that when it generates code it places it in a script for me to read and run line by line, rather than showing the code in the chat pane and expecting the user to select between Run (all of it!) or Cancel. I'd generally never run unfamiliar code all at once, let alone LLM-generated code, but much rather read the code in the script pane where I can modify, comment, edit, and eventually run line by line.

I've used cursor (in tandem with RStudio) a fair bit for R/shiny development. After half an hour playing with this, I'm pretty confident this is a better experience, one I'd prefer over cursor/RStudio. Well done.

2 comments

Thanks for the comments! We're working on the shortcuts but that should come soon. If you edit the code in the conversation before you hit run, it'll actually let you modify it and then run that code when you hit Run. (Try "Generate 10 normals in the console" and then change it to 20 when it gives rnorm(10).)

Can you say a bit more about what you mean with line-by-line running from a script? Would the script show up in the editor pane (top left) and then you'd run the script line by line and the AI would see the outputs from that code being run?

I wouldn't expect the AI to see the output of the human running code line by line, but simply that when AI generates code, it places it in the script pane (just how cursor typically edits file(s) to place its generated code in the right places within those files).

For quick and dirty EDA in R, the appropriate place is probably just going to be the bottom of the current script. For example here [0] Rao gives the requested code; rather than being presented with Run/Cancel options, I'd prefer an 'Accept' button that places the code at the end of the current script in the script pane so it can be read by the human and run a line at a time (to verify that it works each step of the way)

[0] https://imgur.com/a/8x4Ykdt

Makes sense - we're planning to have "Rao rules" (essentially Cursor rules) out tomorrow, so you'll be able to include an instruction that it should always append to some file you have open. Hopefully it obeys that and then you can run the code from there.
>Small thing, but I'd definitely prefer that when it generates code it places it in a script for me to read and run line by line, rather than showing the code in the chat pane and expecting the user to select between Run (all of it!) or Cancel.

I agree, I am one of many R users whose workflow for science is still, I'm sheepish to admit, "select some code and run it, then use the variable explorer."

On the whole though I'm very excited to see agentic abilities coming to R.

Thanks for the comment! As Will mentioned below, hopefully "Rao rules" will help with this. If not, we'll think about intuitive ways to allow the user to run individual segments of code before running/accepting all the changes.