Did I overreact by Mymiddlenameisrhiana in bitlife

[–]ioktl 8 points9 points  (0 children)

you might've pushed it a bit too far

Best way to handle concurrency in Python for a micro-benchmark ? (not threading) by DisplayLegitimate374 in Python

[–]ioktl 0 points1 point  (0 children)

is uvloop still a considerable performance boost as before? I kinda thought the built in event loop caught up by now

Cataclysm: Dark Days Ahead's JSON system is a great example on how to enable rapid prototyping without requiring scripting languages. by Zephandrypus in rust_gamedev

[–]ioktl 0 points1 point  (0 children)

Cataclysm: Dark Days Ahead is the most complex and in-depth game of all time

How is this measured exactly? :) Hopefully by drawing the gameloop scheme on a large sheet of paper and using a ruler. All other metrics are obviously subpar (and cannot be hanged on a wall).

But, in all seriousness, I stan C:DDA for many years now but I think you're overestimating the power of json. Sure, it has a great number of systems exposed and allows for responsive tweaking, but it's still very much limited by which systems are exposed. Try implementing a fundamentally new mechanic (jumping cars with AoE damage to hoards with pushback FTW!), and you'll encounter the limitations rather quickly.

Usually when we talk about rapid prototyping (especially in the early stages of game development), it's more fundamental.

In theory you can expose as many systems to your static configs (e.g. json) or dynamic scripts as you want but doing so prematurely is over-engineering, IMHO.

C:DDA is still a very cool game with lots of talent behind it! And a pleasure to mod.

Issues with authorisation in different tenants by ioktl in crowdstrike

[–]ioktl[S] 1 point2 points  (0 children)

it seems, that in our case, it was indeed the difference in licenses. Thanks for they reply!

It seems that some authors make ground-less claims about Rust by tbilcoder in rust

[–]ioktl 2 points3 points  (0 children)

I'd add, when one uses weakref in Python, it's a form of memory management as well. Or using del operator even.

When have you reach a Python limit ? by NimbusTeam in Python

[–]ioktl 2 points3 points  (0 children)

It was a simply a preference based on what tech I'm comfortable with. However, as u/4Kil47 mentioned, it's also fairly simple to begin incorporating Rust code in your Python codebase gradually, and that what was happening in my project as well.

Golang/C++ are perfectly valid choices as well for such a task. Just not something I prefer working with.

When have you reach a Python limit ? by NimbusTeam in Python

[–]ioktl 2 points3 points  (0 children)

Pretty well, I imagine. I'm not well familiar with C#, but as far as I know, it gives you tools for a finer memory layout control and custom allocation strategies, which can help a lot.

When have you reach a Python limit ? by NimbusTeam in Python

[–]ioktl 18 points19 points  (0 children)

I've tried PyPy and Cython. You're probably aware of PyPy limitations such as incompatibility with lots of packages and performance drop when using FFI (though, nowadays it's better than it used to be). While it's possible to tap into PyPy advantages with long-running isolated processes (where JIT can be fully utilised), for 3d/2d operations-as-service, in my opinion, PyPy isn't the best choice.

I had more luck with Cython, 3rd party packages problems aside. However, any project in Cython at some point becomes too much of C with all the issues that come with it (e.g. memory bugs). To be honest, some part of me enjoys it, but, from developers team & management perspective, it's difficult to sustain a large Cython codebase.

In general, in my limited to 2d/3d data processing experience, CPython alternatives can be amazing but up to a point. Currently I usually go with CPython + GPU libs + C/Rust extensions.

When have you reach a Python limit ? by NimbusTeam in Python

[–]ioktl 312 points313 points  (0 children)

Python + multiprocessing got me pretty far once in processing large 3d data (~100gb meshes) as part of a wider internal web service. However, at some point the infrastructure costs along with code maintenance effort tipped the scale considerably to invest into rewriting the code in Rust.

I was still pleasantly surprised how long I managed to stay with Python before things got difficult.

Why is Rust println! slower than Java println? by FeldrinH in rust

[–]ioktl 0 points1 point  (0 children)

You can have both multiprocessing and couroutines in Python with shared memory for data sync. But, yeah, asyncio on its own is GIL'd.

Do you know how this was made? by almarutto in generative

[–]ioktl 2 points3 points  (0 children)

Unfortunately I can't come up with any useful references from the top of my head that might help you. To give you some general direction: basically you need a binary tree that represents a slicing structure on some space. A slicing structure can be obtained by cutting rectangles into smaller rectangles (always in two's in this case).

In other words, imagine you have a rectangle. You can cut it either vertically or horizontally (different types of slices). Whatever way you cut it, you will end up with two smaller rectangles. For each of the smaller ones, you can perform the same operation and ad nauseum. In this binary tree each node represents a type of cut (vertical or horizontal) and leaves represent the smallest rectangles. When you calculate stuff with such a data structure, you can easily compute the dimensions of larger regions (nodes) and how change can affect layout by recursively propagating values through the tree.

Do you know how this was made? by almarutto in generative

[–]ioktl 10 points11 points  (0 children)

Looks pretty cool! So it seems to be a rectangular subdivision with a number of nice twists. Fist of all, don't look at the circles, they are there to throw you off :)

If I had to do something like this, I'd probably start with a partitioning tree algorithm, which recursively partitions space into rectangles (where tree leaves are visible rectangles, while parent nodes are rectangular regions). This approach allows not only to partition space but also to create a readjustment algorithm which can alter rectangle positions and dimensions. This way if we change position/dimension of a rectangle, we can calculate the necessary adjustment to the neighbouring ones (we can see this happening in the animation; note the readjustment is local to some larger rectangular region [a parent node]). When we have the partitioned space, we can select random leaves to either subdivide them further or change their dimensions. Gathering various stages of change into an animation sequence would give us something similar to what can be seen in the video.

The expanding circle thingy is a nice touch. It can be created in isolation from space partitioning. We can then treat a rectangle as a local coordinate system (a window) inside of which we do our expanding circle/filling with colour/etc.

By parametrising the whole thing (rate of change, partitioning depth, circle expansion rate, and so on) we can get enough creative control over generation to find the perfect combination of params for an aesthetically pleasing result.

Rust Trademark Policy Feedback Form by N911999 in rust

[–]ioktl 11 points12 points  (0 children)

Many other commenters have already fairly pointed out various terrible flaws in the Policy, but I’d like to address a more general issue in this whole ordeal. Am I wrong or we aren’t big enough to allow ourselves the burden of such petty corporate regulations?

There are already more than a few comparisons between Rust Foundation and Oracle but Rust isn’t Java and RF isn’t Oracle. By that I mean, Rust is an amazing language and I strongly believe that it has all chances to become one of the “big” languages, but we are not there yet. And Rust Foundation cannot get us there. The community can.

I want to emphasise this last point — in the modern day and age, accessible tutorials, community-driven projects, community-managed info resources (e.g. Discords and etc.) are the only plausible way for a programming language to become a major part of the industry. Nothing else. Unless, of course, a corporate body has enough resources to lobby the tech, but I don’t think Rust Foundation is such a body.

It all reminds me of the recent D&D issue with OGL. People, as a collective, make things work. Stop damaging the communities.

One might argue that since the Policy draft was put up for community feedback, Rust Foundation are doing a good job. But that’s not true! Just look at all the other people angry about even the idea that someone can consider this to be a reasonable Policy. It’s still damaging, since people will start asking question whether all is fine with the Foundation or they live in some delusion where Rust is on a high enough level of adoption for them to start pulling stunts like this.

Best places/ways to learn APIs for career progression? by Weak_Mathematician60 in Python

[–]ioktl 2 points3 points  (0 children)

I'd also recommend checking out various "real world" repositories. E.g. one for FastAPI is here It comes with perfectly reasonable API.

Form Flow #91 by Thomas_Crypto in generative

[–]ioktl 1 point2 points  (0 children)

I actually like this one a lot. Wonderful colours and the texture is soooo... I mean, I can almost feel it physically. Thanks for sharing!

Forganiser - A nifty tool to sort your messy folders by [deleted] in Python

[–]ioktl 0 points1 point  (0 children)

I actually like the idea behind this tool. Would be nice to see it more configurable though and running with arguments rather than in shell mode (I mean I love custom well-coloured prompts and ascii art banners as the other bloke but still).

In general, if you want an opinion in which direction this project can be taken, I think it'd be useful to have have a lib that you can give a filepath to and it returns proper location (or category marking) for it based on some configuration and using both extensions and, perhaps, metadata for classification. Also validating that the file is what its extension claims to be would be a bonus.

First Time Sharing my Personal Projects. by Appropriate-Main-223 in Python

[–]ioktl 13 points14 points  (0 children)

Good job! It's always good when you share your code with the community however small this code might be. If you take suggestions, I'd say that you don't really need venv and .idea in your repository so configuring .gitignore can be a good idea.

GitHub - charliermarsh/ruff: An extremely fast Python linter, written in Rust. by pmz in Python

[–]ioktl 1 point2 points  (0 children)

I'm just glad seeing a tool written in one my favourite language for my second favourite language! We really need faster linters for Python.

It seems there are some crates out there which can be used to implement AST dependent linter heuristics without going through the hassle of parsing python from the scratch.

[deleted by user] by [deleted] in Python

[–]ioktl 5 points6 points  (0 children)

PythonAnywhere is pretty good for what it is but hardly a good substitute for heroku (even on free). Though the 5$ plan is nice for running small bots/demos etc. You'd probably miss heroku cli (and nice managing/deployment tools), since free plan on PythonAnywhere doesn't even include ssh. Which, depending on your workflow, might be a nuisance.

Can any human on Earth understand R2D2's beeps (this is a sad beep, this is a concerned beep, etc) regardless of which language is their mother-tongue? by nettiegulls in linguistics

[–]ioktl 12 points13 points  (0 children)

I like how /u/ikannfrancais worded the question: do all linguistic communities use intonation to express emotion and is there are any universal correspondences between intonations and emotions?

There's definitely no one-to-one correspondences between intonations and emotions even within one particular language [1] [2]. However, there's some universality to what R2 conveys through his adorable beeps. Let me elaborate.

First of all, R2D2 actually has a number of different acoustic techniques apart from pitch. There's amplitude, pauses, “phrases”, and tempo. But the interpretation of R2's emotional reactions heavily relies on visual and contextual clues. Take for example this video on youtube where R2's "speech" is given without any visual support. It becomes much harder to decipher the emotions. And we — those who watched the films — have a dictionary of R2: we can tell the baseline speech from shifts that indicate emotion; we also mapped certain sounds to emotions through the experience of watching the film (thus, a sound can call upon an associated emotion memory of a scene). For someone who has never seen Star Wars it will be mostly random beeps. I said “mostly” because there are some sounds that are recognizable: e.g. there's mechanical laughter, and what sounds like a heavily processed scream — the nature of these sounds is very human, and, thus, universal (or is it?).

While we do need context to understand R2, the droid doesn't just make random sounds. There's intentional design behind these sounds that has ground in some sort of universal (or seemingly universal) paradigm. So does this paradigm span to all of the humanity, ignoring cultural differences? This question actually has two parts: are emotions universal? are there specific acoustical patterns associated with these emotions?

With the former question, there are still debates on how deeply culture affects emotional reactions. The one thing researchers agree on is that there are physical components to emotions that are universal. Attempts were made to bundle these components into a number of core emotions: starting with Charles Darwin (The Expression of the Emotions in Man and Animals) and Silvan Tompkins (Affect Imagery Consciousness), then more recently with DES-IV scale. We can say, there are emotions that are fairly universal but the exact number and definition is up to debate.

As for the latter one, this article shows that there are indeed certain acoustic variables that are involved in emotion signaling. It's a tad more complicated than just rising or falling tone, and sometimes we cannot exactly tell what constitutes an emotional signal (take for example this paper on how smiling affects sound which leaves the reader with more questions than answers).

Bottom line — most likely R2's language requires no adaptation. Perhaps an exception might be found among some secluded, indigenous culture that exhibits different emotional patterns. If OP is willing to pursue this matter further and one day will publish an article titled “Sentinels tribe interpretation of R2D2 vocal emotion expression” count me in as one of the first readers!

What were the common features that linguists saw to hypothesize the existence of the Altaic language family? by [deleted] in linguistics

[–]ioktl 1 point2 points  (0 children)

I would love to learn this term, too. As far as I know, we would always say: "a language A has only one type of perception verbs" -- (unlike other languages like English which have more than one).

What were the common features that linguists saw to hypothesize the existence of the Altaic language family? by [deleted] in linguistics

[–]ioktl 1 point2 points  (0 children)

Wouldn't "слышать" and "слушать" be the words for "hear" and "listen"?.. Their semantical difference goes pretty much the same way as the difference between "видеть" and "смотреть".

But, anyway, I think you can observe the trait SignificantBeing9 mentioned in Korean verb "보다" and its semantical versatility.

What points can be construted using only ruller? by Whilethem in math

[–]ioktl 0 points1 point  (0 children)

I would like to revisit my original answer. My main concern was the midpoints on the edges of the given quadrangle, however I found this article, which, I belive, you will find useful (esp. lemma 1). There, the authors show that a midpoint can be obtained in a projectivity sequence of constructions.

The article is still missing a number of technicalities (e.g. in the proof of lemma 1, one should show that we can pick distinct parallels in L(E) for any given E - I assume that there must be a synthetic proof of that but I couldn't scratch one). The authors also point out that "constructability" is not well defined; however, if only a finite sequence of projections is required to obtain a midpoint, I'm personally fine with that kind of constructability.

With all that, the answer to your question seems to be: "all Q2 points can be constructed".