Skip to content

mkatase/JuliaPractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My practice code for Julia 1.4

Environment

  • Fedora 32 5.6.7-300
  • Julia 1.4
  • cmake 3.17.1
  • gcc 10.0.1
  • gfortran 10.0.1
  • pyside 1.2.4

Code Abstract for Julia 0.6.3 (Obosoleted)

  • hello.jl : Hello World code
  • practice_00.jl : Read data (without header) and display
  • practice_01.jl : Read data (without header) using csvread and display
  • practice_02.jl : Read data (with header) using csvread and display
  • practice_03.jl : Add system types
  • practice_04.jl : Download image file for internet
  • practice_05.jl : SQLite demo
  • practice_06.jl : PyCall demo (loading module)
  • practice_07.jl : PyCall demo (loading class)
  • practice_08.jl : PyCall demo (loading inlined class)
  • practice_09.jl : PyCall demo (separated 08)
  • practice_10.jl : C Expansion demo

Code Abstract for Julia 1.0.1/1.1.0-DEV (Obosoleted)

  • practice_01b.jl : same as practice_01.jl
  • practice_02b.jl : same as practice_02.jl
  • practice_03b.jl : same as practice_03.jl
  • practice_04b.jl : same as practice_04.jl
  • practice_05b.jl : same as practice_05.jl
  • practice_06b.jl : same as practice_06.jl
  • practice_07b.jl : same as practice_07.jl
  • practice_10b.jl : same as practice_10.jl
  • practice_11b.jl : Fortran Expansion demo
  • practice_12b.jl : Button Example using Gtk.jl
  • practice_13b.jl : WebKit Example using PySide on Python

Code Abstract for Julia 1.4

  • practice_06c.jl : same as practice_06.jl
  • practice_07c.jl : same as practice_07.jl
  • practice_08c.jl : same as practice_08.jl
  • practice_09c.jl : same as practice_09.jl
  • practice_13c.jl : same as practice_13b.jl

Three functions for C

  • display function: output string (void return)
  • calc function: Square calculation (integer return)
  • hello function: output string to add any string (string return)

Three functions for Fortran

  • display function: output string (void return)
  • calc function: multiplication (subroutine based)
  • foo function: 1-dimensional addition (module based)
  • moo function: 2-dimensional addition (module based)

Don't output pycache directory

$ export PYTHONDONTWRITEBYTECODE=True

How to build C shared library

$ cd extra/c
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cp lib/libextrac.so ../../../lib/libc/ 

How to build Fortran shared library

$ cd extra/f
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cp lib/libextraf.so ../../../lib/libf/

How to use C shared library

$ export LD_LIBRARY_PATH=./lib/libc/:$LD_LIBRARY_PATH

or

# for Julia 0.6.3
push!(Libdl.DL_LOAD_PATH, "./lib/libc/")

or

# for Julia 0.7.0/1.0.1/1.1-DEV
push!(Base.DL_LOAD_PATH, "./lib/libc")

How to use for Julia 0.6.3

$ ./src/hello.jl
$ ./src/practice_00.jl ./data/elements.csv
$ ./src/practice_01.jl ./data/elements.csv
$ ./src/practice_02.jl ./data/elements_with_header.csv
$ ./src/practice_03.jl ./data/elements_with_header.csv
$ ./src/practice_04.jl
$ ./src/practice_05.jl ./data/elements.csv test.db
$ ./src/practice_06.jl
$ ./src/practice_07.jl
$ ./src/practice_08.jl
$ ./src/practice_09.jl
$ ./src/practice_10.jl

How to use for Julia 1.4

$ ./src/practice_06c.jl
$ ./src/practice_07c.jl
$ ./src/practice_08c.jl
$ ./src/practice_09c.jl
$ ./src/practice_13c.jl

05,12b and 13c code are cheching now.

About

Julia practice code (v0.6.3 to v1.2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors