The collected works of jimmer - Page 4

Hey All,

Following Hamei's excellent example, I'm rebuilding redbox and have decided to try and use as much as possible of the default software that IRIX 6.5.30 provides. So I'm currently using the default Ksh as my shell rather than trusty old GNU Bash.

Which is fine, except that life without <TAB> filename auto-completion is trying. Turns out that you can get most of that back in Ksh by hitting <ESC><ESC> rather than <TAB>. Well, after you've set your keyboard mode to EMACS as shown below.

I also like my prompt to tell me who I am and where I am, and my up/down arrows to recall my command line history. In Bash you get command line history on the arrow keys for free and you set your prompt with something like: PS1="\u@\h \w".

In IRIX Ksh (which is actually the venerable Ksh88) something similar can be achieved, but it's a bit more involved.

1. put the following into your $HOME/.profile

ENV="$HOME/.kshrc"
export ENV

2. create a $HOME/.kshrc and insert the following:

Code: Select all

function _cd {

# Stock IRIX ksh is ksh88. Which is old. Very old. If we want prompts that
# print the current working directory when we cd into them, a la modern
# shells, we need to hack around ksh's walking frame.
#
# 1. cd to the directory
# 2. colourise the prompt
#
# NOTE: "\cd" evokes the non-aliased version of cd

\cd $1
PS1=`colourised_prompt`
}

function colourised_prompt {

# 0. colours are pwetty.
# 1. winterm tends to be blue, so colour regular prompt to be cyan
# 2. for extra protection against idiot user error, colour prompt RED
#    when logged in as root.

USR=`whoami`

FONT_NORMAL="\033[0m"

if [ $USR == "root" ]; then

FONT_COLOURED="\033[31m" # red
PROMPT_CAP="#"

else

FONT_COLOURED="\033[36m" # cyan
PROMPT_CAP=">"
fi

echo $(print "$FONT_COLOURED$USR@`hostname`:`pwd` $PROMPT_CAP $FONT_NORMAL")
}

PS1=`colourised_prompt`

# Setup EMACS-style key bindings to get arrow up/down command history recall
EDITOR=emacs

alias __A=$(print '\0020') # ^P = up    = previous command
alias __B=$(print '\0016') # ^N = down  = next command
alias __C=$(print '\0006') # ^F = right = forward a character
alias __D=$(print '\0002') # ^B = left  = back a character

alias cd="_cd"


Like the Meerkat says; "Simples." :?
:Fuel: redbox 800Mhz 4Gb V12
hamei wrote: how to fix ?

Looks like an issue similar to the one we had when getting the newer Ted to compile. Can't help with solving though as I'm still relearning how to press the power switch on redbox .
hamei wrote: Can you ? Did you know that, at least on Irix, X will serve up Type1 fonts ? And we have those ? And they are better than Truetype ?


Since X11R5 (September 1991) Type1 fonts get served up by any bog-standard Xserver on all platforms regardless of DPS or DPShmesh.

Here's the README from ./contrib/fonts/lib/font/Type1/ of the X11R5 contrib tape :

This directory contains a rasterizer for "Type 1" (PostScript) format
outline fonts. It was donated by IBM for the R5 contrib tape and has
been maintained since then by the MIT X Consortium. This version is
compatible with X11R5 public patch 13.

To be used, this rasterizer must be bound into the X server and the font
server. It is most convenient to do this if this directory is moved
into the 'mit' directory tree (i.e., mit/font/lib/font/Type1, a peer of
the 'Speedo' directory). Of course, mit/font/lib/font/Imakefile must be
made aware of its new subdirectory and the objects in it. In any case,
you must ensure that the library mit/font/lib/font/libfont.a contains
this code.

In addition, the rasterizer must be "registered" with X. The source in
mit/fonts/lib/font/fontfile/renderers.c, specifically the routine
FontFileRegisterFontFileFunctions(), must be modified to add the line:

Type1RegisterFontFileFunctions();

after the call to "SpeedoRegisterFontFileFunctions".

Some Type 1 fonts have been donated; see, for example, the directory
contrib/fonts/scaled/Type1. In order to use them, they must be in the
font path, either by combining them in some existing font object
directory, or adding a new font directory to the path.


As to better or not, as has been mentioned before, theoretically TrueType should be better than Type1 on low-resolution output devices such as screens as its specification provides for extensive hinting instructions. In practice these hinting ops are hard to implement. Nobody, except a few type geeks and Microsoft when they still had deep pockets, gave a flying fornication about TrueType potential for uber Hinting. Furthermore, GIMP - the only X11 application I know to be hinting aware - invariably gives you better letterforms when you switch-off hinting and rely on Anti-Aliasing alone. So wether it's Type1 or TrueType, it's all a scalable font of some sort and you'll get the same real world performance out of them this weekend On A Screen Near You!
:Fuel: redbox 800Mhz 4Gb V12
vishnu wrote: Not to be too shallow or anything but Russian women are just so spankin' hot...


Happy to see that somebody out there is still able to put some life into the 'graphics' part of the name. Just a little sad that I have to use a cobbled together vanilla PeeCee instead of redbox to do my Virtual Worlds stuff. Oh well.
:Fuel: redbox 800Mhz 4Gb V12
vishnu wrote: I have finally prodded Maxwell into compiling and running on my Linux box.


3x Cheer.
hamei wrote: I use Tbird only because I have so much mail already in it


ehrmmm... IMAP not available in the Middle Kingdom?

Image
:Fuel: redbox 800Mhz 4Gb V12
Hey All,

GNU Bash 4.2.x seems to compile without fatal errors, but the resulting `bash` binary doesn't produce a ^C when you hit CTRL+C in winterm.

Have tried 3.2.56, 4.2, 4.2.10, 4.2.53 and 4.4-beta. All generate a non ^C producing binary.

Am calling configure as:

CC=c99 CFLAGS="-O2" ./configure

Can somebody hold my hand please?

PS. I know the Nekoware bash 4.2.10 notes state that it was compiled with -O1. Tried that, no dice.
:Fuel: redbox 800Mhz 4Gb V12
Solved by adding:

stty intr '^C' echoe

to .bashrc from .profile
Hey All,

Finally got round to installing a colourising ls. Here's the recipe:


0. get GNU coreutils 6.12 from http://ftp.gnu.org/gnu/coreutils

1. compile all of it:

CC=c99 CFLAGS="-O2 -mips4" ./configure

but install only the ls binary from $SRC/src

2. nedit $HOME/.Sgiresources:

winterm*background: #000020

3. nedit $HOME/.bashrc:

LS_COLORS='di=35:ln=36:ex=32:'
export LS_COLORS

alias ls='/your/installation/path/ls --color'

4. Log out/in to have it all take effect.


Enjoy :)
:Fuel: redbox 800Mhz 4Gb V12
dexter1 wrote: Also and this is much more concerning: People's code skills are not what it used to be ten years ago. I've noticed this on new people joining the University. It is what it is.


Even 10 years ago my code skills weren't what they used to be :) I've learnt new stuff over the years by just 'giving it a go'. By throwing together a few little programs, by reading the various techpubs manuals and by looking at other peoples code. It might be hopelessly naive, but the question for me is how do we get more nekochan people interested in even picking up their digital axe and having a go at the (IRIX) codeface?

Hamei, this is where you snigger and go "codeface, shmodeface, the kermunittee doesn't even test-run the stuff in nekoware/beta!" :)
:Fuel: redbox 800Mhz 4Gb V12
Oh wow, if I'd start coding Motif on OSX there'd be THREE of us. That's almost a Community :)
Just adding the proverbial $0.02...

OpenSSL-1.0.2e and OpenSSH 7.1-pl1 build cleanly on redbox with MIPSpro 7.4.4m. OpenSSL passes all the `make test` tests and the resulting ssh binary seems to work.

For OpenSSL I copied the 'irix-mips3-cc' target in ./Configure to a new 'irix-mips4-cc-n32' target and added "-n32 -mips4 -r16000 -O3" flags.
Not sure '-r16000' does much, but without '-n32' OpenSSL will be built to the 64bit ABI which in turn causes the OpenSSH 7.1-pl1 ./configure to fail when rld goes looking for n32 libraries that dont exist.

I built OpenSSL with:

./Configure irix-mips4-cc-n32
make
su
make install

For OpenSSH you will need a recent zlib. Mine is at 1.2.8 in /usr/local/lib. In order for openssh ./configure to find your new openssl and zlib you'll need to set the LD_LIBRARY_PATH environment variable to where they live.

In my case:

LD_LIBRARY_PATH="/usr/local/lib" CC=c99 CFLAGS="-O2 -I/usr/local/include" LDFLAGS="-L/usr/local/lib -rpath /usr/local/lib" ./configure
make
su
make install

From what I understand after reading a bit of `man ld`, the '-rpath' flag adds a list of colon separated dirs to the binary so that rld can find libraries in those directories at runtime without you having to set the LD_LIBRARY_PATH environment variable.

I'm sure the Nekochan Porting Greats have better and/or more flags and tips, but this worked for me.

J.
:Fuel: redbox 800Mhz 4Gb V12
shhhh vishnu, my dastardly plan was to draw him out from the shadows by referring to the Directories That Mustn't Be Named.

:)
:Fuel: redbox 800Mhz 4Gb V12
Congrats! - welcome to the 800Mhz Fuel club :)
:Fuel: redbox 800Mhz 4Gb V12
Hey all,

After some consideration I've decided to start a new coding project: a general purpose image viewer for IRIX. I do realise there are a bunch of other programs out there that already do good job, but by writing my own thing I'm hoping to increase my coding skill so I can maybe tackle a larger graphics-related project in the future.

I've considered refactoring/extending my Comix cbr/cbz viewer. But perhaps it's best to start fresh with a new Motif/ViewKit/C++ UI. I figure I'll use Graphicsmagick's magicke++ C++ binding to do any image manipulation. I know that IRIX has the image library and IFL but my primitive benchmarking seems to indicate that Graphicsmagick is almost twice as fast for the rotation/scaling stuff I might want to include in the viewer. And it gives me a ready-made Image class which offers a range of functionality for 'free'.

Of course there's a ton of things I need to read up about, but I thought I'd try the novel approach of asking the nekochanners for some advice and guidance first. Some of my specific questions are:

1. I'm not sure whether I should use OpenGL for this. And if yes, what parts of the application might benefit most.
2. I definitely don't know enough to decide whether I should be using glDrawPixels or quads & textures to display stuff.
3. Will I run into issues with memory handling for large images? Say, the 12 or 16 megapixel images that come out of my Lumix G6...
4. Though I'll be developing on my Fuel, should I be worrying about other IPxx at this stage?

Any advice and other topical hints/tips would be greatly appreciated.

J.
:Fuel: redbox 800Mhz 4Gb V12
Thanks all for your input. Much appreciated. I've decided to start by refactoring/completing Comix.
Long time. No new Comix tarball. But now I'm working on 0.4 and am bumping into my limited understanding/experience of OpenGL/C++.

I'm trying to implement the 'change background colour of the image window' feature by using the glClearColour/glClear pair of OpenGL functions in Viewer.C.

What I'm seeing is that glColorClear/glClear works fine on the first run though the code. ie. the image panel is set to grey (or whatever other colour) when Viewer::setBgColour() is called from Viewer::ginit(). However, when Viewer::setBgColour() is called from the right-click activated pop-up menu on the image viewer panel... nothing happens. I have a feeling it might be due to the relevant OpenGL context not being active, but I'm not sure how to go about fixing it as the context does seem to be set in the VkOpenGL::cb_* parent-class callbacks.

Any help and explanation as to what I'm missing and/or doing wrong here would be appreciated.

J
:Fuel: redbox 800Mhz 4Gb V12
Still stumped by the glClearColor/glClear issue, but have ticked off one more thing from the TODO list while I wait for help.

Comix 0.4.1
- added 'jump to page X' feature. Press 'j' to use.

J.
:Fuel: redbox 800Mhz 4Gb V12
Dum dum duh dum, duh duh dum, duh duh dum...
Yay! :)
Hey all,

Some minor progress was made on Comix over the holidays:

Comix 0.4.2
- improved configuration file handling
- adressed some of the issues with the temporary/unpack directory handling
- fixed a bunch of small things

For extra IMD-ness add:

Code: Select all

Comix*sgiMode: true
Comix*useSchemes: true
Comix*useEnhancedFSB: true

to your ~/.Sgiresources file and log-cycle or run:

Code: Select all

xrdb -merge ~/.Sgiresources
:Fuel: redbox 800Mhz 4Gb V12
Hey all,

Figured out the OpenGL issue, but am now back to C++ hurting my head. Sigh.

latest code:
:Fuel: redbox 800Mhz 4Gb V12
SGI Motif font defaults:

Code: Select all

menu font:  -adobe-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
label font: -adobe-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*
text font:  -adobe-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*

sub-text:   -adobe-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*


You will find that the replacements for Adobe Helvetica in most GNU/Linux distributions just aren't the same and that the modern X11 font anti-aliasing makes the motif UI stuff look much 'fatter' and 'blacker' - no matter what you do.

Like vishnu said, editres is your friend, though you may find that your GNU/Linux distribution doesn't install editres by default anymore.
:Fuel: redbox 800Mhz 4Gb V12
I should be working on any number or Real Life things, but instead I've been 'researching' EVE online, one of the games on my must-play-this-at-some-point list. Fascinating to see how CCP uses time as a game mechanic.
Just as an aside, Nedit ignores a _lot_ of the Xresources mechanism and has many Xresrouces hardcoded. I ripped out a bunch of them in the latest Nedit to make it be a bit more sensitive to the sgiMode and IMD schemes thing. Never made a patch though.
Hey Vishnu, when I fire redbox up again, it'll be amongst the first things on the TODO list.
Hey Everyone,

Was just wondering if there's any chance of seeing a version of Firefox for IRIX supporting 'webfonts'?

J.
I'm building a cathedral on OSgrid. ( http://www.osgrid.org , region: Resilia)

download/file.php?mode=view&id=2827692
:Fuel: redbox 800Mhz 4Gb V12
Get it from the source... http://www.oberon.ethz.ch/

Some digging will give you the IRIX version of the older Oberon platform. The latest Oberon seems to only run on SPARC and x64. Though I might have seen some HP-UX too. Who knows. Early onset and all that. Can't even remember if I went to the bog 15 mins ago.

J.
:Fuel: redbox 800Mhz 4Gb V12
electrithm wrote: Hello everyone, I am thinking about buying an SGI Indy or Indigo2 for programming with. I will likely use C with SDL and some Mono and Ruby. I'm probably going to dual boot it with Gentoo or Debian and Irix because I would like to use Linux for programming and Irix for 3D modelling and using other Irix apps. Would this be a good idea or would the SGI be too slow/old?

Good grief, I havent seen a troll this obvious in a while. In short: Yes, the SGI will be too old and too slow. Now go away and play with your ipad.
:Fuel: redbox 800Mhz 4Gb V12
I'm contemplating feeding the troll in the "Would it be a good idea to pick up an SGI for programming?" thread. But I'm too old and jaded to go out and pull the remaining winter roots out of the vegetable patch.
Unfortunately, this bug is all Chinese to me...

MIPS N32 firefox's bus error problem and solution: https://www.youtube.com/watch?v=lnSojgPg5kc

:P
:Fuel: redbox 800Mhz 4Gb V12
Commiserations...
Made a donation, I got me mah Purples! :)
Spent most of the morning trying to understand more about passing data and objects between Activities in Android Java. Which took me past Java's serializer, Android's packager and greenrobot's EventBus. During and after I watched 'En Un Momento Dado" - a lovely documentary about Johan Cruyff - to cheer me up.



Best I get back to Android Studio now. Yay :(
:Fuel: redbox 800Mhz 4Gb V12
I'm wondering whether I should boot redbox and hide in the imperfect yet familiar world of the 1990's or spend the rest of the day continuing the catch-up I've been doing wrt. 'mobile first' and its partner in crime 'responsive design'.
I'm trying to design/put together a woodworking 'shop' (as the americans call it) in my kitchen coz my flat isn't big enough for a 'shed'. Any good suggestions for converting/modding a simple workmate 301 into a table saw... Current idea is to design some sort of 'drop in' mounting unit into the jaws of the workmate. Which might involve replacing the standard jaws with bespoke ones. And yes, of course part of the fun is trying to do the moderately impossible with very modest means and a 'wrong' location, because after all my woodworking the whole 'workbench' needs to fold away behind my bedroom door and the kitchen has to go back to feeding people sawdust-free food :)
:Fuel: redbox 800Mhz 4Gb V12
Unfortunately, Foetz is right. Audio on UNIX was always a bit meh. Until the advent of OS X. But you can easily argue that OSX isn't readily recognisable as Unix anyhow. His second point about audio hardware... that's on the money too. In fact, here is my foray into audio hardware of this afternoon.


Poor man's CD-spindle voice-over mic stand with scouring pad pop screen :D
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam
New version of Nedit seems to be out on sourceforge: 5.7

Downloaded git snapshot zipfile. Source does not not compile with CC, now needs c99. Modify in Makefile.sgi
Will also have to spend some time ripping out the new colour defines so IMD theming will work again.

As I recall I did this for 5.6 too and wanted to feedback to Scott Trigali who seems to be maintaining Nedit these days. However, never managed to get hold of him via sourceforge.

Anybody know how to contact him?

J.
:Fuel: redbox 800Mhz 4Gb V12
:O2: bluebox 200Mhz 256Mb AV1+O2Cam