Wed Jul 6 16:51:04 2011 by Torben |
If you find any unexpected behaviour of Troll that might indicate an error, please describe this here. If you fail to succesfully post your report, mail me at torbenm@diku.dk . |
Wed Nov 7 06:30:02 2012 by Andre |
The offline version of Troll pointed in the quickguide (http://hjemmesider.diku.dk/~torbenm/Troll) isn't working. |
Wed Nov 7 11:15:44 2012 by Torben |
What is the problem? I just downloaded it, recompiled it and ran it without problems. Also, what version of Moscow ML are you using? |
Tue Oct 15 05:04:00 2013 by Foxiekins |
You posted some code: ab := 4; \ ability di := 3; \ difficulty (count (min {di,5}) < (ab+di)#d6) - di and it works great... I modified it to at := 4; \ attribute sk := 1; \ skill ab := at+sk; \ ability di := 3; \ difficulty (count (min {di,5}) < largest (at+di) (ab+di)#d6) - di to let me add bonus dice for skill, that make it easier to get successes by keeping the higher rolling dice, but not increase the number of successes you can get over the difficulty... This also works perfectly... But when I change the last line to (count (min {di,9}) < largest (at+di) (ab+di)#d10) - di to try the same thing with d10s, I get an error page filled with HTML... Am I overtaxing Troll...? |
Wed Oct 16 10:55:41 2013 by Torben |
Yes, you are in a way overtaxing Troll. The server I run Troll on has some resource limitations that generate this error when exceeded, and there is no clean way of catching the error and producing a nicer message. The server might be upgraded at some point, so the problem goes away (or is reduced, at least). You can download the offline version of Troll and run it on your own PC. Then the limitations will only be the amount of memory you have (and your patience waiting for the result). |
Thu Oct 17 04:08:35 2013 by Foxiekins |
I'm not sure how to even *begin* doing that... No idea how to get Moscow ML set up... |
Thu Oct 17 10:05:38 2013 by Torben |
What operating system do you use on your PC? |
Mon Oct 21 10:30:19 2013 by Antikythera |
Hi. I'd very much like to get an offline version of Troll working in the command line, but I'm having some problems. When I try to use any command (say `troll d6'), I get the following error: `Exception: BasicIO.openin on d6' I'm using the self-extracting 2.01 MML installer on the page http://www.itu.dk/~sestoft/mosml.html and I'm on 64-bit Windows 7. Do you have any ideas? |
Mon Oct 21 15:06:04 2013 by Torben |
I think your installation is working. In the command-line interface, you don't write the dice description on the same line as the command. Try writingtroll 0 where d is the end-of-file character. On Windows I believe it is z, i.e, Ctrl + Z.Alternatively, write your definition in a file, e.g. test.t, and run it using the command troll 0 test.t The 0 means calculating probabilities. A positive number n means generating n random rolls. A negative number means calculating probabilities but with a non-default bound on iteration/recursion. |
Mon Oct 21 23:56:05 2013 by Foxiekins |
I use Windows XP... |
Tue Oct 22 10:16:16 2013 by Torben |
I have added a link to a Windows installer for Moscow ML on the Troll homepage: http://hjemmesider.diku.dk/~torbenm/Troll/ . It is near the bottom of the page. |
Wed Oct 23 21:22:59 2013 by Antikythera |
Thanks Torben, that solved the issue. That was something I initially tried, but after some googling, it turns out for some people pressing Ctrl+Z needs to be pressed twice to actually end the file. Go figure. It's working great now. Thanks for writing this awesome language! |
Wed Oct 23 21:29:29 2013 by Antikythera |
I've got another question, a simple syntax one now. Say I want to roll a d100 and a d8 at once. I'm trying `d100 U d8', but that's giving me answers like {6, 48}, sorting by the result. That lets me separate the dice rolls if the d100 rolls higher than an 8, but if the d100 rolls a 6 and the d8 rolls a 5, I'd get {5, 6} and I wouldn't know which is which. What's the simplest way to order the results? |
Thu Oct 24 13:15:20 2013 by Torben |
Troll generally works on unordered collections (multisets), which are shown as sorted lists. If you want to show two numbers in a specific order, you must convert them to text and concatenate these texts. For example:'d100 || 'd8 The disadvantage is that you can't calculate on the numbers afterwards. If you want to calculate on the numbers in a specific order, use variables, for example: x := d100; I hope this helps. Otherwise, ask again. |
Tue Nov 12 03:57:50 2013 by Patrick2011 |
Apparently, when creating multiple variable definitions before multiple function definitions, the last variable definition results in a parse error at the semicolon. Here's some relevant code:bMinDmg:=6; \Player b's minimum damage. bMaxDmg:=10; \Player b's maximum damage. Make sure this is larger than the minimum. Then I have some comments, which may or may not make a difference. function combat (ah, acth, ad, amin, amax, bh, bcth, bd, bmin, bmax, aAttacks) = ------------------------------------------ The first two code lines in my post are the definitions of the last two variables. Note that each variable is explained with a comment in the same line, yet the parse error occurs only in the last variable. The third code line is the first line of the definition of the first function. How do I get rid of the parse error in the semicolon of the last variable? I have a total of 10 variables defined before the functions, then I have 3 functions defined. |
Tue Nov 12 04:06:56 2013 by Patrick2011 |
Never mind my previous post. It turns out that the main call must come before the function definitions in the situation described above. |
Tue Nov 12 12:06:37 2013 by Torben |
Yes. Function definitions must be either entirely before or entirely after the main expression (including variable definitions). |