News for hackers. Stuff that matters.

chrisdone

Re:Archive Team: A Smattering of Tweets on Monday April 05, 2021 @03:57PM (#26703828)
The Economist stylized this as “tweets are appraised as speech, but punished as writing.”
Re:The Lost Apps of the 80s on Monday April 05, 2021 @11:25AM (#26700258)
I’m working on https://inflex.io/ which can achieve the data / logic separation of Improv, by putting functions in cells. But Improv isn’t an inspiration. Inflex is certainly closer to it than Airtable though.
Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @06:30PM (#26676636)
I see that it supports units in terms of scale - does it also prevent units that measure different things from being combined? E.g. 2 kg + 3cm (units mismatch) or 3$ * 7$ (two monies can’t be multiplied).
Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @06:04PM (#26676451)
Airtable is strongly typed in the fields of the tables, but the expression language is not. It is my conclusion based on researching Airtable, that the decision to have well typed tables is so that relational operations work nicely, and so that they can implement interfaces on top of these tables easily, such as calendars and work planning things etc. I don’t think that there is an underlying motivation to fix the ill-type code of the world, so to speak. Any non-trivial code work is done in JavaScript, anyway.
Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @06:01PM (#26676421)
I commented elsewhere in this submission that I am working on a strongly typed spreadsheet. (Don’t want to spam my product link.)

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.

Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @05:54PM (#26676378)
I am working on a product which is pretty much exactly what you describe. I love spreadsheets but I wanted something that I wanted to actually program in right from the beginning to the end of my work process.

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. :)

Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @05:42PM (#26676296)
I like your work on Mito, and I feel like it’s the python answer to a project that I’m working on which is the equivalent but with Haskell, or rather a riff on Haskell to be more amenable to spreadsheets-like programming.

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.

Re:Spreadsheet is a software development paradigm on Friday April 02, 2021 @05:39PM (#26676266)
SPJ has been coming at this from the angle of let’s add things to Excel because Excel itself is already established.

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.

Re:Baserow.io – Self-hosted Airtable alternative on Sunday March 14, 2021 @06:56AM (#26454299)
It’s my understanding that the main selling feature of AirTable is the hard coded views that they offer; calendars, kanban style planners, things like that. The slightly more structured nature of relational tables over spreadsheets lets you implement those fairly reliably.
Re:The worst of the two worlds: Excel meets Outlook on Sunday February 14, 2021 @02:48PM (#26135570)
> but waiting 5 minutes for a vlookup against a few hundred thousand records to complete because I need one single column in another sheet is maddening when it would take nearly no time at all if I loaded the data into Python -> Pandas.

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.

Re:The worst of the two worlds: Excel meets Outlook on Sunday February 14, 2021 @02:35PM (#26135442)
I’m working on a (very beta) product that hopes to address a subset of your complaints about spreadsheets. https://inflex.io/ Based on your phrasing you might have already heard of it. In particular my two blog posts mirror what you said: https://inflex.io/blog

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.

Re:WhatsApp and the Domestication of Users on Sunday January 31, 2021 @06:46PM (#25983856)
Someone said the problem of WhatsApp is network effects. Network effects are fine.

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.

Re:Ask HN: What's the best paper you've read in 2020? on Sunday December 13, 2020 @05:15PM (#25410908)
Not that, but Unison is one direct inspiration. I wrote a small overview here https://community.inflex.io/t/the-inflex-language/20
Re:Ask HN: What's the best paper you've read in 2020? on Tuesday December 08, 2020 @06:17PM (#25352922)
A paper that profoundly influenced my language design: “Programming with Polymorphic Variants” https://caml.inria.fr/pub/papers/garrigue-polymorphic_varian...

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.
Re:EU pushes for 'right to disconnect' from work at home on Friday December 04, 2020 @12:38PM (#25305283)
That may be a cultural difference. You may see the EU as having a "very lax work ethic", but in my experience working in the EU, they see America (and Britain) as having an unhealthy work obsession.

(Work to live vs live to work, perhaps.)

Re:Exotic Programming Ideas, Part 3: Effect Systems on Sunday November 22, 2020 @03:22PM (#25180697)
The recent Unison language uses the effect system described in the Frank language https://www.unisonweb.org/
Re:Tone of Voice Guide on Sunday May 31, 2020 @06:15PM (#23373306)
I agree. I read the same passage and had the same complaint.

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.

Re:History of Logo on Saturday May 02, 2020 @01:15PM (#23053225)
There's a StrangeLoop talk about teaching programming by Felienne Hermans (https://www.youtube.com/watch?v=g1ib43q3uXQ) that claims that all fields have an "exploration vs instruction" debate on how to teach their field, but this debate is apparently absent from the field of programming for the most part, wherein the "mess around and figure it out" exploration style of LOGO and Papert ("every time you teach something, you deprive a [student] of the pleasure and benefit of discovery") is the predominant unquestioned wisdom. Felienne wants more pedagogy fights. It's a worthwhile talk. I love LOGO and I think our generation of programmers are very sympathetic Papert's philosophy due to most of us being self-taught to some degree (you can see the fond nostalgia already on display in the comments here), but Felienne made me think about it more critically.
Re:Reiki can’t possibly work, so why does it? on Friday April 03, 2020 @07:35AM (#22768140)
Reiki does not involve touch.
Re:Secure by Design on Monday March 23, 2020 @01:33PM (#22666417)
"Consistent at creation" is also known in the Haskell community by the phrase "make illegal states unrepresentable".
Re:Decision fatigue on Wednesday March 04, 2020 @06:32PM (#22489315)
I think Decision Fatigue has a long and rich treatment in the Buddhist and specifically Zen tradition. One of the true practical daily takeaways from Zen teachings I can share is that dithering and hesitation are acute forms of suffering and akin to a broken record repeating.

A zen master may deliberate on a question, but will never dither. When presented with a choice, do the thinking it deserves but no more.

A simple example: you're looking at a menu and they all look good. Pick the first one or the one closest to your finger. It doesn't matter.

Also, don't cheat and be deferential; "I don't know, which would _you_ like?" Practice actively choosing. It'll do wonders in your daily life.

Re:Dynamic type systems are not inherently more open on Monday January 20, 2020 @05:01AM (#22097759)
That's an interesting angle. Another way of saying it might be that GoDP on the face of it can make one-off proofs for a value. Proofs for a function requires making proofs about all possible inputs, which is where your property test comes in handy. I could have `Named a (List x -> List x -> List x)` as the function I'm proving things about.

With some template-haskell you could run the property test at compile-time, and then use that proof later (e.g. for an instance of Semigroup which would require a argument proof of associativity), in languages like Unison that never run the same test suite twice (due to Content addressable code), this would be feasible. Or just run the property in your test suite and hope that the developer runs the test suite often. GHC erases data types that aren't actually evaluated in many contexts, so we even have erasure too.

I like your angle!

Re:Dynamic type systems are not inherently more open on Sunday January 19, 2020 @06:36PM (#22094950)
Techniques like Ghost of Departed Proofs are the most exciting thing to me as a casual correctness enthusiast. It acts as a means of combining static types with contracts.

Types are sound mostly because they are a stupid mini language, so easily enforced, like you said. Contracts are practical and convenient because you tend to write them in the language or a subset thereof that you’re checking. That’s hard to ignore.

GODP has you write a runtime check in regular code, and return as a result a proof value. Put that code in a module boundary. Then you have upstream functions expect a proof argument along with the value the proof is about. They’re tied together with a unique type variable (rank n or existential are the mechanisms of delivery for Haskell, but may differ in other languages).

head :: NonEmpty n -> Named n (List a) -> a

In this way you started from a dynamic, runtime piece of code, and ended up using a static type system to just ensure everything is passed around correctly which is trivial.

A single proof in this technique is nominal in the type (e.g. not null or positive or sorted ascending/descending), but combining them is done at the value level so there’s flexibility.

The bang for buck potential is large. I’m more interested in stuff like this than the dependent types direction that people are pushing for in GHC. If I wanted dependent types I have Agda, Coq, Isabelle, Idris, etc. to play with.

Re:How to run your own mail server (2017) on Tuesday November 19, 2019 @06:52PM (#21579708)
My email server (@chrisdone.com) has been running for a year and a half and is written in Haskell, saves all mail into a postgresql database, has a web interface and an Emacs interface. https://github.com/chrisdone/duta

I redirected my gmail account to forward all emails to this new domain, and changed all my account emails to [email protected] e.g. for github it’s [email protected]. Once I’m done, Gmail won’t be receiving any new mail.

It has SPF which has captured most spam. I haven’t implemented sending yet. I thought this would be a problem initially, but after a year I’ve realized I rarely send personal email out. But I’ll do it one day just for completeness.

I’ve found two bugs of my server, which were easy to debug because mail sending is very robust. I fixed the bug, and the sender server tried again the next day automatically.

I did it for exactly the same reasons as the author, to control my own data. I wrote my own because existing open source offferings are silly complicated, but receiving mail is not.

Duta is easy to deploy with docker machine and DigitalOcean. My current setup has been deployed like this. It connects to a managed DO Postgres database, which runs separately, has monitoring and backups, so it’s easy to redeploy the mail server without worrying about losing my data.

Re:Parse, Don’t Validate on Friday November 08, 2019 @08:27AM (#21481948)
Ghost of Departed proofs provides a fairly trivial way to generate proofs from arbitrary code and track them in the type system. See this article for example: https://ocharles.org.uk/blog/posts/2019-08-09-who-authorized...

This post shows a simple "positive" assertions, without any combinatorial logic associated with the proofs. But this is similar to programming by contracts.

Re:The Demise of Physical Comedy on Tuesday October 22, 2019 @06:35PM (#21329149)
I think physical comedy just has a broader audience, which worked well in silent movies and thereafter. The broadness is also why it’s considered cheap and used sparingly. It’s like shouting. As Friends went on and the writing got lazier every character was shouting all the time.

But a recent example of a well done pratfall I saw in a show mostly about dialog and editing was Modern Family (season 2) where Cameron turns to give his husband a kiss who pulls back (due to discomfort with public displays of affection, the theme of the episode) and Cameron overleans and falls head over heels over the back of the sofa quite roughly; he’s a big guy too. I laughed a lot partly in surprise because I basically never see a pratfall in comedy shows I like.

Re:Client-side web programming in Haskell: A retrospective on Monday October 21, 2019 @08:35AM (#21311525)
Fat clients of all kinds (cryptocurrency wallets, medical devices, data analysis, log viewers, etc.), depends on the client.
Re:Client-side web programming in Haskell: A retrospective on Monday October 21, 2019 @08:31AM (#21311489)
After our bad experience in 2016 using GHCJS on a big project, we haven't considered it for anything since. Anything that arrived after that related to GHCJS just hasn't been on my radar ("a history of my own experience in this problem space").
Re:Client-side web programming in Haskell: A retrospective on Monday October 21, 2019 @08:23AM (#21311411)
Elm can be looked at like Haskell on training wheels, in a good way, and that simplicity very likely contributed to its popularity.

We already tried Fay as a team (15kloc codebase to write an IDE), which was literally Haskell without type-classes. We've learned that we want type-classes, YMMV.

Re:The Ethics of Web Performance on Thursday August 01, 2019 @10:23AM (#20583884)
I think that the lumbering hogs we call publication web sites these days are making sure that you as a reader are paying a cost to use their otherwise free web site; paying a subscription is better, but no one will do that. People on mobiles pay a tax that people on desktops don't, and people on bad connections in poor areas pay a tax that people in rich fibre-wonderlands don't, and yet energy and money is wasted on transferring garbage that nobody wants.

I seem to get dismissed whenever I suggest this, but these web sites could instead try another approach: remove all the garbage, have a beautiful, clean web site, and implement artificial rate limiting on all connections to it. If you want a super fast experience, pay a subscription! What are the upsides?

* Less bandwidth and energy and mobile phone battery is wasted.

* The site will still load in the same time that people are normally used to anyway.

* Rich people and poor people get the same experience; you don't pay a poor people tax if you are poor. Equity!

* Mobile phone users don't pay a tax, either.

* Meanwhile, Rich people have disposable income; they should be spending money on magazines and newspapers that people are producing anyway, to show their support, but they don't, so here's an incentive. They also indirectly support the poor people with news/media, who can't afford to pay a subscription (or wouldn't benefit anyway).

Isn't anyone trying this model?

Older »