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,340
Resource Number 47234 Last Updated 2025-02-21
¥ 0HKD 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/julia-is-a-high-level-high-performance-dynamic-language-for-technical-computing/

Share free open-source source code

Q&A
  • 1. Automatic: After making an online payment, click the (Download) link to download the source code; 2. Manual: Contact the seller or the official to check if the template is consistent. Then, place an order and make payment online. The seller ships the goods, and both parties inspect and confirm that there are no issues. ICTcoder will then settle the payment for the seller. Note: Please ensure to place your order and make payment through ICTcoder. If you do not place your order and make payment through ICTcoder, and the seller sends fake source code or encounters any issues, ICTcoder will not assist in resolving them, nor can we guarantee your funds!
View details
  • 1. Default transaction cycle for source code: The seller manually ships the goods within 1-3 days. The amount paid by the user will be held in escrow by ICTcoder until 7 days after the transaction is completed and both parties confirm that there are no issues. ICTcoder will then settle with the seller. In case of any disputes, ICTcoder will have staff to assist in handling until the dispute is resolved or a refund is made! If the buyer places an order and makes payment not through ICTcoder, any issues and disputes have nothing to do with ICTcoder, and ICTcoder will not be responsible for any liabilities!
View details
  • 1. ICTcoder will permanently archive the transaction process between both parties and snapshots of the traded goods to ensure the authenticity, validity, and security of the transaction! 2. ICTcoder cannot guarantee services such as "permanent package updates" and "permanent technical support" after the merchant's commitment. Buyers are advised to identify these services on their own. If necessary, they can contact ICTcoder for assistance; 3. When both website demonstration and image demonstration exist in the source code, and the text descriptions of the website and images are inconsistent, the text description of the image shall prevail as the basis for dispute resolution (excluding special statements or agreements); 4. If there is no statement such as "no legal basis for refund" or similar content, any indication on the product that "once sold, no refunds will be supported" or other similar declarations shall be deemed invalid; 5. Before the buyer places an order and makes payment, the transaction details agreed upon by both parties via WhatsApp or email can also serve as the basis for dispute resolution (in case of any inconsistency between the agreement and the description of the conflict, the agreement shall prevail); 6. Since chat records and email records can serve as the basis for dispute resolution, both parties should only communicate with each other through the contact information left on the system when contacting each other, in order to prevent the other party from denying their own commitments. 7. Although the probability of disputes is low, it is essential to retain important information such as chat records, text messages, and email records, in case a dispute arises, so that ICTcoder can intervene quickly.
View details
  • 1. As a third-party intermediary platform, ICTcoder solely protects transaction security and the rights and interests of both buyers and sellers based on the transaction contract (product description, agreed content before the transaction); 2. For online trading projects not on the ICTcoder platform, any consequences are unrelated to this platform; regardless of the reason why the seller requests an offline transaction, please contact the administrator to report.
View details

Related Source code

ICTcoder Customer Service

24-hour online professional services