Два года в /fg/. Войти !bnw Сегодня Клубы
Привет, TbI — HRWKA! 1239.0 пользователей не могут ошибаться!
?6941
прекрасное6443
говно5904
говнорашка5512
хуита4710
anime3065
linux2651
music2633
bnw2601
рашка2565
log2354
ололо2166
дунч1821
pic1815
сталирасты1491
украина1439
быдло1437
bnw_ppl1417
дыбр1238
гімно1158

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'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'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'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'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'll try to add needed features to glium. "
#VVYYEN (2+2) / @o01eg / 2821 день назад
>у C++ скоро повиснет указатель
#JIYZS5 (0) / @anonymous / 2827 дней назад

https://polyfractal.com/post/rustl8710/
раст прикрученный изолентой к freertos на аналоге esp8266 с cortex-m3 вместо цугундерного xtensa.

#10D3EK (7+3) / @lexszero / 2830 дней назад
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 / 2843 дня назад
У - удобно: `cargo install cargo-tree`
#LPUU6Z (0) / @o01eg / 2848 дней назад
Rust обгоняет Go: https://medium.com/@robertgrosse/parallelizing-enjarify-in-go-and-rust-21055d64af7e#.ofup3wz68 Hashtests time: Rust 135 seconds, Go 290 seconds Rust: 82.5 seconds, Go 165 seconds, Pypy 310 seconds
#9XFX53 (5+1) / @o01eg / 2851 день назад
Новый вид гриппа, заразившийся им переписывает ПО на Rust: http://www.wilfred.me.uk/blog/2017/01/11/announcing-remacs-porting-emacs-to-rust/
#2KZQ1E (3+1) / @o01eg / 2864 дня назад
Я так понимаю, что нет типажа, который бы определял, является ли переменная типа числом с плавующей точкой (f32, f64) или вообще даже числом? Т.е. мне хочется написать обощённую функцию, которая бы принимала число произвольного типа и возвращала число произвольного типа: fn f<T: Copy + Num>(x: T) -> T { ... }
#DLXMPC (7) / @corpse / 2929 дней назад
А как реализованы суммы типов в Rust на уровне памяти?
#23CR58 (0+1) / @ndtimofeev / 3191 день назад

Вот тут кто-то [наговнил] либу для параллелизма для Rust:

let total_price = stores.par_iter()
.map(|store| store.compute_price(&list))
.sum()

Конечно мало сделать параллелизм простым, его надо сделать ещё и безопасным. Rayon гарантирует, что использование его API никогда не приведёт к гонке данных.

Мне вот интересно, неужели в rust нет способа захватить ref на Weak Box и таким образом выстрелить себе в ногу (ну или организовать race condition).

Не слишком ли громкое заявление?

Олсо, реквестирую подобных либ для плюсцов.

#12REV0 (4) / @ninesigns / 3243 дня назад

Охуенно выразительно и красиво. Спасибо статической типизации.

struct Node<T> { 
    prev: Raw<T>, 
    next: Link<T>, 
    elem: T, 
} 

type Link<T> = Option<Box<Node<T>>>; 

struct Raw<T> { 
    ptr: *mut Node<T>, 
} 

pub struct LinkedList<T> { 
     len: usize, 
     head: Link<T>, 
     tail: Raw<T>, 
} 
#LEUCOH (52+1) / @ninesigns / 3265 дней назад
В продакшене
#P1120Q (1+1) / @plhk / 3304 дня назад
М-м-максисмум хипстота: https://www.youtube.com/watch?v=IqrwPVtSHZI
#TSCF9J (1) / @o01eg / 3335 дней назад
http://tab.snarc.org/posts/haskell/2015-09-29-rust-with-haskell.html — Все мы знаем, что haskell — идеальный язык для любых задач и лишь недостаток библиотек не даёт использовать его в больших серьёзных проектах уровня национального поисковика. Но теперь ваши мольбы услышаны и решение есть: интероп с Rust! ТАДА!
#B8468X (13+4) / @ndtimofeev / 3336 дней назад
В GTK системный трэй считают устарешим, а в QML (сама Qt в rust не поддерживается) трэй просто не поддерживается.
#57QD7M (2) / @o01eg / 3346 дней назад
#LICDN4 (1) / @o01eg / 3352 дня назад
http://rust.unhandledexpression.com/syslog/struct.Logger.html Зачем ему String? Почему не хватает &str?
#C5570H (1+1) / @plhk / 3357 дней назад
--
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

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