752 karma · joined Jan 15, 2008 (18y ago) · 294 submissions
comment 5y ago · link · parent
comment 5y ago · link · parent
Types only help if you pick the right ones.
comment 5y ago · link · parent
x == “00.10”
You’ll get a type error that x is a decimal and the string literal is a string. So then you know you have to reimport it in the right way. So the type system told you that an assumption was violated.
This won’t always happen, though. E.g. sort by this field will happily do a decimal sort instead of the string 00.10.
The best approach is to ask the user at import time “here is my guess, feel free to correct me”. Excel/Inflex have this opportunity, but YAML doesn’t.
That is, aside from explicit schemas. Mostly, we don’t have a schema.
comment 5y ago · link · parent
comment 5y ago · link · parent
I do think that bringing new syntax to the table is justifiable if it brings new concepts with it.
I agree, power query is essentially a separate product and doesn’t feel first class. I think that probably explains its relative obscurity, despite being highly powerful.
comment 5y ago · link · parent
It’s called Inflex: https://inflex.io/
And it is a pure functional programming language, with cells, which are reactive, and with real data structures like lists and records. We have a work in progress beta. Sign up requires a paid subscription, but only because I wanted to make sure that the infrastructure was working. To try the work in progress product, you can just hit Try which lets you play in a sandbox. It doesn’t save or remember any of your work, and also doesn’t even hit our databases. (Safe from the hug of death.)
It’s pretty bare-bones right now but it’s based on ideas from Haskell, and Unison which is a content addressable language. (Every cell has a SHA512 hash of its content.) That makes versioning very easy, but this is not seen in the UI yet.
The table editing and what not is a little cumbersome right now, as there are a lot of things to come together and I wanted to demonstrate at least some of them.
Speaking of clean separation between data and display, The plan is to build for example reports using a simple HTML like DSL. Also, things like time and external data sources will be treated in the type system as explicit streams, which is an architecture that has been fully explored in Haskell under the guise of FRP.
But I’m working on this in my spare time and therefore progress is turtle pace rather than silicon valley pace. :)
comment 5y ago · link · parent
One thing that you can do when you have a pure functional programming language is rather than generating separate cells for modifications, you can go into the code and modify it directly fairly reliably.
I’ve linked my project elsewhere, don’t want to spam the thread.
comment 5y ago · link · parent
This, in my opinion, is putting lipstick on a pig. The inputs and outputs work represents a very stretched contortion of trying to do real programming in a limited environment.
I am coming at it (commented elsewhere in the submission my project, avoiding spam) from the other end: start with a fresh, language take all the tried and tested programming language research useful to this way of working and connect it to a UI which fully comprehends this language. Throw out the grid and coordinates.
Row types, polymorphic variants, FRP for time/streams/events, type classes for arithmetic, CAS for cells, etc. We really do know what works, and therefore we can actually start from scratch and have some thing that is actually nice to use.
comment 5y ago · link · parent
comment 5y ago · link · parent
I replied elsewhere in the thread about me working on a new spreadsheet alternative that’s like a reactive Haskell. (Attempting to preserve community norms by not self-promoting more than once per submission.)
One thing that I’m planning is that for any table/array/tree etc. that exceeds a certain size, the data itself and any outputs of functions that work on that data will be offloaded into a real database as rows which can be indexed. Either via SQLite, using PostgreSQL, or even BigQuery (but I don’t trust Google much), this would let users transparently grow their data sets from 1,000 rows to 100,000 to 1,000,000 rows without having to suddenly switch languages or representations. (As an online product this is easier to do, but I think a desktop app equivalent could do it too.) Array functions would in the end be streaming functions rather than literally loading all data in memory.
In Inflex tables are literally arrays of records, but as the language is purely functional and statically typed, the compiler has a lot of freedom to rewrite code into more efficient representations (e.g. streaming), as done in Haskell or SQL.
comment 5y ago · link · parent
I haven’t added a date type yet, but it will be a distinct type (not just a string), with explicit import. Pretty much similar to the Haskell time API.
If you like the idea I would welcome any criticism. I have 50 things that I think the product needs, but your input would help.
comment 5y ago · link · parent
Email benefits from network effects. The difference is that email is designed to be decentralized and from the beginning had many clients with open protocols. IRC similar. And of course, the web browser itself. DNS.
Back when these were invented, people had many different operating systems and architectures, so the protocol was more important than the client/server. Today, we have about three platforms: web, iOS and Android, meaning you can reach millions of users with software rapidly, rather than the slow way of pushing a protocol. There’s less incentive to have decentralization and there’s money to be made. Protocols require cooperation and therefore move slower. SMS and IRC and email don’t feel modern because they move at glacial pace of cooperation.
I think therefore it’s harder today to push a decentralized, more free protocol than it was when we had more OS/arch diversity. When in a quasi-mono-culture, protocols take a back seat. People don’t ask about it or know what they are. The ratios are flipped: we have basically three OSes and a very large diversity of app/services all incompatible and each locking you in.
comment 5y ago · link · parent
comment 5y ago · link · parent
And the earlier paper “A Polymorphic Type System for Extensible Records and Variants” https://web.cecs.pdx.edu/~mpj/pubs/96-3.pdf
Row types are magically good: they serve either records or variants (aka sum types aka enums) equally well and both polymorphically. They’re duals. Here’s a diagram.
Construction Inspection
Records {x:1} : {x:Int} r.x — r : {x:Int|r}
[closed] [open; note the row variable r]
Variants ‘Just 1 : <Just Int|v> case v of ‘Just 0 -> ...
[open; note the row var v] v : <Just Int>
[closed]
Neither have to be declared ahead of time, making them a perfect fit in the balance between play and serious work on my programming language.comment 6y ago · link · parent
comment 6y ago · link · parent
I just finished a Great Courses lecture series on the Norman conquest of England, and the professor makes this very comment. And also argues that the melding of Norman--not 'French', Norman was a sister to Old French that looks more like Vulgar Latin--and Old English is what gives modern English its vast vocabulary, roughly twice the size of Spanish; as many words have the Germanic and Romance varieties. You can 'meet' someone or 'encounter' someone, etc.
Ironically, "Norman" comes from "north men", as Normandy was settled by Scandinavian invaders who "went native" in France. Then they "went native" again in England, forgetting their original Norman.
comment 6y ago · link · parent