Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add new paint method ?
#11
Everything is beyond the Browse... button in the script-fu console. But what I meant is that most of the code above is part of plain Python. In Python all objects have a __str__ method that returns the string representation, and a __repr__ one that returns an unambiguous string representation (so number 123 is 123 while string 123 is '123'). And format strings have %s and %r to choose between the two...
Reply
#12
Quote:Of course, there is almost half a century between Lisp and Python Smile

To clarify what ofnuts is saying (for the youth out there):
Lisp invented functional programing, code-macros, object-oriented, DSLs (via reader macros), dynamic typing, dynamic code generation, interactive coding, interactive/graphic programming environments, syntax-aware editors (and all of emacs);

But as you say, half a century later, other languages are getting there.
Reply
#13
(02-16-2019, 08:03 PM)Jack Parker Wrote:
Quote:Of course, there is almost half a century between Lisp and Python Smile

To clarify what ofnuts is saying (for the youth out there):
Lisp invented functional programing, code-macros, object-oriented, DSLs (via reader macros), dynamic typing, dynamic code generation, interactive coding, interactive/graphic programming environments, syntax-aware editors (and all of emacs);

But as you say, half a century later, other languages are getting there.

Agreed, even though I think you forgot relational databases, and the whole of AI. Lisp is such a perfect language that it is in everyone's mind and everybody uses it.
Reply
#14
Yes, the list of Lisp breakthroughs goes on and on.
And yet: Lisp is so simple and obvious that people don't need to search the Internet to learn/use it.
(unlike some other languages for which people are constantly looking for answers)

Beyond Greenspun's tenth rule, we also note:
"every sufficiently advanced programming language re-invents a subset of Lisp"
When *that* language is then "complete", noobs declare that it is "too complicated"
So somebody invents a small, simple, easy to use, interpreter that makes *some* problem simple to program..
[it just needs a few more feature to be more widely useful... evolve and repeat]

That being said, is there a function in GIMP to compute the 'distance' between two colors?
Reply
#15
I assume you take the Wright brother's Flyer to travel... After all, all planes derive from it, right?

As to the function, looking at the source code for the fuzzy selector, it just computes the absolute value of the difference between channels (R,G,B or L,C,H)(and takes the max of the R/G/B differences for "composite").
Reply


Forum Jump: