User talk:Davbol

From Rosetta Code

Ulam spiral (for primes)

The task requirement for the Rosetta Code task   Ulam spiral (for primes)   was to choose a grid size that would fill up your terminal screen.

Could you increase the last   (Lau)   output to at least,   for instance,   to maybe fill up at least a screen size of 80×80, or even bigger?

I realize that there are other computer programming language entries that didn't comply with a full-screen version,   and I hesitate of causing a ruckus with a whole bunch of users,   but I thought I would prompt you   (off-task, so to speak)   and see if I could persuade you a bit to enlarge your Ulam spiral ASCII plot.


Thanks.       -- Gerard Schildberger (talk) 22:14, 6 July 2020 (UTC)

Template:Reply toTemplate:Ping Happy to oblige. Many tasks seemingly attempt to minimize the output section (to barely a "proof-of-concept" exhibit) and having glanced at the other submissions I just sort of assumed that was the case here too, but it looks much better with larger output. :) --Davbol (talk) 14:27, 7 July 2020 (UTC)
Thanks for your time and understanding.     -- Gerard Schildberger (talk) 14:32, 7 July 2020 (UTC)


a method of displaying a largish plot to have a smaller display

There is a method to display large plots and have a smaller display. Instead of:

Output:
n = 66.0
              ██                  ██  ██                  ██                                                          ██
        ██  ██                      ██          ██                              ██          ██  ██                      
                          ██                  ██  ██                                  ██          ██      ██                      ██
██                  ██                  ██  ██                  ██                      ██  ██                  ██          ██
  ██          ██  ██                      ██      ██                      ██  ██          ██      ██          ██          ██
        ██                              ██  ██                  ██                                      ██          ██      ██
          ██              ██          ██          ██                  ██              ██                                      ██
                        ██          ██      ██  ██      ██          ██          ██              ██      ██  ██          ██      ██
  ██                                                          ██      ██          ██              ██                  ██          ██
    ██      ██                  ██      ██          ██          ██              ██      ██  ██                          
  ██  ██      ██          ██  ██                      ██                  ██  ██      ██  ██                              ██
                            ██  ██                                  ██          ██          ██                              ██
      ██                          ██          ██          ██          ██              ██                  ██  ██  ██  ██  ██
            ██  ██      ██      ██                          ██      ██              ██      ██                      ██          ██
                                      ██          ██      ██  ██      ██                          ██      ██            
██  ██      ██  ██          ██          ██  ██          ██      ██  ██                                  ██  ██  ██          ██  ██
          ██              ██          ██  ██                                          ██          ██                          ██
                                        ██  ██          ██      ██                      ██          ██                      ██
                                                              ██      ██  ██      ██                          ██  ██  ██      ██  ██
    ██                  ██  ██                              ██      ██              ██      ██  ██                      ██
  ██                      ██          ██      ██                      ██  ██          ██                                          ██
            ██          ██  ██      ██  ██          ██  ██          ██          ██                      ██                      ██
                  ██      ██  ██                      ██                      ██      ██          ██  ██          ██    
                    ██          ██          ██      ██              ██          ██                              ██      
                  ██  ██          ██      ██                  ██      ██  ██      ██  ██  ██                                  ██
    ██              ██  ██  ██  ██              ██          ██                  ██  ██      ██          ██  ██          ██
                                      ██          ██      ██  ██                              ██          ██          ██
                                                                ██  ██          ██      ██      ██  ██      ██  ██  ██      ██  ██
      ██  ██  ██          ██      ██      ██      ██  ██      ██              ██      ██  ██                  ██        
                                                                ██  ██      ██                                  ██      
      ██          ██  ██      ██              ██      ██  ██          ██  ██  ██          ██  ██  ██                              ██
██      ██  ██          ██      ██  ██  ██  ██  ██  ██  ██  ██      ██              ██                  ██  ██                  ██
                                                              ██  ██  ██                      ██                      ██          ██
██  ██      ██          ██                          ██      ██    ████  ██  ██  ██      ██  ██  ██          ██              ██  ██
  ██              ██  ██              ██              ██  ██  ██                                                        
        ██                                              ██      ██                                                      
                  ██  ██          ██      ██  ██      ██  ██      ██      ██  ██      ██      ██  ██      ██      ██  ██
██      ██      ██          ██          ██      ██      ██          ██          ██  ██      ██              ██          ██
  ██          ██                                          ██                      ██                      ██                      ██
    ██                  ██  ██                  ██  ██          ██      ██      ██              ██  ██              ██  
                          ██  ██          ██      ██                      ██              ██          ██                  ██
                                ██          ██          ██      ██  ██                                                  
          ██                                          ██  ██      ██          ██      ██          ██      ██  ██  ██    
██          ██  ██              ██  ██  ██  ██                  ██  ██          ██          ██  ██      ██  ██      ██  
                                      ██      ██                      ██  ██                                            
    ██          ██          ██      ██  ██          ██          ██      ██  ██                      ██          ██      ██  ██  ██
  ██  ██  ██  ██  ██          ██  ██              ██                  ██              ██          ██                          ██
                    ██                              ██  ██      ██  ██                  ██          ██                  
                      ██                      ██      ██          ██          ██                  ██  ██          ██              ██
        ██              ██              ██  ██          ██                                  ██                          ██
              ██          ██      ██              ██                      ██      ██          ██                      ██          ██
            ██  ██                                                                  ██          ██      ██          ██  
      ██  ██              ██      ██  ██      ██          ██                      ██                          ██          ██  ██
                    ██                                  ██          ██      ██  ██                              ██          ██
                  ██          ██                      ██              ██                              ██      ██          ██
        ██  ██  ██              ██          ██      ██  ██      ██              ██          ██                          
              ██                                  ██                                              ██      ██            
██                      ██                          ██          ██      ██  ██          ██      ██          ██          
          ██  ██          ██                                          ██                      ██  ██                      ██  ██
        ██                      ██                  ██                      ██  ██          ██      ██  ██              
          ██                                                      ██  ██                  ██              ██      ██      ██      ██
██  ██                      ██          ██              ██      ██              ██                                      
                          ██                              ██              ██      ██  ██      ██  ██                              ██
██                      ██  ██      ██                          ██          ██      ██              ██                  ██
  ██      ██          ██  ██      ██          ██  ██                      ██      ██                                      ██
                                ██                                              ██                  ██          ██  ██  




... you could use:

the normal {{out}} template,   followed by a replacement for the   <pre>   HTML tag:


(Shown at two thirds size.)         ◄■■■■■■■■■■■■■ optional comment that you can use before the PRE HTML tag.

<pre style="font-size:67%">


This will show the above data as:

Output:
n = 66.0
              ██                  ██  ██                  ██                                                          ██
        ██  ██                      ██          ██                              ██          ██  ██                      
                          ██                  ██  ██                                  ██          ██      ██                      ██
██                  ██                  ██  ██                  ██                      ██  ██                  ██          ██
  ██          ██  ██                      ██      ██                      ██  ██          ██      ██          ██          ██
        ██                              ██  ██                  ██                                      ██          ██      ██
          ██              ██          ██          ██                  ██              ██                                      ██
                        ██          ██      ██  ██      ██          ██          ██              ██      ██  ██          ██      ██
  ██                                                          ██      ██          ██              ██                  ██          ██
    ██      ██                  ██      ██          ██          ██              ██      ██  ██                          
  ██  ██      ██          ██  ██                      ██                  ██  ██      ██  ██                              ██
                            ██  ██                                  ██          ██          ██                              ██
      ██                          ██          ██          ██          ██              ██                  ██  ██  ██  ██  ██
            ██  ██      ██      ██                          ██      ██              ██      ██                      ██          ██
                                      ██          ██      ██  ██      ██                          ██      ██            
██  ██      ██  ██          ██          ██  ██          ██      ██  ██                                  ██  ██  ██          ██  ██
          ██              ██          ██  ██                                          ██          ██                          ██
                                        ██  ██          ██      ██                      ██          ██                      ██
                                                              ██      ██  ██      ██                          ██  ██  ██      ██  ██
    ██                  ██  ██                              ██      ██              ██      ██  ██                      ██
  ██                      ██          ██      ██                      ██  ██          ██                                          ██
            ██          ██  ██      ██  ██          ██  ██          ██          ██                      ██                      ██
                  ██      ██  ██                      ██                      ██      ██          ██  ██          ██    
                    ██          ██          ██      ██              ██          ██                              ██      
                  ██  ██          ██      ██                  ██      ██  ██      ██  ██  ██                                  ██
    ██              ██  ██  ██  ██              ██          ██                  ██  ██      ██          ██  ██          ██
                                      ██          ██      ██  ██                              ██          ██          ██
                                                                ██  ██          ██      ██      ██  ██      ██  ██  ██      ██  ██
      ██  ██  ██          ██      ██      ██      ██  ██      ██              ██      ██  ██                  ██        
                                                                ██  ██      ██                                  ██      
      ██          ██  ██      ██              ██      ██  ██          ██  ██  ██          ██  ██  ██                              ██
██      ██  ██          ██      ██  ██  ██  ██  ██  ██  ██  ██      ██              ██                  ██  ██                  ██
                                                              ██  ██  ██                      ██                      ██          ██
██  ██      ██          ██                          ██      ██    ████  ██  ██  ██      ██  ██  ██          ██              ██  ██
  ██              ██  ██              ██              ██  ██  ██                                                        
        ██                                              ██      ██                                                      
                  ██  ██          ██      ██  ██      ██  ██      ██      ██  ██      ██      ██  ██      ██      ██  ██
██      ██      ██          ██          ██      ██      ██          ██          ██  ██      ██              ██          ██
  ██          ██                                          ██                      ██                      ██                      ██
    ██                  ██  ██                  ██  ██          ██      ██      ██              ██  ██              ██  
                          ██  ██          ██      ██                      ██              ██          ██                  ██
                                ██          ██          ██      ██  ██                                                  
          ██                                          ██  ██      ██          ██      ██          ██      ██  ██  ██    
██          ██  ██              ██  ██  ██  ██                  ██  ██          ██          ██  ██      ██  ██      ██  
                                      ██      ██                      ██  ██                                            
    ██          ██          ██      ██  ██          ██          ██      ██  ██                      ██          ██      ██  ██  ██
  ██  ██  ██  ██  ██          ██  ██              ██                  ██              ██          ██                          ██
                    ██                              ██  ██      ██  ██                  ██          ██                  
                      ██                      ██      ██          ██          ██                  ██  ██          ██              ██
        ██              ██              ██  ██          ██                                  ██                          ██
              ██          ██      ██              ██                      ██      ██          ██                      ██          ██
            ██  ██                                                                  ██          ██      ██          ██  
      ██  ██              ██      ██  ██      ██          ██                      ██                          ██          ██  ██
                    ██                                  ██          ██      ██  ██                              ██          ██
                  ██          ██                      ██              ██                              ██      ██          ██
        ██  ██  ██              ██          ██      ██  ██      ██              ██          ██                          
              ██                                  ██                                              ██      ██            
██                      ██                          ██          ██      ██  ██          ██      ██          ██          
          ██  ██          ██                                          ██                      ██  ██                      ██  ██
        ██                      ██                  ██                      ██  ██          ██      ██  ██              
          ██                                                      ██  ██                  ██              ██      ██      ██      ██
██  ██                      ██          ██              ██      ██              ██                                      
                          ██                              ██              ██      ██  ██      ██  ██                              ██
██                      ██  ██      ██                          ██          ██      ██              ██                  ██
  ██      ██          ██  ██      ██          ██  ██                      ██      ██                                      ██
                                ██                                              ██                  ██          ██  ██  


This will allow you to use a bigger plot with the same footprint as your original (at 100%).


You can use   50%,   for the font-size,   but then the normal display of the text:

n = 66.0

will be reduced as well,   and almost unreadable.     -- Gerard Schildberger (talk) 14:57, 7 July 2020 (UTC)

Thanks. I had just recently learned that "trick" (used it on Sierpinski pentagon). I could go nuts and do a 1000x1000 spiral shown at 10% -- it works fine at that scale, but would likely frustrate visitors with the >2M increase in page size if embedded in the wiki! Cheers. --Davbol (talk) 19:30, 7 July 2020 (UTC)