Раз уж тут так много новых людей — и особенно много тех, с кем я совершенно не знаком — пожалуй, стоит рассказать немного о себе и об этом канале.
Меня зовут Антон, ястудент человек студенческого возраста и в настоящий момент я работаю программистом, по работе пишу в основном... Да, на Rust, а как вы догадались? Я люблю Rust и ненавижу примерно все остальные языки программирования. Круг моих интересов относительно широк, но на канал изливается в основном программирование (серьёзно, около половины постов с хештегом #prog). Этот канал изначально планировался как удобная свалка ссылок, материалов и #meme-ов, и... Он таковым, в сущности, и остался. В своё оправдание я могу сказать, что все статьи (выкладываемые с хештегом #article) я всегда читаю перед тем, как выложить, так что делюсь я тем, что считаю стоящим своей аудитории.
Также ведение своего канала сподвигнуло меня на написание своих постов (и иногда даже перевод чужих статей), которые я выкладываю под хештегом #моё (как, впрочем, и созданные мною мемы). В их числе я хотел бы отметить:
- написание трейта, гарантирующего нулевой размер типа
- оптимизация размера итератора из стандартной библиотеки Rust (увы, не принятая)
- реализация zero-cost форматировщиков даты
- разбор различных способ реализации полиморфизма, с их достоинствами и недостатками
- эпические "Хроники замыканий" в 3 (пока что) частях: раз, два, три
- деликатный и глубокий анализ недостатков регулярных выражений
Для удобства привожу список всех хештегов на канале (может быть пополнен в будущем):
#3dcg
#abnormalprogramming
#algo
#amazingopensource
#anime
#art
#article
#bash
#bio
#blogrecommendation
#c
#cinema
#clojure
#cpp
#csharp
#db
#demoscene
#design
#dotnet
#erlang
#game
#go
#idris
#itsec
#haskell
#js
#java
#julia
#justrustaceanthings
#kbd
#life
#math
#mechanics
#meme
#menacingopensource
#ml
#mood
#music
#outoflinestorage
#parsing
#performancetrap
#php
#pixelart
#politota
#postgresql
#prog
#psy
#puzzle
#python
#quotes
#regex
#retroit
#r
#rust
#rustasync
#rustforlinux
#rustreleasenotes
#rustlib
#scala
#science
#serde
#shell
#soc
#softskills
#sql
#successstory
#suckassstory
#tips
#typescript
#video
#web
#zig
#бомбёжкипост
#культурнаяпрограмма
#лингво
#моё
#право
#трудовыебудни
Ну и традиционно — лайки, колокольчик, рассказывайте друзьям, бла бла бла, ну, вы знаете, как это обычно выглядит. Ну и раз уж я пока не могу поприветствовать каждого лично, я поприветствую всех новоприбывших скопом:
Добро пожаловать на канал!
Меня зовут Антон, я
Также ведение своего канала сподвигнуло меня на написание своих постов (и иногда даже перевод чужих статей), которые я выкладываю под хештегом #моё (как, впрочем, и созданные мною мемы). В их числе я хотел бы отметить:
- написание трейта, гарантирующего нулевой размер типа
- оптимизация размера итератора из стандартной библиотеки Rust (увы, не принятая)
- реализация zero-cost форматировщиков даты
- разбор различных способ реализации полиморфизма, с их достоинствами и недостатками
- эпические "Хроники замыканий" в 3 (пока что) частях: раз, два, три
- деликатный и глубокий анализ недостатков регулярных выражений
Для удобства привожу список всех хештегов на канале (может быть пополнен в будущем):
#3dcg
#abnormalprogramming
#algo
#amazingopensource
#anime
#art
#article
#bash
#bio
#blogrecommendation
#c
#cinema
#clojure
#cpp
#csharp
#db
#demoscene
#design
#dotnet
#erlang
#game
#go
#idris
#itsec
#haskell
#js
#java
#julia
#justrustaceanthings
#kbd
#life
#math
#mechanics
#meme
#menacingopensource
#ml
#mood
#music
#outoflinestorage
#parsing
#performancetrap
#php
#pixelart
#politota
#postgresql
#prog
#psy
#puzzle
#python
#quotes
#regex
#retroit
#r
#rust
#rustasync
#rustforlinux
#rustreleasenotes
#rustlib
#scala
#science
#serde
#shell
#soc
#softskills
#sql
#successstory
#suckassstory
#tips
#typescript
#video
#web
#zig
#бомбёжкипост
#культурнаяпрограмма
#лингво
#моё
#право
#трудовыебудни
Ну и традиционно — лайки, колокольчик, рассказывайте друзьям, бла бла бла, ну, вы знаете, как это обычно выглядит. Ну и раз уж я пока не могу поприветствовать каждого лично, я поприветствую всех новоприбывших скопом:
Добро пожаловать на канал!
Telegram
Блог*
#prog #rust #article #моё
Как я и обещал, я... Так, погодите, я не писал об этом в блоге? Впрочем, ладно, напишу сейчас: я планировал написать перевод этой статьи и выложить его на Хабре. Собственно, сегодня я это и сделал.
Как я и обещал, я... Так, погодите, я не писал об этом в блоге? Впрочем, ладно, напишу сейчас: я планировал написать перевод этой статьи и выложить его на Хабре. Собственно, сегодня я это и сделал.
#prog #js #amazingopensource
Карта мира в терминале, к которой можно подключиться по telnet!
github.com/rastapasta/mapscii
Карта мира в терминале, к которой можно подключиться по telnet!
github.com/rastapasta/mapscii
GitHub
GitHub - rastapasta/mapscii: 🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <=…
🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows - rastapasta/mapscii
#prog #js #article
(thanks @oleg_log)
-
— подходящее имя для пакета на npm, не находите? И да, он существует и скачивается в больших количествах. В статье рассказывается, почему.(thanks @oleg_log)
BleepingComputer
Empty npm package '-' has over 700,000 downloads — here's why
A mysterious, one-letter npm package named "-" sitting on the registry since 2020 has received over 700,000 downloads. What's more? The package contains no functional code, so what makes it score so many downloads?
#prog #js #typescript #article
Статья (pdf) о том, как типы могут помочь поймать баги в коде на JavaScript, на базе случайной выборки из репозиториев по всему GitHub. TL;DR: Flow и Typescript в состоянии поймать 15% из допущенных багов (с доверительным интервалом 5%)! Причём, учитывая методологию, это число наверняка занижено. К сожалению, ссылки на материалы исследования нерабочие, так что проверить результаты несколько затруднительно.
Статья (pdf) о том, как типы могут помочь поймать баги в коде на JavaScript, на базе случайной выборки из репозиториев по всему GitHub. TL;DR: Flow и Typescript в состоянии поймать 15% из допущенных багов (с доверительным интервалом 5%)! Причём, учитывая методологию, это число наверняка занижено. К сожалению, ссылки на материалы исследования нерабочие, так что проверить результаты несколько затруднительно.
#prog #rust #js #article #successstory
Статья о том, как переписали с нуля плеер asciinema на Rust (с компиляцией в WASM) и Solid.js и получили прирост производительности в 50 раз.
(thanks @theLastOfCats)
Цитаты:
"At first I planned to implement the terminal emulation part in Rust without any optimizations, just write idiomatic Rust code, then revisit the tricks from the old implementation. The initial benchmarks blew my mind though, showing that spending additional time on optimizing the emulation part is absolutely unnecessary."
"I still thought I may need to implement some form of terminal state snapshot/restore to support the “seeking” feature. This feature requires feeding the terminal emulator with the whole text stream between the current position and the desired position, or in the worst case when you’re seeking back, feeding the emulator with the whole text from the very beginning of the recording up to the desired position. Optimizing this could be done, for example, by keeping snapshot of the terminal emulator state at multiple time points, sort of like having key-frames every couple of seconds. In ClojureScript implementation this came for free, thanks to the immutable data structures. In the new JS+Rust implementation this would have required extra work, but it turned out, that’s not needed either - clicking on the progress bar in the new player, to jump to the desired time in the recording, results in instantaneous jump, even when it has to feed the emulator with megabytes of data to parse and interpret."
Статья о том, как переписали с нуля плеер asciinema на Rust (с компиляцией в WASM) и Solid.js и получили прирост производительности в 50 раз.
(thanks @theLastOfCats)
Цитаты:
"At first I planned to implement the terminal emulation part in Rust without any optimizations, just write idiomatic Rust code, then revisit the tricks from the old implementation. The initial benchmarks blew my mind though, showing that spending additional time on optimizing the emulation part is absolutely unnecessary."
"I still thought I may need to implement some form of terminal state snapshot/restore to support the “seeking” feature. This feature requires feeding the terminal emulator with the whole text stream between the current position and the desired position, or in the worst case when you’re seeking back, feeding the emulator with the whole text from the very beginning of the recording up to the desired position. Optimizing this could be done, for example, by keeping snapshot of the terminal emulator state at multiple time points, sort of like having key-frames every couple of seconds. In ClojureScript implementation this came for free, thanks to the immutable data structures. In the new JS+Rust implementation this would have required extra work, but it turned out, that’s not needed either - clicking on the progress bar in the new player, to jump to the desired time in the recording, results in instantaneous jump, even when it has to feed the emulator with megabytes of data to parse and interpret."
blog.asciinema.org
4x smaller, 50x faster · asciinema blog
News about asciinema development and new releases
#prog #js #typescript #abnormalprogramming
github.com/jamiebuilds/json-parser-in-typescript-very-bad-idea-please-dont-use
github.com/jamiebuilds/json-parser-in-typescript-very-bad-idea-please-dont-use
GitHub
GitHub - jamiebuilds/json-parser-in-typescript-very-bad-idea-please-dont-use: JSON Parser written entirely in TypeScript's type…
JSON Parser written entirely in TypeScript's type system - jamiebuilds/json-parser-in-typescript-very-bad-idea-please-dont-use
#prog #js #typescript
Banditypes — the mighty 400-byte validator
Check if data conforms to a TS type at runtime — much like zod, yup or superstruct, but in a tiny 400-byte package. Despite the small size, it's not a toy:
Passes the relevant superstruct test suite.
Rich built-in types: maps, sets, tuples, literals, and generic union types.
Mostly API-compatible with the established libraries.
Supports both deriving TS types from schema and declaring a schema for an existing TS type.
User-defined types, refinements, and conversions.
Decent performance — among the top libraries not using code generation.
Banditypes — the mighty 400-byte validator
Check if data conforms to a TS type at runtime — much like zod, yup or superstruct, but in a tiny 400-byte package. Despite the small size, it's not a toy:
Passes the relevant superstruct test suite.
Rich built-in types: maps, sets, tuples, literals, and generic union types.
Mostly API-compatible with the established libraries.
Supports both deriving TS types from schema and declaring a schema for an existing TS type.
User-defined types, refinements, and conversions.
Decent performance — among the top libraries not using code generation.
GitHub
GitHub - thoughtspile/banditypes: 🤠🧨 The mighty 400-byte schema validator for TS / JS
🤠🧨 The mighty 400-byte schema validator for TS / JS - thoughtspile/banditypes
#prog #js #article
Speeding up the JavaScript ecosystem - one library at a time
Серия из десяти (на момент написания) статей о изменениях в библиотеках для JavaScript, которые ускоряют за счёт убирания лишней работы. Некоторые не привязаны конкретно к JavaScript.
Speeding up the JavaScript ecosystem - one library at a time
Серия из десяти (на момент написания) статей о изменениях в библиотеках для JavaScript, которые ускоряют за счёт убирания лишней работы. Некоторые не привязаны конкретно к JavaScript.
marvinh.dev
Speeding up the JavaScript ecosystem - one library at a time
Most popular libraries can be sped up by avoiding unnecessary type conversions or by avoiding creating functions inside functions.