Better HN
topnewbestaskshowjobs
Log inSign up

ericbb

149 karma · joined Nov 6, 2009 (17y ago) · 117 submissions

https://norstrulde.org

eric.bergstrome@gmail.com

Submissions

comment 11y ago · link · parent

Check out this Scientific American article[1], especially the video of a presentation given by Voevodsky.

Edit: Here's a more direct page[2] if you just want the video.

[1] http://blogs.scientificamerican.com/guest-blog/voevodskye280...

[2] http://www.heidelberg-laureate-forum.org/blog/video/lecture-...

comment 11y ago · link · parent

Here's a title for a rebuttal in case anybody wants to write it. ;)

The Tragedy of ISLISP, Or, Why Small Languages Implode

comment 11y ago · link · parent

For what it's worth, as someone who currently favours the public domain over copyright for his work, I will say that it's not especially because I think that it's simpler to choose the public domain; it's because I've tried to understand what copyright means and what public domain means and I think that public domain makes more sense and better serves my interests.

In particular, it reflects the fact that I don't think readers of my work should be obliged to follow any rules I might set (license) when they turn to the creation of derived works. They should go and do as they like and, where appropriate, acknowledge prior art (as a matter of professionalism).

I also feel that the problem of associating each "expression" with it's legal creator is a nasty problem fraught with difficulties; certainly, in this regard, you can say that I choose public domain because of its simplicity.

By the way, djb has argued in defence of the public domain here:

http://cr.yp.to/publicdomain.html

Anyway, I'm interested to read other developers views on this topic but I'm no authority and don't want to give the impression that I think it's unreasonable to choose differently. And anyway, most do! GPL, BSD and the rest seem much more popular than public domain.

comment 11y ago · link · parent

I'm curious, why don't you place your works into the public domain?

comment 11y ago · link · parent

I love that he links to an annotated bibliography at the end.

One related resource that I can recommend is Digital Geometry Processing with Discrete Exterior Calculus:

http://www.cs.columbia.edu/~keenan/Projects/DGPDEC/

It's an introductory course in discrete differential geometry and it emphasizes the use of simplicial complexes (like tetrahedral meshes).

comment 12y ago · link · parent

Reading that article inspired me to write a little generic recursion library. The idea is that you'd write a 'map' function for each recursive data structure and then generate recursive functions from non-recursive functions using 'induction' and 'coinduction'.

    // induction : ((t (Fix t), Fix t -> r) -> t r, t r -> r) -> Fix t -> r
    function induction(map, f) {
        // g : Fix t -> r
        function g(x) {
            return f(map(x.unfold(), g));
        };
        return g;
    };
    
    // coinduction : ((t s, s -> Fix t) -> t (Fix t), s -> t s) -> s -> Fix t
    function coinduction(map, f) {
        // g : s -> Fix t
        function g(s) {
            return {
    	        unfold: function() {
    	            return map(f(s), g);
                }
            };
        };
        return g;
    };

    // fold : t (Fix t) -> Fix t
    function fold(w) {
        return {
            unfold: function() { return w; }
        };
    };

comment 12y ago · link · parent

I'm in the midst of reading Types and Programming Languages right now.

I'm also reading the more recent Practical Foundations for Programming Languages by Robert Harper. It's written for a similar audience.

I would recommend both.

comment 12y ago · link · parent

The simulation is always buggy. Don't you watch movies? ;)

comment 13y ago · link · parent

If you like Pascal, then Compiler Construction, by Niklaus Wirth is certainly also worth a look:

http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf

Easy to read, concise, and good for beginners.

comment 13y ago · link · parent

Here are a few, in no particular order:

Ur-Scheme: http://canonical.org/~kragen/sw/urscheme/

An Incremental Approach to Compiler Construction: http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

PicoLisp: http://picolisp.com/5000/!wiki?home

Lambda-the-Ultimate papers: http://library.readscheme.org/page1.html

SICP: http://mitpress.mit.edu/sicp/full-text/book/book.html

LiSP: http://www.amazon.com/Lisp-Small-Pieces-Christian-Queinnec/d...

Maru: http://piumarta.com/software/maru/

Edit: You might also enjoy Jonesforth (see jonesforth.S): http://git.annexia.org/?p=jonesforth.git;a=tree

comment 13y ago · link · parent

I first saw that sampling technique in The Practice of Programming by Kernighan and Pike. It's used in their Markov Chain example.

comment 13y ago · link · parent

The Gish source code does that too.

https://github.com/blinry/gish

comment 13y ago · link · parent

> LT will be open source, ...

The licensing situation is really unclear. The Kickstarter page says, "In order to download packaged distributions, you'll need a license". But I expect that, if it's open source, I can get a packaged distribution by saying (I'm using Arch Linux):

    # pacman -S lighttable

comment 13y ago · link · parent

My understanding of types took a big step forward when I read some of Robert Harper's stuff. In particular, the blog post, Dynamic Languages are Static Languages, and his book, Practical Foundations for Programming Languages. (The book is a tome and I've only read parts of it but it's very good).

When it comes to understanding memory in C, another important aspect is understanding how linkers and loaders work. Also, it's good to know something about calling conventions.

comment 13y ago · link · parent

> Unix pipes are awesome and all, but chaining any more than 3 commands gets a little confusing with all of the parameters.

That's what abstraction is for. Make a shell script that hides some of the complexity and substitute the script into the pipeline. No?

comment 13y ago · link · parent

> - It's hard to visualize the output at the intermediate steps of the chain. So if you have "cmd1 | cmd2 | cmd3", you'd have to spend more effort than it has to be in order to see what cmd2 and cmd3 got as input.

cmd1 | tee input2 | cmd2 | tee input3 | cmd3

> - They are limited to text for visualization of output. Most of the time this is good, but what if you want to see a plot of 2D points?

GNU Plot

> - They're typically executed when you press Enter. Sometimes you might want to say "always execute this whenever source file changes."

I don't know how to solve that off the top of my head, but I'm sure you could do it with a small tool.

Although I'm challenging some of your statements here, I do really admire your work on this. Also, I'd like to know what you mean by "make unnecessary duplication optional".

comment 13y ago · link · parent

If /usr/include were dropped and /usr/lib only contained Go packages, then you'd have an ecosystem where library namespaces are handled in a scalable way--that's a pretty big deal. You'd be working in a statically linked environment rather than a dynamically linked environment--another major change. Garbage collection for everything in user space. Potentially, the removal of select/poll? Drastic increase in memory safety (buffer overruns, etc).

Based on the package naming, dependency management, and concurrency, it might even be argued that a Go user space is a bigger fundamental change than a Smalltalk or Lisp user space.

Btw, one probably wouldn't write a kernel in Go so I take the parent to be speculating about a system where new OS features were provided by integrating them first into a Go standard library rather than by integrating them into the C standard libraries.

comment 13y ago · link · parent

And, of course, "Debunking the 'Expensive Procedure Call' Myth, or, Procedure Call Implementations Considered Harmful, or, Lambda: The Ultimate GOTO" by Guy Steele. Available here: http://library.readscheme.org/page1.html

comment 13y ago · link · parent

Or follow Alef (http://www.cs.bell-labs.com/who/rsc/thread/ug.pdf) and use "become". The Alef become statement is a kind of generalized tail-call form because you can use it to drop the current stack frame from anywhere, not just in tail-position.

comment 13y ago · link · parent

The pinhole aremac idea is so elegant! Infinite field of view and no need to measure the eye's lens. I wonder if video games and head-mounted displays designed for gaming will one day take advantage of that.

comment 13y ago · link · parent

Small rant ahead. You have been warned.

My favorite system that supports hot-swapping is Linux.

It works with every language, there is an excellent scheduler, processes are protected from each other, there are all kinds of interprocess communication techniques available, you can choose between files and databases for persistence.

I think the lame workflows people have while working within a conventional OS are a failure of imagination and a lack of understanding about how operating systems work. In particular, I suspect that a lot of people overestimate the cost of exec and IPC. Or, for example, do you really appreciate the fact that the operating system keeps file system data in RAM even if you exit the program and start up another one accessing the same file a microsecond later? Image-based persistence is not necessary for responsiveness.

Use exec(), use a database, create the editors that make you productive. I've used Lisp and Smalltalk and I've created a miniature VM/OS running in the browser with processes and persistence and all that. These days I'm more excited about old fashioned Unix techniques.

comment 13y ago · link · parent

Edit 2: I ended up doing the translation from the Python article. ;) http://play.golang.org/p/ep8wK_UUGm It's pretty straightforward I think. One subtlety is that goroutines are not values and won't be garbage collected until they return. In practice, that means that you usually want a way to signal to the goroutine that it is done and can return. In my translation, I used the mechanism of closing the "stream" channel. You can see that in the unwrapProtocol function, it uses "b, ok := <-stream", which gets a byte in b and true in ok if a byte was received and gets a zero byte and false if the channel has been closed. The main function closes the stream to signal to unwrapProtocol that it is done.

Edit 3: Notice that I forgot to close the "frames" channel. So if this were a long-running program, that goroutine running frameReceiver would be a leaked resource.

comment 13y ago · link · parent

If I were writing unwrap_protocol in Go, my first take would probably to use an io.ByteReader interface constructed using bufio.NewReader(bytes). The function can then use ReadByte as needed to consume the stream. Apologies if I'm overlooking something. I only skimmed the article.

And you're on the right track regarding how channels work. They can be synchronous if you like. Effectively, such channels have no buffering. Also, you don't need to use OS threading at all to solve such problems in Go. It's possible to run code with lots of cooperating goroutines in a single OS thread.

Edit: By the way, I'm not familiar with Python so I'm just guessing at how the send method and the yield form work.

comment 13y ago · link · parent

I was going to translate the example to Go but it's such an uninspiring example because the frame_receiver "coroutine" has no state and might as well have been a simple procedure.

For an simple example--written in many languages including Python and Go--with two stateful coroutines, you can check this out: http://rosettacode.org/wiki/Synchronous_concurrency

comment 13y ago · link · parent

It's interesting to contrast this design with what Rob Pike presented in his talk on the Go template lexer. Some differences:

(1) Pike's is more static: there is no Machine struct and states are identified with handlers so that there is no table lookup in the loop.

(2) Pike chose to go with a modifiable lexer struct rather than threading a cargo value through the machine.

(3) Pike used nil for all end states.

The main design questions are probably:

(a) Do you need to construct machines at runtime?

(b) Do you need state names available at runtime?

comment 13y ago · link · parent

Incidentally, I don't think it's entirely true that "there isn't any pointer math". I've never used it but I understand that you can do C-like pointer tricks by using the package called "unsafe": http://golang.org/pkg/unsafe/ and http://golang.org/ref/spec#Package_unsafe

comment 13y ago · link · parent

The utopian ideal that is relevant here is the ideal that information should never be considered property. So you can't properly claim to be one of the utopian idealists while using the words "theft" and "stealing" here.

comment 13y ago · link · parent

I'm not big on IDEs either but how can you dislike revision control?

comment 13y ago · link · parent

It's not about escape analysis.

The programmer explicitly specifies when to use pointers. Whenever pointers are not used, the object is stored in-place (for example, on the stack, in the array or slice, or in the struct).

comment 13y ago · link · parent

You see the JVM as an asset. Many consider it a liability.

And programmers in the New Jersey school (see Worse is Better) are unlikely to ever stomach Clojure.

These differences are more in the realm of deep allegiances and HN comments will probably be limited to revealing allegiances--they have little chance to sway the reader one way or the other.

Might as well say, "MIT type with love for the JVM? Choose Clojure. New Jersey type with love for native code? Choose Go".

1234