clus-data icon indicating copy to clipboard operation
clus-data copied to clipboard

Implement points from Naggum

Open phoe opened this issue 7 years ago • 11 comments

16:33 < flip214> http://www.xach.com/naggum/articles/[email protected] 16:33 < flip214> and http://www.xach.com/naggum/articles/[email protected]

phoe avatar Apr 03 '17 14:04 phoe

http://www.xach.com/naggum/articles/[email protected]

finally, another option is to rename REMOVE-IF-NOT to EXTRACT-IF and DELETE-IF-NOT to KEEP-IF or somesuch and perhaps invent useful names of the other -IF-NOT functions,

phmarek avatar Apr 04 '17 07:04 phmarek

if anything, REMOVE-IF-NOT is FILTER for me, but that's just a side note of a single person.

phoe avatar Apr 04 '17 11:04 phoe

http://www.xach.com/naggum/articles/[email protected]

I have defined functions COLLECT and RETAIN as the semantic complements of REMOVE and DELETE, with -IF and -IF-NOT variants.

phmarek avatar Apr 11 '17 11:04 phmarek

http://www.xach.com/naggum/articles/[email protected]

it would have been nice if one could "prime" a hash table in the MAKE-HASH-TABLE form, as in keyword arguments named INITIAL-CONTENTS (like MAKE-ARRAY) and/or INITIAL-KEYS and INITIAL-VALUES.

phmarek avatar May 10 '17 19:05 phmarek

it would have been nice if one could "prime" a hash table in the MAKE-HASH-TABLE form, as in keyword arguments named INITIAL-CONTENTS (like MAKE-ARRAY) and/or INITIAL-KEYS and INITIAL-VALUES.

ALEXANDRIA:PLIST-HASH-TABLE and ALEXANDRIA:ALIST-HASH-TABLE already solve this.

phoe avatar May 11 '17 02:05 phoe

@phoe ah yeah, right. Forgot about those.

He also talked about a readable form (eg. #H), which does not exist in CL.

phmarek avatar May 11 '17 09:05 phmarek

Can you link me to that post about readtables?

W dniu 2017-05-11 11:00, Philipp Marek napisał(a):

@phoe [1] ah yeah, right. Forgot about those.

He also talked about a readable form (eg. #H), which does not exist in CL.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or mute the thread [3].

Links:

[1] https://github.com/phoe [2] https://github.com/phoe/clus-data/issues/17#issuecomment-300728417 [3] https://github.com/notifications/unsubscribe-auth/AOWTqvK6-T5jkTnmSYh2SJhWFzW8LajPks5r4s4-gaJpZM4Mxmij

phoe avatar May 11 '17 09:05 phoe

http://www.xach.com/naggum/articles/[email protected]

adding insult to injury, COMPLEMENT is incredibly expensive in all the Lisps I have used.

Not sure whether this is still an issue (the performance of COMPLEMENT), but at least it looks like a nice piece of history worth remembering.

(define-complement = /=)
...

Update: http://www.xach.com/naggum/articles/[email protected]

phmarek avatar May 18 '17 05:05 phmarek

This seems very implementation-dependent. AFAIK, an implementation might actually want to choose to implement COMPLEMENT this way as an optimization.

phoe avatar May 18 '17 09:05 phoe

http://www.xach.com/naggum/articles/[email protected] http://www.xach.com/naggum/articles/[email protected]

Binding-specs that include types

phmarek avatar May 29 '17 13:05 phmarek

https://www.xach.com/naggum/articles/[email protected] is a neat idea as well; would be nice to know which implementations support this extension.

(funcall #'(flet foo bar))

phmarek avatar Nov 19 '18 15:11 phmarek