baderdean

@baderdean@mastodon.social

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

gael, (edited ) to matrix French
@gael@mastodon.social avatar

NOT taking into account privacy aspects, what is the best UX experience for individual and group discussions? 🤔

@telegram @signalapp
@matrix
WhatsApp
Other?

baderdean,

@gael @telegram @signalapp @matrix why the most loved chat app, discord, is missing here? Signal/WhatsApp clear leaders. Element so buggy and IRC-like.

Stark9837, to python
@Stark9837@techhub.social avatar

How would you feel about a to introduce Paths to ?

When using a dictionary:

MyDict = { "key1": "value1", "key2": { "key3": "value3" } }
Normally, to access "value3," you would need:

MyDict["key2"]["key3"] or MyDict.get("key2").get("key3")

And that is if you are 100%, the key does exists, otherwise you need to have a default value in order to have the second get not to fail:

MyDict.get("key2", {}).get("key3")

If we could use Json paths, we could simply use:

MyDict["$.key2.key3"]

Example of a library:

Glom

@Python

baderdean,

@Stark9837 @Python are nested dicts really the solution? Don't we need a graph type somehow?

baderdean,

@Stark9837 @Python I got this Usecase too while parsing JSON from the Internet, the data may vary a lot. So .get(key) and test like "if key not in" are common. I don't like .get(key, {}) because it does not notify me when the key is not here which most of the time means something.

baderdean,

@Stark9837 @slott56 @juengling @hikhvar @zyzzyxdonta @diazona @folkerschamel @EndlessMason @Python this seems to applies to function, unsure how they applies to data structure especially dict, are we supposed to decorate getitem?

Stark9837, to python
@Stark9837@techhub.social avatar

threading, asyncio, and multi-processing

Recently, as I've worked on , I have enountered many situations where my code waits, takes a long time to execute, and my main loop is blocked.

With my @3dprinting bot, this only happens on the first run of a clean config, where all previous posts are fetched from the API and stored in a database The reason is irrelevant, but basically for metrics.

Thus, when the bot starts, it makes about 1.3k requests, one for every post by the bot. This can take about 10 minutes, with the API, paging, network speed, and rate limiting.

During this time, no mentions, new followers, or any other notifications are processed. Then BAM! Everything goes through, and WOW, we are back on track.

@Python

baderdean,

@Stark9837 @Python that's the easiness of threads that makes me opt for it for the same usecase of multiple HTTP request. Async in Python needs to rework a large part of the code to be really useful.

fishcharlie, to random
baderdean,

@vincent If this is correct, you and nitter will be able to fix it isn't it? This war against Open Web must not be lost, that's crucial for our freedom.

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