Giter Club home page Giter Club logo

Comments (3)

kirtsar avatar kirtsar commented on May 26, 2024

REPL
? - enter "help mode"
] - enter "package mode"
; - enter "command-line mode"
additional modes can be provided in different packages
no more workspace(). Use Revise.jl or something like that.

Numbers
I think it should be splitted into actual numbers and random numbers, because for random numbers one might want to use seed, for example; MersenneTwister is not more in Base, but in Random, so use should use import Random.
No more iround(), maybe you should use round(Int, n) instead.
More words about round; for example, rounding up to some digits.

Mathematics
No more e, catalan, golden_ratio in Base. Use using Base.MathConstants or Combinatorics package instead (for example). You can use exp(1) for exponent.
Many of matrix calculations were moved from Base to LinearAlgebra, so firstly you should use using LinearAlgebra.
Use tr for trace.
Scalar products of two vectors, matrix decomposition and so on are also live here.
Matrix identity is I. Actually, this is a special type UniformScaling for better performance.

Control flow and loops
Something about eachindex, CartesianIndexing and LinearIndexing can be added.

Functions
function foo{T<:Number}(num::T)::String is not allowed anymore. You should write this as:
function foo(num::T)::String where T <: Number
Maybe something else can be said here. I do not know anything about Trampolining.

Arrays
I think
Access and assignment: arr[1] = "Some text" is ambiguos, because:

  1. It is written arr = Float64[] just two lines above this line.
  2. Even if you write arr[1] = 1.0, it is still unacceptable, there will be an error that you try to access 0-elements array. Arrays should be initialized before use.
    No linspace function. You can use LinRange(start, stop, size) instead (or collect(a : b : c), but i suppose there can be some issues).

Types
Abstract type declaration has changed:
abstact type A end
supertype(a) instead of super(a).
No more nullable type. I suppose you should use Union{Missing, T} instead.
Some examples must be provided with inner and outer type constructions and with recursive types, such as tree nodes with leaves.

DataFrames
Change pool! function from DataFrames to categorical!(df, :A)
We should check these things about missings.

Packages
Should be reconsidered. No flux, no knet, no mxnet, no lightgraphs, no juliaml

Performance tips
Devectorize code with for loops unlike R, MATLAB or Python definitely not true anymore. Vectorized operations are OK (if you do it properly). Add description of syntactic loop fusion: https://julialang.org/blog/2017/01/moredots.

We need more fresh references.

from julia-cheat-sheet.

nickeubank avatar nickeubank commented on May 26, 2024

Terrific! Thanks @kirtsar ! I started a PR to try and integrate the issues I saw (#20). If you want to make any changes to that please feel free to, or I"ll try and integrate more of that when I have a chance (though may take a couple weeks).

from julia-cheat-sheet.

michi-zuri avatar michi-zuri commented on May 26, 2024

it should be exit() not quit() to leave the REPL

from julia-cheat-sheet.

Related Issues (20)

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.