HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Implementing a bignum calculator - Rob Pike - golang-syd November 2014

The Go Programming Language · Youtube · 83 HN points · 4 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention The Go Programming Language's video "Implementing a bignum calculator - Rob Pike - golang-syd November 2014".
Youtube Summary
Rob Pike describes his interpreter for an APL-like calculator language.

Slides: http://go-talks.appspot.com/github.com/robpike/ivy/talks/ivy.slide#1
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
May 04, 2021 · 2 points, 0 comments · submitted by tosh
Jun 19, 2020 · 3 points, 0 comments · submitted by tosh
It's not like this is Pike's first contact with Lisp, he wrote an APL interpreter in it: https://www.youtube.com/watch?v=PXoG0WX0r_E

Note, that's not the topic of the talk, it's just mentioned in it.

The presentation he gave on it is lovely.

https://www.youtube.com/watch?v=PXoG0WX0r_E

Jul 24, 2019 · 2 points, 0 comments · submitted by tosh
Jul 13, 2015 · aric on Ivy: iOS app written in Go
Rob Pike's Ivy: https://github.com/robpike/ivy

Video about it (Nov 2014): "Implementing a bignum calculator" https://www.youtube.com/watch?v=PXoG0WX0r_E

Dec 19, 2014 · 76 points, 25 comments · submitted by mseepgood
parktheredcar
Does anybody have suggestions for sources of software / computing / codecasting related videos similar to this? Something to put on in the background while working?

TOPLAP (http://toplap.org/) is a decent example of this but they are focused on audio/visual entertainment only.

Basically I'm looking for Twitch for programmers.

arobertson
A couple links I have stashed: http://coderstv.com/ http://confreaks.com/ http://www.dotconferences.eu/ http://brikis98.blogspot.com/2014/05/must-see-tech-talks-for...
parktheredcar
These are some great resources! Thanks.
xkarga00
Github repo:

https://github.com/robpike/ivy

None
None
xixixao
This snippet from the implementation sheds some light on the origins of Go for me, the mindset from which it's born and why it isn't a language for me.

    interactive := false
    if name == "-" {
        interactive = true
        fd = os.Stdin
    } else {
        interactive = false
        fd, err = os.Open(name)
    }
Or do you think I am reading into it too much?
xtacy
Could you explain why that snippet makes you decide that way?
throwaway_99837
Pseudocode (better). Notice the immutable everything and the brevity (i.e., vertical space saved).

    interactive := (name == "-")
    fd, err := interactive ? (os.Stdin, None) : os.Open(name)
[And yes I understand that Go probably doesn't have tuple literals or a concept of 'None'].
willvarfar
He wants to compute some bignums, so he writes an APL interpreter in Go...

Now he is scratching his itch and making nice slides to boot.

However, it would have been simpler for him to have typed "python" at the commandline... Python ints are arb precision :)

arthurbrown
Arbitrary precision is handled by https://golang.org/pkg/math/big/

He isn't implementing a bignum package, this is all about the APL interpreter.

lispm
or GNU CLISP which not only has big ints, big ratios, big complex (like all Common Lisp implementations), but also big floats.

Big ratios:

    [2]> (/ 5723475972349572938475982734985723984759823749587 7239457928374598723984759237459723497598234)
    5723475972349572938475982734985723984759823749587/7239457928374598723984759237459723497598234
Big complex numbers:

    [4]> (* 572934759237495723482374957239475982374957239847523485 (sqrt -1))
    #C(0 572934759237495723482374957239475982374957239847523485)
Big float numbers:

    [8]> (SETF (EXT:LONG-FLOAT-DIGITS) 1000)
    1000
    [9]> (sqrt 2.0l0)
    1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727350138462309122970249248360558507372126441214970999358314132226659275055927557999505011527820605714701095599716059702745345968620147285174186408891986095523292304843087143214508397626036279952514079896872534L0
angersock
Ah yes, but a small userbase!
pkhagah
If you're talking about userbase, I presume, Go should have less of a userbase than lisp.
deeviant
People use lisp for something other than a programming discussion talking point?
reportingsjr
The message board that you posted this to. Written in Arc which is a dialect of lisp.
deeviant
So you mean they use it to create an application that allows them to... talk about lisp.
angersock
So, the correct answer here would've been that Viaweb--Graham's company that later became Yahoo! Store--was done in Common Lisp. I'm not really aware of any other example of Common Lisp in a real commercial setting other than Mirai (which I think is dead nowadays anyway).

Graham later made Arc, the language in which HN is written. To the best of my knowledge Arc's only major project is in fact Hacker News.

So, essentially, yes, you're correct.

lispm
http://www.ptc.com/product/creo/elements

largely written in a few million lines of Lisp...

deeviant
Once again, downvotes are leaned on in lieu of wit.
dsymonds
Yes, but he wasn't trying to compute numbers. He was trying to build a calculator. There's a difference.
zaphar
You misattribute the motivation. He wants to play.

Implementing a BigNum calculator using APL concepts is one way to play. I do this all the time. I'll implement something that will never be in production somewhere or useful to anybody purely for the learning experience and challenge of it.

[EDIT: spelling]

pjmlp
Lisp would be even better, as he would get the speed of compiled language.
mseepgood
In the video he says that he already implemented an APL interpreter in Lisp.
raverbashing
> Python ints are arb precision

Python 2 longs or Python 3 ints ;)

willvarfar
Automatic promotion from a 32-bit or 64-bit storage to arbitrary precision.
tptacek
The premise of this comment being that it hadn't occurred to Rob Pike that there were already arbitrary-precision calculators.
Intermernet
Rob mentions a video demonstrating the development of an APL version of Conway's Game Of Life. Pretty sure it's this one if anyone is interested: http://youtu.be/a9xAKttWgP4
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.