3 ms·
Bling [1] was quite similar to this. The idea is that rather than use and build values, you can use and build expressions instead. With those expressions, you c
by seanmcdirmid 11y ago
Bling [1] was quite similar to this. The idea is that rather than use and build values, you can use and build expressions instead. With those expressions, you can generate whatever code you really need (including GPU code), but you can also walk them to do things like symbolic differentiation (in the style of Conal Elliott) or compute an inverse.
A lot can be done with C#'s support for operator overloading and extensions methods to make this look prettier.
http://bling.codeplex.com/ http://bling.codeplex.com/
- bigdubs 11y agoA lot can also be done with the System.Linq.Expressions api in generating actual functions from the meta-expressions you build. I used a lot of those api's for https://github.com/ClothesHorse/microscope https://github.com/ClothesHorse/microscope
- seanmcdirmid 11y agoI use System.Linq.Expressions all the time, first time I used them in Bling and even had a nice discussion about it with Jim Hugunin and company when he was still at Microsoft. I'm actually using it right now in my current work on live programming! Still, you have to put a lot of boilerplate around it to make it viable. Bling wraps everything in expression trees and as a backend step will go to Linq expression trees for anything that needs to run on the CPU. However, it can also go to HLSL to generate GPU code, which is quite useful!
- moron4hire 11y agoI'm in desperate need of something like this from C# to SQL that isn't LINQ to SQL or Entity Framework (they're very centered on MS SQL Server and I don't like their ancillary workflow).
- barake 11y agoThere are numerous LINQ to X providers, such as DbLinq[1]. Remember LINQ is just a map/bind/filter/fold implementation, with the ability to get the AST of the "query". [1] https://github.com/dblinq/dblinq2007 https://github.com/dblinq/dblinq2007
- zidad 11y agoI think LLBLGen still has the most mature Linq > SQL translator and supports most major databases, as they have an intermediate query model between the LINQ expression trees and database providers. Unfortunately only available with generated code, no code-first support. https://www.llblgen.com/ https://www.llblgen.com/