@codewiz Template argument deduction is a simple substitution and it is happens before overload resolution, it's only subtle if you forget what it is.

You shouldn't rely on (or think in terms of) conversions to write generic code like this. You are asking the compiler to deduce the size of the span from the size of the array when you never told it those things are connected. The type conversion do not define such a connection, because they are rather free form and can be impossible to reason about in the general case, even if simple cases seem obvious (like you can have type constraints on them and the compiler will have to go through all possible template arguments).

The proper way to associate types that have different interfaces, but are the same in concept, is a traits type (like iterator_traits).
ix.io/3Zqo/cpp
You could probably do the same with less boilerplate and idk concepts might help too, but that's the gist of it. You can specialize the traits type for as many types as you want without them being aware of each other or your generic functions.

Alternatively you can avoid changing the iterator concept by changing the algorithms, leaning onto the elementwise logical negation operator ~.

For this to make sense you have to introduce a new type: an array of bools with an associated reduction operation - conjunction or disjunction, that would represent the equality comparison in each dimension and contextually convert to a boolean, by performing the reduction. The == operator will return such an array with conjunciton, since that's what makes more sense for the tuple in general. Now the logical ! in order to also remain sensible will need to negate the elements of the array AND change the conjunction to a disjunciton, adhering to De Morgan's law. The elementwise ~ however has no such obligations of logical consistency (it's wavy, it's chaotic, it's insaneee) and can happily just negate the elements leaving the reduction operation untouched. This coincidentally is both exactly what we need for loop conditions and exactly what we always had when working with integer types as bit vectors (so hopefully it shouldn't be that alien of a syntax). What I'm getting at is that the range based for loop and algorithms should use ~(first == last) instead of (first != last) as a loop condition. Unfortunately the (fisrt == last) for early returns and such, will turn into ~(first != last) with this approach... that's double negation... disgusting... and I forgot the in OP -_-

Show thread

stumbled upon another type of multi-dimensional iterator that you just can't have in STL in it's current form :
github.com/ClaasBontus/miterat

Goal: Iterate over multiple containers in tandem.
Solution: Iterator tuple wrapper that applies all relevant operations to it's elements.
Problem: the range based for loop, the algorithms library, and the whole concept of iterators relies on equality comparison. The loops increment the first(begin) iterator while it's not equal to last(end) iterator, some algorithms exit early if first == last, etc. In this case we want the iteration to stop when one of the ranges is exhausted, therefore the inequality of the tuple must be implemented as a conjunction of element-wise inequality comparisons, that is the tuples will be unequal only if all their corresponding elements are all individually unequal. The tragedy is that this makes absolutely no sense in any other context and is a bonkers way to implement inequality for a tuple (or any other vector/collection type), since any two tuples that have only one element in common will be considered equal. Alas this is what you have to do to satisfy the standard library. The only solution to this would be to change the iterator concept to use a different function (maybe called std::reaches(first, last)), that will just default to equality comparison unless specialized for a given type. The use of equality comparison is already conceptually dubious for ranges that use sentinel end iterators (like input streams, lazy generators, or when you want to do less than because some overflow is allowed and expected), but when you try to up the dimensions even in the trivial cases it just completely breaks apart.

@eldritch_cookie Can you meaningfully interact with millions of people? Or even browse through their stuff? What's the point in cramming them in one place your feed or your search database? The discovery is meant to work naturally, you can browse through known instances, which should ideally be listed and categorized somewhere (not necessarily in one place), look in the user directory and follow people. The posts of those you follow will then pop up in your federated timeline for everyone in the instance, thus the connections would grow according to the need of the users. But of course that's not enough, we need more toot, so we use follow bots and relays and then complain that the federated timeline is junk. But, you know, actually discovering things is too hard, we want to sit back and be spoon fed, while also hating the algorithms that decide things for us.

@Placholdr because 1 is the multiplicative identity and the factorial is a multiplication. If you are in the business of multiplying things you always start with one, not zero, because zero wrecks multiplication. Since you have started with one you multiply nothing with it, you are left with. There is no other meaningful way to define 0!, and even the definition of 1! is dubious with this starting point of 1.

work - 

@prehensile It can be really hard to explain something you worked on for a long time. Any particular part of it might be a result of many independent decisions layered on top of each other. There might also be some important things that you haven't considered because you happened to get it right the first time by force of habit, while someone else (or you in future) might want to focus on the various possibilities there. I'm sometimes flabbergasted by some things I've written even like a month ago, and it can take a whole day to figure out what it's all about, so rather than explaining the past, I think it's more important to give them a general idea of you overall style and approach, and support them in the long term.

@bonifartius keyword marauder, even not knowing the language you might be able to pick it up, cause it's a borrowed word

@bonifartius the comments do not correspond to what they say in the video. It is presented as a witch hunt of wrong-think, but in which ever videos there are talking they are accusing the people of commuting crimes, looting, stealing, violence. But I guess it's only fair to expect a volunteer militia to establish proper judicial system with courts and prisons while the country is invaded by an overwhelming force.

@ztx
> The situation with open-source went nuts very quickly...
as in right now, not before not always, cause that's what quick means... how many more basic words am I going to have to explain to you?

> went nuts
> It is shocking how...
> Savagery and hypocrisy.
"but i'm unshaped, you see cause I don't care about anything"

meanwhile no arguments addressed...

@iron_bug learn to read, and oh my, what would I do after being so viciously purged!

@ztx

@ztx
> situation with open-source went nuts very quickly
you implied something new was happening, once again, read the terms and condition of most any software ever distributed. I didn't mean it affected you directly I meant it affected you as in outraged you, cause it now involves some politics that you happen to care about.

That's covers pretty much the only half assed argument you tried to make here, the rest of your reply is ad-hominem.

@tripu it is and has always been a snake oil industry hinged on marketing. Everyone is up-selling their own unique brand of junk, and best you can hope to be is a lowly shaman that at least makes actual oil from actual snakes, and maybe a couple of salves on the side. It's hard to find a customer facing term that is not a buzzword, including whatever "web" is supposed to mean.

@ztx read:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Some randos decided to abuse their software as means to influence the userbase, just like everyone was doing since forever and now you're freaking out just cause it affects you.

Additionally understand if someone takes action against your country you as an innocent citizen will feel it, just like the people in Ukraine feel the bombs that fall on "military targets". You are screeching here as if Russians are being persecuted in and exiled from the western countries en masse, which is by the way something that will totally happen if the war escalates further. That's just how war works, in case you didn't know.

@2ck Well even if you do make a single stream indistinguishable from noise, you still need to make the noise. Assuming it's all easily detectable (which I thought is the premise), wouldn't there be clear intervals of back and forth communications? Like every now and then you would hear these weird noises coming from specific places. To hide the intervals they'd have to be broadcasting actual noise all the time, which might be even more suspicious. I assume the problem is that the place is really silent and there aren't any weird jungle noises to be heard.

@2ck I imagine that even if the information itself is encrypted there has got to be some structure to the protocol of the communication, so that the other end can recognize the signal, and send a correct response... even it's all pre determined and based on precise timings or something, it would still be a pattern. Maybe if they are super slow, like if takes them thousands of years to do a handshake, we might not have enough data to notice anything yet.

@ztx

> This is more of a rhetorical question, which only purpose is to point out the obvious.
The point out what? That nothing has changed? That DDG and it's backends were filtering the results without telling you how since forever? No, because now when it told you one specific detail, you are trying to imply that this is something new somehow? You simply never cared about it being transparent or fair when it comes to filtering, because if you did you would have known that it isn't, and that never promised to be.

> Entitled to what?
Entitled to decide how DDG should filter, when this free service didn't even promise you anything on that front, and was always filtering without telling you how, and without any guarantees of fairness, and with completely subjective and secret criteria of relevance.

> number will be less
numbers will not be less, there will be exactly one number, 0, because everyone and their granma is on this now, not thanks to you Read: fad.

@ztx
> what makes DuckDuckGo eligible to make decisions
> Why not just let us think for ourselves, why should THEY decide
You are literally asking why they are allowed to do what they want with the service they provide to you for free. You are implying that they mus let you decide how the filtering is done, or not filter at all. You feel entitled to these things, which were never the case, btw.

> Do we need another Google
The only difference between DDG and Google with regard to policy is tracking users, and that has not changed, according to them.

> We have absolutely no reason to trust and use DDG on anything anymore
> DDG just became
It was always filtering and it was never transparent as to how. Nothing just became anything that it wasn't.

> The most important part of this post is to spread the info.
Sure your little message in this tiny corner of the internet that barely anyone cares about will spread way better than the official announcement on twitter. Important work you're doing here harping on fads.

@ztx Whoever owns the servers has the right to do whatever they want with them. Most search engines filter results by relevance, using secret unverifiable criteria, that's a given. They are not obligated to make it fair, or even tell you anything about it. The only promise DDG made to you (not even a paying customer, who nevertheless feels entitled) is that they will not track you and personalize search results. You never had any reason to trust anything that they said, because there is no transparency, no standards, no guarantees or warranties, but it helps to at least understand what they said.

@johnabs the hardest thing to provide is exercise and that's usually what various problems stem from. An active dog would need 10-15 minutes of intensive exercise several times a day, and until she learns some games like fetching, it will be somewhat intense for you as well to get her going. In my experience if you provide that, everything else just magically gets easier, and otherwise the dog demands constant attention. And intense means really intense like running around until that tongue is out. Initially it might help to take a break from everything else and dedicate a week or two to figuring out a routine that works for both of you.

> libreplanet and *gnu.org having the most impact.
sure that's were everyone goes to download software, you nailed it... The only influence libreplanet or FSF have is the licenses that people use, and presenting this rhetoric to them you are pretty much implying that they should change the licenses.

> tor provides list of public relays and exit nodes adding these to filtering makes majority of tor connections useless as they won't be able to connect, lokinet does not have this vulnerability
Oh so you meant to completely shut down tor access to any free software code, for anyone anywhere, not just Russians... galaxy brain, what can I say...

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.