SGI: Development

How should IRIX programs be made? - Page 1

Does IRIX always come with a C compiler and Motif toolkit development files, or would it be better to use the Nekoware GCC and GTK+?
Well the Motif toolkit is available for free under the LGPL. Whether or not you should use it is a matter of personal choice.

IRIX has MIPSPro, which is no longer sold by SGI, but it is often available secondhand ( not here though, note the orange warning in the for sale sections ) and via other means. Its by far preferable for programs to be built under MIPSPro, but in some modern programs like Firefox, as far as I know its not really an option.
SGI:
:Fuel: R16000A@900MHz 4GB V12/DCD, 6.5.30 Rin
:Onyx2R: 8 x R12000@400MHz 16GB IR3 Kanako
:Tezro: Quad R16000@700MHz, 8GB, V12/DCD, DM3 6.5.30 Byakuren
L2 Controller
Non-SGI:
HP C8000 2x PA-8900 1GHz 8GB Nazrin
2x ThinkPad x230 i5-3210M 2.53GHz 8GB HD4000 FreeBSD 10.1 Benben & Yatsuhashi
IBM IntelliStation 265 Dual POWER3-II@450MHz Jigoku-Karasu ( Hell Raven )

For Sale: O2 DIMMS, Octane and O2 caddies
TeamBlackFox wrote: Well the Motif toolkit is available for free under the LGPL. Whether or not you should use it is a matter of personal choice.

IRIX 6.5 comes with Motif 1.2.x and 2.1.x preinstalled :)

GTK 2.x is very slow on IRIX because it assumes certain Xorg extensions and is real slow if it doesn't find them.
Now this is a deep dark secret, so everybody keep it quiet :)
It turns out that when reset, the WD33C93 defaults to a SCSI ID of 0, and it was simpler to leave it that way... -- Dave Olson, in comp.sys.sgi

Currently in commercial service: Image :Onyx2: (2x) :O3x02L:
In the museum : almost every MIPS/IRIX system.
Wanted : GM1 board for Professional Series GT graphics (030-0076-003, 030-0076-004)
jan-jaap wrote: GTK 2.x is very slow on IRIX because it assumes certain Xorg extensions and is real slow if it doesn't find them.


So this is why Firefox has lag issues? In that case why not port NetSurf, Origyn Web Browser or some other modern browser? Origyn is available under the BSD licence, and while its rooted in the Amiga realm, shouldn't its lack of dependency on GTK+ make it easier to work with?
SGI:
:Fuel: R16000A@900MHz 4GB V12/DCD, 6.5.30 Rin
:Onyx2R: 8 x R12000@400MHz 16GB IR3 Kanako
:Tezro: Quad R16000@700MHz, 8GB, V12/DCD, DM3 6.5.30 Byakuren
L2 Controller
Non-SGI:
HP C8000 2x PA-8900 1GHz 8GB Nazrin
2x ThinkPad x230 i5-3210M 2.53GHz 8GB HD4000 FreeBSD 10.1 Benben & Yatsuhashi
IBM IntelliStation 265 Dual POWER3-II@450MHz Jigoku-Karasu ( Hell Raven )

For Sale: O2 DIMMS, Octane and O2 caddies
Firefox is slow because XUL is an interpreted language and the interpreter is s l o w . . .

I hadn't heard that about GTK being slow because of needing X extensions, are those extensions hard to build on IRIX? I've never tried to compile an X extension before, but according to jwz in the X Windows Disaster chapter of the Unix Haters Handbook, chewing on broken glass might be a better use of your time.

Browser-wise I've got a side project to get a 3+ version of Dillo going on IRIX. :P
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...
No. Firefox is slow because JavaScript is an interpreted language and the interpreter is slow. XUL is actually pretty efficient as far as markup goes, even without a true native widget toolkit.

I'd rather have NetSurf than Origyn, but that comes from my long-standing anti-WebKit bias, which is abating a bit now that Google has Blink to take over the world with instead.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * HP C8000 * BeBox * Solbourne S3000 * Commodore 128 * many more...
Why the anti-webkit bias? I don't care for Safari myself, but I think its a little unfair to judge a rendering engine.

Otherwise, Classic, since you already maintain two firefox forks, could you find some time in your busy schedule to help us fellow IRIX fellows out? (I'm half joking if you don't catch the sarcasm)
SGI:
:Fuel: R16000A@900MHz 4GB V12/DCD, 6.5.30 Rin
:Onyx2R: 8 x R12000@400MHz 16GB IR3 Kanako
:Tezro: Quad R16000@700MHz, 8GB, V12/DCD, DM3 6.5.30 Byakuren
L2 Controller
Non-SGI:
HP C8000 2x PA-8900 1GHz 8GB Nazrin
2x ThinkPad x230 i5-3210M 2.53GHz 8GB HD4000 FreeBSD 10.1 Benben & Yatsuhashi
IBM IntelliStation 265 Dual POWER3-II@450MHz Jigoku-Karasu ( Hell Raven )

For Sale: O2 DIMMS, Octane and O2 caddies
ClassicHasClass wrote: No. Firefox is slow because JavaScript is an interpreted language and the interpreter is slow.

One thing that is a big help with Fireflop is to set up a proxy, then block the thousands of bullshit javascripts running in the background. It's pretty easy to do and makes a significant improvement. This works even better if several people are using one innernut connection.

HttpFox works in 3.0.19 and is a big help at rooting out quantserve and other worthless slowth-inducing b.s.

Turning off javascript also works but it can be a pain when some fool uses javascript to write simple buttons where static html would do better.

Now some places I go I see lines and lines of pretty red 403 hits scrolling by in the httpfox window, while the page loads quickly :D
two girls for every boy ...
TeamBlackFox wrote: Why the anti-webkit bias? I don't care for Safari myself, but I think its a little unfair to judge a rendering engine.

Because monocultures are inherently inbred and are exceptionally vulnerable to plague or unfavorable recessive traits. Diversity equals resilience!
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup
Donald_ET3 wrote: Does IRIX always come with a C compiler and Motif toolkit development files, or would it be better to use the Nekoware GCC and GTK+?
If you want to use any current open source, I strongly recommend to use gcc 4.7. All current open source is written to be compiled with gcc. It's a real pain to port this software to be compiled with mipspro and it's not worth to spend time on it since the result is not much faster than the gcc code, in some cases it will be slower.
:Tezro: :Fuel: :Octane2: :Octane: :Onyx2: :O2+: :O2: :Indy: :Indigo: :Cube:
diegel wrote: All current open source is written to be compiled with gcc.

They have become the monster they despised.
two girls for every boy ...
Donald_ET3 wrote: Does IRIX always come with a C compiler and Motif toolkit development files, or would it be better to use the Nekoware GCC and GTK+?


A set of IRIX 6.5.x installation disks always comes with Motif 1.2.x and 2.1.x libraries. If memory serves IRIX 6.5.30 ships with Motif 1.2.4 and Motif 2.1.32. Stock IRIX does not provide a C compiler with a working C/C++ front-end.

If you do not have access to MIPSpro you will need something else. In most cases that something else will be GCC. Because it's just there and because you dont want to suffer GCC-ism headaches. That said, in my experience 'portable' code these days means: GCC will probably compile your code on some Intel or ARM-based GNU/Linux distro. Other build-targets probably wont work unless you port the 'portable' code.

As to GTK+. Yes, it's used by the GIMP and Firefox and some other major projects but I'm sure that given the chance they would all be using something else. If you want to keep you code portable to Linux/FreeBSD I guess GTK+ is one way of doing it, but it's going to be painful on IRIX.

If you do end up coding with Motif on IRIX, probably because you want to stay true to the classic IRIX look-and-feel, you really want to look into using ViewKit. ViewKit is a C++/Motif application development framework that comes with IRIX. It takes away a lot of the pain of developing with Motif but like any other framework it does mean you have to code in The One True ViewKit Way.

Unfortunately, the MIPSpro-compiled stock IRIX ViewKit runtime cannot be linked with your GCC-generated objects because the MIPSpro and GCC compilers have different internal C++ name-mangeling schemes. There is an OpenSource clone of ViewKit called 'ViewKlass' which you could compile with GCC and thus circumvent the name-mangeling issue, but it's only 90-95% feature complete as it lacks some of the more advanced ViewKit widgets.

Bottom-line: If you want your application to fit in with the classic IRIX Indigo Magic Desktop look-and-feel then you have to go with SGI Motif. If you're going to code with SGI Motif you really want to look into ViewKit. If you want to use stock IRIX ViewKit you can only use MIPSpro. If you do some homework and figuring-outing you might also be able to use GCC in combination with ViewKlass.

Either way, I for one would love to see somebody else joining me in writing the odd bit of Motif-on-IRIX stuff :)

Good luck!

J.
:Fuel: redbox 800Mhz 4Gb V12
commodorejohn wrote:
TeamBlackFox wrote: Why the anti-webkit bias? I don't care for Safari myself, but I think its a little unfair to judge a rendering engine.

Because monocultures are inherently inbred and are exceptionally vulnerable to plague or unfavorable recessive traits. Diversity equals resilience!


You took the words right out of my mouth. I despise monocultures. We cursed Trident for this back in the day, remember.
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * HP C8000 * BeBox * Solbourne S3000 * Commodore 128 * many more...
I see what you mean then I guess. I love Gecko, but making a non-GTK port of Firefox would entail a lot of work, I don't know if we have anyone here willing to take it on. And I'd much prefer a newer Firefox, slow as it will be, to Netsurf because of licencing, which we won't get into.
SGI:
:Fuel: R16000A@900MHz 4GB V12/DCD, 6.5.30 Rin
:Onyx2R: 8 x R12000@400MHz 16GB IR3 Kanako
:Tezro: Quad R16000@700MHz, 8GB, V12/DCD, DM3 6.5.30 Byakuren
L2 Controller
Non-SGI:
HP C8000 2x PA-8900 1GHz 8GB Nazrin
2x ThinkPad x230 i5-3210M 2.53GHz 8GB HD4000 FreeBSD 10.1 Benben & Yatsuhashi
IBM IntelliStation 265 Dual POWER3-II@450MHz Jigoku-Karasu ( Hell Raven )

For Sale: O2 DIMMS, Octane and O2 caddies
For a short time ICS did market a Linux variant of Viewkit in the 90s. As far as I know I'm the only person that bought one. :lol: Too bad because it really is an outstanding application development framework. I think, but am not sure, that Eric Masson (of 5Dwm) has the source code, but I don't think SGI ever let him release anything but binaries...
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...
>5DWM

Its a shame that it seems under such lock and key I can't run it on BSD - I'd like my Raspi and whatever desktop replacement I get to match the rest of my fleet.
SGI:
:Fuel: R16000A@900MHz 4GB V12/DCD, 6.5.30 Rin
:Onyx2R: 8 x R12000@400MHz 16GB IR3 Kanako
:Tezro: Quad R16000@700MHz, 8GB, V12/DCD, DM3 6.5.30 Byakuren
L2 Controller
Non-SGI:
HP C8000 2x PA-8900 1GHz 8GB Nazrin
2x ThinkPad x230 i5-3210M 2.53GHz 8GB HD4000 FreeBSD 10.1 Benben & Yatsuhashi
IBM IntelliStation 265 Dual POWER3-II@450MHz Jigoku-Karasu ( Hell Raven )

For Sale: O2 DIMMS, Octane and O2 caddies
TeamBlackFox wrote: I see what you mean then I guess. I love Gecko, but making a non-GTK port of Firefox would entail a lot of work, I don't know if we have anyone here willing to take it on. And I'd much prefer a newer Firefox, slow as it will be, to Netsurf because of licencing, which we won't get into.


You'd have to port widget/, at least, and then you'd need some way of handling native controls. It's doable, but as you say, non-trivial.

What's wrong with NetSurf's license? It's GPLv2, so no worse than GPL ordinarily ...
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * HP C8000 * BeBox * Solbourne S3000 * Commodore 128 * many more...
ClassicHasClass wrote: XUL is actually pretty efficient as far as markup goes, even without a true native widget toolkit.


I don't know, libxul in Firefox 31 is amost 60 megabytes, even for the crazy-ass up-is-down world of mozilla that seems a bit out there. The best part of mozilla AFAICT is NSPR, the Netscape Portable Runtime, and that was pretty much feature complete when Netscape dumped the mozilla project onto the unsuspecting Internet in April 1998... :P
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...
libxul isn't just xul, though. It's virtually *everything* -- NSPR, XPCOM, layout, content, DOM, the compositor, NPAPI, JavaScript, docshell, appshell, you name it. The actual portion of layout/content that handles XUL is a relatively small portion. Only a few glue libraries live outside of libxul mostly so that the JS shell doesn't have to be linked against the whole damn thing.

You could make the argument that XUL is not much good without everything else, but there's nothing preventing someone from making a competing implementation; nobody bothered. I think it's more instructive to look at things like Camino and K-Meleon, which were essentially Gecko without XUL, and the delta in code size compared to the contemporary 3.6 was not large (even considering that they were swapping a JavaScript-based browser front end for a Objective-C/C++ one).
smit happens.

:Fuel: bigred , 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy , 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze , R10000, Solid IMPACT
probably posted from Image bruce , Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * HP C8000 * BeBox * Solbourne S3000 * Commodore 128 * many more...
Man, K-Meleon. For a while there I almost used that as my main browser, until stuff just stopped working with it. Looks like it's finally updating again, though...
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/MT-32/D-10, Oberheim Matrix-6, Yamaha DX7/FB-01, Korg MS-20 Mini, Ensoniq Mirage/SQ-80, Sequential Circuits Prophet-600, Hohner String Performer

"'Legacy code' often differs from its suggested alternative by actually working and scaling." - Bjarne Stroustrup