C-Macs – a pure C macOS application

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • C-Macs

    Digging a Foundation With A Spoon

  • It's open source but it is still under copyright. There are notices in the source file:

    https://github.com/CodaFi/C-Macs/blob/master/CMacs/View.c#L5...

    I would definitely ask permission and encourage the author to change the license before using this code.

    Since API calls are purely functional and not covered by copyright you can mimic the behavior here but you'll need to rewrite everything from scratch, notably the most expressive parts, which are:

    https://github.com/CodaFi/C-Macs/blob/master/CMacs/CMacsType...

    https://github.com/CodaFi/C-Macs/blob/master/CMacs/CMacsType...

    The organization and structure of this code is arbitrary and within the author's creative expression.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • SDL

    Simple Directmedia Layer

  • The linked project doesn't use any ObjC files at all. SDL2 has a bunch of Cocoa files[1] so you did use Cocoa even if unknowingly.

    [1] https://github.com/libsdl-org/SDL/tree/main/src/video/cocoa

  • rawdrawandroid

    Build android apps without any java, entirely in C and Make

  • > A little bit of this also has to do to stick it to all those Luddites on the internet who post "that's impossible" or "you're doing it wrong" to Stack Overflow questions... Requesting permissions in the JNI "oh you have to do that in Java" or other dumb stuff like that. I am completely uninterested in your opinions of what is or is not possible. This is computer science. There aren't restrictions. I can do anything I want. It's just bits. You don't own me.

    From the wonderful CNLohr's rawdraw justification[0]. I always enjoy these kinds of efforts because they embody the true hacker spirit. This is Hacker News after all!

    0: https://github.com/cnlohr/rawdrawandroid?tab=readme-ov-file#...

  • oc

    Macro magic for declaring/calling Objective-C APIs from C11 or C++. Preloads selectors, chooses the correct objc_msgSend to call per method/platform. (by garettbass)

  • Here's something similar by Garret Bass:

    https://github.com/garettbass/oc

    ...I also experimented a bit with parsing macOS system headers via clang-ast-dump and then code-generating C and Zig APIs but that didn't get far:

    https://github.com/floooh/objc-ast-experiments

    ...with a bit of effort and maybe using libclang instead of clang-ast-dump that's definitely feasible though.

    I guess a similar approach is used by the official C++ bindings for Metal:

    https://developer.apple.com/metal/cpp/

  • Here's something similar by Garret Bass:

    https://github.com/garettbass/oc

    ...I also experimented a bit with parsing macOS system headers via clang-ast-dump and then code-generating C and Zig APIs but that didn't get far:

    https://github.com/floooh/objc-ast-experiments

    ...with a bit of effort and maybe using libclang instead of clang-ast-dump that's definitely feasible though.

    I guess a similar approach is used by the official C++ bindings for Metal:

    https://developer.apple.com/metal/cpp/

  • Swiftz

    Functional programming in Swift

  • Draw a line through this 12+-year-old effort from Robert Widmann and his 8-year-old exercise in type-lifting Swift [1] and ask yourself: what is he doing now at Apple?

    [1] https://github.com/typelift/Swiftz

  • objrs

    Mirror only

  • If you want to optimize this (and you enjoy pain), you can eliminate the dependency on objc/* headers and use compiler attributes and link sections to compile your code to the same(ish) assembly that Objective-C compiles to. I don't have a C example on hand, but here's a Rust example that's pretty easy to translate to C: https://github.com/objrs/objrs/blob/master/HOW_IT_WORKS.md

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • NiblessMenu

    Create a Mac main menu without a xib or storyboard

  • This app uses objc_msgSend, which feels a lot like cheating, but if you simply want to avoid using nibs (while still using Objective-C or Swift), check out my NiblessMenu project and my "Working without a nib" blog series.

    https://github.com/lapcat/NiblessMenu

    https://lapcatsoftware.com/articles/working-without-a-nib-pa...

  • wil

    Windows Implementation Library

  • Even then, MFC and C++/CX were the only productive ways to use it from Microsoft SDKs.

    .NET isn't as convenient as VB 6 was, fully embracing COM as the VBX replacement model, technically introduced in VB5, but still some stuff was lacking.

    Then there is Delphi and C++ Builder.

    It beat me that having doubled down on COM since how Longhorn went down, and Windows team getting their way doing avoiding .NET to take over, they hardly managed to create nice tooling as the competition.

    Editing IDL files with a Notepad like experience, manually merging generated code, and a couple of frameworks that barely go beyond yet another way to do AddRef/Release/QueryInterface and aggregation.

    Meanwhile D-BUS, XPC and AIDL, provide much better dev experience.

    Pity that Borland products are kind of tainted due to mismanagement decisions, otherwise maybe fixing COM dev experience would already been seriously taken by VS team.

    Ah, nowadays WIL is probably the best approach when having only to consume COM.

    https://github.com/microsoft/wil

  • XQuartz

    An X11 server and client libraries for macOS

  • brew install --cask xquartz

    Or install from the project homepage [1]. Then just launch the X11 app. Note that it does require the application to be built for Mac - it’s not an emulator, just an implementation of the X11 APIs.

    [1] https://www.xquartz.org/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Ice - open source bar manager for macOS

    7 projects | news.ycombinator.com | 6 Jun 2024
  • macOS Bartender Auto-Update Signed by Unknown New Owner

    5 projects | news.ycombinator.com | 4 Jun 2024
  • Popular Mac app 'Bartender' acquired by new unknown developer

    7 projects | news.ycombinator.com | 5 Jun 2024
  • Native macOS fix for applications hiding under the MacBook Pro notch

    5 projects | news.ycombinator.com | 12 Feb 2024
  • What is your most used Mac keyboard shortcuts? Both for specific apps/ in general ops.

    1 project | /r/mac | 6 Dec 2023