GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) β€” delete-fifo πŸ’–

okay bestie, pull up a chair, we're learning delete-fifo from the GOLF manual (that's section 2gg btw) and honestly? it's giving housekeeping. it's giving "clean up after yourself, queen". 🧹✨


🌸 NAME 🌸

delete-fifo β€” the (FIFO) one that deletes stuff. that's it, that's the name. πŸ’…


πŸŽ€ PURPOSE πŸŽ€

Deleting FIFO list elements up to the last one read, including. like, the one you read is getting yeeted too. no survivors. πŸ’€


✨ SYNTAX ✨

delete-fifo <list>

that's it. one argument. we love a low-maintenance icon. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: delete-fifo will delete all leading elements from the FIFO <list> up to the last one read, including. the <list> in question was created by new-fifo, iykyk. 🌈

right after rewind-fifo, literally no element was read yet β€” so delete-fifo will have no effect. nothing to delete, bestie, the vibes are empty. 🫢

but after any read-fifo? oh it's on. delete-fifo will delete all elements up to the element read, including that element. the read one is gone-gone. πŸ’…

ngl the original spells it "wil" in that second sentence and honestly? relatable typo energy. but the meaning is 100% clear: everything up to and including the last-read element gets deleted. πŸ™ˆ

🌈 EXAMPLES 🌈

okay, demo time, watch and learn: ⭐

new-fifo mylist

fresh list, brand new, main character energy. ✨

// Add data to the list
write-fifo mylist key "key1" value "value1"
write-fifo mylist key "some2" value "other2"

we're feeding it data, two whole entries, slay. πŸ“

// Get first data from the list
read-fifo mylist key k value v

reading the first one β€” this is the read that matters, remember it. πŸŽ€

// Delete first element from the list, so list will have only "some2" key
delete-fifo mylist

and boom β€” first element deleted, so the list will have only the "some2" key left. ate. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

  • FIFO πŸ¦‹
  • delete-fifo (yes it references itself, iconic behavior)
  • new-fifo
  • purge-fifo
  • read-fifo
  • rewind-fifo
  • write-fifo
  • See all documentation πŸ“š

and that's the whole page, bestie. go forth, delete responsibly. πŸ’–

this little love letter was brought to you by version $VERSION dated $DATE β€” from GOLF(2gg) herself. mwah. πŸ«ΆπŸ’…βœ¨

πŸ“¦ where this page comes from