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
| FROM --platform=linux/amd64 archlinux:latest | |
| ENV RUSTFLAGS="-C target-feature=-crt-static" \ | |
| CC="clang" \ | |
| CXX="clang++" \ | |
| GN_EXE="gn" \ | |
| SKIA_GN_COMMAND="/usr/bin/gn" \ | |
| SKIA_NINJA_COMMAND="/usr/bin/ninja" | |
| RUN pacman -Syu --noconfirm \ |
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
| use std::ops::{Deref, DerefMut, Index}; | |
| #[test] | |
| fn test() { | |
| let mut outer: Versioned<_> = Outer { | |
| a: 0.into(), | |
| b: 0.into(), | |
| multiplied: 0, | |
| } | |
| .into(); |
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
| Prompt: Invent a new language that is more efficient than human language for exchanging information in written text and make some examples. | |
| Introducing OptiScript: A highly efficient language for exchanging information in written text. OptiScript incorporates elements from various human languages, mathematical notations, and logical symbols to optimize information exchange. Here are some key features of OptiScript: | |
| It uses a compact alphabet of 30 symbols, encompassing both phonetic and ideographic characters. | |
| OptiScript employs a context-aware grammar that reduces the need for lengthy syntax and repetitive phrases. | |
| The language utilizes a color-coding system for faster processing and comprehension of text. | |
| It incorporates shorthand symbols and abbreviations from various disciplines to reduce character count and convey complex ideas succinctly. | |
| Here are some examples to illustrate the efficiency of OptiScript: |
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
| use std::{cell::RefCell, collections::HashMap, hash::Hash, rc::Rc}; | |
| #[derive(Debug)] | |
| pub struct RcCache<K, V> | |
| where | |
| K: Eq + Hash + Clone, | |
| V: Clone, | |
| { | |
| data: RefCell<HashMap<K, Rc<V>>>, | |
| } |
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
| use crate::{ | |
| entities::{colors, DynId}, | |
| geometry::{scalar, Point}, | |
| input::{ | |
| self, | |
| tracker::{movement, Movement}, | |
| }, | |
| renderer::paragraph::{self, Paragraph}, | |
| Jump, UnicodeHelper, | |
| }; |
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
| use crate::{ | |
| default, | |
| geometry::{scalar, Point, Size}, | |
| UnicodeHelper, | |
| }; | |
| use skia_safe::{ | |
| textlayout::{ | |
| self, FontCollection, LineMetrics, ParagraphBuilder, ParagraphStyle, PositionWithAffinity, | |
| RectHeightStyle, RectWidthStyle, TextStyle, | |
| }, |
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
| > rustup component add x86_64-unknwon-linux-musl | |
| - change build_support to support musl | |
| - build with target musl | |
| Failed to find tool Is musl-g++ installed | |
| > sudo apt install musl-dev | |
| > sudo apt install musl-tools |
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
| Process: physics [44804] | |
| Path: /Users/USER/*/physics | |
| Identifier: physics | |
| Version: 0 | |
| Code Type: X86-64 (Native) | |
| Parent Process: zsh [39813] | |
| User ID: 501 | |
| Date/Time: 2020-07-27 21:23:03.377 +0200 | |
| OS Version: Mac OS X 10.15.5 (19F101) |
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
| let [<Literal>] FilenameMaxLen: int = 64 | |
| // Note: this is platform dependent, therefore Windows | |
| // version of System.IO.Path.GetInvalidFileNameChars() is hardcoded here. | |
| let InvalidFilenameCharacters = [| | |
| '"'; '<'; '>'; '|'; '\000'; '\001'; '\002'; '\003'; '\004'; '\005'; '\006'; | |
| '\007'; '\b'; '\009'; '\010'; '\011'; '\012'; '\013'; '\014'; '\015'; | |
| '\016'; '\017'; '\018'; '\019'; '\020'; '\021'; '\022'; '\023'; '\024'; | |
| '\025'; '\026'; '\027'; '\028'; '\029'; '\030'; '\031'; ':'; '*'; '?'; | |
| '\\'; '/' |
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
| [<AutoOpen>] | |
| module Prelude | |
| let (^) = (<|) | |
| type CR = CompilationRepresentationAttribute | |
| let [<Literal>] ModuleSuffix = CompilationRepresentationFlags.ModuleSuffix | |
| type RQA = RequireQualifiedAccessAttribute | |
| let inline flip f a b = f b a | |
| let inline curry f a b = f(a, b) |
NewerOlder