News for hackers. Stuff that matters.
Re:Interactive Go REPL by frou_dh on Thursday July 13, 2017 @01:18PM (#14763133)
Fast compilation and restarts doesn't at all address the style of programming where you evolve an in-memory program in an exploratory way.
Re:Interactive Go REPL by Johnny_Brahms on Thursday July 13, 2017 @01:55PM (#14763524)
It doesn't,but op mentioned coming from python and I don't think many programming languages outside the lisp family have anything near a good REPL experience.

The few times I have tried to do serious work in python hasn't really impressed me much in that regard.

Re:Interactive Go REPL by jerf on Thursday July 13, 2017 @04:10PM (#14764736)
If that is your desire, you already know not to use Go.

Personally, the idea of developing code that way for use in a server brings back many memories, mostly not good, so this is not a big problem for me.

Re:Interactive Go REPL by ice109 on Friday July 14, 2017 @12:44PM (#14771181)
yes it does? unless you're unable to write a single line without interactivity. i do literally the same thing in go as i did in python (when i needed to): write a little and hit compile to watch what happens (except i add a fmt.Println(fmt.Sprintf("%#v",x)) or something like that). often the entire thing happens faster than it would take python to just interpret a similar line and execute.
Re:Interactive Go REPL by frou_dh on Friday July 14, 2017 @01:18PM (#14771433)
Find a screencast along the lines of someone livecoding something from scratch in a single editor-connected REPL session. Maybe using Clojure (or similar), and you'll appreciate the fundamental difference vs booting up fresh processes that start from line 1 of 'main' again and again.
Re:Interactive Go REPL by ice109 on Friday July 14, 2017 @03:03PM (#14772330)
https://www.youtube.com/watch?v=a9xAKttWgP4

that's a trick though - no one uses interpreters like that. for most people they're for experimentation, which is exactly what i was saying i'm able to do with go.

Re:Interactive Go REPL by frou_dh on Friday July 14, 2017 @03:36PM (#14772559)
The style I'm talking about, code isn't typed directly into the REPL/interpreter!!

You work in your real text editor and it has a connection to a persistent session of the language runtime, over which you can send fragments, lines or whole files into. And receive data back if you wish. You can refine or replace as little or as much of the program as you want, while it is running.

Say there's a power cut and your computer turns off. No big deal because you were working in your real text editor and saving source files to disk (but not necessarily sending all of their content into the session).

It's not trivial or a novelty. I get that a traditional line-at-a-time interpreter inside a terminal à la /usr/bin/python isn't super compelling. That's not what I'm talking about.

(I am also a happy user of Go FWIW. It's the C style of programming in a super-refined form (not surprising considering who 2 of its creators are!))

Re:Interactive Go REPL by ice109 on Saturday July 15, 2017 @02:58PM (#14778297)
>You work in your real text editor and it has a connection to a persistent session of the language runtime, over which you can send fragments, lines or whole files into. And receive data back if you wish. You can refine or replace as little or as much of the program as you want, while it is running.

...that's even closer to the style that fast compilation lends itself to

Re:Interactive Go REPL by frou_dh on Saturday July 15, 2017 @03:11PM (#14778361)
Alright, I get it. You're not interested in the subject I brought up.