116 points by aray07 2 days ago | 40 comments | View on ycombinator
TuringTest 1 day ago |
artrax 1 day ago |
https://github.com/nebulastream/nautilus
It allows us to implement operators or functions without having to write them in terms of LLVM IR DSL (or similar). Rather, you write your functions over a wrapper type (and returning one), for which there is an overload of anything which you can overload in c++.
You can instantiate a wrapper from some c++ value, in which case the wrapper will just forward everything to this value, which was nice for debugging in the preagentic era. But, you can also instantiate such a wrapper as a tracer, and the result of the functions evaluation will be a trace.
For controlflow, we record whenever a wrapper type is evaluated as a bool, first return true, and when we reach the end of one branch, throw an exception to get back to the beginning, and start all over again, but evaluate it to false.
The resulting trace we can turn into LLVM IR and compile, or run for example in wasm
apignotti 1 day ago |
https://labs.leaningtech.com/blog/reducing-webassembly-size-...
iFreilicht 1 day ago |
abs( + 2 * 3 - 10)
becomes
abs( - 4)
which is great fun. My first attempts using this showed me that if you're not used to this, it actually gets pretty confusing quite quickly, but I guess it can be learned.
owlstuffing 1 day ago |
The problem with expanding it to include function calls is that it compromises binary compatibility. A code change on a function that results in a different range or has different side effects, will not be realized unless the caller is recompiled.
p1necone 1 day ago |
johntortugo 1 day ago |
airtnp 1 day ago |
Skill => Generic Program LLM skill optimizer => Partial evaluator Context => Env/Input Agent => Interpreter
First projection: mix(interpreter, program) => specialized skill AOT compiling => offline skill rewriting JIT compiling => runtime specializing, defer loading
Second projection: mix(mix, interpreter) => Agent/Model specific skill optimizer
Third projection: mix(mix, mix) => self-improvement skill optimizer
Whatever maybe I'm just thinking LLM as magic partial evaluator for any tasks
undefined 1 day ago |
measurablefunc 1 day ago |
infogulch 1 day ago |
dbu21 1 day ago |
There are three moments that make the functional programmer evolve their understanding of how a programming language really works as a symbolic representation of human thought, beyond the metaphor taught in school of a computer program as a grinder that crunches input data and produces results.
The first one is when you really understand recursion and how a function can be defined in terms of itself (with varying parameters for each call).
The second is when you discover Prolog variable unification or Haskell lazy evaluation and how you can represent infinite data structures without having the program hang in an infinite loop.
Third one is when you learn that the behavior of any imperative language (down to the working of the microprocessor data paths) can be fully represented in a pure functional rewrite language (without destructive assignment / cell state changes).
Those insights make one realize that all programming paradigms have the nature of symbols processing in common and there's no "true description" of a program's runtime execution - the imperative, functional and logic views of the running program are all equivalent representations.