Friday, December 30, 2005

(x)MinGW progress

Current xmingw ebuilds completed:

  • sys-devel/automake-wrapper-xmingw-1
  • sys-devel/gnuconfig-xmingw-20051113
  • sys-devel/automake-xmingw-1.8.5-r3
  • sys-devel/automake-xmingw-1.6.3
  • sys-devel/automake-xmingw-1.5
  • sys-devel/automake-xmingw-1.4_p6
  • sys-devel/automake-xmingw-1.7.9-r1
  • sys-devel/automake-xmingw-1.9.6-r1
  • sys-devel/libtool-xmingw-1.5.22
  • sys-devel/autoconf-wrapper-xmingw-3.2
  • sys-devel/autoconf-xmingw-2.13
  • sys-devel/autoconf-xmingw-2.59
  • dev-libs/expat-xmingw-1.95.8
  • dev-libs/glib-xmingw-2.8.4
  • dev-libs/libiconv-xmingw-1.10
  • sys-devel/gettext-xmingw-0.15_pre0 (this took the longest time)

Ebuilds in progress:

  • sys-libs/zlib-xmingw-1.2.3
  • dev-util/pkgconfig-xmingw-0.20

Email me or comment on this post if you wish to have me make up some sort of way to have these ebuilds available publicly.

Tuesday, December 27, 2005

Re: Why Use GTK+? (and some possible solutions to some problems)

I will post about my development-related progress in a bit, but for right now, I'd like to focus my attention on the flamewar-generating article via Slashdot.

I don't really know why they even bother posting those kinds of articles; they only serve to feed trolls. I don't really know why I even bother to read the comments on those articles, but whatever.

Generally, I am uncomfortable with software that has "evaluation" versions. I am quite aware that there are non-commercial versions, but given my college student mentality, I don't really like crippled things that I have to pay for (or pirate, but I wouldn't do that - just pointing out the current college student mentality) to get a "full" version.

I don't really understand the people who say that GTK+-based programs don't integrate well with Windows; if anyone can help clarify that particular position, that would be wonderful.

Personally, when I do GUI programming, I use PyGTK and Glade. The only thing that annoys me from a programming perspective is how gtk.TreeViews are so hard to work with in list mode.

The main thing that bothers me about GTK+ for Windows is the number of runtimes available. It would be very nice if all of the installers for the GTK+ programs built for Windows could detect whether any sort of runtime was available, and if not, offer to download and install all the components needed. For example, MalDC needs the GTK+ and libglade DLLs. AFAIK, only the GTK+ runtime from the Glade for Windows project at SourceForge. If the installer can't detect their runtime, and can't find the libglade DLL in the %PATH%, it should download it to a common (read: standard) place where all of the GTK+-related DLLs should be. Maybe if I ever bother to learn NSIS syntax, I'll write a macro for that.

Sunday, December 18, 2005

Resuming MinGW work

Winter Break gives me a lot of time to do absolutely nothing, and I finally configured a cross-compiler for MinGW on my Gentoo box, so my work on compiling stuff for MinGW will resume. I think I'm going to make some custom ebuilds for all this stuff, because there's a lot of repetition within all the ./configure && make all install stuff.

Details: Overlay (in subversion?), putting all ebuilds in the category dev-xmingw. Also have eclasses that do stuff like split-debug and handle all the common functionality.

Something else I should consider is a cron job that dumps the bzip2'ed overlay to my webspace. That shouldn't be too hard.

Saturday, December 17, 2005

An Intelligent Lockdown Daemon (for Linux)

(Note: this is adapted from an assignment I had to do for an Informatics class)

I've had an idea mulling around in my head for a long time about how to get my productivity up, considering how much time I waste on the computer. Several window managers/desktop environments on Linux come with "kiosk settings" (e.g., Xfce, KDE) or "lockdown editors" (e.g., Pessulus for GNOME), where one can set up an account that limits the access to certain programs and certain functionality. My idea is to extend that system so that there is a mode where a person can lock down their desktop until a certain task has been completed.

For instance, say that I am writing an essay, so I activate the lockdown daemon and select "finish (word processing) document" in the "tasks to complete" list. A tab would be added to the dialog that contains details about the document task, e.g., how long should the essay be, what font, margins, etc. When the lockdown is complete, I will only have access to the word processor(s) installed on my computer, the folder specifically designated for word processing documents, and perhaps a remote (e.g., SFTP) folder for document backup.

Because of the way the freedesktop.org menu standard is set up, it should be trivial to create groups of applications, such as word processors. It should also be trivial to set up the firewall so that one can only access a certain remote server containing the aforementioned backup directory.

The non-trivial parts are more interesting. I am not sure how one could restrict loading programs on the fly, or even restrict sections of the hard disk dynamically without affecting other users who may be logged on to the machine concurrently. Also, there needs to be a way for all of these applications to talk to each other (or at least the daemon) so that the daemon knows if the goal has been met or not. The D-BUS technology, when it reaches 1.0 status, looks very promising for this task.

Wednesday, December 14, 2005

Deepest Sender has just gotten better

I'm posting this through Deepest Sender, once a LiveJournal-only client for Firefox, now able to post to BloggerAPI-enabled and Wordpress-powered blogs! I eagerly await APP support!

Edit: Blogger thinks this is a spam blog! Wonderful.

Wednesday, December 07, 2005

Powerpoint/Openoffice + Presentations

So in one of my classes, I have to do a group presentation. We decided to go for the minimalistic approach, which led to having many more slides in our presentation than normal presentations: 188 slides, which translates to 33.6 megabytes. It seems that both Powerpoint and OO.o Impress have problems with such large presentations. Powerpoint couldn't copy/paste slides correctly between two large presentations, and Impress (2.0) just crashed trying to save in Powerpoint format, every single time I tried. I hate presentation software. It's too bad that it seems that S5 doesn't seem to scale.

Wednesday, November 16, 2005

For the Web 2.0 Freaks

Here's a suggestion: combine Facebook's friends visualization with Google Maps.

Saturday, November 12, 2005

Tagrolls

The sliders are awesome.

Filed in:

Tuesday, November 01, 2005

Quick Post: AtomAPI, Evince

I have too many drafts. If only a) the Blogger web posting method didn't mess up on my desktop and b) I got around to writing an AtomAPI implementation, I'd finish them...maybe. I've actually gotten somewhere with my implementation, in that I actually started writing an atom.format module in python. I'm rather stuck on IRI validation, but hopefully I can skip that for now and work on other things. Anyway, in doing my reading for one of my classes (which is also a factor in my lack of posts), I am very much loathe to open PDFs in Windows, simply because Adobe Acrobat is a slow, bloated piece of crap. I can't wait until they port Evince to Windows. I'd try, but a) I can't get poppler running correctly, and b) I'm swamped in my classes. Bleh.

Wednesday, October 05, 2005

Evince + Printing

Yeah...evince and printing don't mix. The PDF I printed out looks like I wrote it on a typewriter extremely poorly, then dittoed and scanned the result. Yay.

Tuesday, September 20, 2005

Currently Working on... and Update: MinGW and PyOpenGL

So apparently I forgot to document the process on how to build PyOpenGL on MinGW+MSYS.

  1. Install MinGW+MSYS.
  2. Install GLUT (Preferably compiled yourself).
  3. Install pyMinGW (Preferably compiled yourself).
  4. Download and decompress the PyOpenGL tarball.
  5. Edit config/win32.cfg so that {include,lib}_dirs points to your GLUT base {include headers,libraries} path, e.g., C:/msys/1.0/local/{include,lib}, add a variable under those named extra_link_args that contains the locations of your Python library and your OpenGL library (that comes with w32api), separated by " ", e.g., C:/msys/1.0/local/lib/libpython.a" "C:/mingw/lib/libopengl32.a, and remove the value of libs in [GL].
  6. Run python setup.py build -cmingw32 && python setup.py install.

Much simpler than some software, trust me.

Also, I am currently working on an S5-building tool using PyGTK. Should be "ready" pretty soon; the hard part wasn't the S5 parser/builder, it'll be the pseudo-WYSIWYG editor.

Thursday, September 08, 2005

Update: MinGW, MSYS, GTK+, and "gcc.exe: : Invalid argument"

(14:30:53) malept: does anyone know why when trying to compile gtk+ on win32, running make results in " gcc.exe: : Invalid argument" on every single c file? Googling results in an unanswered mailing list question. (14:31:22) owen: malept; it's a libtool issue (14:31:43) owen: Sorry, pkg-config issue / msys bash issue (14:32:08) owen: http://mail.gnome.org/archives/gtk-devel-list/2005-January/msg00091.html - see Step 4 (14:33:08) malept: thanks, I've been trying to figure this one out for days

(note: above link does not go to that URL, it goes to the thread on gmane)

Edit: restored original link, because gmane screws up the syntax with its antispam filter.

Wednesday, September 07, 2005

Linux and Modems

At my house, all we have is dial-up for Internet access. After years of working with Linux, I am of the opinion that Linux hates modems. Sure, there's "support" for them, but it takes far too much of my time to set those stupid things up. With network cards, it usually "just works". There is no "just works" with modems. It took me months to figure out how to get the modem to work right when I'm not root with my gentoo box. When I was setting up my mom's box for Ubuntu, it put the modem in /dev/ttyS14. Why 14?! How the hell am I supposed to know that it's in /dev/ttyS14?! This is ridiculous. There needs to be a better way to do this. I've never had "autodetect" work.

/End rant.

Sunday, September 04, 2005

Update 2: MinGW and Expat

Given my recent luck with compilation, I decided to try expat yet again. So after another few hours trying, I got expat to compile and pass `make check`. And I didn't have to modify a single file. It pisses me off somewhat, but I'm rather glad I don't have to rely on the downloaded binaries anymore. All one has to do is ./configure && make LIBTOOL=/usr/bin/libtool all install. Simple, eh? The libtool bundled with expat hates MinGW (I believe that it thinks that all linking operations result in an executable), and if one tries to `libtoolize` and update libtool that way, the virus spreads to that one.

New Design; Update: MinGW + poppler

If anyone actually reads this thing, they might notice that this weblog's web page has been drastically revamped. I XHTML-1.0-Transitional-ized the HTML with the help of the W3C HTML Validator (to the best of my ability; the Blogger code contains a <br> somewhere, which sucks), and gutted the CSS. Interestingly enough, the W3C CSS Validator chokes on valid vendor-specific CSS, e.g. -moz-border-radius. Also, I'm testing out a tagging Greasemonkey script for Blogger.

Anyway, I took another crack at compiling poppler (with my newfound knowledge of autotools), and it seems that the #defined constant DATADIR is used in a win32api header, which sucks big-time. Fortunately though, I managed to get it to compile fully. As luck would have it, when trying to execute any of the test programs, it crashes. So, I've decided to rebuild everything I've custom-made myself with the debug flag (-g), so it'll be easier to track down runtime errors with Dr. Mingw, which is a very nice debugging tool, much lighter than gdb.

Oh right, my patch didn't get into PyGTK 2.8.0. Oh well.

Thursday, September 01, 2005

Bits and Pieces

  • If I'm lucky, I'll have my win32 autotools patch in PyGTK 2.8.0. Yay!
  • Being used to the linux terminal, I missed the usage of Home, End, and Delete. Fortunately, I found a mailing list post to enable them on MSYS's RXVT.
  • I'm probably going to write myself an AtomPP-based client in PyGTK. I need practice coding in things other than shell and m4, anyway.

[Edit: typoes]

Monday, August 29, 2005

python modules and MinGW-python

Currently working on getting autotools working for pygtk on MinGW+MSYS, and proving the PyOpenGL docs wrong by fixing their build for MinGW+MSYS. I'll blog the instructions in the future.

Friday, August 26, 2005

Re: When Printing Kills

When Printing Kills

WTF, Internet Explorer? Just... WTF?

Tuesday, August 23, 2005

Re: GoogleOS? YahooOS? MozillaOS? WebOS?

  • A local Web server to handle the data delivery and content display from the local machine to the browser. This local server will likely be highly optimized for its task, but would be capable of running locally installed Web applications (e.g. a local copy of Gmail and all its associated data).

Comments:

  • In my mind, this leads to one of three possibilities:
    1. Locally hackable code (remember Perl-based BB hacking to add functionality, before all this plugin architecture stuff?), because it's (probably) written in [PHP|Perl|Python|JSP|ASPX-formatted] code, with only a license/EULA to protect it
    2. Encrypters, i.e., obfuscators, for those languages (to protect IP)
    3. A return to CGI coding in C (for the same reason as the last one)
  • ISPs may have to up the upload rate limit because of the increased sending of data from the home computer to remote servers.
  • Again, one of two possibilities:
    1. all-SSL transfers in order to protect the wire protocol
    2. usage of a standardized wire protocol (e.g., SOAP) and encrypted data

Sunday, August 14, 2005

MinGW and {DLLs,freetype2,libgpg-error,libgcrypt,gnutls,libsexy}

Browser crash = post gone. Let's see if I can remember it. Or just summarize it.

  • libtool needs to add -no-undefined when making MinGW shared libraries because libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared libraries
  • Don't use the system zlib with freetype2. Bad popup dialogs happen.
  • libgpg-error needed its libtool updated because it thought I was using Cygwin. First point applies.
  • libgcrypt - first point applies. See this mailing list thread also.
  • gnutls is a bitch to compile.
    • #ifdef'd a Win32 version of getpass() from an old version of CVS (the program)
    • Ripped out mmap implementation from PlibC and its dependencies and stuffed them into src/cli.c. Took way too long.
    • Compiles fine as a static library, but as a DLL, I had to refer to the ld(1) man page to figure out how to get rid of DLL export hell with regards to stuff related to gnutls_compression_algorithms.
  • libsexy builds without incident (I think). Now to see how to make python bindings for it.
  • Public commenting enabled for the time being, as a test.

Saturday, August 13, 2005

Update: MinGW and freetype2/fontconfig

Just a quick note - I've successfully compiled freetype2 under MSYS and, by extension, the latest fontconfig. I'll post the shell scripts for both freetype2 (2.1.10) and openssl (0.9.8) on my website when I have some time.

Friday, August 12, 2005

Update: MinGW and expat

OK, I was going over the bugs for expat that had "mingw" in them, and it hit me that I should only do static or shared libraries, not both. Amazingly enough, doing ./configure --enable-static=no gave me an expat dll. Now to see if it works with anything.

Edit: Note to self - completely delete and re-untarball the source before trying stuff like this. I happened to make changes to the source and when I tried to compile it clean, I got a ld.exe: warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000 libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16' when trying to link the DLL. Bleh.

Edit 2: Gave up, followed the instructions in this expat bug to get MinGW libs out of the given DLLs.

[Edit 3: HTML entity fixes in links]

Thursday, August 11, 2005

aspell and MinGW

Aspell is a bitch to compile. I initially used this blog entry to get it compiled, then I found out that adding a flag to LDFLAGS (-Wl,--enable-runtime-pseudo-reloc) does just as much as the multiple changes to the LDFLAGS in the Makefile as described in the linked entry. I should, however, write a patch for the other things mentioned. ...maybe not, seems like it's in CVS. I should try compiling that.

Tuesday, August 09, 2005

atk + libglade on MinGW

It seems that I forgot to put libglade on my list of packages that I was compiling. I kept getting this error about undefined reference to atk_set_add_relation_by_type. Turns out, as soon as I compiled against atk CVS (as opposed to atk 1.9.0, the latest release), the error went away. Grr.

Monday, August 08, 2005

Update: MinGW and glitz/cairo

So my glitz-not-compiling-with-cairo problem is solved, due to a closer look at the configure file; cairo-0.6.0 requires an unreleased snapshot of glitz (0.4.4). Joy. Time to go `cvs co` glitz.

Saturday, August 06, 2005

Re: What is Pythonic?

What the heck does "pythonic" mean? - What is Pythonic?

Apparently, I don't code pythonic-ally, per se. For the past several years, I've been coding more-or-less towards the PEAR coding standard, sans the "one true brace" style with function/method definitions, as I think it's just silly and I learned the other, supposedly eviler way. I've become kinda pythonic as I've migrated to python as my "it" programming language: I've learned to iterate through lists the python way (although python iterators per se still confuse me), I'm beginning to do the whole tuple (un)packing thing, and I follow packages are frequently namespace packages only, i.e. have empty __init__.py files.

With the PEAR coding standard, I can port most of that knowledge to other programming languages. With being "pythonic", sadly, not many languages have these sometimes convenient little shortcuts and nuances built-in to the language so that several of these points are simply not possible (IMHO).

Thursday, August 04, 2005

MinGW and things that compile

So I finally remember to use this damned thing. Here are the packages that compile cleanly in MinGW/MSYS:

  • libpixman
  • glitz (although it doesn't seem to compile any backends into it or get configured into cairo)
  • cairo
  • atk
  • pango
  • glib-2
  • zlib
  • gettext (I think)
  • libiconv

Here are the packages that I can't, for the life of me, compile the way I want them to or work weirdly afterwards:

  • libpng (I needed to use the makefile.mingw from the mingwPORT, I think)
  • jpeg (it just doesn't want to create a DLL, and there isn't a way to change that because I can't find a configure.ac so that I can change the libtool version)
  • freetype2 (had to find a webpage with instructions to make the DLL)
  • expat (copied the command from the freetype2 make
  • fontconfig (hates the freetype/expat dlls that I made)
  • gtk2 (every time it tries to compile a file, it errors out with "gcc.exe: Invalid argument")
  • libsvg (wants libgen.h, which MinGW doesn't have at the moment)

Compiling openssl was "fun". I made my own shell script to compile it because apparently they don't like it when you try to compile openssl in an MSYS environment, and I added a command that was referenced in a mailing list problem.

Notes on building poppler (0.3.3) with MinGW (stream of consciousness):

  • configure line: ./configure --disable-poppler-qt --disable-splash-output
  • fix up goo/GooTimer.cc with a gettimeofday()
  • patch splash/Splash{{,FT}FontEngine,FontFile}.cc, poppler/CairoFontEngine.cc to #include <io.h>, or else it won't find int unlink(char*)
  • Never mind, forget trying to compile Splash. For some reason, it doesn't like one of the gcc headers: /include/objidl.h:58: error: expected unqualified-id before string constant /include/objidl.h:58: error: expected `,' or `;' before string constant
  • It seems that the previous error happens again in poppler/[something]. I have really no idea why it happens. Giving up on compiling.

I can't type anymore. Brain fried. As an aside, must find/make Atom Publishing Protocol client...