HNHacker News
TopNewBestAskShowJobs

vascocosta

208 karma · joined July 4, 2016

submissionscomments
vascocosta··on 10 Years of Betting on Rust
I've experienced this. I would say it depends a lot on the complexity at hand, so for instance if it's something rather simple, you can keep track and avoid pitfalls even when doing it with a lot of mutation and imperative style. On the other hand, when complexity grows, I find myself going more functional and avoiding mutation at all cost, as obviously it avoids a lot of problems.

I would say Rust's borrow checker and lifetimes make it harder to use traditional patterns and favor a more functional approach. Obviously, sometimes doing it the functional way might be hard, for people not so used to it, but it keeps the compiler happier I would say.

vascocosta··on 10 Years of Betting on Rust
I know where you're coming from. But for me it's one of the main reasons I use Rust, since it clicked for me after the initial hurdles. Contrary to the average opinion on this, I like the syntax and don't mind so much about function colouring.

Especially when using tokio I feel like my solutions work out pretty well. I also very much appreciate how they create async equivalent functions for pretty much any std function worth using. Maybe this creates a divide, but my concurrent programs feel easy to code and the performance is pretty good.

My only semi-issues are probably stuff like task cancellation, however I attribute that to skill issues on my end, rather than tokio or the way async/await is implemented in Rust.

vascocosta··on 10 Years of Betting on Rust
I very much agree with this and that's one of the reasons I keep using Zig as it is now. I try to provide feedback on what isn't very obvious to me.
vascocosta··on 10 Years of Betting on Rust
For me the value in Zig is its simplicity as a language (in a way similar to go's simplicity) and the explicit and very fine grained control over memory allocation. On top of that, I really appreciate tagged unions and error handling. It adds enough value on top of something like C to make it worth for me.

Still wherever I need absolute code correctness and production grade quality, I use Rust, my favourite language, at the expense of more code and spending more time doing it "the right way".

vascocosta··on 10 Years of Betting on Rust
As someone who dove deep into Rust at the end of 2022, I always find it interesting to read these stories from people who went through the harder times it was back in 2015. I feel lucky to have learnt the language when it was much more developed, as it certainly made the already steep learning curve a bit more comfortable.

In a way I feel like I'm going through what is described in the article but for Zig. I guess Zig is more or less in a similar place now to where Rust was back then. Still I enjoy very much using it already.

vascocosta··on Lua Programming in Lua (first edition) (2003)
Yes, it's technically possible, but indeed it's such a default that no one really tries to fight it.
vascocosta··on Programming in Lua (first edition) (2003)
Interesting viewpoint. It is my belief that Lua would be nice as a first language, but maybe this opinion is tainted by all my years of experience in programming. Lua definitely wasn't my first language, I started out with C/C++ and Java, long ago. Nothing beats having first-hand experience as a teacher and thus I'll accept your opinion as something more substantiated than my gut feeling.

I'm quite interested in this topic, since I would like to write a good book to introduce absolute beginners into the world of programming. I have a good and encompassing knowledge about many different languages, nevertheless I lack teaching experience.

In your opinion, which languages are good candidates as a first choice and what do you think about using a Lua game framework, like for instance Love2D to teach programming (instead of raw standalone Lua)? The idea being that instead of clunky low level awkwardness, like string manipulation, students would instead see geometrical shapes moving on a screen with just a bunch of simple and imperative statements. Would that provide a better motivation?

vascocosta··on Programming in Lua (first edition) (2003)
First off, congrats and feel free to share a link to your game here as I got interested.

I totally resonate with your comment about the language not getting in your way. I use all sorts of languages for different kinds of applications for many years and only recently I started creating games.

Whereas in other domains I appreciate complex languages that address necessarily complex tasks, in game development, while the game as a whole is a complex system, you often are handling simpler tasks and mostly thinking about algorithms. At least in my experience tackling these algorithms requires mostly mathematical calculations and for that, you definitely want the language to stay out of your way.

In game dev no matter if you pick an imperative or functional approach, you really need to use all your brain power on your problem domain. Language complexities are often distractions that aren't super useful, since like I already said, the task at hand is mainly algorithmic in nature.

vascocosta··on Lua Programming in Lua (first edition) (2003)
Both views have valid points. I guess it depends on how quickly you need to get something up and running. Battle-tested libraries definitely have their pros, but then again the surface area for possible bugs is also greater. For sure, most of my code in Rust for instance is quite complex and I wouldn't be able to do it without external crates. That said, in most projects I end up with 300+ indirect dependencies, most of which I don't even know anything about. It adds to compile time, final binary size and most importantly, I'm building my software on top of a huge stack of stuff I don't really know. I guess the higher level we go, the less we can avoid this anyway. Nevertheless some of my points don't necessarily apply to interpreted languages.
vascocosta··on Lua Programming in Lua (first edition) (2003)
Fair point about the Linux CLI, especially the lack of a comprehensive stdlib. As for the syntax sugar and code terseness, maybe it's just me, but I prefer verbosity over compactness. Surely it takes more time to write and read, but personally it makes it more readable for me.
vascocosta··on Lua Programming in Lua (first edition) (2003)
This point made me think for a while... We're so used to languages with batteries included, like for instance Python which I often compare to Lua, that we assume it's always a good feature to have. It can be, but it's not for free. We definitely become a bit lazy and often turn more into "library users" than coders. It's convenient at first sight, nevertheless a bad habit. There's so much we can learn by implementing our own versions of even the most simple algorithms. In addition to that, our solution is probably going to be leaner, even if not as feature-rich, than the library next door. But then again, we probably don't need most of those features.
vascocosta··on Programming in Lua (first edition) (2003)
Your analogy to a stripped back version of JavaScript is really on point. I feel that way about Lua too. Through time Lua kept its simplicity, whereas ECMAScript kept accreting stuff which most of the times makes life easier, but also gives way too many choices for how to do the same thing.

Indeed the 1-based indexing, which often generates heated discussions, could be a source of confusion later on. However, like you mentioned, it can also prompt the beginner to quickly understand the languages are just tools, which have slightly different ways to be used, depending on what they're trying to solve.

In fact, this 1-based indexing is by convention (although everyone uses it), once again showing how flexible and "hackable" Lua is.

vascocosta··on Programming in Lua (first edition) (2003)
For me Lua, from a minimalism point of view, feels like the Go of dynamically typed languages.

I love how you can acquire the language easily within a very short period of time (apart from some idioms, which like in other languages take more practice). I appreciate the low number of keywords and that you have only one real way to structure data, through tables. Yet, you can use meta tables to "emulate" classes as blueprints for object creation and even inheritance, if you really need OOP, or for that matter other paradigms. In a way this reminds me of JavaScript prototypes.

As an indie game dev, Love2D really clicked. Lua is awesome as a scripting language inside a host language like C/C++/Rust, because it is simple, intuitive (both for imperative or functional styles) and rather fast.

I'm even using it as my go-to scripting language for the Linux CLI instead of Python. Python, as great as it is, feels sometimes too comprehensive for small scripts. I like to script using a language I can fully keep in my "working memory", without having to refresh my memory about some constructs/idioms. That said, I use Rust as my main statically typed language, so maybe I'm just finding excuses for my love for Lua...

I also think Lua is underrated as a possible first language. Its simplicity, readability and details like using keywords for blocks (do, end, etc) IMO make it suitable for beginners.

vascocosta··on Amiga Games Released in 2024 Index
I made a simple retro game out of pure passion and released it for free at itch.io, however I see many good games that sell for low prices. There's definitely a niche market. Alternatively users can also donate or become your patrons. From what I see, if the game is decent and the price is lowish, then it sells quite well. Obviously won't pay your bills, but it's something...
vascocosta··on Amiga Games Released in 2024 Index
I've recently developed a very simple game for the ZX Spectrum in a week and within 2 weeks it was downloaded almost 200 times on itch.io. Despite being an extremely low effort attempt I got some feedback and even a review on Youtube.

Now I can't help but wonder what sort of feedback I'll get if I put in a decent effort. I'm pretty sure it's going to be worth it, since at least for me it was already a very pleasant surprise to have people enjoying my simple game.

vascocosta··on ICQ will stop working from June 26
28072048 here.

Anyone knows about NINA chat? They're trying to keep MSN, AIM, ICQ and others alive. I wonder if someone else is using it?

vascocosta··on Antigravity.py (2020)
Me too and I'm a long time Python programmer.
vascocosta··on Nuitka: a Python compiler written in Python
That's a very good idea. I'll try to add that feature on the next release. Thank you for using my little weather app. :)
vascocosta··on Nuitka: a Python compiler written in Python
Hmm, with Pyinstaller I generate true standalones which require no libs at all, nor Python to be installed on the host system. Do you use the --onefile option?

As an example, here's a little project which I also release as a single binary file that works everywhere I've tested, with no deps:

https://github.com/vascocosta/glueather

vascocosta··on Nuitka: a Python compiler written in Python
Yes. I do it for my weather app that uses PyQt. On the release files I have single binaries that work flawlessly:

https://github.com/vascocosta/glueather

vascocosta··on Nuitka: a Python compiler written in Python
I use Pyinstaller to generate single file executables of my Python projects, which use Qt. It works great.
vascocosta··on Six Years of Rust
Python and Go are also the main languages I've been using for the last decade. Noticing all the hype around Rust recently is prompting me to learn a new language. The last time I learnt a language from scratch was Go around 2010.

Go was fascinating to learn, precisely because it looked like C, but it wasn't. Another aspect that makes me love Go is its minimalism and concurrency features.

I also used to enjoy C++ and Java quite a lot for larger projects, so tell me, can I expect Rust to somehow remind me a bit of Go in comparison to C++ and Java? In other words, a simpler, more concise and more enjoyable to use version of C++ for instance?

vascocosta··on Racket 8.1
It's in a very early stage, because I'm porting it from a previous Python code base, so it's not yet available. That said, I'll leave here two links for Racket software that inspire me.

1. Gemini server with tons of features, that I use personally:

https://sr.ht/~rwv/dezhemini/

2. Graphical Gopher browser:

https://github.com/erkin/gophwr

vascocosta··on Racket 8.1
Python is still the language I use the most. Have you tried using the pyinstaller package to create executables? It's super easy.
vascocosta··on Racket 8.1
Complex applications was probably an overstatement but I've created featureful IRC and Discord bots, a database management application and right now I'm creating a graphical browser for the Gemini protocol.

All my other previous attempts at using functional languages, like for instance Haskell, ended up in trivial applications, usually based in numerical analysis.

vascocosta··on Racket 8.1
As an imperative, stateful and even sometimes OOP developer, always finding functional programming very elegant but never really using it for real, Racket was the Lisp dialect that finally hooked me in.

I think the reason was because it came with batteries included and I could create complex applications using only the standard library or very few packages.

vascocosta··on The Endless Acid Banger: algorithmic self-composing acid techno music
I'm a programmer. I also enjoy occasionally producing electronic music, usually within the trance genre. Nevertheless as a good programmer I'm lazy and that reflects in my music creation. I'm a minimalist, but minimalist trance doesn't sound so good in my opinion. Many layers are often needed, with complex melodies, if you want it to sound professional.

On the other hand, acid techno seems to be minimalist by design, I love it. If I can create it programmatically even better. Mixing automation with some human interaction seems to be the best of both worlds. I'm in love with this and feeling like creating my own acid techno production tool, with a mix of automation and interaction.

vascocosta··on ZX Spectrum Next: The Evolution of the Speccy
I missed the chance to buy it the first time around. Does anyone know when a new batch is coming?
vascocosta··on The unreasonable effectiveness of simple HTML
The simple HTML of Hacker News is one of the reasons I love it so much. What a breath of fresh hair compared to modern Reddit.
vascocosta··on Delta Chat – decentralized chat via email
Yes, that's probably the reason, especially the fact that the person on the other side doesn't even need to be aware of Delta Chat.

Or maybe we need something like Delta Chat that uses XMPP by default but falls back to email if the recipient doesn't have an XMPP account.

← PreviousPage 2 of 3Next →