4 ms·
The magic method resolution seems much more intriguing to me than the infinite array. Are there any programming languages (or perhaps a better word would be par
by w-m 4y ago
The magic method resolution seems much more intriguing to me than the infinite array. Are there any programming languages (or perhaps a better word would be paradigms), that take this concept further?
I would imagine that I just state comments in my code file. Then, at runtime, all code is produced by the language model, and then executed.
There's the issue of the model producing different generative results with each execution. But maybe that could be taken care off by adding doctests within my comments. Which could, of course, be mostly generated by another language model...
- shadowgovt 4y agoHardware manufacturers actually have to deal with this issue these days. An awful lot of chip fabrication is done via stochastic / heuristic / monte carlo methods for any large chip; rather than exhaustively laying out the whole chip by hand, hardware devs describe the chip in a constraints language and feed it to a fabrication program (often with some additional parameters like "optimize speed" or "minimize power consumption / heat generation"). Then the program outputs the chip schematic to be fabricated. Unless you save the random seed at every step, it's entirely possible to end up with the problem that you have a schematic, but if you lose it you'll never get the program to fabricate exactly that schematic again (because hundreds or thousands of precise schematics solve the problem well enough to terminate the monte carlo search).
- matsemann 4y agoUsed to be quite common in java jpa spring, but I haven't seen it that much in the wild lately. Basically you just write a method name as an interface, and runtime it will implement it. https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.query-creation https://docs.spring.io/spring-data/jpa/docs/current/referenc... To make fun of this behavior, I made a similar thing for javascript when proxies came into the language https://github.com/Matsemann/Declaraoids https://github.com/Matsemann/Declaraoids