Handbook
Glossary
post. ( post index -- )
Vocabulary
hacker-news
Inputs
post
an
object
index
an
object
Outputs
None
Definition
USING:
accessors
assocs
calendar
calendar.format
combinators
formatting
hacker-news.private
io
kernel
math
sequences
;
IN:
hacker-news
:
post.
( post index -- )
write-number
{
[
[
"title"
of
]
[
"url"
of
]
bi
write-title
]
[
post>url
host>>
" ("
")"
surround
write-text
nl
]
[
"score"
of
" %d points"
sprintf
write-text
]
[
dup
"by"
of
[
" by "
write-text
[
"by"
of
]
[
post>user-url
]
bi
write-link
]
[
drop
]
if
]
[
"time"
of
[
" "
write-text
unix-time>timestamp
relative-time
write-text
]
when*
]
[
dup
"descendants"
of
[
" | "
write-text
[
"descendants"
of
[
"discuss"
]
[
"%d comments"
sprintf
]
if-zero
]
[
post>comments-url
]
bi
write-link
]
[
drop
]
if
nl
nl
]
}
cleave
;