Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lucasoshiro
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
271.
▲
by
lucasoshiro
2y ago
> Ruby is slow We're talking about code that calls external commands here. If one wants performance it is already doing wrong by calling external commands. Don't think it is relevant here. > encourages an esoteric convention
272.
▲
by
lucasoshiro
2y ago
> Python > Lua > PHP > Ruby > JavaScript > Perl > Bash Those are different languages, with different characteristics. Perhaps the only two that can be directly compared as a 100% replacement to another are Ruby and Pyth
273.
▲
by
lucasoshiro
2y ago
Well, I'm happy that I you learnt something new here :-). Ruby is quite similar to Python, perhaps you don't even need to study too much!
274.
▲
by
lucasoshiro
2y ago
You can say similar things for Bash or Python (or Perl, JS, etc): > Too many ways to do the same thing. In Bash you can use backticks, $(), and bash -c for the same thing. And also [ ], [[ ]], test. And so on. > Not packaged by defaul
275.
▲
by
lucasoshiro
2y ago
> I also have a revulsion to back ticks. Yeah, I understand... But this is other language with a similar syntax for a similar functionality.
276.
▲
by
lucasoshiro
2y ago
You can pipe using the backticks! Open irb and try this: `ls -l | wc -l`
277.
▲
by
lucasoshiro
2y ago
Thanks for the comment! Even though I wrote this about Ruby, I must admit that I am not a specialist.
278.
▲
by
lucasoshiro
2y ago
Thanks for the feedback! I need to check it because my mother language is Portuguese and my personal page was initially only in Portuguese (everything there has also a version in Portuguese if you click the Brazilian flag). Some years ago I
279.
▲
by
lucasoshiro
2y ago
Well, but what you do with Bash can be also done with vanilla Ruby...
280.
▲
by
lucasoshiro
2y ago
Yeah, as I mentioned, every time someone says something bad about Ruby for me, it is about Rails...
281.
▲
by
lucasoshiro
2y ago
Yeah, it makes sense.
282.
▲
by
lucasoshiro
2y ago
For both Ruby and Python most of time I use Emacs without an LSP, and it works better with Ruby than Python. I never search _exactly_ why Ruby became so less popular than Python, but I think that at least two things: - Having its popularity
283.
▲
by
lucasoshiro
2y ago
Maybe this is something that we need to deal no matter what are using (perhaps except if we use sh). Alpine for example doesn't ship Bash. Mac OS ships Ruby and its Bash is quite old.
284.
▲
Ruby: A great language for shell scripts
(lucasoshiro.github.io)
442 points
by
lucasoshiro
2y ago
|
353 comments
285.
▲
Python: 10 Cool Tricks with the * Operator
(lucasoshiro.github.io)
7 points
by
lucasoshiro
2y ago
|
1 comments
286.
▲
by
lucasoshiro
3y ago
Personally, I've tried some graphical tools (e.g. magit on Emacs and the git tools on JetBrains IDEs), but still prefer CLI as I think those UIs hide too much from the user, specially in more complex repositories (e.g. repos with submo
287.
▲
by
lucasoshiro
3y ago
Probably they use libgit2 instead of git. But you can use git log -L for that.
288.
▲
by
lucasoshiro
3y ago
Thanks for the comment! It looks to be a very useful tip for doing after bisect on repositories where people insist to squash pull requests.
289.
▲
Git as a debugging tool
(lucasoshiro.github.io)
211 points
by
lucasoshiro
3y ago
|
76 comments
290.
▲
How Git Merges Submodules (2022)
(lucasoshiro.github.io)
2 points
by
lucasoshiro
3y ago
|
0 comments
291.
▲
by
lucasoshiro
3y ago
Wow, I didn't know about that. Nice to see more things about lambda calculus, I think it is the most beautiful thing in computer science, but I haven't studied it too deeply as I need to prioritize other things...
292.
▲
by
lucasoshiro
3y ago
Considering that list comprehensions can be replaced by maps and filters, and they can replaced by reduces, maybe we can ever go further in that craziness and do it only using reduces!
293.
▲
by
lucasoshiro
3y ago
If you don't care about line length :-P
294.
▲
Lambdasort: Quicksort written in Python only using lambdas
(lucasoshiro.github.io)
40 points
by
lucasoshiro
3y ago
|
9 comments
295.
▲
by
lucasoshiro
3y ago
Nice writing! Other articles about Git in this page are also interesting!
296.
▲
by
lucasoshiro
3y ago
This happens a lot here in Brazil. Some brands are so famous that they are synonyms of some products, e. g. Gillette (razor blade), Bom Bril (steel wool), Insulfim (window film) and so on. Xerox is a curious thing here. It is a so strong sy
297.
▲
by
lucasoshiro
3y ago
Yeah, those are decisions that needed to be made in order to make Lua simple enough for being embedded. And I find its syntax very smart: it is not object-oriented, but using the : syntax sugar you can pretend it is (Löve does that); if you