6 ms·
time to give it another look!
by a-dub 5y ago
time to give it another look!
- moelf 5y agotry doing this year of Advent of Code in Julia!
- fault1 5y agoYes! Julia is quite elegant in AoC. I had a blast doing it in Pluto last year: https://github.com/fonsp/Pluto.jl https://github.com/fonsp/Pluto.jl
- Mandelmus 5y agoI’m doing the same this year. AoC in Julia and Pluto.
- spratzt 5y agoI tried it last year using JupyterLab. I found Julia error messages so unhelpful that eventually I gave up and returned to Python.
- sundarurfriend 5y agoThe type-based error messages can be pretty opaque until you have a good grasp of the type system, so those can be harsh/seem unhelpful when you're trying to learn the language (and in this case solve daily problems with time constraints too). Were those the problem or did you have some other examples in mind?
- whimsicalism 5y agoi seem to be the last person in the world to prefer c-style syntax. but so much cool stuff happening in julia that it seems silly to avoid diving in on such a basic semantic nit.
- leadingthenet 5y agoI think it's an unfortunate result of people complaining about significant whitespace in Python.
- Akronymus 5y agoSignificant whitespace in python is annoying indeed. Altough, specifically in python (because the mixture of statement based, not strongly enforced type system and the whitespace). In f# I actually really like the significant whitespace.
- leadingthenet 5y agoI don't understand how it's ever an actual problem and not just people being lazy / literally just starting out learning the language. Every Python editor / IDE is capable of, and immediately will, notify you of any formatting issues of the sort. Python also has great, trivial to use autoformatters like black[1] that essentially all production code should use and which ensure that you never, ever have to think about this again. What realistic scenario is there where it actually makes sense deviating from the standard the language is trying to enforce? And even if you can think of one (I honestly cannot), is now having to write an “end” keyword all over your code really a tradeoff worth making? [1] https://github.com/psf/black https://github.com/psf/black
- DNF2 5y agoMy problem has been that I sometimes lose indentation, by accident, and this can break or, worse, alter the behavior. It is also a nuisance when I want to copy-paste code from somewhere else, and it doesn't go smoothly. Once I needed to incorporate code from a colleague who used 2 spaces for indentation. That was a nightmare.
- leadingthenet 5y agoYou're simply admitting to not using a formatter. Both Black or PyCharm's Ctrl+Alt+L format should be able to handle that scenario. You can enable it to run automatically on file save in either (n)vim, VSCode, or PyCharm. Or as a git hook. Or in a CD/CI pipeline. Seriously, simply installing black through your favourite package manager and running `black .` in your project directory takes like 10 seconds flat. Done, you never have to think about tabs / 2 spaces / 4 spaces ever again. Please use these tools, I promise both your own and your colleagues' life will be greatly improved, and it takes no effort at all to use.