Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
x7qUi21.png


Intro

Hello All

Presenting my Discord client for PowerPC/Leopard. I call it MinDisc. Short for Minimal Discord.

MinDisc is a lightweight Discord client written for, and developed on, PPC macs. It runs in about 40 MB of memory and idles at nearly zero CPU usage.

This first "Alpha" version is fairly basic. You can send and receive messages in text channels, fetch previous history, and see which channels are unread. While the user facing features are slim, a lot of work and time went into getting everything running under the hood and making sure everything was stable.

I wanted a basic discord client to use on my PPC macs for my own use and I also wanted an excuse to learn Obj-C/Cocoa. So MinDisc was created. I don't aim to recreate all of Discord's feature set. Sorry, you'll still need to use the real client for voice, streaming, or managing your account. But if you're looking for a basic IRC-like experience, this will get the job done.

Anyway, if you're still interested in my pet project here are the install directions.

Install Steps
  1. Install the dependency package. It's a 70mb download. This is required to be installed first
  2. Get your Discord User Token -- https://github.com/Tyrrrz/DiscordCh...Token-and-Channel-IDs#how-to-get-a-user-token
  3. run the following command in the terminal: sudo /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install discord-py --upgrade
  4. Download the application attached to this post and open it.
  5. paste your discord token in when asked
  6. enjoy!

Notable features not implemented:
  • DM support
  • Emojis
  • User list
  • Mentions / Notifications
Known issues:
  • when switching channels. the chat messages can sometimes be spaced too far apart or overlapping. Just switch to a different room and then back again. It'll fix itself.

  • The URLs are not clickable -- they're not clickable unless you're "editing" the chat row. Double click on the row to go into edit mode. Then click on the link. Unfortunately this is a limitation of the Leopard-era NSTableView. Maybe I'll work around it one day.

  • when waking up from sleep or regaining network connectivity, it may not properly reconnect and it won't load any missed messages. your best option is to close the client and reopen. 

  • newly joined channels/discord servers wont show up until Mindisc is relaunched. Mindisc takes a "snapshot" of available guilds and channels at launch and will only work with those. If you change your membership, relaunch MinDisc to update the list.

FAQ
  1. can this run on tiger? no. leopard only currently. I spent weeks trying to get tiger to work. But a critical library (PyObjc) doesn't want to function under Tiger.
  2. can you release the source code? I might in the future. I'm undecided currently
  3. can you add feature XYZ? You can certainly ask. No guarantees though.

Tech Notes:

The Dependency package contains all the frameworks and libraries I used for this application. Specifically Discord.py 1.3.3, Python 3.8.2, and PyObjC 6.1. The installer was created with Macports. I modified a bunch of port files to allow them to compile on Leopard and even created my own ports to get all the dependencies needed.

Python runs on its own thread and keeps a connection to Discord open using Discord.py while the application itself is running on Objc/Cocoa on the main thread. Any messages between the runtimes are carried across by PyObjC. The application uses Core Data to store the data and Cocoa Bindings to handle most of the UI glue.

Strictly speaking this isn't the most efficient way to do this. Both python-side and objc-side keep their own individual states on what's happening in Discord. Ideally one would have a native obj-c library for working with Discord. Unfortunately there were no C or ObjC libraries available. And I didn't want to reinvent the wheel and roll my own library for Discord. I picked Discord.py since python3.8 runs on PPC via macports and it's a relatively feature complete library.

Also by using python3.8 and Cocoa. I get the best of both worlds. I get access to a modern Python runtime and most of the modern packages available to it. And I get the native look and feel, performance, and development tools in Cocoa/Xcode. It was a huge pain getting it running, as there's very little documentation on how to run Python code from a Objc project, but it works well now that it's set up.

I spent weeks trying to get a tiger version running. While I can get Python3.8 to compile and run properly, PyObjc refuses to run correctly on tiger. Maybe I'll try again some other day. But for now it's leopard only :(

Release History:

June 6 2020 -- Alpha v0.1 -- initial release

I gave this a try on Leopard (yes, it works fine, thank you!) and also on Snow Leopard, but what ends up happening in the latter is the following error:


Code:
sh-3.2# /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install discord-py --upgrade
python3: posix_spawn: /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python: Unknown error: 0

Not sure what error code 0 amounts to, but I guess for now I’ll work with using it only on my Leopard box.
 
I gave this a try on Leopard (yes, it works fine, thank you!) and also on Snow Leopard, but what ends up happening in the latter is the following error:


Code:
sh-3.2# /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install discord-py --upgrade
python3: posix_spawn: /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python: Unknown error: 0

Not sure what error code 0 amounts to, but I guess for now I’ll work with using it only on my Leopard box.
I'm guessing this is due to a failure to translate properly with Rosetta. Using OS X 10.5.8 works fine. I'll try looking into this later on my 10.6 Mini

EDIT: Check to make sure you're using Python 3.5.5
 
Last edited:
  • Like
Reactions: B S Magnet
I'm solidly impressed that it's even possible to pull something like this off. Please do release the source if you ever feel up for it. I feel like the source could be ported over to so many other platforms to help a whole load of people using other legacy platforms get more out of their systems.
 
Mind hosting the required files to run MinDisCD on Macintosh Garden as well as information required to get it working? Our old PowerPC Macs can't access MEGA, at all.
 
/opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install discord-py --upgrade
Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.