This event will be deleted!


A draft to delete


You come from object-oriented programming and arrive at functional programming in React. You start developing your application, you are going to create a class in OOP, and at that moment, an alarm goes off in your mind and a doubt strikes you: How is something similar to a class used in the functional programming of React?

That’s exactly what just happened to me, and I’ve discovered that I can operate in ways similar to object-oriented programming through hooks. Here you have a basic approach of what an object-oriented hook would look like.

```typescript
import { useEffect, useState } from "react"

type Robot = {
  name: string,
  setName: (text: any) => any,
  sayHello: (text: any) => any
}

function useRobot(category: string) {
  const [name, setName] = useState('')

  useEffect(() => {
    (`${category} type robot created`)
  }, [])

  const sayHello = (name: string) => {
    return `Hello ${name}`
  }

  return { name, category, setName, sayHello } as Robot
}

export default useRobot
export type { Robot }
```

Use the code example below to call the hook:

```typescript
  const robot = useRobot('Autonomous')

  useEffect(() => {
    robot.setName('Johnny 5')
  }, [])

  useEffect(() => {
    console.log(robot)
  }, [])
```

I hope this brief entry proves useful for your learning process. While adapting from OOP can be a bit challenging, the internet is full of free, high-quality documentation on React. For example, [A guide to React design patterns](https://blog.logrocket.com/react-design-patterns/) is a post I recommend reading once you encounter architectural problems like the one we've studied in this post.

If you have any questions or want to share your own experiences, feel free to leave a comment. Good luck on your development journey!

This article discusses the transition from OOP to functional programming in React, demonstrating how hooks can mimic classes. It introduces the custom useRobot hook, which manages the state and behavior of a robot. An example of using the hook in a React component is provided, along with a recommendation to explore React documentation for tackling architectural challenges. Good luck on your development journey!


Eu não posso aceitar certas coisas que eu não entendo
O comércio das armas de guerra da morte vivendo
Eu queria falar de alegria
Ao invés de tristeza mas não sou capaz
Eu queria ser civilizado como os animais
https://www.youtube.com/watch?v=j41LCwLfwpU


Finishing a #React hook which creates and returns #Bitcoin BIP32 wallets. How many wallets do you need? 😜


Trasnocha cerca un grillo cantor pareciendo querer musicalizar mis noches de programación.


Pasándomelo bomba programando bots y #MiniApps de #Telegram con #React y #BitcoinJS. Si queréis incursionar en la programación de Bitcoin, que no os falte vuestra copia de #MasteringBitcoin escrito por Andreas #Antonopoulos. Nunca pensé que un libro técnico sobre #Bitcoin fuese a ser tan ameno. ¿O será por #Bitcoin que me resulta tan agradable? https://image.nostr.build/f699dc1d8427240ee40924c92c37b16f1d4566aa65717435cbf5544112d43b31.jpg


1 mBTC = 1 milibit


#LazyVim is the best code editor I have ever used.
https://www.lazyvim.org/
 https://image.nostr.build/5997bd642ec0321034fe174667da7f138e4e0f7bd1ccf5195c32b615ed3ff150.png


Unmoderation != Censorship
#FreePavelDurov

nostr:note160tqwgvz2tr468l33zeep0qfgmkv3wzh8u7c70sy6xxuf3p66h9syx2lp7


Arrest of Pavel Durov, Telegram CEO, charges of terrorism, fraud, child porn: https://decripto.org/en/arrest-of-pavel-durov-charges-of-terrorism-fraud-and-child-pornography-he-did-not-cooperate-with-the-authorities-he-risks-20-years-in-prison/

Discussion: http://news.ycombinator.com/item?id=41347909


The rally in support of Pavel Durov, who was detained in Paris, is ongoing in Moscow.

Protesters are bringing paper airplanes to the French embassy.
https://static.noauthority.social/media_attachments/files/113/023/603/803/619/673/original/568a435146f91612.jpeg
https://static.noauthority.social/media_attachments/files/113/023/603/803/077/775/original/9c7dba921b0f1413.jpeg


Pavel Durov, founder and CEO of Telegram, was arrested in France for the “crime” of allowing his users to have private, encrypted conversations.

Privacy is not a crime. Encryption is not a crime. And even if some corrupt states consider them crimes, they will never be crimes in the eyes of God.

The ongoing attack on freedom of speech in Europe is what is criminal. https://image.nostr.build/4a043247e17b4a9dba234174be85788aeaffb035b38444a9c4eecbc871a05006.jpg


Pavel Durov will remain in pre-trial detention and will not be released on bail or under conditions like house arrest or surrendering his passport due to being considered a flight risk.

The investigating judge requires time to gather evidence, interview witnesses, and conduct searches.


Pavel Durov, the Russian-born billionaire founder and owner of the Telegram messaging app, was arrested at Le Bourget airport outside Paris shortly after landing on a private jet late on Saturday and placed in custody, three sources told Reuters.
 https://image.nostr.build/9c63658e9b48996963370d30d831e161fd165e914bd6d98a9234fbd5836de2cb.jpg
✓ Durov arrested in Bourget airport, police sources say
✓ Telegram is based in Dubai
✓ Durov has French and UAE citizenship
✓ Russia says Durov's rights should be respected
✓ Russian lawmaker: freedom of speech is dead in Europe


Pavel Durov Flew to Paris for Dinner

The Telegram founder, accompanied by his assistant and bodyguard, flew in from Baku, planning to spend at least one evening in Paris, where he had a table reserved at a restaurant, according to Le Figaro.

 Embraer Legacy 600 plane landed at the French airport at 7:30 PM local time. A few minutes later, he was detained.


Gabon ama, bi hitz bakarrik
berri on bat zuri emateko;
bukatzen da gure gau luzea
laister nauzu anaien ondoan,
etxe zaharrera berriro itzuliz
lehengo kaletan borrokatzeko!

Ongi etorri, Julian! ❤ ✊
 https://image.nostr.build/dc9cd4503f3fd694ae5260fe07771fe46e527d6af1f4618336f5a85e02275ce3.jpg


¡Bonita casualidad! Esta misma semana he exportado a WIF algunas claves derivadas con #NIP32. He estado desarrollando contra un sistema de login basado en mensajes firmados, que por lo visto es parecido a cómo está hecho aquí en Nostr. Tengo que investigar un poco más...


¡Qué interesante! ¿El escrow está relacionado con esto o es algo sólo de Lightning? Me  recuerda mucho al funcionamiento de Peach Bitcoin: https://peachbitcoin.com


A draft to delete


If you're a fan of Vim and you're [Vim VSCode plugin](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim), you might have noticed that some of the standard VS Code shortcuts don't work as expected. This is because the Vim plugin overrides some of the default keybindings to provide a Vim-like experience.

One such overridden functionality is auto-indenting code. In a standard VS Code environment, you can auto-indent your code by selecting all the text (Ctrl + A) and then auto-formatting it (Shift + Alt + F). However, with the Vim plugin, this doesn't work.

But don't worry, Vim has its own way of auto-indenting code, and it's just as easy. Here's how you can do it:

1. Ensure you're in normal mode by pressing Esc.
1. Go to the beginning of the file by pressing gg.
1. Start the indent command by pressing =.
1. Go to the end of the file by pressing G.

This sequence of commands (gg=G) will auto-indent the entire file. It's a quick and easy way to clean up your code and make it more readable.

Remember, while the Vim plugin in VS Code provides a familiar environment for Vim users, it does come with its own set of commands and shortcuts. So, if you find that a standard VS Code shortcut isn't working, there's probably a Vim equivalent that you can use instead.

Happy hacking!

Auto-Indenting Code with Vim plugin in VS Code

You may have noticed that the standard auto-indent shortcut (Shift + Alt + F) doesn't work as expected when using VS Code with the Vim plugin. Learn how the plugin overrides this default keybinding and provides an alternative Vim command (gg=G) to achieve auto-indentation.


If you've encountered permission issues while using [Telegram Desktop](https://desktop.telegram.org/) on Arch Linux with an Nvidia graphics card and proprietary drivers, you're not alone. It seems that the error also happens with other applications in other distributions because it's related with the Nvidia driver configuration.

In my case, the issue occurred when I opened a Telegram MiniApp. It didn't load the content properly and slowed down the system significantly. Wanting to gather some feedback from the operating system, I launched Telegram Desktop from the terminal and encountered this error right when opening a MiniApp:

```
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 384x590: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 384x590: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 384x590: Permission denied
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1
```

The issue seems to stem from a setting called "modeset" within the Nvidia graphics driver. Modesetting is a feature that controls how the graphics card interacts with the display. When modesetting is not enabled, it can lead to compatibility issues with certain software.

To see if modesetting is enabled on your system, you can run the following command in your terminal:

```
cat /sys/module/nvidia_drm/parameters/modeset
```

If the output shows `N`, it means that modesetting is currently disabled.

To enable modesetting, you'll need to modify a configuration file for the Nvidia graphics driver. You can do this by running the following command:

```
echo options nvidia_drm modeset=1 | sudo tee /etc/modprobe.d/nvidia_drm.conf
```

This command adds a setting to the configuration file that tells the Nvidia driver to enable modesetting. By setting modeset to 1, you're ensuring that the graphics card will interact with the display in the optimal way for compatibility.

After making this change, it's important to restart your computer for the new configuration to take effect. Once you've restarted, you should find that the issue is resolved, and you can continue using Telegram Desktop as usual.

I hope this post has been helpful for you in resolving this error.
Happy hacking!

Solving MiniApp error in Telegram Desktop

Encountering issues with Telegram Desktop on Arch Linux with an Nvidia graphics card is a common problem. The root cause seems to be related to the "modeset" parameter within the Nvidia graphics driver. When modesetting is not enabled, it can lead to compatibility issues with certain software. Fortunately, you can fix this issue by enabling modesetting in the Nvidia graphics driver.


Automate Lightning Node Management with CLBOSS. Report by nostr:npub18aeesvp4fumzqt6p7sxmyqs3n26ks06lfnrqc0030lx4dr0ch5lqzrlrzn
https://yakihonne.com/article/naddr1qvzqqqr4gupzq0mnnqcr2nekyqh5raqdkgpprx44dql47nxxps7lzl7d26xl30f7qqxnzde3xy6rxwf38yunwvpntll02l


📣 Decentralized review of today's hot news and earning sats.
🇸🇻El Salvador, the first country to make Bitcoin legal tender, has now accumulated over $400 million worth of Bitcoin.
🚨BlackRock last week unveiled its first tokenized fund on a public blockchain.
📬Borderless Capital acquires quant firm CTF Capital, plans LatAm HQ in Argentina.
🚀Debt concerns may have helped bitcoin and gold rally to record highs amid elevated interest rates worldwide.
⏰DAO Treasuries See Over $20 Billion Growth in 4 Months Amid Crypto Market Boom.
🔋Pixelmon CEO bets on fractionalized NFTs for its huge comeback.
🇺🇸The U.S. SEC has asked a New York judge to impose a fine of $1.95 billion on Ripple Labs.
👹Massive Bitcoin Shift: $6B Moved as 5th Largest BTC Wallet Reactivates After Years of Dormancy.
💥Base saw a significant increase in total value locked (TVL), reaching nearly $1 billion.
🌈Coinbase CEO: Being against Bitcoin and crypto is "political suicide".


Ay que bonito se ve la libertad financiera y mi chico Minero me canta al oído.😅

#Bitcoin    es música y baila, no es mucho pero es honesto y libre.🤭 ✨🎶

Un sábado por la mañana. ☀ https://image.nostr.build/f83e2fde7d0b2fd4b1280f9a25cf7d843c147db1a702d40556ca644c3813cb95.jpg https://image.nostr.build/00eb0b2c5ca30736fb96490a0a1c01e4f1c067c5cc6a64210354ab370656d516.jpg


⛏💛₿
https://image.nostr.build/bf717dabfc26497e790ec610441f3bd009cdbd5491b16465ea5f78b05c5b3d9a.jpg


🤓 Leyendo atentamente la web de nostr:npub10zuxk4yhygswdmt5n9mfyeq6lh7gcu5g042tlggrgp8yunl32clqsu5t9r. Genial el diseño del modelo educativo internacional como si fuesen nodos de #Bitcoin. 🎓 Y #BitcoinDiploma sencillamente impresionante, brutal. 📚 Y además CC-BY-SA.  💛https://github.com/MyFirstBitcoin/Bitcoin-Diploma
🔎 Sigo mirándoos de cerca 😜


La verdad es que hoy #Spotify se está portando...
https://open.spotify.com/track/7ACxUo21jtTHzy7ZEV56vU?si=fdf9212a104c45b5&nd=1&dlsi=00e00182fe424db6


you don't need to be a developer to contribute to nostr, AT ALL.

your time, energy and attention here make this place stronger


🔥 Steve Yun (TON Foundation) & John Hyman (Telegram) present a fascinating plan for 500M users to adopt #Blockchain #Crypto #Bitcoin #Toncoin #TON #Web3 in 5 years:
https://void.cat/d/SyqfFHysKp5T939dBtdwPQ.mp4
1⃣ Deploy DApps on @ton_blockchain
2⃣ Use Mini Apps for #DApp interaction
3⃣ Manage ID and assets with @wallet_tg
https://www.youtube.com/watch?v=VC5G2581M8s


¡Qué bueno ver iniciativas innovadoras en Colombia! Yo viví 5 años en Bogotá y tuve la suerte de también visitar Medellín. A ver si un día vuelvo y os visito. ¡Mucho ánimo!


Nire lehenengo argitalpena habla.news-en 💜 💛
Mi primera publicación en habla.news 💜 💛
Ma première publication sur habla.news 💜 💛
My first post in habla.news 💜 💛


Delve into the evolution of #Telegram's gaming: From #Gaming Platform to the innovative Mini Apps. Which path will you choose for your next project? Explore the differences and make an informed decision.

https://habla.news/a/naddr1qqxnzdes8qurjdfn8ycryvejqgs8y3tg80mqsjj7fj4l9f2x75mux5cp4mqjpxwe2ez6nj2pj6zakeqrqsqqqa2888elt3

#Development #Telegram #HTML5 #Bot #Web #App

https://void.cat/d/TuRqEm9j6A4reZ1ms2wEGg.webp


In 2016, Telegram launched [Games](https://core.telegram.org/bots/games), which became quite popular for allowing the development of HTML5 games that ran within Telegram. After several years of evolution, in 2022, Mini Apps [[1]](https://core.telegram.org/bots/webapps) [[2]](https://docs.ton.org/develop/dapps/telegram-apps/) arrived, web applications of any type based on HTML5 within Telegram. These Mini Apps can also be Games, which led me to the following question:

From now on, should I develop Telegram games as Games or as MiniApps?
Let's quickly look at the differences between both:

|     | Games | MiniApps |
| --- | --- | --- |
| **Goal** | Offer playful experiences. | Offer advanced applications. |
| **Interface** | Simple and game-focused. | Advanced and flexible. |
| **Integration with Telegram** | Share game and scores in chat. | Deeper integration. |
| **Communication with Botfather** | Human, manual, and complex. | Interoperable, automatable, and simple. |

At first glance, Mini Apps seem like the more attractive option as the go-to for creating new games, but remember the importance of analysis when choosing a technology. In some cases, a Game's features might better suit a project.

Special thanks to the friends at the [Telegram Developers Community](https://t.me/devs) group for their assistance. If you're interested in Telegram-related programming, don't hesitate to join.

Developing Telegram Games with Game or MiniApp?

Delve into the evolution of Telegram's gaming: From Gaming Platform to the innovative Mini Apps. Which path will you choose for your next project? Explore the differences and make an informed decision for optimal project success.

This is a long form article, you can read it in https://habla.news/a/naddr1qqxnzdes8qurjdfn8ycryvejqgs8y3tg80mqsjj7fj4l9f2x75mux5cp4mqjpxwe2ez6nj2pj6zakeqrqsqqqa2888elt3


¿Nos hacemos una #HalvingParty o qué?
https://void.cat/d/55HNhbucqfe82zw4KLSJ4t.webp
https://www.cryptocloaks.com/product/bitcoin-halving-party-shutter-shades-3-125-celebration/
#Bitcoin #Halving #Fun #Crypto #Blockchain


Having fun today crafting a #Telegram game bot with #Grammy, all running on #Deno! Next steps? Integrating it with #TON for #GameFi using #NFTs, #Jettons, #Toncoin, and #Bitcoin.
https://core.telegram.org/bots/api
#Blockchain #Crypto #Web3


Watching this video about #Telegram Web Apps or #TWA. https://youtube.com/watch?v=amvZy9hzAic
#Bitcoin #Blockchain #Crypto #Toncoin


Have you checked out #Bitfeed? 🚀 It lets you monitor the #Bitcoin #mempool and block creation in real-time. Truly fantastic! 📊 Access highly detailed info easily and visually. Also for your node. Check it out: https://bitfeed.live/ #Blockchain


¡Qué sincrónía! Casualmente estoy con eso...
https://iris.to/note126v8l283k6gkr3fua2xj8zjlqhhdmtrmhy2jah539yq4szdjps5qdfgq9f


By setting up my own #Bitcoin node, I contribute to the network's decentralization & resilience, while securing my financial sovereignty and boosting personal privacy & security. 🌐💪 #Blockchain #Crypto #GNU #Linux #Umbrel 🔐💰
https://void.cat/d/WiXuXj8VPfZnifFWc231A2.mp4


Learning about #Nostr and #Zap I found #NIP 46 and 47 very interesting.
https://void.cat/d/LErv2ac5dRaJjaxbDE2Abb.webp
https://github.com/getAlby/nips/blob/master/46.md
https://github.com/getAlby/nips/blob/master/47.md
#Bitcoin #Lightning #LightningNetwork #NostrConnect #WalletConnect #Satoshi


One of my favorite features of #Web3 and #Blockchain is that it completely redefines labor relations through #DAO. We are building more democratic and decentralized organizations.
https://void.cat/d/AsVeWerwnExY66onnbk5ZL.webp


In January 2022, up to three #Bitcoin blocks were validated on solo.ckpool.org using low-power mining nodes, debunking the belief that powerful equipment is needed to solve Bitcoin blocks. This article explains why and also provides a master class on #cryptocurrency #mining in a simple and concise manner.
https://bitcoinmagazine.com/business/how-small-solo-miners-solve-bitcoin-blocks
https://void.cat/d/Fzvhtxkm5vP6JXva5fCL9Z.webp


While setting up my #Bitcoin #NerdMiner via browser in #Linux I suffered this error: `Error: Failed to execute 'open' on 'SerialPort': Failed to open serial port.`

I solved it with: `sudo setfacl -m u:USERNAME:rw /dev/ttyACM1`

Source: https://community.home-assistant.io/t/solved-flashing-failing-immediately-on-linux/567332

#BitcoinMining


¡Buenas días BlueMoon y toda la comunidad #Bitcoin! ¿Listos para brillar como un ⚡ #Lightning?


Exciting news! 🎉 Notcoin has already surpassed the 20 million user mark in 26 days! 🚀👏
#Notcoin #TON #Telegram #Blockchain #Crypto


You're right! 🚀 I'm quite excited about #TON, and I believe the user base of #Telegram could really make a difference in this #blockchain. 😊 TON is truly thrilling, and I'm keeping my fingers crossed for some good luck. 🍀 Thanks for your advice! I really appreciate your support. By the way, I'm still exploring #Bitcoin and #Lightning, especially now with #Nostr and the #Zaps. 🔍⚡ It's always great to stay on top of all these innovations. Let's catch up soon!


I've spent the last few weeks researching the TON ecosystem (Telegram's Blockchain) and today I came across this post that seems like a pretty good compilation to get started with these technologies. I started out by toying with Telegram's Wallet bot and ended up looking at how TON Wallet would be implemented. I've learned a lot from the side missions of the Notcoin clicker, which introduce you to a bunch of TON-based solutions. I believe this blockchain is here to stay and will generate a lot of buzz, it might even be the first to become massively popular due to the popularity of the messaging app. I'm very excited and I think I'll soon start deploying some smart contracts and DApps on the TON network.
https://blog.ton.org/an-introduction-to-ton-ecosystem-discover-web3-on-telegram
#Blockchain #TON #Toncoin #TonWallet #Telegram #DApps #SmartContracts #Web3 #Crypto


Joseba Martos  🏴☠⚡

⚒ I craft 🛡 privacy-centric and ⛓ decentralized solutions, championing 🐧 libre tech for 🌈 social change. Focused on 🕊 collective wellness and 🌿 ecologism. Intrigued by the ✨ cosmos,  🥾 hiking enthusiast and fervent 🎻 music enjoyer.


Ultimamente en el mundo #Bitcoin estoy muy atento a #Nostr y a #Lightning. Lo veo superprometedor tanto para la gestión de identidad en línea como para la monetización del contenido.


When a friend dies, it hurts, but when that friend is very beloved in the village, it hurts even more. It's as if the village has been left orphaned. Josu Unanue worked hard for HIV awareness, for LGBTQ+ rights, and for the well-being of our village. Josu, I say to you the same thing another friend told us when he left: Eskerrik asko lagune izatiegaitxik. ❤ Che bel fior! 🌹✊


"Badira egun bat borrokatzen dutenak eta onak dira. Badira urte askoan borrokatzen dutenak eta hobeak dira. Baina badira bizitza osoan borrokatzen dutenak: hauek dira ezinbestekoak."

Heriok ostabe alkartu arte itsoso ona okin, lagune. Josu beti bidxotzien. ❤

https://void.cat/d/3pv2qmkCT5Dkm27zgnxnDT.webp


Hello, Nostr!