Блог пользователя beatoriche

Автор beatoriche, история, 5 лет назад, По-русски

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...

Полный текст и комментарии »

  • Проголосовать: нравится
  • -9
  • Проголосовать: не нравится

Автор beatoriche, история, 6 лет назад, По-английски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +49
  • Проголосовать: не нравится

Автор beatoriche, 8 лет назад, По-английски

(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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится

Автор beatoriche, история, 8 лет назад, По-русски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор beatoriche, история, 8 лет назад, По-английски
  • Проголосовать: нравится
  • +34
  • Проголосовать: не нравится

Автор beatoriche, история, 8 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

Автор beatoriche, 8 лет назад, По-английски

One of our most prominent problemsetters has birthday today!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +65
  • Проголосовать: не нравится

Автор beatoriche, история, 9 лет назад, По-русски

В ночь со вторника на среду в 04:00 MSK состоится 666-й Topcoder SRM.

Учите латынь! :) Никто в аду на английском с вами разговаривать не будет! :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • +52
  • Проголосовать: не нравится

Автор beatoriche, история, 9 лет назад, По-русски

Современные процессоры выполняют умножения намного быстрее делений, потому что разработчики процессоров больше уделяют этому внимания, да и просто легче распарралеливаются в кремнии. Вот способ замены двух делений на одно деление и несколько умножений с небольшой потерей точности:

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

Подобным образом можно заменить и три, и четыре деления на одно...

Полный текст и комментарии »

  • Проголосовать: нравится
  • +66
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, По-русски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -26
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, перевод, По-русски

I recall that in the late 90-x, Java was actually more widely used in webpages. In this niche, 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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, По-русски
  • Проголосовать: нравится
  • -34
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, По-английски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, По-русски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +52
  • Проголосовать: не нравится

Автор beatoriche, 9 лет назад, перевод, По-русски

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? 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 being unattractive.

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".

Полный текст и комментарии »

  • Проголосовать: нравится
  • -24
  • Проголосовать: не нравится

Автор beatoriche, 10 лет назад, По-английски

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>

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

Автор beatoriche, 10 лет назад, По-английски

 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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +18
  • Проголосовать: не нравится

Автор beatoriche, 10 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -149
  • Проголосовать: не нравится

Автор beatoriche, 10 лет назад, По-русски

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?

Полный текст и комментарии »

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

Автор beatoriche, 10 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +35
  • Проголосовать: не нравится