title |
---|
Comparison to OCaml |
If you come from OCaml or are a newcomer reading a tutorial written on OCaml, this guide's for you! But don't forget that reason-tools can convert between OCaml and Reason syntax on the fly.
OCaml | Reason |
---|
program myalltoall | |
!Program to show a simple implementation of a deadlock avoiding mpi loop among all processes which, | |
!in principle, is similar to an alltoall loop. However, the main purpose of the technique shown here is to | |
!properly reorder shortest (i.e., each process with just few others) non-blocking communication loops, | |
!in order to alleviate the burden on the communication side (as each exchange is matched, everything | |
!is exchanged very quickly). Here, it is tested against the the mpi_allreduce intrinsic with MPI_SUM | |
!on a single real variable, but IT IS NOT a replacement for allreduce (nor alltoall or any other intrinsic). | |
use, intrinsic :: iso_fortran_env, only : int32, real64 | |
use mpi | |
implicit none |
title |
---|
Comparison to OCaml |
If you come from OCaml or are a newcomer reading a tutorial written on OCaml, this guide's for you! But don't forget that reason-tools can convert between OCaml and Reason syntax on the fly.
OCaml | Reason |
---|
import re | |
import sys | |
urls=[] | |
try: | |
file_name=sys.argv[1] | |
replacement=sys.argv[2] | |
except: | |
print("[!] Enter urls file name") |
{ | |
"suggest.noselect": false, | |
"coc.preferences.formatOnSaveFiletypes": [ | |
"javascript", | |
"typescript", | |
"typescriptreact", | |
"json", | |
"javascriptreact", | |
"typescript.tsx", | |
"graphql" |
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
#include <stdio.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <string.h> | |
#define streq(a, b) (!strcmp((a), (b))) | |
#ifndef __USE_GNU | |
#define __USE_GNU |
/* | |
https://en.wikipedia.org/wiki/Time_Stamp_Counter | |
https://ru.wikipedia.org/wiki/Rdtsc | |
*/ | |
#include <stdio.h> | |
typedef unsigned long long uint64; | |
int main() { |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)
Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through: