Xephyrous
Joined 13 years ago
Joined 13 years ago
Note for anyone who tries this out - to get back to your main session, try ctrl+alt+F1 or ctrl+alt+F2
You can memoize methods to the instance to get lazy evaluation, properties can be explicitly defined up-front, and the fact that everything is namespaced is nice. You can also make judicious use of @staticmethod to write functional code whenever possible.
It's important to distinguish what kind of "things" you're talking about, though. There's a pretty big moral difference between not being able to afford consumer goods and not being able to find an appropriate place to perform basic bodily functions.
You can work as a web dev at a small company without being part of the mainstream silicon valley rat race. Sysadmin-type skills are pretty hard to hire for, and very useful at small companies. It sounds like you've got that going for you. I'd change your definition of success and focus on finding a job at a company with a culture you'd enjoy, and not worry so much about its perceived prestige.
def absolute_path(path):
if not path.startswith('/'):
return '/' + path
return path
This way you don't have to keep track of mutating the path variable. I do find that more readable - it's clearer that there are two paths through the code. That said, this example is trivial enough that I'd probably do it with an inline if/else statement, although still probably not a lambda: def absolute_path(path):
return path if path.startswith('/') else '/' + path
This way it's more obvious at a glance that you're defining a function. It's easier to follow someone else's code if they generally adhere to standards, and Python is a very convention-oriented language.Neovim is working quite well already. I fully switched from vim to nvim months ago without any issues. Plugins are still written for vim though, so I don't think many take advantage of neovim-specific features yet. It does have a full terminal already though, which is pretty awesome.
edit: Oh, I'm guessing you're referring to the promises of embedding neovim inside IDEs. I'm looking forward to that too!
In [1]: %load_ext autoreload
In [2]: %autoreload 2
In [3]: from foo import some_function
In [4]: some_function()
Out[4]: 42
In [5]: # open foo.py in an editor and change some_function to return 43
In [6]: some_function()
Out[6]: 43
It's nothing like a proper lisp repl, but you can sorta do this in vanilla python too, if you don't mind some annoyances. `reload` reloads a module:
>>> import mymodule
>>> print mymodule.myfunction()
3
>>> reload(mymodule)
>>> print mymodule.myfunction()
5
Downside is you have to use the module, `from mymodule import function` won't reload.
- It completely takes over emacs. Your modifications now go in ~/.spacemacs. Don't touch ~/.emacs.d/ Want to install something from melpa? Make a spacemacs configuration layer. That aspect feels like a strong step away from the emacs ethos where you're on the same footing as the editor authors. I don't like the inversion of control.
- It's unstable. Fairly often I'll update and something will fail, leaving me helplessly with emacs keybindings. Thankfully, a revert is easy.
- The last one is a problem with evil in general, you'll still occasionally find yourself in emacs mode, where hjlk and more importantly ":q" don't work