<div dir="ltr">I am a gamer.&nbsp; Table top RPGs, war games, board games, etc.&nbsp; Since my laptop is pen-based, I has been handier to keep it at the table than paper.&nbsp; As a result, I have been experimenting with making dice rollers to have yet another item not needed on the table.&nbsp; Sure, it takes away some of the tradition, but it makes for carrying fewer things.&nbsp; I have written various dice roll simulators in xblite, ruby and some other dynamics, but this seems like an interesting exercise to try in Haskell.<br>
<br>My first goal is to figure out how to get the command-line arguments.&nbsp; As I did with the other languages, my first program in this development simply retrieved the arguments and printed them.&nbsp; So, here it is.<br><br><div style="margin-left: 40px;">
<span style="font-family: courier new,monospace;">import System.Environment</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">main = do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp; args &lt;- getArgs</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; print args</span><br clear="all"></div><br>Very simple and to the point.&nbsp; Now I need to dig into the manual and figure out the next simple progression...taking 2 arguments and doing something to them akin to:<br>
<br><font face="courier new,monospace">roll 1 6<br><br><font face="arial,sans-serif">This would roll 1, 6-sided die, or 1d6 in gamer terms and print the result.<br><br>I figure the best way to learn a new language is to apply it something I might actually use it for.<br>
</font></font><br>-- <br>Chad Wilson
</div>