avatar
Wow I knew some CSS linters and such but csscomb looks pretty nice, I integrated it into my workflow with no problem at all, I was using Gulp.Nice post and thanks for sharing such a nice tool :)
avatar
Thanks once more!

Some points:
1. From the Wikipedia article, it seems that a good heuristic would be max{|dx|, |dy|}.
This represents the distance in the absence of obstacles, and has therefore the nice properties of being admissible and monotonic. Apparently, admissibility is essential for always finding an optimal path.
Have you tried that? It would be interesting to know how this would compare to the euclidean distance in your particular application, with respect to both functionality and performance.

2. Do you think your application would benefit from reusing the buffers for predecessor map and distance map between calls to findPath?
In this case, findPath could be a function object, with each instance holding the buffers as members. Current behaviour would be equivalent to instantiating one temporary object per call, while, depending on the application, it might be interesting to give the object a longer lifetime, reusing it across several calls.
avatar
I am very much interested in this series of articles, yes!

Two points:

1. Why the use of isValid() in iterator increments?
Isn't it better to have that be a precondition rather than force the cost of a branch in what could otherwise be a trivial operation? If the possibility of misusing the iterator is feared, a debug mode assertion could be used to detect it, instead of trying to compensate for it.

2. Edge iterator increment could use a simple iteration, instead of a call to a recursive function.
I think this would simplify the code (from an imperative language perspective), besides being possibly more efficient.

Thanks for the article! It is a great demonstration of the power of generic interfaces, and of the Boost Graph Library in particular. It also serves as a nice tutorial.
avatar
Header is the section of the file that contains info about structure, units, source, etc of the file. e.g. number of data columns (in data section), units of each, range of the data, associated parameters and so on. Is just an identifier like the first lines in an excel file.
avatar
Thanks! Maybe I will write an article. If I understand your question correctly, in this case db-01 and db-02 are instances that have corresponding IP addresses, which were assigned by the hosting provider (DigitalOcean and Linode in those examples) during the creation process.
avatar
Wow, it looks very interesting, I'll definitely take a look into it tonight. Btw, you should write an article about its core functionality.

# Spin up a new Ubuntu 14.04 instance on DigitalOcean:
$ overcast digitalocean create db-01

# Spin up a new Ubuntu 14.04 instance on Linode:
$ overcast linode create db-02

digitalocean,linode — are these just an alias to ip?
avatar
I built something similar called Overcast using Node.js and native SSH. Beyond running commands and script files on multiple servers, it includes API support for a number of different cloud providers. I haven't tried using it on hundreds of servers though, I'd be curious to see how it performs — probably not as well as your Go example.
avatar
agree, the new syntax is simpler. Do you know if typedef going to be deprecated?
avatar
I am not so fond of typedefs. Instead I propose to use the using-syntax:
using vertex_descriptor = int;

Furthermore we can inline your traversal_category by using nameless structs (I think you would never really do this in production code, but it's nice to see a reasonable application of this strange feature):
ideone.com/9ObFoG
avatar
This is great idea, Constantine. Try now.
avatar
*facepalm* I am an idiot… Please, add also possibility to cancel a vote, I am occasionally pressed the dislike, though wanted the opposite.
avatar
I would say it's a combination of both. The expiring session issue is really a corner case. I don't even think that every QA engineer could find it initially.

P.S. Editing comments is a real pain. We'll add it to our backlog. Thanks for pointing that out.
avatar
Sorry, wrong tag, it supposed to be italic. Can't edit.
avatar
As told the Donald Knuth Premature optimization is the root of all evil (or at least most of it) in programming.
But in your case seems that it wasn't a premature optimization in an usual meaning of the phrase, just inattention.
avatar
What do you mean by header?
avatar
Thanks again (and yes, I've installed J701)
One more question:
For a file with a header (about 50 lines) and the rest is numeric data (maybe a thousand lines), how to read only the first 50 lines (header), or the last 950 (data) in order to process it?
avatar
Sorry for a late response. Here is a quick example:

readfile =: 1!:1
writefile =: 1!:2

NB. Create a file and write to it
fn =. < 'test.txt'
'Hello Kukuruku' writefile fn

NB. Read from file
data =. readfile fn


data will contain the content. But this is just a very simple example. Have you installed J?
avatar
BTW that's a good addition to a test suite. Nice catch.
avatar
hm, interesting. I think the that's the list you mentioned about: https://www.mail-archive.com/[email protected]/msg00231.html
avatar
Note that the libevent HTTP server does not handle the HTTP pipelining properly (I remember finding an old notice about that in the libevent mailing list). There's also github.com/ellzey/libevhtp, which is multithreaded and recently had HTTP pipelining fixed (issue 86).