sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

580
active users

#Limit

0 posts0 participants0 posts today

#UnboxingNews - Deutschlandfunk Nova:

#Migration - Wie überlastet sind die Kommunen wirklich?

Die Bundesregierung warnt: Die #Städte und #Gemeinden seien am #Limit. Um sie zu entlasten, soll die Migration weiter begrenzt werden. Doch wie sieht die Lage in den #Kommunen gerade überhaupt aus?

Moderation: Rahel Klein

Webseite der Episode: deutschlandfunknova.de/podcast

Mediendatei: podcast-mp3.dradio.de/podcast/

Deutschlandfunk NovaUnboxing NewsPodcast von "Unboxing News" abonnieren oder einzelne Beiträge herunterladen.
Replied in thread

@looopTools

Fair enough. Because recursion always has a limit, in any language, the tutorials probably assume you're aware of this already. The specific limit in Python is adjustable, but there's no way to eliminate it altogether.

Do the tutorials actually include data/examples that run into the recursion limit? Or is it only when applying code like that to other data that you run into issues?

I ask because the easiest way to smash the limit is to create a cyclic data structure, which is trivial in Python. If you naively recurse such an object, it goes on forever - until it hits the configured limit or the machine runs out of memory, anyways. i.e. this case:

>>> foo = ["bar"]
>>> foo.append(foo)
>>> foo
['bar', [...]]

If you think it's possible your recursion code might have to deal with something like this, you usually end up keeping track of the objects you've already processed, and skip them if you see the same object again (typically by the object ID).

In many cases, you can also rewrite recursive code so that it's not recursive, and cannot run into this problem. As a bonus, problems that can be refactored this way usually run faster without the recursion.

Hit an interesting limit in the TypeScript language server¹:

Looks like there’s a limit on the number of entries an object (constant) can have before the language server balks. Seems to hit it around 1,343.

(I’m generating an object for an icon library.)

Doesn’t appear to be related to file/memory size (breaking up the same number of entries into several objects works).

Anyone know what limitation exactly I’m hitting (if it’s documented somewhere?) Been searching but couldn’t find any reference to it.

¹ It’s definitely a language server limit as I tried in VSCode as well to rule out it being a limit in Helix Editor.

What's the post character count limit for your instance on Mastodon?

Meaning, when you make a post here on Mastodon, how many characters per post can you type?

For example, currently #AllThingsTech has the default Mastodon 500 character count limit.

If your instance has more than a 1,000 character count limit, please comment and let me know.

Please BOOST for maximum exposure to the #Fediverse

#Poll#Polls#POTD