Comments (5)
That sounds like an interesting implementation and I'd love to see it. (It does sound like it might go against my "don't be clever in example.lisp" pseudo-rule though...)
If setting *print-circle*
to nil
fixes it then do it in xlisp-test
- perhaps under a feature test for ECL.
from common-lisp.
Let me know if you think it's too clever.
I also added a bunch of tests.
from common-lisp.
It's definitely ECL's load
with the :print
option and setting *print-circle*
to t
makes it work as expected. Reviewing the spec for *print-circle*
http://l1sp.org/cl/*print-circle* it seems like it would be fine to set it to t
generally, and perhaps even a good idea.
from common-lisp.
A passing build: https://travis-ci.org/wobh/xlisp/jobs/83063702
I have two ideas here based on the same foundation.
First add some constants to label the verbosity levels. This takes care of an irksome remainder I decided not to do initially for some reason, but also makes distinguishing the two solutions a easier.
Solution 1. Set *print-circle*
to t
in the lexical scope of load-package
. This is a minimal typing solution and the passing build above is the prime-factors exercise rebased onto that branch. At the bottom you can see the circular list printed correctly. The rationale here is that whatever the load
outputs, it should be safe, so just set it to t
and be done.
Solution 2. Set *print-circle*
to the outcome of (verbosity-p +debug+)
in the lexical scope of load-package
and set the load
:print
argument to the same. This is a minimal effect solution, observing that the extra output of load
with :print
is not strictly desirable for general testing, and *print-circle*
doesn't need to be any value not required.
I prefer solution 1 for the time being, but I think considering what solution 2 does for us is worth thinking about more generally. If/when we find another place to set *print-circle*
to t
or have to set it's dynamic value in test-exercises
we can do so by verbosity level required with verbosity-p
.
from common-lisp.
I agree - it looks like setting *print-circle*
to t
is a good idea. It is a good thing for a testing harness to do - given that there may be circular data - we'd want the harness to be able to handle and report on that without it having its own problems.
I go with solution 1. If we tied it to verbosity then we should consider the other *print-x*
settings which might also be needed/useful. But I think the simpler approach is better for now.
from common-lisp.
Related Issues (20)
- Out of sync practice exercises
- Out of sync practice exercises
- Out of sync practice exercises
- Out of sync practice exercises
- Test file downloaded through CLI for Logan's numeric partition seems to be incorrect. HOT 4
- Out of sync practice exercises
- Out of sync practice exercises HOT 1
- Out of sync practice exercises HOT 1
- Using `roswell` to run tests. HOT 10
- Building a training set of tags for common-lisp HOT 20
- Typo in robot-simulator test. HOT 2
- Deprecate `beer-song` in favor of `bottle-song` HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
- Implement `leap`? HOT 5
- Out of sync practice exercises HOT 1
- Out of sync practice exercises
- key-comparison maze of arrays unclear test of identity or internal structure HOT 3
- Out of sync practice exercises
- Out of sync practice exercises
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common-lisp.