News for hackers. Stuff that matters.
Re:Sudoku as a Service with Julia by Xcelerate on Tuesday September 17, 2013 @11:28AM (#6399817)
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.

Re:Sudoku as a Service with Julia by idunning on Tuesday September 17, 2013 @02:03PM (#6400804)
Theres been some work towards that: https://github.com/hackerschool/Meddle.jl is "middleware", and 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.
Re:Sudoku as a Service with Julia by netrus on Tuesday September 17, 2013 @09:54AM (#6399231)
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 :)
Re:Sudoku as a Service with Julia by lamby on Tuesday September 17, 2013 @10:09AM (#6399341)
> I was so disappointed to see the brute-force solving solution to work perfectly fine

I had the same slight disappointment when hacking a PostScript solver together back in 2005 (see https://chris-lamb.co.uk/posts/sudoku-solver-in-postscript)

On the positive side, a brute force approach means you can easily test for unique solutions.

Re:Sudoku as a Service with Julia by ryandvm on Tuesday September 17, 2013 @10:09AM (#6399343)
That's why I could never get into Sudoku. There is no creativity in the endeavor. It's like doing math homework for fun.
Re:Sudoku as a Service with Julia by jmduke on Tuesday September 17, 2013 @10:52AM (#6399623)
Brute-force strategies rarely work well in real life Sudoku.
Re:Sudoku as a Service with Julia by saraid216 on Tuesday September 17, 2013 @01:24PM (#6400583)
Really? They tend to work pretty well for me.

I use Sudoku to exercise my memory.

Re:Sudoku as a Service with Julia by heurist on Tuesday September 17, 2013 @10:17AM (#6399386)
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).

Re:Sudoku as a Service with Julia by idunning on Tuesday September 17, 2013 @10:32AM (#6399496)
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.
Re:Sudoku as a Service with Julia by mlubin on Tuesday September 17, 2013 @10:29AM (#6399464)
That's a good tip in general, but it's mostly aimed at addressing type instability. For example, if you have

   x = 1
   f(x)
   x = "foobar"
   f(x)
then each call to f will be optimized for the current type of x. On the other hand, if your code is type stable, as it appears to be here, it will be properly optimized in place by the Julia JIT compiler and there's no need split it into separate functions.
Re:Sudoku as a Service with Julia by flixic on Tuesday September 17, 2013 @10:46AM (#6399588)
Excuse me, can anyone tell me why I may be seeing this? I have showdead turned on.

http://cl.ly/RRQw

Re:Sudoku as a Service with Julia by ronaldx on Tuesday September 17, 2013 @10:52AM (#6399622)
Duplicated comments are made dead. With showdead you can see the (dead) duplicate.