• 3 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle
  • For small projects, rewriting is often superb. It allows us to reorganize a mess, apply new knowledge, add neat features and doodads, etc.

    This. I’m coding to contribute to a open-source software with very small amount of coders, and with a non-mainstream Domain-Specific Language. A lot of the code I did before has been proven to work from times to time, but they all could benefit from better outputs and better GUI. So, I end up reengineering the entire and that’ll take a really long time, however, I do a lot of tests to ensure it works.




  • This could be an XY problem, that is, you’re trying to solve problem X, rather than the underlying problem Y. Y here being: Why do you need things to be in decimal in the first place?

    I wouldn’t say it’s needed, but this is more of a fun thing for me. The only thing I’m using this is for Tupper’s Self-Referential formula, and my current approach of converting base 1>>24 to base 1e7 works instantly for 106x17 binary digits. When I load a image to that filter that’s greater than somewhere over 256x256, delays are noticeable because the underlying algorithm isn’t that great, but it could have to do with the fact that G’MIC is interpretative, and despite the JIT support in it, this is not the kind of problem it’s meant to solve (Domain-Specific). On the bright side of thing, this algorithm will work with any data type as long as one data type is one level higher than the other, and in this case, I’m using the lowest level (single and double), and the bigger data type, much faster it can be.







  • Coming from some one who used 4 different languages (C#, C++, Python, and G’MIC), I just feel more comfortable when there’s a explicit end blocks, which is why I don’t like Python. Of all of those languages, only Python does not make that explicit end block which is off-putting in my opinion, and there isn’t any other options with the similar role to Python.




  • It’s a bit of a pain to finish, but I’m basically working on creating an array of numbers to assist in sorting unicode characters, and I’m making string processing commands for the G’MIC scripting language. So, that means by hand, I have to sort hundreds of thousands of characters, and I sorted tens of thousands of them already. I already did string_permutations and you can find string_permutations at index or find index which that permutation can be found. However those commands needs the array of numbers for an additional sorting option I’ll do.




  • Chances are there’s probably something similar to dictionary in Python in your languages or at least it’s a import/#include away. Although I don’t use general programming languages at all, in my used language (G’MIC), I do something like dict$var=input where $var is a defined variable, and this way I can access input by doing ${dict$var} and that’s similar to Python dictionary. In C++, there’s hash table implementation out there via github. That being said, there are sometimes when you don’t need a hashtable dependent on the hashmap, and sometimes, it’s just as simple as basic mathematics to access data.







  • Every languages has their own pitfalls. The answer on picking a language is to pick whatever works for you. There may be even domain-specific languages if you’re interested in a domain, and it can be way more flexible than general-purpose solutions for that domain too.

    I use 4 languages.

    1. C++ for adding features to a program.
    2. C# for making .dll for an application (Paint.NET). Kinda similar purpose to what I do with G’MIC, except so much more limited.
    3. Python for processing strings
    4. G’MIC for creating/editing raster graphics images (volumetric too)

    Now, I wish there was a vector equivalent to G’MIC, but there isn’t.