ai6yr, to random

It appears people no longer know how to operate one of these. Absolutely no one knows what it is anymore (probably for the last 5 years).

ai6yr, (edited ) to random

Mystery object of the day. Not sure if this is for photography (filter of some sort?);or audio (pop screen?). UFO (Unidentified Found Object) -- UPDATE: Mystery (already) solved -- pop filter for a microphone. Well... part of one. (see https://infosec.exchange/@dko/112203637956510198)

christof, to python
@christof@fedihum.org avatar

So far, I really like the (relatively) new -oriented interface for , one of my favorite libraries in .

It feels much cleaner, more logical, more compact, and there is indeed less need to go down to for many tweaks to a plot.

Documentation here: https://seaborn.pydata.org/tutorial/objects_interface.html

Code and result for a very simple bar chart example below. Quite compact and very clean.

Barplot resulting from the code shown in the first image. Six light blue bars of differing height. Most prevalent number of co-editors is 2, with 37.9 percent.

skimlines, to python

Learned about
stringA = stringB[:] tonight from a textbook

cazabon,

@skimlines @cs

It's fine for - but it's not the most "" way to do this, at least for lists. Like some other built-in objects, lists have a method .copy() which does what it says - returns a of the . That's more obvious than using ...[:] when reading the code, so that tends to be the preferred way in Python.

Unfortunately, don't have .copy(). They do support [:]. 🤷

[...]

NEETzsche, to random
@NEETzsche@iddqd.social avatar

We need a visibility rating between unlisted and private that doesn’t show up on any timelines at all but can be viewable on your profile by anybody.

This would be used for anti-hellthreading purposes. Right now, my fork of Soapbox marks all replies as unlisted so that if a hellthread emerges, it doesn’t clog up everybody’s public timelines with garbage. But unlisted still shows up on personal timelines, like if you follow one of us.

Having a visibility between that doesn’t show up in any timelines at all but also isn’t exactly hidden could prove useful as an anti-hellthreading method. This is meant as brainstorming

cc @hj @lain

Moon,
@Moon@shitposter.club avatar

@NEETzsche @lain @hj example 10 doesn't define any additional fields, if you extend a type. I am reading 4.1 here and my understanding is that defining your type context if you extend a type is a "must" condition

https://www.w3.org/TR/activitystreams-core/#object

Rasta, to random
@Rasta@mstdn.ca avatar

I was just checking in on you..

I think I had my best sleep in weeks. It wasn't solid, but I fell back to sleep, after a trip to the bathroom downstairs, that never happens. So, around 5am, I got up.

Still a sky full of stars though. Sunrise is two coffees away.

I was thinking of something, I'm curious about what you think?

You see a strange piece of plastic on the desk. How long before you guess what it is?

Shunkleburger, to architecture
arda, to programming
@arda@micro.arda.pw avatar

Brain gymnastics: Which approach would work faster? And why?

jwildeboer, to unpopularopinion
@jwildeboer@social.wildeboer.net avatar

I don't like instances that allow far more than 500 characters per toot. is not a blog platform. I tend to just scroll over posts that are too long. I didn't come here to read long texts. I think that toots should be short messages. With links if need to more persistent and retrievable content. Toots are meant to be more like short-lived status updates. Which is why I auto delete toots after a few days, unless they get traction.

voxpelli,
@voxpelli@mastodon.social avatar

@evan @jwildeboer That's a good improvement over JSON AS 1.0 then, but not very clearly defined in eg: https://www.w3.org/TR/activitystreams-core/#object

The ”type” property itself seems to not be very explicitly defined but rather implicitly through the rest of the text? Or is it a JSON-LD attribute?

The spec seems to suggest it should be [”Like”, ”Flattr”] as well

reiver,
@reiver@mastodon.social avatar

@jwildeboer @tchambers

In ActivityPub's ActivityStreams vocabulary —

There are a bunch of different object-types.

https://www.w3.org/TR/activitystreams-vocabulary/#object-types

• Article
• Audio
• Document
• Event
• Image
• Note
• Page
• Place
• Profile
• Relationship
• Tombstone
• Video

Object-Type "Note" is what is meant for toots — for short written works.

But object-type "Article" is for multi-paragraph written works — which I think would fit a blog post.

.

funhouseradio, to Meme
@funhouseradio@mastodon.world avatar
AugierLe42e, to python French
@AugierLe42e@diaspodon.fr avatar

I remerber a for proposing to add a constant to marking this absence of value for a parameter in a function call. This would fix cases where None is a valid value.

But I can't find this PEP. Does someone else remeber this?

cazabon,

@AugierLe42e

We don't actually need a special constant for this; this is a pretty standard Python :

NOT_SET = object()

def f(a: int, b: int = NOT_SET):
if b is NOT_SET:

function called without second argument

...

NOT_SET is a bare object, which will never compare equal to anything else, and is a singleton so the natural test is . It absolutely distinguishes between "no argument" and "caller happened to pass the value ".

cenbe, to python
@cenbe@mastodon.sdf.org avatar

Just learning ... it doesn't have constants? Really? And you're supposed to simulate them by using a naming convention? You're kidding me, right?

cazabon,

@cenbe

Not sure exactly what you're getting at; there are various approaches. If you want , use the enum module/base class, and you can have constants of any flavour you like, protected from assignment. It's in the standard library and highly recommended.

If, on the other hand, you're trying to protect the user from themselves, you can create an that represents a but which resists changing value - but you can't prevent the user assigning to a name.

[...]

edsuom, to python
@edsuom@hachyderm.io avatar

Does anyone else use the first person for docstrings? I picked this up from reading source written by @glyph and @itamarst. My dialect of it: The is speaking about itself. It refers often to "my " or "an instance of me" when speaking of an rather than itself as a class. And methods are where it says "I do this" if that's what it does generally, like a leader speaking about what she did with the unspoken help of others carrying out that actual work.

foo, to til
@foo@fosstodon.org avatar

in :

a = a[0] = [[]]

This results in "a" being a list with one item, itself. Thankfully the repr recognizes this as being an infinite recursion:

>>> a
[[...]]
>>> a[0]
[[...]]

So a[0] is in a, obviously?

>>> a[0] in a
True

But what about...

>>> a in a[0]
True

The "payload" is "[[]]" here for prettiness, but just needs to be a list of something, and could easily be "['foo']". But, philosophically, does 'foo' exist in the list? There's no way to "reach" it once evaluated...

cazabon,

@foo

It's a little what's going on here if you put it this way:

>>> b = []
>>> b.append(b)
>>> b
[[...]]
>>> b is b[0]
True

So all you've done is create a , and then (not extend) that list to itself. Since a and a[0] are the same , the in test will return True either way.

0xtero, to AskKbin in What is Kbin’s identity?
0xtero avatar

For consistency,

Threads should be renamed to "Articles"
Microblog should be renamed to "Posts".

As for Kbin identity - well.. I guess it's a "user interface to fediverse".

Fediverse, in turn, is a sprawling network that publishes and makes different types of ActivityPub objects available to users.

Kbin has tools to work and interact with some of those object types.

flancian, to fediverse
@flancian@social.coop avatar

Is there a [[fediverse matrix]] available summarizing what each server will do with each of the common object types?

https://www.w3.org/TR/activitystreams-vocabulary/#object-types

Meaning: which ones it will produce, which ones it will render fully, which ones it will render in degraded mode, and which ones it will ignore altogether?

spaceflight, to space
@spaceflight@techhub.social avatar

📆 May 2021 "The known of damage caused by came as early as 📆 1969. An had fallen from and hit a that was traveling off the of , five crewmen. initially kept that a 🕵️, out of a desire to avoid provoking a conflict with " https://www.washingtonpost.com/world/2021/05/08/space-debris-crashes

Picture (symbolic) :cc_zero: https://commons.wikimedia.org/wiki/File:The_Royal_Navy_during_the_Second_World_War_A13656.jpg

hywan, to rust
@hywan@fosstodon.org avatar

I’m starting a new project to learn about linkers. It’s called ˋweld`, and it lives here https://github.com/Hywan/weld.

I do this on my free time; understand very sporadically.

This toot is a thread to show progress or to ask help.

hywan,
@hywan@fosstodon.org avatar

The weld-parser crate wasn't happy with its name. Now, we must refer to it as weld-object. This crate has ambitions for its life!, like supporting Elf32, MachO, COFF, and more object formats, look at this little cheeky!

https://github.com/Hywan/weld/commit/7556abeb5d80f015e92634d8b9a6c1494e815b9e

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