Oddbean new post about | logout

Notes by Layerjack (Onion Knight) | export

 @verita84

Got an LLM to write the code. Need to do a few edits to read the private key from a file, and syslogs will be files too? 
 package main

import (
	"fmt"
	"github.com/nbd-wtf/go-nostr"
)

func main() {
	// Generate a new private key
	sk, err := nostr.GeneratePrivateKey()
	if err!= nil {
		fmt.Println("Error generating private key:", err)
		return
	}

	// Derive the public key from the private key
	pk, err := nostr.DerivePublicKey(sk)
	if err!= nil {
		fmt.Println("Error deriving public key:", err)
		return
	}

	// Encode the private key into NIP-19 format
	nsec, err := nostr.EncodePrivateKey(sk)
	if err!= nil {
		fmt.Println("Error encoding private key:", err)
		return
	}

	// Encode the public key into NIP-19 format
	npub, err := nostr.EncodePublicKey(pk)
	if err!= nil {
		fmt.Println("Error encoding public key:", err)
		return
	}

	// Create a new event to represent the DM
	event := &nostr.Event{
		Type: "dm",
		Payload: map[string]interface{}{
			"recipient": npub,
			"content":   "Hello, world!",
		},
		Timestamp: nostr.Now(),
		Signature: sk.Sign([]byte(fmt.Sprintf("%s %s", nsec, npub))),
	}

	// Publish the event to a relay
	relayURL := "wss://your-relay-url-here"
	err = nostr.Publish(event, relayURL)
	if err!= nil {
		fmt.Println("Error publishing event:", err)
		return
	}

	fmt.Println("Direct message sent successfully!")
}
 
 Stdin will be a line at a time? I can throw in a readline loop. 
 package main

import (
	"fmt"
	"github.com/nbd-wtf/go-nostr"
		
	"io/ioutil"
	"log"
	
)

func main() {
	// Generate a new private key
	sk = "private key"
	// Derive the public key from the private key
	pk, _ := nostr.DerivePublicKey(sk)
	// Encode the private key into NIP-19 format
	nsec, _ := nostr.EncodePrivateKey(sk)
	// Encode the public key into NIP-19 format
	npub, _ := nostr.EncodePublicKey(pk)


	filePath := "path/to/your/file.txt"
	// Read the file into a byte slice
	content, err := ioutil.ReadFile(filePath)
	if err!= nil {
		log.Fatalf("Failed to read file: %v", err)
	}
	// Convert the byte slice to a string
	dmcontent := string(content)

	// Create a new event to represent the DM
	event := &nostr.Event{
		Type: "dm",
		Payload: map[string]interface{}{
			"recipient": npub,
			"content":   dmcontent,
		},
		Timestamp: nostr.Now(),
		Signature: sk.Sign([]byte(fmt.Sprintf("%s %s", nsec, npub))),
	}

	// Publish the event to a relay
	relayURL := "wss://your-relay-url-here"
	err = nostr.Publish(event, relayURL)
	if err!= nil {
		fmt.Println("Error publishing event:", err)
		return
	}

	fmt.Println("Direct message sent successfully!")
}
 
 So the family gets millions if he becomes a troon? 
 nostr:npub19wdg9zgna9zmyv25qefrcrjh3grkht2kag7yafunzwf0wrg63g7qsmlx5z 

Do you still use Spring B... 
 I uninstalled it after realizing I couldn't add my own app easily. Couldn't find any apps that were interesting enough. Maybe the wiki one?

I'm writing a nostr to web bridge for termux. Not sure if I'll be able to convince many people to use it cause command line is scary  
 I'll post the code as a note. Shouldn't take me long.  
 Found this. Not sure how to publish a DM. Trying to find docs. 

https://github.com/nbd-wtf/go-nostr 
 DM is an event, so changing the kind field in the event sctruct should do.  
 Yeah, or Zillow 
 How much did the average go down from what you've seen? 
 Which site do you use for rent? 
 Yeah, or Zillow 
 Even Michael Burry got the timing of the stock market crash wrong. He thought it was gonna be late 2022. Still hasn't happened.  
 Which site do you use for rent? 
 We're almost back to the pre corona levels of oil production. More growth and everything will be fine?


https://ycharts.com/indicators/world_crude_oil_production 
 Monero, free from CEX will replicate BTC's early price action. 
 If many btc holders swap, yes. It is unlikely. Why would they? 
 Evidence that bitcoiners care about privacy? 
 Entirely their fault. Unskilled fags 
 The darknet bible hasn't been updated in a while. Needs a section about buying #monero 
 Actually there is a how to buy section, but it's out of date cause it lists localmonero and binance, and no explanations for how to do an LTC to XMR swap. 

Also, no need to bother with tails these days when Tor browsers are on iOS and Android

Need to write Darknet Koran? 😁

nostr:nevent1qqsrn5h4flz04w2zu82ar5z3x0hf7m96hx0eec9t8xdake8qh43l88cpz4mhxue69uhhyetvv9ujumt0wd68ytnsw43qygptn2pgjylfgkerz4qx2g7qu4u2qa4664h283820ycnjtms6x528spsgqqqqqqszh2agc 
 I've heard people using torrents with i2p. I use protonvpn cause it's faster. 

There is demand for tor admins, and good money there, but high risk and hard to negotiate a deal (everyone can scam). 

Check out Pitch and Dread. Sometimes there are jobs for crypto there.  
 Yeah, we need to move those people to nostr. Their minds will be blown.  
 Yeah, need to be listed too. Perhaps we can make a wiki article 
 Look at the screenshot 
 google finally canceled my email account and idk how to email gmail users now 😭 
 What did you do? 
 They have email? 
 Eat cheetos and sleep then 🤗 
 Interesting to see the US govt coming after self custody wallets and privacy tools in the same we... 
 How many punches can you take before you give yours away? 
 Come on, you gotta have a fighting spirit 
 Curiosity > Intelligence 
 Bravery > Curiosity 
 Better ideas don't just win. People desperately hold on even when their own reasoning can't justi... 
 100 years till freedom. While you wait here's a word from our sponsor 
 Post boobs instead.  
 Fist me daddy 
 Mastodon has reminded me once again I can share high quality craft with the public and it matters... 
 Post boobs instead.  
 Saifedean pushes for bitcoin to be a pension plan. His shortest investment window is 5 years. This is unsuitable for young people. And boomers are too lazy to learn how to maintain a wallet properly. 

None of this matters. Let's see how BTC does in 2029.  
 What kind of alcohol do any of you on the carnivore/animal-based diet drink? I know you’re not ... 
 GHB, phenibut instead. Those don't metabolize into glucose.  
 Ethanol is a partial agonist of GABA receptors. GHB and phenibut are full agonists. Booze in a pill. No dehydration or hangover.  
 Keep GHB in a bottle with a lid pipette. Distract your date and put a few drops in the drink. Practice a few times, and watch out for CCTV.  
 Hey, I'm the dating coach that delivers results regardless of jurisdiction 
 The secret is not to go after women 😉 
 Degrees are worthless if they can be taken away

Are real degrees like this too?

nostr:nevent1qq... 
 Masters and PhD can only be revoked in case of proven academic misconduct 
 Not poor in N years. Let's see how many don't sell to BlackRock. I bet most will dump their bitcoin to buy cars and TVs which I will steal from them for free 😁 
 Black rock beats white paper? 😂 
 Which nostr apps use NIP-17 for DMs 

#asknostr 
 I had a dream where I was a DoorDash pilot in Antarctica receiving an order for pizza and chocolate with extra meth

https://images.nymag.com/news/features/conspiracy-theories/conspiracy131118_nazis_560.jpg 
 Lightning chocolate. 1M SAT for a box? 
 That's under $200. Many drug trades are higher than that.  
 They spend $10 for every $1 to be used without corruption.  
 How is it terrible? It's a lot cheaper there to get away if you fuck up 
 Can drive drunk and fuck teen prostitutes 
 A lot more expensive if done in the countries on the list.  
 I want lockdowns to return. I really enjoyed the easily avoidable suffering that was imposed on the cowards. So hilarious to see them all complain in the identical fashion 
 Votes in Nostr.

You need to be a bitcoiner before being able to vote.

Fuck. 
 I'm gonna get lightning when Cake adds it 
 Anyone sim swapping their #GrapheneOS Pixel on a regular basis? I have to travel out of the count... 
 E-sim should work. Sim swapping means hijacking someone's phone number by the way 
 Me too. Tell that to the immigration officer. 😁 
 Any nostr Canadians know much about the immigration process or know anyone good at navigating suc... 
 Woah. Autoflower? 
 Refugee from the Netherlands? 
 I know Canada grows a lot of rape to make rapeseed oil. Rape is good.  
 So true. I was always good at meditation before, but after quiting social media and being extreme... 
 But that's not caused by social media. And ads can be blocked. My point is that it's not fair to compare it to pharmaceuticals that can put you on the floor. It's actually rather nice to be able to fill your time with chatter and memes on demand.  
 None of what you described is a problem. Nostr is a chat room about bitcoin, and it's inferior entertainment compared to YT and tiktok. 

The algorithm is mostly RL with the loss function based on the watched duration. Many people prefer that to search, cause it's simpler. 

No one forces people to use jewtube or fagbook, ya know? 
 I have defeated the great firewall a few years ago to access gmail and watch jewtube when I was in China. It was fairly simple. Torrents worked flawlessly too. 

I'm not a whiny coward, you see. If something is a problem, I push myself to fix it.  
 My Chinese friend has been using a VPN for 10 years. It's annoying but not difficult. 

I keep hearing people talk about those lists. Where are they? Are those completely secret? Then who cares? If they're used to control your bank account, then the bank must be able to see it. Do you have any evidence that it exists? 

I have used bitcoin to buy illegal drugs online like thousands of other people and none of us ever faced any punishment. This is the main type of censorship in the US and EU (less so). 

Stop being afraid. Likely the supposed watchers are not competent, and they don't give a shit about your data.  
 They're not cowards. They're lazy. They think the firewall is a good filter against bad US propaganda. 

There is censorship on the other side of the great firewall too. Copyright and drugs. I'd even half count Trump being kicked out social media too. Most people are too lazy to learn torrents and crypto to buy drugs. They'd rather pay cash and get netflix, or local dealer. For this same reason Nostr will remain small. 


 
 Most humans are lazy obese idiots.  Tigers in zoos don't hunt.  
 Not really. It's now 9 hours of phone instead of 9 hours of TV. People wanna turn on the TV, and turn off their brains. Your efforts are wasted trying to fix that. 

I'd like a communication platform based on quality instead of quantity, but how will it be funded without ads? Drug trade is the only possibility I see.  
 Show me who's making 10+M SAT a month. Who's the most zapped user? 

IRC (freenode) survived as a non profit, but kinda dying now. I'm pondering to go back there or matrix. Nostr is hit or miss. Often very little responses or interesting talks. 

Fiat buys food, bitcoin doesn't. Fiat puts fuel in your tank. What's the point of your bitcoin knowledge aside from number go up? 
 Thanks. I like a few random people who pop up. It reminds me of IRC a lot. Different format, but similar vibe. Small and cozy. Not like twitter where your meme can easily get 10K shares and likes. 

I'm waiting for Letr to come out. It sounds more appropriate for deeper thoughts.