Warning: session_start(): open(/var/lib/php/sessions/sess_uhuk6k4jve7rjenbjkbssl0bpk, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
concept Entry {
S word;
S isWord; // 'yes, 'no, other
S comment;
}
cmodule ActualWords > DynCRUD {
start {
dbIndexing(Entry, 'word);
}
// API
void addWordsWithComment(Iterable words, S comment) {
for (S word : words) {
Entry e = uniq_sync Entry(+word, isWord := 'yes);
cset(e, comment := joinNemptiesWithComma(e.comment, comment));
}
}
S randomWord() {
for ping (Entry e : shuffledIterator(concepts()))
if (isYes(e.isWord))
ret e.word;
null;
}
LS actualWords() {
ret collect word(filter(concepts(), func(Entry e) -> bool { isYes(e.isWord) }));
}
}