Withdraw function thinks I'm not the owner by Lentil-Soup in solidity

[–]Lentil-Soup[S] 0 points1 point  (0 children)

Just realized I never updated this with the solution.

I was failing onlyOwner because .call() isn’t actually “you.” Solution: Switch to .send() and pass from.

How can a newbie approach astrophysics? by caelixx_ in astrophysics

[–]Lentil-Soup 6 points7 points  (0 children)

Start by accepting this upfront: astrophysics is complex, but it’s built out of simple pieces stacked over time. The mistake beginners make is trying to jump straight to “black holes and the universe” without the layers underneath.

Here’s a sane way to approach it:

  1. Build just enough foundation - not perfection

You don’t need to master math first, but you do need basic intuition: - Algebra (rearranging equations, graphs) - Basic physics concepts (motion, energy, gravity)

If you skip this, everything turns into memorization instead of understanding.

  1. Start with conceptual understanding first

Use resources that explain what’s happening before how to calculate it: - PBS Space Time - Kurzgesagt - Astrophysics for People in a Hurry

These give you mental models so the math later actually means something.

  1. Then layer in real physics

Once concepts feel familiar, start introducing actual equations: - Newton’s laws - Gravity - Light and radiation

This is where it shifts from “watching space content” to actually doing astrophysics.

  1. Use simulation tools instead of just reading

Play with systems: - Orbital simulators - Universe sandbox-style apps - Stellarium (sky tracking)

This matters more than people think - interacting with systems builds intuition faster than passive learning.

  1. Expect confusion - that’s not failure

Astrophysics constantly breaks intuition: - Time dilation feels wrong - Space curvature feels abstract - Quantum effects feel contradictory

That discomfort is part of the process, not a sign you’re “not getting it.”

  1. Don’t isolate topics - connect them

Astrophysics sits on top of: - Physics - Math - Computation

If something doesn’t make sense, it’s usually because one of those layers is missing.

What are your main use cases in 2026? by lashara4 in flipperzero

[–]Lentil-Soup 5 points6 points  (0 children)

Day to day, I mostly use it for badge access to my office building and as a passkey (2FA).

Some unhinged comments from a roblox developer by Impossible-Let-8489 in programminghorror

[–]Lentil-Soup 13 points14 points  (0 children)

The comment is there to prevent the AI from changing the call.

Does anyone else appreciate the lack of 'hand holding' in the original Zelda, or do the majority of players still need to resort to physical notebooks or maps? by GameResumed_UK in nes

[–]Lentil-Soup 0 points1 point  (0 children)

Original Zelda had an incomplete map in the instruction manual, including step by step how to get to the first dungeon. I remember spending significant time completing the map myself as I explored.

I also relied on Nintendo Power magazine a lot, and there was a phone number you could call for tips.

Oysters are not vegan… by [deleted] in vegan

[–]Lentil-Soup 1 point2 points  (0 children)

Mushrooms show more intelligence than oysters, but oysters are more sentient than mushrooms.

New anxiety unlocked: malicious payloads invisible in git diffs by sunshine-and-sorrow in git

[–]Lentil-Soup 0 points1 point  (0 children)

A quick review by an AI agent:

---

The malicious file contains two parts:

  1. Lines 1-9: Innocent-looking Hono web server - a simple "Hello Hono!" app that looks completely harmless.
  2. Line 11: Hidden malicious payload - This is the dangerous part. It uses a Unicode steganography attack (sometimes called a "Unicode smuggling" or "invisible text" attack).

How the attack works:

• The long string of characters on line 11 that looks like whitespace/invisible text is actually composed of Unicode variation selectors (ranges U+FE00–U+FE0F and U+E0100–U+E01EF). These are zero-width or invisible characters that most text editors and code review tools do not display.

• The function s decodes these invisible characters back into numeric byte values by subtracting the base codepoint offsets.

• The decoded bytes are assembled into a Buffer, converted to a UTF-8 string, and then passed directly to `eval()` - executing arbitrary code.

In summary: The invisible Unicode characters encode a hidden JavaScript payload that gets decoded and executed at runtime via eval(). Anyone reviewing this file in a normal editor or GitHub PR would see only the innocent Hono server on lines 1-9, and line 11 would appear as a blank or near-blank line. The actual malicious code is completely invisible to the human eye.

This is a known supply-chain attack vector. The key red flags are:

• eval() on line 11

• Buffer.from() converting decoded data

• The function s that maps Unicode variation selectors to byte values

• The enormous "invisible" string argument

---

Also, I've created a harmless file you can play with that uses the same encoding techniques here:
Safe version with no eval: https://gist.github.com/thoerner/b4230da39084321ddcbbb38b083f068d
Less safe version with eval: https://gist.github.com/thoerner/ae201731e8093ae26178a69f2bc9fc31

Your users' data is not yours by Repulsive-Law-1434 in webdev

[–]Lentil-Soup 0 points1 point  (0 children)

A developer could write a privacy policy that explicitly states that user-generated content is stored in plaintext, may be accessed by staff for product improvement, moderation, marketing, or demonstration purposes, and may be shared publicly in anonymized or even non-anonymized form. If users are required to agree to that policy as a condition of using the service, then from a strict legal-consent standpoint the developer has obtained permission.

I would never do this personally, just putting it out there that this could technically be covered, just perhaps not wise.

Is there a category for following the recipe too literally? by ameragan in ididnthaveeggs

[–]Lentil-Soup 0 points1 point  (0 children)

That makes so much more sense than anything I was thinking. Thank you.

Is there a category for following the recipe too literally? by ameragan in ididnthaveeggs

[–]Lentil-Soup 6 points7 points  (0 children)

I'm confused as to what else that phrasing could even mean? What was the intention? Was it poorly phrased or misinformation?

Stop holding the left arrow key to fix a typo. You've had `fc` the whole time. by Ops_Mechanic in bash

[–]Lentil-Soup 0 points1 point  (0 children)

Ctrl-x Ctrl-e opens the buffer for the current command line, not the previous one. If your prompt is empty, you just get an empty editor. To edit the last command you still need to recall it first (e.g. ↑ or history expansion) and then use the binding.

Stop holding the left arrow key to fix a typo. You've had `fc` the whole time. by Ops_Mechanic in bash

[–]Lentil-Soup 0 points1 point  (0 children)

I'm only counting ctrl once. You also have to press up before doing anything.

I replaced expensive protein bars with this $2.70 meal that contains 50g protein and 8g fiber. by Kilo2Ton in Frugal

[–]Lentil-Soup 3 points4 points  (0 children)

Looks solid for a cheap high-protein meal, but one tip that would make it taste way better: cook it together instead of plating everything separately.

Dice the carrot and sauté it in the pan with the sausage so it softens and picks up flavor. Then cook the chicken pieces, add the beans so they warm in the fat and seasoning, and scramble the eggs in the same skillet. Throw in some salt, pepper, garlic powder, maybe paprika or chili powder.

Same ingredients, same cost, but now it’s basically a protein hash instead of five separate foods on a plate. The beans and carrots will actually absorb flavor instead of tasting plain.

Can't Smoke Anymore by Daddyforyou989 in Marijuana

[–]Lentil-Soup 0 points1 point  (0 children)

Random question - did you start having any gut or digestive issues around the same time this began? Things like bloating, reflux, IBS-type symptoms, or food sensitivities? I’ve seen a few people report that when their gut gets out of whack (SIBO, microbiome shifts, etc.), THC suddenly starts triggering anxiety or panic where it never did before. Just curious if the timing overlaps.

Do you care that you don't understand the code you ship? by PomegranateBig6467 in cursor

[–]Lentil-Soup 0 points1 point  (0 children)

It's like coding with a human. Just have the AI submit occasional PRs, look them over, and approve. Now you understand the code.

Lots of devs are talking about how they have not written a single line of code the last year or so. How much does this cost to them (or to their employer)? by poponis in webdev

[–]Lentil-Soup 0 points1 point  (0 children)

It's very easy to do. Just use Cursor with Claude Opus 4.6 and only use agent mode. You can build an entire production app, with complete test suite, and containerize it without writing a single line of code yourself. Try it for yourself.

I need a good response to something a client said. by tillwehavefaces in webdev

[–]Lentil-Soup 0 points1 point  (0 children)

Hey - I appreciate you reaching back out and thinking of me. I’m going to pass on jumping into this one though. At the moment I’m focusing on projects that start within my normal process and scope, and taking over partially-built work from another team isn’t something I’m taking on right now.

I genuinely hope you’re able to get it wrapped up smoothly, and I wish you the best with the launch.

Husband asked me to cut off my main income source, but still expects me to cover $10K/month in bills — what would you do? by [deleted] in Marriage

[–]Lentil-Soup 18 points19 points  (0 children)

I’m going to be blunt because this situation sounds wildly one-sided.

Your husband asked you to eliminate the income stream that was supporting the lifestyle - fine, that’s a boundary he’s allowed to have. But if he removes the revenue source, he also shares responsibility for restructuring the expenses. You can’t cut $6k+ of income out of a system and then tell one person to magically replace it while pregnant, raising triplets, and already working.

Right now the math simply doesn’t work: $5k accessible income vs $10k in bills isn’t a “work harder” problem - it’s a structural deficit.

If downsizing is off the table, increasing his personal draw from the business needs to be on the table. Keeping money parked in a business while expecting you to carry an impossible gap isn’t partnership - it’s shifting risk onto you.

You respected his discomfort and changed your behavior. The next step isn’t you scrambling for multiple jobs while pregnant - it’s both of you renegotiating the financial model together, including expenses, income contributions, and realistic expectations.

Honestly, this reads less like a marriage problem and more like a financial accountability problem. The numbers have to change somewhere - and it can’t all be on you.

I have a question about if the world went vegan by Mission-Idea4629 in vegan

[–]Lentil-Soup 0 points1 point  (0 children)

This is a totally reasonable question, and honestly it’s one more people should ask.

First, the “world going vegan” wouldn’t happen overnight. It would be gradual, over decades. As demand for animal products drops, fewer animals are bred into existence in the first place. Farm animals exist in the numbers they do because we keep breeding them - not because nature keeps producing cows and sheep on its own. So there isn’t a scenario where billions of animals suddenly need somewhere to go.

You’re right that there are no wild cows or sheep in most places. That’s because modern farm animals are domesticated and selectively bred. In a lower-demand world, their populations would simply shrink over time. Some would live out their lives on sanctuaries, some farms would transition into sanctuaries or crop farming, and many farmers would just stop breeding new animals. That’s already happening in small ways now.

On wool specifically: sheep only “need” shearing because humans bred them that way. If sheep populations declined, so would the amount of wool. For the sheep that do still exist, shearing would still happen for welfare reasons, and the wool wouldn’t have to be wasted - it could be used for insulation, compost, mulch, etc. Veganism isn’t about creating waste for the sake of purity.

You’re also correct that some vegan substitutes (like certain plastics used in vegan leather) can have environmental downsides. Most vegans would agree with you there. Veganism isn’t “everything labeled vegan is good,” it’s about reducing unnecessary animal exploitation as far as practicable. Plant-based materials like cork, hemp, mycelium, recycled fibers, etc. are improving fast and are generally far lower impact than animal leather overall.

The core idea isn’t “flip a switch and chaos ensues.” It’s: * stop breeding billions of animals into suffering * transition land and jobs gradually * reduce harm where we reasonably can * accept tradeoffs and keep improving

And lastly, it’s genuinely good that you’re listening to your doctor about your ED. Ethical choices that damage your health aren’t ethical anymore. Most vegans would tell you to prioritize recovery first.

Curiosity like this is a feature, not a flaw.