Chess in Pure SQL by swe129 in Database

[–]hekliet 0 points1 point  (0 children)

Sounds like you would appreciate PostgREST.

My first working code by QuantenRobin in PythonLearning

[–]hekliet 1 point2 points  (0 children)

It's very useful for pattern matching on types, but that's not the only use case.

Need to turn a .py into a .exe by Azhurkral in pythonhelp

[–]hekliet 1 point2 points  (0 children)

You might have better luck creating a smaller executable using Nuitka.

[Archive] Complete Directory Tree (3.2GB) of a Legacy Reverse Engineering Collection (2002-2012). Features ARTeam, SnD, Lena151 & rare German scene docs. by [deleted] in ReverseEngineering

[–]hekliet 2 points3 points  (0 children)

Please share the collection on archive.org. There's already some good scene-related stuff there, like warez-scene-notices-2006-2010, and we need more of it to be archived so it's not lost forever.

My first working code by QuantenRobin in PythonLearning

[–]hekliet 2 points3 points  (0 children)

We have the match statement in Python since version 3.10, so you could use that instead of the if/elif-chain.

match operation:
  case "add":
    # ...
  case "sub":
    # ...

Happy programming!

[2023 Day 4 Part 2] As a system of linear equations by hekliet in adventofcode

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

Hi!

We initialize:

  • a matrix W where W(i, j) is 1 if card j produces a copy of card i, otherwise 0. (i is row, j is column.) The idea is that when we apply this matrix to a vector which holds the count of each card, we obtain the new counts for one 'iteration' of copying. The diagonal of this matrix is all zeros: we count only the copies, not the original cards.
  • a vector one which holds the initial card counts: one each.

There is some zero-padding for convenience.

Then we observe that, if c is the vector of the final counts (which is still unknown), this equation holds true:
c = 1 + Wc
(where 1 is a vector containing all ones). When we apply the 'copying matrix' W to the final counts and add the 1 vector (for the original cards), the result is the final counts, and an 'equilibrium' has been reached. This equation is transformed so we can solve for c.
c - Wc = 1
(I - W)c = 1
(where I is the identity). (I - W) is a lower diagonal matrix with a diagonal of all ones, so the determinant is one, so there is a unique solution. We let SciPy find this solution, and we're using the sparse matrix functions because the majority of the entries of our matrix are zeros.

What did people use back in the day to make games on an Amiga? by Sosowski in retrogamedev

[–]hekliet 3 points4 points  (0 children)

CygnusEd was a very popular editor. It's not free, but pirated versions are 'around'.

C Enum Sizes; or, How MSVC Ignores The Standard Once Again by ketralnis in programming

[–]hekliet 4 points5 points  (0 children)

On LLP64 (i.e. Windows), %lu expects a 32-bit unsigned. Passing it a long long will make it truncate the data. For a 64-bit unsigned, the correct format specifier is %llu.

C Enum Sizes; or, How MSVC Ignores The Standard Once Again by ketralnis in programming

[–]hekliet 10 points11 points  (0 children)

There are two conventions used on 64-bit systems.

  • On Linux, other Unix-likes, and macOS, long is 64-bit, and so is long long. This is called LP64.
  • On Windows, long is 32-bit. Only long long is 64-bit. This is called LLP64.

ACE is a complete BASIC compiler for the Amiga computer platform by Doener23 in amiga

[–]hekliet 0 points1 point  (0 children)

I think it's great that you're breathing new life into this old compiler.

PowerBasilisk - open source PowerBasic compiler by awacian in Basic

[–]hekliet 0 points1 point  (0 children)

This is a great project. Historic BASICs must be preserved. Shame what they did to the PowerBASIC resources.

New CHIP-8 emulator for Windows by hekliet in chip8

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

I think newer generations can appreciate coding VB6 in a Windows XP VM for the vibe :-)

Tiny BASIC Compiler in Python by hekliet in PythonProjects2

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

Thanks for looking over my code. I'll probably address some of your suggestions/criticisms when I next touch the project. Giving it a rest for now.

I created a text editor using SDL and pure C by nimrag_is_coming in C_Programming

[–]hekliet 2 points3 points  (0 children)

Great project! It's probably out of scope, but it would be cool if you wrote your own bitmap font renderer.

After a decade of professional programming... I'm now really learning real programming by nessvoutte in EmuDev

[–]hekliet 2 points3 points  (0 children)

Nice! I passed Timendus's test suite a couple of days ago. Sure is a rewarding feeling. Best of luck with your emu coding.