Giter Club home page Giter Club logo

py2rs's Introduction

py2rs's People

Contributors

adriangb avatar akanksh12 avatar b-mc2 avatar calbaker avatar cg-cnu avatar cydave avatar deikatsuo avatar imbolc avatar jbiason avatar lorencarvalho avatar lu-zero avatar luizirber avatar mikigraf avatar mseri avatar note35 avatar nuncjo avatar pickfire avatar rapha-borges avatar rhardouin avatar rochacbruno avatar sblondon avatar shingtaklam1324 avatar stefanulbrich avatar tilacog avatar twentysix26 avatar wasnio avatar wowinter13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py2rs's Issues

suggestion: meniton .step_by()

I came here looking for the equivalent for python's range/xrange step parameter. I later discovered .step_by(). An example like the following would have helped me:

python:

for i in range(0,10,2):
   print i # 0, 2, 4, 6, 8

rust:

for i in (0..10).step_by(2) {
    println('{}', i);  // 0, 2, 4, 6, 8
}

Update README.md

Hello, there is a scope of improvement in the README.md file along with fixing a few grammatical errors. I would like to work on it.

Could you please assign this to me?

Type inference

Given that Rust uses modified Hindley-Milner type inference, that line shouldn't mention Python or Ruby, but rather ML and Haskell.

py2rs/README.md

Line 172 in bc8e3cf

- Rust type inference is mainly inspired by **ML** and also by **Python** and **Ruby**

Topics that don't exist in both languages

Reading through the document, I noticed (particularly in Rust) use of language features that aren't explained and code examples for the other language aren't trivial.

Examples

  • Rust macros
  • Rust Implicit returns

Moving snippets from "README.md" to "examples" folder

I found it a little confusing to read through all the examples in the README file. Perhaps if it were organized by topics in the examples folder it would be easier and more intuitive for beginners to learn. Like the following structure:

.
└── examples/
├── hello_world/
│ ├── main.py
│ └── main.rs
├── types/
│ ├── main.py
│ └── main.rs
└── lists/
├── main.py
└── main.rs

Communicating between threads is not equivalent

There’s extra output in the Rust example, and I believe the Rust example is creating a thread whereas the python example is not (although it could be implicit as I’m not familiar with Queue)

Some suggestion

  1. Aren't Crossbeam and Rayon libraries about threads? They doesn't seem to match the description "Run external commands".

  2. The python code of derive_new crate __init__(self, value='default') kind of suggest that rust has optional parameters, which rust does not.

Suggestion for Numpy equivalent package

The currently listed equivalent to python's numpy is numeric which has last received an update in 2016 and seems to be dropping in popularity rapidly.

I'd suggest the alternative crate ndarray.

Additionally, there is also the numpy crate which can be used to more easily create rust libs for python via pyo3.

Wrong library in listing

Great job, Bruno! Nice to know you're into Rust now - I'm barely starting to learn it :-)

So, one issue I found in the listing of libraries is the mention for mockito; now, although the homonimous Java library is indeed a proper general mocking library, Rust's mockito only really mocks HTTP services, and not structs or methods. Which is a bit sad - I expected more from that library when I saw that name.

Therefore I think it should not be in the list as a Rust alternative to Python's mock library - which is a general-purpose mocking library (now integrated into Python 3).

Cheers!
Diogo

A few notes

Cool project. I think this might help many people. However, I think a few things here are misleading or could be improved:

  • https://github.com/BurntSushi/quickcheck is much more developed and maintained than proptest.
  • http://ggez.rs/ is probably more like pygame in that it comes batteries included.
  • Gotham really is not at all a contender to Django. There is nothing there for Django so far.
  • The link to fs is incorrect.

Maybe it would also be good to list python packages that have no direct equivalent yet (such as Django) so that people know what they're getting into?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.