[BR] Lista com a implementação de mais de 1200 tarefas computacionais em variadas linguagens de programação.
[EN] 1200 #computational tasks implementation in several #language #programming.
#computational #language #programming #rosettacode
Here you go, numerous #ATS fans, another #Mathematics #RosettaCode contribution in #ATSlang --
https://rosettacode.org/wiki/Determine_if_two_triangles_overlap#ATS
#ats #mathematics #rosettacode #atslang
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 https://rosettacode.org/wiki/Find_if_a_point_is_within_a_triangle#ATS
#rosettacode #ats #atslang #mathematics #geometry
Have at it, #fonts nerds and #graphics weirdos! A #RosettaCode task for y’all:
Bézier curves/Intersections - Rosetta Code https://rosettacode.org/wiki/B%C3%A9zier_curves/Intersections
#fonts #graphics #rosettacode #ats #atslang #dlang #maxima
I wrote a new #RosettaCode task of interest to both #ATS fans and #fonts fans:
Steffensen's method - Rosetta Code https://rosettacode.org/wiki/Steffensen%27s_method
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
#rosettacode #ats #fonts #metapost #asymptote
Well, I am not eager to contribute to #RosettaCode on a language that is SUCH A moving target.
More #ATS (#ATSlang) for #RosettaCode --
https://rosettacode.org/wiki/Simulated_optics_experiment/Data_analysis#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:
https://rosettacode.org/wiki/Simulated_optics_experiment/Simulator
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.
Please have a look at my "Extra Credit" problem on #RosettaCode --
Simulated optics experiment/Simulator - Rosetta Code https://rosettacode.org/wiki/Simulated_optics_experiment/Simulator#Extra_%22credit%22
Have at it, fellow computer programming #RosettaCode nerds! I have done the #Python (not because I like Python, which I do not, but because so many others know it):
https://rosettacode.org/wiki/Simulated_optics_experiment/Simulator
https://rosettacode.org/wiki/Simulated_optics_experiment/Data_analysis
(I do admit, however, that the library support was quite adequate, for doing a simulation such as this with multiple processes. Most languages, certainly, do not come with such support as part of their compiler/interpreter distribution.)
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??????
#realtime #objectoriented #ats #rosettacode #oo #atslang
Some naïve quadrature implementations, in #ATS, for #RosettaCode --
#ats #rosettacode #atslang #functionalprogramming #numericalmethods
I am considering adding a #RosettaCode task, ‘BCD integer division with remainder’.
The reason for BCD is that it can be done in more languages than other practical uses of long division, it helps resolve an ambiguity about one of the major steps, and it will let me provide specific test cases.
This division as done by Knuth is quite a complex operation, which I had coded incorrectly for a long time. I had generated the wrong test cases! And so missed my bug.
Another #ATS example for #RosettaCode fans!
https://rosettacode.org/wiki/Long_multiplication#ATS
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.
#ats #rosettacode #atslang #functionalprogramming
This is the ‘Read a PPM file’ #RosettaCode task done in #ATS, giving you a program for converting color images to grayscale:
https://rosettacode.org/wiki/Bitmap/Read_a_PPM_file#ATS
One might notice a couple of things. In the current version of all these codes, (a) you do not need a garbage collector, because it’s using linear types, and (b) you do not need the math library and I do not use floating point.
(I temporarily had floating point while I was confounded to find what I was doing wrong with integers.)
Okay, you NUMEROUS fans of #ATS, I have done the next step in that set of #RosettaCode tasks dealing with #pixmaps (#bitmaps):
https://rosettacode.org/wiki/Bitmap/Write_a_PPM_file#ATS
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.
#ats #rosettacode #pixmaps #bitmaps #atslang
I have added another #ATS example to #RosettaCode, this time for a strangely named ‘Munching Squares’ task:
https://rosettacode.org/wiki/Munching_squares#ATS
(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.)
Here is a #Modula2 version:
https://rosettacode.org/wiki/Xiaolin_Wu%27s_line_algorithm#Modula-2
#RosettaCode #GraphicsProgramming #graphics #math #evolute #parabola
#modula2 #rosettacode #graphicsprogramming #graphics #math #evolute #parabola
Here is a similar program in #Fortran -- which is NOT annoying (at least when you aren’t doing anything to fancy) --
https://rosettacode.org/wiki/Xiaolin_Wu's_line_algorithm#Fortran
#fortran #rosettacode #math #graphicsprogramming #ellipse #evolute