6 ms·
Source: https://www.reddit.com/r/programming/comments/7wbtg/who_is_oleg_kiselyov_no_really_can_anyone_post_a/ https://www.reddit.com/r/programming/comments/7wbt
by merelydev 6y ago
Source: https://www.reddit.com/r/programming/comments/7wbtg/who_is_oleg_kiselyov_no_really_can_anyone_post_a/ https://www.reddit.com/r/programming/comments/7wbtg/who_is_o...
- Oleg eats lambdas for breakfast
- The Y combinator fears Oleg
- Oleg knows all the programs that halt on a Turing machine
- Oleg is the guy that Chuck Norris goes to when he has an algorithm complexity question
- Oleg reprograms his own DNA with Scheme macros
- All of Oleg's Haskell programs are well-typed by definition
- Oleg can read C++ compiler error messages.
- Oleg built his house out of Prolog relations
- Oleg speaks machine lanugage
- Oleg once turned a zero into a one.
- Emacs? Vi? Oleg wills files into existance
- Oleg has the Haskell98 Report memorized. In Binary. In UTF-EBCDIC
- Oleg can write unhygienic syntax-rules macros.
- Sometimes Recursion gets confused when Oleg uses it.
- patrec 6y ago> Oleg can write unhygienic syntax-rules macros. Not only can he do it, he even wrote a paper about it: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.367.9251&rep=rep1&type=pdf https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.36...
- siraben 6y agoIMO implementing hygienic macros properly is one of the hardest tasks in programming languages, especially since variable capture can cause subtle bugs.
- patrec 6y agoWell, certainly no one seems to understand how e.g. syntax-case works. But my impression is that macro hygiene in itself is a solution looking for a problem. The key advantage e.g. racket's macro system has over clojure or common lisp is not hygiene but being sufficiently well structured and rich to allow proper tooling. Good error messages with accurate locations >> macro hygiene.
- akiselev 6y agoI think in theory they’re orthogonal but in practice the two go together. It’s all fine and dandy when you’ve got a restricted set of battle tested macros from a single library interacting in real world code, but it rapidly breaks down when you’ve got application authors of various skill sets all contributing their own macros because the dare not touch the ones that came before. Macro hygiene provides the equivalent of type level guarantees to metaprogramming scope.
- mpweiher 6y agoAnd maybe Macros aren't the right kind of metaprogramming mechanism...
- patrec 6y agoWhy not?
- patrec 6y agoIs this based on conjecture or personal experience from working on multi-dev projects with both hygienic and unhygienic macro systems? I lack such comparative experience but my guess would be that if your org's development approach is such that inexperienced people churn out dodgy macros without more expert review you are screwed and having a hygienic macro system will not save you. I'm very sceptical hygienic macros are at all comparable in utility to what a type system provides for multi-dev projects of any size. These benefits of types at scale are fairly massive and apply to basically any code. In contrast macros should make up a tiny amount (much less than 5% certainly) of code in a non-trivial application code base which means careful review is not a big overhead (and in my experience competent programmers do not introduce a lot of hygiene problems). So to be equivalent, in those instances where you do get a benefit from hygiene, that benefit would need to be absolutely massive compared to the average benefit you get of types.
- kazinator 6y agoMacro hygiene is a solution to the problem of functions being in the same namespace as variables, together with standard, oft-needed library functions having short names that are easily chosen as variable names.
- lmilcin 6y agoIt is also very fun. That's why you internalize Let over Lambda. It is like discovering Lego Technics after playing Lego for entire life. Then it is disappointing when you realize you can't show it at work or people get ideas...
- jhgb 6y ago- Oleg can read C++ compiler error messages. Oh, come on. You were doing so great until this point.
- vkazanov 6y agoAgree. Because even gods can't read Cpp template errors.