beatoriche's blog

By beatoriche, history, 6 months ago, translation, In English,

I'm searching for solution of euclidean minimum spanning tree if solution has create add-on-nodes between given data points which e.g. https://en.wikipedia.org/wiki/Euclidean_minimum_spanning_tree doesn't mention. these add-on-nodes would connect three edges at angles of 120 degres...

Read more »

 
 
 
 
  • Vote: I like it
  • -9
  • Vote: I do not like it

By beatoriche, history, 22 months ago, In English,

Human eye chromatism is remarkably constant, our eyes focus blue about 1.5 diopter stronger than red. So if a computer alternates color of text against black (important) background, you can have some exercise for eyes at the same time while you're shitposting. (You also might want to add something non-readable of opposite color (to text) so total light flux remains the same; I think boxes around letters, or text underline would be good. I also tried a method where one color channel is blurred and the other is sharp, but the result looks very bad)

I implement a sample in a QtWebkit, but many sites don't work well in that minimal browser. Probably more practical would be to extend Reader plugin for web browsers.

Thoughts?

Read more »

 
 
 
 
  • Vote: I like it
  • +49
  • Vote: I do not like it

By beatoriche, 3 years ago, In English,

(depressed) I looked into my statistics and it seemed to that there is positive correlation with my contestant rating and time of wikipedia edits. And negative correlation with posting in livejournal. Coincidence? I want to participate in contests again but I am too weak for it.

Read more »

 
 
 
 
  • Vote: I like it
  • -12
  • Vote: I do not like it

By beatoriche, history, 3 years ago, In Russian,

Вопрос тем, у кого нет существенных успехов в олимпиадах (вроде выходов в финалы ACM ICPC). Указываете их в резюме? Как?

Read more »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

By beatoriche, history, 4 years ago, In English,
 
 
 
 
  • Vote: I like it
  • +34
  • Vote: I do not like it

By beatoriche, history, 4 years ago, In English,

He talked about disadvantages of using C instead of assembly... Cases where C compiler produced unreliable code or it had too poor response time for interrupts... He complained that hibernate doesn't work good on Windows 7 and it responded slower and slower with each hibernation. But he preferred "Luna" interface in Windows XP rather than Classic. He proudly talked about animated emoticons pack he had installed on LAN chat.

I knew such people exist. Somewhere. But this time, such person was real and stood right before me. Futurama quote, I don't want to live on this planet anymore.

Read more »

 
 
 
 
  • Vote: I like it
  • -20
  • Vote: I do not like it

By beatoriche, 4 years ago, In English,

One of our most prominent problemsetters has birthday today!

Read more »

 
 
 
 
  • Vote: I like it
  • +65
  • Vote: I do not like it

By beatoriche, history, 4 years ago, translation, In English,

At midnight from tuesday to wensday 00:00 GMT will be held 666th Topcoder SRM. (Tuesday evening in the Americas, Wednesday night-evening in Eastern hemisphere)

Learn Latin! :) In hell, nobody would speak to you in English! :)

Read more »

 
 
 
 
  • Vote: I like it
  • +52
  • Vote: I do not like it

By beatoriche, history, 4 years ago, translation, In English,

Modern CPUs peform multiplication much faster than division, because of two reasons, multiplications are more considered worthy optimization and are easier to paralellize in silicon. This tells how to replace two divisions with one with small accuracy compomise:

http://stereopsis.com/2div.html

Similarly, you can replace three divisions with one, etc.

Read more »

 
 
 
 
  • Vote: I like it
  • +66
  • Vote: I do not like it

By beatoriche, 5 years ago, In Russian,

Google still owes me $22. Today I searched for cat videos, as usual, and what I saw:

At the moment when French Muslims just successfully enriched local traditions. WTF Google?

Read more »

 
 
 
 
  • Vote: I like it
  • -26
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

I recall that in the late 90-x, Java was actually more widely used in webpages. In this nice, it was largely displaced by ActionScript (Flash) later. Why did this happen? As I understand, both Java and ActionScript use VM and garbage collection. Why the latter startup time is smaller than the former? I googled for many comparisons between two, but all of comparisons concentrate on syntax, which is of course compiled out and not interesting at all. Even Topcoder seems to want to phase its Arena applet in favor of Flash. I do not understand.

Read more »

 
 
 
 
  • Vote: I like it
  • +13
  • Vote: I do not like it

By beatoriche, 5 years ago, In Russian,
 
 
 
 
  • Vote: I like it
  • -34
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

The only way so solve it that I've found is to use https://en.wikipedia.org/wiki/Rencontres_numbers and calcuate , but I don't like that. Is there other way? Can we use inclusion-exclusion formula to calculate it?

Read more »

 
 
 
 
  • Vote: I like it
  • -16
  • Vote: I do not like it

By beatoriche, 5 years ago, In Russian,

Today, one of our most prominent problemsetters has birthday. Happy birthday! I am especially thankful for her problemsetting in SRM 462

Read more »

 
 
 
 
  • Vote: I like it
  • +52
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

When I was young, I thought that all programmers have rational thinking. But I see that they are more like normal people. One of high ranked CFers spoke of similarity of interracial marriage and same-sex marriage, and got upvotes for that.

Of course, the analogy exists only in "progressive" narrative (many of us are so americanized so even we speak from U.S. POV) -- interracial marriage ban purposefully discriminated people, whereas absence of same-sex marriage is status quo even for countries which have never had anti-sodomy laws to begin with.

So what are the consequences of the former civil rights victory, lifting an interracial marriage ban? I in 2012, 72% of Black babies were born to unwed mothers (highest amongst all ethnic groups) http://www.cdc.gov/nchs/data/nvsr/nvsr62/nvsr62_09.pdf

Why? The answer is very simple: black women are not sexually attractive for most men. http://qz.com/149342/the-uncomfortable-racial-preferences-revealed-by-online-dating/ They look too masculine. While black men may go for marrying White or Asian women, it's not easy for black woman to marry or even date outside their race. Given that in U.S. black population is smaller than White, this effect barely noticeable for Whites but very noticeable for Black women.

You don't hear much about this problem because it's difficult to link white racism to it. However, "civil rights" advocates probably will label me as racist just for noticing it. Of course there are some people trying to "explain" it by saying that most black males are poor, https://en.wikipedia.org/wiki/Marriage_squeeze But you have to be really ignorant of reality to believe in it, given that this doesn't prevent black males to marry outside their race at much greater rate as black females.

There are many attributes of people. People can male or female, tall or short, clever or dumb, dark-skinned or light-skinned, extraverted and intraverted, sexually attractive and sexually repulsive. For unknown reason, civil rights movement picks some attributes (namely, race, sex, and sexual preference) as sacred but maintain it's okay to discriminate by other attributes. Why there is no affirmative action for intraverts? Why there are no affirmative action for sexually unattractive people? In a sense, a ban on interracial marriage was affirmative action for black women to get a black husband. It's not black women's fault that they are not attractive. They are just lucky enough that they aren't white males -- in that cases, civil rights advocates would blame them for what they are.

Lifting ban on interracial ban has benefited very few people, and has made worse for much more. Black children don't get their fathers, too, which probably adds to crime rate. But social justice warriors don't need to think -- they only need to repeat anything that they have been told as "good".

Read more »

 
 
 
 
  • Vote: I like it
  • -24
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

Here, at CF, we have 4 compiler options for C/C++. But I think it's not enough xD Did you know that MSVC++ can compile JIT code for C++?

/clr compiles C++ usual fashion, just bundles it in .NET container

/clr:pure makes CLR(JIT) code. Similar to using C# in unsafe mode, but faster. Standard c++ library works.

/clr:safe is similar to using c# in safe mode. C++ standard library won't work.

Code for Fibonacci where c# outperformed AOT-compiled c++ was used by some people to prove c# is superior. But C++ users can join Fibonacci likers too:

C:\00>copy con fib.cpp
#include <windows.h>
#include <stdio.h>

int fib(int n) {
        return n<2?n:fib(n-2)+fib(n-1);
}

int main() {
        int x = GetTickCount();
        int param = 42;
        int res = fib(param);
        x=GetTickCount()-x;
        printf("fib(%d)=%d\n",param,res);
        printf("ticks: %d\n",x);
}
^Z
Скопировано файлов:         1.

C:\00>cl /W4 /F268435456 /EHsc /O2 fib.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

fib.cpp
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:fib.exe
/stack:268435456
fib.obj

C:\00>fib
fib(42)=267914296
ticks: 2745

C:\00>cl /clr:pure /W4 /F268435456 /O2 fib.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 15.00.21022.08
for Microsoft (R) .NET Framework version 2.00.50727.5467
Copyright (C) Microsoft Corporation.  All rights reserved.

fib.cpp
Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:fib.exe
/clrimagetype:pure
/stack:268435456
fib.obj

C:\00>fib
fib(42)=267914296
ticks: 2152

C:\00>

Read more »

 
 
 
 
  • Vote: I like it
  • +12
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

 Since I don't have something recent to share, I am going to tell about something old. I was trying to solve Timus 1378 Artificial Intelligence and realized that the code I was writing was too spaghetti, and I thought if I could make it simpler. So I came upon a solution which is simple, fast and correct. You can try to discover it, in case you don't want to, it's under spoiler in the first comment.

BTW: you can you pictures from dropbox here, just share it in dropbox interface and replace www.dropbox with dl.dropboxusercontent in URL

Read more »

 
 
 
 
  • Vote: I like it
  • +18
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

When I was a child, I believed that programmers have to have rational thinking, because um, it is neccessary. A day ago, many people who didn't like my claim that Islam is one of many factors which drives country development down instead criticized my persona. Strangely, no one asked why I thought that. Some liked to pick single data points which supported their opinion, without looking at picture as whole.

First figure: Y-axis: weighted rating (courtesy of CF) X-axis: N registered participants from a country (Sorry, the picture disappears sometimes. if it does: https://www.dropbox.com/s/jgjon8ve3m27ghu/islam-corr.png)

How do we know that correlation on the first figure is indeed causal? There is correlation between amount of exposure to Islam a country had (recent minus year when it converted to Islam), and its performance. Note that Indonesia and Malaysia are also are in unfomfortable timezone for CF.

Note that countries that converted to Islam during life of Mohammad are not present in the table — there is no data for them. Probably because the competitions aren't for their people, they are busy pouring boiling water on Asian maids.

bottom line: programmers don't have more rational thinking than general population. Apparently here, on CF, finding facts to support claims is a bad thing.

Read more »

 
 
 
 
  • Vote: I like it
  • -149
  • Vote: I do not like it

By beatoriche, 5 years ago, translation, In English,

How do you call an algorithm which, given a square matrix of distances, places N points on (euclidean) plane in order to minimize sum of deviations between pairs and input matrix? some info: looks like this time i was more lucky in googling: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/cmdscale.html

p.s. I posted english text as 'russian' again. lol

Read more »

 
 
 
 
  • Vote: I like it
  • -16
  • Vote: I do not like it

By beatoriche, 5 years ago, In English,

In past I enjoyed competetive programming very much. Now I don't. It's like a major part of my personality is gone. I remember my first semifinals in ACM ICPC, when I had headache but I solved well enough so my team took result which would be our university's best place in ACM ICPC for .... a long time (still growing)

In fact, now I don't enjoy programming at all (I was very scared after I had seen helloworld for Android). But it seems I have no other skills. No idea what to do.

Read more »

 
 
 
 
  • Vote: I like it
  • +35
  • Vote: I do not like it