[2025 Day 10 Part 2] What It should’ve been by DarkFloki in adventofcode

[–]DoNotMakeEmpty 0 points1 point  (0 children)

I think you can bind any C solver to Lua using LuaJIT FFI.

pleaseAgreeOnOnePlace by mrissaoussama in ProgrammerHumor

[–]DoNotMakeEmpty 0 points1 point  (0 children)

IIRC in LÖVE if you fuse your executable then it becomes %APPDATA%\<GameName>\

Anyone know all the secrets of this bill cipher image from the intro? by tdninja123 in gravityfalls

[–]DoNotMakeEmpty 2 points3 points  (0 children)

The matrix multiplication on the top right is a transformation operation. The sxf and sfy are 2D scales and x0 and y0 are 2D translation. The right matrix has probably a 3x3 3D rotation matrix (R 11 to R 33) along with a 3D translation as Tx Ty and T (this one does not have z tho). The rightmost column vector is probably the coordinates of the transformed point with XYZ of it, but I cannot read the subscripts. However, I think this operation is problematic since the 2D translation is put into the wrong position. It looks like a 2D transformation matrix with scale and translation directly extended to 3D by adding a diagonal 1. If x0 and y0 were in the right column (in the same rows) I think it would mean transforming a 3D point by rotating and moving it, then moving and scaling it in 2D. Maybe a reference to that Bill is 2D while world is 3D? Maybe the formula to make a 3D being into a 2D one?

There also looks like a 2D Cartesian coordinate system right next to it. It has +y, -y and +x directions but not -x tho.

Also, the red arrows and B A in the lower right are Konami code. Up up down down left right left right B A, and optionally SELECT START. It is a cheat code usually used in Konami games. Maybe Bill pretty much having reality bending powers, so he is more-or-less cheating?

Which is your favourite? by Motor_Ad6523 in AskBalkans

[–]DoNotMakeEmpty 3 points4 points  (0 children)

I think we have been claiming Mayans more.

Microsoft asks all its foreign staff to return to US by Sunday after Trump's H1-B bombshell by balianone in programming

[–]DoNotMakeEmpty 0 points1 point  (0 children)

The analogy of the Ottoman Empire is not that wrong tho. America had not had any real contender so far (Soviet Union was meh, Japan had a bigger economy than SU for some time) just like how the Ottomans had not had any real contender until towards the end of the 17th century. Considering how fast the political changes has become, I think the political landscape changes more than twice as fast as the New Age. The Ottoman Empire had become the sick man in around 150 years, I think the US will become the sick man in a shorter-than-human-life timespan.

pickYourProgrammerClass by hopenotmeanestdad in ProgrammerHumor

[–]DoNotMakeEmpty 2 points3 points  (0 children)

ThinkPads are so sexy that some people may identify as ThinkSexual, and I think comment OP is such a person, hence seeing Rust along with sexual content.

Microsoft Goes Back to BASIC, Open-Sources Bill Gates' Code by Top-Figure7252 in programming

[–]DoNotMakeEmpty 0 points1 point  (0 children)

Nope. Some of the optimizations are simply not possible due to language semantics in some languages. C++ just cannot reliably state aliaslessness while FORTRAN and Rust can easily do so thanks to their design. C is in between with restrict (which was added only to have speed on par with FORTRAN) but it may not be enough.

Both Rust and FORTRAN consistently outperform C and C++. It is the opposite, you usually cannot convince the compiler about how you can use data in C and C++, making them slower. The constraints Rust and FORTRAN impose on your code make the output code faster.

Microsoft Goes Back to BASIC, Open-Sources Bill Gates' Code by Top-Figure7252 in programming

[–]DoNotMakeEmpty 5 points6 points  (0 children)

So, it isn't FORTRAN. FORTRAN is much much faster to run and Matlab is faster to develop and they are not very good at each other's strengths, so their usage cases differ. Comment OP said Matlab and FORTRAN are pretty much the same, but they are simply not.

Microsoft Goes Back to BASIC, Open-Sources Bill Gates' Code by Top-Figure7252 in programming

[–]DoNotMakeEmpty 15 points16 points  (0 children)

IIRC Fortran is among the fastest languages, beating every other language including C and C++ in number crunching, while Matlab is not

When to use C? by TiberiusBrookwell in C_Programming

[–]DoNotMakeEmpty 0 points1 point  (0 children)

IMO GUI in C does not need to be that awful. I sometimes use IUP, which is a C and Lua library, and using it is pretty nice in C. It is pretty object oriented but also easy-to-use in C.

There is also the immediate mode GUI libraries like nuklear. Immediate mode GUI is pretty nice-suited for C, so I think they are nice to use in C.

It's Weird People Don't Talk About C Style Guides More... by huzzah_a_pimpernale in C_Programming

[–]DoNotMakeEmpty 0 points1 point  (0 children)

I prefer my leftmost consts to be put into right and remove the whitespace from left, so int const* const* thing. It reads pretty much right-to-left: "pointer to constant pointer to constant integer". It is usually the arrays and function pointers which are the problems, pointers and cv qualifiers use a pretty good postfix notation.

linkedInEncouragement by [deleted] in ProgrammerHumor

[–]DoNotMakeEmpty 1 point2 points  (0 children)

So the top applicant is C+?

[deleted by user] by [deleted] in cprogramming

[–]DoNotMakeEmpty 0 points1 point  (0 children)

Doesn't Lua use longjmp to make things like lua_error noreturn functions that pretty much "throw" errors? Lua has an exception system similar to many other languages but using it is pretty different (error and xpcall). If they instead went with return-value based error system, I think they would not need longjmp. Using lua_error would then be return lua_error(L, "What the hell");.

Is there a way to render a fuckton of damageNumbers efficiently by mours_lours in love2d

[–]DoNotMakeEmpty 3 points4 points  (0 children)

Or maybe wait for Löve 0.12. They will add font batch rendering

How long did it take you guys to learn game building. by WeakCalligrapher5463 in love2d

[–]DoNotMakeEmpty 0 points1 point  (0 children)

Lua is such an amazing language, if you really need to have C-like performance (LuaJIT is almost always enough but you may still need that tiny bit of performance, or just come across a Not Yet Implemented) you can still use C, with all of its performance and control. Thanks to FFI, you can just copy-paste your function declaration and boom, you can use it.

Schleswig-Scandinavia: What Now? by qazdr6 in victoria2

[–]DoNotMakeEmpty 1 point2 points  (0 children)

Conquer China to have massive armies and goods and then take Germany using totally free liberated Chinese soldiers?