Please add generics at least on Yaegi! :P
He doesn't have to: https://github.com/cosmos72/gomacro
Yaegi – Yet Another Go Interpreter
41–50 of 77 posts
Re: Yaegi – Yet Another Go Interpreter
#42Bench-marking a fat native call, rather than a purely-interpreted function, is a bit bait-and-switch.
They do explain it very clearly though, and give a reason why that is what they are interested in for business purposes. Benchmark and optimise for what you're running, right? Better than a Mandelbrot?
Re: Yaegi – Yet Another Go Interpreter
#43YAGNI?
Re: Yaegi – Yet Another Go Interpreter
#44Programming in a language lacking a repl is always uncomfortable. I always wind up making a 'scratch.{ext}' file and running it to test things (scratch.* is in my global gitignore). Happy an interpreter+repl now exists for Go.
Re: Yaegi – Yet Another Go Interpreter
#45Earlier quoted context omitted.
Yeah, I'm not sure why, but this happens in VS Code's integrated terminal, which also has other readline-related issues (alt+backspace deletes to the previous space instead of deleting the previous word, for example). In any case, I still don't use the REPL except when I need to dynamically inspect some value (which isn't necessary in Go, since it's statically typed).
Windows is crippled somewhat on that front, but there are workarounds. Often easier and way more functional to just install a wrapper like ptpython, bpython, ipython, etc.
Re: Yaegi – Yet Another Go Interpreter
#46Earlier quoted context omitted.
Windows is crippled somewhat on that front, but there are workarounds. Often easier and way more functional to just install a wrapper like ptpython, bpython, ipython, etc.
I'm using a Mac.
Re: Yaegi – Yet Another Go Interpreter
#47Re: Yaegi – Yet Another Go Interpreter
#48Re: Yaegi – Yet Another Go Interpreter
#49Earlier quoted context omitted.
I disagree with this to some extent. Unit tests are a pretty good poor-mans REPL in languages that don't have REPLs. For instance, I've seen people write fake unit tests to do things like query a database for analysis purposes; it was just the fastest way they could come up with to do the exploratory work. What makes a unit test a good poor-mans REPL in a language like java with an IDE is: * Java IDEs, especially ecl…
We are talking Go here, which has a fast compiler. The IDE integration isn't always as good as Java, though.
Re: Yaegi – Yet Another Go Interpreter
#50Programming in a language lacking a repl is always uncomfortable. I always wind up making a 'scratch.{ext}' file and running it to test things (scratch.* is in my global gitignore). Happy an interpreter+repl now exists for Go.
You can do similar things by writing tests as you go, plus then you can keep the tests if they seem useful.