Skip to content

Commit

Permalink
the big rename: official source file extension is now .jl
Browse files Browse the repository at this point in the history
closes #407
  • Loading branch information
JeffBezanson committed Mar 4, 2012
1 parent 0f3dbc4 commit 50ede50
Show file tree
Hide file tree
Showing 131 changed files with 120 additions and 120 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ julia-debug julia-release:
@$(MAKE) -sC external
@$(MAKE) -sC src lib$@
@$(MAKE) -sC ui $@
@$(MAKE) -sC j
@$(MAKE) -sC jl
@ln -f $@-$(DEFAULT_REPL) julia

sys0.ji: src/boot.j src/dump.c j/stage0.j
$(QUIET_JULIA) ./julia -b stage0.j
sys0.ji: src/boot.jl src/dump.c jl/stage0.jl
$(QUIET_JULIA) ./julia -b stage0.jl
@rm -f sys.ji

# if sys.ji exists, use it to rebuild, otherwise use sys0.ji
sys.ji: VERSION sys0.ji j/stage1.j j/sysimg.j j/start_image.j j/*.j
$(QUIET_JULIA) ./julia `test -f sys.ji && echo stage1.j || echo -J sys0.ji stage1.j`
sys.ji: VERSION sys0.ji jl/stage1.jl jl/sysimg.jl jl/start_image.jl jl/*.jl
$(QUIET_JULIA) ./julia `test -f sys.ji && echo stage1.jl || echo -J sys0.ji stage1.jl`

install: release
install -d $(DESTDIR)$(PREFIX)/share/julia/lib
install -d $(DESTDIR)$(PREFIX)/share/julia/j
install -d $(DESTDIR)$(PREFIX)/share/julia/jl
install -d $(DESTDIR)$(PREFIX)/share/julia/contrib
install -d $(DESTDIR)$(PREFIX)/share/julia/examples
install -v julia* $(DESTDIR)$(PREFIX)/share/julia
install -v sys.ji $(DESTDIR)$(PREFIX)/share/julia
install -v j/* $(DESTDIR)$(PREFIX)/share/julia/j
install -v examples/*.j $(DESTDIR)$(PREFIX)/share/julia/examples
install -v jl/* $(DESTDIR)$(PREFIX)/share/julia/jl
install -v examples/*.jl $(DESTDIR)$(PREFIX)/share/julia/examples
install -v lib/libarpack.$(SHLIB_EXT) lib/libfdm.$(SHLIB_EXT) lib/libfftw3.$(SHLIB_EXT)* lib/libfftw3f.$(SHLIB_EXT)* lib/libpcre.$(SHLIB_EXT)* lib/libpcrecpp.$(SHLIB_EXT)* lib/libpcreposix.$(SHLIB_EXT)* lib/librandom.$(SHLIB_EXT) lib/liblapack.$(SHLIB_EXT) lib/libsuitesparse*$(SHLIB_EXT) lib/libgrisu.$(SHLIB_EXT) lib/libamos.$(SHLIB_EXT) $(DESTDIR)$(PREFIX)/share/julia/lib

dist: release
Expand All @@ -50,7 +50,7 @@ clean:
@rm -f *~ *#
@rm -f sys0.ji
@rm -f sys.ji
@$(MAKE) -sC j clean
@$(MAKE) -sC jl clean
@$(MAKE) -sC src clean
@$(MAKE) -sC ui clean
@$(MAKE) -sC ui/webserver clean
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions j/Makefile → jl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ include ../Make.inc

PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+

all: pcre_h.j errno_h.j
all: pcre_h.jl errno_h.jl

pcre_h.j:
pcre_h.jl:
$(QUIET_PERL) cpp -dM $(shell $(PCRE_CONFIG) --prefix)/include/pcre.h | perl -nle '/^\s*#define\s+(PCRE\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "const $$1 = int32($$2)"' | sort > $@

errno_h.j:
errno_h.jl:
$(QUIET_PERL) echo '#include "errno.h"' | cpp -dM - | perl -nle 'print "const $$1 = int32($$2)" if /^#define\s+(E\w+)\s+(\d+)\s*$$/' | sort > $@

clean:
rm -f *# *~
rm -f pcre_h.j
rm -f errno_h.j
rm -f pcre_h.jl
rm -f errno_h.jl
2 changes: 1 addition & 1 deletion j/abstractarray.j → jl/abstractarray.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## abstractarray.j : Generic array interfaces.
## abstractarray.jl : Generic array interfaces.

## Type aliases for convenience ##

Expand Down
2 changes: 1 addition & 1 deletion j/array.j → jl/array.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## array.j: Dense arrays
## array.jl: Dense arrays

typealias Vector{T} Array{T,1}
typealias Matrix{T} Array{T,2}
Expand Down
2 changes: 1 addition & 1 deletion j/ascii.j → jl/ascii.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## from src/boot.j
## from src/boot.jl
# type ASCIIString <: DirectIndexString; data::Array{Uint8,1}; end

## required core functionality ##
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions j/client.j → jl/client.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## client.j - frontend handling command line options, environment setup,
## and REPL
## client.jl - frontend handling command line options, environment setup,
## and REPL

const _jl_color_normal = "\033[0m"

Expand Down Expand Up @@ -196,10 +196,10 @@ function _start()
end

global const VARIABLES = {}
global const LOAD_PATH = String["", "$JULIA_HOME/", "$JULIA_HOME/j/"]
global const LOAD_PATH = String["", "$JULIA_HOME/", "$JULIA_HOME/jl/"]

# Load customized startup
try include(strcat(getcwd(),"/startup.j")) end
try include(strcat(getcwd(),"/startup.jl")) end
try include(strcat(ENV["HOME"],"/.juliarc")) end

(quiet,repl) = process_options(ARGS)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions j/inference.j → jl/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ function _jl_abstract_interpret(e::Expr, vtypes, sv::StaticVarInfo)
if isa(lhs,SymbolNode)
lhs = lhs.name
end
assert(isa(lhs,Symbol), "inference.j:579")
assert(isa(lhs,Symbol), "inference.jl:579")
return StateUpdate(lhs, t, vtypes)
elseif is(e.head,:call) || is(e.head,:call1)
abstract_eval(e, vtypes, sv)
Expand Down Expand Up @@ -884,7 +884,7 @@ function typeinf(linfo::LambdaStaticData,atypes::Tuple,sparams::Tuple, def, cop)

args = f_argnames(ast)
la = length(args)
assert(is(ast.head,:lambda), "inference.j:745")
assert(is(ast.head,:lambda), "inference.jl:745")
locals = (ast.args[2][1])::Array{Any,1}
vars = append(args, locals)
body = (ast.args[3].args)::Array{Any,1}
Expand Down Expand Up @@ -1326,8 +1326,8 @@ function inlineable(f, e::Expr, vars)
if length(body) != 1
return NF
end
assert(isa(body[1],Expr), "inference.j:1050")
assert(is(body[1].head,:return), "inference.j:1051")
assert(isa(body[1],Expr), "inference.jl:1050")
assert(is(body[1].head,:return), "inference.jl:1051")
# check for vararg function
args = f_argnames(ast)
na = length(args)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions j/linalg.j → jl/linalg.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## linalg.j: Basic Linear Algebra functions ##
## linalg.jl: Basic Linear Algebra functions ##

aCb(x::AbstractVector, y::AbstractVector) = [dot(x, y)]
aTb{T<:Real}(x::AbstractVector{T}, y::AbstractVector{T}) = [dot(x, y)]
Expand All @@ -14,7 +14,7 @@ end
cross(a::AbstractVector, b::AbstractVector) =
[a[2]*b[3]-a[3]*b[2], a[3]*b[1]-a[1]*b[3], a[1]*b[2]-a[2]*b[1]]

# blas.j defines matmul for floats; other integer and mixed precision
# blas.jl defines matmul for floats; other integer and mixed precision
# cases are handled here

# TODO: It will be faster for large matrices to convert to float,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions j/multi.j → jl/multi.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## multi.j - multiprocessing
## multi.jl - multiprocessing
##
## julia starts with one process, and processors can be added using:
## addprocs_local(n) using exec
Expand Down Expand Up @@ -1092,7 +1092,7 @@ end
addprocs_sge(n) = add_workers(PGRP, start_sge_workers(n))
SGE(n) = addprocs_sge(n)

#include("vcloud.j")
#include("vcloud.jl")

## global objects and collective operations ##

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion j/pcre.j → jl/pcre.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## low-level pcre interface ##

include("pcre_h.j")
include("pcre_h.jl")

_jl_libpcre = dlopen("libpcre")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion j/regex.j → jl/regex.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include("pcre.j")
include("pcre.jl")

## object-oriented Regex interface ##

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions j/stage0.j → jl/stage0.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ if true
end
end

include("sysimg.j")
include("sysimg.jl")

ccall(:jl_save_system_image, Void, (Ptr{Uint8},Ptr{Uint8}),
cstring("sys0.ji"), cstring("j/start_image.j"))
cstring("sys0.ji"), cstring("jl/start_image.jl"))

end # module
4 changes: 2 additions & 2 deletions j/stage1.j → jl/stage1.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module NewSystem

include("sysimg.j")
include("sysimg.jl")

# invoke type inference, running the existing inference code on the new
# inference code to cache an optimized version of it.
Expand All @@ -11,6 +11,6 @@ begin
end

ccall(:jl_save_system_image, Void, (Ptr{Uint8},Ptr{Uint8}),
cstring("sys.ji"), cstring("j/start_image.j"))
cstring("sys.ji"), cstring("jl/start_image.jl"))

end # module
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
122 changes: 61 additions & 61 deletions j/sysimg.j → jl/sysimg.jl
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
## Load essential files and libraries

include("base.j")
include("base.jl")

# core operations & types
include("range.j")
include("tuple.j")
include("cell.j")
include("expr.j")
include("error.j")
include("range.jl")
include("tuple.jl")
include("cell.jl")
include("expr.jl")
include("error.jl")

# core numeric operations & types
include("bool.j")
include("number.j")
include("int.j")
include("promotion.j")
include("operators.j")
include("float.j")
include("pointer.j")
include("char.j")
include("reduce.j")
include("complex.j")
include("rational.j")
include("bool.jl")
include("number.jl")
include("int.jl")
include("promotion.jl")
include("operators.jl")
include("float.jl")
include("pointer.jl")
include("char.jl")
include("reduce.jl")
include("complex.jl")
include("rational.jl")

# core data structures (used by type inference)
include("abstractarray.j")
include("subarray.j")
include("array.j")
include("intset.j")
include("table.j")
include("set.j")
include("abstractarray.jl")
include("subarray.jl")
include("array.jl")
include("intset.jl")
include("table.jl")
include("set.jl")

# compiler
include("inference.j")
include("inference.jl")

# I/O, strings & printing
include("io.j")
include("io.jl")
#set_current_output_stream(make_stdout_stream()) # for error reporting
include("string.j")
include("ascii.j")
include("utf8.j")
include("regex.j")
include("show.j")
include("grisu.j")
include("printf.j")
include("string.jl")
include("ascii.jl")
include("utf8.jl")
include("regex.jl")
include("show.jl")
include("grisu.jl")
include("printf.jl")

# system & environment
include("libc.j")
include("env.j")
include("errno_h.j")
include("libc.jl")
include("env.jl")
include("errno_h.jl")

# concurrency and parallelism
include("iterator.j")
include("task.j")
include("process.j")
include("serialize.j")
include("multi.j")
include("iterator.jl")
include("task.jl")
include("process.jl")
include("serialize.jl")
include("multi.jl")

# front end
include("client.j")
include("client.jl")

# core math functions
include("intfuncs.j")
include("floatfuncs.j")
include("math.j")
include("math_libm.j")
include("sort.j")
include("combinatorics.j")
include("statistics.j")
include("intfuncs.jl")
include("floatfuncs.jl")
include("math.jl")
include("math_libm.jl")
include("sort.jl")
include("combinatorics.jl")
include("statistics.jl")

# random number generation
include("random.j")
include("random.jl")

# sparse matrices
include("sparse.j")
include("sparse.jl")

# distributed arrays
include("darray.j")
include("darray.jl")

# utilities - version, timing, help, edit
include("version.j")
include("util.j")
include("datafmt.j")
include("version.jl")
include("util.jl")
include("datafmt.jl")

## Load optional external libraries

# linear algebra
include("linalg.j")
include("linalg_blas.j")
include("linalg_lapack.j")
include("linalg_arpack.j")
include("linalg_suitesparse.j")
include("linalg.jl")
include("linalg_blas.jl")
include("linalg_lapack.jl")
include("linalg_arpack.jl")
include("linalg_suitesparse.jl")

# signal processing
include("signal.j")
include("signal_fftw.j")
include("signal.jl")
include("signal_fftw.jl")


# prime method cache with some things we know we'll need right after startup
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion j/utf8.j → jl/utf8.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## from src/boot.j:
## from src/boot.jl:
# type UTF8String <: String; data::Array{Uint8,1}; end

## basic UTF-8 decoding & iteration ##
Expand Down
2 changes: 1 addition & 1 deletion j/util.j → jl/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function_loc(f::Function) = function_loc(f, (Any...))
edit(file::String) = edit(file, 1)
function edit(file::String, line::Int)
editor = get(ENV, "JULIA_EDITOR", "emacs")
issrc = file[end-1:end] == ".j"
issrc = file[end-2:end] == ".jl"
if issrc
if editor == "emacs"
jmode = "$JULIA_HOME/contrib/julia-mode.el"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@ char *jl_find_file_in_path(const char *fname)
{
char *fpath = (char*)fname;
int fid = open (fpath, O_RDONLY);
// try adding julia home, then julia_home/j/
// try adding julia home, then julia_home/jl/
if (fid == -1 && julia_home && fname[0] != '/') {
asprintf(&fpath, "%s/%s", julia_home, fname);
fid = open (fpath, O_RDONLY);
if (fid == -1) {
free(fpath);
asprintf(&fpath, "%s/j/%s", julia_home, fname);
asprintf(&fpath, "%s/jl/%s", julia_home, fname);
fid = open (fpath, O_RDONLY);
}
}
Expand Down
Loading

1 comment on commit 50ede50

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah. Huge.

Please sign in to comment.