Fork me on GitHub

I don't think i've ever been so quickly convinced by anything as i have by

💯 2
👍 1

Thanks to @U05476190 who is the one i saw it first from, though i see in the slack history @U02N27RK69K mentioned it shortly before

💜 2
Cora (she/her)00:04:19

it was a team effort


Drew DeVault has announced a new systems programming language, Hare, that he and others have been working on for quite some time now:

👀 3

> Hare does not, and will not, support any proprietary operating systems.


I’ve been a lazy mac user for a decade now. But I’ve been thinking about switching to a more sustainable machine and Linux distro. However the above restriction strikes me as quite intense.

Asko Nōmm08:04:11

Yeah that’s one way to make sure your programming language will only be used by hardcore FOSS people who spend their days yelling about walled gardens in every Apple or Microsoft HN thread.


Also kind of makes the language non-free. At least in spirit. I guess you are still free to fork and extend it so it targets these OSes.


A lot of people are passionate about free, open source software. Drew is not saying that they're going to put effort into making Hare incompatible with windows and Mac. They just won't put resources into supporting those operating systems. I don't see anything wrong with that.


Me neither - it’s just a very intense restriction for adoption IMO. It’s fine - but has to be noted.


> Also kind of makes the language non-free. At least in spirit. > It does?


Legally, no. But in spirit there should not be any restrictions about the usage, modification etc.


But this is just a vague impression. I’m not a philosopher or FOSS expert.

Ben Sless09:04:07

The language is free, the author is free to not work to support platforms he does not believe in, or work to integrate and support patches which will do so. Time is limited :man-shrugging:


Yes, fully agreed - I didn’t think far enough before writing the above 🙂

Ben Sless09:04:11

It's a legitimate gut reaction, but as someone who would happily give Rob Zemlin a swirly he has my sympathies 😅

😂 1
Ben Sless09:04:25

I'll just cry about the algol syntax and mutability being hard

😅 3

> Non draft version can be found here Ah, thanks! Funny how Drew himself has shared the non-public version publicly.


Who wants to work through Lisp in Small Pieces together?

👋 4

This is super cool. Not for me at the moment though - I’m already swamped with things I want to study rn.


However I saw a study group advertising itself here just some days ago. They are doing coding challenges I think (stuff like advent of code etc.) Maybe get in touch there.


Oh, nice. I'll sure to point others at the study group, if this seems like too much of a commitment them. We've got 8 people signed up already for LiSP, so I think we'll make a go of it!

🚀 1

@U050BHA78 Subscribing to this thread for further announcements

💡 1

I've also sent you a DM on twitter

👍 1

@U04V15CAJ I doubt you need any more practice implementing lisp interpreters, but you're welcome to join us!

🔥 1

Maybe I'll get an idea or two ;)


What wasn't clear to me: do you organize sessions or is this "drop into slack and chat about it" kind of thing?


I think the group will be too large and/or diverse (in experience, time-zone, etc.) to have the primary progress be made via whole-group sessions. Sub-groups may want to pursue that, so we'll see how that goes. That probably doesn't clarify things much, but it's about all I've got at this point.

James Amberger20:04:13

Anyone wanna advise me on my db schema? Let’s say I have a table A with two columns, the second column’s values are 1 or 0, and the first column is a unique PK. Now I have another table B and one of the columns is foreign key to the first table, and my desired constraint is that not more than one row point to a row in A where the second column is 1. How should I express this in SQL?


That’s a unique constraint if I understand correctly


Not sure if this works but I would look if you can define PK and N as a composite foreign key and then have a unique constraint on N.


No that’s not enough 😕

James Amberger20:04:23

yeah. If I had to do this this instant I could always add a column to B

James Amberger20:04:52

and make sure it always has the same value as A.2, and just declare it unique


you don’t want 0's to be unique though

James Amberger21:04:06

so scratch that

James Amberger21:04:24

If the zeros were NULLs I think that would work, iirc how UNIQUE works with NULLs


You can write a constraint function and use CHECK


(check in your table definition)

James Amberger21:04:28

yeah that sounds good to me


feels convoluted though. But if your otherwise happy with your model and logic this would be the way to go probably

James Amberger21:04:57

thanks; I agree this looks suitable

Cora (she/her)21:04:05

can the second column ever flip from 1 to 0 or 0 to 1?

Cora (she/her)21:04:24

is there only one record in A where column 2 is 1?

Cora (she/her)21:04:12

in postgres "Currently, CHECK expressions cannot contain subqueries nor refer to variables other than columns of the current row"

Cora (she/her)21:04:56

apparently you can use a trigger to check more complex things though

James Amberger21:04:29

hmm, don’t wanna go to trigger land

James Amberger21:04:31

I’ll have to hammock this one for a while I guess

Cora (she/her)21:04:44

if there is only one record in A with a value of 1 then you could use a partial unique index on foreign key column of table B

Cora (she/her)21:04:02

create unique index idx_there_can_be_only_one on B(fk) where fk = 12345

Cora (she/her)21:04:27

12345 being the pk of the record in A that has a value of 1

Cora (she/her)21:04:02

all these solutions are pretty bad

James Amberger22:04:30

maybe I’m wrong but it seems like a slight tweak of this problem should be something that’s easy to obtain

James Amberger22:04:05

the tweak being never mind the 0 vs 1, but just enforce that some field on the related table be unique

James Amberger22:04:22

nah ignore that that makes no sense