Re: [Factor-talk] Rosetta Code

2015-04-09 Thread John Benediktsson
Random integer 1..5, can be done a few other ways (not sure if your floor creates bias). 5 random 1 + 5 [1,b] random Not sure you need ``>integer`` conversion in dice7, should already be integers. Your ``roll`` word can be replaced with ``replicate``, is simpler, for example: 10 [ d

[Factor-talk] Rosetta Code

2015-04-09 Thread Alexander Iljin
Hello again! I'm learning Factor little by little. Currently I'm trying to contribute a solution to Rosetta Code for the following pair of problems: http://rosettacode.org/wiki/Seven-sided_dice_from_five-sided_dice http://rosettacode.org/wiki/Simple_Random_Distribution_Checker The code

Re: [Factor-talk] How to pass a VarArg to a C function?

2015-04-09 Thread Doug Coleman
I think it's an issue with the ffi, as the return value is pretty clearly documented as a constant and not a bitfield. On Thu, Apr 9, 2015, 11:37 John Benediktsson wrote: > Doug Coleman noticed a similar return value in some of his testing, I'm > not sure where it is coming from - any chance it

Re: [Factor-talk] How to pass a VarArg to a C function?

2015-04-09 Thread John Benediktsson
Doug Coleman noticed a similar return value in some of his testing, I'm not sure where it is coming from - any chance it is some kind of bitmask of response values? Hah, I don't use Windows much, and found some sample code that still worked (yay for backwards compatibility!), but would love to upg

Re: [Factor-talk] How to pass a VarArg to a C function?

2015-04-09 Thread Mark Green
Hi, Thanks very much for the helpful answer. I have used the function definition from your file, and I can now get the file picker to appear, but there is a problem when it exits: : main ( -- ) f f gtk_init "Hello" s>gs f GTK_FILE_CHOOSER_ACTION_OPEN "Cancel" s>gs GTK_RESPONSE_CANCEL int "Op

Re: [Factor-talk] Contributing to Factor

2015-04-09 Thread John Benediktsson
Hi Alexander, We love contributions, thanks! Pull requests on the GitHub repo (https://github.com/slavapestov/factor) are very welcome, or opening an issue with some sample code or changes that are important to you. Anything from documentation improvements, new test cases, vocabularies, etc. Th

[Factor-talk] Contributing to Factor

2015-04-09 Thread Alexander Iljin
Hello! What's the recommended way to contribute to Factor codebase? I've got a github account, would a pull request be the best way? ---=--- Александр -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM