The with-solved-problem macro shows how (in this case, I think termed "unhygienic") Lisp macros allow fancy stuff with the code-is-data approach.
The first argument seems to be a normal Lisp expression, with no special syntax, and the second argument has the solution variable and all the variables mentioned in the expression bound to (the solution object, the values of the variables in the solution it found).
This approach is obviously available for everything. You can just use fully-flexible S-Expressions as essentially function arguments, and the function can modify the variables / identifiers in scope during execution of it's arguments.
You mention good points about why Lisp could be advantageous compared with other languages in this context. That actually was my question when I read the post. But mind you, aren't Racket's macros hygienic?
They are. But I didn't have the time to research what statement I could make about Racket allowing or not allowing such an interface, therefore I made no statement as to that.
Hygienic Macros usually have ways to violate the hygiene, so that property doesn't change how expressive they can be, just that the default behavior is safer because you won't accidentally overwrite anything on the scope the macro was called from.
If you are willing to give up S-Expressions, you might try Nim [0]. Its compile time macro system allows this fancy stuff easily, even with access to the type system.
The first argument seems to be a normal Lisp expression, with no special syntax, and the second argument has the solution variable and all the variables mentioned in the expression bound to (the solution object, the values of the variables in the solution it found).
That doesn't sound any more unhygienic than pattern matching.
Thanks for the information. Very interesting. IBM of course is the owner of CPLEX one of the famous LP solvers.
I still hold out hope that the likes of Gurobi or CPLEX would be replicated by open source or they themselves would be open sourced. There is GLPK, but from what I hear and read its performance is not at par. There is Glop by Google but have not tried it.
Ken Iverson was also 'one guy' who formulated APL while working at Harvard University. He later wrote the APL book: A Programming Language while at IBM.
I am one who thinks all of the effort that went into, and is still going into symbolic AI with Lisp will re-emerge to tie in with the current ML techniques using neural networks like ANNs, RNNs, GANNs, etc. to really bring AI/ML to the next level.
This 1992 [1] paper concludes with an interesting line:
"In conclusion, the research summarized in this paper demonstrates that combining symbolic and connectionist methods is a promising approach to machine learning."
There are many others that are more current - search on "ML and Symbolic AI".
12 comments
[ 2.9 ms ] story [ 41.6 ms ] threadThe first argument seems to be a normal Lisp expression, with no special syntax, and the second argument has the solution variable and all the variables mentioned in the expression bound to (the solution object, the values of the variables in the solution it found).
This approach is obviously available for everything. You can just use fully-flexible S-Expressions as essentially function arguments, and the function can modify the variables / identifiers in scope during execution of it's arguments.
It makes me want to do more with Racket again...
And yes, racket's macros are hygienic.
[0] https://nim-lang.org
That doesn't sound any more unhygienic than pattern matching.
This is one guy by the way, so not like a huge effort by IBM.
I still hold out hope that the likes of Gurobi or CPLEX would be replicated by open source or they themselves would be open sourced. There is GLPK, but from what I hear and read its performance is not at par. There is Glop by Google but have not tried it.
I am one who thinks all of the effort that went into, and is still going into symbolic AI with Lisp will re-emerge to tie in with the current ML techniques using neural networks like ANNs, RNNs, GANNs, etc. to really bring AI/ML to the next level.
This 1992 [1] paper concludes with an interesting line:
"In conclusion, the research summarized in this paper demonstrates that combining symbolic and connectionist methods is a promising approach to machine learning."
There are many others that are more current - search on "ML and Symbolic AI".
[1 - PDF] https://link.springer.com/content/pdf/10.1007/BF00993982.pdf