Home
0x1392 [entries|archive|friends|userinfo]
0x1392 (aka S010)

  userinfo
  archive
  friends

[01.01.2020 00:00]
enum tags{
    COMPUTERS,
    ELECTRONICS,
    TRAVEL,
    PHOTO,
    MOVIES,
    MUSIC
};
Link/* leave a comment */

[14.05.2008 11:47]
[Tags|, , , , ]

Придумал себе фишку: "Argv, me hearty! I be a bloody C wolf!".

Pirate talk -- замечательная штука.
http://www.yarr.org.uk/talk/

В русском языке в принципе аналогов нет. Можно конечно говорить всякими старыми словами (типа "хорохориться", "ерепениться" %), но это не то и в английском это тоже есть:

Thou
Thou hast
Thou hast asked
Thou hast asked me
Thou hast asked me, but I have answered thee not!

Лулз.



Via [info]naoe_riki:

Новый опенинг к России рулит:

1000% PUTING をロシア語で歌ってみた (YouTube)
1000% PUTING (оригинал на японском, звучит намного лучше) (YouTube)



Via [info]fotek:

Синти-поп (синтипоп) (англ. synth-pop) — жанр музыки, в котором синтезатор является доминирующим инструментом. ... особенностями являются: искусственность звука (синтезаторы более не имитируют звучание реальных музыкальных инструментов), акцент на механических ритмах, использование вокала в качестве контрапункта искусственному происхождению аранжировки, многократное повторение структурных элементов. Форма композиции синти-поп песен не отличается от формы обычных поп-песен. Тексты песен зачастую имеют лёгкую социальную или научно-техническую темы.

© Wikipedia.

Лесников-16 - Космонавт Панченко
Просто обалденнейшая песенка. Чем больше слушаю тем больше нравится. Есть что-то от 80-ых.

Link/* read 27 comments || leave a comment */

[13.05.2008 12:57]
[Mood | blah]

Блин, вчера утром инет "пропал". Так классно было. Счас вот починили.
Link/* read 4 comments || leave a comment */

CTRL+C CTRL+V [10.05.2008 19:31]
[Tags|, , , , , ]

Free Image Hosting at www.ImageShack.us

© [info]akuaku
Вот не знаю как вам, а мне эта жаба ну очень нравится х) Есть в ней что-то такое завораживающее и даже возбуждающее. Нет, вы только посмотрите как она сидит, вся сосредоточенная такая, губки надула, ммммммм... *растаял* х)))
(Если что, это Paris Hilton).





Ада Ловелисс, дочь лорда Байрона (того самого) считается первым программистом в истории человечества. Она создала несколько алгоритмов для счетной машины придуманной Чарльзом Бебиджем, "Аналитическая машина", а также увидела в этом изобретении прообраз general-purpose компьютера.



[info]owirj довольно таки часто постит музыкальные видео, где люди очень странно играют на гитаре.
Как он мне сказал, такая техника называется fingerstyle. Я прочитал на Википедии, что fingerstyle — это просто когда не аккордами, не медиатором играют, а пальцами, цепляя струны по-отдельности.
Но это не то. Эти видео объединяют две характеристики: гитары акустические, но подключены к усилителям и возможно добавлен эффект эха; для извлечения звуков, гитаристы пользуются не только струнами, но и всей гитарой целиком, причем похоже у каждого гитариста есть какие-нибудь свои фишки .
Ничего подобного я раньше не видел.
В итоге получается какая-то такая очень мелодичная, релаксирующая, затягивающая и я бы сказал атмосферная музыка, у меня лично вызывает ощущуние что я стою где-то посреди зеленой долины и ветер тихонько напевает мне мелодию.

Короче это легче показать чем объяснить (особенно хорошо видно что я имею ввиду во второй части видео, в песне Sprinter (но первая нравится мне больше)):

Taiwan live 2003 part 1 - Isato Nakagawa (YouTube)

Короче я проникся о_о



Досмотрел наконец-то Hayate no Gotoku (Hayate the Combat Butler). Ну что, прикольный сериал, оч веселый. Хотя мне лично показалось что последняя треть была уже немножко хуже, хз, мож у сценаристов идеи закончились, а может мне просто смотреть надоело =)
Сериал просто напичкан references to popular culture. В каждой серии как минимум раз пять упоминаются разные аниме, игры, известные фильмы, актуальные социальные явления и т.д.
Главная героиня ведет hikikomori образ жизни — most of the time сидит дома, читает мангу, смотрит аниме и фильмы, и играет в видеоигры.
Пока смотрел его, нащелкал сто тыщ миллионов скриншотов, вот лишь малая часть из них.

Free Image Hosting at www.ImageShack.us
Famicom (японский NES)
Free Image Hosting at www.ImageShack.us
РЕСПЕКТ х))
Free Image Hosting at www.ImageShack.us
Hadouken!!!
Free Image Hosting at www.ImageShack.us
:3
Free Image Hosting at www.ImageShack.us
:32
Free Image Hosting at www.ImageShack.us
УГ НЕ ПРОЙДЬОТ!!!11!
Free Image Hosting at www.ImageShack.us
Давным-давно, в далекой далекой Японии...
Free Image Hosting at www.ImageShack.us
"У нас нормальная школа, так что девочки иногда покаряют время" х)
Free Image Hosting at www.ImageShack.us
This is madness!!!
Free Image Hosting at www.ImageShack.us
Слабо?
Free Image Hosting at www.ImageShack.us
YouTobe <3
Free Image Hosting at www.ImageShack.us
Хоршо клюет!
Free Image Hosting at www.ImageShack.us
Склеил из трех скринов х)
Free Image Hosting at www.ImageShack.us

Это персик.
Free Image Hosting at www.ImageShack.us

Это плевок верблюда.


Наги, одна из главных героинь, рисует мангу главный персонаж которой мягко говоря необычен. Это мускулистый парень с косичками и женским именем О_О
Я так и не понял рассматривает ли его Наги как парня или как девушку О_О

Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us


Это не первое аниме которое я вижу, в котором главный герой рисует аниме — в School Rumble тоже такое было.
И с этим связан такой прикол: гулял я как-то по френдам и ВНЕЗАПНО очутился на домашней страничке какого-то инженера из Японии, работающего в области embedded.
Дык вот, он там выложил свои рисунки, и рисунки эти очень даже не дурны (для технаря то).
Эт что получается, все японцы умеют рисовать мангу? =_=

Free Image Hosting at www.ImageShack.us
Link/* read 28 comments || leave a comment */

Какбе, лес безопасносте!!!1!!одинодин [08.05.2008 16:54]
[Tags|]



А ты, нарисовал Теме жабу?! .оО
http://tema.livejournal.com/95824.html
Link/* read 24 comments || leave a comment */

[04.05.2008 03:22]
[Tags|, , ]

Ааааыыыаа, ввел в YouTube-серче "eurobeat":

Mickey Mouse EUROBEAT Version (YouTube)
Link/* read 6 comments || leave a comment */

[04.05.2008 03:07]
[Tags|]

Нет, это все-таки болезнь.
Проснулся утром, решил комп не включать, а сначала поучиццо и вообще занятся чем-нибудь другим для разнообразия. Все время ловил себя на мысли что хочу включить комп. Мне НАДО было включить комп. Но я сдержался. Потом решил сделать небольшой перерывчик. Почту проверить, на комменты ответить. Очнулся только сейчас.
Link/* read 12 comments || leave a comment */

Crime and Punishment [02.05.2008 17:29]
[Tags|, ]

So I get off 15-th trolley, wondering why there are so few people today in public transport... Walk up to TSI's entrance and as soon as I walk up — this guy walks out of the building and locks the door behind him.

He notices me and he's liek
— Can I halp you?

And I'm liek
— Please don't tell me today is a day off?..

And he's liek
— Why yes it is

And I'm liek
— (=_=")

I skipped the whole week and decided to finally come to lectures today, and here.
Funny how life puts you back into your place and punishes you for your bad behaviour.
Link/* read 11 comments || leave a comment */

[02.05.2008 05:50]
[Tags|]

I've just taken a shower and I feel very energetic and refreshed.
Since it's 05:50 -- there's no point in going to bed -- I have to get up at 07:00.
But it's not a problem! I'm still young, so I have plenty of health yet to spend =)

Oh. Wait. No. I'm actually starting to get sleepy *yawns* Veeery veeeeeery sleeeepy Mhm Man, i wish i haoh, oh, that wash nasd nnnnnnnnnnnnnssssssssssssssssssssssssssssssssss
Link/* read 6 comments || leave a comment */

TEH ULTIMATE FRIENDING MACHINE! [01.05.2008 23:22]
[Tags|, , ]

Free Image Hosting at www.ImageShack.us

The maximum amount of "friends" I've seen so far was something like 5000. But this... This is madness! >_<
Link/* read 34 comments || leave a comment */

OpenBSD 4.3 [01.05.2008 02:24]
[Tags|, , ]

Ыыы! Несколько часов назад вышла OpenBSD 4.3!

С утреца буду обновлятся, в этот раз при помощи RAM-disk kernel'а. Ничего удивительного в таком способе нет, это фактически тоже самое что инсталлировать/апгрейдить с CD -- там тот же самый ramdisk и используется. Но вместо мороки с записью CD -- можно скачать этот ramdisk, кинуть его куда-нить в корень и загрузится в него -- и никаких дисков и вообще ничего не надо.
Link/* read 3 comments || leave a comment */

2001: A Space Odyssey [28.04.2008 00:20]
[Tags|, , ]

Это наверное один из самых странных фильмов что я видел.

Я думаю его не надо пытаться объяснить или понять. Его надо просто созерцать, прочувствовать и впитать в себя =)

Отдельного разговора заслуживают спец-эффекты. Трудно поверить что фильм снят в 68-ом году. Это самый красивый, самый настоящий космос что я когда-либо видел. В современных фильмах уже не используется ничего кроме CG. Но от CG ощущения какие-то ложные. А тут... Холодная, черная бездна. С одной стороны. Невероятная легкость и воздушность с другой стороны. Короче это надо видеть.

Маст-вотч.

Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us
Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us
Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us Free Image Hosting at www.ImageShack.us

Еще, гулял по википедии, по поводу парадокса Ферми: представляете если мы и вправду одни во Вселенной? Вы только вдумайтесь в это. Единственные разумные существа во Вселенной.

И теперь понятно откуда Elite черпал вдохновение.

Олсо, ссылка: The 10 Most Prophetic Sci-Fi Movies Ever.
Link/* read 16 comments || leave a comment */

how do i made led matrix? ¯\°_o/¯ [26.04.2008 01:15]
[Tags|, , , , , ]

Two days ago I came up with this idea of making a 4x4 LED matrix. Yesterday I soldered it together and today I wrote a demo program.

(Yeah, I know they sell pre-made ones.)

This is the first time I actually made something, that you can call a device. Before now, I would just assemble the circuit on my breadboard, play with it for a few hours and then disassemble it. And the circuits I assembled could hardly be called 'devices' since they were usually intened for a one time demonstration or something like that, not for a long-term functioning.

Components I used: standard logic integreted circuits (IC's), namely, two 74HC373 (a "latch" ("защелка")) and one 74HC04 (the NOT gate); sixteen 220 Ohm resistors and sixteen LEDs.

The principles behind it are as follows: since the LPT port has only 8 data lines, we can't obviously operate on all the 16 LEDs at the same time. So we need to either switch between them very fast, or we need to find a way to preserve the information on the one half of the LEDs while we are working with the other half. I chose the second option, because it's easier to program, and because with the first method -- the computer would need to run in an endless loop and that would consume CPU power and... Well, I just felt like the second method would be more appropriate.

Soldering time: around... 10 hours. Those small wires were a real nuisance =_=
Programming time: around 4 hours.

Photos.

Planning how to arrange elements:
Free Image Hosting at www.ImageShack.us


The isolation on wires melted ofcourse:
Free Image Hosting at www.ImageShack.us


CONSTRUCTION COMPLETE:
Free Image Hosting at www.ImageShack.us

Free Image Hosting at www.ImageShack.us


The back:
Free Image Hosting at www.ImageShack.us


Schematics:
Free Image Hosting at www.ImageShack.us


Here's A VIDEO of the device, demonsrating a scrolling "HELLO WORLD" string.

And here's the source code of the program that does that.

usage: ./ledmtrx [-t delay] [-s || -b || -d || -r || -D] data

        -t delay -- delay for scrolling or substituting display modes, see below
        -s -- default mode, scroll text; 'data' is the text to scroll
        -b -- display text by substituting chars; 'data' is the text to display
        -d -- display an individual char; 'data' is the char
        -r -- raw; 'data' is an unsigned short value to write to the matrix
        -D -- display a demo; 'data' is ignored



This thingie has some serious weak points. I bought clear LEDs, but I should've bought diffused LEDs, then it would look much better. And it's too small. I'm thinking of making an 8x8 matrix.


Also, my cat:
Free Image Hosting at www.ImageShack.us
Link/* read 10 comments || leave a comment */

[23.04.2008 15:46]
[Tags|]

Удивительный день какой-то.

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

Поехал в argus.lv купить парочку микросхем да светодиодов. Я уже уходил, как вдруг в магазин зашли две обалденно красивые девченки, вроде старшеклассницы. Что они там искали, в мире микросхем, пассивных элементов, кабелей и электро-аппаратуры — одному Богу известно.

Еду в трамвае, вижу — жених с друзьями, все в костюмах, садятся в новенький, блестящий, только что с завода... Жигуль.

Что-то еще хотел написать, но забыл.

UPDATE:

Вспомнил. В трамвае я видел бритого налысо мужика, которому на вид было 45-50 лет в кэпке.
Link/* read 9 comments || leave a comment */

how do i accessed I/O ports in OpenBSD? ¯\°_o/¯ [21.04.2008 17:25]
[Tags|, , , , , , ]

I just solved the greatest mystery of the Universe: how do you access I/O ports in OpenBSD? x)

I'll start from far away.

There's this HUEG, multi-volume book, called "Intel 64 and IA-32 Architectures Software Developer's Manual". It's freely available on Intel's website: http://www.intel.com/products/processor/manuals/.
You can find everything you'll ever need for programming i386 processors there.

There are several modes in which i386 microprocessor can work: "real" mode, "protected" mode and real mode emulation mode "vm86".
All modern operating systems work in protected mode. MS-DOS used to work in real mode. In real mode — you're basically free to do anything you want, for example, you can erase the whole hard-disk and no one will stop you. Obviously, this is not very secure, that's why protected mode was introduced.
In protected mode, there are 4 (I think) rings of protection. The smaller the number of the ring, the more you are allowed to do. OS's kernel runs in ring 0, drivers run in ring 1, drivers which don't need high privileges run in ring 2 and user applications are run in ring 3, which is the most restrictive ring.

Every running application, has several data structures associated with it in memory. These data structures define what privileges does the application have and, uh... Well, other stuff x)
These data structures are maintained by the operating system, and can't be modified by the application directly, but the application can ask the OS to do this.

So. According to the Intel's Software Developer Manual Volume 1, Chapter 13, when the processor is running in protected mode, there are 2 mechanisms which regulate the access to the I/O ports: the I/O privilege level (IOPL) field in the EFLAGS register and the I/O permission bit map of a task state segment (TSS).

There are two ways to gain access to I/O port(s): either raise the IOPL field to be greater or equal to the Current Privilege Level (CPL) of the current process, either modify the bit map to enable access individual ports.

In OpenBSD, IOPL can be changed with the help of i386_iopl(2) system call, and the permission bit map can be modified with the help of i386_set_ioperm(2) system call.

As I understand, the i386_iopl call changes the IOPL field permanently, and doesn't change it back to the initial value after the process ends. So it's better to use i386_set_ioperm, because it modifies the permission bit map only for the current process.

For i386_iopl call to succeed the caller process must be run with root privileges or the system's securelevel (7) must be set to less than 1 and the machdep.allowaperture sysctl must be set to more than 0.

Here's a little test program, which can read and write an I/O port (checked it by connecting leds to LPT port — it works =)
Usage:
./portio out <port> <value>
./portio in <port>

portio.c source code )

Compiles like this: cc portio.c -o portio -li386

P.S. One of the reasons why I wanted to learn how to access IO ports under unices, is that they have a nanosleep(2) system call which might come in very handy when writing a program which will communicate with high-speed electronic devices.
Link/* read 10 comments || leave a comment */

[18.04.2008 11:40]
[Tags|, , , , ]

Two random songs by Ayumi Hamasaki I stumbled upon and liked very much (links to DailyMotion.com).
No Way To Say
Jewel
Link/* read 4 comments || leave a comment */

MISSION ACCOMPLISHED [17.04.2008 23:22]
[Tags|, , , , ]

Yesterday, I decided to learn how to program sockets under UNIX (Actually, I've been planning to do this for at least 100 years =_=)

So I sat down, pointed my browser at FreeBSD's Developer Handbook, read the whole thing about sockets and tried out all the examples.

And today, as a matter of practice, I wrote a minimal netcat clone.

Netcat — is a famous network utility. Despite it's simplicity, it has a very broad application range. It lets you connect to remote computers using either TCP, either UDP protocols, to the specified ports and to send in any kind of data. Same goes for opening a port on your local machine.
For example, it can be used to: transmit files; check if the port is open; scan ports; manually "talk" to the daemon on the other end; write all kinds of cool, internet-aware shell-scripts; etc.

The hardest thing was to do the I/O multiplexing, that is, to make it so that you can receive data from the port and send it into the port simultaneously. I almost figured it out by myself, but I had a few... Well, not exactly mistakes, but rather misunderstandings of how the system calls read and write work when applied to the socket. So I had to peek at the real netcat's source code.

Useful manpages: socket(2), connect(2), poll(2) (this is the system call for doing IO multiplexing). You should be able to find everything else that's needed by following links in these manpages.

Screenshot of my snetcat in action. This is a little trick I learned over 9000 years ago from the russian "Hacker" magazine (Xakep) (well, ok, this is not actually a trick, this is what SMTP is, it's a very old protocol, which, I think, even predates the WWW, it wasn't designed with security in mind, and as you can see here, they even made it so that a human could manually send a letter).

Free Image Hosting at www.ImageShack.us

Woooah! An e-mail from Neo?!

Free Image Hosting at www.ImageShack.us

Here's the source code and OpenBSD binary: snetcat.tar.gz (5 KB).

Programming in C under UNIX... feels very right and good o_o
Probably beacause C is the language in which they all are written, and because UNIX is very old, and so, how to say this, it has a lot more experience put into it.
Link/* read 4 comments || leave a comment */

how do i interpreted script? ¯\°_o/¯ [15.04.2008 20:17]
[Tags|, , , , , ]

A few days ago, I got curious as to, how do you make a script interpreter?

I could think of only two ways of how to do this:
  1. Load the whole file, compile it into, eh, I don't know how is this called, intermediate-code? Like, a linear array of structs that would look something like this:

    struct tag_cmd{
    unsigned char opcode;
    void *operands;
    };

    And then the program just traverses this structure.

  2. Read the file line by line, executing individual operators.


I chose the second method, because with the first method, it's like doing the job twice, first you compile it (and you could execute it already), then you execute the compiled code. And I'm a very lazy person ^^
But I think the first method would be much more efficient with big and complex scripts.
And the best solution is probably to combine both methods, for example by comiling only the current block of code.

So I made up a script language with 3 operators: 'print', 'for' and 'read'; and one keyword: 'var', for declaring variables.

At first, I wanted to thouroughly plan the program before coding it. But I failed, as always =_=" As the result, the code is not the prettiest in the world, in fact, it's rather ugly and there are a lot of things which could be done in much more clever ways.

I didn't quite finish it, for example, the function which evaluates arithmetical expressions, executes every operation in the order which it is written, like the expression "2 + 1 * 3" will evaluate to "9", instead of "5".
And the expression that follows the 'print' operator is assumed to be arithmetical, so you can't print out the contents of your string variable.
Also, I spent a hell lot of a time on writing the dynamic array and stack implementation, since C is a very primitive language and it's standard library is primitive compared to other languages too and it doesn't have anything like that. After writing the dynamic array and stack, I understood that I could've made things easier and all that complexity wasn't really necessary.

Conclusion:
  1. If you fail to plan, you plan to fail.

  2. Making a script interpreter is not so hard.


Screenshot:
Free Image Hosting at www.ImageShack.us

Written in C. Here's the source, just in case: interpreter.zip (87 KB).
Link/* read 12 comments || leave a comment */

[14.04.2008 20:52]
[Tags|, , , , , ]

The third ending of Hayate no Gotoku is lovely! :3

Here it is: Hayate no Gotoku ED3.
And here's the promotional video of this song: Kaori Utatsuki - Chasse.

Oh and, The Vapors - I think I'm turning japanese x))
Link/* leave a comment */

[13.04.2008 13:57]
[Tags|, , ]

Tried to draw a fox. Here's the result =_="

  ,     ,
 /\,..,/\
(        )
 \  @ @ /
  \  v /- ' - - -- ...,,
   \ _/                 '.
       \                  : 
        '.   _ _ _ _ . '' :
          || |      || | \ \
          || |      || |  \ \
         - - |     - - |   \ \
        ',',./    ',',./    '"


Also, an octopus.

       .---.
      / * * \
   .-'   O   '-.
  /,/:/:||:\\:}\\
 //(:}{:)}:}{:) \\
({  \) \}(}  \} })
 {  }   } \   } {
Link/* read 8 comments || leave a comment */

navigation
[ viewing | most recent entries ]
[ go | earlier ]