

Sudoku as a Service with Julia - idunning
http://iaindunning.com/2013/sudoku-as-a-service.html

======
Xcelerate
I've been using Julia a little while now for my scientific work, and I have to
say, it is a very well-designed language. I remember reading a few days ago on
HN another user commented that he thought it was the best-designed language
after Clojure. Not to mention it's much easier for people used to conventional
programming languages to pick up and get started with.

I was actually thinking this would be a great language to use for web
development; it's just that no one's developed a really good framework for it
yet.

~~~
idunning
Theres been some work towards that:
[https://github.com/hackerschool/Meddle.jl](https://github.com/hackerschool/Meddle.jl)
is "middleware", and
[https://github.com/hackerschool/Morsel.jl](https://github.com/hackerschool/Morsel.jl)
is a framework. The main issue right now is that no one is particularly
pushing/has a strong need for that kind of thing right now. I speculate that
math-heavy services like the one described in this post will probably sit
side-by-side with other services written in more traditional languages in the
short to mid-term.

------
netrus
I remember some activities we did at junior high math courses regarding
Sudokus. I was so disappointed to see the brute-force solving solution to work
perfectly fine, no need to implement human solving-strategies. It was fun
nevertheless :)

~~~
ryandvm
That's why I could never get into Sudoku. There is no creativity in the
endeavor. It's like doing math homework for fun.

~~~
jmduke
Brute-force strategies rarely work well in real life Sudoku.

~~~
saraid216
Really? They tend to work pretty well for me.

I use Sudoku to exercise my memory.

------
heurist
I read through the Julia documentation and a couple tutorials last weekend,
and I'm looking forward to building some things with it.

one note - this code could be better optimized by the compiler if you broke
everything down into functions, especially the nested for loops (according to
the optimization section of the docs).

~~~
idunning
It is a lot of fun, quite addictive! Let us know what you cook up at the
julia-users google group. Re: optimization, that is indeed usually true,
although I imagine the actual sudoku solve time dominates the request time.
From a code design perspective I'd probably pull the validation/change-to-
matrix stuff entirely and stick it in a module which would achieve the same
thing. The way I build the "pretty" table is also pretty inefficient, using an
IOBuffer is probably the right way to go. Tried to go for clarity for new-
comers to the language.

------
flixic
Excuse me, can anyone tell me why I may be seeing this? I have showdead turned
on.

[http://cl.ly/RRQw](http://cl.ly/RRQw)

~~~
ronaldx
Duplicated comments are made dead. With showdead you can see the (dead)
duplicate.

