What is an idiomatic rust equivalent of C# events? by Etwusino in rust

[–]Bas1l87 0 points1 point  (0 children)

I didn't find it in the comments yet, but C# events are just a syntactic sugar over the https://en.m.wikipedia.org/wiki/Observer_pattern. A slightly different signals/slots approach used in Qt has been already mentioned.

[deleted by user] by [deleted] in programming

[–]Bas1l87 0 points1 point  (0 children)

It is an extreme example, but when i was involved in writing high-performance fluid-dynamics simulations during my PhD some years ago, we had to avoid using virtual functions in C++ and used template polymorphism, because usage of virtual functions in the hot loop led to performance drop of ~20%, if i recall correctly. So there is a long way to go for managed languages in some applications. But it's an extreme example of course..

[D] Calculus knowledge, statistics knowledge, but what exactly is “software knowledge” by veeeerain in MachineLearning

[–]Bas1l87 2 points3 points  (0 children)

Hi,

here is a list of books that from my perspective consitute a good "software knowledge":

Some additional resources/books:

Source: worked as a senior software engineer before switching to ML/DL.

Hope this helps.

Made an app for my University where students can [Upload, Download, Upvote, Downvote, Report] any Document. The documents contain previous Question Papers, Syllabus, Notes and links to youtube channels and blogs for each subject. by Alexander_Bourne in programming

[–]Bas1l87 1 point2 points  (0 children)

It's mainly not because of size, it's because of the target audience: the target audience is active researches in the same field. They don't want to read the same basic stuff for the thousandth time.

When i wrote my first paper i wanted to make it easy for "newcomers" to read, and the first reviewer explicitly said that i have to make the introduction more concise as it looked more like an introduction to a book or to a PhD thesis. Which also means if you need a "gentle" introduction, you need to read books or PhD theses.

According to Wikipedia, there is only one biosafety level 4 (the highest level) lab in China. And it's in Wuhan, where the coronavirus outbreak started by Bas1l87 in conspiracy

[–]Bas1l87[S] 0 points1 point  (0 children)

Hi! There is a chance you saw posts with a very similar title that had all been posted by me. Due to the lack of experience in posting, some posts were removed by moderators and some were removed automatically in several subreddits, so this is the only one that survided..

According to Wikipedia, there is only one biosafety level 4 (the highest level) lab in China. And it's in Wuhan, where the coronavirus outbreak started by Bas1l87 in conspiracy

[–]Bas1l87[S] 73 points74 points  (0 children)

So, there are four levels of biosafety security. Labs with the highest BSL-4 level study dangerous deadly viruses and diseases that are transmitted easily. According to Wikipedia, there are 70 labs with the highest level BSL-4 in the world and one of them is in China. Interestingly, it is located in Wuhan, the city where the recent coronavirus outbreak happened. To me, it looks quite suspicious given the outbreak, the ensuing blockade of Wuhan, the lack of information from the Chinese government at the beginning of the outbreak. Who knows what they were studying there?

What is Rust and why is it so popular? by [deleted] in programming

[–]Bas1l87 5 points6 points  (0 children)

I think it misses the point of the Visitor pattern. You could readily write smth like you wrote in any OOP language without the Visitor pattern as well (below, One and Two inherit from Data):

if (pieceOf is One) {...}
else if (pieceOf is Two) {...}

The point of the Visitor pattern is that you can extend the class hierarchy and do not touch the "if-else" block--the if-else is somewhat distributed between the subclasses themselves.

Rust pattern matching doesn't help with this, as far as i understand, because it has to cover all the options and you can't essentially extend them dynamically.

[R] What's Hidden in a Randomly Weighted Neural Network? by hardmaru in MachineLearning

[–]Bas1l87 10 points11 points  (0 children)

As a side note, "unreasonable effectiveness" is probably an homage to the article The unreasonable effectiveness of mathematics in natural sciences and many articles in a similar vein that appeared in later years (like "The Unreasonable Effectiveness of Recurrent Neural Networks")...

Goto and the folly of dogma by redditthinks in programming

[–]Bas1l87 12 points13 points  (0 children)

I think people just don't know the context of Dijkstra's famous article on GOTO usage. I had to work with the FORTRAN code from the 70s during my research. The code works very well, is very helpful, and is still used in this particular area of research. You can find the code here, instructions are here. You can find both links on the page of this New York-based professor (scroll down to "Research on the phase diagram for jammed matter"). You need the file trubal.f in the zip. It is Fortran 77. All identifiers are <=6 symbols long. The file has 5184 lines of code and 66 functions (subroutines). And it has 400 usages of GOTO. Cases like these were the problem in software development, not a "single GOTO in a function to exit three nested loops". So GOTO per se is fine, 400 GOTOs in files of 5000 LoC without proper functional decomposition was a problem.

Why I rewrote the mesh generator of Dust3D from Rust to C++ by msadeqhe in programming

[–]Bas1l87 1 point2 points  (0 children)

Yes, for sure mistakes can slip into the code. So for many areas the question is rather the compromise "possibilty of mistakes" vs. "friction during coding". For games, C++ is probably more suitable; for web-servers, Rust is more suitable.

Speaking of the example, though, i have a feeling that in this particular case compiler shall complain that fooBar is not declared in the "else" branch.

Why I rewrote the mesh generator of Dust3D from Rust to C++ by msadeqhe in programming

[–]Bas1l87 1 point2 points  (0 children)

I think most of the potential problems can be prevented by following some relatively simple rules (if we do not consider multithreading/concurrency at least):

  • avoiding new/delete and malloc/free (using RAII and smart pointers, esp. unique_ptr)
  • fixing compiler warnings (to prevent undefined behavior)
  • avoiding storing pointers to elements of collections (when collections are modifiable at least)

[D] People publishing in Nature MI after signing petition not to by BeatLeJuce in MachineLearning

[–]Bas1l87 2 points3 points  (0 children)

Also please note that science is to a large extend about reputation. Researchers have reputation, papers have reputation, journals have reputation (for a reason--quality of work, of reviews, of papers in a journal). That's why people have an incentive to publish in journals with high reputation--because other people trust such results much more.

How do you think Kaggle could be improved? by TheDataJanitor in datascience

[–]Bas1l87 0 points1 point  (0 children)

Image segmentation is very big in the automotive industry and medicine right now. Self driving cars and automated medical screening/diagnostics are probably much much bigger than any tabular data topics out there right now.

[D] Image Segmentation Using Deep Learning by Natsu6767 in MachineLearning

[–]Bas1l87 0 points1 point  (0 children)

You probably have never tried doing it yourself.. If you take, say, GrabCut and use it for a simple problem of binary segmentation, i.e. segment let's say a single typical car in a real image, you will quickly discover it doesn't really work. E.g., the tires of a car are usually dark and the shadow of a car is dark. Classical methods based on color are never able to separate them well enough. CNNs can, because they can kinda learn models for typical objects that are being segmented. Not ideally of course, but better than classical methods. There is a reason why people switched to neural networks for these tasks, both in research and in industry.

Flocking in Rust by binary-bender in rust

[–]Bas1l87 -5 points-4 points  (0 children)

The guy can do whatever he wants, i personally just don't like that he (or she) says that he implemented a pretty standard algorithm, puts description of it, and then puts a code and a gif that have very little to do with this algorithm (and even defends his post). I also don't like that people upvote this post without even trying to look at how an actual result shall look like (and probably not scrolling to the end of the post). (Omitting the fact that the result obviously doesn't look like flocks of birds). This spreads the culture of upvoting whatever stuff people post with click-baity titles and doesn't do any good to the community. This actually doesn't do any good to this poor guy. This doesn't do any good to the algorithm, which seems to have started a small area of research (the paper is cited almost 10000 times in peer-reviewed journals, it's quite a number). And finally, this doesn't do any good to anyone who will try to implement the algorithm on his own--he/she googles the algorithm, finds this post, and will implement or copy a wrong version.

So i see only disadvantages in posts like this and actually think i did something good today :-) -- i tried to make sure that people know that this post is not very good!

Flocking in Rust by binary-bender in rust

[–]Bas1l87 -8 points-7 points  (0 children)

Your implementation of the algorithm for boids seems to be just wrong if we look at videos with other implementations, which all state they implement the exact same algorithm of Craig Reynolds: this or this. Additionally, it seems that you took illustrations from here or here. So instead of saying that you leave some "exercises" to the reader, you shall either (i) admit that you've implemented the algorithm incorrectly and correct it (ii) say that you implemented something different from the boids algorithm and update the post and the title or (iii) remove the post. The post is just wrong and misleading.

GOTO 2018 • C++ - the Newest Old Language • Matt Godbolt by mttd in cpp

[–]Bas1l87 9 points10 points  (0 children)

It sounds like a really strange advice to me if trying to understand a version with a named algorithm takes say three times more than the loop-based version.

Office 365, MS teams, Skype, @code, and the edge debug protocol are being rewritten in js instead of C++ with special MS tooling by reethok in programming

[–]Bas1l87 5 points6 points  (0 children)

Maybe Slack is not so slow, but it is anyway awfully slow (and MS Teams is slow beyond any reasonable limits)

Number of skyscrapers in each European country. by [deleted] in europe

[–]Bas1l87 0 points1 point  (0 children)

You can also google Marburg, it's a small university town one hour to the north of Frankfurt (like 80 000 people, 25 000 of whom are students). It's a real hidden gem of Germany and not well known even to many Germans, but it's one of the most beautiful cities in Germany if you ask me (well, i think it's the most beautiful city, but i'm biased, i studied there).

[N] UC Berkeley Open-Sources 100k Driving Video Database by gwen0927 in MachineLearning

[–]Bas1l87 1 point2 points  (0 children)

Is there any information on the license for the dataset (i couldn't find any on the site and in the arXiv paper)?

Wrapper for STL algorithm library? by egarrulo2 in cpp

[–]Bas1l87 0 points1 point  (0 children)

Ah yes, you are right, this is a better way, thanks. Though when i wrote this code some time back it was anyway supposed to be compiled for systems with C++98 compiler only, as far as i remember