Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.prolog Subject: India & France had their AI Bikini Moment (Was: Deephaven inspired me to name a predicate [first_by/2]) Date: Mon, 10 Feb 2025 21:17:22 +0100 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 10 Feb 2025 20:17:17 -0000 (UTC) Injection-Info: solani.org; logging-data="70989"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.20 Cancel-Lock: sha1:U+ZVC3Mi18q9xa0XB483PC6PoQQ= X-User-ID: eJwNy8ERACEIBLCWEFjgytEV+i/h/GYmsFjB9EA4BvOtY94HD1eyu0NBbqqUSG5cjE5R2l7QHUM4U2vXvUDaD1vFFY0= In-Reply-To: Xref: csiph.com comp.lang.prolog:14441 Hi, India & France had their AI Bikini Moment. Facinating behavior: Macron Says He And PM Modi Will Push https://www.youtube.com/watch?v=LwCK8yAnlkA But don't be fooled, things are possibly more connected: Synthesia: France's 109-billion-euro AI investment https://www.youtube.com/watch?v=_uyo4RG0Q6I Bye Mild Shock schrieb: > Hi, > > Suddently I got an allergy to name a predicate > distinct/2. It is not so obvious that distinct/1 and > distinct/2 are related. There is no constant C such that: > > distinct(X) :- distinct(C, X). > > Just joking, but for some consistency with the introduction > of group_by/4 and aggregate_by/4 I went for the > name first_by/2. The name is more intuitive: > > ?- [user]. > p(1,a). > p(1,b). > p(2,c). > p(2,d). > p(2,e). > ^Z > true. > > Now some queries: > > ?- p(X,Y), write(X-Y), nl, fail; true. > 1-a > 1-b > 2-c > 2-d > 2-e > true. > > ?- first_by(X, p(X,Y)), write(X-Y), nl, fail; true. > 1-a > 2-c > true. > > Cool! The name is also used here with the same semantics: > > https://deephaven.io/core/docs/reference/table-operations/group-and-aggregate/firstBy/ > >