vicnaum (@vicnaum) • Hey
Building Lens v8 🚗
Publications
- The first public version of Lens Protocol was deployed 666 days ago.
That's a hell of anniversary! 😄🤘
- Can anyone explain to a boomer wth is #bonsai using a meme?
(use only old school memes plz)
- Testing, testing, 1.2...
- Just made a 3D Printed Lens buddy 🙂
(Which can also act like a coding duck, hehe)
If you want to print one yourself - the STL is available on Thingiverse:
https://www.thingiverse.com/thing:5827327
(it consists of three parts and doesn't require any extra post-processing or even supports)
Enjoy! 🌿
- Did you know that ChatGPT can do LaTeX?
"Papers, anyone?" 🙂
- Did you know you can make ChatGPT prepend "Epistemic Status" to every answer? Giving you some percentage of confidence which does even makes sense if you ask it different kinds of questions.
P.S. Btw it's confidence in writing Yul is 30% :-D
- **I've asked ChatGPT to help me create some basic programming puzzles** for somebody who just starts their programming journey.
After some tweaking (you can see the initial prompt in the pic) by asking for examples, edge cases hints, and making it a real life problems, we came up with the list below:
------ ====== ~~~ *** ~~~ ====== ------
**1. You're organizing a bake sale and you want to keep track of how much money you've made.** Write a function that accepts a list of the prices of all the items that were sold and returns the total amount of money that was made.
`Example: if the input list is [1.50, 3.00, 5.25], the output should be 9.75`
*Hint: the function should return 0 if the input list is empty*
**2. You're writing a program to help you study for a spelling test.** Write a function that accepts a list of words and returns the number of words that have the vowel "a" in them.
`Example: if the input list is ["cat", "dog", "elephant"], the output should be 2`
*Hint: the function should return 0 if the input list is empty or if there are no words in the input list that have the vowel "a" in them*
**3. You're playing a game where you have to guess the highest number.** Write a function that accepts a list of numbers and returns the largest number in the list.
`Example: if the input list is [1, 5, 10, 100, 1000], the output should be 1000`
*Hint: the function should return the smallest possible number (e.g., -infinity or the smallest possible integer value) if the input list is empty*
**4. You're making a list of all the long-named animals that live in the zoo.** Write a function that accepts a list of animal names and returns a new list containing only the names of animals that have at least five letters in their name.
`Example: if the input list is ["cat", "dog", "elephant"], the output should be ["elephant"]`
*Hint: the function should return an empty list if the input list is empty or if all the words in the input list have fewer than five letters*
**5. You're organizing a scavenger hunt and you want to make a list of all the odd-numbered items that you need to find.** Write a function that accepts a list of numbers and returns a new list containing only the odd numbers from the original list.
`Example: if the input list is [1, 2, 3, 4, 5], the output should be [1, 3, 5]`
*Hint: the function should return an empty list if the input list is empty or if there are no odd numbers in the input list*
**6. You're writing a program to help you organize your books.** Write a function that accepts a list of book titles and returns a new list containing only the titles of books that start with a capital letter.
`Example: if the input list is ["The Cat in the Hat", "Moby-Dick", "a Tale of Two Cities"], the output should be ["The Cat in the Hat", "Moby-Dick"]`
*Hint: the function should return an empty list if the input list is empty or if there are no words in the input list that start with a capital letter*
**7. You're making a word puzzle where you have to fill in the vowels in a sentence.** Write a function that accepts a string and returns the string with all the vowels removed, so that you can fill them in yourself.
`Example: if the input string is "Hello world", the output should be "Hll wrld"`
*Hint: the function should return an empty string if the input string is empty or if it contains no vowels*
**8. You're organizing a raffle and you want to find the average price of all the prizes.** Write a function that accepts a list of prize values and returns the average value of all the prizes.
`Example: if the input list is [10, 20, 30, 40], the output should be 25`
*Hint: the function should return 0 if the input list is empty*
**9. You're making a word puzzle where you have to unscramble words.** Write a function that accepts a string and returns a new string with all the words in the original string reversed (i.e., "Hello world" becomes "olleH dlrow").
`Example: if the input string is "Hello world", the output should be "olleH dlrow"`
*Hint: the function should return an empty string if the input string is empty*
**10. You're writing a program to help you learn about prime numbers.** Write a function that accepts a list of numbers and returns a new list containing only the numbers that are prime (i.e., divisible only by 1 and themselves).
`Example: if the input list is [1, 2, 3, 4, 5], the output should be [2, 3, 5]`
*Hint: the function should return an empty list if the input list is empty or if there are no prime numbers in the input list*
------ ====== ~~~ *** ~~~ ====== ------
There were some funny mistakes in these puzzles, most of which I've corrected (like the zoo example asked for animals names longer than 3 letters and providing an example where all names are longer than 3 letters - so I've made the number 5 - can't think of much 2-letter animal names anyway :-D).
But there are still some silly mistakes left. Can you find them? 🫠
And I can finally try to teach my kids some coding... or should I teach them to flip burgers in McDonalds instead? :-D
- Built on @memester-xyz.lens
- Who will be the first to buy https://de.fi ?
- Vanity transaction in the wild:
https://etherscan.io/tx/0xdead00c0b3ea2126f1f84e74df1f4e05eaecf4d96b2a9744cabd77e5599d0b50
- Genesis: Satoshi Nakamoto building an ASIC
- gm