home.social

#atslang — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #atslang, aggregated by home.social.

  1. CW: Rosetta Code and ATS

    A #RosettaCode contribution for #ATS -- the old insideness of a convex hull algorithm. I decided to do this because I am likely to stick the algorithm within my next Bézier intersection algorithm (which will be coded in Ada using homogeneous geometric algebra, not in ATS using euclidean, but whatever) --

    Find if a point is within a triangle - Rosetta Code rosettacode.org/wiki/Find_if_a

    #ATSlang #Mathematics #Geometry

  2. CW: Rosetta Code Bézier intersections task

    Have at it, #fonts nerds and #graphics weirdos! A #RosettaCode task for y’all:

    Bézier curves/Intersections - Rosetta Code rosettacode.org/wiki/B%C3%A9zi

    #ATS #ATSlang #Dlang #Maxima

  3. CW: Rosetta Code/ATS

    There is a new #ATS example at #RosettaCode, part of my nascent tendentious series of simulations that show quantum physicists are entirely wrong in some of their beliefs:

    rosettacode.org/wiki/Simulated

    This #ATSlang code is all or mostly free of the proofs and complicated call by reference you often see in my ATS code. You could translate it straight into OCaml or SML. It is a simulation, supposedly impossible, of experiments you sometimes see hyped in the news, but which are stupid.

  4. CW: Rosetta Code: NEW TASK!!!!!!!!!

    I have added #ObjectIcon and #ATS --
    rosettacode.org/wiki/Bernstein

    #ATSlang #FunctionalProgramming

    Addendum: Others have been adding examples, too, so far in languages with which I am unfamiliar.

  5. Some #RealTime #ObjectOriented programming in #ATS for #RosettaCode. And I mean really #OO, not type hierarchy masquerading as OO. Communicating objects.

    There is no type hierarchy, because none is needed. One can use a closure to connect two objects, as long as the connection is compatible at both ends.

    And there is just one thread, because why in heck would you need two threads, just to read the time on the clock??????

    rosettacode.org/wiki/Active_ob

    #ATSlang

  6. Another #ATS example for #RosettaCode fans!

    rosettacode.org/wiki/Long_mult

    This is long multiplication, which I have used here to solve two distinct problems.

    The designer of the task must never have realized you could do this in something other than BCD and end up not having a carry ever occur.

    #ATSlang #FunctionalProgramming

  7. CW: Rosetta Code and ATS

    And here is the same code again modified, this time to find the reduced row echelon form of a matrix:

    rosettacode.org/wiki/Reduced_r

    #ATS #ATSlang #RosettaCode

  8. (Yes, nested loops/tail recursions might be slightly faster, but in #ATSlang are likely to be wordier and not enough faster to matter. Though for this particular problem you could use the for-loop notation with relative ease.

    Whether nested loops or one overall loop is simpler to write depends on the language and style.)

  9. CW: Rosetta Code and ATS

    Alright, you many, many #ATS fanatics. I have a treat for you: four #RosettaCode tasks at once!

    rosettacode.org/wiki/Bresenham

    #ATSlang #FunctionalProgramming #GraphicsProgramming #Fonts

    Sure, one can use SDL2 or whatever to draw lines, and, sure, these figures have "aliasing", but the tasks call for aliased figures. (I already did antialiased lines in ATS for a different task.)

  10. CW: Rosetta Code/ATS

    Okay, here’s another #ATS #ATSlang program in the raster image category:

    rosettacode.org/wiki/Bitmap/PP

    It does seem advantageous in some respects to use ImageMagick THIS way, instead of using libmagick.

  11. CW: Rosetta Code/ATS

    I got rid of the need for floating point and the math library:

    rosettacode.org/wiki/Grayscale

    #ATS #ATSlang

  12. CW: Rosetta Code/ATS

    Now the #grayscale task, and you’ll need even newer versions of bitmap_task.{sats,dats}:

    rosettacode.org/wiki/Grayscale

    #ATS #ATSlang

  13. CW: Rosetta Code/ATS

    Okay, you NUMEROUS fans of #ATS, I have done the next step in that set of #RosettaCode tasks dealing with #pixmaps (#bitmaps):

    rosettacode.org/wiki/Bitmap/Wr

    You have to get new versions of the earlier files, if you looked at those before. There is a link to them at the top of this entry.

    #ATSlang

  14. CW: Rosetta Code/ATS

    I have started a set of #pixmap = #bitmap manipulation tasks (since when do we pretend a color image is a ‘bitmap’?) with an #ATS contribution to the very first of the tasks:

    rosettacode.org/wiki/Bitmap#AT

    I went back to doing things at a low level, which my readers surely will appreciate. So the code is lengthy, given what is being done.

    And safety is important, so notice that if a ‘load’ fails you still get valid image data (an image filled with one color).

    #ATSlang

  15. CW: Rosetta Code/ATS

    I have added another #ATS example to #RosettaCode, this time for a strangely named ‘Munching Squares’ task:

    rosettacode.org/wiki/Munching_

    (The reason I say the task is strangely named is that ‘Munching Squares’ is an animation. Perhaps the task is not adequately fleshed out. I did what I thought it wanted.)

    #ATSlang

  16. CW: Rosetta Code and ATS

    My latest addition to the #ATS repertoire of #RosettaCode -- an implementation of the #Quaternion type task --

    Quaternion type - Rosetta Code rosettacode.org/wiki/Quaternio

    Also related to ATS, I posted the #m4 output of vmc (which I wrote in ATS) to the #Mandelbrot set task:

    rosettacode.org/wiki/Mandelbro

    #ATSlang

  17. CW: Rosetta Code

    This #compiler for the #RosettaCode Virtual Machine assembly language can now target any of #ATS, #C, #Mercury, or #Scheme --

    sourceforge.net/p/chemoelectri

    The Scheme code runs very fast in #ChezScheme, so-so in all else I have tried. I wonder how they do it. Maybe a lot of C code (instead of Scheme) in the runtime is part of it?

    The generated Mercury is not so fast, but such is life with Mercury. It’s fastish, considering.

    #ATSlang #ContinuationPassingStyle #FunctionalProgramming

  18. CW: Rosetta Code

    I have added #ATS to the languages for which there is a solution to the #RosettaCode #ModularArithmetic task:

    Modular arithmetic - Rosetta Code rosettacode.org/wiki/Modular_a

    This task was practically tailor-made for #Ada. :) But ATS lets us easily extend the language to handle modular numbers.

    #ATSlang #FunctionalProgramming #Proofs

    Update: After reading the task language again, I added some more commentary, to point out what I see as a flaw in the task.

  19. CW: Rosetta Code

    I have added a second #ATS implementation--this one based closely on the #StandardML, to aid people in comparing the two languages:

    Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code rosettacode.org/wiki/Continued

    I also demonstrate having the program broken into multiple files. Some things, which you might not expect to, have to be done "manually" in #ATS2 ...

    #atslang #sml

  20. CW: Rosetta Code

    I have added a second #ATS implementation--this one based closely on the #StandardML, to aid people in comparing the two languages:

    Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code rosettacode.org/wiki/Continued

    I also demonstrate having the program broken into multiple files. Some things, which you might not expect to, have to be done "manually" in #ATS2 ...

    #atslang #sml

  21. CW: Rosetta Code

    I have added a second #ATS implementation--this one based closely on the #StandardML, to aid people in comparing the two languages:

    Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code rosettacode.org/wiki/Continued

    I also demonstrate having the program broken into multiple files. Some things, which you might not expect to, have to be done "manually" in #ATS2 ...

    #atslang #sml

  22. CW: Rosetta Code

    I have added a second #ATS implementation--this one based closely on the #StandardML, to aid people in comparing the two languages:

    Continued fraction/Arithmetic/G(matrix ng, continued fraction n1, continued fraction n2) - Rosetta Code rosettacode.org/wiki/Continued

    I also demonstrate having the program broken into multiple files. Some things, which you might not expect to, have to be done "manually" in #ATS2 ...

    #atslang #sml