Live data from Hacker News

Probabilistic programming does in 50 lines of code what used to take thousands

newsoffice.mit.edu

21–30 of 81 posts

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#21
post #5

Earlier quoted context omitted.

Really? "Disruptive"?

Constraint solvers and similar tools can look pretty magical to people who use them for the first time, so I don't blame the OP. What's more interesting is that we're seeing heightened interest in these techniques again after they were ostensibly sidetracked in favor of statistical methods.

The questions are "when does it fall off a cliff" and "does it work for more than one thing". Normally the answers are "as soon as you stop doing toy problems" or "no".

But, this (and Church) look very interesting.

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#22

Is that 50 lines of code, or 50 lines of using a library that's thousands of lines of code?

It makes sense to talk about lines of code when thinking about engineering hour efficiency. It costs the same amount for a programmer to write one line of C as one line of Assembly, and the rate of bugs tracks lines of code as well. The underlying libraries and abstractions should be considered if you're thinking about computing efficiency.

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#23
post #5

Earlier quoted context omitted.

Really? "Disruptive"?

Constraint solvers and similar tools can look pretty magical to people who use them for the first time, so I don't blame the OP. What's more interesting is that we're seeing heightened interest in these techniques again after they were ostensibly sidetracked in favor of statistical methods.

Maybe I just don't get the terminology right, but isn't this exactly a statistical method?

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#24
post #19

Is that 50 lines of code, or 50 lines of using a library that's thousands of lines of code?

What do we say about languages built on C? Is it 100 lines of code but there are hundreds of thousands of lines of code for that higher level language you just coded? I don't think libraries count in terms of code. We all use code to program. Standing on the shoulder that preceded us. Using a library and a function should just count for the most part.

True, but the parent commenter is getting at something important. The article suggests that researchers have found a new, much more concise way to express the solutions to difficult problems. That's different from a library, which merely packages pre-built solutions to a finite set of problems.

It's like the difference between a complete kitchen that fits in your pocket and an iPhone app that lets you order a burrito. The article suggests something like the former. A library which encapsulates 1000 lines of code into a single function call is like the latter.

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#25
post #19

Is that 50 lines of code, or 50 lines of using a library that's thousands of lines of code?

What do we say about languages built on C? Is it 100 lines of code but there are hundreds of thousands of lines of code for that higher level language you just coded? I don't think libraries count in terms of code. We all use code to program. Standing on the shoulder that preceded us. Using a library and a function should just count for the most part.

If dependencies don't count as code, then I can implement the entire Linux kernel in one line.

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#27
post #22

Is that 50 lines of code, or 50 lines of using a library that's thousands of lines of code?

It makes sense to talk about lines of code when thinking about engineering hour efficiency. It costs the same amount for a programmer to write one line of C as one line of Assembly, and the rate of bugs tracks lines of code as well. The underlying libraries and abstractions should be considered if you're thinking about computing efficiency.

Using lines of code as a metric makes no sense at all. Bad programmers produce more lines of code. Does that make them more efficient?

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#28
post #27
post #22

Earlier quoted context omitted.

It makes sense to talk about lines of code when thinking about engineering hour efficiency. It costs the same amount for a programmer to write one line of C as one line of Assembly, and the rate of bugs tracks lines of code as well. The underlying libraries and abstractions should be considered if you're thinking about computing efficiency.

Using lines of code as a metric makes no sense at all. Bad programmers produce more lines of code. Does that make them more efficient?

A good programmer that writes less lines of code is more efficient than a bad programmer that writes more to do the same work, because you pay each per line of code. A library that allows both to write less lines of code will increase efficiency for everyone.

Re: Probabilistic programming does in 50 lines of code what used to take thousands

#29
post #19

Earlier quoted context omitted.

What do we say about languages built on C? Is it 100 lines of code but there are hundreds of thousands of lines of code for that higher level language you just coded? I don't think libraries count in terms of code. We all use code to program. Standing on the shoulder that preceded us. Using a library and a function should just count for the most part.

True, but the parent commenter is getting at something important. The article suggests that researchers have found a new, much more concise way to express the solutions to difficult problems. That's different from a library, which merely packages pre-built solutions to a finite set of problems. It's like the difference between a complete kitchen that fits in your pocket and an iPhone app that lets you order a burrito…

Some languages are almost UNUSABLE without libraries. Looking at R with the dplyr, ggplot2, reshape 2 packages being mandatory for my work flow.

Python also has some mandatory libraries if you want to do any specific. Numpy and pandas for statistical analysis make them required.

My code is concise and clean but it is because of these libraries.

I am also certain that there are exceptions.

Post reply on HN