I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Simplest way of using https://sdkman.io/ under Fish Shell: | |
| # Add the snippet from the file below to your ~/.config/fish/config.fish and call it a day! | |
| # Note: while this trick works, it doesn't give you auto-completion options. | |
| function sdk | |
| bash -c "source '$HOME/.sdkman/bin/sdkman-init.sh'; sdk $argv[2..-1]" | |
| end |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait Interp { | |
| type Repr<T>; | |
| fn lit(i: i32) -> Self::Repr<i32>; | |
| fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>; | |
| } | |
| struct Eval; | |
| impl Interp for Eval { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env julia | |
| ## | |
| # A small script, written in Julia, which allows usage of 'and' and 'or' keywords instead of '&&' and '||' infix operators in Julia programs. | |
| # Made out of desperation after reading this discussion: https://github.com/JuliaLang/julia/issues/5238 | |
| # Notice, that run.jl **doesn't** modify the original file. | |
| # | |
| # Use it simply so: | |
| # $> julia run.jl <filename> | |
| # or by giving the file execution rights and then running: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## | |
| # 0. (A must) Leave a star on this GIST :P | |
| # 1. Clone/download/copy-paste the this script | |
| # 2. Give it rights to execute: `chmod +x d.sh` | |
| # 3. Move it somewhere on your PATH and (optionally) rename it on the fly: `mv d.sh /usr/local/bin/d` | |
| # 4. Now run it from anywhere: `d` or `d.sh` (if you didn't rename your file) | |
| # 5. ??? | |
| # 6. Hooray! You're inside the container! Enjoy your stay & mess around as much as you want! |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Простая конфигурация Vim для пользователей с русско-английской клавиатурой | |
| " Как правило, русскоязычных (duh) | |
| " Минималистичная, минимум плагинов, но с развёрнутым описанием каждой функции, настройки и команды | |
| " Работает для Vim 8.*, скомпилированного по максимуму. | |
| " Чистый конфиг, без использования менеджеров плагинов. | |
| " Цветовые схемы вручную копировал в папку ~/.vim/ | |
| " Также, ручками добавил | |
| " lightline и NERDTree в ~/.vim/pack/plugins/start, |
NewerOlder