TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask YC: Expressive languages for spatial nodes

2 点作者 robmnl超过 17 年前
What do you consider flexible languages for spatial maths? I have a set of nodes in a space, they are connected to each other in a graph, have have different bond strengths. I need to navigate through nodes quickly, for instance grab a node and grab certain nodes that match a certain node strength that is adjacent through one or two dimensions/nodes.<p>Each node has attribute/values pairs, and I want to be able to query nodes by those attribute/values.<p>AWS SimpleDB is too slow.<p>I am an amateur python programmer, this is the last language I've learnt, this is my third week using it.<p>Before that I came from ruby, which I abandoned for it's speed.<p>Pretty good at jquery/javascript, which I spend time in, and, almost don't want to mention this, PHP. Of course SQL amateurish (learned joins only 4 months ago) but I really can't make a case for SQL being suitable for my needs. I have studied "SQL for smarties" by Joe Celko.<p>I have Ruby, Erlang, Smalltalk, or Lisp, or R(?), io(?) in mind. I do just know Ruby in this group, the others I have not much clue about. But I'd learn in a heartbeat if you can make a good case for your language of choice for my problem set.

5 条评论

bayareaguy超过 17 年前
MonetDB could be useful here.<p>MonetDB[1] is good for applications where you load the data once and then run lots of joins over binary relations, assuming your application works well with an RM/T[2] style schema.<p>In RM/T you have one entity relation that holds your entity ids and one property relation for each attribute. All your queries become many-way joins as they must traverse all the property relations. This is something you would never do with an ordinary RDBMS but is exactly what MonetDB's binary-association table scheme is designed to handle[3].<p>With MonetDB, you use SQL to define your schema in the familiar way. At the physical level MonetDB stores your data in an RM/T-style representation.<p>You may also want to see if Proximity[4][5]'s QGraph is suitable for your application. It uses MonetDB in it's implementation. The tutorial[6] includes an example of how to use it with Jython.<p>[1] <a href="http://monetdb.cwi.nl" rel="nofollow">http://monetdb.cwi.nl</a><p>[2] <a href="http://en.wikipedia.org/wiki/Relational_Model/Tasmania" rel="nofollow">http://en.wikipedia.org/wiki/Relational_Model/Tasmania</a><p>[3] <a href="http://monetdb.cwi.nl/projects/monetdb/Assets/monetdb_lecture.pdf" rel="nofollow">http://monetdb.cwi.nl/projects/monetdb/Assets/monetdb_lectur...</a><p>[4] <a href="http://kdl.cs.umass.edu/proximity" rel="nofollow">http://kdl.cs.umass.edu/proximity</a><p>[5] <a href="http://kdl.cs.umass.edu/proximity/about.html" rel="nofollow">http://kdl.cs.umass.edu/proximity/about.html</a><p>[6] <a href="http://kdl.cs.umass.edu/software/documentation/tutorial/ch06s08.html" rel="nofollow">http://kdl.cs.umass.edu/software/documentation/tutorial/ch06...</a>
评论 #108962 未加载
评论 #108974 未加载
mooneater超过 17 年前
If this is perf. critical and your data easily fits in RAM, then your problem does not sound exotic enough to resort to obscure or special-purpose languages. You should be able to whip up efficient data structures for this in python without much trouble. In fact depending on your data set size and query specifics, it may be acceptably fast in any of the listed languages (including Ruby!) assuming you have the right data structures. You really wont know until you have tried it. I would suggest you start in whatever language you know best.<p>(If it doesnt fit in RAM, I would consider it a much harder problem and I can imagine resorting to an at least partially SQL-based solution).<p>Btw, for a very similar problem, I used C++ w/STL for pure performance. It worked well. But I'm migrating it to python to shorten dev time. I figure in the same amt of time in python, I can try a variety of approaches and algo optimizations, for the same time it would take to do a single one in C++ w/STL. And for algos on complicated data sets, you want to really understand your data set. That means playing with it a lot, which is easier in python.<p>The data structures you use often have a much bigger impact on performance, than the language.
评论 #108957 未加载
giardini超过 17 年前
Prolog. For info see "P-99: Ninety-Nine Prolog Problems" at <a href="https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/" rel="nofollow">https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/</a><p>Scroll down to the section on Graphs (after problem 73).
评论 #108988 未加载
bayareaguy超过 17 年前
AllegroGraph[1] sounds like it could be suitable as well.<p>[1] <a href="http://agraph.franz.com/allegrograph" rel="nofollow">http://agraph.franz.com/allegrograph</a>
robmnl超过 17 年前
Your advice is deeply appreciated, thank you everyone who has posted so far.