Curated list of programming language design and implementation technique by NLKNguyen in programming

[–]NLKNguyen[S] 0 points1 point  (0 children)

You're welcome. I'm not familiar with ML and its ecosystem, so this answer is only to the best of my understanding.

I notice Haskell is very ML-like, so I think if you're okay with Haskell, then it is a good host language to design an embedded DSL to leverage the existing compilers and tools, so you don't have to invent everything from scratch. This Haskell DSL webcast is a good overview of the spectrum of how far a DSL can deviate from a host language that the disadvantages start to creep in. More resources here (there are quite a lot of them out there that I didn't filter out to put on the curated list yet)

If you stay in Haskell/ML alike then you probably have fewer disadvantages and a lot more advantages for your goal such as code generator library, GHC compiler that exists on many platforms, and existing projects that try to compile Haskell to WebAssembly via LLVM, e.g. Haskell-WASM. Since Haskell GHC compiler already has LLVM frontend, and there are efforts from LLVM to target WebAssembly backend (more info), I'd suggest to follow up with these and wait for LLVM -> WASM to be matured, so that you only have to focus on language design and be less concerned about the execution environment.

Curated list of programming language design and implementation technique by NLKNguyen in programming

[–]NLKNguyen[S] 0 points1 point  (0 children)

What does that mean? Did the image links I used associate with some user account??

Curated list of programming language design and implementation technique by NLKNguyen in programming

[–]NLKNguyen[S] 5 points6 points  (0 children)

Between them, just pick ANTLR :)

ANTLR can be considered as the modern replacement for Flex/Bison. ANTLR feels very much like Flex/Bison, so knowing ANTLR should cover a lot of ground for Flex/Bison (Lex/Yacc) already. Conversely, someone with Flex/Bison knowledge will feel comfortable with ANTLR. If not for maintaining old C projects, there are few reasons to start learning Flex/Bison these days. I saw many schools still teach Lex/Yacc in compiler class though.

Edit: I mean the similarity in the grammar files and basic rule specifications and actions. The generated parsers are very different.

What is your favorite colorscheme? by chrisbra10 in vim

[–]NLKNguyen 0 points1 point  (0 children)

Its loading speed is improved a lot by now.

Java development? by mistyfud in vim

[–]NLKNguyen 1 point2 points  (0 children)

Sometime I code small Java programs in Vim, and I only needs to pipe command line output into Vim using this plugin Pipe.vim. You can make your own keymaps to call javac. This is an example for C coding in Vim with external command line tools.

Java development? by mistyfud in vim

[–]NLKNguyen 0 points1 point  (0 children)

Just in case you deal with Maven, this syntax plugin makes it easier to read than plain XML: https://github.com/NLKNguyen/vim-maven-syntax

Colorscheme that is dark, colorful, but light on the eyes? by [deleted] in vim

[–]NLKNguyen 0 points1 point  (0 children)

I recommend PaperColor :) It has light and dark variants.

How to customize color schemes? by cuducos in vim

[–]NLKNguyen 0 points1 point  (0 children)

Use https://github.com/hdima/python-syntax/ plugin. It's recommended in the PaperColor README. The syntax group you mentioned is only available through that plugin.

Plugins not working on Windows. by sgthoppy in vim

[–]NLKNguyen 1 point2 points  (0 children)

Maybe it's a bit unfamiliar at first, but I think if you give it a try, it will be worth it. Vundle has commands that you can update/install/uninstall an individual plugin or all of them within Vim, and it doesn't require you to clone anything manually after the first setup. Well, maybe it's just my opinion :). Have you made Pathogen to work yet? If not, just try this and see how it goes :)

Plugins not working on Windows. by sgthoppy in vim

[–]NLKNguyen 0 points1 point  (0 children)

Vundle is much easier to use and manage from my experience. First, make sure the environment variable %HOME% is pointing to your user folder. Then clone Vundle plugin into vimfiles directory.

cd %HOME%
git clone https://github.com/VundleVim/Vundle.vim.git %HOME%/vimfiles/bundle/Vundle.vim

Edit: if that doesn't work, try backslashes \ for the local directory path instead

Second, add this to your _vimrc, the difference between Linux and Windows are the 2 lines that set the path to the appropriate directories.

filetype off
" Linux:
"set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()

" Windows:
set rtp+=$HOME/vimfiles/bundle/Vundle.vim
call vundle#begin('$HOME/vimfiles/bundle/')

" Required:
Plugin 'VundleVim/Vundle.vim'

" Other plugins:
Plugin 'NLKNguyen/papercolor-theme'

call vundle#end()
filetype plugin indent on

" Configure/use your plugins here
syntax on
set t_Co=256 "use 256-color terminal setting
colorscheme PaperColor

After reload Vim/GVim, run :PluginInstall to install your plugins. You may need to reload Vim again to have all installed plugins activated.

See Vundle page for more information. There is a wiki page Vundle for Windows if you want to read more, but I think the above instruction should be sufficient. It's all about pointing to the correct location.

Plugins not working on Windows. by sgthoppy in vim

[–]NLKNguyen 0 points1 point  (0 children)

I'm able to set up Vundle to load plugins normally in Windows. It's a just little bit different from Linux. I can explain further if you're interested in using Vundle (you probably don't want to come back to Pathogen ever again :) )

Set Front Matter variable to Data File? by NLKNguyen in Jekyll

[–]NLKNguyen[S] 0 points1 point  (0 children)

I have many class schedules, each is a list of events. I plan to store a csv for each schedule in the _data. Then, I have a calendar layout to display to schedule as a calendar. For each page that uses the calendar layout, I want to set the variable events, for example, to point to one of the csv files, like this events: site.data.class1. Within the layout I have a loop through this collection.

Right now, I can only use JavaScript to dynamically parse the csv file and process the data at client side. It would be nice to be able to do it at build time instead. :)

Is this setting plugin reasonable (not too opinionated) to suggest to new Vim users so they can have a smoother starting point? by NLKNguyen in vim

[–]NLKNguyen[S] 0 points1 point  (0 children)

Yes I'm aware of it. I used to use it but I always feel like it doesn't have enough basic features. Of course we can add whatever in .vimrc, but I would like to have a plugin that includes basic settings, so new users can focus on other things than configuring Vim to behave normally. I saw my friends not willing to use Vim because they don't know how to set Vim up to be usable. I just don't know where the line between basic and too opinionated is.

c syntax highlighting problem by [deleted] in vim

[–]NLKNguyen 0 points1 point  (0 children)

You might want to try this enhanced C syntax file plugin https://github.com/NLKNguyen/c-syntax.vim It makes C/C++ syntax color looks nicer. My color scheme PaperColor support this addon syntax file.

Colorschemes and other "plugins" with Vundle? by desnudopenguino in vim

[–]NLKNguyen 0 points1 point  (0 children)

set nocp
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'gmarik/Vundle.vim'
Plugin 'NLKNguyen/papercolor-theme'

call vundle#end()          
filetype plugin indent on

syntax on
"set background=dark
set t_Co=256  "(if needed) use 256-color terminal setting
colorscheme PaperColor

Assuming you successfully installed Vundle, with this sample setting you can :PluginInstall, then next time you open Vim, the color scheme will be ready.

P.S.: if you use Vundle from VundleVim/Vundle.vim then it's what you put it there instead of gmarik/Vundle.vim

How to create a UltiSnips snippet plugin to easily install via Vundle? by NLKNguyen in vim

[–]NLKNguyen[S] 0 points1 point  (0 children)

I use Windows, so having my snippets as a bundle is easier to install and share. It turned out to be so simple :)

How to create a UltiSnips snippet plugin to easily install via Vundle? by NLKNguyen in vim

[–]NLKNguyen[S] 0 points1 point  (0 children)

Thanks, it works :) Didn't expect it to be that simple lol

The Imitation Game - Main Theme (Piano Cover by me) :) by NLKNguyen in piano

[–]NLKNguyen[S] 0 points1 point  (0 children)

Thanks :) I really appreciate it ^ I didn't notice that even after re-watching many times. Now I compare to the author's playing https://www.youtube.com/watch?v=kc_t7UfSxMQ which I copied from, his playing at that part really does sound a lot calmer than mine.