home.social

#objecticon — Public Fediverse posts

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

  1. I was just thinking about how Arizona Icon converted co-expressions to a pthreads implementation and suddenly realized it might be to make co-expressions ‘the’ way to get a separate thread in Icon.

    But this is NOT what a co-expression is meant for! I mean, this just plain is NOT what a co-expression should be thought of as. A co-expression is a way of making an Icon generator portable and able to read messages. And thus also is best to be FAST...

    #Iconlang #Icon #Unicon #ObjectIcon

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

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

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

  5. CW: Computer programming

    Come get your #ObjectIcon sources, people! A #programming #language you probably do not yet know: github.com/chemoelectric/objec

    Easier to learn if you already know #Icon or #Unicon. Also if you know #Prolog or #Mercury, which are other languages that have goal-directed evaluation (which which are declarative, whereas the Icon family are procedural).

    (Please fork rather than expect support, though. I am an elderly disabled person.)

  6. CW: Object Icon migration

    #ObjectIcon is one of those compilers that installs an executable as intermediate code with a shebang header that runs the intermediate code interpreter. So oipatch is something to rewrite the shebang header to point to a different location for the interpreter.

    With that, you can do a staged install.

    As it current comes (but perhaps not after I make changes, if I get to doing that), Object Icon is meant to be run where you built it. To me, that’s not acceptable.

  7. CW: Mandelbrot set programming

    Here is how I decided to work monotonic cubic splining (for color gradients) straight into the #ATS program:

    chemoelectric / mandelbrot-viewer / [d4995d] /pchip2c.icn.m4 sourceforge.net/p/chemoelectri

    That is an #Icon/#Unicon program (or #ObjectIcon, depending on #m4 settings). What it does is take the output of passing the original PCHIP (not any of the derivatives) through f2c and make it buildable without f2c.h or libf2c.

    Then I simply link the #ATS with that C code.

  8. Okay, running the generated #ObjectIcon for the Mandelbrot program, and running the generated regular #Icon with the ‘Arizona’ compiler: the Object Icon is MUCH faster.

    Because what I generate is a set of coroutines (passing along control in continuation passing style, except with only global variables) and regular Icon is probably using a separate pthread for each coroutine.

    This has more portability and safety than in older versions (and in Unicon), but makes co-expressions SLOW.

  9. I shall now add #Icon and #ObjectIcon to the languages vmc can output and I am going to do it with co-expressions. So we shall see a comparison of current Arizona Icon methods (probably pthreads) and those of Object Icon (linked stack frames).

    Perhaps I could also install Unicon and get it into the mix. It would be using the AMD64 stack-switcher that (ahem) I wrote for it. (But I haven’t had Unicon installed for years. I’m bad.)

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

  11. CW: Rosetta Code

    Oh, and any #ObjectIcon user (if there be any other than I) might find this useful: bitbucket.org/chemoelectric/ch

    It is needed by the Gentoo ebuild for staged installation. Icon-folk don’t think a lot about the needs of people doing installation.

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

  13. CW: Rosetta Code

    BTW a fourth method, beyond closures, inheritance, and unlimited polymorphism, is the co-expressions of #ObjectIcon and #Icon. Which I used, for those languages. (Also #Unicon)

    A fifth option would be practically anything you can think up that uses call-with-current-continuation in Scheme. But I did the #Scheme with closures. :)

    (Side note: neither the Icons nor standard Scheme have run-time type safety. So the Python method would have worked, too)

  14. CW: Rosetta Code

    My #ObjectIcon translated from #Dlang was a complete botch. It gave wrong answers! So I deleted it. But this #Icon code works:

    rosettacode.org/wiki/Continued

    (To use it as ObjectIcon code would require a few tiny changes.)

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