Spyke

Replies

Comment on

Should we clone reddit posts?

I don't like the idea. It seems like those fake websites that scrape stackoverflow and SEO to ruin Google search. Avoiding those sites are among the reasons people type "reddit" into searches. People want authentic interactions and I think mirroring reddit into Fediverse lacks authenticity and undermines its authenticity. Content here should be from people who are here.

If someone wants to assimilate content from reddit into something new and post it here that's good. That means the person is here and can be interacted with.

If someone wants to repost their own content here, that's also fine. They are here to interact with.

I just really think it's a bad idea to deliberately build a ghost town and think people will move in.

auai

Comment on

AI cracks superbug problem in two days that took scientists years - BBC News

Reply in thread

This is the what really matters here IMHO:

"It's not just that the top hypothesis they provide was the right one," he said.

"It's that they provide another four, and all of them made sense.

"And for one of them, we never thought about it, and we're now working on that."

Plausible hypothesis generation is really helpful and if it hadn't even occured to them it either means it came from someone else's work that they had been unable to understand, distill or anticipate from their own knowledge of what others are doing in the field or that it is actually novel (in the way that all science is small progress building on the blocks of others).

Either way hypothesis generation saves a lot of time and gave their lab a new idea.

Comment on

the API changes occur tomorrow, gentlemen, it's been an honor (inb4 Lemmy completely crashes)

Reply in thread

Well, he is going to try to make a subscription Infinity.

But I've already moved on to RedReader because the dev is fully on my wavelength. He got the accessibility exception and continues to openly trash Reddit in a very gentlemanly, polite way. His goal now is to diversify the app to non-Reddit sites before Reddit doesn't need him as a PR shield. Hopefully he's able to add Lemmy and kbin support soon.

The RedReader app's use of menus is... slightly different than apps I have used in the past but it has sort of grown on me. It has a, "yeah I can see why Stephan Hawking would have used this sort of thing" vibe, but at the same time it's actually not tedious or difficult to use once you get the hang of it.

linux

Comment on

GNU Octave 10.2.0 Released

Reply in thread

For one thing it will run a lot of existing and proven Matlab code.

Another is that Octave and Matlab syntax is ambiguous about functions vs indexes (has pros and cons).

And don't get me wrong (I use jupyter and python a lot and really do like it) but numpy can get fundamentally weird in the way indexing maps to memory in ways that I don't remember happening back when I mostly used Octave.

And for the record Octave's version of the language is vastly superior to Matlab's. (Octave has chained indexing, broadcasting, etc. It could be that Matlab has finally copied those features but dunno. Every time I have to work in actual Matlab I want to rip my hair and teeth out due to lack of these basic trivial syntax features)

For me the major advantage of python is having access to other non-numerical things. It's so difficult to do anything not-numerics in Octave and Matlab or to use even basic data structures like lists and trees. Python is sort of a basic dynamic object language that with some functional programming idioms mixed in that makes some of the things that would otherwise make you scream for Lisp possible. That's worth the numpy annoyances. Otherwise I would probably be using julia.

python

Comment on

Program hangs instead of exiting

Nothing really sticks out. It could also be something about how the automated checker provides input (maybe it expects to not press enter or something and it's stuck at input()... hard to say)

I personally would install ruff and run "ruff check yourfile.py" and then later "ruff check --select=ALL yourfile.py" and read about everything it complains about.

Google the error codes and find the description and discussion of each and why it is complaining, sometimes they're not a big deal, sometimes they are aha moments. Ruff has a page discussing each warning and error

https://docs.astral.sh/ruff/rules/

Comment on

Recommended data visualization library? ggplot or matplotlib?

For the types of visualizations you're describing, the choice probably won't matter. I view matplotlib as "matlab flavor" and ggplot2 as "R flavor". For R-type work (a certain type of table-based stats) I just use R.

For matlab type work (image processing, simulations, etc) I now use matplotlib. This is mostly numpy/scipy things rather than... pandas things. Python is interesting because it has things that are beyond matplotlib (VTK, etc) and beyond matlab. Typically when you're prototyping in matlab you're assuming you will have to rewrite in a different system eventually, but with python you can move the prototype further down to more polished prototype easily.

I do a lot of image processing and am too familiar with matlab, so matplotlib generally came naturally for translating that prior knowledge. So really it depends on what sorts of things you are familiar with, languages you use, and would want to do in the future. I think with either choice you will eventually hit some wall of difficulty.

There are also more visualization and plot focused things (TeX family or PostScript and PDF) as well as the "processing" language.

I use R for... not-image-type analysis stats and generate plots in R using R's plotting. I mostly use python for matlab-type things and matplotlib seems more natural for that.

Julia is on my todo-list and I have heard good things about their plotting ecosystem but I have not looked into it.

Incidentally VTK is extremely well designed for the type of language it's based on and the problems its solving... but that's not really 2D plotting.

python

Comment on

The first year of free-threaded Python

Reply in thread

It would be similar hell in for example Matlab or C/C++ if install of external packages were made so easy.

Some systems that are designed more with the concept of maintenance challenges (Windows and others) make it possible to have different versions installed simultaneously.

The need for the whole venv thing fundamentally underscores the problem. How many versions of libc do you have installed simultaneously? (docker users pls don't respond)

python

Comment on

Program hangs instead of exiting

Reply in thread

Actually I think it may be your get_entry() code. The try traps all non-numbers and restarts the loop for new entry. So like typing "exit" or an empty string or anything that's not convertible to a number is being trapped by the raise and sent back for reentry. And anything that is a number can't hit the break. Just my guess.

Comment on

Recommended data visualization library? ggplot or matplotlib?

Reply in thread

Just about everything is modifiable in matplotlib... It may not be easy, but all plotting libraries are designed to make some things easy at the expense of making other tasks more difficult. For matplotlib you just have to think about things the way matlab thinks about things... which is more computer graphics based. It can get ugly until you understand it. But if you understand how any plotting library actually works it's not that bad. All plotting libraries ultimately are built on graphical primitives like lines and fonts and triangles and patches computing where things belong by transforming coordinates and feeding them to a layout engine. It's not as magical as the APIs make them seem. So if you're willing to dig into their bowels (as OP mentions) there really aren't any many limits. Sometimes it's actually easiest to just declare a canvas in memory and draw it all by hand. Ultimately, things are either vector or raster formats (or some abstraction that supports both) and fed into some computer graphics engine (like postscript or some OS's or GPU canvas).

Anyway, sometimes the easiest answer is you export and edit the labels in the final figure. One really nasty way if you don't have PS or PDF tools is to sidetrack through Windows EMF and mess with fonts and positioning of text in PowerPoint.