HNHacker News
TopNewBestAskShowJobs

pgtan

328 karma · joined November 5, 2014

TeX, Emacs, netpbm, Imagemagick, Gentoo
submissionscomments
pgtan··on 0.999...= 1
> 10x -x

subtracting infinities is dangerous, you can achieve any result from it

https://www.youtube.com/watch?v=-EtHF5ND3_s

pgtan··on House cats have more impact on local wildlife than wild predators
What is this mass psychosis of feeling the urge to own a dog or cat anyway? And how it comes, that environmentalists don't get loud on the harm on nature caused by domestic cats and dogs?
pgtan··on For Donald Knuth, good coding is synonymous with beautiful expression
I try to implement in Emacs Lisp Knuth's combinatorial algorithms from

https://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz

I just managed to finish the first Alg. P (plain changes); it was really hard, considering that I didn't understand the algorithm and the description is made for Pascal like languages.

pgtan··on No lockdown, please, we’re Swedish
This is how socialism "works". One pays enormous taxes his whole life, but then, when it comes for government to protect one's health, they do nothing and name this even "liberal".
pgtan··on Israeli doctor in Italy: We no longer help those over 60
So, there are ventilators sitting around useless, because there may be needed "in a week or two" and the EU is not able to organize and coordinate the JIT dirstribution of the equipment across the countries?
pgtan··on Thinking About Recursion
I tried to explain recursion to my son with the monks from "Towers of Hanoi": What is a monk handing out to the next one? Is he waiting? What is a monk's contribution to the answer? How many monks do we need? What does the last monk do? Which monk gives the answer, the first one or the last one?
pgtan··on Board Games of the Ancient World
Not mentioned in the article: Snakes and Ladders. Was real fun to play with my son, especially coming up with new rules after while.

https://en.wikipedia.org/wiki/Snakes_and_Ladders

pgtan··on Lisping at JPL (2002)
Berkeley Logo (brand new in version 6.1). I have compiled two versions, with and without wx.

The file with the procedures is on github:

https://github.com/pgtan/puzzles/blob/master/baum1.lg

https://github.com/jrincayc/ucblogo-code

pgtan··on Lisping at JPL (2002)
But it is also a excellent concatenative (left-to-right) language with brilliant procedure definition mechanism. Here as example, an oneliner to draw ascii christmas tree, we made with the kid last year:

? tanne.print tanne.output tanne.shift tanne.split 19 3 3

pgtan··on From Ivory to Metal (Concatenative Programming) (2017)
I see LOGO also as a kind of (lispy, interactive, left to right!) concatenative langugage. Here is an example, an ASCII christmass tree we made with the kid recently:

    ?  tanne.print tanne.output tanne.shift tanne.split 19 3 3 
             x
            xxx
           xxxx*
          oOOOx
           OxO
          ~oxoOox
         ~~o*o**O
        *o~*~x*OO
       x~Ox*x~~xOx*
        *~ox*x*O*O
       xO~ox~~*~
      oxoxxox~~xx**
     *O*o~OOo~*o**
    ~xOxOx~x*o*x*O
    
just putting something in between:

    ? tanne.print butlast tanne.output tanne.shift tanne.split 19 3 3 
          
         x*
        xxO*
       x*o*Oo
        oo*x
       o~ox~*x
      xOoOOOx*
     **o*xoo
    o***OO**x~
pgtan··on P-99: Ninety-Nine Prolog Problems
Just make sure, solutions work in both directions.
pgtan··on Honu: Syntactic Extension for Algebraic Notation (2012) [pdf]
Yes, LOGO already has all the list evaluating like the real Lisp.

? run `[print ,[sum 2 3]]

5

But also a very sophisticated way to define functions with many default and within even optional parameters without the need of parentheses. From UCBLogo info:

This version of Logo allows variable numbers of inputs to a procedure. After the procedure name come four kinds of things, in this order:

            1.   0 or more REQUIRED inputs    :FOO :FROBOZZ                                    

            2.   0 or more OPTIONAL inputs    [:BAZ 87] [:THINGO 5+9]                          

            3.   0 or 1 REST input            [:GARPLY]                                        

            4.   0 or 1 DEFAULT number        5
pgtan··on Honu: Syntactic Extension for Algebraic Notation (2012) [pdf]
LOGO is already Lisp without parentheses and with infix notation. Recently, doing exercises in LOGO with my kid,he asked: can we put some parentheses around the functions for better clearness? I said: my son, you just discovered Lisp!
pgtan··on Swish: SWI Prolog Notebook
Prolog gives you backtracking for free and liberates you from loops and if's.
pgtan··on Logo 15-word challenge (1997)
Even simple thing like drawing the Euler spiral has much more effect, if you visualize the turtle motion, so you can see how the motion turns at some point and the turtle starts going back on the same way down.

cs repeat 360 [fd 10 lt product 2 repcount wait 5]

or a variant of David Eisenstat's code:

cs pu setpos [-100 -100] pd repeat 8 [rt 45 repeat 4 [repeat 45 [fd 5 rt 2 wait 1] rt 135]]

of course Logo is LISP, so you can do stuff like

? show map [[x] se sum # x ?REST] [1 2 3]

[[2 2 3] [4 3] [6]]

pgtan··on The Beauty of COBOL (2018)
For me, COBOL is so over-presented in the media among the old (mainframe) lagnuages, but I recently was surprised to see a production mainframe LPAR offering an APL2 interface,and it seems the language is still maintained on zOS[1]. But I never heard of business application written in APL.

1 https://www.ibm.com/support/pages/apl2-whats-new

pgtan··on The Pinnacle of LaTex Demo's
Not quite the same, but there is a TeX-Font for the initials:

https://ctan.org/pkg/yinit

pgtan··on VMware Acquires Carbon Black for $2.1B and Pivotal for $2.7B
Yes! If not everything else, Carbon Black is the reason du jour to run away from Windos. Provided, your company allows the use of another OS.
pgtan··on Ask HN: Where do you find new music to listen to online?
SomaFM's Bagel Radio, Soundcloud, Youtube
pgtan··on Cool but obscure X11 tools
my fvwm "desktop" consists for years only of FvwmPager, rclock, and multiple xload running on different machines.
pgtan··on Cool but obscure X11 tools
One BIG thing missing: xteddy! It was xteddy shown in parallel on multiple HP 9000 screens in the early 90ies, which sparked my love for UNIX.

http://weber.itn.liu.se/~stegu/xteddy/

see also

https://xteddy.org/

Also xon (very handy for non-ssh users), jwz's xdaliclock and xkeycaps.

pgtan··on The Tragedy of the Common Lisp: Why Large Languages Explode
Or you can rediscover LOGO, which is LISP to the bones:

? show (map [[x y] [output se :x sum :y #]] [a b c] [10 20 30])

[[a 11] [b 22] [c 33]]

pgtan··on Pomegranate compound with anti-aging effects passes human trial
who doesn't?
pgtan··on Small guide to making nice tables [pdf]
Page 10/11: -94.7351 etc. is so wrong, my eyes are bleeding! Should be typeset in math mode like $-94.7351$ (or whole column in math) to get at least the minus sign right.
pgtan··on Screenshots from developers and Unix people taken in 2002 (2015)
fvwm with FvwmPager: best "desktop" forever!
pgtan··on Fancy Euclid's “Elements” in TeX
MetaPost is so underrated. Glad, this project shows the strength of the language.
pgtan··on Byte Magazine – LISP (1979)
Speaking of, I'm wondering about the down of LOGO? When and why LOGO went unpopular?
pgtan··on A Working Mathematician’s Guide to Parsing
Sadly, he don't understand what LaTeX is and what TeX is. And $$ is a TeX macro, should not be used in LaTeX, the are much better math display environments.
pgtan··on Public Sans – A strong, neutral typeface for text or display
> Microsoft is really big on typography,

you mean that big:

http://www.unics.uni-hannover.de/nhtcapri/quotation-marks.ht...

not even able to provide correct quotation marks!

pgtan··on Nvidia to Acquire Mellanox for $6.9B
Please stop!
← PreviousPage 3 of 6Next →