[-] thingsiplay@beehaw.org 8 points 20 hours ago

I use Thunderbird for a decade, not sure maybe less, but it feels like a long time. I use Thunderbird exclusively for mail. But feels like this is the wrong place to ask, isn't it?

Also Thunderbird is Mozilla's most successful product. Meaning it is self sustainable.

[-] thingsiplay@beehaw.org 1 points 21 hours ago

Thank you, I take it.

[-] thingsiplay@beehaw.org 3 points 2 days ago

It's not GUI, but I want to mention another alternative, as people mention commandline applications here too: kdotool, works under KDE Wayland without with normal user rights (no root). They still work on a few features, but it can do lot of windowing stuff already. A good addition to ydotool.

[-] thingsiplay@beehaw.org 5 points 2 days ago

Can't wait for a new Brodie-video on this topic. Stay tuned for some comments.

[-] thingsiplay@beehaw.org 2 points 2 days ago

I had recently same issue, but with a different game. Out of nowhere the performance was bad. And it took me even a day to resolve this. My PC does not need power profiles actually, its not a laptop at all. Not sure why or how the profile changed, but it got me from say 100 fps to stutter-fest 17 or something like that. I think that there was a key combination in KDE I hit by accident maybe.

[-] thingsiplay@beehaw.org 0 points 3 days ago

You don't need to understand a command in order to copy paste an alias or Bash function. Especially newcomers could tend to do it, without knowing what the command actually does. We are also in a posting with helpful commands, so its double harmful. And you doubling down without adding any sort of disclaimer shows you don't care.

[-] thingsiplay@beehaw.org 2 points 4 days ago

There is an expression, Linux isn't free it costs you your time.

Just because someone said it does not make it true and certainly, I don't have to live after that expression. It kind of is a catch all phrase to justify (or not to justify) everything. It could also be used as an argument for "Vibe Coding" (I hate that term...).

I mean this argument about Linux does not apply to every single application (you apply it right now here to some random Python script). In example Windows, MacOS, Android, nothing is free and costs you your time. The question is, how you want spent your time. And I enjoy writing programs and scripts for various reasons.

I personally think reinventing the wheel is great. Why? It makes you learn and do it. It makes you less dependent. The end result might not be the most polished one, but also if nobody reinvents the wheel, then we have no competition. Sure you should not reinvent everything, there is a balance act to make. And this balance is different for everyone else.

[-] thingsiplay@beehaw.org 2 points 4 days ago

BTW, I'm not saying the way I am going and doing this is the right one. In the end I use additional packages when needed, BeautifulSoup as an example to make life really easier. But that is something specific to that script. Stuff like click and argparse is more than a single script, because when I switch to click then all my future scripts would depend on it. And I feel more comfortable with a solution that is already built-in (stdlib) if its not too bad.

I don't see click as a required package that I really need. And that is also true for many other packages, such as requests one.

[-] thingsiplay@beehaw.org 9 points 4 days ago

Lemmy is a far better platform for discussions than Discourse in my opinion. The tree like sub-reply threads in each post (the Reddit concept) is preferable over a single thread of replies. You don't need to cross quote and for readers no need to read the quote to see who and to what the reply is about. I don't like Discourse discussion platforms at all.

However, Discourse has a few features that fits well for a discussion platform. I like the tags and Trust system of it.

[-] thingsiplay@beehaw.org 2 points 6 days ago

I use external packages for compiled languages. For scripting languages like Python, it makes it ab it harder to use. Because people are forced to install dependencies. I don't like that (unless its a shell script, but that is by its nature a dependency hell).

And for Python, I usually deliver the script as a single .py file, without requirements or special instructions, no typical file structure as well. And your argument just because other popular packages use a specific library does not mean I have to use it too. I don't care what libraries other popular packages use, at least in context to my program / script.

[-] thingsiplay@beehaw.org 4 points 6 days ago

There is one in the works right now: https://www.nexusmods.com/app

The only problem is, there are just 2 games supported at the moment; Stardew Valley and Cyberpunk 2077. Many more will follow, but it takes time. And updates can break your current setup, because its heavy on working and changes. So this is more of a future thing. I myself wait for this right now.

12

Example script: https://gist.github.com/thingsiplay/ae9a26322cd5830e52b036ab411afd1f

Hi all. I just wanted to share a way to handle a so called advanced help menu, where additional options are listed that are otherwise hidden with regular help. Hidden options should still function. This is just to have less clutter in normal view.

I've researched the web to see how people does it, and this is the way I like most so far. If you think this is problematic, please share your thoughts. This is for a commandline terminal application, that could also be automated through a script.

How it works on a high level

Before the ArgumentParser() is called, we check the sys.argv for the trigger option --advanced-help. Depending on this we set a variable to true or false. Then with the setup of the parser after the ArgumenParser() call, we add the --advanced-help option to the list of regular help.

advanced_help = False
for arg in sys.argv:
    if arg == "--":
        break
    if arg == "--advanced-help":
        advanced_help = True

parser = argparse.ArgumentParser()

Continue setting up your options as usual. But for the help description of those you want to exclude when using just regular -h, add an inline if else statement (ternary statement). This statement will put the help description only if advanced_help variable is true, otherwise it puts argparse.SUPPRESS to hide the option. Do this with all the options you want to hide.

parser.add_argument(
    "-c",
    "--count",
    action="store_true",
    default=False,
    help="print only a count of matching items per list, output file unaffected"
    if advanced_help
    else argparse.SUPPRESS,
)

At last we need to actually parse what you just setup. For this we need to assign our custom list, that is based on the sys.argv, plus the regular --help option. This way we can use --advanced-help without the need for -h or --help in addition to show any help message.

if advanced_help:
    args = parser.parse_args(sys.argv[0:0] + ["--help"] + sys.argv[1:])
else:
    args = parser.parse_args()

Run following program once with ./thing.py -h and ./thing.py --advanced-help.

27

Watch on YouTube: https://youtu.be/_Pqfjer8-O4

Watch on SkipVids: https://skipvids.com/?v=_Pqfjer8-O4 (watch YouTube without using YouTube directly, and without ads)

Video Description:


Inside your smartphone, there are billions of transistors, but have you ever wondered how they actually work and how they can be combined to perform tasks like multiplying two numbers together? One rather interesting thing is that transistors are a lot like Lego Bricks assembled together to build a massive Lego set, which we’ll explore further. In this video, we dive into the nanoscopic world of transistors. First, we'll see how an individual transistor works, then we’ll see how they are connected together and organized into logic gates such as an inverter or an AND gate. Finally, we’ll see how logic gates are connected together into large Macrocells capable of performing arithmetic.

Table of Contents:

00:00 - Inside your Desktop Computer
00:26 - Transistors are like Lego Pieces
01:09 - Lego Bricks vs Transistors and Standard Cells
02:12 - Examining the Inverter Standard Cell 
03:24 - How do Basic Transistors work?
09:09 - Schematic for an Inverter Standard Cell
10:45 - Exploring the Macrocell 
13:20 - Conceptualizing how a CPU Works
15:11 - Brilliant Sponsorship
16:55 - The NAND Standard Cell
20:35 - A Surprisingly Hard Script to Write 
21:42 - The AND Standard Cell
23:16 - The Exclusive OR Standard Cell
23:54 - CMOS Circuit
24:27 - Understanding Picoseconds
25:51 - Special Thank You and Outro  
8
submitted 1 week ago* (last edited 1 week ago) by thingsiplay@beehaw.org to c/programming@programming.dev

I desperately need some Python help. In short, i want to use multiple keys at once for sorting a dictionary. I have a list of keys and don't know how to convert it to the required list.

This is a single key. The self.items is a list of dictionaries, where d[key] is resolved to the actual key name such as "core_name", that the list is then sorted as. This works as expected for single sort, but not for multiple.

key = "core_name"
self.items = sorted(self.items, key=lambda d: d[key])
key = "label"
self.items = sorted(self.items, key=lambda d: d[key])

Problem is, sorting it multiple times gives me wrong results. The keys need to be called in one go. I can do that manually like this:

self.items = sorted(self.items, key=lambda d: (d["core_name"], d["label"]))

But need it programmatically to assign a list of keys. The following does not work (obviously). I don't know how to convert this into the required form:

# Not working!
keys = ["core_name", "label"]
self.items = sorted(self.items, key=lambda d: d[keys])

I somehow need something like a map function I guess? Something that d[keys] is replaced by "convert each key in keys into a list of d[key]". This is needed inside the lambda, because the key/value pair is dynamically read from self.items.

Is it understandable what I try to do? Has anyone an idea?


Edit: Solution by Fred: https://beehaw.org/post/20656674/4826725

Just use comprehension and create a tuple in place: sorted(items, key=lambda d: tuple(d[k] for k in keys))

9
submitted 1 week ago* (last edited 1 week ago) by thingsiplay@beehaw.org to c/linux@lemmy.ml

Regular call to fzf, but output the index number of the selected entry, instead the text itself. It's a pretty niche use case, but there was a few times in the past when I needed it. You can use options for fzf just normally too.

fzn() {
    nl | fzf --with-nth 2.. "${@}" | awk '{print $1}'
}

Usage:

find . -maxdepth 1 -type d | fzn -e -m

I always forget how to do this manually, so I made this simple function for Bash. Just copy this like an alias into your .bashrc and use it like any other command in a pipe.

23
submitted 2 weeks ago* (last edited 2 weeks ago) by thingsiplay@beehaw.org to c/linux@lemmy.ml

It only works with the first command in the recorded history, not with any sub shells or chained commands.

#!/usr/bin/env bash

# 1. history and $HISTFILE do not work in scripts. Therefore cat with a direct
#    path is needed.
# 2. awk gets the first part of the command name.
# 3. List is then sorted and duplicate entries are removed.
# 4. type -P will expand command names to paths, similar to which. But it will
#    also expand aliases and functions.
# 5. Final output is then sorted again.

type -P $(cat ~/.bash_history | awk '{print $1}' | sort | uniq) | sort

After reading a blog post, I had this script in mind to see if its possible. This is just for fun and I don't have an actual use for it. Maybe some parts of it might inspire you to do something too. So have fun.

Edit 1:

After some suggestions from the comments, here is a little shorter version. sort | uniq can be replaced by sort -u, as the output of them should be identical in this case (in certain circumstances they can have different effect!). Also someone pointed out my useless cat, as the file can be used directly with awk. And for good reason. :D Enjoy, and thanks for all.

type -P $(awk '{print $1}' ~/.bash_history | sort -u) | sort

I still have no real use case for this one liner, its mainly just for fun.

18

Direct link to the image in the browser: https://cosmos2025.iap.fr/fitsmap/?ra=150.1203188&dec=2.1880050&zoom=2

Article copied:


In the name of open science, the multinational scientific collaboration COSMOS on Thursday has released the data behind the largest map of the universe. Called the COSMOS-Web field, the project, with data collected by the James Webb Space Telescope (JWST), consists of all the imaging and a catalog of nearly 800,000 galaxies spanning nearly all of cosmic time. And it’s been challenging existing notions of the infant universe.

“Our goal was to construct this deep field of space on a physical scale that far exceeded anything that had been done before,” said UC Santa Barbara physics professor Caitlin Casey, who co-leads the COSMOS collaboration with Jeyhan Kartaltepe of the Rochester Institute of Technology. “If you had a printout of the Hubble Ultra Deep Field on a standard piece of paper,” she said, referring to the iconic view of nearly 10,000 galaxies released by NASA in 2004, “our image would be slightly larger than a 13-foot by 13-foot-wide mural, at the same depth. So it’s really strikingly large.” An animated zoom-out from the center of the COSMOS-Web field to a full-size comparison between COSMOS-Web and the Hubble Ultra Deep Field

The COSMOS-Web composite image reaches back about 13.5 billion years; according to NASA, the universe is about 13.8 billion years old, give or take one hundred million years. That covers about 98% of all cosmic time. The objective for the researchers was not just to see some of the most interesting galaxies at the beginning of time but also to see the wider view of cosmic environments that existed during the early universe, during the formation of the first stars, galaxies and black holes.

“The cosmos is organized in dense regions and voids,” Casey explained. “And we wanted to go beyond finding the most distant galaxies; we wanted to get that broader context of where they lived.” A 'big surprise'

And what a cosmic neighborhood it turned out to be. Before JWST turned on, Casey said, she and fellow astronomers made their best predictions about how many more galaxies the space telescope would be able to see, given its 6.5 meter (21 foot) diameter light-collecting primary mirror, about six times larger than Hubble’s 2.4 meter (7 foot, 10 in) diameter mirror. The best measurements from Hubble suggested that galaxies within the first 500 million years would be incredibly rare, she said.

“It makes sense — the Big Bang happens and things take time to gravitationally collapse and form, and for stars to turn on. There’s a timescale associated with that,” Casey explained. “And the big surprise is that with JWST, we see roughly 10 times more galaxies than expected at these incredible distances. We’re also seeing supermassive black holes that are not even visible with Hubble.” And they’re not just seeing more, they’re seeing different types of galaxies and black holes, she added.

“Since the telescope turned on we’ve been wondering ‘Are these JWST datasets breaking the cosmological model? Because the universe was producing too much light too early; it had only about 400 million years to form something like a billion solar masses of stars. We just do not know how to make that happen." 

'Lots of unanswered questions'

While the COSMOS-Web images and catalog answer many questions astronomers have had about the early universe, they also spark more questions.

“Since the telescope turned on we’ve been wondering ‘Are these JWST datasets breaking the cosmological model? Because the universe was producing too much light too early; it had only about 400 million years to form something like a billion solar masses of stars. We just do not know how to make that happen,” Casey said. “So, lots of details to unpack, and lots of unanswered questions.”

In releasing the data to the public, the hope is that other astronomers from all over the world will use it to, among other things, further refine our understanding of how the early universe was populated and how everything evolved to the present day. The dataset may also provide clues to other outstanding mysteries of the cosmos, such as dark matter and physics of the early universe that may be different from what we know today.

“A big part of this project is the democratization of science and making tools and data from the best telescopes accessible to the broader community,” Casey said. The data was made public almost immediately after it was gathered, but only in its raw form, useful only to those with the specialized technical knowledge and the supercomputer access to process and interpret it. The COSMOS collaboration has worked tirelessly for the past two years to convert raw data into broadly usable images and catalogs. In creating these products and releasing them, the researchers hope that even undergraduate astronomers could dig into the material and learn something new.

“Because the best science is really done when everyone thinks about the same data set differently,” Casey said. “It’s not just for one group of people to figure out the mysteries.” Image Caitlin Casey wears a puffy coat in front of a lake Photo Credit Courtesy Photo Caitlin Casey

Caitlin Casey is an observational astronomer with expertise in high-redshift galaxies. She uses the most massive and unusual galaxies at early times to test fundamental properties of galaxy assembly (including their gas, stars, and dust) within a ΛCDM cosmological framework. Read more

For the COSMOS collaboration, the exploration continues. They’ve headed back to the deep field to further map and study it.

“We have more data collection coming up,” she said. “We think we have identified the earliest galaxies in the image, but we need to verify that.” To do so, they’ll be using spectroscopy, which breaks up light from galaxies into a prism, to confirm the distance of these sources (more distant = older). “As a byproduct,” Casey added, “we’ll get to understand the interstellar chemistry in these systems through tracing nitrogen, carbon and oxygen. There’s a lot left to learn and we’re just beginning to scratch the surface.”

The COSMOS-Web image is available to browse interactively ; the accompanying scientific papers have been submitted to the Astrophysical Journal and Astronomy & Astrophysics.

1
submitted 4 weeks ago by thingsiplay@beehaw.org to c/gaming@lemmy.ml

I like listening to oldschool videogame music. Recently I listened to some music of games I never played and one song in particular blew my mind. Its wonderful and since it lives rent free in my head, coming back to it over and over again. I'm loving it.

Listen on:

"Sacred Somnom Woods" in Mario & Luigi - Dream Team for the Nintendo 3DS. The composer is the well known Yoko Shimomura, also known for work on Street Fighter 2, Kingdom Hearts and many more legendary games.

To me this track has this Breath of the Wild or Tears of the Kingdom vibes to it. Because I did not play the actual Mario & Luigi games, I always interpret this as a Zelda song now. Its name does contribute to this factor too! Do you also have sometimes game music that captures you?

20
submitted 1 month ago by thingsiplay@beehaw.org to c/gaming@beehaw.org

cross-posted from: https://beehaw.org/post/20234081

2 days ago I made a post that the game would not run on a Linux desktop PC (but it would on the Steam Deck). 10 hours ago they released an update that resolves this issue and makes the game run through Proton on a Linux desktop PC.

- The Beta now supports players on Linux thru Proton

I can confirm it does run and I just did the short tutorial. I still have to play more, but wanted to inform anyone who is interested into the game.

38

2 days ago I made a post that the game would not run on a Linux desktop PC (but it would on the Steam Deck). 10 hours ago they released an update that resolves this issue and makes the game run through Proton on a Linux desktop PC.

- The Beta now supports players on Linux thru Proton

I can confirm it does run and I just did the short tutorial. I still have to play more, but wanted to inform anyone who is interested into the game.

47

I want to share some thoughts that I had recently about YouTube spam comments. We all know these early bots in the YouTube comment section, with those "misleading" profile pictures and obvious bot like comments. Those comments are often either random about any topic or copied from other users.

OK, why am I telling you that? Well, I think these bots are there to be recognized as bots. Their job is to be seen as a bot and be deleted and ignored. In that case everyone feels safe, thinking all bots are now deleted. But in reality there are more sophisticated bots under us. So the easy bots job is to get delete and basically mislead us, so we don't think that any is left, because they are deleted.

What do you think? Sounds plausible, doesn't it? Or do I have paranoia? :D

47

Splitgate 2 opened the public beta since today or yesterday. Unfortunately the game does not run on desktop PC with a Linux operating system. Others have the same problem.

But whats weird is, people claim it works on Steam Deck and even the official blog post from the devs says they support the Steam Deck. There is no word about general Linux desktops.

So does the developers treat the Steam Deck like a console and make their games not playable on general purpose Linux desktops? Its weird, because otherwise it is playable on a general desktop with Windows too. Even the previous game Splitgate 1 (which they shut off) worked on desktop Linux. It makes no sense!

I'm totally disappointed right now. Because I was excited for this game. It got some hero abilities (I like that) and even a map creator.

12
submitted 1 month ago by thingsiplay@beehaw.org to c/gaming@lemmy.ml

Alternative link: https://skipvids.com/?v=BA_HMsznNKg (Ad-free and does not use YouTube directly)

Technical explanation of why almost all Nintendo 64 games looked so blurry. Kaze Emanuar is an expert in this field and does lot of Romhacks and Mods and creates his own Super Mario 64 games with it. So he is quiet knowledgeable.

Note: I recommend watching the video at 1.4x speed, or at the very minimum at 1.25x speed.

view more: next ›

thingsiplay

joined 2 years ago