Giter VIP home page Giter VIP logo

Comments (5)

dumblob avatar dumblob commented on June 29, 2024 1

Oh, ne need to hurry. Thanks for the in-depth analysis (I didn't even anticipate you'd spend so much time with it).

Actually the changes you've listed will probably not be worth maintaining for the sole purpose of Nuklear. Despite that it really seems to be the only sensible way forward if we decided to give Slice99 a change 😉.

OTOH there is some brainstorming going on regarding major overhaul of Nuklear and we could even consider going with C99 in which case different things will get easier.

But this will of course not change the fact the linked PR will inevitably make it verbose to work with strings (assuming the most common scenario that we won't go the route of downstream patching of Slice99).

Closing as answered. Thanks a lot and keep up the great work!

from slice99.

Hirrolot avatar Hirrolot commented on June 29, 2024

Hello! Apologies for the late response. I've spent some time trying to compile Slice99 on ANSI C. I stumbled upon:

  • Variadic macro functions like SLICE99_ARRAY_LEN, Slice99_from_array, and Slice99_typed_from_array should be removed or changed.
  • restrict and inline keywords should be workarounded somehow.
  • Fixed-width integers should be gated under a feature (ANSI C has no support for them).
  • etc.

While all these things can be workarounded, the final library API would be different. But since you are asking specifically about Nuklear, I think the whole Slice99 is a kind of overkill here, isn't it? You can just copy-paste and change the necessary stuff from Slice99 to Nuklear and adapt it to make it work on ANSI C.

from slice99.

dumblob avatar dumblob commented on June 29, 2024

But since you are asking specifically about Nuklear, I think the whole Slice99 is a kind of overkill here, isn't it?

Sorry, I forgot to answer this question. Theoretically yes, it's a bit overkill. The rule of thumb suggests though that it's always better for serious projects to keep upstream things as they are (FYI we've made a similar mistake already with adjusting - even if only very slightly - the external header-only font library we use and it brought only headaches for several years).

from slice99.

Hirrolot avatar Hirrolot commented on June 29, 2024

OTOH there is some Immediate-Mode-UI/neonuklear#1 regarding major overhaul of Nuklear and we could even consider going with C99 in which case different things will get easier.

Upgrading to C99 might be a viable option. Today on HN I saw this post: https://lwn.net/SubscriberLink/885941/01fdc39df2ecc25f/. TL;DR The Linux kernel developers are thinking about C99 in the 5.18 kernel.

Personally, I use C99 at work. All our platforms (which are IP cameras) have stable support for C99. I think that restricting a modern codebase to only C89 is really an anachronism, given that even the Linux kernel devs, who have always been conservative, are considering using C99 in the near future.

from slice99.

dumblob avatar dumblob commented on June 29, 2024

Interesting observation. Thanks for the pointer!

(I myself always use the newest C available - but without any GNU extensions etc. - -pedantic)

from slice99.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.