This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-25
Channels
- # announcements (4)
- # babashka (3)
- # beginners (79)
- # biff (4)
- # calva (17)
- # cider (18)
- # clj-kondo (21)
- # cljdoc (45)
- # cljs-dev (14)
- # cljsrn (9)
- # clojure (90)
- # clojure-europe (86)
- # clojure-italy (3)
- # clojure-nl (3)
- # clojure-portugal (1)
- # clojure-uk (9)
- # clojurescript (20)
- # code-reviews (23)
- # conjure (14)
- # cursive (12)
- # datascript (12)
- # emacs (5)
- # events (2)
- # fulcro (13)
- # gratitude (1)
- # holy-lambda (9)
- # lambdaisland (2)
- # malli (6)
- # nbb (1)
- # nextjournal (2)
- # nrepl (30)
- # off-topic (63)
- # pathom (1)
- # portal (24)
- # reagent (5)
- # reitit (13)
- # releases (2)
- # remote-jobs (1)
- # sci (90)
- # shadow-cljs (49)
- # spacemacs (5)
- # sql (13)
- # testing (20)
- # tools-build (17)
- # xtdb (27)
I don't think i've ever been so quickly convinced by anything as i have by https://documentation.divio.com/
Thanks to @U05476190 who is the one i saw it first from, though i see in the slack history @U02N27RK69K mentioned it shortly before
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: https://harelang.org/blog/announcing-hare/
Non draft version can be found here: https://harelang.org/blog/2022-04-25-announcing-hare/
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.
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.
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:
It's a legitimate gut reaction, but as someone who would happily give Rob Zemlin a swirly he has my sympathies 😅
> 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? https://chouser.us/lisp2022/
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!
@U04V15CAJ I doubt you need any more practice implementing lisp interpreters, but you're welcome to join us!
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.
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?
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.
yeah. If I had to do this this instant I could always add a column to B
and make sure it always has the same value as A.2, and just declare it unique
uh true
so scratch that
If the zeros were NULLs I think that would work, iirc how UNIQUE works with NULLs
googling…
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
thanks; I agree this looks suitable
can the second column ever flip from 1 to 0 or 0 to 1?
is there only one record in A where column 2 is 1?
in postgres "Currently, CHECK expressions cannot contain subqueries nor refer to variables other than columns of the current row"
apparently you can use a trigger to check more complex things though
hmm, don’t wanna go to trigger land
I’ll have to hammock this one for a while I guess
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
create unique index idx_there_can_be_only_one on B(fk) where fk = 12345
12345 being the pk of the record in A that has a value of 1
all these solutions are pretty bad
maybe I’m wrong but it seems like a slight tweak of this problem should be something that’s easy to obtain
the tweak being never mind the 0 vs 1, but just enforce that some field on the related table be unique
nah ignore that that makes no sense