├── .github └── workflows │ └── jsource.yml ├── .gitignore ├── README.md ├── android ├── jni │ ├── Android.mk │ └── Application.mk ├── readme └── release-android.sh ├── asm ├── asm.txt ├── asm64 ├── asm64noovf.c ├── asm64noovf.s ├── copy_obj ├── create_asm_source ├── d.c ├── d.s ├── fix_overflow.ijs ├── linuxasm64.o ├── linuxasm64.s └── macasm64.o ├── base64 ├── LICENSE ├── include │ └── libbase64.h └── lib │ ├── arch │ ├── avx │ │ ├── codec-avx.c │ │ └── enc_loop_asm.c │ ├── avx2 │ │ ├── codec-avx2.c │ │ ├── dec_loop.c │ │ ├── dec_reshuffle.c │ │ ├── enc_loop.c │ │ ├── enc_loop_asm.c │ │ ├── enc_reshuffle.c │ │ └── enc_translate.c │ ├── avx512 │ │ ├── codec-avx512.c │ │ ├── enc_loop.c │ │ └── enc_reshuffle_translate.c │ ├── generic │ │ ├── 32 │ │ │ ├── dec_loop.c │ │ │ └── enc_loop.c │ │ ├── 64 │ │ │ └── enc_loop.c │ │ ├── codec-generic.c │ │ ├── dec_head.c │ │ ├── dec_tail.c │ │ ├── enc_head.c │ │ └── enc_tail.c │ ├── neon32 │ │ ├── codec-neon32.c │ │ ├── dec_loop.c │ │ ├── enc_loop.c │ │ ├── enc_reshuffle.c │ │ └── enc_translate.c │ ├── neon64 │ │ ├── codec-neon64.c │ │ ├── dec_loop.c │ │ ├── enc_loop.c │ │ ├── enc_loop_asm.c │ │ └── enc_reshuffle.c │ ├── sse41 │ │ └── codec-sse41.c │ ├── sse42 │ │ └── codec-sse42.c │ └── ssse3 │ │ ├── codec-ssse3.c │ │ ├── dec_loop.c │ │ ├── dec_reshuffle.c │ │ ├── enc_loop.c │ │ ├── enc_loop_asm.c │ │ ├── enc_reshuffle.c │ │ └── enc_translate.c │ ├── codec_choose.c │ ├── codecs.h │ ├── config.h │ ├── env.h │ ├── lib.c │ ├── lib_openmp.c │ └── tables │ ├── table_dec_32bit.h │ ├── table_enc_12bit.h │ ├── tables.c │ └── tables.h ├── benchmark └── avx.ijs ├── dllsrc ├── jcedll.def ├── jdll.c ├── jdll.def ├── jdll.h ├── jdll.rc ├── jdll.tlb ├── jdll2.def ├── jdll3.def ├── jdll_original.tlb ├── jdll_rebuilt_from_old_source.tlb ├── jdllcom.h ├── jdllcomx.cpp ├── jdlltype.h └── jexe.h ├── hostdefs ├── Hostdefs-nopie.mk ├── Hostdefs.mk ├── hostdefs.c ├── hostdefs_win32.ijs ├── makefile └── pcre2posix.h ├── jlibrary ├── addons │ ├── data │ │ ├── jfiles │ │ │ ├── history.txt │ │ │ ├── jfiles.ijs │ │ │ ├── jfiles.txt │ │ │ ├── keyfiles.txt │ │ │ ├── manifest.ijs │ │ │ └── test │ │ │ │ ├── test0.ijs │ │ │ │ └── test1.ijs │ │ └── jmf │ │ │ ├── history.txt │ │ │ ├── jmf.ijs │ │ │ ├── manifest.ijs │ │ │ └── test │ │ │ ├── testdata.ijs │ │ │ └── testjmf.ijs │ ├── dev │ │ ├── eformat │ │ │ └── eformat.ijs │ │ ├── lu │ │ │ └── lu.ijs │ │ └── modular │ │ │ ├── manifest.ijs │ │ │ └── modular.ijs │ └── math │ │ └── lapack │ │ ├── dgeev.ijs │ │ ├── geev.ijs │ │ ├── jlapack.dll │ │ ├── jlapack64.dll │ │ ├── lapack.ijs │ │ └── zgeev.ijs ├── bin │ └── profile.ijs ├── copy_library_from_current.bat ├── system │ ├── config │ │ ├── base.cfg │ │ └── folders.cfg │ ├── defs │ │ ├── hostdefs_aix.ijs │ │ ├── hostdefs_android.ijs │ │ ├── hostdefs_android_64.ijs │ │ ├── hostdefs_darwin.ijs │ │ ├── hostdefs_darwin_64.ijs │ │ ├── hostdefs_freebsd_64.ijs │ │ ├── hostdefs_linux.ijs │ │ ├── hostdefs_linux_64.ijs │ │ ├── hostdefs_openbsd_64.ijs │ │ ├── hostdefs_sunos.ijs │ │ ├── hostdefs_win.ijs │ │ ├── hostdefs_win_64.ijs │ │ ├── netdefs_aix.ijs │ │ ├── netdefs_android.ijs │ │ ├── netdefs_android_64.ijs │ │ ├── netdefs_darwin.ijs │ │ ├── netdefs_darwin_64.ijs │ │ ├── netdefs_freebsd_64.ijs │ │ ├── netdefs_linux.ijs │ │ ├── netdefs_linux_64.ijs │ │ ├── netdefs_openbsd_64.ijs │ │ ├── netdefs_sunos.ijs │ │ ├── netdefs_win.ijs │ │ └── netdefs_win_64.ijs │ ├── main │ │ ├── regex.ijs │ │ ├── socket.ijs │ │ ├── stdlib.ijs │ │ └── task.ijs │ └── util │ │ ├── boot.ijs │ │ ├── configure.ijs │ │ ├── pacman.ijs │ │ ├── pm.ijs │ │ ├── pp.ijs │ │ ├── project.ijs │ │ ├── scripts.ijs │ │ └── tar.ijs └── tools │ ├── ftp │ ├── busybox.exe │ ├── busybox_license.txt │ ├── license.txt │ └── wget.exe │ └── regex │ ├── jpcre2.dll │ ├── libjpcre2.dylib │ ├── libjpcre2.so │ ├── libjpcre2_32.so │ └── readme.txt ├── jsrc ├── Android-static.mk ├── Android.mk ├── Jamalgam-nopie.mk ├── Jamalgam.mk ├── Jconsole-nopie.mk ├── Jconsole.mk ├── Jnative.mk ├── Tsdll.mk ├── a.c ├── a.h ├── ab.c ├── aes-arm.c ├── aes-arm_table.h ├── aes-c.c ├── aes-c.h ├── aes-ni.c ├── aes-sse2.c ├── af.c ├── ai.c ├── am.c ├── am1.c ├── amn.c ├── andjnative.c ├── ao.c ├── ap.c ├── ar.c ├── ar.h ├── as.c ├── au.c ├── avx2intrin-emu.h ├── avxintrin-emu.h ├── avxintrin-neon.h ├── blis.h ├── blis │ ├── gemm_c-ref.c │ ├── gemm_int-aarch64.c │ ├── gemm_int-avx.c │ ├── gemm_int-fma.c │ ├── gemm_int-sse2.c │ └── gemm_vec-ref.c ├── c.c ├── ca.c ├── cblas.c ├── cblas.h ├── cc.c ├── cd.c ├── cf.c ├── cg.c ├── ch.c ├── cip.c ├── cip_t.h ├── cipfloatmm_t.h ├── cl.c ├── codingrules.txt ├── com_jsoftware_j_JInterface.h ├── cp.c ├── cpdtsp.c ├── cpuinfo.c ├── cpuinfo.h ├── cr.c ├── cr_t.h ├── crc32c.c ├── crc32c.h ├── crc32ctables.h ├── crs.c ├── ct.c ├── cu.c ├── cv.c ├── cx.c ├── d.c ├── d.h ├── dc.c ├── dss.c ├── dstop.c ├── dsusp.c ├── dtoa.c ├── dtoa.h ├── f.c ├── f2.c ├── fbu.c ├── fnmatch.c ├── fnmatch.h ├── gemm.c ├── gemm.h ├── i.c ├── io.c ├── j.c ├── j.h ├── ja.h ├── jc.h ├── jconsole.c ├── jdlllic.c ├── je.h ├── jeload.c ├── jeload.h ├── jep.c ├── jerr.h ├── jfex.c ├── jfex.h ├── jgmp.h ├── jgmpinit.c ├── jlib.h ├── jr0.h ├── js.h ├── jsleef.h ├── jt.h ├── jtype.h ├── jversion-x.h ├── jx_utils_jnative.h ├── k.c ├── linenoise.c ├── linenoise.h ├── m.c ├── m.h ├── mbx.c ├── mt.c ├── mt.h ├── openssl │ └── sha │ │ ├── README.txt │ │ ├── asm │ │ ├── arm_arch.h │ │ ├── keccak1600-armv4-elf.S │ │ ├── keccak1600-armv8-elf.S │ │ ├── keccak1600-armv8-ios.S │ │ ├── keccak1600-avx2-elf.S │ │ ├── keccak1600-avx512-elf.S │ │ ├── keccak1600-mmx-android.S │ │ ├── keccak1600-mmx-elf.S │ │ ├── keccak1600-mmx-macho.S │ │ ├── keccak1600-mmx-masm.asm │ │ ├── keccak1600-mmx-nasm.asm │ │ ├── keccak1600-x86_64-elf.S │ │ ├── keccak1600-x86_64-macho.S │ │ ├── keccak1600-x86_64-masm.asm │ │ ├── keccak1600-x86_64-nasm.asm │ │ ├── md5-586-android.S │ │ ├── md5-586-elf.S │ │ ├── md5-586-macho.S │ │ ├── md5-586-masm.asm │ │ ├── md5-586-nasm.asm │ │ ├── md5-aarch64-elf.S │ │ ├── md5-aarch64-ios.S │ │ ├── md5-asm.sh │ │ ├── md5-x86_64-elf.S │ │ ├── md5-x86_64-macho.S │ │ ├── md5-x86_64-masm.asm │ │ ├── md5-x86_64-nasm.asm │ │ ├── nasm-build.sh │ │ ├── sha-asm.sh │ │ ├── sha1-586-android.S │ │ ├── sha1-586-elf.S │ │ ├── sha1-586-macho.S │ │ ├── sha1-586-masm.asm │ │ ├── sha1-586-nasm.asm │ │ ├── sha1-armv4-elf.S │ │ ├── sha1-armv8-elf.S │ │ ├── sha1-armv8-ios.S │ │ ├── sha1-x86_64-elf.S │ │ ├── sha1-x86_64-macho.S │ │ ├── sha1-x86_64-masm.asm │ │ ├── sha1-x86_64-nasm.asm │ │ ├── sha256-586-android.S │ │ ├── sha256-586-elf.S │ │ ├── sha256-586-macho.S │ │ ├── sha256-586-masm.asm │ │ ├── sha256-586-nasm.asm │ │ ├── sha256-armv4-elf.S │ │ ├── sha256-armv8-elf.S │ │ ├── sha256-armv8-ios.S │ │ ├── sha256-x86_64-elf.S │ │ ├── sha256-x86_64-macho.S │ │ ├── sha256-x86_64-masm.asm │ │ ├── sha256-x86_64-nasm.asm │ │ ├── sha512-586-android.S │ │ ├── sha512-586-elf.S │ │ ├── sha512-586-macho.S │ │ ├── sha512-586-masm.asm │ │ ├── sha512-586-nasm.asm │ │ ├── sha512-armv4-elf.S │ │ ├── sha512-armv8-elf.S │ │ ├── sha512-armv8-ios.S │ │ ├── sha512-x86_64-elf.S │ │ ├── sha512-x86_64-macho.S │ │ ├── sha512-x86_64-masm.asm │ │ └── sha512-x86_64-nasm.asm │ │ ├── keccak1600.c │ │ ├── md32_common.h │ │ ├── md4.h │ │ ├── md4_dgst.c │ │ ├── md4_locl.h │ │ ├── md4_one.c │ │ ├── md5.h │ │ ├── md5_dgst.c │ │ ├── md5_locl.h │ │ ├── md5_one.c │ │ ├── open_software_license.txt │ │ ├── openssl-util.c │ │ ├── openssl.h │ │ ├── sha.h │ │ ├── sha1_one.c │ │ ├── sha256.c │ │ ├── sha3.c │ │ ├── sha3.h │ │ ├── sha512.c │ │ └── sha_locl.h ├── p.c ├── p.h ├── pv.c ├── px.c ├── r.c ├── result.h ├── rl.c ├── rt.c ├── s.c ├── s.h ├── sc.c ├── sl.c ├── sn.c ├── sse2neon.h ├── sse2neon2.h ├── str.c ├── strptime.c ├── t.c ├── tags.txt ├── thread.c ├── thread.h ├── tsdll.c ├── u.c ├── utf │ ├── utf16le_to_utf8_avx512.S │ ├── utf16le_to_utf8_avx512i.c │ ├── utf8_to_utf16le_avx512.S │ └── utf8_to_utf16le_avx512i.c ├── v.c ├── v0.c ├── v1.c ├── v2.c ├── va.h ├── va1.c ├── va1ss.c ├── va2.c ├── va2s.c ├── va2ss.c ├── vamultsp.c ├── vasm.h ├── vb.c ├── vbang.c ├── vbit.c ├── vcant.c ├── vcat.c ├── vcatsp.c ├── vchar.c ├── vcomp.c ├── vcomp.h ├── vcompsc.c ├── vd.c ├── vdx.c ├── vdx.h ├── ve.c ├── ve.h ├── vf.c ├── vfft.c ├── vfrom.c ├── vfromsp.c ├── vg.c ├── vg.h ├── vgauss.c ├── vgcomp.c ├── vgmerge.h ├── vgmergemincomp.h ├── vgranking.c ├── vgsort.c ├── vgsort.h ├── vgsortavx512.h ├── vgsortinavx512.h ├── vgsortiqavx512.c ├── vgsortiqavx512.h ├── vgsortq.h ├── vgsp.c ├── vi.c ├── viavx.c ├── viavx.h ├── viavx1-2.c ├── viavx1-4.c ├── viavx1.h ├── viavx2.c ├── viavx3.c ├── viavx4.c ├── viavx5.c ├── viavx6.c ├── viix.c ├── viixamd64.asm ├── visp.c ├── vm.c ├── vo.c ├── vp.c ├── vq.c ├── vq.h ├── vrand.c ├── vrep.c ├── vs.c ├── vsb.c ├── vt.c ├── vu.c ├── vx.c ├── vx.h ├── vz.c ├── vz.h ├── w.c ├── w.h ├── wc.c ├── wn.c ├── ws.c ├── x.c ├── x.h ├── x15.c ├── xa.c ├── xaes.c ├── xb.c ├── xc.c ├── xc.h ├── xcrc.c ├── xd.c ├── xdic.c ├── xf.c ├── xfmt.c ├── xh.c ├── xi.c ├── xl.c ├── xlp.c ├── xo.c ├── xs.c ├── xsha.c ├── xt.c ├── xu.c └── xxhash.h ├── libbacktrace ├── alloc.c ├── atomic.c ├── backtrace-supported.h ├── backtrace.c ├── backtrace.h ├── config.h ├── dwarf.c ├── elf.c ├── fileline.c ├── filenames.h ├── internal.h ├── macho.c ├── mmap.c ├── mmapio.c ├── pecoff.c ├── posix.c ├── print.c ├── read.c ├── simple.c ├── sort.c └── state.c ├── libedit └── libedit.a ├── license.txt ├── make2 ├── build_all.sh ├── build_jamalgam.sh ├── build_jconsole.sh ├── build_jnative.sh ├── build_libj.sh ├── build_tsdll.sh ├── clean.sh ├── cpbin.sh ├── jplatform64.sh ├── macos-libomp.txt ├── make.txt ├── makefile-jamalgam ├── makefile-jconsole ├── makefile-jnative ├── makefile-libj ├── makefile-tsdll ├── mktoc.sh └── runtests ├── make_deprecated ├── build_all.sh ├── build_jconsole.sh ├── build_jnative.sh ├── build_libj.sh ├── build_tsdll.sh ├── clean.sh ├── comments.txt ├── copy_jlibrary.sh ├── domake.sh ├── install.sh ├── jvars.sh ├── make.txt ├── makefile └── run_tests.sh ├── makemsvc ├── jamalgam │ ├── makefile │ └── makefile.win ├── jconsole │ ├── makefile │ └── makefile.win ├── jdll │ ├── build.sh │ ├── clean.sh │ ├── makefile │ └── makefile.win ├── jnative │ ├── jnative.def │ ├── makefile │ └── makefile.win ├── makemsvc.txt ├── release.bat ├── release.sh └── tsdll │ ├── makefile │ └── makefile.win ├── makevs ├── README.md ├── copy_jlibrary.bat ├── install.bat ├── jconsole │ ├── jconsole.rc │ ├── jgray.ico │ ├── profile.ijs │ ├── resource.h │ ├── resource1.h │ └── template │ │ ├── .gitignore │ │ ├── jconsole_vs2013.sln │ │ ├── jconsole_vs2013.vcxproj │ │ ├── jconsole_vs2013.vcxproj.user │ │ ├── jconsole_vs2019.sln │ │ ├── jconsole_vs2019.vcxproj │ │ ├── jconsole_vs2019.vcxproj.user │ │ ├── jconsole_vs2019_clang.sln │ │ ├── jconsole_vs2019_clang.vcxproj │ │ └── jconsole_vs2019_clang.vcxproj.user ├── jdll │ ├── profile.ijs │ └── template │ │ ├── .gitignore │ │ ├── jdll_vs2013.sln │ │ ├── jdll_vs2013.vcxproj │ │ ├── jdll_vs2013.vcxproj.user │ │ ├── jdll_vs2019.sln │ │ ├── jdll_vs2019.vcxproj │ │ ├── jdll_vs2019.vcxproj.user │ │ ├── jdll_vs2019_clang.sln │ │ ├── jdll_vs2019_clang.vcxproj │ │ └── jdll_vs2019_clang.vcxproj.user ├── makevs.txt ├── midl │ ├── build.bat │ ├── jdll.idl │ ├── jdll.odl │ ├── jdll.tlb │ ├── jdll_i.c │ ├── jdllidl.h │ ├── methods.odl │ └── tlb.txt ├── release.bat ├── template.bat ├── templates.ijs └── tsdll │ ├── template │ ├── .gitignore │ ├── tsdll_vs2013.sln │ ├── tsdll_vs2013.vcxproj │ ├── tsdll_vs2013.vcxproj.user │ ├── tsdll_vs2019.sln │ ├── tsdll_vs2019.vcxproj │ ├── tsdll_vs2019.vcxproj.user │ ├── tsdll_vs2019_clang.sln │ ├── tsdll_vs2019_clang.vcxproj │ └── tsdll_vs2019_clang.vcxproj.user │ └── tsdll.def ├── mpir ├── apple │ ├── ios │ │ └── libgmp.a │ └── macos │ │ └── libgmp.dylib ├── freebsd │ ├── aarch64 │ │ └── libgmp.so │ └── x86_64 │ │ └── libgmp.so ├── include │ ├── android │ │ ├── gmp-arm64-v8a.h │ │ ├── gmp-armeabi-v7a.h │ │ ├── gmp-armeabi.h │ │ ├── gmp-x86.h │ │ └── gmp-x86_64.h │ ├── apple │ │ ├── gmp-arm64.h │ │ └── gmp-x86_64.h │ ├── gmp.h │ ├── linux │ │ ├── gmp-aarch64.h │ │ ├── gmp-arm.h │ │ ├── gmp-i386.h │ │ ├── gmp-wasm32.h │ │ └── gmp-x86_64.h │ └── mpir.h ├── linux │ ├── aarch64 │ │ └── libgmp.so │ ├── arm │ │ └── libgmp.so │ ├── i386 │ │ ├── libgmp.so │ │ └── libgmpd.so │ ├── wasm32 │ │ └── libgmp.a │ └── x86_64 │ │ ├── libgmp.so │ │ └── libgmpd.so ├── openbsd │ ├── aarch64 │ │ └── libgmp.so │ └── x86_64 │ │ └── libgmp.so └── windows │ ├── arm64 │ ├── mpir.dll │ └── mpir.lib │ ├── win32 │ ├── mpir.dll │ └── mpir.lib │ ├── x64 │ ├── mpir-md.dll │ ├── mpir-md.lib │ ├── mpir.dll │ └── mpir.lib │ └── x86 │ ├── mpir.dll │ └── mpir.lib ├── netdefs ├── Netdefs-nopie.mk ├── Netdefs.mk ├── makefile ├── netdefs.c └── netdefs_win32.ijs ├── openmp ├── include │ └── omp.h └── obj │ ├── linux │ ├── i386 │ │ └── libomp.so.5 │ └── x86_64 │ │ └── libomp.so.5 │ └── windows │ ├── libomp.dll │ ├── libomp.lib │ ├── libomp32.dll │ └── libomp32.lib ├── openssl-asm ├── keccak1600-mmx-nasm.o ├── keccak1600-x86_64-nasm.o ├── md5-586-nasm.o ├── md5-x86_64-nasm.o ├── sha1-586-nasm.o ├── sha1-x86_64-nasm.o ├── sha256-586-nasm.o ├── sha256-x86_64-nasm.o ├── sha512-586-nasm.o └── sha512-x86_64-nasm.o ├── overview.txt ├── pcre2 ├── apple │ └── macos │ │ └── libjpcre2.dylib ├── freebsd │ ├── aarch64 │ │ └── libjpcre2.so │ └── x86_64 │ │ └── libjpcre2.so ├── linux │ ├── aarch64 │ │ └── libjpcre2.so │ ├── arm │ │ └── libjpcre2.so │ ├── i386 │ │ └── libjpcre2.so │ ├── wasm32 │ │ └── libpcre2-8.a │ └── x86_64 │ │ └── libjpcre2.so ├── openbsd │ ├── aarch64 │ │ └── libjpcre2.so │ └── x86_64 │ │ └── libjpcre2.so └── windows │ ├── arm64 │ └── jpcre2.dll │ ├── x64 │ └── jpcre2.dll │ └── x86 │ └── jpcre2.dll ├── pthreads4w ├── bin │ ├── pthreadVC3-arm64.dll │ ├── pthreadVC3-w32.dll │ └── pthreadVC3.dll ├── include │ ├── _ptw32.h │ ├── pthread.h │ ├── sched.h │ └── semaphore.h └── lib │ ├── pthreadVC3-arm64.lib │ ├── pthreadVC3-w32.lib │ └── pthreadVC3.lib ├── script ├── build_test.ijs ├── buildga.cmd ├── buildga.sh ├── commit.sh ├── github_builds.txt ├── global_report.ijs ├── install-lnx.sh ├── install-mac.sh ├── install-rpi.sh ├── map_globals.sh ├── run_tests.ijs ├── tag.sh ├── testga.cmd ├── testga.ijs ├── testga.sh ├── testgares.sh └── ver.ijs ├── sleef └── include │ ├── aarch64 │ ├── sleef.h │ ├── sleefinline_advsimd.h │ ├── sleefinline_cuda.h │ ├── sleefinline_purecfma_scalar.h │ ├── sleefquad.h │ ├── sleefquadinline_advsimd.h │ ├── sleefquadinline_cuda.h │ ├── sleefquadinline_purec_scalar.h │ └── sleefquadinline_purecfma_scalar.h │ └── x86_64 │ ├── sleef.h │ ├── sleefinline_avx2.h │ ├── sleefinline_avx2128.h │ ├── sleefinline_avx512f.h │ ├── sleefinline_cuda.h │ ├── sleefinline_purecfma_scalar.h │ ├── sleefinline_sse2.h │ ├── sleefquad.h │ ├── sleefquadinline_avx2.h │ ├── sleefquadinline_avx2128.h │ ├── sleefquadinline_avx512f.h │ ├── sleefquadinline_cuda.h │ ├── sleefquadinline_purec_scalar.h │ ├── sleefquadinline_purecfma_scalar.h │ └── sleefquadinline_sse2.h ├── test ├── g0.ijs ├── g000.ijs ├── g000a.ijs ├── g000i.ijs ├── g000p.ijs ├── g000s.ijs ├── g001.ijs ├── g010.ijs ├── g010a.ijs ├── g010i.ijs ├── g010p.ijs ├── g010s.ijs ├── g011.ijs ├── g011a.ijs ├── g011i.ijs ├── g011p.ijs ├── g011s.ijs ├── g012.ijs ├── g012a.ijs ├── g012i.ijs ├── g012p.ijs ├── g012s.ijs ├── g020.ijs ├── g020a.ijs ├── g020i.ijs ├── g020p.ijs ├── g020s.ijs ├── g021.ijs ├── g021a.ijs ├── g021i.ijs ├── g021p.ijs ├── g021s.ijs ├── g022.ijs ├── g022a.ijs ├── g022i.ijs ├── g022p.ijs ├── g022s.ijs ├── g030.ijs ├── g030a.ijs ├── g031.ijs ├── g032.ijs ├── g0a.ijs ├── g0x.ijs ├── g100.ijs ├── g100a.ijs ├── g100i.ijs ├── g100p.ijs ├── g100s.ijs ├── g101.ijs ├── g101a.ijs ├── g101i.ijs ├── g101p.ijs ├── g101s.ijs ├── g102.ijs ├── g102a.ijs ├── g102i.ijs ├── g102p.ijs ├── g102s.ijs ├── g110.ijs ├── g110a.ijs ├── g110i.ijs ├── g110p.ijs ├── g110s.ijs ├── g111.ijs ├── g111a.ijs ├── g111i.ijs ├── g111p.ijs ├── g111s.ijs ├── g112.ijs ├── g112a.ijs ├── g112i.ijs ├── g112p.ijs ├── g112s.ijs ├── g120.ijs ├── g120a.ijs ├── g120i.ijs ├── g120p.ijs ├── g120s.ijs ├── g121.ijs ├── g122.ijs ├── g122a.ijs ├── g128x.ijs ├── g128x11.ijs ├── g128x11a.ijs ├── g128x14.ijs ├── g128x19.ijs ├── g128x3.ijs ├── g128x5.ijs ├── g128x6.ijs ├── g128x7.ijs ├── g130.ijs ├── g130a.ijs ├── g130i.ijs ├── g130p.ijs ├── g131.ijs ├── g132.ijs ├── g13x.ijs ├── g15x.ijs ├── g18x.ijs ├── g1x.ijs ├── g1x0.ijs ├── g1x1.ijs ├── g1x11.ijs ├── g1x12.ijs ├── g1x2.ijs ├── g1x20.ijs ├── g1x3.ijs ├── g1x30.ijs ├── g1x4.ijs ├── g1x43.ijs ├── g1x5.ijs ├── g1x55.ijs ├── g1x7.ijs ├── g200.ijs ├── g200a.ijs ├── g200i.ijs ├── g200m.ijs ├── g200p.ijs ├── g201.ijs ├── g202.ijs ├── g202b.ijs ├── g210.ijs ├── g210a.ijs ├── g211.ijs ├── g212.ijs ├── g220.ijs ├── g220t.ijs ├── g221.ijs ├── g222.ijs ├── g222a.ijs ├── g222i.ijs ├── g222p.ijs ├── g222s.ijs ├── g230.ijs ├── g230a.ijs ├── g230i.ijs ├── g230p.ijs ├── g230s.ijs ├── g231.ijs ├── g232.ijs ├── g2x.ijs ├── g300.ijs ├── g300b.ijs ├── g300t.ijs ├── g301.ijs ├── g310.ijs ├── g310a.ijs ├── g310names.ijs ├── g310r.ijs ├── g310t.ijs ├── g311.ijs ├── g312.ijs ├── g320.ijs ├── g320ip.ijs ├── g320ipt.ijs ├── g321.ijs ├── g321t.ijs ├── g322.ijs ├── g330.ijs ├── g330f.ijs ├── g330t.ijs ├── g331.ijs ├── g331bx.ijs ├── g331col.ijs ├── g331ins.ijs ├── g331ps.ijs ├── g331sp.ijs ├── g332.ijs ├── g332s.ijs ├── g3x.ijs ├── g3x02bak.ijs ├── g3x10.ijs ├── g3x12.ijs ├── g3x12a.ijs ├── g3x4.ijs ├── g3x5.ijs ├── g3x6.ijs ├── g400.ijs ├── g400e.ijs ├── g401.ijs ├── g402.ijs ├── g410.ijs ├── g410a.ijs ├── g410i.ijs ├── g410p.ijs ├── g410s.ijs ├── g411.ijs ├── g412.ijs ├── g420.ijs ├── g420ce.ijs ├── g420fg.ijs ├── g420r2.ijs ├── g420stch.ijs ├── g420t.ijs ├── g421.ijs ├── g421c.ijs ├── g421d.ijs ├── g421e.ijs ├── g421i.ijs ├── g421p.ijs ├── g421t.ijs ├── g422.ijs ├── g422os.ijs ├── g422rk.ijs ├── g422sort.ijs ├── g422sort1.ijs ├── g422tao.ijs ├── g430.ijs ├── g430a2.ijs ├── g430avg.ijs ├── g430b.ijs ├── g430d.ijs ├── g430fin.ijs ├── g430inv.ijs ├── g431.ijs ├── g431a.ijs ├── g432.ijs ├── g4x.ijs ├── g4x5.ijs ├── g500.ijs ├── g502.ijs ├── g510.ijs ├── g520.ijs ├── g520b.ijs ├── g520p.ijs ├── g521.ijs ├── g522.ijs ├── g530.ijs ├── g530m0.ijs ├── g530t.ijs ├── g531.ijs ├── g532.ijs ├── g5x.ijs ├── g5x0.ijs ├── g5x1.ijs ├── g5x2.ijs ├── g5x30.ijs ├── g5x4.ijs ├── g5x5.ijs ├── g5x6.ijs ├── g5x7.ijs ├── g600.ijs ├── g600ip.ijs ├── g601.ijs ├── g602.ijs ├── g610.ijs ├── g612.ijs ├── g620.ijs ├── g620a.ijs ├── g621.ijs ├── g622.ijs ├── g630.ijs ├── g631.ijs ├── g631c.ijs ├── g632.ijs ├── g640.ijs ├── g640k.ijs ├── g640r.ijs ├── g641.ijs ├── g6x.ijs ├── g6x0.ijs ├── g6x14.ijs ├── g7x.ijs ├── g7x5.ijs ├── g7x5s.ijs ├── g7x6.ijs ├── g8x.ijs ├── g9x.ijs ├── g9x40.ijs ├── ga.ijs ├── gassert.ijs ├── gb.ijs ├── gbpar.ijs ├── gc.ijs ├── gchar.ijs ├── gcip.ijs ├── gcip1.ijs ├── gcip2.ijs ├── gcompsc.ijs ├── gct.ijs ├── gctrl.ijs ├── gd.ijs ├── gddot.ijs ├── gdll.ijs ├── gdll_df.ijs ├── ge.ijs ├── gebar.ijs ├── gesc.ijs ├── gf.ijs ├── gfft.ijs ├── gfold.ijs ├── gfor.ijs ├── gft.ijs ├── ggoto.ijs ├── gh.ijs ├── gi.ijs ├── gi0.ijs ├── gibs.ijs ├── gibst.ijs ├── gicap.ijs ├── gicap2.ijs ├── gico.ijs ├── giconv.ijs ├── gif.ijs ├── gimaxmin.ijs ├── gintdiv.ijs ├── gintg.ijs ├── gintovfl.ijs ├── giph.ijs ├── gipht.ijs ├── giscode.ijs ├── git.ijs ├── gix.ijs ├── gj.ijs ├── gjfile.ijs ├── glapack.ijs ├── glco.ijs ├── gldot.ijs ├── glocale.ijs ├── gmbx.ijs ├── gmbx0.ijs ├── gmbx1.ijs ├── gmbx2.ijs ├── gmbx3.ijs ├── gmbx4.ijs ├── gmbx5.ijs ├── gmbx6.ijs ├── gmbxah.ijs ├── gmbxip.ijs ├── gmbxqz.ijs ├── gmbxx.ijs ├── gmbxx1u.ijs ├── gmbxx1w.ijs ├── gmean.ijs ├── gmemo.ijs ├── gmmf.ijs ├── gmmf1s.ijs ├── gmmf1u.ijs ├── gmmf1w.ijs ├── gmnom.ijs ├── gn.ijs ├── gnan.ijs ├── gnum.ijs ├── gnvv.ijs ├── go.ijs ├── goi.ijs ├── goox.ijs ├── gop.ijs ├── gos.ijs ├── gparse.ijs ├── gpco.ijs ├── gpco2.ijs ├── gpcoinv.ijs ├── gpdd.ijs ├── gpi.ijs ├── gpick.ijs ├── gpoly.ijs ├── gq.ijs ├── gq101.ijs ├── gq132.ijs ├── gq201.ijs ├── gqco.ijs ├── gqnonrat.ijs ├── gr.ijs ├── gr1.ijs ├── grefcount.ijs ├── gregex.ijs ├── gs.ijs ├── gsco.ijs ├── gsco1.ijs ├── gsco1u.ijs ├── gsco1w.ijs ├── gsco2.ijs ├── gsco2u.ijs ├── gsco2w.ijs ├── gscou.ijs ├── gsdot.ijs ├── gselect.ijs ├── gsp.ijs ├── gsp0.ijs ├── gsp000.ijs ├── gsp1.ijs ├── gsp100.ijs ├── gsp101.ijs ├── gsp102.ijs ├── gsp110.ijs ├── gsp111.ijs ├── gsp112.ijs ├── gsp120.ijs ├── gsp122.ijs ├── gsp130.ijs ├── gsp2.ijs ├── gsp221.ijs ├── gsp222.ijs ├── gsp231.ijs ├── gsp320.ijs ├── gsp321.ijs ├── gsp322.ijs ├── gsp331.ijs ├── gsp400.ijs ├── gsp410.ijs ├── gsp412.ijs ├── gsp420.ijs ├── gsp421.ijs ├── gsp422.ijs ├── gsp431.ijs ├── gsp432.ijs ├── gsp520.ijs ├── gsp520sd.ijs ├── gsp520ss.ijs ├── gsp521.ijs ├── gsp530i.ijs ├── gsp530l.ijs ├── gsp530n.ijs ├── gsp531.ijs ├── gsp5x5.ijs ├── gsp6.ijs ├── gsp600.ijs ├── gsp600a.ijs ├── gspi.ijs ├── gspj.ijs ├── gspo.ijs ├── gspr.ijs ├── gspx.ijs ├── gss.ijs ├── gstack.ijs ├── gt.ijs ├── gtdot.ijs ├── gtdot1.ijs ├── gtdot2.ijs ├── gtdot3.ijs ├── gtdot4.ijs ├── gtdot5.ijs ├── gthrow.ijs ├── gtrain.ijs ├── gtry.ijs ├── gu.ijs ├── gu0.ijs ├── gunderai.ijs ├── gwhile.ijs ├── gx.ijs ├── gx132.ijs ├── gxco.ijs ├── gxco1.ijs ├── gxco2.ijs ├── gxinf.ijs ├── gz001.ijs ├── t1.ijf ├── test.htm ├── test.jproj ├── tsheb.ijs └── tsu.ijs ├── unix ├── libedit.a └── libedit64.a └── version.txt /README.md: -------------------------------------------------------------------------------- 1 | J is a high-level, general-purpose programming language that is particularly suited to the mathematical, statistical, and logical analysis of data. It is a powerful tool for developing algorithms and exploring problems that are not already well understood. 2 | 3 | J is written in portable C and is available for Windows, Linux, Mac, iOS, Android and Raspberry Pi. J can be installed and distributed for free. The [source](https://github.com/jsoftware/jsource) 4 | is provided under both commercial and GPL 3 licenses. 5 | 6 | J is easy to install, has a small footprint, and has direct access to tutorials and documentation. 7 | 8 | The latest release is J9.6 with several new language features and performance improvements, available from February 2025. See [J9.6 Release Notes](https://code.jsoftware.com/wiki/System/ReleaseNotes/J9.6). 9 | 10 | A [J9.7 beta](https://code.jsoftware.com/wiki/System/ReleaseNotes/J9.7) is available from March 2025. 11 | 12 | Documentation can be found in the [J wiki](https://code.jsoftware.com/wiki). 13 | 14 | To download and install see [Installation](https://code.jsoftware.com/wiki/System/Installation). 15 | 16 | To build the J engine on your platform, see overview.txt. The various distributions for supported platforms are built with github actions. 17 | -------------------------------------------------------------------------------- /android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | # LOCAL_DISABLE_FATAL_LINKER_WARNINGS := true 3 | 4 | LOCAL_PATH:=(call my-dir) 5 | 6 | include jni/jsrc/Android.mk 7 | include jni/jsrc/Android-static.mk 8 | include jni/jsrc/Jnative.mk 9 | include jni/jsrc/Jconsole.mk 10 | include jni/jsrc/Jconsole-nopie.mk 11 | include jni/jsrc/Jamalgam.mk 12 | include jni/jsrc/Jamalgam-nopie.mk 13 | include jni/jsrc/Tsdll.mk 14 | include jni/hostdefs/Hostdefs.mk 15 | include jni/hostdefs/Hostdefs-nopie.mk 16 | include jni/netdefs/Netdefs.mk 17 | include jni/netdefs/Netdefs-nopie.mk 18 | # include jni/pcre/Android.mk 19 | # include jni/pcre2/Android.mk 20 | # include jni/clapack/Android.mk 21 | -------------------------------------------------------------------------------- /android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | # this file will be overrided by caller's Application.mk if any 2 | APP_OPTIM=release 3 | # APP_OPTIM=debug 4 | # APP_MODULES := jconsole-nopie libj libja jnative libtsdll netdefs-nopie hostdefs-nopie jamalgam-nopie 5 | APP_MODULES := jconsole libj libja jnative libtsdll netdefs hostdefs jamalgam 6 | # APP_MODULES := libjpcre libjpcre2 blas libf2c cholrl lapack 7 | # use ndk r14 gcc-4.9 to build armeabi and armeabi-v7a 8 | # APP_ABI := armeabi 9 | APP_ABI := armeabi-v7a x86 x86_64 arm64-v8a 10 | # APP_ABI := x86_64 arm64-v8a 11 | # will be enable inside Jconsole.mk, it is easier to enable than disable 12 | APP_PIE := false 13 | # android 10 api level 29 suppress warning on Phone API 36 14 | # android 7.0 api level 24 15 | # android 5.0 api level 21 first version supported pie executable only 16 | # android 4.1 api level 16 17 | APP_PLATFORM := android-29 18 | # android 2.3.1 19 | # APP_PLATFORM := android-9 # support nopie only 20 | -------------------------------------------------------------------------------- /android/readme: -------------------------------------------------------------------------------- 1 | 1. make a symlink in jni folder 2 | 3 | $ cd jni 4 | $ ln -sf ../../jsrc . 5 | $ ln -sf ../../hostdefs . 6 | $ ln -sf ../../netdefs . 7 | $ ln -sf ../../../../src/pcre . 8 | $ ln -sf ../../../../src/pcre2 . 9 | $ cd .. 10 | 11 | 2. build using ndk in the current folder 12 | 13 | $ ndk-build 14 | 15 | for armeabi target, use gcc and older version of ndk 16 | wget https://dl.google.com/android/repository/android-ndk-r16b-darwin-x86_64.zip 17 | unzip android-ndk-r16b-darwin-x86_64.zip 18 | $ NDK_TOOLCHAIN_VERSION=4.9 ~/android-ndk-r16b/ndk-build 19 | 20 | debug built 21 | in Application.mk change to APP_OPTIM=debug 22 | NO need to change anything in Android.mk 23 | 24 | $ NDK_TOOLCHAIN_VERSION=4.9 ~/android/android-ndk-r16b/ndk-build NDK_DEBUG=1 25 | 26 | binaries in libs folder 27 | 28 | 3. jconsole readline implemented with linenoise 29 | * https://github.com/antirez/linenoise 30 | -------------------------------------------------------------------------------- /android/release-android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # copy binaries to release folder 3 | 4 | jgit=.. 5 | jplatform=android 6 | mkdir -p $jgit/release/$jplatform/j32/x86 7 | mkdir -p $jgit/release/$jplatform/j32/armeabi 8 | mkdir -p $jgit/release/$jplatform/j32/armeabi-v7a 9 | mkdir -p $jgit/release/$jplatform/j64/x86_64 10 | mkdir -p $jgit/release/$jplatform/j64/arm64-v8a 11 | rm -f $jgit/release/$jplatform/j32/x86/* 12 | rm -f $jgit/release/$jplatform/j32/armeabi/* 13 | rm -f $jgit/release/$jplatform/j32/armeabi-v7a/* 14 | rm -f $jgit/release/$jplatform/j64/x86_64/* 15 | rm -f $jgit/release/$jplatform/j64/arm64-v8a/* 16 | 17 | cp $jgit/android/libs/x86/* $jgit/release/$jplatform/j32/x86/. 18 | cp $jgit/android/libs/armeabi/* $jgit/release/$jplatform/j32/armeabi/. 19 | cp $jgit/android/libs/armeabi-v7a/* $jgit/release/$jplatform/j32/armeabi-v7a/. 20 | cp $jgit/android/libs/x86_64/* $jgit/release/$jplatform/j64/x86_64/. 21 | cp $jgit/android/libs/arm64-v8a/* $jgit/release/$jplatform/j64/arm64-v8a/. 22 | -------------------------------------------------------------------------------- /asm/asm64: -------------------------------------------------------------------------------- 1 | gcc -c asm64.s 2 | -------------------------------------------------------------------------------- /asm/copy_obj: -------------------------------------------------------------------------------- 1 | cp asm64.o ~/dev/j/asm64.o 2 | 3 | -------------------------------------------------------------------------------- /asm/create_asm_source: -------------------------------------------------------------------------------- 1 | gcc -S -O3 asm64noovf.c 2 | -------------------------------------------------------------------------------- /asm/d.c: -------------------------------------------------------------------------------- 1 | typedef long long I; 2 | typedef double D; 3 | typedef float F; 4 | 5 | void fii(I,I); 6 | void fiiii(I,I,I,I); 7 | void fiiiiii(I,I,I,I,I,I); 8 | void fiiiiiiii(I,I,I,I,I,I,I,I); 9 | void fid(I,D); 10 | void fidid(I,D,I,D); 11 | void fididid(I,D,I,D,I,D); 12 | void fid9(I,D,I,D,I,D,I,D,I,D,I,D,I,D,I,D,I,D); 13 | void fdddd(D,D,D,D); 14 | void fd8 (D,D,D,D,D,D,D,D); 15 | void fd12(D,D,D,D,D,D,D,D,D,D,D,D,D*); 16 | void ff2(F,F); 17 | void fd2(D,D); 18 | 19 | I a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10,k=11,l=12,m=13,n=14,o=15,p=16,q=17; 20 | D da=1,db=2,dc=3,dd=4,de=5,df=6,dg=7,dh=8,di=9,dj=10,dk=11,dl=12,dm=12,dn=13,dox=14,dp=15,dq=16,dr=17; 21 | F fa=1,fb=2; 22 | D ddata[12]; 23 | 24 | void test() 25 | { 26 | fii(1,2); 27 | fiiii(1,2,3,4); 28 | fiiiiii(1,2,3,4,5,6); 29 | fiiiiiiii(a,b,c,d,e,f,g,h); 30 | fid(1,2.2); 31 | fidid(1,2.2,3,4.4); 32 | fididid(a,db,c,dd,e,df); 33 | fid9(a,db,c,dd,e,df,g,dh,i,dj,k,dl,m,dn,o,dp,q,dr); 34 | fdddd(1.1,2.2,3.3,4.4); 35 | fd8(9.1,9.2,9.3,9.4,9.5,9.6,9.7,9.8); 36 | fd12(da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,ddata); 37 | ff2(da,db); 38 | fd2(da,db); 39 | } 40 | 41 | D foo(D a,D b,D c,D d,D e,D f,D g,D h,D i,D j,D k, D l) 42 | { 43 | return a+b+c+d+e+f+g+h+i+j+k+l; 44 | } 45 | -------------------------------------------------------------------------------- /asm/linuxasm64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/asm/linuxasm64.o -------------------------------------------------------------------------------- /asm/macasm64.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/asm/macasm64.o -------------------------------------------------------------------------------- /base64/lib/arch/avx2/codec-avx2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "../../../include/libbase64.h" 6 | #include "../../tables/tables.h" 7 | #include "../../codecs.h" 8 | #include "../../config.h" 9 | #include "../../env.h" 10 | 11 | #if HAVE_AVX2 12 | #include 13 | 14 | // Only enable inline assembly on supported compilers and on 64-bit CPUs. 15 | #ifndef BASE64_AVX2_USE_ASM 16 | # if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 17 | # define BASE64_AVX2_USE_ASM 1 18 | # else 19 | # define BASE64_AVX2_USE_ASM 0 20 | # endif 21 | #endif 22 | 23 | #include "dec_reshuffle.c" 24 | #include "dec_loop.c" 25 | 26 | #if BASE64_AVX2_USE_ASM 27 | # include "enc_loop_asm.c" 28 | #else 29 | # include "enc_translate.c" 30 | # include "enc_reshuffle.c" 31 | # include "enc_loop.c" 32 | #endif 33 | 34 | #endif // HAVE_AVX2 35 | 36 | BASE64_ENC_FUNCTION(avx2) 37 | { 38 | #if HAVE_AVX2 39 | #include "../generic/enc_head.c" 40 | enc_loop_avx2(&s, &slen, &o, &olen); 41 | #include "../generic/enc_tail.c" 42 | #else 43 | BASE64_ENC_STUB 44 | #endif 45 | } 46 | 47 | BASE64_DEC_FUNCTION(avx2) 48 | { 49 | #if HAVE_AVX2 50 | #include "../generic/dec_head.c" 51 | dec_loop_avx2(&s, &slen, &o, &olen); 52 | #include "../generic/dec_tail.c" 53 | #else 54 | BASE64_DEC_STUB 55 | #endif 56 | } 57 | -------------------------------------------------------------------------------- /base64/lib/arch/avx2/enc_translate.c: -------------------------------------------------------------------------------- 1 | static inline __m256i 2 | enc_translate (const __m256i in) 3 | { 4 | // A lookup table containing the absolute offsets for all ranges: 5 | const __m256i lut = _mm256_setr_epi8( 6 | 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0, 7 | 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); 8 | 9 | // Translate values 0..63 to the Base64 alphabet. There are five sets: 10 | // # From To Abs Index Characters 11 | // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 | // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz 13 | // 2 [52..61] [48..57] -4 [2..11] 0123456789 14 | // 3 [62] [43] -19 12 + 15 | // 4 [63] [47] -16 13 / 16 | 17 | // Create LUT indices from the input. The index for range #0 is right, 18 | // others are 1 less than expected: 19 | __m256i indices = _mm256_subs_epu8(in, _mm256_set1_epi8(51)); 20 | 21 | // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: 22 | const __m256i mask = _mm256_cmpgt_epi8(in, _mm256_set1_epi8(25)); 23 | 24 | // Subtract -1, so add 1 to indices for range #[1..4]. All indices are 25 | // now correct: 26 | indices = _mm256_sub_epi8(indices, mask); 27 | 28 | // Add offsets to input values: 29 | return _mm256_add_epi8(in, _mm256_shuffle_epi8(lut, indices)); 30 | } 31 | -------------------------------------------------------------------------------- /base64/lib/arch/avx512/codec-avx512.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "../../../include/libbase64.h" 6 | #include "../../tables/tables.h" 7 | #include "../../codecs.h" 8 | #include "../../config.h" 9 | #include "../../env.h" 10 | 11 | #if HAVE_AVX512 12 | #include 13 | 14 | #include "../avx2/dec_reshuffle.c" 15 | #include "../avx2/dec_loop.c" 16 | #include "enc_reshuffle_translate.c" 17 | #include "enc_loop.c" 18 | 19 | #endif // HAVE_AVX512 20 | 21 | BASE64_ENC_FUNCTION(avx512) 22 | { 23 | #if HAVE_AVX512 24 | #include "../generic/enc_head.c" 25 | enc_loop_avx512(&s, &slen, &o, &olen); 26 | #include "../generic/enc_tail.c" 27 | #else 28 | BASE64_ENC_STUB 29 | #endif 30 | } 31 | 32 | // Reuse AVX2 decoding. Not supporting AVX512 at present 33 | BASE64_DEC_FUNCTION(avx512) 34 | { 35 | #if HAVE_AVX512 36 | #include "../generic/dec_head.c" 37 | dec_loop_avx2(&s, &slen, &o, &olen); 38 | #include "../generic/dec_tail.c" 39 | #else 40 | BASE64_DEC_STUB 41 | #endif 42 | } 43 | -------------------------------------------------------------------------------- /base64/lib/arch/generic/codec-generic.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "../../../include/libbase64.h" 6 | #include "../../tables/tables.h" 7 | #include "../../codecs.h" 8 | #include "../../config.h" 9 | #include "../../env.h" 10 | 11 | #if BASE64_WORDSIZE == 32 12 | # include "32/enc_loop.c" 13 | #elif BASE64_WORDSIZE == 64 14 | # include "64/enc_loop.c" 15 | #endif 16 | 17 | #if BASE64_WORDSIZE >= 32 18 | # include "32/dec_loop.c" 19 | #endif 20 | 21 | BASE64_ENC_FUNCTION(plain) 22 | { 23 | #include "enc_head.c" 24 | #if BASE64_WORDSIZE == 32 25 | enc_loop_generic_32(&s, &slen, &o, &olen); 26 | #elif BASE64_WORDSIZE == 64 27 | enc_loop_generic_64(&s, &slen, &o, &olen); 28 | #endif 29 | #include "enc_tail.c" 30 | } 31 | 32 | BASE64_DEC_FUNCTION(plain) 33 | { 34 | #include "dec_head.c" 35 | #if BASE64_WORDSIZE >= 32 36 | dec_loop_generic_32(&s, &slen, &o, &olen); 37 | #endif 38 | #include "dec_tail.c" 39 | } 40 | -------------------------------------------------------------------------------- /base64/lib/arch/generic/dec_head.c: -------------------------------------------------------------------------------- 1 | int ret = 0; 2 | const uint8_t *s = (const uint8_t *) src; 3 | uint8_t *o = (uint8_t *) out; 4 | uint8_t q; 5 | 6 | // Use local temporaries to avoid cache thrashing: 7 | size_t olen = 0; 8 | size_t slen = srclen; 9 | struct base64_state st; 10 | st.eof = state->eof; 11 | st.bytes = state->bytes; 12 | st.carry = state->carry; 13 | 14 | // If we previously saw an EOF or an invalid character, bail out: 15 | if (st.eof) { 16 | *outlen = 0; 17 | ret = 0; 18 | // If there was a trailing '=' to check, check it: 19 | if (slen && (st.eof == BASE64_AEOF)) { 20 | state->bytes = 0; 21 | state->eof = BASE64_EOF; 22 | ret = ((base64_table_dec_8bit[*s++] == 254) && (slen == 1)) ? 1 : 0; 23 | } 24 | return ret; 25 | } 26 | 27 | // Turn four 6-bit numbers into three bytes: 28 | // out[0] = 11111122 29 | // out[1] = 22223333 30 | // out[2] = 33444444 31 | 32 | // Duff's device again: 33 | switch (st.bytes) 34 | { 35 | for (;;) 36 | { 37 | case 0: 38 | -------------------------------------------------------------------------------- /base64/lib/arch/generic/enc_head.c: -------------------------------------------------------------------------------- 1 | // Assume that *out is large enough to contain the output. 2 | // Theoretically it should be 4/3 the length of src. 3 | const uint8_t *s = (const uint8_t *) src; 4 | uint8_t *o = (uint8_t *) out; 5 | 6 | // Use local temporaries to avoid cache thrashing: 7 | size_t olen = 0; 8 | size_t slen = srclen; 9 | struct base64_state st; 10 | st.bytes = state->bytes; 11 | st.carry = state->carry; 12 | 13 | // Turn three bytes into four 6-bit numbers: 14 | // in[0] = 00111111 15 | // in[1] = 00112222 16 | // in[2] = 00222233 17 | // in[3] = 00333333 18 | 19 | // Duff's device, a for() loop inside a switch() statement. Legal! 20 | switch (st.bytes) 21 | { 22 | for (;;) 23 | { 24 | case 0: 25 | -------------------------------------------------------------------------------- /base64/lib/arch/generic/enc_tail.c: -------------------------------------------------------------------------------- 1 | if (slen-- == 0) { 2 | break; 3 | } 4 | *o++ = base64_table_enc_6bit[*s >> 2]; 5 | st.carry = (*s++ << 4) & 0x30; 6 | st.bytes++; 7 | olen += 1; 8 | 9 | // Deliberate fallthrough: 10 | BASE64_FALLTHROUGH 11 | 12 | case 1: if (slen-- == 0) { 13 | break; 14 | } 15 | *o++ = base64_table_enc_6bit[st.carry | (*s >> 4)]; 16 | st.carry = (*s++ << 2) & 0x3C; 17 | st.bytes++; 18 | olen += 1; 19 | 20 | // Deliberate fallthrough: 21 | BASE64_FALLTHROUGH 22 | 23 | case 2: if (slen-- == 0) { 24 | break; 25 | } 26 | *o++ = base64_table_enc_6bit[st.carry | (*s >> 6)]; 27 | *o++ = base64_table_enc_6bit[*s++ & 0x3F]; 28 | st.bytes = 0; 29 | olen += 2; 30 | } 31 | } 32 | state->bytes = st.bytes; 33 | state->carry = st.carry; 34 | *outlen = olen; 35 | -------------------------------------------------------------------------------- /base64/lib/arch/neon32/enc_reshuffle.c: -------------------------------------------------------------------------------- 1 | static inline uint8x16x4_t 2 | enc_reshuffle (uint8x16x3_t in) 3 | { 4 | uint8x16x4_t out; 5 | 6 | // Input: 7 | // in[0] = a7 a6 a5 a4 a3 a2 a1 a0 8 | // in[1] = b7 b6 b5 b4 b3 b2 b1 b0 9 | // in[2] = c7 c6 c5 c4 c3 c2 c1 c0 10 | 11 | // Output: 12 | // out[0] = 00 00 a7 a6 a5 a4 a3 a2 13 | // out[1] = 00 00 a1 a0 b7 b6 b5 b4 14 | // out[2] = 00 00 b3 b2 b1 b0 c7 c6 15 | // out[3] = 00 00 c5 c4 c3 c2 c1 c0 16 | 17 | // Move the input bits to where they need to be in the outputs. Except 18 | // for the first output, the high two bits are not cleared. 19 | out.val[0] = vshrq_n_u8(in.val[0], 2); 20 | out.val[1] = vshrq_n_u8(in.val[1], 4); 21 | out.val[2] = vshrq_n_u8(in.val[2], 6); 22 | out.val[1] = vsliq_n_u8(out.val[1], in.val[0], 4); 23 | out.val[2] = vsliq_n_u8(out.val[2], in.val[1], 2); 24 | 25 | // Clear the high two bits in the second, third and fourth output. 26 | out.val[1] = vandq_u8(out.val[1], vdupq_n_u8(0x3F)); 27 | out.val[2] = vandq_u8(out.val[2], vdupq_n_u8(0x3F)); 28 | out.val[3] = vandq_u8(in.val[2], vdupq_n_u8(0x3F)); 29 | 30 | return out; 31 | } 32 | -------------------------------------------------------------------------------- /base64/lib/arch/neon64/enc_reshuffle.c: -------------------------------------------------------------------------------- 1 | static inline uint8x16x4_t 2 | enc_reshuffle (const uint8x16x3_t in) 3 | { 4 | uint8x16x4_t out; 5 | 6 | // Input: 7 | // in[0] = a7 a6 a5 a4 a3 a2 a1 a0 8 | // in[1] = b7 b6 b5 b4 b3 b2 b1 b0 9 | // in[2] = c7 c6 c5 c4 c3 c2 c1 c0 10 | 11 | // Output: 12 | // out[0] = 00 00 a7 a6 a5 a4 a3 a2 13 | // out[1] = 00 00 a1 a0 b7 b6 b5 b4 14 | // out[2] = 00 00 b3 b2 b1 b0 c7 c6 15 | // out[3] = 00 00 c5 c4 c3 c2 c1 c0 16 | 17 | // Move the input bits to where they need to be in the outputs. Except 18 | // for the first output, the high two bits are not cleared. 19 | out.val[0] = vshrq_n_u8(in.val[0], 2); 20 | out.val[1] = vshrq_n_u8(in.val[1], 4); 21 | out.val[2] = vshrq_n_u8(in.val[2], 6); 22 | out.val[1] = vsliq_n_u8(out.val[1], in.val[0], 4); 23 | out.val[2] = vsliq_n_u8(out.val[2], in.val[1], 2); 24 | 25 | // Clear the high two bits in the second, third and fourth output. 26 | out.val[1] = vandq_u8(out.val[1], vdupq_n_u8(0x3F)); 27 | out.val[2] = vandq_u8(out.val[2], vdupq_n_u8(0x3F)); 28 | out.val[3] = vandq_u8(in.val[2], vdupq_n_u8(0x3F)); 29 | 30 | return out; 31 | } 32 | -------------------------------------------------------------------------------- /base64/lib/arch/ssse3/dec_reshuffle.c: -------------------------------------------------------------------------------- 1 | static inline __m128i 2 | dec_reshuffle (const __m128i in) 3 | { 4 | // in, bits, upper case are most significant bits, lower case are least significant bits 5 | // 00llllll 00kkkkLL 00jjKKKK 00JJJJJJ 6 | // 00iiiiii 00hhhhII 00ggHHHH 00GGGGGG 7 | // 00ffffff 00eeeeFF 00ddEEEE 00DDDDDD 8 | // 00cccccc 00bbbbCC 00aaBBBB 00AAAAAA 9 | 10 | const __m128i merge_ab_and_bc = _mm_maddubs_epi16(in, _mm_set1_epi32(0x01400140)); 11 | // 0000kkkk LLllllll 0000JJJJ JJjjKKKK 12 | // 0000hhhh IIiiiiii 0000GGGG GGggHHHH 13 | // 0000eeee FFffffff 0000DDDD DDddEEEE 14 | // 0000bbbb CCcccccc 0000AAAA AAaaBBBB 15 | 16 | const __m128i out = _mm_madd_epi16(merge_ab_and_bc, _mm_set1_epi32(0x00011000)); 17 | // 00000000 JJJJJJjj KKKKkkkk LLllllll 18 | // 00000000 GGGGGGgg HHHHhhhh IIiiiiii 19 | // 00000000 DDDDDDdd EEEEeeee FFffffff 20 | // 00000000 AAAAAAaa BBBBbbbb CCcccccc 21 | 22 | // Pack bytes together: 23 | return _mm_shuffle_epi8(out, _mm_setr_epi8( 24 | 2, 1, 0, 25 | 6, 5, 4, 26 | 10, 9, 8, 27 | 14, 13, 12, 28 | -1, -1, -1, -1)); 29 | // 00000000 00000000 00000000 00000000 30 | // LLllllll KKKKkkkk JJJJJJjj IIiiiiii 31 | // HHHHhhhh GGGGGGgg FFffffff EEEEeeee 32 | // DDDDDDdd CCcccccc BBBBbbbb AAAAAAaa 33 | } 34 | -------------------------------------------------------------------------------- /base64/lib/arch/ssse3/enc_translate.c: -------------------------------------------------------------------------------- 1 | static inline __m128i 2 | enc_translate (const __m128i in) 3 | { 4 | // A lookup table containing the absolute offsets for all ranges: 5 | const __m128i lut = _mm_setr_epi8( 6 | 65, 71, -4, -4, 7 | -4, -4, -4, -4, 8 | -4, -4, -4, -4, 9 | -19, -16, 0, 0 10 | ); 11 | 12 | // Translate values 0..63 to the Base64 alphabet. There are five sets: 13 | // # From To Abs Index Characters 14 | // 0 [0..25] [65..90] +65 0 ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 | // 1 [26..51] [97..122] +71 1 abcdefghijklmnopqrstuvwxyz 16 | // 2 [52..61] [48..57] -4 [2..11] 0123456789 17 | // 3 [62] [43] -19 12 + 18 | // 4 [63] [47] -16 13 / 19 | 20 | // Create LUT indices from the input. The index for range #0 is right, 21 | // others are 1 less than expected: 22 | __m128i indices = _mm_subs_epu8(in, _mm_set1_epi8(51)); 23 | 24 | // mask is 0xFF (-1) for range #[1..4] and 0x00 for range #0: 25 | __m128i mask = _mm_cmpgt_epi8(in, _mm_set1_epi8(25)); 26 | 27 | // Subtract -1, so add 1 to indices for range #[1..4]. All indices are 28 | // now correct: 29 | indices = _mm_sub_epi8(indices, mask); 30 | 31 | // Add offsets to input values: 32 | return _mm_add_epi8(in, _mm_shuffle_epi8(lut, indices)); 33 | } 34 | -------------------------------------------------------------------------------- /base64/lib/config.h: -------------------------------------------------------------------------------- 1 | // #define HAVE_AVX2 0 2 | // #define HAVE_NEON32 0 3 | // #define HAVE_NEON64 0 4 | // #define HAVE_SSSE3 0 5 | // #define HAVE_SSE41 0 6 | // #define HAVE_SSE42 0 7 | // #define HAVE_AVX 0 8 | -------------------------------------------------------------------------------- /base64/lib/tables/tables.h: -------------------------------------------------------------------------------- 1 | #ifndef BASE64_TABLES_H 2 | #define BASE64_TABLES_H 3 | 4 | #include 5 | 6 | #include "../env.h" 7 | 8 | // These tables are used by all codecs for fallback plain encoding/decoding: 9 | extern const uint8_t base64_table_enc_6bit[]; 10 | extern const uint8_t base64_table_dec_8bit[]; 11 | 12 | // These tables are used for the 32-bit and 64-bit generic decoders: 13 | #if BASE64_WORDSIZE >= 32 14 | extern const uint32_t base64_table_dec_32bit_d0[]; 15 | extern const uint32_t base64_table_dec_32bit_d1[]; 16 | extern const uint32_t base64_table_dec_32bit_d2[]; 17 | extern const uint32_t base64_table_dec_32bit_d3[]; 18 | 19 | // This table is used by the 32 and 64-bit generic encoders: 20 | extern const uint16_t base64_table_enc_12bit[]; 21 | #endif 22 | 23 | #endif // BASE64_TABLES_H 24 | -------------------------------------------------------------------------------- /dllsrc/jcedll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | JInit 3 | JDo 4 | JSM 5 | JFree 6 | Jga 7 | JGetLocale 8 | -------------------------------------------------------------------------------- /dllsrc/jdll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllGetClassObject PRIVATE 3 | DllCanUnloadNow PRIVATE 4 | DllRegisterServer PRIVATE 5 | DllUnregisterServer PRIVATE 6 | JBreak @6 7 | JClear @7 8 | JDo @8 9 | JErrorText @9 10 | JErrorTextM @10 11 | JFree @11 12 | JGet @12 13 | JGetM @13 14 | JInit @14 15 | JIsBusy @15 16 | JSet @16 17 | JSetM @17 18 | JSM @18 19 | JGetLocale @19 20 | Jga @20 21 | JTranspose @21 22 | JErrorTextB @22 23 | JGetB @23 24 | JSetB @24 25 | JDoR @25 26 | JGetA @26 27 | JSetA @27 28 | JInt64R @28 29 | JGetR @29 30 | JSMX @30 31 | JInit2 @31 32 | JInterrupt @32 33 | -------------------------------------------------------------------------------- /dllsrc/jdll.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/dllsrc/jdll.tlb -------------------------------------------------------------------------------- /dllsrc/jdll2.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | JBreak @6 3 | JDo @8 4 | JErrorTextM @10 5 | JFree @11 6 | JGetM @13 7 | JInit @14 8 | JIsBusy @15 9 | JSetM @17 10 | JSM @18 11 | JGetLocale @19 12 | Jga @20 13 | JGetA @26 14 | JSetA @27 15 | JGetR @29 16 | JSMX @30 17 | JInit2 @31 18 | JInterrupt @32 19 | 20 | -------------------------------------------------------------------------------- /dllsrc/jdll3.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | JBreak @6 3 | JClear @7 4 | JDo @8 5 | JErrorText @9 6 | JErrorTextM @10 7 | JFree @11 8 | JGet @12 9 | JGetM @13 10 | JInit @14 11 | JIsBusy @15 12 | JSet @16 13 | JSetM @17 14 | JSM @18 15 | JGetLocale @19 16 | Jga @20 17 | JTranspose @21 18 | JErrorTextB @22 19 | JGetB @23 20 | JSetB @24 21 | JDoR @25 22 | JGetA @26 23 | JSetA @27 24 | JInt64R @28 25 | JGetR @29 26 | JSMX @30 27 | JInit2 @31 28 | JInterrupt @32 29 | -------------------------------------------------------------------------------- /dllsrc/jdll_original.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/dllsrc/jdll_original.tlb -------------------------------------------------------------------------------- /dllsrc/jdll_rebuilt_from_old_source.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/dllsrc/jdll_rebuilt_from_old_source.tlb -------------------------------------------------------------------------------- /hostdefs/Hostdefs-nopie.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := hostdefs-nopie 7 | 8 | LOCAL_LDLIBS := -ldl 9 | 10 | ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 11 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=armv8-a 12 | LOCAL_ARM_NEON := true 13 | endif 14 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 15 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfpv3-d16 -march=armv7-a 16 | LOCAL_ARM_MODE := arm 17 | endif 18 | ifeq ($(TARGET_ARCH_ABI),armeabi) 19 | LOCAL_CFLAGS := -fPIC -Os -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfp -march=armv5te 20 | LOCAL_ARM_MODE := arm 21 | endif 22 | ifeq ($(TARGET_ARCH),x86_64) 23 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector 24 | endif 25 | ifeq ($(TARGET_ARCH),x86) 26 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=i686 -mssse3 -mfpmath=sse -fno-stack-protector 27 | endif 28 | 29 | LOCAL_SRC_FILES := hostdefs.c 30 | 31 | include $(BUILD_EXECUTABLE) 32 | 33 | -------------------------------------------------------------------------------- /hostdefs/Hostdefs.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := hostdefs 7 | 8 | LOCAL_LDLIBS := -ldl 9 | 10 | ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 11 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=armv8-a 12 | LOCAL_ARM_NEON := true 13 | endif 14 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 15 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfpv3-d16 -march=armv7-a 16 | LOCAL_ARM_MODE := arm 17 | endif 18 | ifeq ($(TARGET_ARCH_ABI),armeabi) 19 | LOCAL_CFLAGS := -fPIC -Os -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfp -march=armv5te 20 | LOCAL_ARM_MODE := arm 21 | endif 22 | ifeq ($(TARGET_ARCH),x86_64) 23 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -msse4.2 -mpopcnt -fno-stack-protector 24 | endif 25 | ifeq ($(TARGET_ARCH),x86) 26 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -mssse3 -mfpmath=sse -fno-stack-protector 27 | endif 28 | 29 | LOCAL_CFLAGS += -fPIE 30 | LOCAL_LDFLAGS += -fPIE -pie 31 | 32 | LOCAL_SRC_FILES := hostdefs.c 33 | 34 | include $(BUILD_EXECUTABLE) 35 | 36 | -------------------------------------------------------------------------------- /hostdefs/hostdefs_win32.ijs: -------------------------------------------------------------------------------- 1 | NB. do not edit -- created by sym2ijs 2 | 3 | cocurrent <'jdefs' 4 | 5 | F_OK=:0 6 | R_OK=:4 7 | W_OK=:2 8 | X_OK=:1 9 | SEEK_CUR=: 1 10 | SEEK_END=: 2 11 | SEEK_SET=: 0 12 | 13 | O_APPEND=: 8 14 | O_CREAT=: 256 15 | O_EXCL=: 1024 16 | O_RDONLY=: 0 17 | O_RDWR=: 2 18 | O_TRUNC=: 512 19 | O_WRONLY=: 1 20 | 21 | 22 | REG_EXTENDED=: 1 23 | REG_ICASE=: 2 24 | REG_NOSUB=: 8 25 | REG_NEWLINE=: 4 26 | 27 | regex_t_sz=: 280 28 | re_nsub_off=: 8 29 | re_nsub_sz=: 4 30 | regmatch_t_sz=: 12 31 | rm_so_off=: 0 32 | rm_so_sz=: 4 33 | rm_eo_off=: 4 34 | rm_eo_sz=: 4 35 | 36 | 37 | FD_SETSIZE=: 64 38 | timeval_sz=: 8 39 | tv_sec_off=: 0 40 | tv_sec_sz=: 4 41 | tv_usec_off=: 4 42 | tv_usec_sz=: 4 43 | 44 | E2BIG=: 7 45 | EFAULT=: 14 46 | ENFILE=: 23 47 | ENOTTY=: 25 48 | EACCES=: 13 49 | EFBIG=: 27 50 | ENODEV=: 19 51 | ENXIO=: 6 52 | EAGAIN=: 11 53 | ENOENT=: 2 54 | EPERM=: 1 55 | EBADF=: 9 56 | EINTR=: 4 57 | ENOEXEC=: 8 58 | EPIPE=: 32 59 | EINVAL=: 22 60 | ENOLCK=: 39 61 | ERANGE=: 34 62 | EBUSY=: 16 63 | EIO=: 5 64 | ENOMEM=: 12 65 | EROFS=: 30 66 | EISDIR=: 21 67 | ENOSPC=: 28 68 | ESPIPE=: 29 69 | ECHILD=: 10 70 | EMFILE=: 24 71 | ENOSYS=: 40 72 | ESRCH=: 3 73 | EDEADLK=: 36 74 | EMLINK=: 31 75 | ENOTDIR=: 20 76 | EDOM=: 33 77 | ENOTEMPTY=: 41 78 | EXDEV=: 18 79 | EEXIST=: 17 80 | ENAMETOOLONG=: 38 81 | 82 | -------------------------------------------------------------------------------- /hostdefs/makefile: -------------------------------------------------------------------------------- 1 | ifeq (ARM64,$(TARGET_CPU)) 2 | CFLAGS= -target arm64-pc-windows-msvc -Wno-format /W1 /MT 3 | FLAGS= /MACHINE:ARM64 /SUBSYSTEM:CONSOLE,5.02 4 | else ifeq (x64,$(TARGET_CPU)) 5 | CFLAGS= /W1 /MT 6 | FLAGS= /MACHINE:X64 /SUBSYSTEM:CONSOLE,5.02 7 | else 8 | CFLAGS= -m32 /W1 /MT 9 | FLAGS= /MACHINE:X86 /SUBSYSTEM:CONSOLE,5.01 10 | endif 11 | 12 | .SUFFIXES: .o 13 | 14 | OBJS= hostdefs.o 15 | 16 | ifndef LD 17 | LD=lld-link 18 | endif 19 | 20 | %.o: %.c 21 | $(CC) $(CFLAGS) /Fo$@ /c $< 22 | 23 | ifeq (ARM64,$(TARGET_CPU)) 24 | TARGET= hostdefs-arm64.exe 25 | else ifeq (x64,$(TARGET_CPU)) 26 | TARGET= hostdefs.exe 27 | else 28 | TARGET= hostdefs32.exe 29 | endif 30 | 31 | $(TARGET) : $(OBJS) 32 | $(LD) /NOLOGO $(FLAGS) /out:$@ $(OBJS) 33 | 34 | all: $(TARGET) 35 | 36 | noclean: 37 | # 38 | 39 | clean: 40 | rm -f *.res *.ilk *.pdb $(OBJS) 41 | 42 | .PHONY: all clean noclean 43 | -------------------------------------------------------------------------------- /jlibrary/addons/data/jfiles/history.txt: -------------------------------------------------------------------------------- 1 | data/jfiles - change history 2 | 3 | == 1.0.0/1 == 4 | * moved to addons 5 | 6 | == 1.0.2 == 7 | * j801 8 | -------------------------------------------------------------------------------- /jlibrary/addons/data/jfiles/jfiles.txt: -------------------------------------------------------------------------------- 1 | jfiles.ijs 2 | 3 | ========== 4 | 5 | This script contains definitions for the J component file system. 6 | 7 | 8 | 9 | main functions: 10 | 11 | jcreate jcreate 'dat' 12 | 13 | jappend ( i.20) fwrite G 9 | JINT map_jmf_ 'rst';G 10 | smoutput rst 11 | -------------------------------------------------------------------------------- /jlibrary/addons/dev/lu/lu.ijs: -------------------------------------------------------------------------------- 1 | NB. LU decomposition with permutation 2 | NB. y is square matrix 3 | NB. result is (permutation);(LU in Doolittle form) 4 | NB. L and U are mashed together with the principal diagonal of L (which is all 1) omitted 5 | Lu_j_=: 3 : 0 6 | d =. _1 x: #y NB. dimension of array, as integer 7 | pv =. i. d NB. initialize permutation array to index vector 8 | remvec =. i. d NB. vector to fetch from i to end of vector 9 | for_i. i. d do. NB. for each ring 10 | col =. (./) | col NB. find index of largest absolute value; save the value as pivot 12 | NB. swap the permutation array, and swap the rows of the matrix, and the values read for current column 13 | col =. ((0,pivotx){col) (0,~pivotx)} col 14 | y =. ((i,i+pivotx){y) (i,~i+pivotx)} y 15 | pv =. ((i,i+pivotx){pv) (i,~i+pivotx)} pv 16 | col =. (}. col) * %pivot NB. divide the current column by the pivot 17 | remvec =. }. remvec NB. shorten the fetch vectors by 1 from the front 18 | y =. col (. 10 | -------------------------------------------------------------------------------- /jlibrary/tools/ftp/wget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/jlibrary/tools/ftp/wget.exe -------------------------------------------------------------------------------- /jlibrary/tools/regex/jpcre2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/jlibrary/tools/regex/jpcre2.dll -------------------------------------------------------------------------------- /jlibrary/tools/regex/libjpcre2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/jlibrary/tools/regex/libjpcre2.dylib -------------------------------------------------------------------------------- /jlibrary/tools/regex/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/jlibrary/tools/regex/libjpcre2.so -------------------------------------------------------------------------------- /jlibrary/tools/regex/libjpcre2_32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/jlibrary/tools/regex/libjpcre2_32.so -------------------------------------------------------------------------------- /jlibrary/tools/regex/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | This directory is for the jpcre2 binaries. 3 | -------------------------------------------------------------------------------- /jsrc/Tsdll.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := tsdll 7 | LOCAL_MODULE_FILENAME := libtsdll 8 | 9 | ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 10 | LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=armv8-a 11 | LOCAL_ARM_NEON := true 12 | endif 13 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 14 | LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfpv3-d16 -march=armv7-a 15 | LOCAL_ARM_MODE := arm 16 | endif 17 | ifeq ($(TARGET_ARCH_ABI),armeabi) 18 | LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -march=armv5te 19 | LOCAL_ARM_MODE := thumb 20 | endif 21 | ifeq ($(TARGET_ARCH),x86_64) 22 | LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector 23 | endif 24 | ifeq ($(TARGET_ARCH),x86) 25 | LOCAL_CFLAGS := -fPIC -Os -fvisibility=hidden -fwrapv -Werror -fno-strict-aliasing -march=i686 -mssse3 -mfpmath=sse -fno-stack-protector 26 | endif 27 | 28 | LOCAL_SRC_FILES := tsdll.c 29 | LOCAL_LDLIBS := -lm 30 | LOCAL_LDFLAGS += -Wl,-z,noexecstack 31 | 32 | include $(BUILD_SHARED_LIBRARY) 33 | -------------------------------------------------------------------------------- /jsrc/codingrules.txt: -------------------------------------------------------------------------------- 1 | When a function encounters an error, it should call jsignal(errorcode) and then return 0. jsignal will calculate the error line for display; the line will be displayed later. 2 | The normal way to call jsignal is with ASSERT(), which calls jsignal and then returns 0. If you have cleanup to do that prevents an immediate return, you may have to call jsignal yourself. 3 | Whenever you call a function, you should check for a 0 return value and close down if you get one. It is good practice to start each function with RZ(w) or RZ(a&&w) to return fast if an input is in error. 4 | -------------------------------------------------------------------------------- /jsrc/crc32c.h: -------------------------------------------------------------------------------- 1 | #ifndef CRC32C_H 2 | #define CRC32C_H 3 | 4 | #include 5 | 6 | #if defined(_WIN64)||defined(__LP64__) 7 | extern uint64_t crc32csb8(uint64_t crc, uint64_t value); 8 | #else 9 | extern uint32_t crc32csb8(uint32_t crc, uint64_t value); 10 | #endif 11 | extern uint32_t crc32csb4(uint32_t crc, uint32_t value); 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /jsrc/dtoa.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* The author of this software is David M. Gay. */ 5 | /* Jsoftware Copyright applies only to changes made by Jsoftware */ 6 | 7 | #include 8 | 9 | #if SYS & SYS_MACOSX 10 | /* Use the non-signal restoring pair */ 11 | #define setjmp _setjmp 12 | #define longjmp _longjmp 13 | #endif 14 | 15 | #ifndef HAVE_BIGINT 16 | struct dtoa_info { 17 | jmp_buf _env; 18 | }; 19 | #else 20 | struct dtoa_info { 21 | jmp_buf _env; 22 | Bigint *_p5s; 23 | double *_pmem_next; 24 | double _private_mem[PRIVATE_mem]; 25 | Bigint *_freelist[Kmax+1]; 26 | void *jt; 27 | int ndp; 28 | char *result; 29 | }; 30 | #endif 31 | -------------------------------------------------------------------------------- /jsrc/jeload.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* utilities for JFE to load JE, initiallize, and run profile sentence */ 5 | 6 | void jepath(char*,char *); 7 | void jesetpath(char*); 8 | void* jeload(void* callbacks); // returns J 9 | int jefirst(int,char*); 10 | A jegeta(int,char*); 11 | I jeseta(I n,char* name,I x,char* d); 12 | int jedo(char*); 13 | void jeinterrupt(); 14 | void jefree(); 15 | char* jegetlocale(); 16 | void jefail(char*); 17 | void* jega(I t, I n, I r, I*s); // returns A 18 | void* jehjdll(); 19 | -------------------------------------------------------------------------------- /jsrc/jr0.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* R0 and ASSERT (used twice in vq.c) */ 5 | 6 | #ifndef FAIL 7 | #define FAIL 0 8 | #endif 9 | 10 | 11 | #undef R0 12 | 13 | #if FINDNULLRET // When we return 0, we should always have an error code set. trap if not 14 | #define R0 {if(!jt->jerr)SEGFAULT; R FAIL;} 15 | #else 16 | #define R0 R FAIL; 17 | #endif 18 | 19 | #undef ASSERT 20 | 21 | #ifndef _ASSERT 22 | #define ASSERT(b,e) {if(unlikely(!(b))){jsignal(e); R0;}} 23 | #else 24 | // version for debugging 25 | #define ASSERT(b,e) {if(unlikely(!(b))){fprintf(stderr,"error code: %i : file %s line %d\n",(int)(e),__FILE__,__LINE__); jsignal(e); R0;}} 26 | // #define ASSERT(b,e) {if(unlikely(!(b))){if(!(jt->emsgstate&EMSGSTATETRAPPING)){char ermsg[2000];sprintf(ermsg,"error code: %i : file %s line %d\n",(int)(e),__FILE__,__LINE__);fprintf(stderr,"%s",ermsg);jsto(jt,MTYOER,ermsg);jsignal(e);}R0;}} 27 | #endif 28 | -------------------------------------------------------------------------------- /jsrc/jversion-x.h: -------------------------------------------------------------------------------- 1 | #include "../version.txt" 2 | #ifdef _WIN32 3 | #define jplatform "windows" // windows/linux/darwin/raspberry/android/... 4 | #elif defined(RASPI) 5 | #define jplatform "raspberry" 6 | #elif defined(ANDROID) 7 | #define jplatform "android" 8 | #elif defined(__APPLE__) 9 | #define jplatform "darwin" 10 | #elif defined(__linux__) 11 | #define jplatform "linux" 12 | #elif defined(__FreeBSD__) 13 | #define jplatform "freebsd" 14 | #elif defined(__OpenBSD__) 15 | #define jplatform "openbsd" 16 | #elif defined(__wasm__) 17 | #define jplatform "wasm" 18 | #else 19 | #define jplatform "unknown" 20 | #endif 21 | #define jlicense "GPL3" 22 | #define jbuilder "unknown" // website or email 23 | -------------------------------------------------------------------------------- /jsrc/mbx.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Memory-Mapped Boxed Arrays */ 5 | 6 | // not supported -------------------------------------------------------------------------------- /jsrc/openssl/sha/README.txt: -------------------------------------------------------------------------------- 1 | Common usage pattern is to invoke script and pass "flavour" and output 2 | file name as command line arguments. "Flavour" refers to ABI family or 3 | specfic OS. E.g. x86_64 scripts recognize 'elf', 'elf32', 'macosx', 4 | 'mingw64', 'nasm'. PPC scripts recognize 'linux32', 'linux64', 5 | 'linux64le', 'aix32', 'aix64', 'osx32', 'osx64'. And so on... Some 6 | x86_64 scripts even examine CC environment variable in order to 7 | determine if AVX code path should be generated. ["AVX" refers to *all* 8 | AVX versions.] 9 | 10 | clone repos 11 | https://github.com/openssl/openssl.git 12 | 13 | run sha-asm.sh in the crypto/sha/asm folder there 14 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/asm/md5-asm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | perl md5-x86_64.pl elf md5-x86_64-elf.S 4 | perl md5-x86_64.pl macosx md5-x86_64-macho.S 5 | perl md5-x86_64.pl masm md5-x86_64-masm.asm 6 | perl md5-x86_64.pl nasm md5-x86_64-nasm.asm 7 | 8 | perl md5-aarch64.pl elf md5-aarch64-elf.S 9 | perl md5-aarch64.pl ios64 md5-aarch64-ios.S 10 | 11 | perl md5-586.pl elf md5-586-elf.S 12 | perl md5-586.pl android md5-586-android.S 13 | perl md5-586.pl macosx md5-586-macho.S 14 | perl md5-586.pl win32 md5-586-masm.asm 15 | perl md5-586.pl win32n md5-586-nasm.asm 16 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/asm/nasm-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | yasm -f win64 -p nasm -o keccak1600-x86_64-nasm.o keccak1600-x86_64-nasm.asm 4 | yasm -f win64 -p nasm -o md5-x86_64-nasm.o md5-x86_64-nasm.asm 5 | yasm -f win64 -p nasm -o sha1-x86_64-nasm.o sha1-x86_64-nasm.asm 6 | yasm -f win64 -p nasm -o sha256-x86_64-nasm.o sha256-x86_64-nasm.asm 7 | yasm -f win64 -p nasm -o sha512-x86_64-nasm.o sha512-x86_64-nasm.asm 8 | 9 | yasm -f win32 -p nasm -o keccak1600-mmx-nasm.o keccak1600-mmx-nasm.asm 10 | yasm -f win32 -p nasm -o md5-586-nasm.o md5-586-nasm.asm 11 | yasm -f win32 -p nasm -o sha1-586-nasm.o sha1-586-nasm.asm 12 | yasm -f win32 -p nasm -o sha256-586-nasm.o sha256-586-nasm.asm 13 | yasm -f win32 -p nasm -o sha512-586-nasm.o sha512-586-nasm.asm 14 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/md4_one.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | #include 12 | #include "openssl.h" 13 | #include "md4.h" 14 | 15 | #ifdef CHARSET_EBCDIC 16 | # include 17 | #endif 18 | 19 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md) 20 | { 21 | MD4_CTX c; 22 | static unsigned char m[MD4_DIGEST_LENGTH]; 23 | 24 | if (md == NULL) 25 | md = m; 26 | if (!MD4_Init(&c)) 27 | return NULL; 28 | #ifndef CHARSET_EBCDIC 29 | MD4_Update(&c, d, n); 30 | #else 31 | { 32 | char temp[1024]; 33 | unsigned long chunk; 34 | 35 | while (n > 0) { 36 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; 37 | ebcdic2ascii(temp, d, chunk); 38 | MD4_Update(&c, temp, chunk); 39 | n -= chunk; 40 | d += chunk; 41 | } 42 | } 43 | #endif 44 | MD4_Final(md, &c); 45 | OPENSSL_cleanse(&c, sizeof(c)); /* security consideration */ 46 | return md; 47 | } 48 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/md5_one.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | #include 12 | #include "openssl.h" 13 | #include "md5.h" 14 | 15 | #ifdef CHARSET_EBCDIC 16 | # include 17 | #endif 18 | 19 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md) 20 | { 21 | MD5_CTX c; 22 | static unsigned char m[MD5_DIGEST_LENGTH]; 23 | 24 | if (md == NULL) 25 | md = m; 26 | if (!MD5_Init(&c)) 27 | return NULL; 28 | #ifndef CHARSET_EBCDIC 29 | MD5_Update(&c, d, n); 30 | #else 31 | { 32 | char temp[1024]; 33 | unsigned long chunk; 34 | 35 | while (n > 0) { 36 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; 37 | ebcdic2ascii(temp, d, chunk); 38 | MD5_Update(&c, temp, chunk); 39 | n -= chunk; 40 | d += chunk; 41 | } 42 | } 43 | #endif 44 | MD5_Final(md, &c); 45 | OPENSSL_cleanse(&c, sizeof(c)); /* security consideration */ 46 | return md; 47 | } 48 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/openssl-util.c: -------------------------------------------------------------------------------- 1 | #if _WIN32 2 | #include 3 | #endif 4 | #include 5 | #include "openssl.h" 6 | 7 | void OPENSSL_cleanse(void *ptr, size_t len) { 8 | #if defined(_WIN32) 9 | SecureZeroMemory(ptr, len); 10 | #else 11 | memset(ptr, 0, len); 12 | #endif 13 | } 14 | 15 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/openssl.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef NO_SHA_ASM 4 | 5 | #if defined(__aarch64__)||defined(_M_ARM64) 6 | #define SHA1_ASM 7 | #define SHA256_ASM 8 | #define SHA512_ASM 9 | #define KECCAK1600_ASM 10 | #define SELFTEST 11 | #define MD5_ASM 12 | #elif defined(__aarch32__)||defined(__arm__)||defined(_M_ARM) 13 | #define SHA1_ASM 14 | #define SHA256_ASM 15 | #define SHA512_ASM 16 | #define KECCAK1600_ASM 17 | #define SELFTEST 18 | // #define MD5_ASM 19 | #elif defined(__x86_64__)||defined(_M_X64) 20 | #define SHA1_ASM 21 | #define SHA256_ASM 22 | #define SHA512_ASM 23 | #define KECCAK1600_ASM 24 | #define SELFTEST 25 | #define MD5_ASM 26 | #elif defined(__i386__)||defined(_M_IX86) 27 | #define SHA1_ASM 28 | #define SHA256_ASM 29 | #define SHA512_ASM 30 | #define KECCAK1600_ASM 31 | #define SELFTEST 32 | #define MD5_ASM 33 | #endif 34 | 35 | #endif 36 | 37 | extern void OPENSSL_cleanse(void *ptr, size_t len); 38 | -------------------------------------------------------------------------------- /jsrc/openssl/sha/sha1_one.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | #include 12 | #include "openssl.h" 13 | #include "sha.h" 14 | #include "sha_locl.h" 15 | 16 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) 17 | { 18 | SHA_CTX c; 19 | static unsigned char m[SHA_DIGEST_LENGTH]; 20 | 21 | if (md == NULL) 22 | md = m; 23 | if (!SHA1_Init(&c)) 24 | return NULL; 25 | SHA1_Update(&c, d, n); 26 | SHA1_Final(md, &c); 27 | OPENSSL_cleanse(&c, sizeof(c)); 28 | return md; 29 | } 30 | -------------------------------------------------------------------------------- /jsrc/tags.txt: -------------------------------------------------------------------------------- 1 | j901-release-b 2 | j901-release-c 3 | j901-release-d 4 | j901-release-e 5 | j901-release-e-1 6 | j902-beta-a 7 | j902-beta-f 8 | j902-release-a 9 | j903-beta-b+ 10 | j903-beta-d 11 | j903-beta-e 12 | j903-beta-f 13 | j903-beta-g 14 | j903-beta-h 15 | j903-beta-i 16 | j903-beta-j 17 | j903-beta-j1 18 | j903-beta-k 19 | j903-beta-l 20 | j904-beta-i 21 | -------------------------------------------------------------------------------- /jsrc/thread.h: -------------------------------------------------------------------------------- 1 | #if defined(__APPLE__) 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | // These two functions are declared in mach/thread_policy.h, but are commented out. 9 | #if 0 10 | kern_return_t thread_policy_set( 11 | thread_t thread, 12 | thread_policy_flavor_t flavor, 13 | thread_policy_t policy_info, 14 | mach_msg_type_number_t count); 15 | 16 | kern_return_t thread_policy_get( 17 | thread_t thread, 18 | thread_policy_flavor_t flavor, 19 | thread_policy_t policy_info, 20 | mach_msg_type_number_t *count, 21 | boolean_t *get_default); 22 | #endif 23 | 24 | #define CPU_SETSIZE 64 25 | 26 | typedef struct cpu_set { 27 | uint64_t count; 28 | } cpu_set_t; 29 | 30 | static inline void CPU_ZERO(cpu_set_t *cs) { cs->count = 0; } 31 | 32 | static inline void CPU_SET(int num, cpu_set_t *cs) { cs->count |= (1 << num); } 33 | 34 | static inline int CPU_ISSET(int num, cpu_set_t *cs) { return (cs->count & (1 << num)); } 35 | 36 | int pthread_getaffinity_np(pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set); 37 | int pthread_setaffinity_np(pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /jsrc/va1ss.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | // Verbs: Atomic (Scalar) Monadic when arguments have one atom 5 | 6 | #include "j.h" 7 | #include "ve.h" 8 | #include "vcomp.h" 9 | 10 | 11 | -------------------------------------------------------------------------------- /jsrc/va2ss.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | // Verbs: Atomic (Scalar) Dyadic when arguments have one atom 5 | // Support for Speedy Singletons inlined into va2 6 | 7 | 8 | -------------------------------------------------------------------------------- /jsrc/vamultsp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: "Multiplication" on Sparse Arrays */ 5 | 6 | #include "j.h" 7 | #include "ve.h" 8 | 9 | 10 | B jtspmult(J jt,A*z,A a,A w,C id,I af,I acr,I wf,I wcr){ 11 | R 0; 12 | } /* scalar dyadic fns with one or both arguments sparse */ 13 | -------------------------------------------------------------------------------- /jsrc/vasm.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Assembly Routines for Integer + * - with Overflow */ 5 | 6 | /* C routines for platforms without asm support */ 7 | -------------------------------------------------------------------------------- /jsrc/vbit.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Bit Type */ 5 | 6 | -------------------------------------------------------------------------------- /jsrc/vcatsp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: ,. on Sparse Arguments of rank 2 or less */ 5 | 6 | #include "j.h" 7 | 8 | 9 | DF2(jtstitchsp2){F12IP;I ar,wr; 10 | ARGCHK2(a,w); 11 | ar=AR(a); wr=AR(w); 12 | R irs2(a,w,self,ar?ar-1:0,wr?wr-1:0,jtover); 13 | } /* sparse arrays with rank 2 or less */ 14 | -------------------------------------------------------------------------------- /jsrc/vdx.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Extended Precision Floating Point */ 5 | // not yet implemented 6 | -------------------------------------------------------------------------------- /jsrc/vdx.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Extended Precision Floating Point */ 5 | 6 | -------------------------------------------------------------------------------- /jsrc/vfft.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Fast Fourier Transform and Friends */ 5 | // not implemented -------------------------------------------------------------------------------- /jsrc/viavx1-2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Index-of */ 5 | 6 | #include "j.h" 7 | #if C_CRC32C && SY_64 8 | #define suff 9 | #define TH US 10 | #include "viavx1.h" 11 | #endif 12 | -------------------------------------------------------------------------------- /jsrc/viavx1-4.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Verbs: Index-of */ 5 | 6 | #include "j.h" 7 | #if C_CRC32C && SY_64 8 | #define suff 2 9 | #define TH UI4 10 | #include "viavx1.h" 11 | #endif 12 | -------------------------------------------------------------------------------- /jsrc/vq.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Rational Numbers */ 5 | 6 | 7 | #define QF1(f) Q f(J jt, Q w) 8 | #define QF2(f) Q f(J jt,Q a,Q w) 9 | #define QASSERT(b,e) {if(!(b)){jsignal(e); R Q0;}} 10 | #define QEPILOG(q) {Q z9; z9=(qstd(q)); if(!gc3(&z9.n,&z9.d,0L,_ttop))R Q0; R z9;} 11 | #define QRE(exp) {if((exp),jt->jerr)R Q0;} 12 | #define QRZ(exp) {if(!(exp)) R Q0;} 13 | 14 | #define QEQ(x,y) (equx((x).n,(y).n)&&equx((x).d,(y).d)) 15 | #define QCOMP(x,y) ({Q Qx= x, Qy= y; ISQinf(Qx) ?(ISQinf(Qy) ?XSGN(Qx.n)-XSGN(Qy.n) :QSGN(Qx)) :ISQinf(Qy) ?-QSGN(Qy) :icmpQQ(Qx,Qy);}) 16 | #define QLT(x,y) (0> QCOMP(x,y)) 17 | #define QLE(x,y) (0>=QCOMP(x,y)) 18 | #define QGT(x,y) (0< QCOMP(x,y)) 19 | #define QGE(x,y) (0<=QCOMP(x,y)) 20 | #define QMAX(x,y) (QGE(x,y)?x:y) 21 | #define QMIN(x,y) (QLE(x,y)?x:y) 22 | 23 | extern QF1(jtqstd); 24 | 25 | extern QF2(jtqdiv); 26 | extern QF2(jtqminus); 27 | extern QF2(jtqplus); 28 | extern QF2(jtqtymes); 29 | extern B jtqquad(J jt,E *z,Q w); 30 | -------------------------------------------------------------------------------- /jsrc/x.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Xenos: Macros and Defined Constants for !: */ 5 | 6 | 7 | 8 | /* adding suffix _O to avoid possible name conflict with fcntl.h */ 9 | #define FAPPEND_O "ab" 10 | #define FREAD_O "rb" 11 | #define FUPDATE_O "r+b" 12 | #define FUPDATEC_O "w+b" 13 | #define FWRITE_O "wb" 14 | 15 | #define FLAPPEND_O L"ab" 16 | #define FLREAD_O L"rb" 17 | #define FLUPDATE_O L"r+b" 18 | #define FLUPDATEC_O L"w+b" 19 | #define FLWRITE_O L"wb" 20 | 21 | #ifndef SEEK_SET 22 | #define SEEK_SET 0 23 | #endif 24 | #ifndef SEEK_CUR 25 | #define SEEK_CUR 1 26 | #endif 27 | #ifndef SEEK_END 28 | #define SEEK_END 2 29 | #endif 30 | 31 | #ifdef L_tmpnam 32 | #undef L_tmpnam 33 | #endif 34 | #define L_tmpnam 300 /* full path name can be very long */ 35 | 36 | #if SY_WINCE 37 | #define _wmkdir(x) (!CreateDirectory (x,0)) 38 | #define _wrmdir(x) (!RemoveDirectory (x)) 39 | #define _wunlink(x) (!DeleteFile (x)) 40 | 41 | wchar_t *tounibuf(char * src); 42 | char *toascbuf(wchar_t *src); 43 | #endif 44 | -------------------------------------------------------------------------------- /jsrc/xc.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Xenos: Custom */ 5 | 6 | #include "j.h" 7 | 8 | 9 | F2(jtforeignextra){F12IP; 10 | ARGCHK2(a,w); 11 | R CDERIV(CIBEAM, 0,0, VFLAGNONE,RMAX,RMAX,RMAX); 12 | } 13 | 14 | // create explicit equivalent of verb w 15 | // a is flags to handle lower recursions: 16 | // 0 to begin with 17 | // 1, 2, or 3 to indicate that a piece of the original input has been processed, and any $: found in a name must 18 | // be replaced by an explicit equivalent with the indicated valence(s) 19 | F2(jtfixrecursive){F12IP;A z; 20 | ARGCHK2(a,w); 21 | df1(z,w,eval("1 : 'u y\n:\nx u y'")); 22 | R z; 23 | } 24 | -------------------------------------------------------------------------------- /jsrc/xc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Xenos: Custom */ 5 | 6 | 7 | static DF2(jtcblas_dgemm); 8 | static DF2(jtcblas_dscal); 9 | static DF1(jtdgeev); 10 | static DF1(jtdgeqrf); 11 | static DF2(jtdmultmatmat_32x32); 12 | static DF2(jtmatadd); 13 | static DF2(jtseqex); 14 | static DF2(jtseqpow); 15 | static DF2(jtx102d0); 16 | static DF2(jtx102d1); 17 | static DF1(jtx103d0); 18 | static F1(jtwex); 19 | static F2(jttiebox); 20 | static F1(jtbg); 21 | static F1(jtgb); 22 | static DF1(jttconj); 23 | static DF2(jtoa); 24 | 25 | #define bg(x) jtbg(jt, (x)) 26 | #define consfn(x) jtconsfn(jt,(x)) 27 | #define gb(x) jtgb(jt, (x)) 28 | #define oa(x) jtoa(jt,(x)) 29 | #define seqdo(x0,x1,x2,x3,x4) jtseqdo(jt,(x0),(x1),(x2),(x3),(x4)) 30 | #define seqlim(x,y,z) jtseqlim(jt,(x),(y),(z)) 31 | #define tconj(x) jttconj(jt, (x)) 32 | #define tiebox(x,y) jttiebox(jt,(x),(y)) 33 | #define wex(x) jtwex(jt,(x)) 34 | -------------------------------------------------------------------------------- /jsrc/xi.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1990-2025, Jsoftware Inc. All rights reserved. */ 2 | /* Licensed use only. Any other use is in violation of copyright. */ 3 | /* */ 4 | /* Xenos: Implementation Internals */ 5 | 6 | #include "j.h" 7 | #include "x.h" 8 | 9 | F1(jthash){F12IP;RZ(w=vs(w)); R sc(hic(AN(w),UAV(w)));} 10 | -------------------------------------------------------------------------------- /libedit/libedit.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/libedit/libedit.a -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | 2 | ********************************************************************* 3 | 4 | J SOURCE is all files in the distributed jsource folder. 5 | 6 | J SOURCE is Copyright 1990-2025, Jsoftware Inc. All rights reserved. 7 | 8 | J SOURCE can be used under a commercial license from Jsoftware, 9 | in which case the terms and conditions of that license apply. 10 | 11 | OR 12 | 13 | J Source can be used under GNU General Public License version 3, 14 | in which case the terms and conditions of that license apply. 15 | Additional info at http://www.gnu.org/licenses. 16 | 17 | ********************************************************************* 18 | -------------------------------------------------------------------------------- /make2/build_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | # build all binaries 4 | 5 | cd "$(dirname "$0")" 6 | echo "entering `pwd`" 7 | 8 | ./clean.sh "$1" || true 9 | ./build_jconsole.sh 10 | ./build_libj.sh 11 | ./build_tsdll.sh 12 | -------------------------------------------------------------------------------- /make2/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # rm all *.o for clean builds - makefile dependencies are not set 3 | set -e 4 | 5 | if [ "$1" = "noclean" ] ; then 6 | exit 0 7 | fi 8 | 9 | realpath() 10 | { 11 | oldpath=`pwd` 12 | if ! cd $1 > /dev/null 2>&1; then 13 | cd ${1##*/} > /dev/null 2>&1 14 | echo $( pwd -P )/${1%/*} 15 | else 16 | pwd -P 17 | fi 18 | cd $oldpath > /dev/null 2>&1 19 | } 20 | 21 | cd "$(realpath $(dirname "$0"))" 22 | echo "entering `pwd`" 23 | 24 | find .. -not -path "*/.*" -not -path "../openssl-asm/*" -not -path "../asm/*" \( -name "*.o" -o -name "*.tmp" \) -type f -delete || true 25 | find .. -not -path "*/.*" -not -path "../openssl-asm/*" -not -path "../asm/*" -name "*.dSYM" -type d -delete || true 26 | -------------------------------------------------------------------------------- /make2/jplatform64.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # respect individual jplatform and/or j64x if they are defined 5 | 6 | cd "$(dirname "$0")" 7 | 8 | USE_WASM="${USE_WASM:=0}" 9 | if [ $USE_WASM -eq 1 ] ; then 10 | jplatform="${jplatform:=wasm}" 11 | j64x="${j64x:=j32}" 12 | echo "$jplatform/$j64x" 13 | exit 0 14 | fi 15 | 16 | if ( [ "`uname`" = "Linux" ] ) && ( [ "`uname -m`" = "armv6l" ] || [ "`uname -m`" = "aarch64" ] || [ "`uname -m`" = "arm64" ] ); then 17 | jplatform="${jplatform:=raspberry}" 18 | elif [ "`uname`" = "Darwin" ]; then 19 | jplatform="${jplatform:=darwin}" 20 | elif [ "`uname`" = "OpenBSD" ]; then 21 | jplatform="${jplatform:=openbsd}" 22 | elif [ "`uname`" = "FreeBSD" ]; then 23 | jplatform="${jplatform:=freebsd}" 24 | else 25 | jplatform="${jplatform:=linux}" 26 | fi 27 | 28 | if [ "`uname -m`" = "x86_64" ] || [ "`uname -m`" = "amd64" ]; then 29 | j64x="${j64x:=j64avx2}" 30 | elif [ "`uname -m`" = "aarch64" ] || [ "`uname -m`" = "arm64" ]; then 31 | if [ -z "${jplatform##*raspberry*}" ]; then 32 | j64x="${j64x:=j64}" 33 | else 34 | j64x="${j64x:=j64arm}" 35 | fi 36 | elif [ "`uname -m`" = "armv6l" ]; then 37 | j64x="${j64x:=j32}" 38 | else j64x="${j64x:=j32}" 39 | fi 40 | 41 | echo "$jplatform/$j64x" 42 | 43 | -------------------------------------------------------------------------------- /make2/macos-libomp.txt: -------------------------------------------------------------------------------- 1 | get/build cmake if not yet 2 | 3 | $ brew install cmake 4 | 5 | How to get/build libomp. 6 | 7 | $ cd 8 | $ svn co http://llvm.org/svn/llvm-project/openmp/trunk libomp 9 | $ cd libomp 10 | $ mkdir -p build 11 | $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/opt/libomp 12 | $ make && make install 13 | 14 | need to deploy this run-time 15 | /usr/local/opt/libomp/lib/libomp.dylib 16 | -------------------------------------------------------------------------------- /make2/makefile-jconsole: -------------------------------------------------------------------------------- 1 | vpath % ../../../../jsrc % ../../../../libbacktrace 2 | 3 | ifndef jplatform64 4 | jplatform64=linux/j64x 5 | endif 6 | 7 | ODIR=../../../../bin/$(jplatform64) 8 | 9 | .SUFFIXES: .o 10 | 11 | # elf.o 12 | # pecoff.o 13 | # alloc.o -- alternative to mmap.o 14 | # read.o -- alternative to mmapio.o; probably mmap is more robust in this case 15 | 16 | ifneq (bsd,$(findstring bsd,$(jplatform64))) 17 | 18 | ifneq (darwin,$(findstring darwin,$(jplatform64))) 19 | 20 | BACKTRACE_OBJS := \ 21 | atomic.o \ 22 | backtrace.o \ 23 | dwarf.o \ 24 | fileline.o \ 25 | mmap.o \ 26 | mmapio.o \ 27 | posix.o \ 28 | print.o \ 29 | simple.o \ 30 | sort.o \ 31 | state.o 32 | 33 | ifeq (darwin,$(findstring darwin,$(jplatform64))) 34 | BACKTRACE_OBJS := $(BACKTRACE_OBJS) macho.o 35 | else 36 | BACKTRACE_OBJS := $(BACKTRACE_OBJS) elf.o 37 | endif 38 | 39 | endif 40 | 41 | endif 42 | 43 | OBJS= \ 44 | jconsole.o \ 45 | jeload.o \ 46 | $(BACKTRACE_OBJS) 47 | 48 | %.o: %.c 49 | $(CC) -c -o $@ $< $(CFLAGS) 50 | 51 | $(ODIR)/$(TARGET) : $(OBJS) $(OBJSLN) 52 | $(CC) -o $@ $(OBJS) $(OBJSLN) -g $(LDFLAGS) 53 | 54 | all: $(ODIR)/$(TARGET) 55 | 56 | clean: 57 | rm -f $(OBJS) $(OBJSLN) linenoise.o 58 | 59 | .PHONY: all clean 60 | -------------------------------------------------------------------------------- /make2/makefile-jnative: -------------------------------------------------------------------------------- 1 | vpath % ../../../../jsrc 2 | 3 | ifndef jplatform64 4 | jplatform64=linux/j64x 5 | endif 6 | 7 | ODIR=../../../../bin/$(jplatform64) 8 | 9 | .SUFFIXES: .o 10 | 11 | OBJS= \ 12 | andjnative.o \ 13 | jeload.o 14 | 15 | %.o: %.c 16 | $(CC) -c -o $@ $< $(CFLAGS) 17 | 18 | ifdef TARGET 19 | $(ODIR)/$(TARGET) : $(OBJS) 20 | $(CC) -o $@ $(OBJS) $(LDFLAGS) 21 | endif 22 | 23 | ifdef TARGET_a 24 | $(ODIR)/$(TARGET_a) : $(OBJS) 25 | $(AR) $(LDFLAGS_a) $@ $(OBJS) $(LDFLAGS_b) 26 | endif 27 | 28 | all: $(ODIR)/$(TARGET) $(ODIR)/$(TARGET_a) 29 | 30 | clean: 31 | rm -f $(OBJS) 32 | 33 | .PHONY: all clean 34 | -------------------------------------------------------------------------------- /make2/makefile-tsdll: -------------------------------------------------------------------------------- 1 | vpath % ../../../../jsrc 2 | 3 | ifndef jplatform64 4 | jplatform64=linux/j64x 5 | endif 6 | 7 | ODIR=../../../../bin/$(jplatform64) 8 | 9 | .SUFFIXES: .o 10 | 11 | OBJS= \ 12 | tsdll.o 13 | 14 | %.o: %.c 15 | $(CC) -c -o $@ $< $(CFLAGS) 16 | 17 | ifdef TARGET 18 | $(ODIR)/$(TARGET) : $(OBJS) 19 | $(CC) -o $@ $(OBJS) $(LDFLAGS) 20 | endif 21 | 22 | ifdef TARGET_a 23 | $(ODIR)/$(TARGET_a) : $(OBJS) 24 | $(AR) $(LDFLAGS_a) $@ $(OBJS) $(LDFLAGS_b) 25 | endif 26 | 27 | all: $(ODIR)/$(TARGET) $(ODIR)/$(TARGET_a) 28 | 29 | clean: 30 | rm -f $(OBJS) 31 | 32 | .PHONY: all clean 33 | -------------------------------------------------------------------------------- /make2/mktoc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cd "$(dirname "$0")" 5 | echo "generate jsrc/toc.txt" 6 | 7 | cd ../jsrc 8 | rm -f toc.txt 9 | for f in *.c; do 10 | echo "$f\c" >>toc.txt 11 | echo "\t\c" >>toc.txt 12 | sed -n 4p $f >>toc.txt 13 | done 14 | -------------------------------------------------------------------------------- /make2/runtests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | cd "$(dirname "$0")" 4 | clear # should be easy to find first compiler error if any occur 5 | jplatform64=`./jplatform64.sh` 6 | CC=${CC-clang} 7 | CFLAGS="-ggdb -O0 $CFLAGS" 8 | export CC CFLAGS 9 | BIN=../bin/$jplatform64 10 | jconsole=$BIN/jconsole 11 | if [ ! -r $jconsole ]; then ./build_jconsole.sh; fi 12 | if [ ! -r $BIN/libtsdll.* ]; then ./build_tsdll.sh; fi 13 | ./build_libj.sh 14 | ( 15 | cd ../bin/$(dirname $jplatform64) 16 | for l in ../../jlibrary/*/.; do 17 | d=$(dirname $l) 18 | rm -f $(basename $d) 19 | ln -fs $d 20 | done 21 | ) 22 | ( 23 | cd ../bin/$jplatform64 24 | rm -f profile.ijs 25 | ln -fs ../../../bin/profile.ijs 26 | ) 27 | cd ../test 28 | clear # build was successful, focus terminal session on j tests 29 | if [ "$1" = "-i" ]; then 30 | shift 31 | gdb -iex 'set pagination off' -ex run -ex where -ex echo \n \ 32 | -ex up -ex up -ex up -ex up --args \ 33 | $jconsole -js "load'tsu.ijs'" "9!:29]1[9!:27'RUND]allorcmdline(0)'return." "$@" 34 | else 35 | gdb -iex 'set pagination off' -ex run -ex where -ex echo \n \ 36 | -ex up -ex up -ex up -ex up --args \ 37 | $jconsole tsu.ijs <<___ "$@" 38 | RUND allorcmdline'' 39 | ___ 40 | fi 41 | -------------------------------------------------------------------------------- /make_deprecated/build_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # build all binaries for j64 linux/darwin 3 | cd ~ 4 | 5 | cat $jgit/jsrc/jversion.h 6 | 7 | if [ ! -d jbld ]; then 8 | echo "~/jbld does not exist - running install.sh" 9 | $jmake/install.sh 10 | fi 11 | 12 | $jmake/clean.sh 13 | 14 | $jmake/build_jconsole.sh j64 15 | $jmake/build_tsdll.sh j64 16 | $jmake/build_libj.sh j64 17 | $jmake/build_libj.sh j64avx 18 | $jmake/build_libj.sh j64avx2 19 | 20 | 21 | -------------------------------------------------------------------------------- /make_deprecated/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # rm all *.o for clean builds - makefile dependencies are not set 3 | find $jbld/jout -name "*.o" -type f -delete 4 | find $jgit/jsrc -name "*.o" -type f -delete 5 | find $jgit/dllsrc -name "*.o" -type f -delete 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /make_deprecated/comments.txt: -------------------------------------------------------------------------------- 1 | *** 2 | Optimization: 3 | Previous gcc based release versions of J were built with -O3. 4 | Sometimes this caused the tests to fail and a lot of work was 5 | done to track down the problem and reduce the optimization 6 | either in a particular file or by removing the flag that caused the 7 | problem. This was painful work. 8 | 9 | OSX tests had nan problems with O2 and 03 but ran clean with 01. 10 | 11 | Timing the running of the entire test suite in linux and osx showed 12 | negligible difference between 01 and 03. And the O3 binary was 25% 13 | larger. 14 | 15 | O1 is now the official level for J unix releases. 16 | -------------------------------------------------------------------------------- /make_deprecated/copy_jlibrary.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # copy git jlibrary to jbld j32/j64 3 | 4 | cd ~ 5 | if [ ! -f jvars.sh ]; then 6 | echo "~/jvars.sh must exist" 7 | exit 1 8 | fi 9 | 10 | cd ~ 11 | . jvars.sh 12 | 13 | cp -r $jgit/jlibrary/* $jbld/j32 14 | cp -r $jgit/jlibrary/* $jbld/j64 15 | exit 0 16 | 17 | -------------------------------------------------------------------------------- /make_deprecated/domake.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # run by build_jconsole and build_libj and build_tsdll 4 | # jconsole/tsdll $1 is j32 or j64 5 | # libj $1 is j32 or j64 or j64avx j64avx2 6 | 7 | echo "domake: $1 $TARGET CC=$CC" 8 | 9 | if [ $1 = "j32" ] ; then 10 | bits=j32 11 | else 12 | bits=j64 13 | fi 14 | 15 | cd ~ 16 | 17 | bld=bld- 18 | 19 | OUT=$jbld/jout/$1/bld-$TARGET 20 | 21 | mkdir -p $OUT/blis 22 | mkdir -p $OUT/txt 23 | cd $OUT 24 | 25 | echo " $OUT/txt/build.txt" 26 | echo "" 27 | 28 | make -f $jmake/makefile >$jbld/jout/$1/$bld$TARGET/txt/build.txt 2>&1 29 | 30 | egrep -w 'warning|error|note' -B 2 $OUT/txt/build.txt 31 | 32 | cp $TARGET $jbld/$bits/bin 33 | 34 | -------------------------------------------------------------------------------- /make_deprecated/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install jbld folders - new install or a reinstall 3 | 4 | cd ~ 5 | if [ ! -f jvars.sh ]; then 6 | echo "~/jvars.sh must exist" 7 | exit 1 8 | fi 9 | 10 | cd ~ 11 | . jvars.sh 12 | 13 | rm -f -r $jbld 14 | mkdir $jbld 15 | mkdir $jbld/j32 16 | mkdir $jbld/j64 17 | mkdir $jbld/jout 18 | cp -r $jgit/jlibrary/* $jbld/j32 19 | cp -r $jgit/jlibrary/* $jbld/j64 20 | 21 | echo "install complete" 22 | echo "" 23 | echo "$jgit/license.txt" 24 | 25 | cat $jgit/license.txt 26 | exit 0 27 | 28 | -------------------------------------------------------------------------------- /make_deprecated/jvars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # source shell script (read with . jvars.sh) so stuff is easy to find 3 | 4 | # edit following if your install is not standard 5 | jgit=~/git/jsource # git jsource folder 6 | jbld=~/jbld # test libraries and binaries will be put here 7 | 8 | # platform and shared library suffix 9 | jplatform=`uname|tr '[:upper:]' '[:lower:]'` 10 | jsuffix=so 11 | if [ $jplatform = "darwin" ] ; then jsuffix=dylib ; fi 12 | 13 | CC=clang # compiler 14 | 15 | # should not be necessary to edit after here 16 | tsu=$jgit/test/tsu.ijs 17 | j32="$jbld/j32/bin/jconsole $tsu" 18 | j64="$jbld/j64/bin/jconsole $tsu" 19 | j64avx="$jbld/j64/bin/jconsole -lib libjavx.$jsuffix $tsu" 20 | j64avx2="$jbld/j64/bin/jconsole -lib libjavx2.$jsuffix $tsu" 21 | jmake=$jgit/make 22 | 23 | export jgit jbld jplatform j32 j64 j64avx j64avx2 jmake CC 24 | -------------------------------------------------------------------------------- /make_deprecated/makefile: -------------------------------------------------------------------------------- 1 | vpath % $(jgit)/jsrc $(jgit)/jsrc/openssl/sha $(jgit)/jsrc/openssl/sha/asm 2 | 3 | %.o: %.c 4 | $(CC) -c $(CFLAGS) $(CFLAGS_SIMD) $(CFLAGS_FMA) $(CFLAGS_AESNI) $(CFLAGS_AESARM) -o$@ $^ 5 | 6 | %.o: %.S 7 | $(CC) $(GASM_FLAGS) -c -o $@ $< 8 | 9 | CFLAGS=$(COMPILE) 10 | $(OBJS_FMA) : CFLAGS_FMA := -mfma 11 | $(OBJS_AESNI) : CFLAGS_AESNI := -maes 12 | $(OBJS_AESARM) : CFLAGS_AESARM := -march=armv8-a+crc+crypto 13 | $(TARGET) : $(OBJS) $(OBJS_FMA) $(OBJS_AESNI) $(OBJS_AESARM) $(SRC_ASM) 14 | $(CC) $(OBJS) $(OBJS_FMA) $(OBJS_AESNI) $(OBJS_AESARM) $(SRC_ASM) $(LINK) 15 | -------------------------------------------------------------------------------- /make_deprecated/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . jvars.sh 3 | mkdir -p $jbld/test 4 | echo "echo '*************',LF,LF[echo RUN 3{.ddall" | $j64 > $jbld/test/jtest.txt 5 | echo "echo '*************',LF,LF[echo RUN 3{.ddall" | $j64avx >> $jbld/test/jtest.txt 6 | 7 | echo "echo '*************',LF,LF[jdrun''" | $j64 > $jbld/test/jdtest.txt 8 | echo "echo '*************',LF,LF[jdrun''" | $j64avx >> $jbld/test/jdtest.txt 9 | 10 | cat $jbld/test/jtest.txt 11 | cat $jbld/test/jdtest.txt 12 | 13 | -------------------------------------------------------------------------------- /makemsvc/jdll/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | nmake -f makefile.win CC=clang-cl x64=1 JAVX2=1 USE_OPENMP=0 USE_PYXES=1 4 | -------------------------------------------------------------------------------- /makemsvc/jdll/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd "$(dirname "$0")" 3 | find ../.. -name '*.c' | sed 's}c$}o}' | grep -v ' ' | xargs rm -f 4 | find ../.. -name '*.S' | sed 's}S$}o}' | grep -v ' ' | xargs rm -f 5 | -------------------------------------------------------------------------------- /makemsvc/jnative/jnative.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | Java_com_jsoftware_j_JInterface_JDo 3 | Java_com_jsoftware_j_JInterface_JDoR 4 | Java_com_jsoftware_j_JInterface_JGetc 5 | Java_com_jsoftware_j_JInterface_JSetc 6 | Java_com_jsoftware_j_JInterface_JFree 7 | Java_com_jsoftware_j_JInterface_JInit 8 | Java_com_jsoftware_j_JInterface_JInit2 9 | Java_com_jsoftware_j_JInterface_JGetLocale 10 | Java_com_jsoftware_j_JInterface_JSetEnv 11 | -------------------------------------------------------------------------------- /makemsvc/release.bat: -------------------------------------------------------------------------------- 1 | rem copy windows binaries from makemsvc to jlibrary\bin 2 | 3 | set S=. 4 | set A=..\jlibrary\bin 5 | set B=..\jlibrary\bin32 6 | 7 | copy %S%\jconsole\jconsole.exe %A%\. 8 | copy %S%\jconsole\jconsole32.exe %B%\jconsole.exe 9 | 10 | copy %S%\jdll\javx.dll %A%\javx.dll 11 | copy %S%\jdll\javx2.dll %A%\javx2.dll 12 | copy %S%\jdll\j.dll %A%\j-nonavx.dll 13 | copy %S%\jdll\javx2.dll %A%\j.dll 14 | copy %S%\jdll\j32.dll %B%\j.dll 15 | 16 | copy %S%\tsdll\tsdll.dll %A%\. 17 | copy %S%\tsdll\tsdll32.dll %B%\tsdll.dll 18 | 19 | copy %S%\mpir\windows\x64\mpir.dll %A%\. 20 | copy %S%\pthreads4w\bin\pthreadVC3.dll %A%\. 21 | copy %S%\pcre2\windows\x64\jpcre2.dll %A%\. 22 | -------------------------------------------------------------------------------- /makemsvc/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # copy windows binaries from makemsvc to jlibrary/bin 4 | 5 | cd "`dirname "$0"`" 6 | 7 | S=. 8 | A=../jlibrary/bin 9 | B=../jlibrary/bin32 10 | 11 | cp $S/jconsole/jconsole.exe $A/. 12 | cp $S/jconsole/jconsole32.exe $B/jconsole.exe 13 | 14 | cp $S/jdll/javx.dll $A/javx.dll 15 | cp $S/jdll/javx2.dll $A/javx2.dll 16 | cp $S/jdll/j.dll $A/j-nonavx.dll 17 | cp $S/jdll/javx2.dll $A/j.dll 18 | cp $S/jdll/j32.dll $B/j.dll 19 | 20 | cp $S/tsdll/tsdll.dll $A/. 21 | cp $S/tsdll/tsdll32.dll $B/tsdll.dll 22 | -------------------------------------------------------------------------------- /makevs/README.md: -------------------------------------------------------------------------------- 1 | In the October 2022 versions of j, to compile jdll with libgmp under visual studio, you need to set the IMPORTGMPLIB environmental variable. 2 | 3 | CAUTION: the following seems like it should work, but in fact turned out to be useless. 4 | 5 | This could be set outside of visual studio as a system or user environmental variable. However, it should be possible to set it within visual studio as an environmental variable for the jdll project. 6 | 7 | However, while this approach in Visual Studio 2019 community edition does NOT set the environmental variable: 8 | 9 | (1) Select the project in solution explorer 10 | 11 | (2) Bring up property pages for the project (shift-F4 or View > Property Pages or in solution explorer with the project selected: alt-enter or right click Properties) 12 | 13 | (3) In that popup dialog, under Configuration Properties > Debugging > Environment on the far right, click the "drop down arrow" and select "Edit...". 14 | 15 | In the edittable region which appears add a line which says: 16 | 17 | IMPORTGMPLIB=1 18 | 19 | (4) Select OK to close the environmental variable edit mechanism and select OK again to close the Configuration Properties popup. 20 | 21 | ---------------------------------------------------------------- 22 | -------------------------------------------------------------------------------- /makevs/copy_jlibrary.bat: -------------------------------------------------------------------------------- 1 | rem copy git jlibrary to jbld j32/j64 2 | 3 | cd %userprofile% 4 | 5 | rmdir /S /Q jbld 6 | 7 | mkdir jbld\j32 8 | mkdir jbld\j64 9 | 10 | xcopy /E /Y /Q gitdev\jsource\jlibrary jbld\j32\ 11 | xcopy /E /Y /Q gitdev\jsource\jlibrary jbld\j64\ 12 | 13 | -------------------------------------------------------------------------------- /makevs/install.bat: -------------------------------------------------------------------------------- 1 | rem create new jbld folders for j32 and j64 2 | 3 | cd %userprofile% 4 | 5 | rmdir /S /Q jbld 6 | 7 | mkdir jbld\j32 8 | mkdir jbld\j64 9 | 10 | xcopy /E /Y /Q git\jsource\jlibrary jbld\j32\ 11 | xcopy /E /Y /Q git\jsource\jlibrary jbld\j64\ 12 | 13 | -------------------------------------------------------------------------------- /makevs/jconsole/jgray.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/makevs/jconsole/jgray.ico -------------------------------------------------------------------------------- /makevs/jconsole/profile.ijs: -------------------------------------------------------------------------------- 1 | NB. loaded under debug 2 | NB. 0!:0<'profile.ijs' 3 | NB. works for both j32 and j64 4 | 5 | BINPATH_z_=: (2!:5'jbld'),'/j64/bin' 6 | 0!:0 2 | 3 | 4 | -lib c:\users\eric\j64-806avx\bin\j.dll 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /makevs/jconsole/template/jconsole_vs2019.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /makevs/jconsole/template/jconsole_vs2019_clang.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ..\..\jlibrary\bin\jconsole 5 | -lib javx2.dll 6 | WindowsLocalDebugger 7 | $(userprofile) 8 | 9 | -------------------------------------------------------------------------------- /makevs/jdll/profile.ijs: -------------------------------------------------------------------------------- 1 | NB. loaded under debug 2 | NB. 0!:0<'profile.ijs' 3 | NB. works for both j32 and j64 4 | 5 | BINPATH_z_=: (2!:5'userprofile'),'\jbld\j64\bin' 6 | 0!:1all programs>vs 2013>visual studio tools>developer command prompt) 14 | 15 | new jdll.tlb should be manually copied to dllsrc for inclusion in new build 16 | -------------------------------------------------------------------------------- /makevs/release.bat: -------------------------------------------------------------------------------- 1 | 2 | set jgit=%USERPROFILE%\gitdev\jsource 3 | set jbld=%USERPROFILE%\jbld 4 | 5 | mkdir %jgit%\release\windows\j32 6 | del %jgit%\release\windows\j32\jconsole.exe 7 | del %jgit%\release\windows\j32\j.dll 8 | 9 | copy %jbld%\j32\bin\jconsole.exe %jgit%\release\windows\j32\jconsole.exe 10 | copy %jbld%\j32\bin\j.dll %jgit%\release\windows\j32\j.dll 11 | copy %jbld%\j32\bin\tsdll.dll %jgit%\release\windows\j32\tsdll.dll 12 | 13 | mkdir %jgit%\release\windows\j64 14 | del %jgit%\release\windows\j64\jconsole 15 | del %jgit%\jsource\release\windows\j64\j.dll 16 | 17 | copy %jbld%\j64\bin\jconsole.exe %jgit%\release\windows\j64\jconsole.exe 18 | copy %jbld%\j64\bin\j.dll %jgit%\release\windows\j64\j.dll 19 | copy %jbld%\j64\bin\tsdll.dll %jgit%\release\windows\j64\tsdll.dll 20 | -------------------------------------------------------------------------------- /makevs/template.bat: -------------------------------------------------------------------------------- 1 | rem %1% is folder with jsource 2 | rem copy sln and vcxproj files from .template files 3 | 4 | set p="%1%\jsource\makevs\jconsole" 5 | copy %p%\jconsole.sln.template %p%\jconsole.sln 6 | copy %p%\jconsole.vcxproj.template %p%\jconsole.vcxproj 7 | 8 | set p="%1%\jsource\makevs\jdll" 9 | copy %p%\jdll.sln.template %p%\jdll.sln 10 | copy %p%\jdll.vcxproj.template %p%\jdll.vcxproj 11 | 12 | set p="%1%\jsource\makevs\tsdll" 13 | copy %p%\tsdll.sln.template %p%\tsdll.sln 14 | copy %p%\tsdll.vcxproj.template %p%\tsdll.vcxproj 15 | 16 | -------------------------------------------------------------------------------- /makevs/tsdll/template/.gitignore: -------------------------------------------------------------------------------- 1 | # template folder files are in repo 2 | !*.sln 3 | !*.vcxproj 4 | !*.vcxproj.user 5 | -------------------------------------------------------------------------------- /makevs/tsdll/template/tsdll_vs2013.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /makevs/tsdll/template/tsdll_vs2019.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /makevs/tsdll/template/tsdll_vs2019_clang.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(userprofile)\jbld\j64\bin\jconsole.exe 5 | -lib j.jdll_vs2019_clang.dll 6 | WindowsLocalDebugger 7 | 8 | -------------------------------------------------------------------------------- /makevs/tsdll/tsdll.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | cbasic 3 | wbasic 4 | bbasic 5 | sbasic 6 | ibasic 7 | xbasic 8 | dbasic 9 | fbasic 10 | jbasic 11 | zbasic 12 | pc 13 | altinci 14 | dipdpd 15 | fipfpf 16 | bipbpb 17 | dcomplex0 18 | fcomplex0 19 | dcomplex1 20 | fcomplex1 21 | dd 22 | ddd 23 | dddd 24 | downup 25 | fff 26 | fd 27 | fdi 28 | ffi 29 | f 30 | d 31 | dx0 32 | dx1 33 | dx2 34 | dx3 35 | dx4 36 | dx5 37 | dx6 38 | dx7 39 | d1 40 | d1a 41 | d1b 42 | d1c 43 | d1z 44 | d2 45 | d3 46 | d4 47 | d5 48 | di1d9a 49 | di1d9b 50 | di6d9a 51 | di6d9b 52 | di7d9a 53 | di7d9b 54 | di8d9a 55 | di8d9b 56 | di9d9a 57 | di9d9b 58 | dr160 59 | dr161 60 | dr162 61 | dr163 62 | dr164 63 | dr165 64 | dr166 65 | dr167 66 | dr168 67 | dr169 68 | dr10a 69 | dr10b 70 | dr10c 71 | dr11a 72 | dr11b 73 | dr11c 74 | dr12a 75 | dr12b 76 | dr12c 77 | dr13a 78 | dr13b 79 | dr13c 80 | dr14a 81 | dr14b 82 | dr14c 83 | dr15a 84 | dr15b 85 | dr15c 86 | dr16a 87 | dr16b 88 | dr16c 89 | dr17a 90 | dr17b 91 | dr17c 92 | dr17d 93 | dr17e 94 | dr17f 95 | dr18a 96 | dr18b 97 | dr18c 98 | dr18d 99 | dr18e 100 | dr18f 101 | dr19a 102 | dr19b 103 | dr19c 104 | f1 105 | f2 106 | f3 107 | xbasic_add 108 | obj_add 109 | objxxx 110 | objddd 111 | ubasic 112 | -------------------------------------------------------------------------------- /mpir/apple/ios/libgmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/apple/ios/libgmp.a -------------------------------------------------------------------------------- /mpir/apple/macos/libgmp.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/apple/macos/libgmp.dylib -------------------------------------------------------------------------------- /mpir/freebsd/aarch64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/freebsd/aarch64/libgmp.so -------------------------------------------------------------------------------- /mpir/freebsd/x86_64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/freebsd/x86_64/libgmp.so -------------------------------------------------------------------------------- /mpir/linux/aarch64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/aarch64/libgmp.so -------------------------------------------------------------------------------- /mpir/linux/arm/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/arm/libgmp.so -------------------------------------------------------------------------------- /mpir/linux/i386/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/i386/libgmp.so -------------------------------------------------------------------------------- /mpir/linux/i386/libgmpd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/i386/libgmpd.so -------------------------------------------------------------------------------- /mpir/linux/wasm32/libgmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/wasm32/libgmp.a -------------------------------------------------------------------------------- /mpir/linux/x86_64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/x86_64/libgmp.so -------------------------------------------------------------------------------- /mpir/linux/x86_64/libgmpd.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/linux/x86_64/libgmpd.so -------------------------------------------------------------------------------- /mpir/openbsd/aarch64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/openbsd/aarch64/libgmp.so -------------------------------------------------------------------------------- /mpir/openbsd/x86_64/libgmp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/openbsd/x86_64/libgmp.so -------------------------------------------------------------------------------- /mpir/windows/arm64/mpir.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/arm64/mpir.dll -------------------------------------------------------------------------------- /mpir/windows/arm64/mpir.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/arm64/mpir.lib -------------------------------------------------------------------------------- /mpir/windows/win32/mpir.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/win32/mpir.dll -------------------------------------------------------------------------------- /mpir/windows/win32/mpir.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/win32/mpir.lib -------------------------------------------------------------------------------- /mpir/windows/x64/mpir-md.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x64/mpir-md.dll -------------------------------------------------------------------------------- /mpir/windows/x64/mpir-md.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x64/mpir-md.lib -------------------------------------------------------------------------------- /mpir/windows/x64/mpir.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x64/mpir.dll -------------------------------------------------------------------------------- /mpir/windows/x64/mpir.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x64/mpir.lib -------------------------------------------------------------------------------- /mpir/windows/x86/mpir.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x86/mpir.dll -------------------------------------------------------------------------------- /mpir/windows/x86/mpir.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/mpir/windows/x86/mpir.lib -------------------------------------------------------------------------------- /netdefs/Netdefs-nopie.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := netdefs-nopie 7 | 8 | LOCAL_LDLIBS := -ldl 9 | 10 | ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 11 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=armv8-a 12 | LOCAL_ARM_NEON := true 13 | endif 14 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 15 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfpv3-d16 -march=armv7-a 16 | LOCAL_ARM_MODE := arm 17 | endif 18 | ifeq ($(TARGET_ARCH_ABI),armeabi) 19 | LOCAL_CFLAGS := -fPIC -Os -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfp -march=armv5te 20 | LOCAL_ARM_MODE := arm 21 | endif 22 | ifeq ($(TARGET_ARCH),x86_64) 23 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector 24 | endif 25 | ifeq ($(TARGET_ARCH),x86) 26 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=i686 -mssse3 -mfpmath=sse -fno-stack-protector 27 | endif 28 | 29 | LOCAL_SRC_FILES := netdefs.c 30 | 31 | include $(BUILD_EXECUTABLE) 32 | 33 | -------------------------------------------------------------------------------- /netdefs/Netdefs.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := netdefs 7 | 8 | LOCAL_LDLIBS := -ldl 9 | 10 | ifeq ($(TARGET_ARCH_ABI),arm64-v8a) 11 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=armv8-a 12 | LOCAL_ARM_NEON := true 13 | endif 14 | ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) 15 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfpv3-d16 -march=armv7-a 16 | LOCAL_ARM_MODE := arm 17 | endif 18 | ifeq ($(TARGET_ARCH_ABI),armeabi) 19 | LOCAL_CFLAGS := -fPIC -Os -fwrapv -Werror -fno-strict-aliasing -mfloat-abi=softfp -mfpu=vfp -march=armv5te 20 | LOCAL_ARM_MODE := arm 21 | endif 22 | ifeq ($(TARGET_ARCH),x86_64) 23 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=x86-64 -msse4.2 -mpopcnt -fno-stack-protector 24 | endif 25 | ifeq ($(TARGET_ARCH),x86) 26 | LOCAL_CFLAGS := -fPIC -O1 -fwrapv -Werror -fno-strict-aliasing -march=i686 -mssse3 -mfpmath=sse -fno-stack-protector 27 | endif 28 | 29 | LOCAL_CFLAGS += -fPIE 30 | LOCAL_LDFLAGS += -fPIE -pie 31 | 32 | LOCAL_SRC_FILES := netdefs.c 33 | 34 | include $(BUILD_EXECUTABLE) 35 | 36 | -------------------------------------------------------------------------------- /netdefs/makefile: -------------------------------------------------------------------------------- 1 | ifeq (ARM64,$(TARGET_CPU)) 2 | CFLAGS= -target arm64-pc-windows-msvc -Wno-format /W1 /MT 3 | FLAGS= /MACHINE:ARM64 /SUBSYSTEM:CONSOLE,5.02 4 | else ifeq (x64,$(TARGET_CPU)) 5 | CFLAGS= /W1 /MT 6 | FLAGS= /MACHINE:X64 /SUBSYSTEM:CONSOLE,5.02 7 | else 8 | CFLAGS= -m32 /W1 /MT 9 | FLAGS= /MACHINE:X86 /SUBSYSTEM:CONSOLE,5.01 10 | endif 11 | 12 | .SUFFIXES: .o 13 | 14 | OBJS= netdefs.o 15 | 16 | ifndef LD 17 | LD=lld-link 18 | endif 19 | 20 | %.o: %.c 21 | $(CC) $(CFLAGS) /Fo$@ /c $< 22 | 23 | ifeq (ARM64,$(TARGET_CPU)) 24 | TARGET= netdefs-arm64.exe 25 | else ifeq (x64,$(TARGET_CPU)) 26 | TARGET= netdefs.exe 27 | else 28 | TARGET= netdefs32.exe 29 | endif 30 | 31 | $(TARGET) : $(OBJS) 32 | $(LD) /NOLOGO $(FLAGS) /out:$@ $(OBJS) 33 | 34 | all: $(TARGET) 35 | 36 | noclean: 37 | # 38 | 39 | clean: 40 | rm -f *.res *.ilk *.pdb $(OBJS) 41 | 42 | .PHONY: all clean noclean 43 | -------------------------------------------------------------------------------- /openmp/obj/linux/i386/libomp.so.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/linux/i386/libomp.so.5 -------------------------------------------------------------------------------- /openmp/obj/linux/x86_64/libomp.so.5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/linux/x86_64/libomp.so.5 -------------------------------------------------------------------------------- /openmp/obj/windows/libomp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/windows/libomp.dll -------------------------------------------------------------------------------- /openmp/obj/windows/libomp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/windows/libomp.lib -------------------------------------------------------------------------------- /openmp/obj/windows/libomp32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/windows/libomp32.dll -------------------------------------------------------------------------------- /openmp/obj/windows/libomp32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openmp/obj/windows/libomp32.lib -------------------------------------------------------------------------------- /openssl-asm/keccak1600-mmx-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/keccak1600-mmx-nasm.o -------------------------------------------------------------------------------- /openssl-asm/keccak1600-x86_64-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/keccak1600-x86_64-nasm.o -------------------------------------------------------------------------------- /openssl-asm/md5-586-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/md5-586-nasm.o -------------------------------------------------------------------------------- /openssl-asm/md5-x86_64-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/md5-x86_64-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha1-586-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha1-586-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha1-x86_64-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha1-x86_64-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha256-586-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha256-586-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha256-x86_64-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha256-x86_64-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha512-586-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha512-586-nasm.o -------------------------------------------------------------------------------- /openssl-asm/sha512-x86_64-nasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/openssl-asm/sha512-x86_64-nasm.o -------------------------------------------------------------------------------- /overview.txt: -------------------------------------------------------------------------------- 1 | examples assume ~/gitdev/jsource and builds in ~/jbld 2 | 3 | put jsource anywhere (adjust examples etc.) 4 | put jbld anywhere for non-windows, but it is hardwired in windows 5 | 6 | start with latest jsource! 7 | cd ~ 8 | cd gitjsource 9 | git clone or pull 10 | 11 | jsrc/jversion.h is not in repo 12 | jsrc/jversion-x.h is in repo and is a template 13 | jversion.h defines are in the 9!:14'' result - edit as appropriate 14 | copy jversion-x.h to jversion.h and edit this local copy as appropriate 15 | 16 | read license.txt and note that the jsource folder can be used under 17 | either a Jsoftware commercial license or under the GPL3 license. 18 | 19 | all (except windows,android): read make2/make.txt 20 | windows command line: read makemsvc/makemsvc.txt 21 | windows vs2019 ide: read makevs/makevs.txt 22 | android: read android/readme 23 | 24 | be sure you can do a clean build on a supported platform 25 | before trying to add a new platform or make source changes 26 | 27 | currently supported platforms are: 28 | windows, linux, darwin, raspberry, android 29 | -------------------------------------------------------------------------------- /pcre2/apple/macos/libjpcre2.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/apple/macos/libjpcre2.dylib -------------------------------------------------------------------------------- /pcre2/freebsd/aarch64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/freebsd/aarch64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/freebsd/x86_64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/freebsd/x86_64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/linux/aarch64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/linux/aarch64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/linux/arm/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/linux/arm/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/linux/i386/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/linux/i386/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/linux/wasm32/libpcre2-8.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/linux/wasm32/libpcre2-8.a -------------------------------------------------------------------------------- /pcre2/linux/x86_64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/linux/x86_64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/openbsd/aarch64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/openbsd/aarch64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/openbsd/x86_64/libjpcre2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/openbsd/x86_64/libjpcre2.so -------------------------------------------------------------------------------- /pcre2/windows/arm64/jpcre2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/windows/arm64/jpcre2.dll -------------------------------------------------------------------------------- /pcre2/windows/x64/jpcre2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/windows/x64/jpcre2.dll -------------------------------------------------------------------------------- /pcre2/windows/x86/jpcre2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pcre2/windows/x86/jpcre2.dll -------------------------------------------------------------------------------- /pthreads4w/bin/pthreadVC3-arm64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/bin/pthreadVC3-arm64.dll -------------------------------------------------------------------------------- /pthreads4w/bin/pthreadVC3-w32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/bin/pthreadVC3-w32.dll -------------------------------------------------------------------------------- /pthreads4w/bin/pthreadVC3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/bin/pthreadVC3.dll -------------------------------------------------------------------------------- /pthreads4w/lib/pthreadVC3-arm64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/lib/pthreadVC3-arm64.lib -------------------------------------------------------------------------------- /pthreads4w/lib/pthreadVC3-w32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/lib/pthreadVC3-w32.lib -------------------------------------------------------------------------------- /pthreads4w/lib/pthreadVC3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/pthreads4w/lib/pthreadVC3.lib -------------------------------------------------------------------------------- /script/commit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # write out sha, user 4 | T=commit.txt 5 | echo $1 > $T 6 | echo $2 >> $T 7 | -------------------------------------------------------------------------------- /script/install-lnx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo dpkg --add-architecture i386 3 | sudo apt-get update -y 4 | sudo apt-get upgrade -y 5 | sudo apt-get install -y build-essential gcc-multilib g++-multilib libc6-dev libc6-dev-i386-cross g++-mingw-w64-x86-64 g++-mingw-w64-i686 autoconf automake libtool gdb gdb-multiarch 6 | sudo apt-get install -y nasm libomp5-14 libopenblas0-pthread 7 | echo "fr_FR.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen 8 | sudo locale-gen 9 | clang --version 10 | gcc --version 11 | -------------------------------------------------------------------------------- /script/install-mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # brew update 3 | # brew upgrade 4 | brew install gcc 5 | -------------------------------------------------------------------------------- /script/install-rpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo dpkg --add-architecture armhf 3 | sudo apt-get update -y 4 | sudo apt-get upgrade -y 5 | sudo apt-get install -y build-essential gcc-multilib libc6-dev autoconf automake libtool gdb gdb-multiarch 6 | sudo apt-get install -y nasm libomp5-14 libopenblas0-pthread 7 | sudo apt-get install -y linux-libc-dev-armhf-cross libc6-dev-armhf-cross libc6-armhf-cross gcc-arm-linux-gnueabihf 8 | sudo apt-get install -y libc6:armhf libstdc++6:armhf libc6-dev:armhf 9 | echo "fr_FR.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen 10 | sudo locale-gen 11 | clang --version 12 | gcc --version 13 | arm-linux-gnueabihf-gcc --version 14 | -------------------------------------------------------------------------------- /script/map_globals.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # list globals for J64 libj.so 3 | 4 | cd ~/jbld/j64/bin 5 | # unitialized 6 | objdump -t libjavx2.so | grep ' \.bss' > globals.txt 7 | # initialized 8 | objdump -t libjavx2.so | grep ' \.data' >> globals.txt 9 | # const 10 | objdump -t libjavx2.so | grep ' \.rodata' >> globals.txt 11 | 12 | -------------------------------------------------------------------------------- /script/tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [[ $# -ne 1 ]]; then 3 | echo "parameter of form: j9.7-beta0" 4 | exit 2 5 | fi 6 | 7 | cd ~/git/jsource 8 | echo $1 >> jsrc/tags.txt 9 | git tag -a $1 -m "$1" 10 | git commit -a -m "$1" 11 | git push origin $1 12 | git push --follow-tags 13 | 14 | -------------------------------------------------------------------------------- /script/testga.cmd: -------------------------------------------------------------------------------- 1 | @rem test windows on github actions 2 | 3 | @rem x64 x86 arm64 4 | IF "%~1"=="x86" GOTO L0 5 | IF "%~1"=="arm64" GOTO L0 6 | IF "%~1" NEQ "x64" EXIT /b 1 7 | :L0 8 | 9 | systeminfo 10 | 11 | IF "%~1"=="x86" GOTO L01A 12 | IF "%~1"=="arm64" GOTO L01B 13 | IF "%~1" NEQ "x64" EXIT /b 1 14 | dir j64 15 | j64\jconsole -lib j.dll testga.ijs 16 | IF %ERRORLEVEL% NEQ 0 EXIT /b 1 17 | j64\jconsole -lib javx2.dll testga.ijs 18 | IF %ERRORLEVEL% NEQ 0 EXIT /b 1 19 | GOTO L01C 20 | :L01A 21 | dir j32 22 | j32\jconsole testga.ijs 23 | IF %ERRORLEVEL% NEQ 0 EXIT /b 1 24 | GOTO L01C 25 | :L01B 26 | dir jarm64 27 | jarm64\jconsole testga.ijs 28 | IF %ERRORLEVEL% NEQ 0 EXIT /b 1 29 | :L01C 30 | -------------------------------------------------------------------------------- /script/testgares.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # read any test results into tests.txt on github actions 4 | 5 | T=tests.txt 6 | > $T 7 | 8 | f() { if [ -e $1 ]; then cat $1 >> $T; fi } 9 | 10 | f "testrpi32.txt" 11 | f "testrpi64.txt" 12 | f "testlinux.txt" 13 | f "testdarwin.txt" 14 | f "testwin.txt" 15 | f "testwin32.txt" 16 | f "testwinarm64.txt" 17 | f "testopenbsd.txt" 18 | f "testfreebsd.txt" 19 | -------------------------------------------------------------------------------- /script/ver.ijs: -------------------------------------------------------------------------------- 1 | 2!:55 (9!:14'') 1!:2 [2 2 | -------------------------------------------------------------------------------- /test/g000i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g000i.ijs' 2 | NB. =/ B --------------------------------------------------------------- 3 | 4 | 0 = {{x=y}}/ 0 1 NB. smoke test, 32-bit arm crash on unaligned access of 8-byte double 5 | 6 | 1 0 0 1 -: =/ 0 0 1 1 ,: 0 1 0 1 7 | 8 | eq=: 4 : 'x=y' 9 | 10 | (=/"1 -: eq/"1) x=:?3 5 17$2 11 | (=/"2 -: eq/"2) x 12 | (=/"3 -: eq/"3) x 13 | 14 | (=/"1 -: eq/"1) x=:?3 5 32$2 15 | (=/"2 -: eq/"2) x 16 | (=/"3 -: eq/"3) x 17 | 18 | (=/"1 -: eq/"1) x=:?3 8 32$2 19 | (=/"2 -: eq/"2) x 20 | (=/"3 -: eq/"3) x 21 | 22 | f=: 3 : '(=/ -: eq/) ?y$2' 23 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 24 | ,f"1 |."1 x 25 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 26 | ,f"1 |."1 x 27 | 28 | (eq/"1 -: =/"1) #: i.2^6 29 | (eq/"1 -: =/"1) #: i.2^7 30 | (eq/"1 -: =/"1) #: i.2^8 31 | (eq/"1 -: =/"1) #: i.2^9 32 | 33 | (eq/ -: =/ ) |: #: i.2^6 34 | (eq/ -: =/ ) |: #: i.2^7 35 | (eq/ -: =/ ) |: #: i.2^8 36 | (eq/ -: =/ ) |: #: i.2^9 37 | 38 | (eq/"1 -: =/"1) 1 ,"1 #: i.2^6 39 | (eq/"1 -: =/"1) 1 1 ,"1 #: i.2^6 40 | (eq/"1 -: =/"1) 1 1 1,"1 #: i.2^6 41 | 42 | (eq/ -: =/ ) |: 1 ,"1 #: i.2^6 43 | (eq/ -: =/ ) |: 1 1 ,"1 #: i.2^6 44 | (eq/ -: =/ ) |: 1 1 1,"1 #: i.2^6 45 | 46 | 47 | 48 | 49 | 50 | epilog'' 51 | 52 | -------------------------------------------------------------------------------- /test/g010i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g010i.ijs' 2 | NB. / B --------------------------------------------------------------- 3 | 4 | 0 0 1 0 -: >/ 0 0 1 1 ,: 0 1 0 1 5 | 6 | gt=: 4 : 'x>y' 7 | 8 | (>/"1 -: gt/"1) x=:?3 5 17$2 9 | (>/"2 -: gt/"2) x 10 | (>/"3 -: gt/"3) x 11 | 12 | (>/"1 -: gt/"1) x=:?3 5 32$2 13 | (>/"2 -: gt/"2) x 14 | (>/"3 -: gt/"3) x 15 | 16 | (>/"1 -: gt/"1) x=:?3 8 32$2 17 | (>/"2 -: gt/"2) x 18 | (>/"3 -: gt/"3) x 19 | 20 | f=: 3 : '(>/ -: gt/) y ?@$ 2' 21 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 22 | ,f"1 |."1 x 23 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 24 | ,f"1 |."1 x 25 | 26 | 27 | 28 | 29 | epilog'' 30 | 31 | -------------------------------------------------------------------------------- /test/g022i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g022i.ijs' 2 | NB. >:/ B --------------------------------------------------------------- 3 | 4 | 1 0 1 1 -: >:/ 0 0 1 1 ,: 0 1 0 1 5 | 6 | ge=: 4 : 'x>:y' 7 | 8 | (>:/"1 -: ge/"1) x=:?3 5 17$2 9 | (>:/"2 -: ge/"2) x 10 | (>:/"3 -: ge/"3) x 11 | 12 | (>:/"1 -: ge/"1) x=:?3 5 32$2 13 | (>:/"2 -: ge/"2) x 14 | (>:/"3 -: ge/"3) x 15 | 16 | (>:/"1 -: ge/"1) x=:?3 8 32$2 17 | (>:/"2 -: ge/"2) x 18 | (>:/"3 -: ge/"3) x 19 | 20 | f=: 3 : '(>:/ -: ge/) y ?@$ 2' 21 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 22 | ,f"1 |."1 x 23 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 24 | ,f"1 |."1 x 25 | 26 | 27 | 28 | 29 | epilog'' 30 | 31 | -------------------------------------------------------------------------------- /test/g030a.ijs: -------------------------------------------------------------------------------- 1 | prolog './g030a.ijs' 2 | NB. _ locales ----------------------------------------------------------- 3 | 4 | f=: f_a_ / 5 | x=: _500+?50$1000 6 | 7 | f_a_ =. + 8 | (+ /x) -: f x 9 | 10 | f_a_ =. >. 11 | (>./x) -: f x 12 | 13 | (271828) 18!:55 ;:'a' 14 | 15 | 16 | 17 | epilog'' 18 | 19 | -------------------------------------------------------------------------------- /test/g031.ijs: -------------------------------------------------------------------------------- 1 | prolog './g031.ijs' 2 | NB. _. ------------------------------------------------------------------ 3 | 4 | 0 $ 0 : 0 5 | _. = _. 6 | 0 = _. = _ 7 | 0 = _. = __ 8 | 9 | '_.' -: ": _. 10 | '_.' -: ": _ + __ 11 | '_.' -: ": __ + _ 12 | '_.' -: ": _ - _ 13 | '_.' -: ": __ - __ 14 | '_.' -: ": _ % _ 15 | '_.' -: ": _ % __ 16 | '_.' -: ": __ % _ 17 | '_.' -: ": __ % __ 18 | 19 | _. -: _. 20 | 0 -: _. -: _ 21 | 0 -: _. -: __ 22 | ) 23 | 24 | 8 -: (3!:0) _. 25 | 26 | 'NaN error' -: ex '_. ". ''circ''' 27 | 28 | 29 | NB. conversion of _0 to 0 in place -------------------------------------- 30 | 31 | x=: 20$_. 32 | 1 [ x i.!.0 ]1 2 3 4 33 | (3!:1 x) -: 3!:1 ($x)$_. 34 | 35 | 36 | 37 | 38 | 39 | 40 | epilog'' 41 | 42 | -------------------------------------------------------------------------------- /test/g032.ijs: -------------------------------------------------------------------------------- 1 | prolog './g032.ijs' 2 | NB. _: ------------------------------------------------------------------ 3 | 4 | _ -: _: 1=?2 3 4$2 5 | _ -: _: a.{~? 10##a. 6 | _ -: _: _20+?3 2$40 7 | _ -: _: o. _20+?13$40 8 | _ -: _: r.?13$40 9 | __ -: __: 1=?2 3 4$2 10 | 11 | _ -: (1=?2 3 4$2) _: 1=?2 3 4$2 12 | _ -: (1=?2 3 4$2) _: a.{~? 10##a. 13 | _ -: (1=?2 3 4$2) _: _20+?3 2$40 14 | _ -: (1=?2 3 4$2) _: o. _20+?13$40 15 | _ -: (1=?2 3 4$2) _: r.?13$40 16 | __ -: (1=?2 3 4$2) __: 1=?2 3 4$2 17 | 18 | _ -: (a.{~? 10##a.) _: 1=?2 3 4$2 19 | _ -: (a.{~? 10##a.) _: a.{~? 10##a. 20 | _ -: (a.{~? 10##a.) _: _20+?3 2$40 21 | _ -: (a.{~? 10##a.) _: o. _20+?13$40 22 | _ -: (a.{~? 10##a.) _: r.?13$40 23 | 24 | _ -: (_20+?3 2$40) _: 1=?2 3 4$2 25 | _ -: (_20+?3 2$40) _: a.{~? 10##a. 26 | _ -: (_20+?3 2$40) _: _20+?3 2$40 27 | _ -: (_20+?3 2$40) _: o. _20+?13$40 28 | _ -: (_20+?3 2$40) _: r.?13$40 29 | 30 | _ -: (o. _20+?13$40) _: 1=?2 3 4$2 31 | _ -: (o. _20+?13$40) _: a.{~? 10##a. 32 | _ -: (o. _20+?13$40) _: _20+?3 2$40 33 | _ -: (o. _20+?13$40) _: o. _20+?13$40 34 | _ -: (o. _20+?13$40) _: r.?13$40 35 | 36 | _ -: (r.?13$40) _: 1=?2 3 4$2 37 | _ -: (r.?13$40) _: a.{~? 10##a. 38 | _ -: (r.?13$40) _: _20+?3 2$40 39 | _ -: (r.?13$40) _: o. _20+?13$40 40 | _ -: (r.?13$40) _: r.?13$40 41 | 42 | 43 | 44 | epilog'' 45 | 46 | -------------------------------------------------------------------------------- /test/g0x.ijs: -------------------------------------------------------------------------------- 1 | prolog './g0x.ijs' 2 | NB. 0!: ----------------------------------------------------------------- 3 | 4 | 'domain error' -: ". etx 'undefname!:4' 5 | 'domain error' -: ". etx '4!:undefname!:' 6 | 7 | sc00 =: 0!:0 8 | 9 | lf =: 10{a. 10 | mtv =: '' 11 | mtm =: i.0 0 12 | 13 | mtm -: sc00 '3+4',lf,'#''Cogito, ergo sum.''' 14 | mtm -: sc00 'i.2 3 4',lf,'3+4' 15 | mtm -: sc00 'i.2 2 2 2 2 2',lf,';:''Cogito, ergo sum.''' 16 | mtm -: sc00 '' 17 | mtm -: sc00 20$' ' 18 | 19 | l0 =: 'i.20',lf,'mtm -: sc00 l1',lf,'i.20' 20 | l1 =: 'i.21',lf,'mtm -: sc00 l2',lf,'i.21' 21 | l2 =: 'i.22' 22 | mtm -: sc00 l0 23 | 24 | t=:,('abc',.'=:',"1 ":x=:?3 2000$10000),"1 lf 25 | mtm -: sc00 t 26 | a -: 0{x 27 | b -: 1{x 28 | c -: 2{x 29 | 30 | 1 [ 0!:0 'x=: ''',(1050$'x'),'''' 31 | 32 | 1 [ 0!:100 'a=: 12345',:'b=: i.3 4' 33 | a -: 12345 34 | b -: i.3 4 35 | 36 | 'domain error' -: 0!: 0 etx 0 37 | 'domain error' -: 0!: 0 etx 2 38 | 'domain error' -: 0!: 1 etx 0 39 | 'domain error' -: 0!: 1 etx 2 40 | 'domain error' -: 0!:10 etx 0 41 | 'domain error' -: 0!:10 etx 2 42 | 'domain error' -: 0!:11 etx 0 43 | 'domain error' -: 0!:11 etx 2 44 | 'domain error' -: 0!:11 etx 0 45 | 'domain error' -: 0!:11 etx 2 46 | 47 | 0!:0 :i.2 10 10 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 11 | ,f"1 |."1 x 12 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4+255 13 | ,f"1 |."1 x 14 | 15 | 'domain error' -: +:/\. etx i.12 16 | 'domain error' -: +:/\. etx 3.4 5 17 | 'domain error' -: +:/\. etx 3j4 5 18 | 'domain error' -: +:/\. etx 'deipnosophist' 19 | 'domain error' -: +:/\. etx ;:'professors in New England' 20 | 'domain error' -: +:/\. etx u:'deipnosophist' 21 | 'domain error' -: +:/\. etx u:&.> ;:'professors in New England' 22 | 'domain error' -: +:/\. etx 10&u:'deipnosophist' 23 | 'domain error' -: +:/\. etx 10&u:&.> ;:'professors in New England' 24 | 'domain error' -: +:/\. etx s:@<"0 'deipnosophist' 25 | 'domain error' -: +:/\. etx s:@<"0&.> ;:'professors in New England' 26 | 'domain error' -: +:/\. etx <"0@s: ;:'professors in New England' 27 | 28 | 29 | 30 | 31 | epilog'' 32 | 33 | -------------------------------------------------------------------------------- /test/g111i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g111i.ijs' 2 | NB. *./ B --------------------------------------------------------------- 3 | 4 | 0 0 0 1 -: *./ 0 0 1 1 ,: 0 1 0 1 5 | 0 0 0 -: *./ #:i.8 6 | 0 0 0 0 0 0 0 1 -: *./"1 #:i.8 7 | 8 | and=: 4 : 'x*.y' 9 | 10 | (*./"1 -: and/"1) x=:0:i.2 10 10 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 11 | ,f"1 |."1 x 12 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4+255 13 | ,f"1 |."1 x 14 | 15 | 'domain error' -: *:/\. etx i.12 16 | 'domain error' -: *:/\. etx 3.4 5 17 | 'domain error' -: *:/\. etx 3j4 5 18 | 'domain error' -: *:/\. etx 'deipnosophist' 19 | 'domain error' -: *:/\. etx ;:'professors in New England' 20 | 'domain error' -: *:/\. etx u:'deipnosophist' 21 | 'domain error' -: *:/\. etx u:&.> ;:'professors in New England' 22 | 'domain error' -: *:/\. etx 10&u:'deipnosophist' 23 | 'domain error' -: *:/\. etx 10&u:&.> ;:'professors in New England' 24 | 'domain error' -: *:/\. etx s:@<"0 'deipnosophist' 25 | 'domain error' -: *:/\. etx s:@<"0&.> ;:'professors in New England' 26 | 'domain error' -: *:/\. etx <"0@s: ;:'professors in New England' 27 | 28 | 29 | 30 | 31 | 32 | epilog'' 33 | 34 | -------------------------------------------------------------------------------- /test/g132.ijs: -------------------------------------------------------------------------------- 1 | prolog './g132.ijs' 2 | NB. %:y ----------------------------------------------------------------- 3 | 4 | test =: ^&0.5 -: %: 5 | 6 | test 1=?2 3 4$2 7 | test _20+?50$50 8 | test o. _20+?50$50 9 | test r. ?3 4 5$100 10 | test i.0 3 4 11 | test i.3 0 12 | 13 | 1e_15 > | 1.41421356237309504880 - %: 2 14 | 1e_15 > | 1.73205080756887729352 - %: 3 15 | 1e_15 > | 3.16227766016837933199 - %: 10 16 | 1e_15 > | 1.61803398874989482820 - -:>:%:5 17 | 18 | 1e_15 > | 0j1.41421356237309504880 - %: _2 19 | 20 | 'domain error' -: %: etx 'abc' 21 | 'domain error' -: %: etx u:'abc' 22 | 'domain error' -: %: etx 10&u:'abc' 23 | 'domain error' -: %: etx s:@<"0 'abc' 24 | 'domain error' -: %: etx 3;4 5 25 | 26 | 27 | NB. x%:y ---------------------------------------------------------------- 28 | 29 | 'domain error' -: 3 4 %: etx 'ab' 30 | 'domain error' -: 3 4 %:~etx 'ab' 31 | 'domain error' -: 3 4 %: etx u:'ab' 32 | 'domain error' -: 3 4 %:~etx u:'ab' 33 | 'domain error' -: 3 4 %: etx 10&u:'ab' 34 | 'domain error' -: 3 4 %:~etx 10&u:'ab' 35 | 'domain error' -: 3 4 %: etx s:@<"0 'ab' 36 | 'domain error' -: 3 4 %:~etx s:@<"0 'ab' 37 | 'domain error' -: 3 4 %: etx 3;4 5 38 | 'domain error' -: 3 4 %:~etx 3;4 5 39 | 40 | 'length error' -: 3 4 %: etx i.4 3 41 | 'length error' -: 3 4 %:~etx i.4 3 42 | 43 | 44 | 45 | 46 | epilog'' 47 | 48 | -------------------------------------------------------------------------------- /test/g1x0.ijs: -------------------------------------------------------------------------------- 1 | prolog './g1x0.ijs' 2 | NB. 1!:0 ---------------------------------------------------------------- 3 | 4 | dir =: 1!:0 5 | read =: 1!:1 6 | size =: 1!:4 7 | 8 | test =: 3 : 0 9 | d=.5{."1 y 10 | assert. (0 e.$y)+.32-:type y NB. overall type 11 | assert. (2=#$y)*.5<:{:$y NB. overall shape 12 | assert. (~.type&>d)e. 2 4 4 2 2,:2 4 1 2 2 NB. type 13 | assert. ($&.>}."1 d) e.,&.>(6;'';9;6),:6;'';3;6 NB. shape 14 | assert. p e."_1&>(#&>p)$&.><'rwx',.'-' [ p=:3{"1 d NB. permission 15 | assert. (4{"1 d)e."_1&><'rhsvda',.'-' NB. attributes 16 | 1 17 | ) 18 | 19 | x=: 9!:12 '' 20 | win =: x e. 2 6 21 | mac =: x e. 3 22 | unix=: x e. 5 7 23 | pc =: x e. 0 1 2 6 24 | 25 | test dir '*.*' 26 | test dir (pc#'/*.*'),(unix#'/etc/p*') 27 | test dir (pc#'c:/autoexec.bat'),(unix#'/etc/passwd') 28 | 29 | p =: >{:4!:3 '' 30 | p =: < p ([ }.~ [: - |.@[ i. ]) (pc#'/'),(mac#':'),unix#'/' 31 | d =: dir p,&.><'*.ijs' 32 | s =: >2{"1 d 33 | s -: #@read p,&.>{."1 d 34 | s -: size p,&.>{."1 d 35 | 36 | 'domain error' -: dir etx 1 2 3 37 | 'domain error' -: dir etx 1.2 3 38 | 'domain error' -: dir etx 1j2 3 39 | 'domain error' -: dir etx <1 2 40 | 41 | 'rank error' -: dir etx 2 3$'ab' 42 | 43 | 44 | 45 | 46 | epilog'' 47 | 48 | -------------------------------------------------------------------------------- /test/g1x43.ijs: -------------------------------------------------------------------------------- 1 | prolog './g1x43.ijs' 2 | NB. 1!:43 and 1!:44 ----------------------------------------------------- 3 | 4 | (1=#$s) *. 2=type s=: 1!:43 '' 5 | '' -: 1!:44 s 6 | 7 | 'domain error' -: 1!:44 etx 0 1 0 8 | 'domain error' -: 1!:44 etx 1 2 3 9 | 'domain error' -: 1!:44 etx 1 2j3 10 | 'domain error' -: 1!:44 etx :) (x:!.0 y)%2x^m 26 | if. x<-:#":t do. t=. (1+x) round t end. 27 | ln2=. 2*+/1r3 (^%]) 1+2*i.>.0.5*(%3)^.0.5*0.1^x+>.10^.1>.m 28 | lnr=. 2*+/t (^%]) 1+2*i.>.0.5*(|t)^.0.5*0.1^x 29 | lnr + m * ln2 30 | ) 31 | 32 | 0.69314718055994530942 1.09861228866810969140 -: ln 2 3 33 | 34 | dv =: {{ 35 | if. 1 < N=: N+1 do. >: ' ' end. 36 | x dv"0 y 37 | }} 38 | 'domain error' -: 0 dv etx '.';'.' [ N =: 0 NB. Memory was corrupted because the error caused the recursive call not to free symbols 39 | 'domain error' -: 0 dv etx '.';'.' [ N =: 0 40 | 'domain error' -: 0 dv etx '.';'.' [ N =: 0 41 | 42 | 43 | 44 | 45 | 46 | epilog'' 47 | 48 | -------------------------------------------------------------------------------- /test/g220.ijs: -------------------------------------------------------------------------------- 1 | prolog './g220.ijs' 2 | NB. ~ ------------------------------------------------------------------- 3 | 4 | 3 -: 2 -~ 5 5 | 2.5 -: 2 %~ 5 6 | 7 | (x=:?2 3 4$1000) (-~ -: ] - [) y=:?2 3$1000 8 | (x=:?2 3 4$1000) (%~ -: ] % [) y=:?2 3$1000 9 | 10 | (+:t) -: +~t=:_50+?2 3 4$100 11 | (*:t) -: *~t=:o._50+?2 3 4$100 12 | 13 | mean=: +/ % # 14 | (mean x) -: 'mean'~ x=: ?100$1000 15 | 16 | 'value error' -: ex '''asdf''~ x' 17 | 18 | 'domain error' -: ex '0 0 1~ x' 19 | 'domain error' -: ex '1 2 3~ x' 20 | 'domain error' -: ex '1 2.3~ x' 21 | 'domain error' -: ex '1 2j3~ x' 22 | 'domain error' -: ex '1 23x~ x' 23 | 'domain error' -: ex '1 2r3~ x' 24 | 'domain error' -: ex '(<''mean'')~ x' 25 | 26 | 'ill-formed name' -: ex ' ''a___''~ 12' 27 | 'ill-formed name' -: ex ' ''a_gosh!_''~ 12' 28 | 'ill-formed name' -: ex '''a_gosh*@!_''~ 12' 29 | 'ill-formed name' -: ex ' ''do_gosh!_''~ 12' 30 | 31 | 32 | 33 | 34 | 35 | epilog'' 36 | 37 | -------------------------------------------------------------------------------- /test/g220t.ijs: -------------------------------------------------------------------------------- 1 | prolog './g220t.ijs' 2 | NB. ~ timing tests ------------------------------------------------------ 3 | 4 | ratio =: >./ % <./ 5 | 6 | test0=: 3 : 0 7 | xx=: 1e5?@$1e6 8 | t=: i. 0 2 9 | t=:t,10 timer '3+ xx',:'3+~xx' 10 | t=:t,10 timer '3- xx',:'3-~xx' 11 | t=:t,10 timer '3* xx',:'3*~xx' 12 | t=:t,10 timer '3% xx',:'3%~xx' 13 | t=:t,10 timer 'xx+xx',:'+~xx' 14 | t=:t,10 timer 'xx*xx',:'*~xx' 15 | THRESHOLD +. 5 > ratio"1 t 16 | ) 17 | 18 | test1=: 3 : 0 19 | i=: ?10 20 | yy=: 24000 10?@$1e6 21 | THRESHOLD +. 5 > ratio t=: 100 timer 'i{"1 yy',:'yy{~"1 i' 22 | ) 23 | 24 | test0 '' 25 | test1 '' 26 | 27 | 28 | 29 | 30 | 31 | epilog'' 32 | 33 | -------------------------------------------------------------------------------- /test/g222i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g222i.ijs' 2 | NB. ~:/ B --------------------------------------------------------------- 3 | 4 | 0 1 1 0 -: ~:/ 0 0 1 1 ,: 0 1 0 1 5 | 6 | ne=: 4 : 'x~:y' 7 | 8 | (~:/"1 -: ne/"1) x=:1=?3 5 17$13 9 | (~:/"2 -: ne/"2) x 10 | (~:/"3 -: ne/"3) x 11 | 12 | (~:/"1 -: ne/"1) x=:1=?3 5 32$13 13 | (~:/"2 -: ne/"2) x 14 | (~:/"3 -: ne/"3) x 15 | 16 | (~:/"1 -: ne/"1) x=:1=?3 8 32$13 17 | (~:/"2 -: ne/"2) x 18 | (~:/"3 -: ne/"3) x 19 | 20 | f=: 3 : '(~:/ -: ne/) y ?@$ 2' 21 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 22 | ,f"1 |."1 x 23 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 24 | ,f"1 |."1 x 25 | 26 | (ne/"1 -: ~:/"1) #: i.2^6 27 | (ne/"1 -: ~:/"1) #: i.2^7 28 | (ne/"1 -: ~:/"1) #: i.2^8 29 | (ne/"1 -: ~:/"1) #: i.2^9 30 | 31 | (ne/ -: ~:/ ) |: #: i.2^6 32 | (ne/ -: ~:/ ) |: #: i.2^7 33 | (ne/ -: ~:/ ) |: #: i.2^8 34 | (ne/ -: ~:/ ) |: #: i.2^9 35 | 36 | (ne/"1 -: ~:/"1) 0 ,"1 #: i.2^6 37 | (ne/"1 -: ~:/"1) 0 0 ,"1 #: i.2^6 38 | (ne/"1 -: ~:/"1) 0 0 0,"1 #: i.2^6 39 | 40 | (ne/ -: ~:/ ) |: 0 ,"1 #: i.2^6 41 | (ne/ -: ~:/ ) |: 0 0 ,"1 #: i.2^6 42 | (ne/ -: ~:/ ) |: 0 0 0,"1 #: i.2^6 43 | 44 | 45 | 46 | 47 | 48 | epilog'' 49 | 50 | -------------------------------------------------------------------------------- /test/g230i.ijs: -------------------------------------------------------------------------------- 1 | prolog './g230i.ijs' 2 | NB. |/ B --------------------------------------------------------------- 3 | 4 | 0 1 0 0 -: |/ 0 0 1 1 ,: 0 1 0 1 5 | 6 | res=: 4 : 'x|y' 7 | 8 | (|/"1 -: res/"1) x=:?3 5 17$2 9 | (|/"2 -: res/"2) x 10 | (|/"3 -: res/"3) x 11 | 12 | (|/"1 -: res/"1) x=:?3 5 32$2 13 | (|/"2 -: res/"2) x 14 | (|/"3 -: res/"3) x 15 | 16 | (|/"1 -: res/"1) x=:?3 8 32$2 17 | (|/"2 -: res/"2) x 18 | (|/"3 -: res/"3) x 19 | 20 | f=: 3 : '(|/ -: res/) y ?@$ 2' 21 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 22 | ,f"1 |."1 x 23 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 24 | ,f"1 |."1 x 25 | 26 | 27 | 28 | 29 | epilog'' 30 | 31 | -------------------------------------------------------------------------------- /test/g230s.ijs: -------------------------------------------------------------------------------- 1 | prolog './g230s.ijs' 2 | NB. |/\. B ------------------------------------------------------------- 3 | 4 | (0 1 0 0,:0 1 0 1) -: |/\. 0 0 1 1 ,: 0 1 0 1 5 | 6 | rem=: 4 : 'x|y' 7 | 8 | f=: 3 : '(|/\. -: rem/\.) y ?@$ 2' 9 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+ 255 10 | ,f"1 |."1 x 11 | ,f"1 x=:7 8 9,."0 1 [ _1 0 1+4*255 12 | ,f"1 |."1 x 13 | 14 | 'domain error' -: |/\. etx 'deipnosophist' 15 | 'domain error' -: |/\. etx ;:'professors in New England' 16 | 'domain error' -: |/\. etx u:'deipnosophist' 17 | 'domain error' -: |/\. etx u:&.> ;:'professors in New England' 18 | 'domain error' -: |/\. etx 10&u:'deipnosophist' 19 | 'domain error' -: |/\. etx 10&u:&.> ;:'professors in New England' 20 | 'domain error' -: |/\. etx s:@<"0 'deipnosophist' 21 | 'domain error' -: |/\. etx s:@<"0&.> ;:'professors in New England' 22 | 'domain error' -: |/\. etx <"0@s: ;:'professors in New England' 23 | 24 | 25 | 26 | epilog'' 27 | 28 | -------------------------------------------------------------------------------- /test/g2x.ijs: -------------------------------------------------------------------------------- 1 | prolog './g2x.ijs' 2 | NB. 2!:x ---------------------------------------------------------------- 3 | 4 | errnox =: 2!:8 5 | 6 | 'file name error' -: 1!:1 etx <'qifwbsxjntzrmupkovalycehdg/b/c/d/e' 7 | ('Wasm'-:UNAME) +. 2 -: >{.errnox '' 8 | 9 | 1:@(1!:0) jpath '~temp' 10 | ('Wasm'-:UNAME) +. 2 -: >{.errnox '' 11 | 12 | 'length error' -: errnox etx 1 2 3 13 | 'length error' -: errnox etx 1.2 3 14 | 'length error' -: errnox etx 1j2 3 15 | 'length error' -: errnox etx 'abc' 16 | 'rank error' -: errnox etx <1 2 17 | 18 | 19 | 20 | 21 | epilog'' 22 | 23 | -------------------------------------------------------------------------------- /test/g300t.ijs: -------------------------------------------------------------------------------- 1 | prolog './g300t.ijs' 2 | NB. -/ .* y timing tests ------------------------------------------------ 3 | 4 | h=: [: -/"1 {."2 * |."1@:({:"2) 5 | 6 | m=: 1024 %~ _5e5* 5000 2 2 ?@$1e6 7 | THRESHOLD +. 2 > | (-/ % <./) t=: (10 timer '-/ .* m') , 10 timer 'h m' NB. can be slow first time 8 | THRESHOLD +. 0.4 > | (-/ % <./) t=: (10 timer '-/ .* m') , 10 timer 'h m' 9 | 10 | 11 | 12 | 13 | epilog'' 14 | 15 | -------------------------------------------------------------------------------- /test/g301.ijs: -------------------------------------------------------------------------------- 1 | prolog './g301.ijs' 2 | NB. .. and .: ----------------------------------------------------------- 3 | 4 | 1: 0 : 0 5 | symm =: 2 : 'x -:@:+ x&y' 6 | skew =: 2 : 'x -:@:- x&y' 7 | 8 | sin =: 1&o. 9 | cos =: 2&o. 10 | sinh =: 5&o. 11 | cosh =: 6&o. 12 | 13 | sin1 =: ^ .: - &. j. 14 | cos1 =: ^@j. .. - 15 | sinh1 =: ^ .: - 16 | cosh1 =: ^ .. - 17 | 18 | sin2 =: ^ skew- &. j. 19 | cos2 =: ^@j.symm- 20 | sinh2 =: ^ skew- 21 | cosh2 =: ^ symm- 22 | 23 | x=:(0.01*_700+?20$1400),0,*/\4$0j1 24 | 25 | 1e_12 > | (sin - sin1 ) x 26 | 1e_12 > | (cos - cos1 ) x 27 | 1e_12 > | (sinh - sinh1) x 28 | 1e_12 > | (cosh - cosh1) x 29 | 30 | 1e_12 > | (sin - sin2 ) x 31 | 1e_12 > | (cos - cos2 ) x 32 | 1e_12 > | (sinh - sinh2) x 33 | 1e_12 > | (cosh - cosh2) x 34 | 35 | 36 | 37 | ) 38 | 39 | epilog'' 40 | 41 | -------------------------------------------------------------------------------- /test/g310names.ijs: -------------------------------------------------------------------------------- 1 | prolog './g310names.ijs' 2 | NB. names ---------------------------------------------------------------- 3 | 4 | abc_xyz_ -: p: i._5 [ 3 : ' abc_xyz_ =. p: i._5 ' 0 5 | abc_xyz_ -: 12 [ 3 : '''a abc_xyz_''=. 3 12 ' 0 6 | abc_xyz_ -: i.3 4 [ 3 : '".''abc_xyz_ =. i.3 4'' ' 0 7 | 8 | 'domain error' -: 3 : ' y =: 12 ' etx 0 9 | 'domain error' -: 3 : '". '' y =: 12''' etx 0 10 | 'domain error' -: 3 : ' ''a y''=: 12 3' etx 0 11 | 12 | 'domain error' -: 3 : ('a=. 3';' a =:3 ') etx 0 13 | 'domain error' -: 3 : ('a=. 3';'".'' a =:3''') etx 0 14 | 'domain error' -: 3 : ('a=. 3';' ''c a''=:3 ') etx 0 15 | 16 | 1 [ 3 : ('a=: 99 ?.@$ 1e6';'a=.12') 0 17 | a -: 99 ?.@$ 1e6 18 | 19 | 20 | (271828) 18!:55 <'xyz' 21 | 22 | 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/g311.ijs: -------------------------------------------------------------------------------- 1 | prolog './g311.ijs' 2 | NB. :. ------------------------------------------------------------------ 3 | 4 | f =: + :. - 5 | g =: - :. + 6 | (f b. _1) -: 5!:5 <'g' 7 | 8 | 'domain error' -: ex '3 4 :. ''+''' 9 | 'domain error' -: ex '3 4 :. +' 10 | 'domain error' -: ex '* :. ''+/''' 11 | 12 | 2 1 3 0 -: (C. =) :.(i.&1"1) ^:_1 ] 4 4 $ 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 NB. bivalent version failed 13 | 14 | 15 | 16 | 17 | epilog'' 18 | 19 | -------------------------------------------------------------------------------- /test/g312.ijs: -------------------------------------------------------------------------------- 1 | prolog './g312.ijs' 2 | NB. :: ------------------------------------------------------------------ 3 | 4 | f =: o. :: ('err'"0) 5 | 6 | (o.y) -: f y=:_20+?4 5$50 7 | (4 5 3$'err') -: f y=:(?4 5$256){a. 8 | 9 | (1 o.y) -: 1 f y=:0.1*_10+?4 5$20 10 | (4 5 3$'err') -: 1 f y=:(?4 5$256){a. 11 | 12 | g =: 3&+ :: ('err'"_) 13 | 14 | (3+y) -: g y=:_20+?4 5$50 15 | 'err' -: g y=:(?4 5$256){a. 16 | 17 | NB. Test u :: n 18 | 19 | g =: 3&+ :: 'err' 20 | 21 | (3+y) -: g y=:_20+?4 5$50 22 | 'err' -: g y=:(?4 5$256){a. 23 | 24 | f =: o. :: 'err' 25 | (o.y) -: f y=:_20+?4 5$50 26 | 'err' -: f y=:(?4 5$256){a. 27 | 28 | (1 o.y) -: 1 f y=:0.1*_10+?4 5$20 29 | 'err' -: 1 f y=:(?4 5$256){a. 30 | 31 | 32 | 33 | NB. OK now 'domain error' -: ex '+ :: 0 ' 34 | NB. OK now 'domain error' -: ex '+ :: 1 ' 35 | NB. OK now 'domain error' -: ex '+ :: 0 0 ' 36 | NB. OK now 'domain error' -: ex '+ :: ''a'' ' 37 | NB. OK now 'domain error' -: ex '+ :: (<0) ' 38 | 39 | 40 | 41 | 42 | epilog'' 43 | 44 | -------------------------------------------------------------------------------- /test/g321t.ijs: -------------------------------------------------------------------------------- 1 | prolog './g321t.ijs' 2 | NB. ,.&.>/y timing tests ------------------------------------------------ 3 | 4 | f =: >@(,.&.>/) 5 | ss =: +/ @: *: 6 | rsq=: [: -. ss@(- +/ % #)@[ %~ ss@:- 7 | 8 | ([ -: f@:(<"1)@|:) x=: 10 17?@$2 9 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#a.){a. 10 | ([ -: f@:(<"1)@|:) x=: 10 17?@$2e9 11 | ([ -: f@:(<"1)@|:) x=:j./2 10 17?@$2e9 12 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#t){t=:;:'Sui generis ec cle si as tic' 13 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#t){t=:(u:&.>) ;:'Sui generis ec cle si as tic' 14 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#t){t=:(10&u:&.>) ;:'Sui generis ec cle si as tic' 15 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#t){t=:s:@<"0&.> ;:'Sui generis ec cle si as tic' 16 | ([ -: f@:(<"1)@|:) x=: (10 17?@$#t){t=:<"0@s: ;:'Sui generis ec cle si as tic' 17 | 18 | (|:>34$./ % <./ 7 | 8 | a=: ;:'Cogito, ergo sum. boustrophedonic chthonic' 9 | y=: ". '6!:2 ''; t'' [ t=: a $~ ',"1 ": ,. x=: 1000*1+i.9 10 | THRESHOLD +. threshold < t=: y rsq y (] +/ .* %.) x^/0 1 11 | 12 | a=: (u:&.>) ;:'Cogito, ergo sum. boustrophedonic chthonic' 13 | y=: ". '6!:2 ''; t'' [ t=: a $~ ',"1 ": ,. x=: 1000*1+i.9 14 | THRESHOLD +. threshold < t=: y rsq y (] +/ .* %.) x^/0 1 15 | 16 | a=: (10&u:&.>) ;:'Cogito, ergo sum. boustrophedonic chthonic' 17 | y=: ". '6!:2 ''; t'' [ t=: a $~ ',"1 ": ,. x=: 1000*1+i.9 18 | THRESHOLD +. threshold < t=: y rsq y (] +/ .* %.) x^/0 1 19 | 20 | a=: s:@<"0&.> ;:'Cogito, ergo sum. boustrophedonic chthonic' 21 | y=: ". '6!:2 ''; t'' [ t=: a $~ ',"1 ": ,. x=: 1000*1+i.9 22 | THRESHOLD +. threshold < t=: y rsq y (] +/ .* %.) x^/0 1 23 | 24 | a=: <"0@s: ;:'Cogito, ergo sum. boustrophedonic chthonic' 25 | y=: ". '6!:2 ''; t'' [ t=: a $~ ',"1 ": ,. x=: 1000*1+i.9 26 | THRESHOLD +. threshold < t=: y rsq y (] +/ .* %.) x^/0 1 27 | 28 | x=:3000$a 29 | y=:(<$0),x 30 | THRESHOLD +. 5>ratio t=:100 timer&>';x';';y' 31 | 32 | 33 | 34 | 35 | 36 | epilog'' 37 | 38 | -------------------------------------------------------------------------------- /test/g3x02bak.ijs: -------------------------------------------------------------------------------- 1 | prolog './g3xbak.ijs' 2 | NB. old x: 64 bit -------------------------------------------------- 3 | 4 | assert (7927^i.4x) -: t=: 3!:2>cutLF {{)n 5 | e300000000000000 6 | 4000000000000000 7 | 0400000000000000 8 | 0100000000000000 9 | 0400000000000000 10 | 4800000000000000 11 | 7800000000000000 12 | a800000000000000 13 | e000000000000000 14 | e300000000000000 15 | 0400000000000000 16 | 0100000000000000 17 | 0100000000000000 18 | 0100000000000000 19 | 0100000000000000 20 | e300000000000000 21 | 0400000000000000 22 | 0100000000000000 23 | 0100000000000000 24 | 0100000000000000 25 | f71e000000000000 26 | e300000000000000 27 | 0400000000000000 28 | 0200000000000000 29 | 0100000000000000 30 | 0200000000000000 31 | a11c000000000000 32 | 8b18000000000000 33 | e300000000000000 34 | 0400000000000000 35 | 0300000000000000 36 | 0100000000000000 37 | 0300000000000000 38 | 471b000000000000 39 | 7e04000000000000 40 | 7513000000000000 41 | }} 42 | 43 | (1718235184;0;25;63584;256 512;768 256)-: 3!:2 fread testpath,'t1.ijf' 44 | 45 | erase 't' 46 | 47 | epilog'' 48 | -------------------------------------------------------------------------------- /test/g3x6.ijs: -------------------------------------------------------------------------------- 1 | prolog './g3x6.ijs' 2 | NB. 3!:6 ---------------------------------------------------------------- 3 | 4 | f=: ;:'professors in New England' 18 | 'domain error' -: !/\. etx 10&u:'deipnosophist' 19 | 'domain error' -: !/\. etx 10&u:&.> ;:'professors in New England' 20 | 'domain error' -: !/\. etx s:@<"0 'deipnosophist' 21 | 'domain error' -: !/\. etx s:@<"0&.> ;:'professors in New England' 22 | 'domain error' -: !/\. etx <"0@s: ;:'professors in New England' 23 | 24 | 25 | 26 | 27 | epilog'' 28 | 29 | -------------------------------------------------------------------------------- /test/g412.ijs: -------------------------------------------------------------------------------- 1 | prolog './g412.ijs' 2 | NB. !: treatement of placeholder argument ------------------------------- 3 | 4 | F=: 2 : 0 5 | assert. 'rank error' -: m!:n etx 0 6 | assert. 'rank error' -: m!:n etx 'a' 7 | assert. 'rank error' -: m!:n etx u:'a' 8 | assert. 'rank error' -: m!:n etx 10&u:'a' 9 | assert. 'rank error' -: m!:n etx s:@<"0 'a' 10 | assert. 'length error' -: m!:n etx 0 1 11 | assert. 'length error' -: m!:n etx 'ab' 12 | assert. 'length error' -: m!:n etx u:'ab' 13 | assert. 'length error' -: m!:n etx 10&u:'ab' 14 | assert. 'length error' -: m!:n etx s:@<"0 'ab' 15 | 1 16 | ) 17 | 18 | pc=: (9!:12 '') e. 0 1 2 6 7 19 | 20 | 1 F 20 21 | ". pc#'1 F 30' 22 | 4 F 3 23 | 6 F 8 24 | 6 F 9 25 | 7 F 0 26 | 7 F 3 27 | 9 F 0 28 | 9 F 2 29 | 9 F 6 30 | 9 F 8 31 | 9 F 10 32 | 9 F 12 33 | 9 F 14 34 | 9 F 16 35 | 9 F 18 36 | 9 F 20 37 | 9 F 24 38 | 9 F 26 39 | 9 F 28 40 | 9 F 34 41 | 9 F 36 42 | 9 F 38 43 | 9 F 40 44 | 13 F 1 45 | 13 F 2 46 | 13 F 4 47 | 13 F 5 48 | 13 F 14 49 | 13 F 17 50 | 13 F 18 51 | 18 F 5 52 | 53 | 54 | 55 | 56 | 57 | epilog'' 58 | 59 | -------------------------------------------------------------------------------- /test/g420ce.ijs: -------------------------------------------------------------------------------- 1 | prolog './g420ce.ijs' 2 | NB. ,&.>/"r y ----------------------------------------------------------- 3 | 4 | c=: , 5 | 6 | a=: ' 0123456789',(,65 97+/i.26){a. 7 | 8 | f=: 3 : 0 9 | assert. (c&.>/ -: ,&.>/) y 10 | for_r. i.#$y do. 11 | assert. (c&.>/"r -: ,&.>/"r) y 12 | end. 13 | 1 14 | ) 15 | 16 | f y=: <"0 ] _5e5+11 19 13 ?@$ 1e6 17 | f y=: <"0 ] 11 19 13 ?@$ 0 18 | f y=: <"0 a{~11 19 13 ?@$ #a 19 | 20 | NB. unit length axis 21 | 22 | f y=: <"0 a{~11 19 1 ?@$ #a 23 | f y=: <"0 a{~11 1 13 ?@$ #a 24 | f y=: <"0 a{~ 1 19 13 ?@$ #a 25 | 26 | f y=: <"0 a{~1 1 1 ?@$ #a 27 | 28 | NB. 0-length axis 29 | 30 | f y=: <"0 a{~11 19 0 ?@$ #a 31 | f y=: <"0 a{~11 0 13 ?@$ #a 32 | f y=: <"0 a{~ 0 19 13 ?@$ #a 33 | 34 | f y=: <"0 a{~0 0 0 ?@$ #a 35 | 36 | NB. non-boxed arguments 37 | 38 | f y=: _5e5+11 19 13 ?@$ 1e6 39 | f y=: 11 19 13 ?@$ 0 40 | f y=: a{~11 19 13 ?@$ #a 41 | 42 | NB. scalar arguments 43 | 44 | f y=: <4 45 | f y=: <4.5 46 | f y=: <2 3$'abcd' 47 | f y=: <2 3$u:'abcd' 48 | f y=: <2 3$10&u:'abcd' 49 | f y=: <2 3$s:@<"0 'abcd' 50 | f y=: 4 51 | f y=: 4.5 52 | f y=: 'a' 53 | f y=: u:'a' 54 | f y=: 10&u:'a' 55 | f y=: s:@<"0 'a' 56 | 57 | 58 | 59 | 60 | 61 | epilog'' 62 | 63 | -------------------------------------------------------------------------------- /test/g420r2.ijs: -------------------------------------------------------------------------------- 1 | prolog './g420r2.ijs' 2 | NB. f/"r y over an axis of length 2 ------------------------------------- 3 | 4 | (= /"1 -: 4 : 'x= y'/"1) b=: 3 5 7 2 ?@$ 2 5 | (< /"1 -: 4 : 'x< y'/"1) b 6 | (<./"1 -: 4 : 'x<.y'/"1) b 7 | (<:/"1 -: 4 : 'x<:y'/"1) b 8 | (> /"1 -: 4 : 'x> y'/"1) b 9 | (>./"1 -: 4 : 'x>.y'/"1) b 10 | (>:/"1 -: 4 : 'x>:y'/"1) b 11 | (+./"1 -: 4 : 'x+.y'/"1) b 12 | (+:/"1 -: 4 : 'x+:y'/"1) b 13 | (*./"1 -: 4 : 'x*.y'/"1) b 14 | (*:/"1 -: 4 : 'x*:y'/"1) b 15 | (~:/"1 -: 4 : 'x~:y'/"1) b 16 | 17 | 18 | 19 | epilog'' 20 | 21 | -------------------------------------------------------------------------------- /test/g421p.ijs: -------------------------------------------------------------------------------- 1 | prolog './g421p.ijs' 2 | NB. x +//.@(*/) y special code ----------------------------------------- 3 | 4 | NB. test failed on small ct 5 | ct =: 9!:18'' 6 | 9!:19[5e_11 7 | 8 | test=: 4 : 0 9 | xx=: x{~53 ?@$ #x 10 | yy=: y{~61 ?@$ #y 11 | assert. (xx +//.@(*/) yy) Nearmt +//. xx */ yy 12 | assert. (yy +//.@(*/) xx) Nearmt +//. yy */ xx 13 | 1 14 | ) 15 | 16 | test&>/~ 0 1;(_500+?@$~1000);(100 ?@$ 0); j./2 100 ?@$ 0 17 | 18 | 19 | 9!:19 ct 20 | 21 | 22 | 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/g421t.ijs: -------------------------------------------------------------------------------- 1 | prolog './g421t.ijs' 2 | NB. x #/. y ------------------------------------------------------------- 3 | 4 | randuni'' 5 | 6 | tally=: 3 : '#y' 7 | 8 | test=: 3 : 0 9 | assert. (#/.~ -: tally/.~) xx=: y{~?1000 $#y 10 | assert. (#/.~ -: tally/.~) xx=: y{~ 1000 $0 11 | assert. (#/.~ -: tally/.~) xx=: y{~ 0 $#y 12 | assert. (#/.~ -: tally/.~) xx=: y{~?1000 2$#y 13 | assert. (#/.~ -: tally/.~) xx=: y{~?1000 5$#y 14 | assert. (#/.~ -: tally/.~) xx=: y{~?1000 5$#y 15 | assert. (#/.~ -: tally/.~) xx=: y{~ 1000 5$0 16 | assert. (#/.~ -: tally/.~) xx=: y{~ 0 5$#y 17 | assert. (#/.~ -: tally/.~) xx=: 0#y 18 | assert. (#/.~ -: tally/.~) xx=: '' ($,)y 19 | 1 20 | ) 21 | 22 | test 0 1 23 | test 1 0 24 | test a. 25 | test adot1 26 | test adot2 27 | test sdot0 28 | test i.900 29 | test _450+i.900 30 | test 1e6+i.900 31 | test _1e6+i.900 32 | test u: 100 ?@$ 65536 33 | test 10&u: RAND32 100 ?@$ C4MAX 34 | test o.i.900 35 | test o._450+i.900 36 | test <"0 ?40$100 37 | 38 | 39 | 'length error' -: 1 2 3 #/. etx i.4 40 | 41 | 42 | randfini'' 43 | 44 | epilog'' 45 | 46 | -------------------------------------------------------------------------------- /test/g422os.ijs: -------------------------------------------------------------------------------- 1 | prolog './g422os.ijs' 2 | NB. x{/:~y (order statistics) ------------------------------------------- 3 | 4 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 100 ?@$ 60 5 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 0.1 * 100 ?@$ 60 6 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 100 ?@$ 10000 7 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 0.1 * 100 ?@$ 10000 8 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 100 $ 10000 9 | (/:~y) -: (i.#y) ({/:~)"0 1 y=: 100 $ 34.5 10 | NB. y -: (/:~y) {~ (i.#y) ({/:)"0 1 y=: 100 ?@$ 60 11 | 12 | y=: 1000 ?@$ 600 13 | x=: n -~ 20 ?@$ +:n=: #y 14 | (x{/:~y) -: x ({/:~)"0 1 y 15 | y=: 0.1 * y 16 | (x{/:~y) -: x ({/:~)"0 1 y 17 | 18 | 0 0 0 0 1 3 3 -: 0 0 0 0 1 2 2 ({ /:) 0 1 4 2 5 6 3 19 | 20 | NB. Verify special code used 21 | y=: 1000 ?@$ 1e6 NB. avoid small-range! 22 | THRESHOLD +. 0.7 > %/ 10000&(6!:2) '5 ({ /:) y' ,: '5 ({ /:"]) y' NB. 0.64 on vs2019 avx2 23 | THRESHOLD +. 0.7 > %/ 10000&(6!:2) '5 ({ /:~) y' ,: '5 ({ /:~"]) y' NB. 0.53 on raspi32 0.68 on vs2019 avx2 24 | y=: 0.1 * y 25 | THRESHOLD +. 0.7 > %/ 10000&(6!:2) '5 ({ /:) y' ,: '5 ({ /:"]) y' NB. 0.66 on vs2019 avx2 26 | THRESHOLD +. 0.75 > %/ 10000&(6!:2) '5 ({ /:~) y' ,: '5 ({ /:~"]) y' NB. 0.71 on vs2019 avx2 27 | 28 | 'domain error' -: 'a' ({/:~) etx y 29 | 30 | 'index error' -: 1e6 ({/:~) etx y 31 | 'index error' -: _1e6 ({/:~) etx y 32 | 33 | 34 | 35 | 36 | epilog'' 37 | 38 | -------------------------------------------------------------------------------- /test/g422tao.ijs: -------------------------------------------------------------------------------- 1 | prolog './g422tao.ijs' 2 | NB. /:y ----------------------------------------------------------------- 3 | 4 | NB. The TAO (total array ordering) of J 5 | 6 | ge=: 0 1 -: \:@,&< 7 | gt=: 1 0 -: /:@,&< 8 | le=: 0 1 -: /:@,&< 9 | lt=: 1 0 -: \:@,&< 10 | eq=: -:!.0 11 | 12 | 1 = 1 2 3 gt 0 1 2 3 4 13 | 0 = 1 2 3 gt i.2 5 14 | 0 = 1 2 3 gt i.2 5 15 | 0 = 123 gt '123' 16 | 1 = 3j4 gt 2j7 17 | 18 | 19 | epilog'' 20 | 21 | -------------------------------------------------------------------------------- /test/g430inv.ijs: -------------------------------------------------------------------------------- 1 | prolog './g430inv.ijs' 2 | NB. inverses of scans --------------------------------------------------- 3 | 4 | inv=: 1 : 'u^:_1' 5 | 6 | w -: +/\ inv +/\ w=:_20+?20 3$50 7 | w -: -/\ inv -/\ w=:_20+?30 3$50 8 | w -: */\ inv */\ w=:w+0=w=:0.5*_20+?25 4$50 9 | w -: %/\ inv %/\ w=:w+0=w=:0.5*_20+?25 4$50 10 | w -: =/\ inv =/\ w=:1=?40 2$3 11 | w -: ~:/\ inv ~:/\ w=:1=?40 2$3 12 | 13 | w -: +/\. inv +/\. w=:_20+?20 3$50 14 | w -: -/\. inv -/\. w=:_20+?30 3$50 15 | w -: */\. inv */\. w=:w+0=w=:0.5*_20+?25 4$50 16 | w -: %/\. inv %/\. w=:w+0=w=:0.5*_20+?25 4$50 17 | w -: =/\. inv =/\. w=:1=?40 2$3 18 | w -: ~:/\. inv ~:/\. w=:1=?40 2$3 19 | 20 | 21 | 22 | 23 | epilog'' 24 | 25 | -------------------------------------------------------------------------------- /test/g4x5.ijs: -------------------------------------------------------------------------------- 1 | prolog './g4x5.ijs' 2 | NB. 4!:5 ---------------------------------------------------------------- 3 | 4 | nch =: 4!:5 5 | nch_bar_=: 4!:5 6 | erase =: 4!:55 7 | 8 | 1 [ nch 1 9 | abc=: 1 2 3 10 | foo_bar_=:3 4 5 11 | foo=:'in base locale' 12 | boo__=:12 13 | (t=:nch 1) -: ;:'abc_base_ boo_base_ foo_bar_ foo_base_' 14 | 15 | abc=: 1 2 3 16 | foo_bar_=:3 4 5 17 | foo=:'in base locale' 18 | boo__=:12 19 | (t=:nch_bar_ 1) -: ;:'abc_base_ boo_base_ foo_bar_ foo_base_ t_base_' 20 | 21 | abc=: 1 2 3 22 | abc=: 'xyz' 23 | (t=:nch 1) -: ;:'abc_base_ t_base_' 24 | 25 | 1 [ ".('a',.>":&.>i.30),"1 '=:123' 26 | erase 'a',&.>":&.>i.5 27 | (t=:nch 1) -: /:~ ,&'_base_'&.> (<,'t'),'a',&.>":&.>5+i.25 28 | erase 'a',&.>":&.>5+i.25 29 | 30 | nch 0 31 | abc=: 1 2 3 32 | nch 1 33 | foo_bar_=:3 4 5 34 | boo__=:12 35 | (t=:nch 1) -: ;:'boo_base_ foo_bar_' 36 | 37 | f=: 3 : 0 38 | abc=: 6 49 39 | i=.1+y 40 | foo_bar_=: 'hope to do good' 41 | boo=.19 42 | 1 43 | ) 44 | 45 | f 12 46 | f 15 47 | (t=:nch 1) -: ;:'abc_base_ f_base_ foo_bar_ t_base_' 48 | 49 | 'domain error' -: nch etx 34 50 | 'domain error' -: nch etx 3.4 51 | 'domain error' -: nch etx 3j4 52 | 'domain error' -: nch etx 'a' 53 | 'domain error' -: nch etx <1 54 | 55 | 'rank error' -: nch etx 1 0 1 56 | 'rank error' -: nch etx '' 57 | 58 | nch 0 59 | 60 | (271828) 18!:55 ;:'bar' 61 | 62 | 63 | 64 | 65 | epilog'' 66 | 67 | -------------------------------------------------------------------------------- /test/g500.ijs: -------------------------------------------------------------------------------- 1 | prolog './g500.ijs' 2 | NB. [ -------------------------------------------------------------------- 3 | 4 | xb =: ?2 3 4$2 5 | xa =: 'Fourscore and seven years ago' 6 | xi =: ?9 12$100000 7 | xd =: o.?1 2 3$100000 8 | xj =: j.&?~2 2 3 3$1000 9 | 10 | xb -: xb [ xb 11 | xb -: xb [ xa 12 | xb -: xb [ xi 13 | xb -: xb [ xd 14 | xb -: xb [ xj 15 | 16 | xa -: xa [ xb 17 | xa -: xa [ xa 18 | xa -: xa [ xi 19 | xa -: xa [ xd 20 | xa -: xa [ xj 21 | 22 | xi -: xi [ xb 23 | xi -: xi [ xa 24 | xi -: xi [ xi 25 | xi -: xi [ xd 26 | xi -: xi [ xj 27 | 28 | xd -: xd [ xb 29 | xd -: xd [ xa 30 | xd -: xd [ xi 31 | xd -: xd [ xd 32 | xd -: xd [ xj 33 | 34 | xj -: xj [ xb 35 | xj -: xj [ xa 36 | xj -: xj [ xi 37 | xj -: xj [ xd 38 | xj -: xj [ xj 39 | 40 | x=: i.1e4 41 | y=: 2e4$'boustrophedonic chuffed' 42 | 43 | (IF64{1000 2400) > 7!:2 'x[y' 44 | 45 | 46 | 47 | 48 | 49 | epilog'' 50 | 51 | -------------------------------------------------------------------------------- /test/g5x6.ijs: -------------------------------------------------------------------------------- 1 | prolog './g5x6.ijs' 2 | NB. 5!:6 ---------------------------------------------------------------- 3 | 4 | lr=: 5!:5 5 | pr=: 5!:6 6 | 7 | sumsq=: +/ @: *: 8 | xtx =: |: ((+/) .*) ] 9 | 10 | '+/@:*:' -: lr <'sumsq' 11 | '(+/)@:*:' -: pr <'sumsq' 12 | 13 | '|: +/ .* ]' -: lr <'xtx' 14 | '|: ((+/) .*) ]' -: pr <'xtx' 15 | 16 | 17 | 18 | 19 | epilog'' 20 | 21 | -------------------------------------------------------------------------------- /test/g610.ijs: -------------------------------------------------------------------------------- 1 | prolog './g610.ijs' 2 | NB. ` ------------------------------------------------------------------- 3 | 4 | do =: 0!:100 5 | ar =: 5!:1 6 | test =: 2 : 0 7 | do 'f9=.',u 8 | do 'g9=.',v 9 | =&ar/;:'f9 g9' 10 | ) 11 | 12 | '+ -' test '+`- `:6' 13 | '+ - *' test '+`-`* `:6' 14 | '+ - * %' test '+`-`*`% `:6' 15 | 16 | a =: `(<;:'@:"0') 17 | ((<,'+') , <;:'@:"0') -: + a 18 | e =: `(< (<,'3') , <,'0';'+:';'-') 19 | ((<,'+') , < (<,'3') , <,'0';'+:';'-') -: + e 20 | 21 | 20000 > 7!:2 '(16000#''a'')`(20#''b'')`(30#''c'')' NB. append in place 22 | 23 | 24 | 25 | epilog'' 26 | 27 | -------------------------------------------------------------------------------- /test/g612.ijs: -------------------------------------------------------------------------------- 1 | prolog './g612.ijs' 2 | NB. x`:y ---------------------------------------------------------------- 3 | 4 | f =: - ` % ` ^ `: 0 5 | y =: 2 3 6 | x =: 5 7 7 | (( -y),( %y),: ^y) -: f y 8 | ((5-y),(5%y),:5^y) -: 5 f y 9 | ((x-y),(x%y),:x^y) -: x f y 10 | 11 | (;/ -: ;`;`:3) x=: 10 ?@$ 1e6 12 | (;/ -: ;`;`:3) x=: 10 3 ?@$ 1e6 13 | 14 | 'domain error' -: ex '-`a`:0 ' [ a=: 5!:1 <'plus' [ plus=: '+' 15 | 'domain error' -: ex '-`a/ ' 16 | 'domain error' -: ex '-`a/.' 17 | 'domain error' -: ex '-`a\ ' 18 | 'domain error' -: ex '-`a\.' 19 | 'domain error' -: ex '-`a;. 1' 20 | 'domain error' -: ex '-`a;._1' 21 | 'domain error' -: ex '-`a;. 2' 22 | 'domain error' -: ex '-`a;._2' 23 | 24 | 25 | 26 | 27 | 28 | epilog'' 29 | 30 | -------------------------------------------------------------------------------- /test/g620.ijs: -------------------------------------------------------------------------------- 1 | prolog './g620.ijs' 2 | NB. @ ------------------------------------------------------------------- 3 | 4 | ({.x|.y) -: (x=:?20) {.@|. y=:?20 3$1000 5 | 6 | 1 -: 0 1 (-~/@[) 1 7 | 8 | 'domain error' -: ". etx '3 @ 3' 9 | 'domain error' -: ". etx '3 @ +' 10 | 6 -: +:@3 '' 11 | 6 -: '' +:@3 '' 12 | _ _ _ -: +:@3 b. 0 13 | 14 | 15 | 16 | 17 | epilog'' 18 | 19 | -------------------------------------------------------------------------------- /test/g620a.ijs: -------------------------------------------------------------------------------- 1 | prolog './g620a.ijs' 2 | NB. ^@o. ---------------------------------------------------------------- 3 | 4 | (^o.z) -: ^@o. z=: 0 j. 0.5 * i.5 4 5 | (^o.z) -: ^@o. z=: 1 j. 0.5 * i.5 4 6 | (^o.z) -: ^@o. z=: 20 j. 0.5 * i.5 4 7 | 8 | (^o.z) -: ^@o. z=: 0 j. _0.5 * i.5 4 9 | (^o.z) -: ^@o. z=: 1 j. _0.5 * i.5 4 10 | (^o.z) -: ^@o. z=: 20 j. _0.5 * i.5 4 11 | 12 | (^o.z) -: ^@o. z=: 0 j. 10 + 0.5 * i.5 4 13 | (^o.z) -: ^@o. z=: 1 j. 10 + 0.5 * i.5 4 14 | (^o.z) -: ^@o. z=: 20 j. 10 + 0.5 * i.5 4 15 | 16 | (^o.z) -: ^@o. z=: 0 j. 10 + _0.5 * i.5 4 17 | (^o.z) -: ^@o. z=: 1 j. 10 + _0.5 * i.5 4 18 | (^o.z) -: ^@o. z=: 20 j. 10 + _0.5 * i.5 4 19 | 20 | (^o.z) -: ^@o. z=: 0 j. 0.33333 _0.33333 21 | 22 | (^o.x) -: ^@o. x=: _0.5 + 23 ?@$ 0 23 | (^o.x) -: ^@o. x=: x: %/ 0.01 * 1+ 2 37 ?@$ 1000 24 | 25 | 'domain error' -: ^@o. etx 'abc' 26 | 'domain error' -: ^@o. etx <3j4 27 | 28 | 29 | 30 | 31 | epilog'' 32 | 33 | -------------------------------------------------------------------------------- /test/g622.ijs: -------------------------------------------------------------------------------- 1 | prolog './g622.ijs' 2 | NB. @: ------------------------------------------------------------------ 3 | 4 | ( x*y) -: (x=.?10$200) +/@ * (y=.?10$2000) 5 | (+/x*y) -: (x=.?10$200) +/@:* (y=.?10$2000) 6 | 7 | NB. temporary workaround for special code bugs 8 | NB. (3 3$1 1 1 0 0 0 0 0 0) -: (i. 3 3 3 3 3) +/@:e. i. 3 3 3 9 | NB. 1 1 -: +/@e.&(i. 2 3) i. 2 2 3 10 | NB. 'nonce error' -: ,&.>/ etx (i. 5);4;i. 2 3 11 | 12 | 'domain error' -: ". etx '3 @: +' 13 | 'domain error' -: ". etx '+ @: 3' 14 | 'domain error' -: ". etx '3 @: 3' 15 | 16 | 17 | 18 | 4!:55 ;:'x y' 19 | epilog'' 20 | 21 | -------------------------------------------------------------------------------- /test/g630.ijs: -------------------------------------------------------------------------------- 1 | prolog './g630.ijs' 2 | NB. & ------------------------------------------------------------------- 3 | 4 | ((|.x),|.y) -: (x=:'Cogito, ergo sum.') ,&|. y=:'I think not' 5 | ((|.x),|.y) -: (x=:u:'Cogito, ergo sum.') ,&|. y=:u:'I think not' 6 | ((|.x),|.y) -: (x=:10&u:'Cogito, ergo sum.') ,&|. y=:10&u:'I think not' 7 | ((|.x),|.y) -: (x=:s:@<"0 'Cogito, ergo sum.') ,&|. y=:s:@<"0 'I think not' 8 | 9 | dr =: 5!:2 10 | 11 | f =: 3 4 5 6&+ 12 | (,&.>3 4 5 6;'&';'+') -: dr <'f' 13 | (f i.4 3) -: 3 4 5 6+"_ i.4 3 14 | 15 | f =: -&3 4 5 6 16 | (,&.>'-';'&';3 4 5 6) -: dr <'f' 17 | (f i.4 3) -: (i.4 3)-"_ [3 4 5 6 18 | 19 | 'valence error' -: 1000 (128&>:) etx 0 20 | 21 | 22 | 23 | 24 | 25 | epilog'' 26 | 27 | -------------------------------------------------------------------------------- /test/g631c.ijs: -------------------------------------------------------------------------------- 1 | prolog './g631c.ijs' 2 | NB. u&.:v --------------------------------------------------------------- 3 | 4 | f0=: +/&.:*: 5 | f1=: %: @: (+/) @: *: 6 | 7 | (f0 -: f1)"1 ] _50+?4 10 5$100 8 | 9 | 10 | 11 | 12 | 13 | epilog'' 14 | 15 | -------------------------------------------------------------------------------- /test/g632.ijs: -------------------------------------------------------------------------------- 1 | prolog './g632.ijs' 2 | NB. &: ------------------------------------------------------------------ 3 | 4 | (+/~"1+:i.2 3) -: (i.2 3) +/& (+:"1) i.2 3 5 | (+/~ +:i.2 3) -: (i.2 3) +/&:(+:"1) i.2 3 6 | 7 | 'domain error' -: ". etx '3 &: +' 8 | 'domain error' -: ". etx '+ &: 3' 9 | 'domain error' -: ". etx '3 &: 3' 10 | 11 | 12 | 13 | epilog'' 14 | 15 | -------------------------------------------------------------------------------- /test/g6x0.ijs: -------------------------------------------------------------------------------- 1 | prolog './g6x0.ijs' 2 | NB. 6!:0 ---------------------------------------------------------------- 3 | 4 | ts=: 6!:0 5 | 6 | t=: ts '' 7 | (,6) = $t 8 | (-: <.) 5{.t 9 | *./ 0 <: t 10 | 1990 <: 0{t 11 | *./ (1&<: *. <:&12 31) 1 2{t 12 | 24 60 60 *./ . > 3 4 5{t 13 | 14 | t=: ts x=: 'YYYY-MM-DD hh:mm:ss.sss' 15 | t -:&$ x 16 | t -:&(3!:0) x 17 | t -:&((-.x e. 'YMDhms')&#) x 18 | 19 | 'domain error' -: ts etx 3 4 5 20 | 'domain error' -: ts etx <'YYYY-MM-DD hh:mm:ss.sss' 21 | 22 | 'rank error' -: ts etx ,: 'YYYY-MM-DD hh:mm:ss.sss' 23 | 24 | 1 [ 6!:3 (55&< * 60&-) 5{ts '' NB. delay til a new minute if close to it 25 | (}.;'-'&,@}.@":&.>10000 100 100+3{.ts '') -: ts 'YYYY-MM-DD' 26 | (ts -: ts@u:) 'YYYY-MM-DD' 27 | (ts -: ts@u:) 'MM/DD/YY hh:mm' 28 | (ts -: ts@(10&u:)) 'YYYY-MM-DD' 29 | (ts -: ts@(10&u:)) 'MM/DD/YY hh:mm' 30 | (":{.ts '') -: ts 'YYYY' 31 | (_2{.":{.ts '') -: ts 'YY' 32 | 33 | 34 | 35 | epilog'' 36 | 37 | -------------------------------------------------------------------------------- /test/gchar.ijs: -------------------------------------------------------------------------------- 1 | prolog './gchar.ijs' 2 | NB. char signed vs unsigned 3 | 1[0 : 0 4 | signed char - default char on windows/linux/darwin compilers 5 | unsigned char - default char on ARM (except iOS) 6 | previous tests ran clean with this compiler difference 7 | tests below catch the difference 8 | 9 | jtype.h has: typedef char C; 10 | 11 | perhaps it should be: typedef signed char C; 12 | 13 | but the above change causes problems on raspbian 14 | so I am not willing to take that leap right now 15 | 16 | a compiler option should be used to change the 17 | compiler default from unsigned char to be signed char 18 | 19 | raspbian build is done with compiler option fsigned-char 20 | ) 21 | 22 | 9082 32 215 32 9077 = 3 u: 7 u: 226 141 186 32 195 151 32 226 141 181{a. 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/gct.ijs: -------------------------------------------------------------------------------- 1 | prolog './gct.ijs' 2 | NB. comparison tolerance ------------------------------------------------ 3 | 4 | e=: 0, 2 ^ - 42 43 45 46 52 53 5 | 6 | f=: 3 : 0 7 | xx=: y 8 | yy=: y*1-e 9 | assert. 1 0 0 1 1 1 1 -: xx = yy 10 | assert. 0 1 1 0 0 0 0 -: xx ~: yy 11 | assert. 0 0 0 0 0 0 0 -: xx < yy 12 | assert. 1 0 0 1 1 1 1 -: xx <: yy 13 | assert. 0 1 1 0 0 0 0 -: xx > yy 14 | assert. 1 1 1 1 1 1 1 -: xx >: yy 15 | assert. 0 1 2 0 0 0 0 -: i.~ yy 16 | assert. 0 1 2 0 0 0 0 -: yy i. 0+yy 17 | assert. 6 1 2 6 6 6 6 -: i:~ yy 18 | assert. 6 1 2 6 6 6 6 -: yy i: 0+yy 19 | assert. 1 1 1 0 0 0 0 -: ~: yy 20 | assert. 0 1 2 -: I.@~: yy 21 | assert. (3{.yy) -: ~. yy 22 | assert. (1 2{yy) -: yy -. xx 23 | assert. (1 2{yy) -: yy -. 13$xx 24 | assert. (i < /.i.#e) -: yy < /.i.#e [ i=: i.~yy 25 | assert. (i +//.i.#e) -: yy +//.i.#e [ i=: i.~yy 26 | assert. (i # /.i.#e) -: yy # /.i.#e [ i=: i.~yy 27 | 1 28 | ) 29 | 30 | f"0 ]1 31 | f"0 ]0.001 * 5 10 ?@$ 2e9 32 | 33 | 34 | 35 | 36 | 37 | epilog'' 38 | 39 | -------------------------------------------------------------------------------- /test/gfft.ijs: -------------------------------------------------------------------------------- 1 | prolog './gfft.ijs' 2 | NB. FFT addon ----------------------------------------------------------- 3 | 4 | NB. obsolete s48=: 9!:48 '' 5 | NB. obsolete 9!:49 ]1 6 | 7 | load jpath '~addons/math/fftw/fftw.ijs' 8 | 9 | x=: 1024 %~ ?100$1e5 10 | 1 >: +/ x ~:!.1e_12 ifftw fftw x 11 | NB. obsolete 9!:49 s48 12 | 13 | 14 | 15 | 16 | 17 | epilog'' 18 | 19 | -------------------------------------------------------------------------------- /test/gft.ijs: -------------------------------------------------------------------------------- 1 | prolog './gft.ijs' 2 | NB. f. and performance -------------------------------------------------- 3 | 4 | tally=: # 5 | plus =: + 6 | sum =: plus/ 7 | mean =: sum % tally 8 | rev =: |. 9 | 10 | x=: 5e5?@$100 11 | y=: 5e5?@$100 12 | 13 | s=: 10 timer 'x #/. y' 14 | t=: 10 timer 'x tally/.f. y' 15 | THRESHOLD +. (1-*:threshold) > | (s-t)%s 16 | 17 | s=: 10 timer '+/y' 18 | t=: 10 timer 'sum f. y' 19 | THRESHOLD +. (1-*:threshold) > | (s-t)%s 20 | 21 | s=: 10 timer '(+/ % #) y' 22 | t=: 10 timer 'mean f. y' 23 | THRESHOLD +. (1-*:threshold) > | (s-t)%s 24 | 25 | y=: (1e5 7?@$#a.){a. 26 | s=: 10 timer '|."1 y' 27 | t=: 10 timer 'rev"1 f. y' 28 | THRESHOLD +. (1-*:threshold) > | (s-t)%s 29 | 30 | 31 | 32 | 33 | 34 | epilog'' 35 | 36 | -------------------------------------------------------------------------------- /test/gi0.ijs: -------------------------------------------------------------------------------- 1 | prolog './gi0.ijs' 2 | NB. x i.y on boolean scalar y ------------------------------------------- 3 | 4 | f0=: 4 : 0 " 0 5 | if. y:^:yy 0 7 | assert. 1: yy $ 4 8 | assert. 1: yy # 4 9 | assert. 1: yy{ i.120 10 | assert. 1: yy{.1 2 3 11 | assert. 1: yy}.1 2 3 12 | assert. 1: +"yy 1 13 | assert. 1: i. yy 14 | assert. 1: i: yy 15 | 1 16 | ) 17 | 18 | e=: 1e_14 19 | 20 | f (1+e)*x=: >:20 ?@$100 21 | f (1-e)*x 22 | 23 | 1 [ 1 +: (1+e),1-e 24 | 1 [ 1 +:~(1+e),1-e 25 | 1 [ 1 *: (1+e),1-e 26 | 1 [ 1 *:~(1+e),1-e 27 | 28 | 1 [ ( 1+e) $. 1 2 3 29 | 1 [ ( 1-e) $. 1 2 3 30 | 1 [ (2*1+e) $. $. 100 ?@$ 2 31 | 1 [ (2*1-e) $. $. 100 ?@$ 2 32 | 1 [ (3*1+e) $. $. 100 ?@$ 2 33 | 1 [ (3*1-e) $. $. 100 ?@$ 2 34 | 35 | 1 [ (2*1+e)|. i.24 36 | 1 [ (2*1-e)|. i.24 37 | 38 | 1 [ (2*1+e)|.!.0 i.24 39 | 1 [ (2*1-e)|.!.0 i.24 40 | 41 | 1 [ (2 1*1+e)|: i.2 3 4 42 | 1 [ (2 1*1-e)|: i.2 3 4 43 | 44 | 1 [ <;.(1*1+e) ' chthonic' 45 | 1 [ <;.(1*1-e) ' chthonic' 46 | 1 [ <;.(2*1+e) ' chthonic' 47 | 1 [ <;.(2*1-e) ' chthonic' 48 | 1 [ <;.(3*1+e) ' chthonic' 49 | 1 [ <;.(3*1-e) ' chthonic' 50 | 51 | 52 | 53 | 54 | 55 | epilog'' 56 | 57 | -------------------------------------------------------------------------------- /test/gimaxmin.ijs: -------------------------------------------------------------------------------- 1 | prolog './gimaxmin.ijs' 2 | NB. i.<./ --------------------------------------------------------------- 3 | 4 | test=: 3 : 0 5 | yy=: y 6 | assert. ((i.<./)yy) -: yy i.<./yy 7 | assert. ((i.>./)yy) -: yy i.>./yy 8 | assert. ((i:<./)yy) -: yy i:<./yy 9 | assert. ((i:>./)yy) -: yy i:>./yy 10 | 1 11 | ) 12 | 13 | test 1e3 ?@$ imax 14 | test - 1e3 ?@$ imax 15 | test (<.imax%_2) + 1e3 ?@$ imax 16 | test 1e3 $ imax 17 | test 1e3 $ imin 18 | 19 | test 1e3 ?@$ 0 20 | test - 1e3 ?@$ 0 21 | test _10p1 + 1e3 ?@$ 60 22 | test 1e3 $ 1.234 23 | test 1e3 $ _1.234 24 | 25 | test 1e3 ?@$ 2 26 | test 1e3 $ 0 27 | test 1e3 $ 1 28 | 29 | test i.0 30 | test 0$0.5 31 | test 100 3 ?@$ 4 32 | 33 | NB. With new code, test all permutations of smallest element, repeated and not, with different spacings 34 | *./@:,@:(test"1)@:(|.~"_ 0 i.@#)@> (; -)@> ('';0;0 0;0 0 0;0 20;0 20 21;0 20 21 22;0 20 21 22 23) ,&.>/ <@i."0 i. 10 35 | *./@:,@:(test"1)@:(|.~"_ 0 i.@#)@> (; -)@> (0.5&+)&.> ('';0;0 0;0 0 0;0 20;0 20 21;0 20 21 22;0 20 21 22 23) ,&.>/ <@i."0 i. 10 36 | 37 | 'domain error' -: (i.<./) etx 'abc' 38 | 'domain error' -: (i.<./) etx u:'abc' 39 | 'domain error' -: (i.<./) etx 10&u:'abc' 40 | 'domain error' -: (i.<./) etx 1j2 3 4 41 | 'domain error' -: (i.<./) etx 1;2;3 4 42 | 43 | 44 | 45 | 46 | 47 | epilog'' 48 | 49 | -------------------------------------------------------------------------------- /test/giscode.ijs: -------------------------------------------------------------------------------- 1 | prolog './giscode.ijs' 2 | NB. i. special code ----------------------------------------------------- 3 | 4 | test=: 2 : 0 5 | : 6 | assert. x (u -: v) y 7 | assert. y (u -: v) x 8 | 1 9 | ) 10 | 11 | 1 2 3 (e.i.1: ) test (4 : '(x e. y)i.1') '' 12 | 1 2 3 (e.i.0: ) test (4 : '(x e. y)i.0') '' 13 | 1 2 3 (e.i:1: ) test (4 : '(x e. y)i:1') '' 14 | 1 2 3 (e.i:0: ) test (4 : '(x e. y)i:0') '' 15 | 1 2 3 (+ /@e. ) test (4 : '+ /x e. y' ) '' 16 | 1 2 3 (+./@e. ) test (4 : '+./x e. y' ) '' 17 | 1 2 3 (*./@e. ) test (4 : '*./x e. y' ) '' 18 | 1 2 3 (I. @e. ) test (4 : 'I. x e. y' ) '' 19 | 20 | 21 | 22 | 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/gmbx.ijs: -------------------------------------------------------------------------------- 1 | NB. prolog './gmbx.ijs' 2 | NB. mapped boxed arrays ------------------------------------------------- 3 | 4 | NB. do not run prolog in this script 5 | 6 | load 'jmf' 7 | cocurrent <'base' 8 | 9 | 1 [ unmap_jmf_ 'q' 10 | f=: . #' -: (5 >.#) lr 7 | '(i.8) , 8:' -: ((i.8) , 8:) lr 8 | 9 | 10 | NB. N V0 V1 inverses ---------------------------------------------------- 11 | 12 | testx=: 2 : '(u b._1) -: 5!:5<''v''' 13 | 14 | (3 * ]) testx ((%3) * ] ) 15 | ([: +: 3 * ]) testx ((%3) * -:) 16 | (3 * 4 + 5 * 6 + 7 * ] ) testx ( (%7) * _6 + (%5) * _4 + (%3) * ]) 17 | (3 * 4 + [: *: 6 + 7 * ] ) testx ( (%7) * _6 + [: %: _4 + (%3) * ]) 18 | (3 * 4 + [: *: 6 + 7 * +:) testx ([: -: (%7) * _6 + [: %: _4 + (%3) * ]) 19 | 20 | 21 | 22 | 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/goox.ijs: -------------------------------------------------------------------------------- 1 | prolog './goox.ijs' 2 | NB. order of execution -------------------------------------------------- 3 | 4 | g=: 3 : 0 5 | y 6 | : 7 | x,y 8 | ) 9 | 10 | f=: 3 : 0 11 | y [ xx=: xx,'f',y 12 | : 13 | x,y [ xx=: xx,'f',x,y 14 | ) 15 | 16 | h=: 3 : 0 17 | y [ xx=: xx,'h',y 18 | : 19 | x,y [ xx=: xx,'h',x,y 20 | ) 21 | 22 | 'bb' -: (f g h) 'b' [ xx=: $0 23 | xx -: 'hbfb' 24 | 25 | 'abab' -: 'a' (f g h) 'b' [ xx=: $0 26 | xx -: 'habfab' 27 | 28 | 'ab' -: 'a' g&h 'b' [ xx=: $0 29 | xx -: 'hbha' 30 | 31 | 'ab' -: 'a' g&:h 'b' [ xx=: $0 32 | xx -: 'hbha' 33 | 34 | 35 | 36 | 37 | 38 | epilog'' 39 | 40 | -------------------------------------------------------------------------------- /test/gop.ijs: -------------------------------------------------------------------------------- 1 | prolog './gop.ijs' 2 | NB. o./\ B -------------------------------------------------------------- 3 | 4 | cir=: 4 : 'x o. y' 5 | 6 | (o./\"1 -: cir/\"1) #:i.16 7 | 8 | (o./\ -: cir/\ ) x=:0 ;:'super cali fragi listic espi ali do cious' 29 | 'domain error' -: o./\ etx 10&u:'sesquipedalian' 30 | 'domain error' -: o./\ etx 10&u:&.> ;:'super cali fragi listic espi ali do cious' 31 | 'domain error' -: o./\ etx s:@<"0 'sesquipedalian' 32 | 'domain error' -: o./\ etx s:@<"0&.> ;:'super cali fragi listic espi ali do cious' 33 | 'domain error' -: o./\ etx <"0@s: ;:'super cali fragi listic espi ali do cious' 34 | 35 | 36 | 37 | 38 | epilog'' 39 | 40 | -------------------------------------------------------------------------------- /test/gpcoinv.ijs: -------------------------------------------------------------------------------- 1 | prolog './gpcoinv.ijs' 2 | NB. p:^:_1 -------------------------------------------------------------- 3 | 4 | f =: p:^:_1 5 | 6 | ([ -: f@:p:) x=:i.200 7 | ([ -: f@:p:) x=:?500$400 8 | ([ -: f@:p:) x=:1e6*>:i.105 9 | 10 | v =: p: i.200 11 | (f -: +/@(v&<)"0) x=:i.500 12 | (f -: +/@(v&<)"0) x=:?500${:v 13 | 14 | (i.@2: -: [ <: p:@(_1 0&+)@f)"0 x=:(v{~?20$#v)-.2 15 | (i.@2: -: [ <: p:@(_1 0&+)@f)"0 x=:?5$2e9 16 | 17 | 105097564 = f <._1+2^31 18 | 19 | NB. LeVeque, Fundamentals of Number Theory, Addison-Wesley, 1977, p. 5. 20 | 21 | 0 = f 1e0 22 | 4 = f 1e1 23 | 25 = f 1e2 24 | 168 = f 1e3 25 | 1229 = f 1e4 26 | 9592 = f 1e5 27 | 78498 = f 1e6 28 | 664579 = f 1e7 29 | 5761455 = f 1e8 30 | 50847534 = f 1e9 31 | 32 | 33 | 34 | 35 | 36 | epilog'' 37 | 38 | -------------------------------------------------------------------------------- /test/gpdd.ijs: -------------------------------------------------------------------------------- 1 | prolog './gpdd.ijs' 2 | NB. p.. y --------------------------------------------------------------- 3 | 4 | 2 6 12 -: p.. 1 2 3 4 5 | 6 | (,0) -: p.. 3j4 7 | (,0) -: p.. i.0 8 | (,0) -: p.. '' 9 | 10 | (,!6 ) -: p..^:6 ]7 $1 11 | (,!88x) -: p..^:88 ]89$1x 12 | 13 | 1: 0 : 0 NB. removed from 901 14 | ( 2&o. t. i.10x) -: p.. 1&o. t. i.11x 15 | (-@(1&o.) t. i.10x) -: p.. 2&o. t. i.11x 16 | ( 6&o. t. i.10x) -: p.. 5&o. t. i.11x 17 | ( 5&o. t. i.10x) -: p.. 6&o. t. i.11x 18 | ) 19 | 20 | 'domain error' -: p.. etx 'abc' 21 | 'domain error' -: p.. etx u:'abc' 22 | 'domain error' -: p.. etx 10&u:'abc' 23 | 24 | 25 | NB. x p.. y ------------------------------------------------------------- 26 | 27 | (1 2 1.5,4%3) -: 1 p.. 2 3 4 28 | (1 2 3r2 4r3) -: 1 p.. 2 3 4x 29 | 30 | x -: ({.x) p.. p.. x=: ?10$100 31 | 32 | (%!i.10x) -: p../10$1x 33 | 34 | 35 | 'domain error' -: 3 p.. etx 'abc' 36 | 'domain error' -: 3 p.. etx u:'abc' 37 | 'domain error' -: 3 p.. etx 10&u:'abc' 38 | 'domain error' -: 'x' p.. etx 3 4 39 | 'domain error' -: (<4) p.. etx 3 4 40 | 41 | 42 | 43 | 44 | 45 | epilog'' 46 | 47 | -------------------------------------------------------------------------------- /test/gpi.ijs: -------------------------------------------------------------------------------- 1 | prolog './gpi.ijs' 2 | NB. pi ------------------------------------------------------------------ 3 | 4 | NB. pi and the common mean (AGM, arithmetic-geometric mean) 5 | NB. see http://www.shef.ac.uk/~puremath/theorems/amgm.html 6 | 7 | am=: +/ % # 8 | gm=: */ %:~ # 9 | cm=: [: {. (am,gm)^:_ 10 | 11 | t=: (am,gm)^:(i.10) 1,%%:2 12 | 'a b'=: |: t 13 | (o.1) e. (}. 2**:a) % }: 1 - +/\ (2^i.#a) * a-&*:b 14 | 15 | 16 | 17 | 18 | 19 | epilog'' 20 | 21 | -------------------------------------------------------------------------------- /test/gq101.ijs: -------------------------------------------------------------------------------- 1 | prolog './gq101.ijs' 2 | NB. rational numbers +. ------------------------------------------------- 3 | 4 | gcd=: 4 : 0 " 0 5 | x=. |x 6 | y=. |y 7 | while. r=. y|x do. 8 | x=. y 9 | y=. r 10 | end. 11 | ) 12 | 13 | x=: %/ 0 1x + ?2 100$2e9 14 | y=: %/ 0 1x + ?2 100$2e9 15 | 16 | x (+. -: gcd) y 17 | 0 (+. -: gcd) y 18 | x (+. -: gcd) 0 19 | x (+. -: gcd) x 20 | 21 | x=: (+%)/\90$1x 22 | (i{x) (+. -: gcd) j{x [ i=: ?10$#x [ j=: ?10$#x 23 | 24 | 25 | 26 | 27 | 28 | epilog'' 29 | 30 | -------------------------------------------------------------------------------- /test/gq132.ijs: -------------------------------------------------------------------------------- 1 | prolog './gq132.ijs' 2 | NB. %: ------------------------------------------------------------------ 3 | 4 | rat =: 128&=@type 5 | 6 | (%: 2.5) -: %: 5r2 7 | (%:_2.5) -: %:_5r2 8 | (%: 25 ) -: %: 25r1 9 | 10 | (%:_1 ) -: %: _1r1 11 | (%:_0.5) -: %: _1r2 12 | 13 | (3 %: 8) -: 3 %: 8r1 14 | 15 | rat %: *: 7r2 16 | 7r2 -: %: *: 7r2 17 | (%: 3.5) -: %: 7r2 18 | (%:_3.5) -: %:_7r2 19 | 20 | 21 | 22 | NB. %: ------------------------------------------------------------------ 23 | 24 | NB. Pell Equation 25 | NB. Integer solutions of 1=(x^2)-N*(y^2), N not a perfect square 26 | 27 | NB. continued fraction expansion of %:N 28 | NB. do computations in Z[%:N] 29 | 30 | cfsqrt=: 3 : 0 31 | N=. y 32 | p=. 0x 33 | q=. 1x 34 | r=. %:N 35 | assert. r~:<.r NB. not a perfect square 36 | m0=. <.q%~p+r 37 | z=. $0 38 | while. 1 do. 39 | m=. <.q%~p+r 40 | t=. (m*q)-p 41 | q=. q%~N-*:p-m*q 42 | p=. t 43 | if. m=2*m0 do. x: z return. end. 44 | z=. z, m 45 | end. 46 | ) 47 | 48 | test=: 3 : 0 49 | N=: y 50 | v=: cfsqrt N 51 | 'xx yy'=: 2 x: (+%)/v 52 | (xx^2) - N*yy^2 53 | ) 54 | 55 | *./ 1 _1 e.~ t=: test"0 (-. <.&.:%:) i.100 56 | 57 | *./ 1 _1 e.~ t=: test 1+*:1+?1000 58 | 59 | 60 | 61 | 62 | 63 | epilog'' 64 | 65 | -------------------------------------------------------------------------------- /test/gr1.ijs: -------------------------------------------------------------------------------- 1 | prolog './gr1.ijs' 2 | NB. 2r3 ----------------------------------------------------------------- 3 | 4 | rat =: 128&=@type 5 | intx=: 64&=@type 6 | int =: 4&=@type 7 | fl =: 8&=@type 8 | cmpx=: 16&=@type 9 | 10 | 5r2 -: 10r4 11 | 5r2 -: _5r_2 12 | _5r2 -: 5r_2 13 | 0r1 -: 0r7 14 | 0r1 -: 0r_7 15 | 0r1 -: 0r12345678901234567890 16 | 0r1 -: 0r_12345678901234567890 17 | 18 | 0r1 -: 0r0 19 | 0r1 -: 0r9 20 | 0r1 -: 0r_9 21 | 22 | (fl x) *. 1 2 3.2 -: x=: 1 4r2 3.2 23 | (fl x) *. 1 2 0.03 -: x=: 1 4r2 3e_2 24 | (int x) *. 1 2 300 -: x=: 1 4r2 3e2 25 | (fl x) *. 1 2 3e20 -: x=: 1 4r2 3e20 26 | (cmpx x) *. 1 2 3j2 -: x=: 1 4r2 3j2 27 | (rat x) *. 1r1 2r1 _3r1 -: x=: 1 2r1 _3x 28 | (intx x) *. 1r1 2r1 _3r1 -: x=: 1 2x _3x 29 | 30 | (rat x) *. 1 0.5 _ -: x=: 1 1r2 _ 31 | (rat x) *. 1 0.5 __ -: x=: 1 1r2 __ 32 | (rat x) *. 1 0.5 _ 1.25 -: x=: 1 1r2 _ 5r4 33 | (rat x) *. 1 0.5 __ 1.25 -: x=: 1 1r2 __ 5r4 34 | (rat x) *. _ 1.25 1 0.5 -: x=: _ 5r4 1 1r2 35 | (rat x) *. __ 1.25 1 0.5 -: x=: __ 5r4 1 1r2 36 | 37 | (fl x) *. 1 0.5 _. -:&(3!:1) x=: 1 1r2 _. 38 | (fl x) *. 1 0.5 _. 1.25 -:&(3!:1) x=: 1 1r2 _. 5r4 39 | (fl x) *. _. 1.25 1 0.5 -:&(3!:1) x=: _. 5r4 1 1r2 40 | 41 | (rat x) *. 0.5 _ -: x=: 1r2 3r0 42 | (rat x) *. 0.5 __ -: x=: 1r2 _3r0 43 | 44 | 45 | 46 | 47 | 48 | epilog'' 49 | 50 | -------------------------------------------------------------------------------- /test/gregex.ijs: -------------------------------------------------------------------------------- 1 | prolog './gregex.ijs' 2 | NB. regex ------------------------------------------------------------------ 3 | 4 | load 'regex' 5 | 6 | echo pcre2dll_jregex_ 7 | jpcre2_compile_jregex_ 8 | 9 | rxutf8 1 10 | 11 | A=: '今日は良い天気です' 12 | B=: 'は良い' 13 | C=: 8 u: '.' 1 } 7 u: B 14 | 15 | (,:6 9) -: B rxmatch A 16 | (,:6 9) -: C rxmatch A 17 | 18 | D=: utf8 4 u: 3 u: {. 7 u: C 19 | (,:6 3) -: D rxmatch A 20 | 21 | 16b306f = 3 u: 7 u: D 22 | E=: '\x{306f}' NB. codepoint of D 23 | (,:6 3) -: E rxmatch A 24 | 25 | 26 | epilog'' 27 | 28 | -------------------------------------------------------------------------------- /test/gs.ijs: -------------------------------------------------------------------------------- 1 | prolog './gs.ijs' 2 | NB. S: ------------------------------------------------------------------ 3 | 4 | phi=: * -.@%@~.&.q: NB. Euler's totient function 5 | t=: 5!:2 <'phi' 6 | 7 | (;:'* -.@%@~.&.q:') -: < S: 0 t 8 | 9 | (i. 6 4) -: ] S:0 S:1 <"2 <"1 <"0 i. 2 3 4 10 | (i. 1 24) -: ] S:0 S:2 <"2 <"1 <"0 i. 2 3 4 11 | (<"0 i. 1 6 4) -: ] S:1 S:2 <"2 <"1 <"0 i. 2 3 4 12 | 13 | (>: i. 100000) -: >: S:0 <"0 i. 100000 14 | 3 : 'for. i. 100 do. assert. (>: i. 100000) -: >: S:0 <"0 i. 100000 end.' '' NB. check for memory leak 15 | 16 | (>: i. 100000) -: 1 + S:0 <"0 i. 100000 17 | (>: i. 100000) -: (<1) + S:0 <"0 i. 100000 18 | 19 | (>: i. 6 4) -: 1 + S:0 S:1 <"2 <"1 <"0 i. 2 3 4 20 | (>: i. 1 24) -: 1 + S:0 S:2 <"2 <"1 <"0 i. 2 3 4 21 | 22 | 23 | 24 | 'domain error' -: ] S: 1 etx 1;<<1 2 3 25 | 'domain error' -: ; S: 2 etx 1;<<1 2 3 26 | 27 | 28 | 29 | 30 | epilog'' 31 | 32 | -------------------------------------------------------------------------------- /test/gsdot.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsdot.ijs' 2 | NB. S: ------------------------------------------------------------------ 3 | 4 | phi=: * -.@%@~.&.q: NB. Euler's totient function 5 | t=: 5!:2 <'phi' 6 | 7 | (;:'* -.@%@~.&.q:') -: < S: 0 t 8 | 9 | (0 0;0 0) -: (] S: 0) L: 1 t=: 2 $ <0;0 10 | (0 0;0 0) -: (] S: 0) L: _1 t=: 2 $ <0;0 11 | (0 0;0 0) -: > L: 1 t=: 2 $ <0;0 12 | 13 | 14 | 'domain error' -: ] S: 1 etx 1;<<1 2 3 15 | 'domain error' -: ; S: 2 etx 1;<<1 2 3 16 | 17 | 18 | 19 | 20 | 21 | epilog'' 22 | 23 | -------------------------------------------------------------------------------- /test/gsp101.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp101.ijs' 2 | NB. +. ------------------------------------------------------------------ 3 | 4 | f=: 3 : '(+.q) -: +.(2;y)$.q' 5 | 6 | q=: ?2 4 7 5 3$5 7 | c=: ; (i.1+r) <"1@comb&.>r=:#$q 8 | f&> c 9 | 10 | q=: j./ ?2 2 4 7 5 3$5 11 | c=: ; (i.1+r) <"1@comb&.>r=:#$q 12 | f&> c 13 | 14 | (+.3j3+i.2 3) -: +. 3j3+$.i.2 3 15 | 16 | 'non-unique sparse elements' -: +. etx 3j4+$.i.2 3 17 | 18 | f=: 4 : '(p+.q) -: ((2;x)$.p) +. (2;y)$.q' 19 | g=: 3 : '(a+.q) -: a +. (2;y)$.q' 20 | 21 | p=: (?2 4 7$2) * ?2 4 7 3$2 22 | q=: (?2 4 7$2) * ?2 4 7 3$2 23 | a=: ?2 24 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 25 | f&>/~c 26 | g&>c 27 | 28 | p=: (?4 5$2) * ?4 5 3$4e6 29 | q=: (?4 5$2) * ?4 5 3$4e6 30 | a=: ?1e6 31 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 32 | f&>/~c 33 | g&>c 34 | 35 | p=: (?4 5$2) * o.?4 5 3$4 36 | q=: (?4 5$2) * o.?4 5 3$4 37 | a=: o.?16 38 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 39 | f&>/~c 40 | g&>c 41 | 42 | p=: (?4 5$2) * j./?2 4 5 3$4 43 | q=: (?4 5$2) * j./?2 4 5 3$4 44 | a=: j./?26 26 45 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 46 | f&>/~c 47 | g&>c 48 | 49 | 50 | 51 | 52 | epilog'' 53 | 54 | -------------------------------------------------------------------------------- /test/gsp102.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp102.ijs' 2 | NB. +: ------------------------------------------------------------------ 3 | 4 | (scheck +: $.x), (+: -: +:&.$.) x=: _10+? 405$2 5 | (scheck +: $.x), (+: -: +:&.$.) x=: _10+? 3 4 5$21 6 | (scheck +: $.x), (+: -: +:&.$.) x=: o._10+? 3 4 5$21 7 | (scheck +: $.x), (+: -: +:&.$.) x=:j./o._10+?2 3 4 5$21 8 | 9 | (scheck +: $.x), (+: -: +:&.$.) x=: (_10+?60$21),1.1e9 10 | 11 | 0 -: 3 $. +: $. 0 1 0 12 | 0 -: 3 $. +: $. 2 3 4 13 | 0 -: 3 $. +: $. 2 3.4 14 | 0 -: 3 $. +: $. 2 3j4 15 | 16 | f=: 4 : '(p+:q) -: ((2;x)$.p) +: (2;y)$.q' 17 | 18 | p=: ?2 3 4$2 19 | q=: ?2 3 4$2 20 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 21 | f&>/~c 22 | 23 | p=: ?4 2 5 3$2 24 | q=: ?4 2 5 3$2 25 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 26 | f&>/~c 27 | 28 | 29 | 30 | 31 | 32 | epilog'' 33 | 34 | -------------------------------------------------------------------------------- /test/gsp111.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp111.ijs' 2 | NB. *. ------------------------------------------------------------------ 3 | 4 | f=: 3 : '(*.q) -: *.(2;y)$.q' 5 | 6 | q=: ? 2 4 5 3$5 7 | c=: ; (i.1+r) <"1@comb&.>r=:#$q 8 | f&> c 9 | 10 | q=: j./ ?2 2 4 5 3$5 11 | c=: ; (i.1+r) <"1@comb&.>r=:#$q 12 | f&> c 13 | 14 | (*.3ar3+i.2 3) -: *. 3ar3+$.i.2 3 15 | 16 | 'non-unique sparse elements' -: *. etx 3ar4+$.i.2 3 17 | 18 | f=: 4 : '(p*.q) -: ((2;x)$.p) *. (2;y)$.q' 19 | g=: 3 : '(a*.q) -: a *. (2;y)$.q' 20 | 21 | p=: (?2 4 5$2) * ?2 4 5 3$2 22 | q=: (?2 4 5$2) * ?2 4 5 3$2 23 | a=: ?2 24 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 25 | f&>/~c 26 | g&>c 27 | 28 | p=: (?7 5$2) * ?7 5 3$4e6 29 | q=: (?7 5$2) * ?7 5 3$4e6 30 | a=: ?1e6 31 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 32 | f&>/~c 33 | g&>c 34 | 35 | p=: (?7 5$2) * o.?7 5 3$4 36 | q=: (?7 5$2) * o.?7 5 3$4 37 | a=: o.?16 38 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 39 | f&>/~c 40 | g&>c 41 | 42 | p=: (?7 5$2) * j./?2 7 5 3$4 43 | q=: (?7 5$2) * j./?2 7 5 3$4 44 | a=: j./?26 26 45 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 46 | f&>/~c 47 | g&>c 48 | 49 | 50 | 51 | 52 | epilog'' 53 | 54 | -------------------------------------------------------------------------------- /test/gsp112.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp112.ijs' 2 | NB. *: ------------------------------------------------------------------ 3 | 4 | (scheck *: $.x), (*: -: *:&.$.) x=: _10+? 405$2 5 | (scheck *: $.x), (*: -: *:&.$.) x=: _10+? 3 4 5$21 6 | (scheck *: $.x), (*: -: *:&.$.) x=: o._10+? 3 4 5$21 7 | (scheck *: $.x), (*: -: *:&.$.) x=:j./o._10+?2 3 4 5$21 8 | 9 | (scheck *: $.x), (*: -: *:&.$.) x=: (_10+?60$21),1.1e9 10 | 11 | 0 -: 3 $. *: $. 0 1 0 12 | 0 -: 3 $. *: $. 2 3 4 13 | 0 -: 3 $. *: $. 2 3.4 14 | 0 -: 3 $. *: $. 2 3j4 15 | 16 | f=: 4 : '(p*:q) -: ((2;x)$.p) *: (2;y)$.q' 17 | 18 | p=: ?2 3 4$2 19 | q=: ?2 3 4$2 20 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 21 | f&>/~c 22 | 23 | p=: ?4 2 5 3$2 24 | q=: ?4 2 5 3$2 25 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 26 | f&>/~c 27 | 28 | 29 | 30 | 31 | 32 | epilog'' 33 | 34 | -------------------------------------------------------------------------------- /test/gsp221.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp221.ijs' 2 | NB. ~. ------------------------------------------------------------------ 3 | 4 | f=: 3 : '(scheck t) *. (~.p) -: t=: ~.s=: (2;y)$.p' 5 | 6 | c=: ; (i.1+r) <"1@comb&.>r=: 4 7 | f&> c [ p=: (?200$100) { (?100 4 5$2) * ? 100 4 5 3$2 8 | f&> c [ p=: (?200$100) { (?100 4 5$2) * ? 100 4 5 3$100 9 | f&> c [ p=: (?100$ 50) { (? 50 4 5$2) * o. ? 50 4 5 3$100 10 | f&> c [ p=: (?100$ 50) { (? 50 4 5$2) * j./?2 50 4 5 3$100 11 | 12 | c=: ; (i.1+r) <"1@comb&.>r=: 3 13 | f&> c [ p=: ?100 4 5$1000 14 | f&> c [ p=: 0 (0)} ?100 4 5$1000 15 | f&> c [ p=: 0 (9)} ?100 4 5$1000 16 | f&> c [ p=: 0 * ?100 4 5$1000 17 | f&> c [ p=: (?200$100) { ?100 4 5$1000 18 | f&> c [ p=: (?200$100) {(?100 4$2) * ?100 4 5$1000 19 | 20 | (~.$.p) -: ~.p=: i.0 21 | (~.$.p) -: ~.p=: i.0 5 22 | (~.$.p) -: ~.p=: i.5 0 23 | 24 | p=: ?100$1e9 25 | q=: (?100$20){?20 5$10 26 | s=: q p}1 $. 1e9 5 ; 0 ; 2-2 27 | t=: ~.s 28 | scheck t 29 | ($t) -: $~.0,q 30 | (2$.t) -: ,0 31 | (3$.t) -: 0 32 | (4$.t) -: ,. (i.#t)-.{.(i.1+#p) -. p 33 | (5$.t) -: ~.(q/:p) -. (0 * {. q) 34 | 35 | 36 | 37 | epilog'' 38 | 39 | -------------------------------------------------------------------------------- /test/gsp321.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp321.ijs' 2 | NB. ,. ------------------------------------------------------------------- 3 | 4 | f=: 4 : '(*./ scheck t) *. (,."x d) -: t=: ,."x s=:(2;y)$.d' 5 | d=: (?5 7$2) * ?5 7 3 2$4 6 | 7 | (i.>:r) f&>/ c=: ; (i.1+r) <"1@comb&.>r=:#$d 8 | 9 | s=: 1 $. 2e9 3 4;0;0 10 | s=: (?7 3 4$4) (?7$2e9)}s 11 | scheck s 12 | scheck ,."2 s 13 | 14 | 'limit error' -: ,. etx 1 $.(4$2e9);0 1 2;0 15 | 'limit error' -: ,."3 etx 1 $.(>IF64{2 1 4 2e9;2 1 1e10 2e9);0 1 2;0 16 | 17 | f=: 4 : '(a ,."r b) -: (s=: (2;x)$.a) ,."r t=: (2;y)$.b' 18 | h=: 4 : '(a ,."r&(97&+) b) -: (s=: (2;y)$.a) ,."r&(97&+) t=: (2;y)$.b' 19 | 20 | c=: ; (i.1+r) <"1@comb&.>r=:#$a=: (?2 5 3$2) * ?2 5 3 4$5 21 | d=: ; (i.1+r) <"1@comb&.>r=:#$b=: (?2 5 3$2) * ?2 5 3 4$5 22 | 23 | c f&>/d [ r=: 0 24 | c f&>/d [ r=: 1 25 | c f&>/d [ r=: 2 26 | c f&>/d [ r=: 3 27 | c f&>/d [ r=: 4 28 | 29 | c h&>/d [ r=: 0 30 | c h&>/d [ r=: 1 31 | c h&>/d [ r=: 2 32 | c h&>/d [ r=: 3 33 | c h&>/d [ r=: 4 34 | 35 | 36 | 37 | 38 | 39 | epilog'' 40 | 41 | -------------------------------------------------------------------------------- /test/gsp322.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp322.ijs' 2 | NB. ,: ------------------------------------------------------------------ 3 | 4 | a=: ?5 7 3 2$4 5 | c=: ; (i.1+r) <"1@comb&.>r=:#$a 6 | 7 | f=: 4 : '*./ (scheck t), (,:"x a) -: t=:,:"x s=:(2;y)$.a' 8 | (i.>:r) f&>/ c 9 | 10 | f=: 4 : '(a ,:"r b) -: (s=: (2;x)$.a) ,:"r t=: (2;y)$.b' 11 | h=: 4 : '(a ,:"r&(97&+) b) -: (s=: (2;y)$.a) ,:"r&(97&+) t=: (2;y)$.b' 12 | 13 | c=: ; (i.1+r) <"1@comb&.>r=:#$a=: (?2 5 3$2) * ?2 5 3 4$5 14 | d=: ; (i.1+r) <"1@comb&.>r=:#$b=: (?2 5 3$2) * ?2 5 3 4$5 15 | 16 | c f&>/ d [ r=: 0 17 | c f&>/ d [ r=: 1 18 | c f&>/ d [ r=: 2 19 | c f&>/ d [ r=: 3 20 | c f&>/ d [ r=: 4 21 | 22 | c h&>/ d [ r=: 0 23 | c h&>/ d [ r=: 1 24 | c h&>/ d [ r=: 2 25 | c h&>/ d [ r=: 3 26 | c h&>/ d [ r=: 4 27 | 28 | 29 | 30 | 31 | 32 | epilog'' 33 | 34 | -------------------------------------------------------------------------------- /test/gsp410.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp410.ijs' 2 | NB. ! ------------------------------------------------------------------- 3 | 4 | (scheck ! $.x), (! -: !&.$.) x=: _10+? 405$2 5 | (scheck ! $.x), (! -: !&.$.) x=: _10+? 3 4 5$21 6 | (scheck ! $.x), (! -: !&.$.) x=: o._10+? 3 4 5$21 7 | (scheck ! $.x), (! -: !&.$.) x=:j./o._10+?2 3 4 5$21 8 | 9 | 1 -: 3 $. ! $. 0 1 0 10 | 1 -: 3 $. ! $. 2 3 4 11 | 1 -: 3 $. ! $. 2 3.4 12 | 1 -: 3 $. ! $. 2 3j4 13 | 14 | (!e) -: 3 $. ! (3;e=: ?20 ) $. $. 1 2 3 15 | (!e) -: 3 $. ! (3;e=:o. ?5 ) $. $. 1 2 3 16 | (!e) -: 3 $. ! (3;e=:j./?10 10) $. $. 1 2 3 17 | 18 | f=: 4 : '(p!q) -: ((2;x)$.p) ! (2;y)$.q' 19 | 20 | p=: ?7 5 3$2 21 | q=: ?7 5 3$2 22 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 23 | f&>/~c 24 | 25 | p=: ?7 5 3$4 26 | q=: ?7 5 3$4 27 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 28 | f&>/~c 29 | 30 | p=: o.?7 5 3$4 31 | q=: o.?7 5 3$4 32 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 33 | f&>/~c 34 | 35 | p=: j./?2 5 3 2$4 36 | q=: j./?2 5 3 2$4 37 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 38 | f&>/~c 39 | 40 | 41 | 42 | 43 | 44 | epilog'' 45 | 46 | -------------------------------------------------------------------------------- /test/gsp412.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp412.ijs' 2 | NB. !: ------------------------------------------------------------------ 3 | 4 | f=: 0 !:($.0) 5 | f=: ($.0)!: 0 6 | f=: ($.0)!:($.0) 7 | 8 | f=: 0 !:($.2) 9 | f=: ($.0)!: 2 10 | f=: ($.0)!:($.2) 11 | 12 | f=: 3 !:($.0) 13 | f=: ($.3)!: 0 14 | f=: ($.3)!:($.0) 15 | 16 | f=: 4 !:($.3) 17 | f=: ($.4)!: 3 18 | f=: ($.4)!:($.3) 19 | 20 | 21 | 22 | 23 | 24 | epilog'' 25 | 26 | -------------------------------------------------------------------------------- /test/gsp421.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp421.ijs' 2 | NB. #/. ----------------------------------------------------------------- 3 | 4 | d=: (?1000$2) * ?1000 2 3$10 5 | c=: ; (i.1+r) <"1@comb&.>r=:#$d 6 | 7 | f=: 3 : 'assert. (#/.~ d) -: #/.~ s=: (2;y)$.d' 8 | f&> c 9 | 10 | f=: 3 : 'assert. (#/.~ $.^:_1 s) -: #/.~ s=: (b=: ?1000 2$ 2) * (2;y)$.d' 11 | f&> c 12 | 13 | f=: 3 : 'assert. (#/.~ $.^:_1 s) -: #/.~ s=: (b=: 0=?1000 2$10) * (2;y)$.d' 14 | f&> c 15 | 16 | 'length error' -: ($. i.9) #/.~ etx i.8 17 | 'length error' -: ($. i.9) #/.~ etx 1 18 | 19 | i=: 1+?1e3$2e9 20 | x=: ?1e3$100 21 | s=: x i} 1 $. 2e9 ; 0 ; 2-2 22 | t=: #/.~ s 23 | b=: 0~:x 24 | t -: ((#s)-+/b),#/.~ (b#x)/:b#i 25 | 26 | 1 2 -: #/.~ sa=: 1 ((<"1) _2 ]\ 0 2 1 1 1 2 2 1 2 2)} 1 $. 3 3 ; 0 01 ; 0 27 | (1 3,:2 3) -: $/.~ sa=: 1 ((<"1) _2 ]\ 0 2 1 1 1 2 2 1 2 2)} 1 $. 3 3 ; 0 01 ; 0 28 | (1 3,:2 3) -: $/.~ sa=: 1 ((<"1) _2 ]\ 0 2)} 1 $. 3 3 ; 0 01 ; 0 29 | 30 | NB. f/. ----------------------------------------------------------------- 31 | 32 | d=: (?947 2$2) * ?947 2 3$8 33 | c=: ; (i.1+r) <"1@comb&.>r=:#$d 34 | y=: ?((#d),4)$1000 35 | 36 | f=: 1 : (':'; '(d u/.y) -: s u/.y [ s=: (2;x)$.d') 37 | c < f&> pr=:#$p 7 | qc=: ; (i.1+qr) <"1@comb&.>qr=:#$q 8 | 9 | f=: 4 : '(scheck z) *. (p{q) -: z=: (s=: (2;x)$.p) { t=:(2;y)$.q' 10 | pc f&>/ qc 11 | 12 | f=: 4 : '(scheck z) *. (p{"_ 1 q) -: z=: (s=: (2;x)$.p) {"_ 1 t=:(2;y)$.q' 13 | pc f&>/ qc [ q=: (0,7$1)*"1 (?11 7 9$2) * ?11 7 9 8$124 14 | 15 | f=: 4 : '(scheck z) *. (p{"_ 2 q) -: z=: (s=: (2;x)$.p) {"_ 2 t=:(2;y)$.q' 16 | pc f&>/ qc [ q=: (0,8$1)*"2 (?11 7 9$2) * ?11 7 9 8$124 17 | 18 | f=: 4 : '(scheck z) *. (p{"_ 3 q) -: z=: (s=: (2;x)$.p) {"_ 3 t=:(2;y)$.q' 19 | pc f&>/ qc [ q=: (0,6$1)*"3 (?11 7 9$2) * ?11 7 9 8$124 20 | 21 | 'domain error' -: ($.o.i.2 3) { etx $.i.9 22 | 23 | 'index error' -: ($.i.2 3) { etx $.0,i.3 5 24 | 'index error' -: ((3;6)$.$.i.2 3) { etx $.0,i.5 2 1 25 | 26 | 'non-unique sparse elements' -: ($.i.2 3){ etx $.i.6 3 27 | 'non-unique sparse elements' -: ($.i.2 3){"2 1 etx $.i.2 6 28 | 29 | 30 | 31 | 32 | 33 | epilog'' 34 | 35 | -------------------------------------------------------------------------------- /test/gsp531.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp531.ijs' 2 | NB. }. ------------------------------------------------------------------- 3 | 4 | (scheck x}.$.y), (x=:_5 _10+?12 24) (}. -: }.&.$.) y=: ? 12 24 3$2 5 | (scheck x}.$.y), (x=:_5 _10+?12 24) (}. -: }.&.$.) y=: _10+? 12 24 3$21 6 | (scheck x}.$.y), (x=:_5 _10+?12 24) (}. -: }.&.$.) y=: o._10+? 12 24 3$21 7 | (scheck x}.$.y), (x=:_5 _10+?12 24) (}. -: }.&.$.) y=: j./o._10+?2 12 24 3$21 8 | 9 | (scheck x}.$.y), 100 (}. -: }.&.$.) y=: ? 12 24 3$2 10 | (scheck x}.$.y), 3 _100 (}. -: }.&.$.) y=: _10+? 12 24 3$21 11 | (scheck x}.$.y), _9 90 3(}. -: }.&.$.) y=: o._10+? 12 24 3$21 12 | (scheck x}.$.y), 200 (}. -: }.&.$.) y=: j./o._10+?2 12 24 3$21 13 | 14 | (scheck x}."1]$.y), (x=:12 -~?25 ) (}."1 -: }."1&.$.) y=:_10+?12 24 3$21 15 | (scheck x}."2]$.y), (x=:12 24 -~?25 49 ) (}."2 -: }."2&.$.) y=:_10+?12 24 3$21 16 | (scheck x}."3]$.y), (x=:12 24 3-~?25 49 7) (}."3 -: }."3&.$.) y=:_10+?12 24 3$21 17 | 18 | 19 | 20 | 21 | epilog'' 22 | 23 | -------------------------------------------------------------------------------- /test/gsp5x5.ijs: -------------------------------------------------------------------------------- 1 | prolog './gsp5x5.ijs' 2 | NB. 5!:5 sparse arrays -------------------------------------------------- 3 | 4 | test=: 3 : 0 5 | yy=: y 6 | xx=: ". 5!:5 <'y' 7 | assert. xx -:&type yy 8 | assert. scheck xx 9 | assert. xx -: yy 10 | 1 11 | ) 12 | 13 | test x=: 1$.3 4 5;0 1;0 14 | test x=: 1$.3 4 5;0 1;-~2 15 | test x=: 1$.3 4 5;0 1;-~2.1 16 | test x=: 1$.3 4 5;0 1;-~2j1 17 | 18 | test x=: $. 3 4 5 ?@$ 5 19 | test o. x 20 | test x=: $. 10 ?@$ 5 21 | 22 | r=: #$d=: (2 3 5 ?@$ 2) * 2 3 5 7 9 ?@$ 2 23 | c=: (i.1+r) comb&.> r 24 | c ([: */ (2&;@[ test@$. ])"1 _)&> r 28 | c ([: */ (2&;@[ test@$. ])"1 _)&> r 32 | c ([: */ (2&;@[ test@$. ])"1 _)&>r=:#$p 19 | f&>/~c 20 | 21 | p=: ?7 5 3$8 22 | q=: ?7 5 3$4 23 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 24 | f&>/~c 25 | 26 | p=: ?7 5 3$8 27 | q=: o.?7 5 3$4 28 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 29 | f&>/~c 30 | 31 | p=: ? 7 5 3$8 32 | q=: j./?2 7 5 3$4 33 | c=: ; (i.1+r) <"1@comb&.>r=:#$p 34 | f&>/~c 35 | 36 | 37 | 38 | 39 | 40 | epilog'' 41 | 42 | -------------------------------------------------------------------------------- /test/gspr.ijs: -------------------------------------------------------------------------------- 1 | prolog './gspr.ijs' 2 | NB. r. ------------------------------------------------------------------ 3 | 4 | (scheck r. $.x), (r. -: r.&.$.) x=: _10+? 405$2 5 | (scheck r. $.x), (r. -: r.&.$.) x=: _10+? 3 4 5$21 6 | (scheck r. $.x), (r. -: r.&.$.) x=: o._10+? 3 4 5$21 7 | (scheck r. $.x), (r. -: r.&.$.) x=:j./o._10+?2 3 4 5$21 8 | 9 | 1 -: 3 $. r. $. 0 1 0 10 | 1 -: 3 $. r. $. 2 3 4 11 | 1 -: 3 $. r. $. 2 3.4 12 | 1 -: 3 $. r. $. 2 3j4 13 | 14 | 15 | 16 | 17 | 18 | epilog'' 19 | 20 | -------------------------------------------------------------------------------- /test/gx.ijs: -------------------------------------------------------------------------------- 1 | prolog './gx.ijs' 2 | NB. x. ------------------------------------------------------------------ 3 | 1: (0 : 0) 4 | old=: 9!:48 '' 5 | 9!:49]1 6 | 7 | jnc =: 4!:0 8 | jnl =: 4!:1 9 | 10 | x. =. i.12 11 | 0 -: jnc <'x.' 12 | (<'x.') e. jnl i.4 13 | 14 | x. =. 1 : 'x./\' 15 | 1 -: jnc <'x.' 16 | (<'x.') e. jnl i.4 17 | 18 | x. =. 2 : 'x.&y. + x.@y.' 19 | 2 -: jnc <'x.' 20 | (<'x.') e. jnl i.4 21 | 22 | x. =. +/ 23 | 3 -: jnc <'x.' 24 | (<'x.') e. jnl i.4 25 | 26 | 4!:55 <'x.' 27 | _1 -: jnc <'x.' 28 | -. (<'x.') e. jnl i.4 29 | 30 | 4!:55 ;:'x.' 31 | 32 | 9!:49 old 33 | 34 | ) 35 | 36 | 37 | epilog'' 38 | 39 | -------------------------------------------------------------------------------- /test/gx132.ijs: -------------------------------------------------------------------------------- 1 | prolog './gx132.ijs' 2 | NB. %: on extended integers --------------------------------------------- 3 | 4 | 0 1 _ -: 0x %: 0 1 2x 5 | 0 1 _ -: 0 %: 0 1 2 6 | 7 | (i:5) (%: -: %:&x:) 0 8 | (i:5) (%: -: %:&x:) 1 9 | 10 | 0 (%: -: %:&x:) i.5 11 | 1 (%: -: %:&x:) i:5 12 | 13 | 2 (%: -: %:&x:) - 0 1 14 | 2 (%: -: %:&x:) - 4 5 6 15 | 3 (%: -: %:&x:) - 0 1 16 | 3 (%: -: %:&x:) - 4 5 6 17 | 18 | (%:%2) -: _2 %: 2x 19 | 20 | test=: 4 : 0 21 | n=: x: x 22 | r=: x: y 23 | yy=: r^n 24 | assert. r = n %: yy 25 | assert. (r-1) = n <.@%: yy-1 26 | assert. (r+1) = n >.@%: yy+1 27 | 1 28 | ) 29 | 30 | test/ 1+?100 1000x 31 | test/ 1+2 1* ?100 1000x 32 | test/ 1+2 1*1+?100 1000x 33 | 34 | 5 6x test"0 ] 11^309x 35 | 12343 12344x test"0 ] 2x 36 | 37 | 38 | 39 | 40 | epilog'' 41 | 42 | -------------------------------------------------------------------------------- /test/gz001.ijs: -------------------------------------------------------------------------------- 1 | prolog './gz001.ijs' 2 | 3 | {{ 4 | y ?@$ 1000 5 | EMPTY }} &> <"1 (50 5 ?@$ 30) 6 | 7 | epilog'' 8 | 9 | -------------------------------------------------------------------------------- /test/t1.ijf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/test/t1.ijf -------------------------------------------------------------------------------- /test/test.jproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/test/test.jproj -------------------------------------------------------------------------------- /test/tsheb.ijs: -------------------------------------------------------------------------------- 1 | #! [: 5 2 | sheb =: 9 -------------------------------------------------------------------------------- /unix/libedit.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/unix/libedit.a -------------------------------------------------------------------------------- /unix/libedit64.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jsoftware/jsource/5ed184b4fde440ff6f3bda1665acd88374851634/unix/libedit64.a -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | // set version info for github build 2 | // a new distribution is made when the version is updated 3 | #define jversion "9.7.0-beta8" 4 | --------------------------------------------------------------------------------