4 ms·
Reminds me a bit of dc: https://en.wikipedia.org/wiki/Dc_%28computer_program%29 https://en.wikipedia.org/wiki/Dc_%28computer_program%29
by every 4y ago
Reminds me a bit of dc:
https://en.wikipedia.org/wiki/Dc_%28computer_program%29 https://en.wikipedia.org/wiki/Dc_%28computer_program%29
- 082349872349872 4y agoPeople who are interested in low-level language implementation might wish to learn a little dc, because its ability to easily produce arbitrary binary output may come in handy when boostrapping.
- shagie 4y agoThere was that old RSA in a sig file... #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) You'll note on that last line a |dc` as all of that stuff after the `echo` gets packed into something for dc to run. http://www.cypherspace.org/adam/rsa/rsa-details.html http://www.cypherspace.org/adam/rsa/rsa-details.html
- vram22 4y agobc is built on dc and uses infix notation. bc -l supports arbitrary-precision arithmetic, IIRC.
- Shugyousha 4y ago`k` in dc sets the fractional digits after the dot. I am not sure there is a limit but 99 works ...
- vram22 4y agoGood to know, can be useful.
- prezjordan 4y agoThank you for linking this! Went down a 2-hour rabbit hole and it's really scratching some sort of itch.
- every 4y agoIt is exceedingly terse. Every command is a single character and the only required formatting is a single space to separate numbers. Just this side of line noise...