<< Back to previous view

[TGEN-3] binding *seed* does not change the basis Created: 13/Oct/12  Updated: 03/Feb/13  Resolved: 03/Feb/13

Status: Closed
Project: test.generative
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Ben Smith-Mannschott Assignee: Stuart Halloway
Resolution: Completed Votes: 0
Labels: None


This is what I'm observing:

user=> (binding [gen/*seed* 7] (gen/uniform))
user=> (binding [gen/*seed* 7] (gen/uniform))

This is what I'm expecting:

user=> (binding [gen/*seed* 7] (gen/uniform))
user=> (binding [gen/*seed* 7] (gen/uniform))

The work-around is to bind *rnd* to a new java.util.Random constructed appropriately:

(binding [gen/*rnd* (java.util.Random. 7)] (gen/uniform))

I'm not sure: Is this is a bug in the doc string of *seed*? Is the bug the very existence of *seed*? (*seed* is never used.) Should the doc-string for *rnd* suggest something like the code above as a way to get a consistent basis? Should generators provide a with-seed macro to do this for us?

Comment by Stuart Halloway [ 03/Feb/13 7:13 AM ]

this is fixed on master in the data.generators project

Generated at Mon Oct 23 06:50:32 CDT 2017 using JIRA 4.4#649-r158309.