Barry Schwartz 🫖 · @chemoelectric
507 followers · 8220 posts · Server masto.ai
Barry Schwartz 🫖 · @chemoelectric
501 followers · 7692 posts · Server masto.ai

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

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

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

#objecticon #rosettacode

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
501 followers · 7683 posts · Server masto.ai
Barry Schwartz 🫖 · @chemoelectric
504 followers · 7664 posts · Server masto.ai

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

Now I have to go mention the new repo on . 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.)

#objecticon #rosettacode

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
504 followers · 7635 posts · Server masto.ai

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

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

#objecticon #programming #language #icon #unicon #prolog #mercury

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
504 followers · 7635 posts · Server masto.ai

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

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

#objecticon #programming #language #icon #unicon #prolog #mercury

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
501 followers · 7580 posts · Server masto.ai

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.

#objecticon

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
497 followers · 7239 posts · Server masto.ai

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

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

That is an /#Unicon program (or , depending on 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 with that C code.

#ats #icon #objecticon #m4

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
493 followers · 7130 posts · Server masto.ai
Barry Schwartz 🫖 · @chemoelectric
491 followers · 7072 posts · Server masto.ai

Okay, running the generated for the Mandelbrot program, and running the generated regular 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.

#objecticon #icon

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
491 followers · 7070 posts · Server masto.ai

I shall now add and 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.)

#icon #objecticon

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
489 followers · 7051 posts · Server masto.ai

I went ahead and wrote a Virtual Machine to translator for the task series:

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

The thing is designed to make it relatively easy to handle many other languages. Languages with 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, too. I have ideas for using co-expressions.

#ats #rosettacode #compiler #goto #objecticon

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
490 followers · 7044 posts · Server masto.ai

I have added --
rosettacode.org/wiki/Modular_a

(I will not call this an example of , given that I never use goal-direction or failure in any significant way.)

#objecticon #rosettacode #proceduralprogramming #logicprogramming

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
490 followers · 7009 posts · Server masto.ai
Barry Schwartz 🫖 · @chemoelectric
490 followers · 6998 posts · Server masto.ai

Oh, and any 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.

#objecticon

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
490 followers · 6997 posts · Server masto.ai

Now I have done the --

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

#objecticon #rosettacode

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
488 followers · 6956 posts · Server masto.ai

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

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

#objecticon #icon #unicon #scheme

Last updated 2 years ago

Barry Schwartz 🫖 · @chemoelectric
483 followers · 6746 posts · Server masto.ai

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

rosettacode.org/wiki/Continued

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

#objecticon #dlang #icon

Last updated 3 years ago

Barry Schwartz 🫖 · @chemoelectric
483 followers · 6747 posts · Server masto.ai

In adding the I discovered there is a serious bug in the ObjectIcon runtime of the last revision:

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

#objecticon

Last updated 3 years ago

Barry Schwartz 🫖 · @chemoelectric
483 followers · 6745 posts · Server masto.ai

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

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 is much alike and I hope to be its advocate in the absence of its author).

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

#dlang #rosettacode #objecticon #scheme #commonlisp

Last updated 3 years ago