@ashwinvis@mastodon.acc.sunet.se
@ashwinvis@mastodon.acc.sunet.se avatar

ashwinvis

@ashwinvis@mastodon.acc.sunet.se

Research software engineer, Ph.D., :blobcatnerd: moderator for https://mastodon.acc.sunet.se. I write / boost posts related to general topics such as news and technology here.

Recurring topics: :python: #python :terminal: #linux :blobcatscience: #science

I usually approve follow requests for humans.
Posts expire every 12 weeks

Header: SVGBackgrounds.com, CC-BY 4.0
Avatar: @davidrevoy, CC-BY 4.0
#nobot

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ashwinvis, to ML
@ashwinvis@mastodon.acc.sunet.se avatar
mo8it, to python
@mo8it@fosstodon.org avatar

Why #Python is terrible
by Jos Visser

https://josvisser.substack.com/p/why-python-is-terrible

"Python has caused me a world of pain. It is slow as molasses and patently unsuitable for any program that is larger than about 100 lines of code." (also my experience)

"Q: Then why do we use it?
A: One word: False economy." (I see two, but true)

One comment adds a missing reason on why people use it:

"Meta's new thread backend was written by cinder which is based on python 3.10."
Follow! ๐Ÿ‘๐Ÿ‘๐Ÿ‘

ashwinvis,
@ashwinvis@mastodon.acc.sunet.se avatar

@mo8it
Ah yet another Python rant with obvious disregards to its solutions (gradual typing, JIT, extensions). I am curious why the author wrote the opposite view, also where the research is quite mediocre.

https://josvisser.substack.com/p/why-python-is-amazing

I will comment on one detail from the original blog post.

> "But Python is great as glue code for other libraries". No, it is not. It's not great, it's there!

Yes, it is there and it is what powers a great ecosystem of libraries.

https://numpy.org/doc/stable/user/c-info.python-as-glue.html

1/2

ashwinvis,
@ashwinvis@mastodon.acc.sunet.se avatar

@mo8it
Let's face it, language design is hard and designing great API and libraries are perhaps even harder.

Not many languages can fill in the shoes of being readable, general purpose, allowing rapid prototyping, interoperable (with Cuda, Rust, C, C++, Fortran, Lua, Julia etc). Rust can be readable and interoperable, but evcxr (a REPL that I know) for Rust is anything but rapid. Julia perhaps comes closest, but it is not exactly general purpose (yet).

2/2

ashwinvis,
@ashwinvis@mastodon.acc.sunet.se avatar

@mo8it
I will take a look.

I wanted to keep it short, and yes it is not always about just perf. Ease of reading and refactoring the code is where Python mostly wins. For long living codes, where the behaviour and specification never changes, I would never recommend Python.

For serious Python codes my solution is to use mypy and pytest to analyze internal calls and assertions at the edge (both in & out). Scaling: often CPU/IO bound parts are a small part and should be solved using extensions.

ashwinvis,
@ashwinvis@mastodon.acc.sunet.se avatar

@mo8it
People are afraid to touch codebases when there are no tests - which unfortunately is very common, both in academia and industry. I think this would be no different even in static languages.

I have refactored plenty, swapped libraries and it is a breeze. But always tests first, refactor later. Also modern IDEs make this easy. I am curious what pain points you faced.

ashwinvis, to random
@ashwinvis@mastodon.acc.sunet.se avatar
ashwinvis,
@ashwinvis@mastodon.acc.sunet.se avatar

@nlovsund
I have no clue. Let's ask them.

@ONLYOFFICE how can you make your sources private when your app is AGPLv3 licensed?

AlSweigart, to random
@AlSweigart@mastodon.social avatar

deleted_by_author

  • Loading...
  • ashwinvis,
    @ashwinvis@mastodon.acc.sunet.se avatar

    @AlSweigart
    Correct me if I am wrong, but isn't a Pandas Dataframe (or Dask or Polars) an equivalent to an in-memory database?

    ashwinvis, to linux
    @ashwinvis@mastodon.acc.sunet.se avatar

    Is #NewsFlash the only #RSS / #Atom feed reader / aggregator with a builtin web scraper?

    #linux

    ashwinvis, to vim
    @ashwinvis@mastodon.acc.sunet.se avatar

    I like mixing the keyboard and mouse. Yes I know

    set mouse=a

    exists, but it provides only some basic actions. I was wondering if you could map the mouse to allow moving split window panes around - something which is painful to do by keyboard. Do you know of something like this?

    @vim @neovim

    ashwinvis, to reddit
    @ashwinvis@mastodon.acc.sunet.se avatar

    Apparently running #shreddit can get you banned too. No use talking to the mods (or are they? could be staff in disguise). Well, I don't care for this anyway, I am done volunteering for #reddit.

    ashwinvis, to random
    @ashwinvis@mastodon.acc.sunet.se avatar

    SMHI Skywatcher.

    ashwinvis, to random
    @ashwinvis@mastodon.acc.sunet.se avatar

    I can't help but notice contrast between the resources deployed to rescue Ocean Titan submersible passengers, and the resources deployed to subvert and discourage the rescue of refugees crossing the Mediterranean to Europe. :blobcatthink:

    I agree, it is not a fair comparison, since these happened in different places, and all lives are important. While both incidents had sufficient international news coverage, such different reactions

    ashwinvis, to reddit
    @ashwinvis@mastodon.acc.sunet.se avatar

    Was thinking about #Reddit alternatives in the morning. The ones that are here are #Lemmy and #Kbin. Both are mostly fine technically. The list of instances and the community is also growing as of now. Until now the space was kind of empty.

    I wonder if someone had thought of creating a Reddit-like alternate frontend for #Mastodon where you see only the posts from the hashtags you follow and what is trending. It should be possible right?

    ashwinvis, to reddit
    @ashwinvis@mastodon.acc.sunet.se avatar

    Gotta #shreddit before it is too late. they say. Requested a GDPR export to start with. Time to erase ~10 years of #Reddit history.

    ashwinvis, to random
    @ashwinvis@mastodon.acc.sunet.se avatar

    Fediverse looked silly while spewing misinformed slander against #Matrix and #Element. Of course they are and should sell instance hosting to government entities. I think that is a good thing. Helps them, protects information, funds development.

    If that is a no go, what should govt do: use M$ Teams, risking sensitive information in proprietary systems?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines