Skip to content

Instantly share code, notes, and snippets.

View ozkriff's full-sized avatar

Andréy Lesnikóv ozkriff

View GitHub Profile
// See https://github.com/Microsoft/vscode/blob/8fdf170a0/extensions/rust/syntaxes/rust.tmLanguage.json for more scopes
"editor.tokenColorCustomizations": {
"keywords": "#000000",
"functions": "#000000",
"numbers": "#000000",
"types": "#000000",
"textMateRules": [
{

Неявность

ОРИГИНАЛ: https://boats.gitlab.io/blog/post/2017-12-27-things-explicit-is-not

TODO: перед отсылкой автопроверь орфографию и пунктуацию в паре редакторов

Часто когда я обсуждаю дизайн Rust на [RFCs][rfcs] или на [internals]-форуме с другими пользователями, я замечаю характерные высказывания насчет явности. Обычно что-то в духе:

diff --git a/hate/Cargo.toml b/hate/Cargo.toml
index b6a71ac..bd129bd 100644
--- a/hate/Cargo.toml
+++ b/hate/Cargo.toml
@@ -8,11 +8,11 @@ keywords = ["graphics", "gamedev", "2D", "game", "engine"]
categories = ["game-engines"]
[dependencies]
-gfx_core = "0.7"
-gfx_device_gl = "0.14"

Devlog 2: Jokers, Rancor, Blood and more

Hi, comrades! Welcome to the second issue of Zemeroth's devlog.

[Zemeroth] is a turn-based hexagonal tactical game written in Rust.

It slowly grows into a middle-sized project: [Zemeroth] has [4.3k LoCs] and 82🌟 now. Though I still can't find enough free time to work on it on daily basis and I have to take weeks-long breaks sometimes.

#!/bin/sh
# Script to upload a release asset using the GitHub API v3.
#
# Initial author: Stefan Buck - https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
# Example:
# upload-github-release-asset.sh github_api_token=TOKEN owner=stefanbuck repo=playground tag=v0.1.0 filename=./build.zip
# Check dependencies.
@ozkriff
ozkriff / mockup.svg
Last active March 11, 2018 09:20
zemeroth: notes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$ docker run --rm -v `pwd`:/root/src tomaka/android-rs-glue cargo apk
Cargo-Apk: Compiling android_native_app_glue.c
Cargo-Apk: Compiling injected-glue
Cargo-Apk: Compiling injected-glue
Cargo-Apk: Compiling glue_obj
Cargo-Apk: Compiling crate
Downloading gfx_window_glutin v0.12.0
Downloading android_glue v0.2.1
Downloading rusttype v0.2.1
Downloading gfx_core v0.4.0
diff --git a/core/src/ai.rs b/core/src/ai.rs
index c4c04e9..6b6ee73 100644
--- a/core/src/ai.rs
+++ b/core/src/ai.rs
@@ -1,3 +1,4 @@
+use std::rc::{Rc};
use rand::{thread_rng, Rng};
use game_state::{GameState, GameStateMut};
use partial_state::{PartialState};
@@ -30,8 +31,8 @@ pub struct Ai {