I'd like to use roll e.g.
1?6
to generate numbers that are different each time I restart q.
The fixed seed normally prevents this, e.g. every time I quit q, restart, and enter 1?6, I get 4.
I am imagining a complex solution but is there an easy, built-in solution you can think of?
Thanks so much.
Edit: I did try using deal (e.g. -1?6) which I thought according to the documentation should work, but it still gives the same number every startup. Any idea why?
I misread your question initially - to make the random generator different each time you have to set a different seed number, see https://code.kx.com/q/basics/syscmds/#s-random-seed
Something like
The difference between roll and deal (position/negative) is that in deal the same value can't appear twice. No big reason to use
negrather than minus sign other than it makes it more obvious/explicit to the reader that it's a deal