home.social

#rosettacode — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #rosettacode, 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: New Rosetta Code task

    I wrote a new #RosettaCode task of interest to both #ATS fans and #fonts fans:

    Steffensen's method - Rosetta Code rosettacode.org/wiki/Steffense

    Incidentally, before being smart and using #MetaPost for the graphic (the only SW I should have considered, aside from #Asymptote), I tried using the software formerly known as FF, but which did nothing but crash. I mean, really, it did nothing but crash. FontCrash, it will be called.

    cc: @khaled

  4. 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.

  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. 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.)

  9. 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

  10. 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

  11. CW: Rosetta Code

    Anti-aliased straight line drawing, implemented in #ObjectIcon (using the drawing of individual pixels, rather than cheating):

    Xiaolin Wu's line algorithm - Rosetta Code rosettacode.org/wiki/Xiaolin_W

    #RosettaCode

    (I discovered (a) that ‘variable’ does what Parlett documented, even though it is different from what ‘variable’ does in Icon; (b) there are major bugs in ipl.math(ExtMath). I have marked them ‘SEVERE BUG’ in my issues tracker. Easy to fix, but not today.)

  12. CW: Computer programming

    I hope that so far I have AT LEAST done enough to prevent #ObjectIcon disappearing into nowhere.

    Now I have to go mention the new repo on #RosettaCode. I’ll just make a handwritten note, for now.

    Of course, any RC contributor can make the changes. But one shouldn’t give the impression I plan to be a ‘maintainer’. I’m an older, disabled person simply providing the thing in the most forkable way.

    (Were it my own project, it would surely be in a Mercurial archive, not Git.)

  13. 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

  14. 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

  15. CW: Rosetta Code

    I went ahead and wrote a Virtual Machine to #ATS translator for the #RosettaCode #compiler task series:

    Compiler/virtual machine interpreter - Rosetta Code rosettacode.org/wiki/Compiler/

    The thing’s designed to make it relatively easy to handle many other languages. Languages with #goto should be easy to do, for instance: convert the program to one procedure with a lot of goto in it. And #Scheme could be done easily. I have ideas for #ObjectIcon and co-expressions.

    #FunctionalProgramming

  16. CW: Rosetta Code

    I just keep going. It is a pretty simple task. I did more than was called for, in the #ATS example I did first.

    Here is #Fortran --

    rosettacode.org/wiki/Modular_a

    As with the ATS, I use a macro, although the macro system is not as capable as that of ATS.

    (I used the C preprocessor. There was once a standard Fortran preprocessor, but it was removed from the standard. Nobody used it. Everyone used the C preprocessor, m4, or some such.)

    #RosettaCode #ProceduralProgramming

  17. 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.

  18. CW: Rosetta Code

    And now I did #zsh :

    rosettacode.org/wiki/Modular_e

    But really it is #GNU #expr doing the work. I had considered using GNU #bc instead. Basically anything that can do the calculation. Unix-users in the old days often liked hoc; maybe there is a hoc implementation you could use. :)

    #zshell #RosettaCode

  19. CW: Rosetta Code

    Now I have done the #ObjectIcon --

    rosettacode.org/wiki/Modular_e

    I hope to one day host the Object Icon sources myself, but you can get the last version by the author at Sourceforge. And my ‘chemoelectric’ overlay has a live ebuild for Gentoo. (I should make a ‘dead’ ebuild with a date as version, since the sources are no longer changing unless I make the changes.)

    #RosettaCode

  20. CW: Computer programming on :gentoo:

    I have hacked out a #Gentoo ebuild for the Oxford #Oberon2 Compiler:

    chemoelectric / chemoelectric-overlay / dev-lang / obc — Bitbucket bitbucket.org/chemoelectric/ch

    For the #RosettaCode buffs who program in all the languages except those they hate, and sometimes even in those they hate.

  21. CW: Computer programming on :gentoo:

    I have hacked out a #Gentoo ebuild for the Oxford #Oberon2 Compiler:

    chemoelectric / chemoelectric-overlay / dev-lang / obc — Bitbucket bitbucket.org/chemoelectric/ch

    For the #RosettaCode buffs who program in all the languages except those they hate, and sometimes even in those they hate.

  22. CW: Computer programming on :gentoo:

    I have hacked out a #Gentoo ebuild for the Oxford #Oberon2 Compiler:

    chemoelectric / chemoelectric-overlay / dev-lang / obc — Bitbucket bitbucket.org/chemoelectric/ch

    For the #RosettaCode buffs who program in all the languages except those they hate, and sometimes even in those they hate.

  23. CW: Computer programming on :gentoo:

    I have hacked out a #Gentoo ebuild for the Oxford #Oberon2 Compiler:

    chemoelectric / chemoelectric-overlay / dev-lang / obc — Bitbucket bitbucket.org/chemoelectric/ch

    For the #RosettaCode buffs who program in all the languages except those they hate, and sometimes even in those they hate.

  24. CW: Rosetta Code

    It is not too often that I add a #Dlang example to #RosettaCode :

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

    In fact, I think this is just the second time. I do not like this style of programming (even though #ObjectIcon is much alike and I hope to be its advocate in the absence of its author).

    Yesterday I added a second #Scheme implementation (I also did the first) and #CommonLisp for this task.