These are chat archives for rust-lang/rust

21st
Nov 2017
Devon Hollowood
@devonhollowood
Nov 21 2017 01:27

@vitvakatu A binary heap. The only operations used in A* are insert and find the minimal value.

On the subject of heaps in Rust--does anyone know why Rust went with a max-heap in the standard library? It seems like a lot of algorithms (e.g. Dijkstra, A*) prefer min-heaps instead. And often you don't want to reverse the definition of Ord for your struct just for the purpose of putting things in a min-heap instead of a max-heap, which is what they do in the Dijkstra's algorithm example on the binary heap page. (I know there is probably an ordering adaptor similar to Haskell's "Down" somewhere on crates.io but if so I haven't found it yet)

Moggers
@Moggers
Nov 21 2017 11:17
anyone here used rusoto?
Sean
@seanr707
Nov 21 2017 18:06

Anyone have any experience with gtk-rs?

I'm learning Rust and trying to build a GTK app that fetches data from an API and displays it to the user.

I have been able to that, but I run into trouble having it update automatically. I've tried:

  1. Update using gtk::timeout_add which works, but causes lag in the program while it makes the HTTP request
  2. Update using static state and a Mutex, which is currently not working
Jonas Hedman Engström
@JonasHedEng
Nov 21 2017 18:14
Have anyone used lapin to send topic event exchanges?
In RabbitMQ's own examples they don't declare any queue in the api call but lapins does?
Sean
@seanr707
Nov 21 2017 18:38

Nvm for now!

I discovered it was not a Mutex I needed but a channel :smile:

Jonas Hedman Engström
@JonasHedEng
Nov 21 2017 18:49
Nvm here too, simply providing an empty queue name "" worked fine!
Roman Proskuryakov
@kpp
Nov 21 2017 19:56
Who do I ask to rerender doc.rust-lang.org ?
doc-rust-lang.png
docs seemed to be fixed in new versions of rust > 1.19
Aleksey Kladov
@matklad
Nov 21 2017 19:57
@steveklabnik probably
Roman Proskuryakov
@kpp
Nov 21 2017 19:57
I am so bored of seeing these bold newliner fragments
Steve Klabnik
@steveklabnik
Nov 21 2017 20:04
@kpp it's just a bug, change the theme and change it back
the bug has been fixed but your localstorage is messed up becuse of it
after you do that once it should be fixed forever
sorry about that!
Roman Proskuryakov
@kpp
Nov 21 2017 20:07
oh thanks!
is there a timestamp in the localstorage so you can update it forcibly?
Steve Klabnik
@steveklabnik
Nov 21 2017 20:08
there isn't, but that wouldn't fix it exactly
Roman Proskuryakov
@kpp
Nov 21 2017 20:08
it fixed it!
thanks!
Steve Klabnik
@steveklabnik
Nov 21 2017 20:09
:+1:
basically, we fixed some back-compat bugs by using a library for localstorage
but, said library introduces quotes aroud the theme name, the old code couldn't handle that
so, we fixed the new stuff to handle both
but we can't change the old stuff; immutable releases
Roman Proskuryakov
@kpp
Nov 21 2017 20:09
sure
Steve Klabnik
@steveklabnik
Nov 21 2017 20:09
it's now properly namespaced too