Re: [dev] cannot run st

From: pancake <pancake_AT_youterm.com>
Date: Tue, 05 Feb 2013 14:00:04 +0100

Sorry for the late reply, I was busy having a life and playing with my
children.

On 01/24/13 19:46, Christoph Lohmann wrote:
> Greetings.
>
> On Thu, 24 Jan 2013 19:46:30 +0100 pancake <pancake_AT_youterm.com> wrote:
>> i've been quite busy these last months.. so i was a little disconnected
>> from the suckless development... but several months ago i tried to run
>> st on OSX without success.. and today i tried to run it on linux
>> (voidlinux) without much more luck.
>
> I am sorry to distract you from maintaining your ego.

Ego? If you read carefully my mail you will notice that I cared mostly
nothing about my public image by sending a quick mail without providing
any deep investigation on the issue and just telling that's broken, but
anyway.

>> I get the same error on both systems, but looks like it works on Ubuntu
>> and other bloatware distros, so i guess there's something in st that
>> dislikes distros from scratch.
>>
>> I asked in the irc, but nobody helped there, looks like i'm the only
>> retarded with that problem, but it's quite anoying, mostly because it's
>> the only program i have problems to run. i use terminals every day
>> without any single issue, and i tried to run rxvt, xterm, vte, ... and
>> all them work just fine.
>
> Two years ago I had respect for your experience in software and debug‐
> ging. But this seems long gone. You are telling me nothing in the last
> sentences, except that noone cared for your ego and suckless should
> fucking care for you because you are you. Have you really forgotten your
> roots and are now a Mac OS X dumbass that wants everything now. IRC is
> not for sissies.

I'm sorry if my words offended your prejudices. I'm really sorry that
you got any respect on me. Maybe you know better my roots than me, but i
had a life before entering this mailing list. Maybe I had more spare
time, but now i work 10h and sleep 3h and the rest is for family and
personal stuff. And yeah, i use OSX because the only computer i have is
the laptop from the work.

All what i use in OSX is iTerm2 and the fullscreen browser. If you check
my repositories you will see that i still commit in my projects and that
a reported bug that segfaults or just impedes to work doesnt takes more
than 1h to fix in my projects. Yes. I like to get things done quick. And
probably I sleep few hours, but i'm still a console junkie and I
probably use more different UNIXes than you, because looks like I care
about portability and you look obsessed with your linuxisms.

And yeah, i have several other non-phisical boxes and none of them is
running archlinux, ubuntu or debian or any other crappy distro, i work
on one did my a friend which is generated from scratch. I also manually
build the firmwares of my routers, but yeah.. you know a lot about me
and i'm a lazy OSX guy that wants everything now.

Btw. linux is not unix, it never tried to be, and last changes are
proving this, but anyway, and i'm sorry to say that, but linux is
bloated, so avoid those OS wars because none of us is a saint here.

IRC is for not for sissies definitively. is for zombies. For stupid guys
who left screens open on remote servers for months without asking or
asnwering anything on the chan. But hey! i'm there! wasting resources!

> Btw. »works (in all of them) just fine« is no fact that gets to any so‐
> lution. So forget that kind of argumentation for the rest of your life.
> No, it never works and only annoys me to fix your bug.

I didnt told you to fix anything for me, my mail was just trying to know
if anybody else had the same issue and I know commenting setlocale is
probably not the right fix, but at least makes it works, and afaik other
people complained about having launch time issues because of this line.

>> The error I get is this:
>>
>> $ st
>> XOpenIM failed. Could not open input device.
>>
>> So.. I tried to find the bug and here it is:
>>
>> run:
>> //setlocale(LC_CTYPE, "");
>> XSetLocaleModifiers("");
>> tnew(80, 24);
>>
>>
>> just commenting the setlocale() makes st to run, so XOpenIM fails
>> because of that. (wtf)
>
> As said above: You’ve lost your whole experience to dig deeper into
> problems. Please try to find back to your old skills and debug down to
> X11 why your X11 input method fails to initialize. This might help to
> find a better solution than to comment out random functions not directly
> connected to the problem.
>
>> I guess this is not the correct solution, what is the purpose of this
>> setting the locales?
>
> Tell me. This is suckless and not your Vala or Gtk support forum for
> people without any principles.

Ok, let's spend some time investigating the bug.

according to setlocale, setting "" just inherits environ from the shell,
so unsetting LC_CTYPE in the shell that runs st fixes the startup. (its
not an OSX issue only. because it happens me on linux too).

i have straced both executions (with LC_CTYPE set to en_US.UTF-8, and
another with value set to C) the diff shows the following:

  - /usr/share/X11/locale/locale.alias is loaded (in enus.utf8 mode)
  - also /usr/lib/gconv/gconv-modules is parsed

at the end, before the exit_group syscall there's the big different ..
which tries to load a different library from /usr/lib/X11/locale/common

   - xiiimp.so.2 (utf8) (file does not exists)
   - ximcp.so.2 (C) (works fine and start is ok)

the library it tries to load is the one that handles chinese, japanese
and korean for input methods (chineese, etc..) fmi:

   https://en.wikipedia.org/wiki/Internet/Intranet_Input_Method_Framework

This is deprecated stuff, and was packaged in the im-sdk project.

By googling a bit i found that java, xterm, gvim and firefox had similar
problems. Also affecting Solaris.

By recursively grepping inside /usr/share/X11/locale it's easy to find
the reference to the xiiimp. Here's a referenc

A little more googling drive me to this url:

http://www.linuxhorizon.com/2-debian-linux/146c1eefe722ee04.htm

Which reveals the problem is that X are compiled incorrectly (using the
--enable-loadable-i18n flag) which is deprecated but the crappy code is
still living in Xorg.

Mistery solved. hope this investigation helps someone, and well, i guess
you are not going to fix this because it's not a bug in your program,
but a bug in X.

>> PD: the default font is not installed on OSX by default and without
>> antialias it looks like crap
>
> Thanks for suggesting a better font. Now I can really find out how to
> fix this because everyone owns Mac OS X in your small world. No, there
> are people that do not own Mac OS X and will never own Mac OS X. Thanks
> for wasting my time.

For your information, in OSX, as well as in OpenDarwin, the installed X
is just a plain X server, Liberation comes from redhat and it is not a
font you will see installed by default in a linux from scratch or any
decent distro.... oh wait, it comes installed with LibreOffice too!
pretty smart software bro.

>> PD: i wrote a terminal image viewer (tiv) just to have fun with some
>> ascii-art rendering algorithms, so i did it in Vala and uses Gdk to load
>> images (yeah, i will rewrite it in C at some point, but just wanted to
>> do it fast and focus in the image processing code). The program renders
>> the pictures in plain text, ansi16, greyscale and ansi256. Works fine in
>> st :) you may find the source here:
>>
>> https://github.com/radare/tiv
>
> For short: You will never rewrite it because you will never find any
> time to do so. But you did it in some obscure language and try to infil‐
> trate suckless computers with your shortcomings of C inexperience and
> not working time management. Thanks for wasting my time with your bloat.
> I really get horny when I see long commandline options.

Oh, really? your lack of faith is disturbing. Also the lack of
mind-openness to read something which is not written in C or
shellscript, even if the syntax is 90% the same and the generated code
is pure C that compiles with no extra dependencies. But anyway, i spent
the train travels from home to work to do the rewrite.

So, now depends only on libjpeg, which is far less than depending on
gdk, but the api is less nice and it doesnt handle png or gif, but
anyway, usually the pr0n is distributed in jpg format, so it's ok for tiv.

Check the repo again, close your eyes when you see the vala file

   https://github.com/radare/tiv (stiv-jpeg.c)

And yeah, the code and the build system is pure crap and needs to be
cleaned up, but hopefully it will not make you puke again.

Until next month I have to finish several other proejcts and prepare a a
training course (in my spare time), so i guess this time i will not have
time to clean the code until march. This is just a task of few hours,
but im sure nobody will care, like when i did sup, swk, or dmc or many
other suckless projects i contributed with 0 feedback or interest.

But anyway, i do this for fun, and because i can, not for ego, not for
money, not to contribute to the human being and not to make you happy.
All the shit I do is mostly for fun, so I give a shit about your
careless support for your software.

Btw, Vala is not obscure, is pretty clear language, with syntax simpler
than C that compiles to C without much bloat (compared to c++, go, or
many other langs out there). But yeah, it is not suckless because it
have long opts.

I do C for more than 14 years, but sometimes i like to have fun, and
play with drugs, I recommend you to take some mescalina, lsd or just
plain thc. Or just masturbate yourself with a soap bottle before
replying such shit. It will relax your nerves.

Sincerely,

--pancake
Received on Tue Feb 05 2013 - 14:00:04 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 05 2013 - 14:00:06 CET