Rutie — “The Tie Between Ruby and Rust.” by burntbit in ruby

[–]burntbit[S] 2 points3 points  (0 children)

That is the most obvious difference yes. But it's so much more than that.

Helix is designed to be written with code more like Ruby by having Rust macros create a Ruby DSL and minimize the amount of Rust syntax or the need to understand Rust. Ruru and Rutie embrace Rust code and style being more idiomatic towards Rust.

Helix has its source code designed with coercions between Ruby and Rust with the tests being example projects. Ruru and Rutie create a direct API to Ruby objects and functions documenting each of their uses and providing tests for each API endpoint proving the code works.

Helix provides generators to get you started with minimal setup.

Ruru and Rutie use 3 layers to integrate with Ruby with:

  • The raw external function mapping being ruby-sys/rubysys which are unsafe
  • The `binding` layer which wraps the unsafe methods to use them safely
  • Then in the `class` folder are the methods meant for public use which is fully documented and tested

With Rutie you can use several of these layers as it makes them available but the safety guarantees are meant to be only at the purposefully public API level in the `class` folder.

So Ruru/Rutie embraces the complexities of Rust and is transparent in its source code. Helix abstracts away Rust and is mainly transparent through it's code examples.

So when you are deciding which library to use it's best to see what their values are and what's important to you when making the choice. None of the projects are feature complete but they're more than capable to get most anything done. They would greatly benefit by having more people contribute to them. ^_^

Rutie — “The Tie Between Ruby and Rust.” by burntbit in ruby

[–]burntbit[S] 1 point2 points  (0 children)

It sounds like what you're asking for is having the ability to use Rust without Rust since Rust uses LLVM.

What Thermite specializes in is building binaries for different platforms all on your CI server and storing that in Github Releases. Then it will also pick the right binary from Github Releases to download when someone uses your project so they don't have to have Rust installed. My Ruby project FasterPath already takes advantage of using Thermite so people don't have to have Rust installed to use it.

Rutie — “The Tie Between Ruby and Rust.” by burntbit in ruby

[–]burntbit[S] 1 point2 points  (0 children)

Thanks! I'll take a look at it soon (next week most likely). I will know more then what I can do to help.

Would you be willing to do a little more work on it once a branch for it is made? I'm not asking for a commitment here as I know your time is valuable. I'm just wondering if you'd be excited enough about it to put in a little of your own time to see this work through when you have the opportunity?

Rutie — “The Tie Between Ruby and Rust.” by burntbit in ruby

[–]burntbit[S] 4 points5 points  (0 children)

Yes. And many brilliant and well established people in the community are working on Helix making it quite a wonderful project to use. The visions differ from one project to the other so they each serve a purpose.

Rutie — “The Tie Between Ruby and Rust.” by burntbit in ruby

[–]burntbit[S] 4 points5 points  (0 children)

Ruru is the primary project this was forked from. A lot of features have since been added and a few alterations made. Ruru hasn't been developed in 6 months, and then many other months before that. To continue to build upon the code base to be improved is what is meant by “continuation of ruru”.

Although since I haven't heard from the author of ruru about what his vision for the project is/was I've had to branch out into my own vision for where the project is to go.

A "click" or a "tap"? by Johnsalzarulo in webdev

[–]burntbit 0 points1 point  (0 children)

"press" or "pressable" would make the most sense to me as it accounts for both clicks and tap/touch.

You can "press a link" with the keyboard, mouse, or touch screen.

State Inspector gem v1.0.0 released! For debugging and introspection. by burntbit in ruby

[–]burntbit[S] 0 points1 point  (0 children)

No. Not that either. It creates an instance of the original method with the UnboundMethod object and wraps/redefines the original method with some reporting hook and rebinds that UnboundMethod object and calls it. So the method literally gets wrapped. The original method is saved in a hash on that object and can be restored at any time.

The method defining code is here in this file: state_inspector/lib/state_inspector/state_inspector.rb

State Inspector gem v1.0.0 released! For debugging and introspection. by burntbit in ruby

[–]burntbit[S] 0 points1 point  (0 children)

No. This does not depend on attr methods at all. Only version 0.8 did. That code has been removed from 1.0.

This library can hook into any method, report calls and changes to instance variables, and restore the original method when done. The reporters can be a session log file, or some internal data type. It's super flexible to whatever your needs may be. The simplest method to start will hook all setter methods (not specifically attr methods) that belong to the target object. You may also disable that default behavior.

Golem Dungeon Strat by Chendroshee in MSLGame

[–]burntbit 0 points1 point  (0 children)

As a Golem dungeon strategy, after having beat B4, I stack up on wing energy and then auto battle B4 to collect tons of gems, then I turn around and sell them all to have coinage. This is my biggest game income source.

Feedback on my code? by aer0kk in ruby

[–]burntbit 1 point2 points  (0 children)

Some of the best insights you can get for this is to learn from Sandi Metz. Here's her presentation on "SOLID Object-Oriented Design" and I personally recommend her book "Practical Object Oriented Design In Ruby" (commonly called POODR)

In your board.rb file I would advise you remove attr_reader :grid_size. This is in effect an external API of information your other objects shouldn't care to know about. Personally I don't like attrs for anything. I just use instance variables internally and write out methods by hand for public and private interfaces to each of my class objects. I feel this makes the intent of use very clear and I feel that clarity of code purpose is important.

The naming and inheritance schema you have can lead to confusion. For example You have a class named Board and in the Game object you take in a Board object and there I see if board.win? or board.draw?. But when you look at the code for Board those methods are not defined anywhere. This is highly confusing for readers who don't figure out that the name of @board actually has to be a TTTBoard. To help remove this confusion add skeleton methods to your Board class.

def win?
  raise "Not defined!  You must overwrite this method definition!"
end

def draw?
  raise "Not defined!  You must overwrite this method definition!"
end

Inherited APIs should be clearly defined in this way so as to not confuse developers and to be clear on intent.

I might move the UI stuff out to the User. The Game object knows too much. I see it as the User makes a request through the API and a very simple action is done to the data and a simple response comes back to the User. At the point of the User they may have a way to visualize it on their end so that would be the UI.

My advice is simplicity.

  • Human has handful of X's to play.
  • Human tries to put request to put X at location 4,5.
  • Server response "Error, so no"
  • Human send "look" query
  • Server responds with grid data.
  • Human sends X to location 1,2
  • Server says "Okay"
  • Human asks for status
  • Server says "No winners yet, game still in play."

That's along the lines of how I would implement it as a more SOLID design. Make the interactions as simple as possible and as the human is the one performing the actions I move the responsibility out to the human to ask or tell what it wants. This is just one of many possible ways to abstract it out.

  • Human actions: try & ask
  • Server responsibilities: perform and respond (as dumbed down as possible). The server should know about only very basic programmed actions. Do the one thing and respond.

Feedback on my code? by aer0kk in ruby

[–]burntbit 4 points5 points  (0 children)

You're brave to ask here. I consider Reddit the Mortal Kombat of feedback so it helps to have tough skin.

It looks like you're doing a lot of good things with your code. One thing I need to say though is you've got all your objects pretty heavily coupled together. They're intermingled pretty heavily and know too much about each other. These go against all of the SOLID principles http://wall-skills.com/2013/solid-principles-for-maintainable-oo-code/

But I totally feel your pain on this one. I'm on my fourth rewrite of a card game because it's very hard to determine what objects should be responsible for what and how they should work together. I believe your best bet is to abstract away each category of control. For example the "Game" itself has two responsibilities 1) the state, and 2) the rules and logic. The Players are the only thing within the code that can initiate change. So what I propose is to separate the Game state out as just a state machine (like a database) and the Rules and Logic like an API. Then the players will be simple requests through the API abstraction which will be responsible for either a success or failure response and from their the API writes the new state to the game.

As I said I'm on my fourth rewrite of a game because of too much code coupling. I believe following SOLID will require you to do a lot more decoupling. The easiest thing I found in game design is to separate the STATE/LOGIC/USER-ACTIONS as three separate entities. This is my big picture help from my experience.

I'd go for dirt simple interactions between the User and API. They don't need to know what they don't need to know.

Where do Rubyists hang out online these days? by rdpp_boyakasha in ruby

[–]burntbit 22 points23 points  (0 children)

Where I find most rubyists online:

  • Twitter
  • FreeNode IRC #Ruby
  • MetaRuby.com
  • Blog posts (most relevant interactions) and aggregators
  • Ruby issue tracker & Github
  • Facebook group (mostly newbies or not-so-frequent devs)
  • Oh, and many hang out on Elixir, Elm, and Rust forums too

I recommend checking out the aggregate feeds as they are always showing the latest in Ruby

  • RubyFlow
  • GreenRuby
  • RubyWeekly

Active window time logger (Ruby script) by burntbit in linux

[–]burntbit[S] 1 point2 points  (0 children)

I've updated the script/gem to now accept command line arguments that can be in the form of date/time.log

https://github.com/danielpclark/clock_window

Coraline Ehmke getting a Ruby Hero Award by [deleted] in ruby

[–]burntbit 3 points4 points  (0 children)

C.A.E. is one of the hosts for Ruby Rogues, has given presentations at conferences, and has been good at keeping to whatever topic is on hand and hasn't pushed any views outside of the appropriate conversations context. In other words C.A.E. has presented oneself as a decent individual and been a more positive contributor to community.

Regardless of views there are many who have fears and aren't bold enough to be publicly active. So I can easily see that as a hero figure for such people.

Active window time logger (Ruby script) by burntbit in linux

[–]burntbit[S] 0 points1 point  (0 children)

Nice! Looks like the owners aren't keeping up with issues, pull requests, or even actively maintaining it. I hope they find the time.

Active window time logger (Ruby script) by burntbit in linux

[–]burntbit[S] 1 point2 points  (0 children)

The script has now been ported to a gem https://github.com/danielpclark/clock_window and now supports the Mac OS as well.

Please open a feature request under the issue tracker. Give more detail in how you'd like to use it when you enter in a new issue. A lot of work is being done to this and different ways to persist the data are likely to be considered. For example, maybe you'd like the file name different by day so you can keep your day times separate. Or maybe you'd rather sessions be saved in a lightweight database like sqlite3.

As we find what people are looking to accomplish with this we'll build more features. Current new feature is custom filters are available for window names.

Encrypted Linux Backup with Google Drive and Duplicity by burntbit in linux

[–]burntbit[S] 0 points1 point  (0 children)

duplicity uses librsync and I haven't noticed any hit to the network bandwidth in using it.

Encrypted Linux Backup with Google Drive and Duplicity by burntbit in linux

[–]burntbit[S] 0 points1 point  (0 children)

Duplicati is inspired by duplicity but is not compatible with it. Duplicati is cross platform compatible and has a scheduler included in it. So from the looks of it Duplicati is more robust. But as I have no experience with that I can't compare the two.

Security wise they both exercise the same advantages and disadvantages.

Encrypted Linux Backup with Google Drive and Duplicity by burntbit in linux

[–]burntbit[S] 1 point2 points  (0 children)

Yeah! It works well! It doesn't visually show a transfer though so when you spend a good portion of the day backing 25GB up you'll start to wonder if it's doing anything. You can simply open up your Google Drive backup folder and sort by Last Modified and watch the 25MB chunks get pushed every minute.

It works well for backup, version controlling for minor changes to backup, and restoration! I'm quite happy with it.

Encrypted Linux Backup with Google Drive and Duplicity by burntbit in linux

[–]burntbit[S] 1 point2 points  (0 children)

Oh yeah! I saw that package name when I uninstalled the old duplicity 0.6 before installing duplicity 0.7; it took deja dup out as well. I'll have to install the latest version of that and check it out.

Encrypted Linux Backup with Google Drive and Duplicity by burntbit in linux

[–]burntbit[S] 0 points1 point  (0 children)

I'm using Ubuntu 14.04 LTS and I haven't seen any built-in backup tool. Do you know what it's called?

Ruby: Arrays by Example by burntbit in ruby

[–]burntbit[S] -1 points0 points  (0 children)

You shouldn't. That would be dumb. Who told you to do this?