13
submitted 4 hours ago by [email protected] to c/[email protected]

Watch on SkipVid platform, alternative to YouTube client watching YouTube videos indirectly, but without ads: https://skipvids.com/?v=-cTsFt-j7rk


I just found this creator who is super excited about the new Bash version. He goes through some aspects of the new changes and features. There is something funny about a guy getting so excited about a new Bash version, that I wanted to share it because of that. :D

Also its nice to see the changes in action and have an explanation from someone who (seemingly) knows what he is doing.

Video (partial) description:


Source Code: github.com/bahamas10/bash-changes

$ whoami Yo what's up everyone my name's dave and you suck at programming! Connect with me on my socials below and if you're reading this you're legally required to subscribe to my channel.

$ cat source-code The source code for my YSAP series (or related videos) is available for free under the MIT License on GitHub: Source Code → github.com/bahamas10/ysap

[-] [email protected] 2 points 8 hours ago

I buy and play games on sales most of the time. So its not the newest hot shit I get. Especially cool with Steam sales. There are even "blockbuster" titles I would never buy for fullprice as a 75% sale in example. Suddenly those titles come in range of an indie price and that's affordable to me. And yes I buy and play indie games too. They do not have an issue with pricing usually and often they are even self contained games without micro transactions, at least most of them.

[-] [email protected] 1 points 8 hours ago

It should cost "enough". What do I mean by that? It depends. Literally. Also the (money-) cost of after purchasing a game is important too, with DLCs and micro transactions as well. And if you just "rent" a game as service (multi player only in example) or if its a single player game that you can keep and is not dependent on servers. Besides downloading the game off course.

That's why I don't like generalizations at all. This is a bit more complex to answer than it seems. I genuinely think there are games or may come out in the future, which might be worse the 80 Dollars or Euros. Others not so much. A game should cost as much as it is worth it. And that upper limit is only defined by the game itself (and whats available otherwise too off course, that is not simple).

[-] [email protected] 14 points 3 days ago

The difference is:

  • robots.txt is a promise without a door
  • Anubis is a physical closed door, that opens up after some time
[-] [email protected] 5 points 3 days ago

The quoted image does not say so, they do not say the native packaging from your distribution is borderline unusable. That judgement was added by YOU. The devs just state the package on Archlinux is not officially supported, without making a judgement (at least in the quoted image).

As for the Fedora issue, that is a completely different thing. That is also Flatpak, so its not the package format itself the issue. Fedora did package the application in Flatpak their own way and presented it as the official product. That is a complete different issue! That has nothing to do with Archlinux packaging their own native format. Archlinux never said or presented it as the official package either and it does not look like the official Flatpak version.

So where does the developers say that anything that is not their official Flatpak package is "borderline unusable"?

[-] [email protected] 3 points 3 days ago

And then there is software like OBS, which is known for being borderline unusable when not using the only officially supported way to use it on Linux outside of Ubuntu – which is Flatpak.

But why is that? I mean just because it is packaged by someone else does not mean its unusable. So its not the package formats issue, but your distribution packaging it wrong. Right? In installed the Flatpak version, because they developers recommended it to me. I'm not sure why the Archlinux package should be unusable (and I don't want to mess around with it, because I don't know what part is unusable).

[-] [email protected] 11 points 3 days ago

Those mystical average people would probably stay on Windows, if they don't care or cannot learn basics of other systems. Its really not hard to explain and understand, even for "average person" that there is an universal source for applications and there are packages designed and managed by your operating system. I think its important for people to learn basics and we should teach them, not dumb them down like on Windows. Soon people won't be able to eat themselves anymore...

[-] [email protected] 19 points 3 days ago

Flatpak have their own set of issues. One thing is, that Flatpak applications do not integrate that easily and perfect like a native package. Either rights are to given, you need to know what rights are needed and how to set it up. Theming can be an issue, because it uses its own libraries in the Flatpak eco system instead your current distributions theme and desktop environment.

But on the other hand, they have actually a permission system and are a little bit sandbox compared to normal applications. Packages often are distributed quickly and are up to date directly from the developers, and usually are not installed with root rights.

I'm pretty much a CLI guy as well and prefer native packages (Arch based, plus the AUR). But I also use Flatpaks for various reasons, alongside with AppImages.

[-] [email protected] 1 points 4 days ago

I like get triggered. This reminds me that I'm alive.

[-] [email protected] 7 points 4 days ago

I think before this happens, a company would purchase Oracle, because all the tech they have. Oracle has a lot of enterprise and database stuff that I'm not familiar with. The only thing that counts to me is Java. So which companies has the money and knowledge and interest to buy Java rights?

I'm not sure if this would be a good idea, but I can see Google to buy Java. The Android system is based on Java and they need the stability of the rights to not get in conflict with Oracle or any other company again. Also this would give Java some better development I guess.

[-] [email protected] 25 points 4 days ago

Beyond raw horsepower, 7-Zip quietly tightens its handling of several legacy formats. Support for ZIP, CcPIO, and FAT archives has been refined, smoothing edge-case extractions that previously required third-party tools.

Over the years there was a few .zip archives that 7z could not handle for whatever reason. For these cases I had to use another application, but don't know the reason. And my bad to not keeping copies of these files for future testing.

[-] [email protected] 6 points 5 days ago
[-] [email protected] 2 points 5 days ago

This is a really good introduction.

12
submitted 2 weeks ago by [email protected] to c/[email protected]

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
submitted 2 weeks ago by [email protected] to c/[email protected]

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 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]

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 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]

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 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]

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
submitted 4 weeks ago by [email protected] to c/[email protected]

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 1 month ago by [email protected] to c/[email protected]

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 [email protected] to c/[email protected]

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
submitted 1 month ago by [email protected] to c/[email protected]

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.

46
submitted 1 month ago by [email protected] to c/[email protected]

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

46
submitted 1 month ago by [email protected] to c/[email protected]

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.

view more: next ›

thingsiplay

0 post score
0 comment score
joined 2 years ago