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

Add range function like python's range #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

garaemon
Copy link
Contributor

5.irteusgl$ (range 10)
(0 1 2 3 4 5 6 7 8 9)
6.irteusgl$ (range 2 10)
(2 3 4 5 6 7 8 9)
7.irteusgl$ (range 2 10 2)
(2 4 6 8)

MEMO:
In C layer, it is implemented as CRANGE in order to avoid naming conflicting with JSK internal program (euslib/jsk/jskc.c)

@k-okada
Copy link
Member

k-okada commented Mar 21, 2015

I'm very reluctant to add new feature, just because it is
useful/common in python code, and that's why I did not put push-back
to irteus,

so if we want to support these functions, we need volunteers to:

  • list up all function we need for next-gen euslisp
  • implement these functions with test code, write documents
  • and release them

Otherwise, I'm afraid that irteus becomes yet another euslib/jsk,
which people want to create yet another simplified version of that

evenif we merge this, we need to work on
euslisp/EusLisp#75 first

(do* ((i 0 (1+ i)) (r (list i) (push i r))) ((>= i 3) (nreverse r)))

here is how people use these functons last few years.

2013-01-31 : nakagawa/rnDIMS/demo/evaluation_experiment_of_trajectory_function/script/pass_through_data_point_graph.py
2013-01-31 : nakagawa/rnDIMS/nDIMS/Doxyfile
2013-01-31 : nakagawa/rnDIMS/rDIMS/Doxyfile
2013-01-31 : nakagawa/rnDIMS/ros_interface/Doxyfile
2013-04-06 : k-kojima/bvh_old/filter.l
2013-04-30 : s-noda/atlas/connect.l
2013-04-30 : s-noda/atlas/mount-ladder/temp-dec-move.l
2013-05-10 : iwaishi/pr2-interface-copy.l
2013-08-19 : s-noda/hrp2/mount-ladder/temp-dec-move.l
2013-08-19 : s-noda/hrp2/test/thermo-escape/thermo-graph.l
2013-08-19 : s-noda/hrp2/thermo/check/optimize-R0.l
2013-09-04 : kozuki/tensioncalib/sensorad-calib.l
2013-10-01 : s-noda/hrp2/connect.l
2013-12-16 : s-noda/hrp2/climb/work/contact-sequencer.l
2014-01-05 : y-tanaka/turtlebot_unity/android_make_a_path/bin/classes.dex
2014-01-31 : k-kojima/bvh/filter.l
2014-03-02 : s-noda/hrp2/thermo/estimation/ros-util/thermo-graph.l
2014-03-15 : s-noda/staro/load-balance/temp-estimation-graph-node.l
2014-04-04 : murooka/hrp2_carry/hrp2-reach-obj.l
2014-04-15 : ookubo/k_plot/scripts/todoread/mat_data_plot.py
2014-04-22 : ookubo/redusitimation/scripts/pose-estimation.l
2014-04-25 : nozawa/motion/test-regressor-matrix.l
2014-04-29 : murooka/simulation_planner/holding-pf-estimate/particle-filter-for-holding.l
2014-05-21 : dialogue/memory.l
2014-05-21 : dialogue/distributed_vision.l
2014-08-16 : kuroiwa/s-noda/climb/work/contact-sequencer.l
2014-09-13 : s-noda/util/graph-sample.l
2014-10-27 : kuroiwa/kalman/force-sensor.py
2014-10-28 : kuroiwa/kalman/ConstantVelocity_AKF.py
2014-12-12 : ik/ik-test.l
2015-01-01 : murooka/robot_util/eus-utils.l
2015-01-04 : k-kojima/dynamic_control/log-tools.l
2015-01-06 : nozawa/hrpsys-test/test-st-state-estimate-data.l
2015-01-18 : murooka/fullbody_holding/generate-operation-graph.l
2015-01-20 : murooka/fullbody_holding/test-statics-stability.l
2015-01-21 : murooka/fullbody_holding/extended-cube.l
2015-01-22 : nozawa/motion/test-kajita-st.l
2015-01-28 : s-noda/hrp2/climb/work/dynamic-bspline-trajectory.l
k-okada@kokada-t440s:~/prog/euslib/demo$ grep -lr \(range  * | grep -v
-e "(range [^\ ]*)" | xargs svn info | awk '{if(NR%16==1){printf
$0}if(NR%16==13){OFS="\n";printf " ";print} }' | sort -k 6 | sed
's/Path\(.*\) Last Changed Date: \(20\S*\) .*$/\2 \1/'

2013-02-08 : murooka/hrp2_carry/hrp2-carry-motion.l
2013-02-14 : k-kojima/bvh_old/sdk-bvh2eus.l
2013-03-13 : kurotobi/camera/read-coords.l
2013-03-13 : kurotobi/list-move.l
2013-03-13 : kurotobi/util/shirai-util.l
2013-03-13 : kurotobi/util/tension-filter.l
2013-03-27 : tsuda/lib/ik/arm-head-ik.l
2013-03-27 : tsuda/observe-object-sequence-search/dualarm-observation-graph-class.l
2013-04-04 : t_shirai/sample/kojiro-sample.l
2013-04-06 : k-kojima/bvh_old/filter.l
2013-04-22 : t_shirai/sample/k-chest-teach.l
2013-04-22 : t_shirai/sample/kenshiroupper-teach.l
2013-09-04 : kozuki/mthesis-kozuki/KenshiroUpper-teach.l
2013-09-04 : kozuki/mthesis-kozuki/kozuki-util.l
2014-01-09 : kozuki/KenshiroUpper/kozuki-util.l
2014-01-31 : k-kojima/bvh/filter.l
2014-03-03 : murooka/hrp2_carry/hrp2-pivot-obj.l
2014-04-04 : murooka/hrp2_carry/hrp2-pivot-obj-demo.l
2014-04-14 : k-kojima/bvh/bvh2pseq.l
2014-04-25 : iori/utils/motion-keeper.l
2014-04-29 : murooka/simulation_planner/holding-pf-estimate/particle-filter-for-holding.l
2014-05-21 : dialogue/dummy_human.l
2014-05-21 : dialogue/memory.l
2014-05-21 : dialogue/distributed_vision.l
2014-11-04 : k-kojima/test/hrpsys-test.l
2014-11-08 : k-kojima/bvh/frame-class.l
2014-11-08 : k-kojima/bvh/sdk-bvh2eus.l
2014-12-07 : murooka/holding_planning/staro-holding.l
2014-12-28 : k-kojima/dynamic_control/hrpsys-old-log-parser.l
2015-01-04 : k-kojima/dynamic_control/play-hrpsysfile.l
2015-01-04 : k-kojima/dynamic_control/hrpsys-base-log-parser.l
2015-01-04 : k-kojima/dynamic_control/log-tools.l
2015-02-03 : asano/mocap/mocap-sankou/femur-tibia-cooords.l
2015-02-03 : asano/mocap/mocap-sankou/for_motion_capture.l
2015-02-03 : asano/mocap/mocap-sankou/knee-pelvis-coords.l

$ grep -lr \(push-back * | xargs svn info | awk '{if(NR%16==1){printf
$0}if(NR%16==13){OFS="\n";printf " ";print} }' | sort -k 6 | sed
's/Path\(.*\) Last Changed Date: \(20\S*\) .*$/\2 \1/'

◉ Kei Okada

On Sat, Mar 21, 2015 at 2:55 AM, Ryohei Ueda [email protected] wrote:

5.irteusgl$ (range 10)
(0 1 2 3 4 5 6 7 8 9)
6.irteusgl$ (range 2 10)
(2 3 4 5 6 7 8 9)
7.irteusgl$ (range 2 10 2)
(2 4 6 8)

MEMO:
In C layer, it is implemented as CRANGE in order to avoid naming conflicting
with JSK internal program (euslib/jsk/jskc.c)


You can view, comment on, or merge this pull request online at:

#182

Commit Summary

Add range function like python's range

File Changes

M irteus/irtc.c (78)

Patch Links:

https://github.com/euslisp/jskeus/pull/182.patch
https://github.com/euslisp/jskeus/pull/182.diff


Reply to this email directly or view it on GitHub.

@garaemon
Copy link
Contributor Author

Hmm you mean

  1. need documentation string
  2. need test
  3. range is enough popular according to demos directory
  4. requires add defun2 for adding documentation to function written by C language EusLisp#75 but it breaks C API.
  5. requires testing but it's not supported in jskeus

So is to add lisp-version of roseus with unit test reasonable?

@k-okada
Copy link
Member

k-okada commented Mar 28, 2015

I think we need some kind of discipline to what to include in the language.
So if we want to support some python-like syntax/functions, we should list
up which function to be included at this moment otherwise jskeus keeps
growing and at some point, people will thinks the language is too large and
too many un-used functions so they'll start create new version of irteus.

range seems popular in demo directly these days but I'm afraid it will not
used in a few years, as push_back.

I also thinks our super-long term project to implement euslisp on clisp
project, in that case, we'd better not to include any non common lisp
functions.

◉ Kei Okada

On Sun, Mar 22, 2015 at 2:36 PM, Ryohei Ueda [email protected]
wrote:

Hmm you mean

  1. need documentation string
  2. need test
  3. range is enough popular according to demos directory
  4. requires add defun2 for adding documentation to function written by C language EusLisp#75
    add defun2 for adding documentation to function written by C language EusLisp#75 but it breaks C API.
  5. requires testing but it's not supported in jskeus

So is to add lisp-version of roseus with unit test reasonable?


Reply to this email directly or view it on GitHub
#182 (comment).

@k-okada k-okada force-pushed the master branch 14 times, most recently from 9e2609a to 3296d62 Compare May 1, 2015 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants