Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)RE
Posts
6
Comments
77
Joined
2 yr. ago
  • In G'MIC, there's repeat(num_of_iters,_var_name,code();); on JIT code, and repeat code_block done outside of JIT. It has while, for, dowhile on JIT too. Other than repeat, there is only do while, and for which is while outside of JIT.

    Note: _var_name, can be omitted. So, if you need to just repeat a code N times, that can be removed.

  • Yeah. repeat() is unique to a few language. I think just Scala, and G'MIC has it. I use the second one. It's more convenient than say for(p=0,p<5,++p,);. Sometimes, repeat(5,); suffice.

  • Sometimes, I just rewrite my code until it is good enough. Other times, I leave it to my memory, so I can figure it out later. And others, I'm just not happy about it, like the times I did bigbin2dec and it would only work well with something like thread-ripper.

  • It means that I made changes to code, so that it can work with any multi-threading strategy. G'MIC is a interpretative language with JIT support, and you don't have any control over automated multi-threading strategy. It can be thread 0 to thread N linearly, or even interleaved. So, the workaround is to make a image of size equal to cpus count, and do the multithreading there.

    Yeah, I love image processing, I worked on it for 8+ years now.

  • HTML @sopuli.xyz
    Reptorian @programming.dev

    Looking for a HTML4 editor.

    cross-posted from: https://programming.dev/post/20450422

    Right now, I would like a easy editor that allows me to not worry about HTML4 syntax, and simply adjust the rendered text, while I can see the HTML source code.

    The reason I need something like this is that I sometimes do make note() in G'MIC which looks like this:

     undefined
        
    #@gui:_=separator(),_=note("<center><b>- Additional Information -</b></center>")
    
      

    See that inside note("")? That's HTML4. And while I can do without a editor, I feel that it would be better to use an actual editor where I can copy and paste.

    HTML @programming.dev
    Reptorian @programming.dev

    Looking for a HTML4 editor.

    Right now, I would like a easy editor that allows me to not worry about HTML4 syntax, and simply adjust the rendered text, while I can see the HTML source code.

    The reason I need something like this is that I sometimes do make note() in G'MIC which looks like this:

     undefined
        
    #@gui:_=separator(),_=note("<center><b>- Additional Information -</b></center>")
    
      

    See that inside note("")? That's HTML4. And while I can do without a editor, I feel that it would be better to use an actual editor where I can copy and paste.

    My code can look something like this (Without wrap lines):

    ::: spoiler spoiler

     undefined
        
    <b>Palette CLI Information</b>\n\n <i>Main Source of Palettes - </i><a href=\"https://lospec.com/palette-list/"> LoSpec Palette List</a>\n\nPalette Number -- pal number_id = pal name_id -- Full Palette Name by Author[if mentioned]\n\n1 -- +pal 0 = +pal bw -- Black & White\n2 -- +pal 1 = +pal rgb -- Red-Green-Blue\n3 -- +pal 2 = +pal b_rgb -- Black with Red-Green-Blue\n4 -- +pal 3 = +pal bw_rgb 
      
    Shell Scripting @programming.dev
    Reptorian @programming.dev

    Is there a better algorithm for converting big binaries into decimal?

    At the moment, I am stuck with using single-precision float, and double-precision float. So, the maximum represent-able value for single is 1<<24 while for double, it is 1<<53.

    Because of this, I made the following script here - https://gist.github.com/Reptorian1125/71e3eec41e44e2e3d896a10f2a51448e .

    Allow me to clarify on the script above. On the first part, rep_bin2dec does is to return the converted values into the status. So, when I do ${} or variable=${rep_bin2dec\ ???}, I get the status string.

    On the second part, rep_bin2dec_base is the basis for getting rep_bin2dec to work. _rep_bin2dec_base prints the base_10M array into a string.

    So, how does rep_bin2dec_base converts a big binary into big decimal?

    1. If the binary image is less than dimension of 54, then the script will use 0b{} which allows me to directly convert binary to decimal, and 0b is a binary literal much in the same way that Python and C++ does it. From this point, it's pretty obvious
    Shell Scripting @programming.dev
    Reptorian @programming.dev

    I made a Brainfuck interpreter within G'MIC (Shell-Like language for image processing)

    Three things before I'll get to the relevant details.

    1. Brainfuck is a esoteric languages which uses 8 characters. I'll leave details here - https://en.wikipedia.org/wiki/Brainfuck
    2. G'MIC is a language largely inspired by bash languages and one other shell scripting language, and partly inspired by C++ for JIT compilation. It's two languages in one as in one outside of JIT and one inside of JIT. It's main purpose is image processing, and it can do 3D things too, basically image-related things. It's turing-complete, so making files has been done with it. Even making a executable compiled program is possible in practice (but, I would point to doing C++ and compile there instead).
    3. I am a G'MIC filters developer.

    Anyways, I taken some time to code up a Brainfuck interpreter within G'MIC. It wasn't that hard to do once I understood what Brainfuck is as a language. I did one earlier than this, but I had to have users define inputs beforehand. Recently, I created rep_cin command t

    Text Editors @programming.dev
    Reptorian @programming.dev

    Is there a text editor that would allow me to create syntax highlighting easily?

    Basically just the title said. The situation is basically I use a Domain-Specific Language called G'MIC, and to this day, I haven't found a satisfactory answer to the issue of lack of syntax highlighting. At the moment, I am using KDE Kate as it's pretty good at structuring the code with their find/replace feature, tab indicators, and multi-window support.