8 ms·
A Common Lisp library for solving linear programming problems
- namibj 7y agoThe 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. It makes me want to do more with Racket again...
- behnamoh 7y agoYou 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?
- namibj 7y agoThey 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.
- ddragon 7y agoHygienic 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. And yes, racket's macros are hygienic.
- jxy 7y agoIf 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. [0] https://nim-lang.org https://nim-lang.org
- kd0amg 7y agoThe 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.
- panzerklein 7y agoAnother recent computation library for Common Lisp: https://github.com/numcl/numcl https://github.com/numcl/numcl
- srean 7y agoWhat intrigues me (in a good way) is this: Copyright (c) 2019 IBM Corporation Is IBM upto something ?
- jsjolen 7y agoThe author is paid by IBM to work on this. The author combines ML and classical AI to achieve explainability in ML. This is one guy by the way, so not like a huge effort by IBM.
- srean 7y agoThanks 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.
- eggy 7y agoKen 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". [1 - PDF] https://link.springer.com/content/pdf/10.1007/BF00993982.pdf https://link.springer.com/content/pdf/10.1007/BF00993982.pdf
- dshacker 7y agoHow is this different from miniKanren? Isn't this logical programming? Or is it more of a simplex NSAT solver?