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.

AC910

macrumors member
Original poster
Jul 10, 2016
95
86
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
 

Attachments

  • MinDiscCD-alpha-0.1.zip
    235.8 KB · Views: 493
Last edited:
YES!
Sad I couldnt test it ouyt before but its cool...cant wait
Edit: recognized you couldnt get tiger running. I guess I can wait....someone will figure it out eventually. I know you feel iffy about the source code being released but whats good is that if you release it bugs and errors may get figured out by someone....kinda like a group project
 
Last edited:
This is really awesome! My one concern is whether it violates the TOS or not. Can you tell me if it would be a violation to use this? Thanks!
 
This is really awesome! My one concern is whether it violates the TOS or not. Can you tell me if it would be a violation to use this? Thanks!

Good question. And it's a bit of a gray area. Discord has made a bunch of statements over twitter/forums over the years saying they don't like this practice or another. But in practice they don't care and it's never enforced.

Discord cares about spammers, pornography, and abuse. And as long as you're not doing one of those, you should be ok. Discord doesn't have the resources or care to track down the tiny fraction of people behaving properly using a community-made client.

Also, there are a bunch of 3rd party clients/mods, some of which are even commercial and paid products. Here are a few below. All of these projects are still going and AFAIK no user has ever been banned for using them.


TL;DR - Technically against the TOS. But no evidence it's ever been enforced.
 
  • Like
Reactions: RogerWilco6502
Good question. And it's a bit of a gray area. Discord has made a bunch of statements over twitter/forums over the years saying they don't like this practice or another. But in practice they don't care and it's never enforced.

Discord cares about spammers, pornography, and abuse. And as long as you're not doing one of those, you should be ok. Discord doesn't have the resources or care to track down the tiny fraction of people behaving properly using a community-made client.

Also, there are a bunch of 3rd party clients/mods, some of which are even commercial and paid products. Here are a few below. All of these projects are still going and AFAIK no user has ever been banned for using them.


TL;DR - Technically against the TOS. But no evidence it's ever been enforced.
Ok, thanks for the info :)
 
This is cool! I primarily use Discord for text messages only, so I'm excited to try this out. Will update when I have a chance to try it on a few Macs. :) Do images show in channels? Or do they show up as a link only?
 
Thank you for making such a program! I remember I had made a tweet regarding this. Someone then made a feature request because thats what support told them to do. No updates from discord about it
So this is amazing.
I would die for the source code!
 
This is cool! I primarily use Discord for text messages only, so I'm excited to try this out. Will update when I have a chance to try it on a few Macs. :) Do images show in channels? Or do they show up as a link only?
They show up as a link.
[automerge]1592501495[/automerge]
Thank you for making such a program! I remember I had made a tweet regarding this. Someone then made a feature request because thats what support told them to do. No updates from discord about it
So this is amazing.
I would die for the source code!

Yeah sadly no way Discord is going to spend time making a PPC version.
 
Last edited:
This looks awesome, I love the interface. I was hoping Rosetta would allow me to run it on my MBP Late 2006 C2D on 10.6.8 but no dice(crashes immediately). Can't wait to try it on my PB G4 12" though!

Any chance of a possible Intel version?
 
This looks awesome, I love the interface. I was hoping Rosetta would allow me to run it on my MBP Late 2006 C2D on 10.6.8 but no dice(crashes immediately). Can't wait to try it on my PB G4 12" though!

Any chance of a possible Intel version?
What's the crash log?
 
What's the crash log?
Code:
Process:         MinDiscCD [94679]
Path:            /Users/Censored/Downloads/MinDiscCD.app/Contents/MacOS/MinDiscCD
Identifier:      com.yourcompany.MinDiscCDApp
Version:         0.1 Alpha (1)
Code Type:       PPC (Translated)
Parent Process:  launchd [93]

Date/Time:       2020-06-20 13:03:47.571 -0400
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          5198 sec
Crashes Since Last Report:           3
Per-App Crashes Since Last Report:   3
Anonymous UUID:                      86A1A5B5-B5A8-45DB-BE84-1450682030D5

Exception Type:  EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib                 0x80239236 __pthread_kill + 10
1   libSystem.B.dylib                 0x80238ad7 pthread_kill + 95
2   com.yourcompany.MinDiscCDApp      0xb80bfb30 0xb8000000 + 785200
3   com.yourcompany.MinDiscCDApp      0xb80c0037 0xb8000000 + 786487
4   com.yourcompany.MinDiscCDApp      0xb80dd8e8 0xb8000000 + 907496
5   com.yourcompany.MinDiscCDApp      0xb8145397 spin_lock_wrapper + 1791
6   com.yourcompany.MinDiscCDApp      0xb801ceb7 0xb8000000 + 118455

Thread 1:
0   libSystem.B.dylib                 0x80142afa mach_msg_trap + 10
1   libSystem.B.dylib                 0x80143267 mach_msg + 68
2   com.yourcompany.MinDiscCDApp      0xb819440f CallPPCFunctionAtAddressInt + 206231
3   libSystem.B.dylib                 0x80170259 _pthread_start + 345
4   libSystem.B.dylib                 0x801700de thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00000000  ebx: 0x802fc540  ecx: 0xb7fff9ac  edx: 0x80239236
  edi: 0xb8211640  esi: 0x00000005  ebp: 0xb7fff9d8  esp: 0xb7fff9ac
   ss: 0x0000001f  efl: 0x00000286  eip: 0x80239236   cs: 0x00000007
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x8023922c

Binary Images:
0x80000000 - 0x8005dff7  com.apple.framework.IOKit 2.0 (???) <3DABAB9C-4949-F441-B077-0498F8E47A35> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x8007d000 - 0x800e7fe7  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib
0x80142000 - 0x802e9ff7  libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib
0x8036b000 - 0x804e6fe7  com.apple.CoreFoundation 6.6.6 (550.44) <F88C95CD-1264-782D-A1F5-204739847E93> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x805de000 - 0x805ecfe7  libz.1.dylib 1.2.3 (compatibility 1.0.0) <33C1B260-ED05-945D-FC33-EF56EC791E2E> /usr/lib/libz.1.dylib
0x805f1000 - 0x805fdff7  libkxld.dylib ??? (???) <9A441C48-2D18-E716-5F38-CBEAE6A0BB3E> /usr/lib/system/libkxld.dylib
0x80601000 - 0x80647ff7  libauto.dylib ??? (???) <29422A70-87CF-10E2-CE59-FEE1234CFAAE> /usr/lib/libauto.dylib
0x80654000 - 0x807d6fe7  libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <60FF302E-5FAE-749B-BC70-0496DC2FBF2D> /usr/lib/libicucore.A.dylib
0x80838000 - 0x808e5fe7  libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <9F8413A6-736D-37D9-8EB3-7986D4699957> /usr/lib/libobjc.A.dylib
0x808f9000 - 0x808fcfe7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib
0x8fe00000 - 0x8fe4163b  dyld 132.1 (???) <4CDE4F04-0DD6-224E-ACE5-3C06E169A801> /usr/lib/dyld
0xb8000000 - 0xb81defff +com.yourcompany.MinDiscCDApp 0.1 Alpha (1) <F24FBFDD-E694-6F38-BFFB-293613CEF2DE> /Users/jciccone/Downloads/MinDiscCD.app/Contents/MacOS/MinDiscCD
0xffff0000 - 0xffff1fff  libSystem.B.dylib ??? (???) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib

Translated Code Information:
objc[94679]: garbage collection is ON
NO CRASH REPORT
Model: MacBookPro2,2, BootROM MBP22.00A5.B07, 2 processors, Intel Core 2 Duo, 2.16 GHz, 4 GB, SMC 1.12f5
Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 128 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x87), Atheros 5416: 2.1.14.6
Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: SAMSUNG SSD SM871 2.5 7mm 256GB, 238.47 GB
Parallel ATA Device: MATSHITADVD-R   UJ-857
USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8501, 0xfd400000 / 2
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x021a, 0x1d200000 / 2
USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8205, 0x7d100000 / 2
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x5d200000 / 2
 
Ok yeah that's in the bowels of the macos. Probably an issue with the rosetta translation. I can try again to build a universal build, but I remember when I tried last python was being a pain. I'll try again this weekend if I get a chance.
 
Thanks so much for this - this is awesome! Most of my chat service use these days is Discord.

Any plans to incorporate direct messaging? (I thought I might be able to get Discord DMs via Pidgin and libpurple, but I can't get Pidgin to brew on Leopard!)
 
Thanks for this, it's incredibly useful!
Are DMs/notification sounds likely to be implemented soon?
 
Hello All

The built-in library version is a bit outdated and won't properly connect to Discord. Run this command to update it and fix the issue.

Thanks @Doctorj1 for bringing this to my attention

Code:
sudo /opt/mindisc/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -m pip install discord-py --upgrade
 
Last edited:
  • Like
Reactions: dextructor
Any updates on a tiger release?
Sadly I don't have time to work on this. I'd have to create and maintain my own discord library if I wanted to make this on tiger.

Sadly tiger doesn't have the improvements the objc runtime received in leopard. This means modern versions of pyobjc cannot run on it which is what allows my cocoa front-end to interface with discordpy.

If I had the time I'd write a minimal discord library using libwebsockets as a base. I did some preliminary work and got it to compile on ppc tiger but thats as far as I had time to take it.
 
Hey, massive fan of the concept. I've gone through the steps, put my user token in but I'm not seeing any servers or anything update. Any ideas?
 
I used the client last week. Did you update discordpy using the terminal command? If the user token is right and the library is updated, it should work.
 
No dice, I'm wondering if it's not updating correctly because I don't have a password set. Should the update command occur instantly?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.