Live data from Hacker News

The hunt for the missing data type

hillelwayne.com

181–190 of 259 posts

Re: The hunt for the missing data type

#181
post #155

Earlier quoted context omitted.

it's true that numbers are very abstract, which is what makes it so easy to design apis for them the python runtime includes four built-in number types (small integer, arbitrary-precision integer, float, and complex) and the python standard library includes two more number types (decimal and fractions), and one of the most popular non-standard libraries for python is numpy, which provides some other kinds of numbers…

numbers have all of mathematics as a background which is what makes it so easy to design apis for them graphs are a much newer development, I think there's a very deep connection between category theory and graphs in general (and also computers make both much more useful somehow) lambda calculus can be used to define numbers but it's a wonky construction, it's reminiscent of how sets can also be used to define number…

that seems reasonable

Re: The hunt for the missing data type

#182
The C++ Standard Template Library is now 29 years old. It doesn't have a graph (or generic B-tree) data structure. That says it all for me. In my too many years of programming, I have only needed to program a graph structure once or twice. Yes, the are "ubiquitous in software engineering", but still incredibly rare in most enterprise programming projects.

Re: The hunt for the missing data type

#183
post #99

I suspect a lot of graph theory can be reduced to abstract algebra. You consider matrices over lots of different scalar types. The scalar types should be: - Rigs (rings without negation), - idempotent (that is, where x + x = x for all x), - equipped with involution (so that undirected graphs can be made the default by restricting the matrices which represent graphs to only self-adjoint matrices), - and the entries of…

The post "A Very General Method of Computing Shortest Paths" (https://r6.ca/blog/20110808T035622Z.html) shows that the Gauss-Jordan algorithm for solving matrix equations, the Floyd-Warshall algorithm for all-pairs shortest paths, and Kleene's algorithm for converting DFAs to regular expressions, are all the same algorithm on matrices of elements from a star-semiring.

Re: The hunt for the missing data type

#184

I've often wondered about a missing application: "Excel for graphs". Just like Excel for tabular data, it would support RAM-sized data (enough to require a computer, but not so much that you need a data center), implement lots of algorithms and visualizations "well enough", and require no programming skill to operate. As the article says, a lot of our real-world problems are graph problems - why are programmers the o…

I agree. And I think the key to this is VR.

Another comment in this thread is about how hard graphs are to visualize, but a 3D interface gives you a lot more room.

When VR hype began I thought "well what's the excel of VR?". Microsoft's answer was "2D spreadsheets floating in 3D space". What nonsense. I think graphs.

email my username at gmail.com if anyone is interested in exploring this together!

Re: The hunt for the missing data type

#185

I’ve been building an interactive fiction platform built in C# with a world model contained within a bidirectional graph data structure. Since IF stories are relatively small in graph terms, it’s a reasonable solution. Locations and objects are nodes and movement and location of objects are edges. Nodes and edges both can have dynamic properties. I’ve also noticed the lack of graph structures in programming languages…

sounds neat. link?

Re: The hunt for the missing data type

#186
post #147
post #47

I think the post mostly answers the questions "why are graph _algorithms_ not better supported in programming languages", with a focus that is much more on "big data" graph processing than graph support in general. I think if you look at graph support in general you are also looking at wider questions, like "why are OGMs (Object Graph Mappers) not as popular as ORMs" and "why is JSON so prevalent while RDF (or anothe…

> Joins are first-class entities in SQL. They even have their own keyword (hint: it starts with J and ends with OIN) ;) Having its own keyword is pretty strong evidence that something isn't first-class (e.g. typeclasses are not first-class in Haskell; control flow is not first-class in most programming languages).

I think OP is using “first class” as in “an explicit semantic affordance”, and you seem to be using “first class” as in “a supported operand” (or similar, feel free to correct me if I’m misunderstanding). In which case both points are right, albeit orthogonal.

Re: The hunt for the missing data type

#187

As someone who did a lot of work with graphs, "why don't programming languages have a built-in graph data type?" is a question I’ve been asked a million times. I'm thrilled I'll be able to point folks to a much more in-depth analysis like the one here, instead of saying some variation of "it's really hard to do it well" and having them just take my word for it.

I had an opposite experience. I was doing some new-to-me graph work in tcl and had just assumed the tcl standard library wouldn't have any graph algorithms. Come to find out I was wrong, and ended up saving myself a bunch of time not having to re-invent the wheel:

https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tclli...

Re: The hunt for the missing data type

#188

As someone who did a lot of work with graphs, "why don't programming languages have a built-in graph data type?" is a question I’ve been asked a million times. I'm thrilled I'll be able to point folks to a much more in-depth analysis like the one here, instead of saying some variation of "it's really hard to do it well" and having them just take my word for it.

Puthon has one, as mentioned, but as a non CS-person I never encountered any problem in my programming-life that so fundamentally called for graphs that I needed one, not did I had so much fascination for graphs that it was a tool I wanted to force onto my problems.

I guess it is just that there are many problems that can be solved incredibly well without graphs and not that many where graphs outshine everything else so clearly that people would use them.

That being said, convince me of the opposite and I am happy.

Re: The hunt for the missing data type

#189

Earlier quoted context omitted.

I was really excited about RedisGraph, and sad to see it was cancelled. In my (limited) experience with graph databases they proved very frustrating because it seemed like they tried to do too much. Ultimately the way I thought of a graph was an indexing strategy into some underlying data. So I needed the graph to be very quick, but I didn't have any requirement to store actual data in it--just references. This made…

RedisGraph is now FalkorDB: https://github.com/FalkorDB/FalkorDB

oh excellent! that's great news
Post reply on HN