Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unlimited length for null *print-length* #368

Open
wants to merge 40 commits into
base: cl-compatible
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2c46ad2
convert ascii file to utf-8
k-okada Jun 11, 2019
25637f0
add makefile to convert tex to rst
k-okada Jun 11, 2019
edc4f9e
add preamble.tex: custom command/macro for pandoc conversion
k-okada Jun 11, 2019
cf67628
add conf.py for readthedocs
k-okada Jun 11, 2019
5f96c10
fix tex files to make latex.py happy, {\bfx } -> \bfx{ }, fix wrong …
k-okada Jun 11, 2019
85e1d77
use pstopn/pnmtopng to generate png from ps file, because ps2png is n…
k-okada Jun 11, 2019
259528a
rotate pnm files
k-okada Jun 11, 2019
9582132
Merge pull request #386 from euslisp/fix-rtd2
k-okada Jun 11, 2019
8f41469
doc/latex; make rst : remove vspace{10mm} within title to pass pandoc
k-okada Jun 13, 2019
6ecd6d1
add config.yml
k-okada Jun 12, 2019
cc072cc
Merge pull request #387 from k-okada/circleci
k-okada Jun 15, 2019
281d70b
use ./ instead of source
k-okada Jun 14, 2019
dc67231
stop executing all the next steps if there is no doc update, see htt…
k-okada Jun 19, 2019
964dc01
Fix export typo interger-vector > integer-vector
Affonso-Gui Jun 20, 2019
8168b36
Merge pull request #388 from k-okada/stable-osx
k-okada Jul 2, 2019
4a4a041
fix tex files in jlatex to make latex.py happy, {\bfx } -> \bfx{ }, f…
k-okada Jul 2, 2019
def7590
Merge pull request #392 from k-okada/fix_jmanual
k-okada Jul 2, 2019
f70dd58
Merge pull request #390 from k-okada/master
k-okada Jul 2, 2019
3cf71d2
Fix variable capture in unittest.l
Affonso-Gui Jul 30, 2019
09585bf
Safely exit format on mismatch argument
Affonso-Gui Oct 1, 2019
fa9b115
Merge pull request #394 from Affonso-Gui/fix-unittest-assert
k-okada Oct 8, 2019
a0422c8
Merge pull request #391 from Affonso-Gui/fix-typo
k-okada Oct 8, 2019
0cbe52e
apt-get update before apt-get install
k-okada Oct 8, 2019
e9bda60
Merge pull request #398 from k-okada/fix_circleci
k-okada Oct 8, 2019
1250d3f
Merge branch 'master' into fix-format-interrupt
k-okada Oct 8, 2019
c450d29
Merge branch 'master' into cl-compatible
Affonso-Gui Oct 10, 2019
6a25da0
Merge pull request #396 from Affonso-Gui/fix-format-interrupt
k-okada Oct 10, 2019
2ce0892
travis.sh: install libbullet-dev for jskeus tests
k-okada Nov 1, 2019
f2792cc
install pkg-config. skip collision test for old bullet.
mmurooka Nov 1, 2019
5f664da
fix osx bullet install.
mmurooka Nov 1, 2019
7d5ada7
set HOMEBREW_NO_AUTO_UPDATE for osx brew: ref https://travis-ci.commu…
mmurooka Nov 1, 2019
e77ea65
Merge pull request #3 from mmurooka/add_bullet_fix
k-okada Nov 2, 2019
11fc0a9
add more comments
k-okada Nov 2, 2019
41c497d
Merge pull request #400 from k-okada/add_bullet
k-okada Nov 15, 2019
3e6e200
Merge branch 'master' into cl-compatible
Affonso-Gui Dec 21, 2019
976fedb
Add print-length test code
Affonso-Gui Mar 29, 2019
0431677
Support unlimited *print-length*
Affonso-Gui Mar 28, 2019
d1271fc
Fix *print-length* on print-vector
Affonso-Gui Mar 28, 2019
0be45b3
Unify *print-length* formatting
Affonso-Gui Mar 28, 2019
da9804f
Do not consume *print-length* on structure name
Affonso-Gui Mar 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
version: 2

references:
setup-tex: &setup-tex
run:
name: Setup TeX
command: |-
sudo apt-get update
sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils
setup-eus: &setup-eus
run:
name: Setup EusLisp
command: |-
sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi
echo 'export EUSDIR=`pwd`' >> $BASH_ENV
echo 'export ARCHDIR=Linux64' >> $BASH_ENV
echo 'export PATH=${PATH}:${EUSDIR}/${ARCHDIR}/bin' >> $BASH_ENV
echo 'export LD_LIBRARY_PATH=${EUSDIR}/${ARCHDIR}/lib' >> $BASH_ENV
cat $BASH_ENV
compile-eus: &compile-eus
run:
name: Compile EusLisp
command: cd lisp; ln -sf Makefile.Linux64 Makefile; make

jobs:
html:
machine: true
steps:
- checkout
- *setup-tex
- run:
name: Cleanup HTML
command: cd doc/html && rm *manual*.html *manual*.png
- run:
name: Compile HTML
command: cd doc/latex && make html
- run:
name: Compile jHTML
command: cd doc/jlatex && make html
- run:
command: |
mkdir -p /tmp/html
cp doc/html/*manual*.html /tmp/html
cp doc/html/*manual*.png /tmp/html
- store_artifacts:
path: /tmp/html
- persist_to_workspace:
root: doc
paths:
- html/manual*.html
- html/jmanual*.html
- html/manual*.png
- html/jmanual*.png

latex:
machine: true
steps:
- checkout
- *setup-tex
- *setup-eus
- *compile-eus
- run:
name: Cleanup LaTeX
command: cd doc/latex && make distclean
- run:
name: Compile LaTeX
command: |
cd doc/latex && make
- store_artifacts:
path: doc/latex/manual.pdf
destination: manual.pdf
- persist_to_workspace:
root: doc/latex
paths: manual.pdf
jlatex:
machine: true
steps:
- checkout
- *setup-tex
- *setup-eus
- *compile-eus
- run:
name: Cleanup jLaTeX
command: cd doc/jlatex && make distclean
- run:
name: Compile jLaTeX
command: |
cd doc/jlatex && make
- store_artifacts:
path: doc/jlatex/jmanual.pdf
destination: jmanual.pdf
- persist_to_workspace:
root: doc/jlatex/
paths: jmanual.pdf
rst:
machine: true
steps:
- checkout
- *setup-tex
- run:
name: Install Python3
command: pyenv global system 3.5.2
- run:
name: Install Pandoc
command: sudo apt-get install -y -qq pandoc
- run:
name: Compile reStructuredText(reST)
command: cd doc/latex && make rst
- run:
command: |
mkdir -p /tmp/rst/fig
cp doc/latex/*.rst /tmp/rst
cp doc/latex/fig/*.png /tmp/rst/fig
cp doc/latex/conf.py /tmp/rst
- run:
name: Install Sphinx
command: |
pip3 install --user sphinx
pip3 install --user sphinx_rtd_theme
- run:
name: Build reStructuredText(reST)
command: cd /tmp/rst && ~/.local/bin/sphinx-build . html
- store_artifacts:
path: /tmp/rst
- persist_to_workspace:
root: /tmp
paths: rst

artifacts:
docker:
- image: circleci/node:8.10.0
steps:
- checkout
- attach_workspace:
at: artifacts
- store_artifacts:
path: artifacts
- run:
command: |
echo "Check is PR commit : CIRCLE_BRANCH = $CIRCLE_BRANCH"
if [ "${CIRCLE_BRANCH}" == master ]; then exit 0; fi
echo "Check if there is commit in doc directory"
git diff origin/master --name-only --relative doc
if [ "`git diff origin/master --name-only --relative doc`" == "" ]; then echo "No update in doc directory found, exitting... "; circleci step halt; fi
echo "Found new commit on doc directory"
- run: cd .circleci/ && git clone https://github.com/themadcreator/circle-github-bot.git
- run: cd .circleci/circle-github-bot && npm install
- run: cd .circleci/circle-github-bot && npm run build
- run: .circleci/github-pr-update.js

workflows:
version: 2
build:
jobs:
- latex
- jlatex
- html
- rst
- artifacts:
requires:
- latex
- jlatex
- html
- rst

14 changes: 14 additions & 0 deletions .circleci/github-pr-update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node

const bot = require("./circle-github-bot/").create();

bot.comment(process.env.GH_AUTH_TOKEN, `
Thank you for contributing EusLisp documentation<br>
Please check latest documents before merging<br>

PDF version of English manual: <strong>${bot.artifactLink('artifacts/manual.pdf', 'manual.pdf')}</strong>
PDF version of Japanese jmanual: <strong>${bot.artifactLink('artifacts/jmanual.pdf', 'jmanual.pdf')}</strong>
HTML version of English manual: <strong>${bot.artifactLink('artifacts/html/manual.html', 'manual.html')}</strong>
HTML version of Japanese manual: <strong>${bot.artifactLink('artifacts/html/jmanual.html', 'jmanual.html')}</strong>
Sphinx (ReST) version of English manual: <strong>${bot.artifactLink('artifacts/rst/html/manual.html', 'manual.rst')}</strong>
`);
13 changes: 9 additions & 4 deletions .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
travis_time_end

travis_time_start setup.apt-get_install
ret=1; while [ $ret != 0 ]; do sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi && ret=0 || echo "failed, retry"; done # msttcorefonts could not install on 14.04 travis
ret=1; while [ $ret != 0 ]; do sudo apt-get install -qq -y git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi pkg-config libbullet-dev && ret=0 || echo "failed, retry"; done # msttcorefonts could not install on 14.04 travis
if [ "`uname -m`" == "x86_64" ] ; then sudo apt-get install -qq -y texlive-latex-base ptex-bin latex2html nkf poppler-utils || echo "ok"; fi # 16.04 does ont have ptex bin
travis_time_end

Expand All @@ -38,9 +38,11 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
# skip if already installed
# https://discourse.brew.sh/t/skip-ignore-brew-install-if-package-is-already-installed/633/2
# brew install jpeg libpng mesalib-glw;
brew list jpeg &>/dev/null || brew install jpeg
brew list libpng &>/dev/null || brew install libpng
brew list mesalib-glw &>/dev/null || brew install mesalib-glw
# use HOMEBREW_NO_AUT_UPDATE to fix unexpected keyword error https://travis-ci.community/t/syntax-error-unexpected-keyword-rescue-expecting-keyword-end-in-homebrew/5623
brew list jpeg &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install jpeg
brew list libpng &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install libpng
brew list mesalib-glw &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install mesalib-glw
brew list bullet &>/dev/null || HOMEBREW_NO_AUTO_UPDATE=1 brew install bullet
travis_time_end

fi
Expand Down Expand Up @@ -171,6 +173,9 @@ fi
for test_l in irteus/test/*.l; do

[[ ("`uname -m`" == "arm"* || "`uname -m`" == "aarch"*) && $test_l =~ geo.l|mathtest.l|interpolator.l|test-irt-motion.l|test-pointcloud.l|irteus-demo.l ]] && continue;
# skip collision test because bullet of 2.83 or later version is not released in trusty and jessie.
# https://github.com/euslisp/jskeus/blob/6cb08aa6c66fa8759591de25b7da68baf76d5f09/irteus/Makefile#L37
[[ ( "$DOCKER_IMAGE" == *"trusty"* || "$DOCKER_IMAGE" == *"jessie"* ) && $test_l =~ test-collision.l ]] && continue;

travis_time_start irteus.${test_l##*/}.test

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ install:
script:
- echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --rm -i -v $HOME:$HOME -e "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -e "MAKEFLAGS=$MAKEFLAGS" -e "DOCKER_IMAGE=$DOCKER_IMAGE" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source ./.travis.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./.travis.sh; fi
after_failure:
- echo "failure"
after_success:
Expand Down
2 changes: 1 addition & 1 deletion doc/jlatex/jgenerals.tex
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ \subsection{型指定}
あるいは{\bf :fixnum}が整数型を表現するために使用され、
{\bf :float}あるいは{\bf float}が実数型を表現するために使用される。
{\bf make-array}の{\em element-type}引数においては、文字列を作るために
{\bf :character}, {\bf character}, {\bf :byte}や{\bfx byte}を
{\bf :character}, {\bf character}, {\bf :byte}や\bfx{byte}を
認識する。
{\bf defcstruct}, {\bf sys:peek}や{\bf sys:poke}のような低レベルの関数も、
バイト毎にアクセスするために
Expand Down
6 changes: 3 additions & 3 deletions doc/jlatex/jgeometry.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\section{\label{Geometry}幾何学モデリング}
\markright{\arabic{section}. 幾何学モデリング}

Euslispは、3次元の幾何学モデルの内部表現として{\emx Brep}(境界表現)を採用している。
Euslispは、3次元の幾何学モデルの内部表現として\emx{Brep}(境界表現)を採用している。
Brep内の要素は{\bf edge, plane, polygon, face, hole,}や{\bf body}クラスによって
表現される。
基本bodyの作成関数とbodyの合成関数は、これらのクラスの新しい
Expand Down Expand Up @@ -746,8 +746,8 @@ \subsection{\label{primitive-body-creation}基本bodyの作成関数}
もし,頂点のリストなら,順番を慎重にしなさい。
%%% change 2004.12.14 \verb+ (make-cone \#f(0 0 10) (list \#f(10 0 0) \#f(0 10 0) \#f(-10 0 0)
%%% change 2004.12.14 \#f(0 -10 0)))+ は,正方形の底面を持つ四角錐を作る。}
\verb~ (make-cone \#f(0 0 10) (list \#f(10 0 0) \#f(0 10 0) \#f(-10 0 0)
\#f(0 -10 0)))~ は,正方形の底面を持つ四角錐を作る。}
\verb~ (make-cone \#f(0 0 10) (list \#f(10 0 0) \#f(0 10 0) \#f(-10 0 0) \#f(0 -10 0)))~
は,正方形の底面を持つ四角錐を作る。}

\funcdesc{make-solid-of-revolution}{points \&key (segments 16) name color}{
{\em points}は,z軸まわりの時計方向に回転される。
Expand Down
2 changes: 1 addition & 1 deletion doc/jlatex/jintro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ \subsection{インストール}
その他は、付属ライブラリ・デモプログラム・ユーザーからの寄贈品である。

\begin{table}
\caption{\label{Directories}{\tt *eusdir*}のディレクトリ}
\caption{{\tt *eusdir*}のディレクトリ\label{Directories}}
\begin{center}
{\footnotesize
\begin{tabular}{|l | l|}\hline
Expand Down
4 changes: 2 additions & 2 deletions doc/jlatex/jmthread.tex
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ \subsection{同期}
{\em sem}に信号が来るまで待つ。}

\classdesc{sys:barrier-synch}{propertied-object}{
threads n-threads count barrier-cond threads-lock count-lock}
{同期障壁のための構造を表現する。
threads n-threads count barrier-cond threads-lock count-lock}{
同期障壁のための構造を表現する。
同期を待っているスレッドは、{\em thread-lock}によって
相互に排除される{\em thread}に置かれる。
{\bf barrier-synch}オブジェクトが生成されたとき、
Expand Down
4 changes: 2 additions & 2 deletions doc/jlatex/jobjects.tex
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ \subsection{基本クラス}
{\bf metaclass}は、複数クラスを定義する。独自のクラス変数を持つ複数クラスは、
それらのスーパークラスとして{\bf metaclass}を定義しなければならない。}

\methoddesc{:new}{}
{このクラスのインスタンスを生成し、全てのスロットをNILにした後、
\methoddesc{:new}{}{
このクラスのインスタンスを生成し、全てのスロットをNILにした後、
それを返す。}

\methoddesc{:super}{}{
Expand Down
2 changes: 1 addition & 1 deletion doc/jlatex/jsymbols.tex
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ \subsection{パッケージ}
symbolをexportあるいはimportするとき、あらゆるパッケージ内の
全てのsymbolが独自の
print-nameを持つ必要があるため、symbol名の重複を発見することができる。
{\bfx shadow}は、パッケージからsymbolを仮想的に削除することにより、
\bfx{shadow}は、パッケージからsymbolを仮想的に削除することにより、
存在するsymbolと同じ名前のsymbolを作成することができる。

Euslispは次の8つのパッケージを定義する。
Expand Down
32 changes: 32 additions & 0 deletions doc/latex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,35 @@ html:
rm -f ../html/manual*.{old,html,png,pl} ../html/manual-images.*
TRANSPARENT_COLOR="#ffffff" latex2html -dir ../html/ -transparent -local_icons -split +3 -auto_prefix -iso_language JP -address "This document was generated using the LaTeX2HTML translator on `date` from <a href=\"http://github.com/euslisp/EusLisp.git\">EusLisp</a> version <a href=\"http://github.com/euslisp/EusLisp/commit/`git rev-parse --verify HEAD`\">`git log -1 --oneline`</a>" -html_version="4.0,unicode" manual
(cd ../html; for imgfile in manual-img*.png; do pngtopnm $$imgfile > /tmp/$$imgfile.pnm; pnmtopng -transparent white /tmp/$$imgfile.pnm > $$imgfile; done)

latex.py:
wget https://raw.githubusercontent.com/jobh/latex.py/master/latex.py

#
TEXFILES=$(filter-out manual.tex, $(wildcard *.tex))
RSTFILES=$(TEXFILES:%.tex=%.rst)
%.rst : %.tex
python3 latex.py -2 -L preamble.tex $< > /tmp/tmp_$^
pandoc /tmp/tmp_$^ -o $@ -V documentclass=ltjarticle --latex-engine=lualatex
sed -i 's@.. figure:: \(.*\).ps@.. figure:: \1.png@g' $@ # use png for figures

PSFILES=$(wildcard fig/*.ps)
PNGFILES=$(PSFILES:%.ps=%.png)
%.png : %.ps
#ps2png $^ $@
pstopnm -stdout $^ | pnmflip -rotate270 | pnmtopng - > $@


rst: manual.rst
manual.rst: latex.py $(RSTFILES) $(PNGFILES)
cp manual.tex /tmp/manual.tex
sed -i 's@\\input{\(.*\)}@..include:: \1\n@g' /tmp/manual.tex # convert \input in tex to bypass pandoc
sed -i 's@\\part{\(.*\)}@.. toctree:: \1@' /tmp/manual.tex # convert \part in tex to bypass pandoc
sed -i ':a;/^[^%].*\\\\$$/{N;s/\\\\\n//;ba}' /tmp/manual.tex # concatinate title/author multi lines
sed -i '/^\\vspace{10mm}$$/d' /tmp/manual.tex # remove vspace{10mm} within title to pass pandoc
pandoc --no-wrap -s /tmp/manual.tex -o manual.rst -V documentclass=ltjarticle --latex-engine=lualatex
sed -i '[email protected]:: \(.*\)@ \1@' manual.rst # restore ..include for rst
sed -i 's@.. toctree:: \(.*\)@.. toctree::\n :maxdepth: 1\n :caption: \1@' manual.rst # restore ..toctree for rst
sed -i 's@** Featuring@**\nFeaturing@' manual.rst # add newline before Featuring in title
sed -i -ne '3!{p;d;};h;n;:1;4!{N;b1};G;h;n;p;g;p' manual.rst; head manual.rst

Loading