Шлюхи без блекджека, блекджек без шлюх. Войти !bnw Сегодня Клубы
Привет, TbI — HRWKA! 1245.2 пользователей не могут ошибаться!
?6965
прекрасное6456
говно5915
говнорашка5512
хуита4734
anime3076
linux2661
music2640
bnw2607
рашка2583
log2372
ололо2234
дунч1868
pic1816
сталирасты1494
быдло1440
украина1438
bnw_ppl1433
дыбр1238
гімно1158

#0XKJN3 (1) / @o01eg / 3155 дней назад
Вот и появился скриптовый язык моей мечты: 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 / 3156 дней назад
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 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of `abcαβγ`' The part after the ; is new."
#OPCW47 (0) / @o01eg / 3156 дней назад
Градостроительный симулятор, который мы заслужили: http://cityboundsim.com/ "The city sim you deserve. Cities are complex and that's why you love them. Experience a true city: millions of interactions between people, companies and neighborhoods. Follow detailed daily lifes, see businesses struggle in the local economy and be mesmerized by the traffic simulation. Each citizen is simulated individually, their behaviour is realistic and adorably human. Think and plan as the urban developer that you are. Prepare changes to your city by creating the perfect plan. Use the most powerful and yet intuitive drawing tools in any city sim ever. Create the craziest roads and intersections, lay out custom parks or even airports. Juggle projects, set priorities and recover from bad situations. Create a city that looks like a city. Let your city grow across a beautiful landscape, without boundaries. Enjoy detailed control over zones that curve along roads. Be surprised by procedural architecture that uniquely adapts to the available space and the local circumstances. What style and flavor will your city have? Humble beginnings, ambitious goal. Anselm Eickhoff builds Citybound. It gained attention as a small prototype, then became his fulltime dream project. Now he is chipping away at the impossibility of the task. Cutting edge tech and latest research. The solid foundation: a custom geometry toolset, high-performance microsimulation framework and economy model - based on and inspired by countless papers and theses. We are getting there - be a part of the process. Citybound is developed completely open source. In addition, I regularly update my community about my progress, we discuss all kinds of aspects and even invent stuff together! My funding model is honest and sustainable: I make every new prototype available to everyone and fans pledge a monthly contribution of their choosing."
#5VCSU0 (2) / @o01eg / 3162 дня назад
Я получаю ссылку на мутабельный экземпляр структуры. У структуры есть внутри три вектора — `prev`, `next` и `curr`. На каждой итерации алгоритма `next` рассчитывается по `prev` и `curr`. Это интегрирование Верле, если что, но не важно. Хочется не выделять память много раз, а просто держать их постоянно, циклически переставляя **ссылки** (а не данные, которых много, естественно) после каждой итерации: `prev <- curr <- next`, а `prev -> next`, чтобы не болтался. Единственное, что я осилил сделать с ними, вот: std::mem::swap(&mut self.curr, &mut self.next); std::mem::swap(&mut self.prev, &mut self.next); При попытке юзать `std::mem::replace` или рисваивать как-то руками, я жестоко обламываюсь. Т.е. взять эти самые три ссылки разом, запиать в три идентификатора и потом присвоить трём полям структуры — это уже я не осилил. Как бороть?..
#GRUN3I (3+2) / @dluciv / 3176 дней назад
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 / 3176 дней назад
>у C++ скоро повиснет указатель
#JIYZS5 (0) / @anonymous / 3182 дня назад

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

#10D3EK (7+3) / @lexszero / 3185 дней назад
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 / 3198 дней назад
У - удобно: `cargo install cargo-tree`
#LPUU6Z (0) / @o01eg / 3203 дня назад
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 / 3206 дней назад
Новый вид гриппа, заразившийся им переписывает ПО на Rust: http://www.wilfred.me.uk/blog/2017/01/11/announcing-remacs-porting-emacs-to-rust/
#2KZQ1E (3+1) / @o01eg / 3219 дней назад
Я так понимаю, что нет типажа, который бы определял, является ли переменная типа числом с плавующей точкой (f32, f64) или вообще даже числом? Т.е. мне хочется написать обощённую функцию, которая бы принимала число произвольного типа и возвращала число произвольного типа: fn f<T: Copy + Num>(x: T) -> T { ... }
#DLXMPC (7) / @corpse / 3284 дня назад
А как реализованы суммы типов в Rust на уровне памяти?
#23CR58 (0+1) / @ndtimofeev / 3546 дней назад

Вот тут кто-то [наговнил] либу для параллелизма для 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 / 3598 дней назад

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

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 / 3620 дней назад
В продакшене
#P1120Q (1+1) / @plhk / 3658 дней назад
М-м-максисмум хипстота: https://www.youtube.com/watch?v=IqrwPVtSHZI
#TSCF9J (1) / @o01eg / 3690 дней назад
http://tab.snarc.org/posts/haskell/2015-09-29-rust-with-haskell.html — Все мы знаем, что haskell — идеальный язык для любых задач и лишь недостаток библиотек не даёт использовать его в больших серьёзных проектах уровня национального поисковика. Но теперь ваши мольбы услышаны и решение есть: интероп с Rust! ТАДА!
#B8468X (13+4) / @ndtimofeev / 3691 день назад
--
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

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