Readit News logoReadit News
pansa2 commented on Do I not like Ruby anymore? (2024)   sgt.hootr.club/molten-mat... · Posted by u/Vedor
benrutter · 5 hours ago
I'm a python developer, and a big fan of the features with gradual typing etc. This article really highlights for me though, how python has very much changed from the language it was even 5 years ago.

Initially, the celebrated feature of python was that it allowed easy and fast development for newcomers. There was a joke a long the lines, "I learned python, it was a great weekend".

As much as I like python's type system (and wouldn't want to see them ever go way!), part of me wonders if moving into a world where hello-world can look like this, is a world where python is no longer the "lean in a weekend" language:

     from typing import Annotated
     import typer
     
     app = typer.Typer()
     
     @app.command()
     def main(
          name: Annotated[str, typer.Option("--name", "-n")],
     ) -> None:
         """Prints out 'HELLO {name}!!' (name upper cased) to the console"""
         print(f"HELLO {name:upper}!!")
     
     if __name__ == "__name__":
         app()
(obviously the example is silly, and I know this is a lot more than you need to do, hopefully you get my point though!)

pansa2 · 2 hours ago
> python is no longer the "learn in a weekend" language

For the last 10 years, Python's evolution has been directed by professional developers working for large software companies, and they've focused on adding features that help them work on million-line Python codebases.

Even if the language was originally intended to be easy to learn and ideal for small programs, that's clearly not a design goal any more.

Is there a language today that’s as easy to understand as the “executable pseudocode” of Python 2.x? I haven’t found one.

pansa2 commented on Do I not like Ruby anymore? (2024)   sgt.hootr.club/molten-mat... · Posted by u/Vedor
pmkary · 6 hours ago
Back when autocompletion and stuff were only available in Visual Studio/Xcode/Other bug IDEs, I was forced to use Ruby and fell in love with it. It didn't matter what I used as my editor was Sublime. But when VSCode came and language features became democratized, I never touched a type-less language again. Why should someone opt for a language with absolutely no features where one can have autocompletion, typechecking, deep data type exploration, jumping to definitions and implementations? I really think it's a bad choice of Ruby not to care for types. And well we now have Crystal which again makes me question why Ruby? And it’s a shame no language is as beautiful as Ruby, not in features choices, design elegance, balance, beauty of the syntax, joy of programming mindset, not even in the name and logo. I wished Matz rethinked this part.
pansa2 · 3 hours ago
> it’s a shame no language is as beautiful as Ruby [...] I really think it's a bad choice of Ruby not to care for types

Do you think Ruby could change something so fundamental as dynamic => static typing and still retain its beauty?

The only static typing solution I've seen for Ruby is Sorbet, and it's... not beautiful.

pansa2 commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
porridgeraisin · 4 days ago
> std-lib

Yes, My favourite is the `time` package. It's just so elegant how it's just a number under there, the nominal type system truly shines. And using it is a treat. What do you mean I can do `+= 8*time.Hour` :D

pansa2 · 4 days ago
As long as you don’t need to do `hours := 8` and `+= hours * time.Hour`. Incredibly the only way to get that multiplication to work is to cast `hours` to a `time.Duration`.

In Go, `int * Duration = error`, but `Duration * Duration = Duration`!

pansa2 commented on Go is still not good   blog.habets.se/2025/07/Go... · Posted by u/ustad
antiquark · 4 days ago
I'm still appalled that there's no "do while" loop in go.
pansa2 · 4 days ago
Python doesn’t have one either
pansa2 commented on 1981 Sony Trinitron KV-3000R: The Most Luxurious Trinitron [video]   youtube.com/watch?v=jHG_I... · Posted by u/ksec
uberduper · 4 days ago
I worked at a company in the late 90s that was developing a thin flat panel "CRT" display. Crazy how long ago the CRT was invented.
pansa2 commented on 1981 Sony Trinitron KV-3000R: The Most Luxurious Trinitron [video]   youtube.com/watch?v=jHG_I... · Posted by u/ksec
fumeux_fume · 4 days ago
I will always remember when my Dad bought a vertically flat, 27in Trinitron back around 1998. I miss those buttery-smooth pans. Probably my biggest gripe with any modern television is how awful panning or tracking shots look. Similarly, I enjoyed this quest to obtain a (the?) 43in Trinitron: https://youtu.be/JfZxOuc9Qwk?si=9XcP5-4lwzrvpvpF
pansa2 · 4 days ago
> vertically flat, 27in Trinitron

Yes, the cylindrically-curved screen is distinctively Trinitron. It’s easy to spot one at-a-glance, whereas the later fully-flat models look much more like those from other brands.

> I miss those buttery-smooth pans

This motion clarity is a big reason why CRTs are still the best way to play retro side-scrolling games.

pansa2 commented on 1981 Sony Trinitron KV-3000R: The Most Luxurious Trinitron [video]   youtube.com/watch?v=jHG_I... · Posted by u/ksec
747fulloftapes · 4 days ago
A late 90s Trinitron would have been 4:3, so 1280x1024. I found it more important to run a trinitron at the native resolution for the shadow mask. Otherwise things got blurry and gross. A bit like using an LCD at its non-native resolution where things get unevenly stretched and squished.

I seem to remember my Sony G220 had a native resolution of 1024x768 and I could run it up around 100Hz. I think the max was 1600x1200@60Hz.

Often my maximum refresh rate was limited by my graphics card's dot clock rather than the CRT specs.

pansa2 · 4 days ago
> 4:3, so 1280x1024

That’s 5:4. The correct 4:3 resolution is indeed 1280x960.

pansa2 commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
almostgotcaught · 5 days ago
> it shouldn't break fundamental rules of the language

it doesn't? you simply don't understand what a match statement is.

https://doc.rust-lang.org/book/ch19-03-pattern-syntax.html

    let num = Some(4);

    match num {
        Some(x) if x % 2 == 0 => println!("The number {x} is even"),
        Some(x) => println!("The number {x} is odd"),
        None => (),
    }
notice that x is bound to 4.

pansa2 · 5 days ago
> you simply don't understand what a match statement is

It's "a DSL contrived to look like Python, and to be used inside of Python, but with very different semantics":

https://discuss.python.org/t/gauging-sentiment-on-pattern-ma...

pansa2 commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
user453 · 5 days ago
That's destructuring, a feature not a bug. Same as it works in any functional language - and tremendously useful once you get the hang of it
pansa2 · 5 days ago
At least functional languages tend to have block scope, so the latter snippet introduces a new variable that shadows `not_found` instead of mutating it.
pansa2 commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
almostgotcaught · 5 days ago
because it's not a `switch` it's a `match` ie pattern matching...
pansa2 · 5 days ago
Doesn't matter what it is, it shouldn't break fundamental rules of the language.

Ruby's `case`/`in` has the same problem.

u/pansa2

KarmaCake day3415January 24, 2020View Original