ビリャチピスデツナフイ Войти !bnw Сегодня Клубы
Привет, TbI — HRWKA! 1235.1 пользователей не могут ошибаться!
?6909
прекрасное6424
говно5887
говнорашка5512
хуита4695
anime3056
linux2645
music2623
bnw2588
рашка2560
log2337
ололо2113
pic1814
дунч1734
сталирасты1488
украина1437
быдло1434
bnw_ppl1370
дыбр1237
гімно1158

Коротко о том, почему Rust лучше: https://play.golang.org/p/JKWn84wsXL package main import "fmt" func main() { Printer(nil) var x *int = nil Printer(x) } func Printer(it interface{}) { if it == nil { fmt.Println("got a nil!") return } fmt.Println("got a non-nil:", it) }
#MLOUSI (5) / @o01eg / 2488 дней назад
У меня одного метод https://docs.rs/tokio-postgres/0.2.3/tokio_postgres/struct.Connection.html#method.execute зависает в реакторе? query в асинхронной версии и execute в синхронной спокойно работают, а этот висит со статусом idle и не завершает свой Future.
#8PD492 (0+1) / @o01eg / 2495 дней назад
Басня "Веб-мартышки и пароли" https://www.opennet.ru/opennews/art.shtml?num=46768 "Некоторые интересные факты: В учётной записи для доступа к модулю koa, который в прошлом месяце был загружен 300 тысяч раз, использовался пароль "password"; Один из пользователей, контролирующий более 20 млн загрузок в месяц, в ответ на отзыв скомпрометированного пароля, установил в качестве нового пароля содержимое старого, добавив к нему символ "!"; Пользователь, входящий в top-20, после сброса скомпрометированного пароля опять вернул свой старый пароль через некоторое время; У 662 пользователей был установлен пароль "123456", у 168 - "123", у 115 - "password"; 1409 пользователей (1%) указали в качестве пароля свой логин; После сброса паролей 9.7% пользователей сразу вернули свой старый заведомо скомпрометированный пароль, а 0.6% вернули старый пароль, но внеся в него незначительное изменение; Трафик всех пакетов, к которым был получен доступ в ходе исследования, составляет почти два миллиарда (1 946 302 172) загрузок в месяц, что примерно 20% от общего объёма загрузок. "
#IAEZWL (0+1) / @o01eg / 2496 дней назад
Хозяйке на заметку: let future_returns_db_connection = ...; let prog = future_returns_db_connection.and_then(|db_connection| { your_stream_wants_to_work_with_db.fold(db_connection, |also_db_connection, value| { also_db_connection.just_another_db_query_moveouts_connection_and_return_a_new_one() }) })
#MBJO51 (1) / @o01eg / 2503 дня назад
Скоро "канадский код" потеснит "индусский": https://reed.media/coding-kids-canada/ "Канадских детей будут обучать программированию с детского сада и до последнего класса школы, пишет Phys.org со ссылкой на вчерашнее заявление канадского правительства. Более 500 тыс. детей смогут поучаствовать в этой программе в ближайшие два года, заявили в Министерстве науки. «На сегодняшний день многие вакансии требуют умения решать рабочие задачи с использованием цифровых навыков», отметили в министерстве. Для реализации этой программы задействуют 500 учителей, для которых правительство организует тренинги для обучения цифровым навыкам и кодированию. Также в правительстве надеются, что эта программа стимулирует большее количество женщин и представителей коренного населения получать образование в области точных наук и технологий."
#IAHVGE (1) / @o01eg / 2506 дней назад
https://blog.rust-lang.org/2017/06/08/Rust-1.18.html "What’s in 1.18.0 stable As usual, Rust 1.18.0 is a collection of improvements, cleanups, and new features. One of the largest changes is a long time coming: core team members Carol Nichols and Steve Klabnik have been writing a new edition of “The Rust Programming Language”, the official book about Rust. It’s being written openly on GitHub, and has over a hundred contributors in total. This release includes the first draft of the second edition in our online documentation. 19 out of 20 chapters have a draft; the draft of chapter 20 will land in Rust 1.19. When the book is done, a print version will be made available through No Starch Press, if you’d like a paper copy. We’re still working with the editors at No Starch to improve the text, but we wanted to start getting a wider audience now. The new edition is a complete re-write from the ground up, using the last two years of knowledge we’ve gained from teaching people Rust. You’ll find brand-new explanations for a lot of Rust’s core concepts, new projects to build, and all kinds of other good stuff. Please check it out and let us know what you think! As for the language itself, an old feature has learned some new tricks: the pub keyword has been expanded a bit. Experienced Rustaceans will know that items are private by default in Rust, and you can use the pub keyword to make them public. In Rust 1.18.0, pub has gained a new form: pub(crate) bar; The bit inside of () is a ‘restriction’, which refines the notion of how this is made public. Using the crate keyword like the example above means that bar would be public to the entire crate, but not outside of it. This makes it easier to declare APIs that are “public to your crate”, but not exposed to your users. This was possible with the existing module system, but often very awkward. You can also specify a path, like this: pub(in a::b::c) foo; This means “usable within the hierarchy of a::b::c, but not elsewhere.” This feature was defined in RFC 1422 and is documented in the reference. For our Windows users, Rust 1.18.0 has a new attribute, #![windows_subsystem]. It works like this: #![windows_subsystem(console)] #![windows_subsystem(windows)] These control the /SUBSYSTEM flag in the linker. For now, only console and windows are supported. When is this useful? In the simplest terms, if you’re developing a graphical application, and do not specify windows, a console window would flash up upon your application’s start. With this flag, it won’t. Finally, Rust’s tuples, enum variant fields, and structs (without #[repr]) have always had an undefined layout. We’ve turned on automatic re-ordering, which can result in smaller sizes through reducing padding..."
#2DINCJ (0+1) / @o01eg / 2515 дней назад
За что я люблю Rust: https://github.com/boostorg/serialization/blob/develop/include/boost/serialization/void_cast.hpp#L186 reinterpret_cast<std::ptrdiff_t>( static_cast<Derived *>( reinterpret_cast<Base *>(8) ) ) - 8
#ABYYXV (0) / @o01eg / 2551 день назад
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66139 "Since the first member was constructed successfully, I&#39;d expect its destructor to be called. Granted, I don&#39;t know the exact standard wording, but my general idea is that once a constructor call succeeds, an object starts to exist, thus it must at some point cease to exist, and then its destructor must be called. clang 3.5.0 and visual c++ (according to http://webcompiler.cloudapp.net/, without the GCC extension "(a[2]) { ... }") do call the destructor every time."
#64SVNS (0+1) / @o01eg / 2556 дней назад
#3ABU4N (0+1) / @o01eg / 2561 день назад
Это просто праздник какой-то: https://www.linux.org.ru/news/opensource/13294011 "Состоялся первый публичный релиз системы управления версиями Pijul 0.3, написанной на языке программирования Rust. Pijul объединяет в себе производительность git и простоту использования darcs. Основанная на модели теории патчей, система Pijul направлена на то, чтобы сделать операции слияния и забора определенных коммитов (cherry-pick) более интуитивным. Pijul можно установить при помощи Cargo (пакетного менеджера для Rust): команда cargo install pijul соберёт самую последнюю версию. Минимальная для сборки версия Rust — 1.15.1."
#786ED6 (4) / @o01eg / 2598 дней назад
Вот и появился скриптовый язык моей мечты: https://github.com/gluon-lang/gluon "Documentation Gluon is a small, statically-typed, functional programming language designed for application embedding. Features Statically typed - Static typing makes it easier to write safe and efficient interfaces between gluon and the host application. Type inference - Type inference ensures that types rarely have to be written explicitly giving all the benefits of static types with none of the typing. Simple embedding - Marshalling values to and from gluon requires next to no boilerplate, allowing functions defined in Rust to be directly passed to gluon. UTF-8 by default - Gluon supports unicode out of the box with utf-8 encoded strings and unicode codepoints as characters. Separate heaps - Gluon is a garbage-collected language but uses a separate heap for each executing gluon thread. This keeps each heap small, reducing the overhead of the garbage collector. Thread safe - Gluon is written in Rust, which guarantees thread safety. Gluon keeps the same guarantees, allowing multiple gluon programs to run in parallel (example)* * Parallel execution of gluon programs is a recent addition and may still have issues such as deadlocks."
#BVKY0B (3+2) / @o01eg / 2599 дней назад
https://blog.rust-lang.org/2017/03/16/Rust-1.16.html "The largest addition to Rust 1.16 is cargo check. This new subcommand should speed up the development workflow in many cases." Мощно: "When slicing a &str, you’ll see better errors. For example, this code: &"abcαβγ"[..4] Is incorrect. It generates this error: thread &#39;str::test_slice_fail_boundary_1&#39; panicked at &#39;byte index 4 is not a char boundary; it is inside &#39;α&#39; (bytes 3..5) of `abcαβγ`&#39; The part after the ; is new."
#OPCW47 (0) / @o01eg / 2599 дней назад
https://www.reddit.com/r/rust_gamedev/comments/5vqlln/shar_one_year_with_rust/ "Hi, Reddit! I posted here for a few times, and now our team has reached the important stage of development - we are launching our Greenlight campaign on Steam. Game idea Our idea is quite simple - we found [an article](gafferongames.com/networking-for-game-programmers/) about network physics synchronization and realized, that there are very few games that use physics extensively as the core part of gameplay. We have very big plans on this idea, but as a first step - we want to launch our first game with this technology. We found the simplest game mechanics exposing this physics idea and started to work. Feedback on the language First of all - Rust is an amazing language for game development, maybe it is the best one. We have Rust stable on build machine and nightly for development. Nightly is used only for compiler intrinsics for a profiler. There were problems with nightly one or two times, but simple downgrades to previous nightly solved the problem. The main issue was compilation time - our biggest crate compiled for about 3 minutes. But with incremental compilation, it&#39;s almost fixed. It still takes minutes sometimes, but often - only a few seconds. I am using incremental compilation from very early testing versions - and I had only one time when it generated invalid code. During this year I had only one (ONE!!) bug in the code that was really hard to find. The entire program behaved really strange, crashing sometimes with strange backtrace inside a hashmap implementation. This bug was found within a day, I just double-triple-etc checked all usages of "unsafe" keyword in the codebase (there were 3 times). And yes, the bug was in one of those unsafes. Most of the time I was the only programmer, and basically, we were a 3-person team - me, 3d and 2d artists. Recently, my friend joined us as the second programmer. He works on the particle system now. He had no experience with Rust at all, so I watched how fast or painful learning of Rust is for a newbie. And he was completely satisfied! I found that Rust is absolutely good as a mentor. I mean - when you write good code, it compiles smoothly, but when you made a bad decision (like to store pointers to dynamic data everywhere or building over complicated structures) Rust tells you - please, stop, think more on design. And it actually works! I’ve seen how Rust teach you how to code. The biggest question, when we started our game with Rust, was about the libraries and an infrastructure. How to build a GUI? How to work with 3d party data? And, yes, we had some problems with libraries. After all, the only big library we are using - is glium. I can&#39;t say that glium is perfect, but it works. Our rendering is quite simple, and it works well for our needs. The best part of glium - you don&#39;t go too far from OpenGL, so, theoretically, it may be replaced or changed when it will be really needed. On the other hand, glium just works at the beginning and is simple and useful. It’s sad that it&#39;s almost not supported anymore, but I absolutely understand reasons behind that. Maybe we will do our own glium-compatible (at least the part we use) OpenGL wrapper, maybe we&#39;ll try to add needed features to glium. "
#VVYYEN (2+2) / @o01eg / 2619 дней назад
https://blog.rust-lang.org/2017/02/02/Rust-1.15.html "The build system for Rust has been re-written in Rust, using Cargo. It is now the default. This process has been long, but has finally borne fruit. Given that all Rust development happens on the master branch, we’ve been using it since December of last year, and it’s working well. There is an open PR to remove the Makefiles entirely, landing in Rust 1.17. This will pave the way for rustc to use packages from crates.io in the compiler like any other Rust project, and is a further demonstration of the maturity of Cargo. Rust has gained Tier 3 support for i686-unknown-openbsd, MSP430, and ARMv5TE."
#3VVGRP (0+1) / @o01eg / 2641 день назад
--
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

Цоперайт © 2010-2016 @stiletto.