;;; eglot-booster.el --- boost eglot using emacs-lsp-booster -*- lexical-binding: t; -*- | |
;; Copyright (C) 2024 J.D. Smith | |
;;; Commentary: | |
;; **UPDATE** This has been superseded by the following package: | |
;; https://github.com/jdtsmith/eglot-booster | |
;; | |
;; Boost eglot with emacs-lsp-booster. | |
;; 1. Download a recent emacs-lsp-booster from |
September 2022:
This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.
Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# This install used the following development environment: | |
# - We have installed xcode command line tools | |
# - We have installed cmake via homebrew (my version is 3.20.2) | |
# - We have created a fresh conda environment "pytorch-dev" and installed | |
# python=3.8 and all of the packages from pytorch/README.md except cmake | |
# (including the torch.distributed deps) | |
# - We have copied the relevant OpenMP header files into a fresh directory at ~/openmp | |
# - We have cloned the pytorch github repo to ~/pytorch | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.
Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.
To give a quick example, a Rust function with variadic generics might look like this:
#![allow(unused)] | |
use { | |
futures::{ | |
future::{BoxFuture, FutureExt}, | |
task::{ArcWake, waker_ref}, | |
}, | |
std::{ | |
future::Future, | |
pin::Pin, |
server: | |
host: 127.0.0.1 | |
port: 8081 | |
app: | |
username: ${env:USER} | |
flask: | |
ENV: production | |
DEBUG: false |
from simpletransformers.language_modeling import LanguageModelingModel | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
transformers_logger = logging.getLogger("transformers") | |
transformers_logger.setLevel(logging.WARNING) | |
train_args = { |
from simpletransformers.language_modeling import LanguageModelingModel | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
transformers_logger = logging.getLogger("transformers") | |
transformers_logger.setLevel(logging.WARNING) | |
train_args = { | |
"reprocess_input_data": True, |
""" | |
BiLSTM-CRF的PyTorch教学实现,矩阵化版本,含详尽注释和举例 | |
参考 | |
- PyTorch官方教学代码: https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html | |
- 矩阵化推导: https://zhuanlan.zhihu.com/p/44042528 | |
- BiLSTM-CRF原文: https://arxiv.org/pdf/1508.01991v1.pdf | |
by 虎哥@知乎 [email protected] 2019/12/16 | |
""" | |
import torch |