Julia is a high-level, high-performance dynamic language for technical computing

Julia is a high-level, high-performance dynamic language for technical computing

2022-10-31 0 1,006
Resource Number 47234 Last Updated 2025-02-21
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

Julia, recommended in this issue, is a high-level, high-performance dynamic language for technical computing.

Julia is a high-level, high-performance dynamic language for technical computing插图

Julia feature

  • Quickly
  • Julia was designed for high performance from the start. Julia programs are compiled through LLVM into efficient native code for multiple platforms.
  • Dynamic
  • Julia is dynamically typed, feels like a scripting language, and has good support for interactive use.
  • Reproducible
  • The reproducible environment makes it possible to recreate the same Julia environment across platforms every time using pre-built binaries.
  • Composable
  • Julia uses multiple dispatch as a paradigm that makes it easy to express many object-oriented and functional programming patterns. The lecture on the unreasonable effectiveness of multiple scheduling explains why it works so well.
  • General
  • Julia provides asynchronous I/O, metaprogramming, debugging, logging, profiling, package manager, and more. Entire applications and microservices can be built in Julia.
  • Open source
  • Julia is an open source project with over 1,000 contributors. It is provided under the MIT license. The source code is available on GitHub.

Julia Ecosystem

  • data visualization and plotting
  • data visualization has a complicated history. Drawing software is a trade-off between functionality and simplicity, speed and aesthetics, and static and dynamic interfaces.
  • Build, deploy, or embed your code
  • Julia makes it possible to build complete applications. Use Dash.jl to write the Web UI or QML.jl and GTK.jl to write the native UI. Extract data from various databases.
  • Interact with your data
  • The Julia data ecosystem provides DataFrames.jl to process data sets and perform common data operations. Csv.jl is a fast multi-threaded package for reading CSV files and is being integrated with the Arrow ecosystem.
  • Scalable machine learning
  • The MLJ.jl package provides a unified interface for common machine learning algorithms, including generalized linear models, decision trees, and clustering. Flux.jl and Knet.jl are powerful deep learning packages.
  • Rich ecosystem of scientific computing
  • Julia was designed to be very good at numerical and scientific calculations.
  • Parallel and heterogeneous computing
  • Julia is designed for parallelism and provides built-in primitives for parallel computing at every level: instruction level parallelism, multithreading, GPU computing, and distributed computing.

Julia differences

  • The core language imposes very little; Julia Base and the standard library are written in Julia itself and include primitive operations such as integer arithmetic.
  • Rich type language for constructing and describing objects, optionally for type declaration.
  • Ability to define the behavior of a function by assigning multiple combinations across multiple parameter types.
  • Automatically generates efficient specialized code for different parameter types.
  • Good performance, close to the performance of statically compiled languages such as C.

Julia Getting started

The installation of Julia is simple, whether using pre-compiled binaries or compiling from source.

The easiest way to learn and experiment with Julia is to start an interactive session (also known as the read-eval-print loop or “REPL”) by double-clicking the Julia executable or julia running from the command line:

$ julia

_
_       _ _(_)_     |  Documentation:  https://docs.julialang.org
(_)     | (_) (_)    |
_ _   _| |_  __ _   |  Type "?"  for help, "]?"  for Pkg help.
| | | | | | |/ _` |  |
| | |_| |  | | (_| |  | Version 1.7.3 (2022-05-06)
_/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |


julia>  1 + 2
3

julia>  ans
3

To exit an interactive session, type CTRL-D (press both Control/^ and d), or type exit(). When running in interactive mode, julia displays a banner and prompts the user for input. Once the user enters a complete expression, such as 1 + 2, and hits Enter, the interactive session evaluates the expression and displays its value. If you enter an expression into an interactive session with a closing semicolon, its value is not displayed. The variable is bound to the value of the last evaluated expression whether or not the ans is displayed. The ans variable is bound only in an interactive session, not when the Julia code is otherwise running.

To evaluate expressions written in the source file file.jl, write include(“file.jl”).

To run the code in the file non-interactively, you can use it as the first argument to the julia command:

$ julia script.jl arg1 arg2... 

As the example suggests, the following command line argument julia is interpreted as the program’s command line argument script.jl, passing ARGS in the global constant. The name of the script itself is passed in as global PROGRAM_FILE. Note that the Julia expression is also set when given using ARGS ‘option on the command line (see Help Output below), but will be empty. For example, to print the parameters provided to a script, you would do this: -ejuliaPROGRAM_FILE

$ julia -e 'println(PROGRAM_FILE);  for x in ARGS;  println(x);  end' foo bar
foo
bar

Or you can put this code into a script and run it:

$ echo 'println(PROGRAM_FILE);  for x in ARGS;  println(x);  end' >  script.jl
$ julia script.jl foo bar
script.jl
foo
bar

The

separator can be used to separate — command-line arguments for script files from those for Julia:

$ julia --color=yes -O -- script.jl  arg1 arg2.. 

Julia Key points

Julia Base contains a range of functions and macros suitable for performing scientific and numerical calculations, but is also as broad as many general-purpose programming languages. The growing collection of available packages provides additional functionality. Features are grouped by the following themes.

Some general notes:

  • To use a Module function, import the Module using import Module, and module.fn (x) uses the function.
  • Or, using Module imports all functions that export modules into the current namespace.
  • By convention, start with an exclamation point (!) Ending function names modify their arguments. Some functions also have modifications (for example, sort!). And unmodified (sort) versions.

Julia runtime initialization

main()

Start with main()incli/loader_exe.c, call jl_load_repl()in cli/loader_lib.cwhich to load some libraries, The final call is repl_entrypoint()insrc/jlapi.c.

repl_entrypoint() calls libsupport_init() to set up the C library locale and initialize the “ios” library (see ios_init_stdstreams() and Legacy ios.clibrary).

Nextjl_parse_opts() is called to handle command line options. Note that jl_parse_opts() only handles options that affect code generation or early initialization. Other options are handled later by process_options()inbase/client.jl.

jl_parse_opts() Stores command line options in the global jl_options structure.

julia_init()

julia_init()intask.c is called main() and _julia_init()ininit.c.

_julia_init() starts by calling libsupport_init() again (the second time it does nothing).

restore_signals() is called to zero the signal handler mask.

jl_resolve_sysimg_location() Searches for the configuration path of the basic system image. See Building a Julia System Image.

jl_gc_init() Sets up the allocation pool and list for weak references, reserved values, and terminations.

jl_init_frontend() loads and initializes the precompiled femtolisp image containing the scanner/parser.

jl_init_types() Creates a jl_datatype_t type description object for the built-in types defined in. For example, julia.h

Serialization

Serialization.serialize – Function

serialize(stream::IO, value)

Writes any value to the stream in an opaque format so that deserialize. The read-back value will be as identical as possible to the original value. In general, if reading and writing are done by different versions of Julia, or by Julia instances with different system images, this process will not work. The Ptr value is serialized into an all-zero mode (NULL).

First writes an 8-byte identification header to the stream. To avoid writing headers, construct the aSerializer and use it as the first argument, serialize.

—END—

Open Source license: MIT license

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Julia is a high-level, high-performance dynamic language for technical computing https://ictcoder.com/kyym/julia-is-a-high-level-high-performance-dynamic-language-for-technical-computing.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service