Spyke

Posts

learnprogramming·Learn ProgrammingbyAd4mWayn3

Is there any better way of "hard-coding" GUIs in low level languages?

Say, for example, that I have a GUI library whose API solely offers functionality for drawing text boxes, buttons, labels, etc. No fancy layout utilities.

For a simple use case, one might just hard-code the size and coordinates of a certain button, or even a small bunch of them, but once the layout starts to clutter, it's a better choice to give some organization. When there is no visual GUI editor, you either make one, or code your own layout API. Either option is obviously very time consuming, and the latter doesn't tend to be very flexible.

Is there any way/standard for "programmatically" giving a layout to a gui? For example in web, I've seen how people use html, css and json to specify certain behaviors, styles and that. How could that be applied here? In my case, I'm using the raygui lib (which isn't really standalone since its meant to be a gui utility for games)

View original on sh.itjust.works
3
askmath·Ask Math ProblemsbyAd4mWayn3

In ZF¬C, if a set can't be well ordered, what does it say about its cardinality?

The well-ordering theorem follows only if the AoC is true, which means that otherwise, there are sets with no well-ordering.

Supposedly, the Real numbers is one of such sets. Does that mean the real numbers can't be shown to have a direct bijection to any aleph number? And if that's the case, does that mean 2^Aleph_0 is bigger than any aleph number?

View original on sh.itjust.works
4
programming·ProgrammingbyAd4mWayn3

What is the difference between an API, a Library, a Package, and a Framework?

I have some familiarity with C++, and concepts like compiling and linking static and dynamic libraries, which is what I understand as collections of code that simplify doing certain things.

But then I get confused in certain cases, for example, why is OpenGL considered an API? Why is it necessary to use other libraries like GLAD, freeGLUT or GLFW to interface with OpenGL?

And then other languages have this thing called package managers, like pip, node, cargo, and vcpkg for c/c++, where you install these packages that get used like libraries? What's the difference?

Finally the ones I understand the least of are frameworks. I keep hearing the concept of frameworks like Angular for js and a lot of stuff that's too alien for me because I'm still unfamiliar with web development.

So for example, I'm using the raylib library for a small game project I have. I link the .lib or .dll file to my executable file so I know I'm unambiguously using a library. How come there's also Cocos2dx which is a framework? What's the distinction?

View original on sh.itjust.works
43

You reached the end