Hacker News new | comments | show | ask | jobs | submit login
IPLANG – an optimization-based language (iaindunning.com)
36 points by idunning 1124 days ago | hide | past | web | 10 comments | favorite

This is crazy; perhaps that's what makes it intriguing.

In any case, I'm scratching my head. For example:

> We can thus, for any Brainfuck program, create an integer optimization problem with 3n decision variables where the optimal solution is that program.

Got it.

Integer optimization is designed to solve numerical problems. Is there any reason or inspiration to suggest that use this technique is a productive way to write programs that satisfy certain constraints?

Mostly an exercise in using a tool for something not intended - art?

You can definitely express any Brainfuck program as a integer program, and you can add constraints that will constrain what the program does/must do, but it isn't clear to me how to add useful constraints/objective that are still linear. It'd be an interesting exercise though, and something I'll be thinking about.

Integer optimization does have some practical uses related to programming though - its use has been explored in compilers. E.g. http://www.sciencedirect.com/science/article/pii/S0898122197...

For those looking for examples of actually used languages designed specifically for optimization problems, there are several out there.

AMPL is one such language [1]

[1] http://www.ampl.com/EXAMPLES/

The language I used, JuMP [1], is quite similar to AMPL. In fact in [2] we do performance comparisons with it. Check it out if you have a chance.

[1] https://github.com/JuliaOpt/JuMP.jl

[2] http://arxiv.org/abs/1312.1431

What happens when there are multiple best solutions?

Could be a challenge: write an IPLANG program with multiple "interesting" solutions

Should the IPLANG "compiler" try to detect multiple solutions?

I suppose it could, and would be fairly easy to do!

Can this be used as a BF supercompiler?

It might be possible. Consider adding new auxiliary variables that represent the state of memory after each operation. You may be then able to add (linear) constraints to those auxiliary variables that are meaningful. Including user input could be tricky though.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact