Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by gifti‭

5 posts
60%
+1 −0
Challenges Reduce over the range [1..n]

Factor, 95 bytes USING: kernel ranges sequences ; IN: r : r ( n q -- n ) [ [1..b] [ ] ] dip map-reduce ; inline

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Find n Niven Numbers

Factor, 147 bytes USING: kernel math math.text.utils sequences ; IN: n : n ( n -- s ) 0 swap [ [ 1 + dup dup 1 digit-groups sum mod 0 > ] loop dup ] replicate nip ;

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Make a frequency table (histogram)

Factor, 46 bytes USE: math.statistics IN: h ALIAS: h histogram

posted 2y ago by gifti‭

Answer
50%
+0 −0
Challenges Determine whether an integer is square-free

Factor, 108 bytes USING: assocs kernel math math.primes.factors ; IN: s : ? ( n -- ? ) group-factors [ nip 2 < ] assoc-all? ;

posted 2y ago by gifti‭  ·  edited 2y ago by gifti‭

Answer
50%
+0 −0
Challenges Cumulative Counts

Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;

posted 2y ago by gifti‭

Answer