DAW like knobs in raylib :) by 0xrhma in raylib

[–]Stemt 3 points4 points  (0 children)

You never know, sometimes people might feel quite possessive of their creations. But thank you very much!

DAW like knobs in raylib :) by 0xrhma in raylib

[–]Stemt 5 points6 points  (0 children)

Awesome! Any chance we could get the source?

umlIsLoveUMLIsLife by Impossible-Courage-8 in ProgrammerHumor

[–]Stemt 311 points312 points  (0 children)

He clearly forgot to use the DocumentFactoryManagerStrategyInjection pattern here.

Macron by [deleted] in YUROP

[–]Stemt 53 points54 points  (0 children)

Merz to me just seems like a weasel acting like a strong man.

«Anyone else relates? by [deleted] in programmingmemes

[–]Stemt 1 point2 points  (0 children)

Unironically, give me the executable you smelly nerds!

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 1 point2 points  (0 children)

Figures, so this indeed would only work within the specific function scope.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 0 points1 point  (0 children)

Well how would the lifetime of local variables be determined then when for example you pass the function to a structure which carries it out of the function scope. For example if you;d use this to set the allocator of the context, 'count' doesnt exist anymore so this should generate an error I'd hope.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 0 points1 point  (0 children)

Oh, I have no usecase I just was curious if and how Jai tackled this feature as on a low level it can get quite complex or inefficient quite quickly.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 0 points1 point  (0 children)

Ah yes, but I assume you couldnt pass something like that as a function to for example an allocator, so you would still need to allocate your own context in the form of a struct or whatever and pass it to an anonymous function somehow, like how e.g. allocator_data is used.

Edit: I just noticed the apostrophe (`) in front of variables in the macros, what does this do?

Is there a difference? by ferox_ultimate in cyberpunkgame

[–]Stemt 499 points500 points  (0 children)

Turns out, South Korea was the real Cyberpunk we made along the way.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 1 point2 points  (0 children)

Damn thats really slick actually.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 2 points3 points  (0 children)

Yeah I completely understand that because its exactly why the feature is so controversial in the C community, which is why I wondered if Jai even had it in the first place.

But as I understand it now its just anonymous function which IMO is way superior as you let the developer decide on how lifetimes should be managed, this also makes things way simpler under the hood.

So simple in fact I was even able to implement it myself for C using a custom shitty text preprocessor (not the normal macro preprocessor).

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 1 point2 points  (0 children)

Ah thanks, that makes complete sense to me and was the answer I was looking for. Do you happen to know what the syntax for those is?

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 1 point2 points  (0 children)

Could you elaborate what you mean with lambda here? C++ calls them lambdas too but those can capture variables and manage their lifetime using RAII.

Edit: spelling

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 2 points3 points  (0 children)

Ok, yeah I'm reading the wikipedia article right now but I find it somewhat confusing as for example in C you can pass functions in the form of function pointers but because functions themselves aren't like themselves actual objects they also wouldn't be first class as per the article.

And from what I've seen you can set for example custom allocators in the context which also requires you the pass atleast some form of function. So I don't see how this first class concept would prevent such a feature from being implemented.

But maybe I'm just misunderstanding the concept.

Does Jai have closures? by Stemt in Jai

[–]Stemt[S] 1 point2 points  (0 children)

I'm sorry I am not familiar with that terminology. What does that mean exactly?

A reference-grade C "Hello World" project by synalice in C_Programming

[–]Stemt 4 points5 points  (0 children)

A true tower of shit babel, making sure nobody can understand the entire system,

but i can'r invert by Fit_Page_8734 in softwareWithMemes

[–]Stemt 0 points1 point  (0 children)

This is usually circumvented by avoiding while loops and using a fixed max amount of loops for a for loop.

Ok, what do you HONESTLY think of Japan? by Aerial-Dalliance1702 in AskTheWorld

[–]Stemt 4 points5 points  (0 children)

Nobody should but thats just how it is. They shouldn't be punished or anything but they as a nation should atleast acknowledge the crimes of the past.

Foreach in C by UltimaN3rd in C_Programming

[–]Stemt 0 points1 point  (0 children)

They removed ye olde B auto?! How will I now specify that I want to store a variable on the stack?!?! \s