Hacker News new | past | comments | ask | show | jobs | submit login
The Nettle Magic Project: Scanner for decks of cards with bar codes on edges (github.com/nettlep)
439 points by fortran77 on June 29, 2022 | hide | past | favorite | 128 comments



This is a stellar example of a quite rare class of magic trick where the method is actually more amazing than the effect. The vast majority of magic tricks are the opposite. The effect is amazing but the method is actually quite mundane. This is one reason magicians don't reveal "secrets". The reality is most magical methods are rather disappointing compared to the astonishing impact of the effect created.

For any magical effect there are almost always many possible methods and, conversely, for each method there are multiple possible effects. This method provides a way to know the location (or absence) of each card in a shuffled deck without the performer handling the deck. For most of the effects which could be accomplished with this method there exist a wide variety of alternate, much simpler, methods. Using any of those easier and cheaper methods would likely appear identically amazing to audiences. And that's why I love this method. As a technologist and magician, I've always had a special fondness for wildly complex methods - that rare kind of magic where the method actually IS as amazing as the effect.


One of my favorite magic tricks is one I've learnt. You have 31 cards prepared in an order determined by a linear shift register. The audience is allowed to cut the deck as often as they want (thus maintaining cyclic order) after which they draw 5 cards. Simply by asking which audience members hold red cards you can compute which cards they're holding.

I've also performed this trick by combining two decks with different patterns on the back, allowing you to 'divine' their cards without ever asking a question.

See here for details: https://golem.ph.utexas.edu/category/2015/01/mathematics_and...


It's amazing what you can do if you can memorize an (apparently) random order of 52 cards. It's not that hard to do (even for an actual random ordering) and it enables a decent number of tricks.


> The vast majority of magic tricks are the opposite. The effect is amazing but the method is actually quite mundane.

You're probably right about it being the majority, but I'd say a lot of good slight of hand also falls into the category of the method being amazing.

Penn and Teller are also famous for doing tricks with the secret in full view, and they're often more impressive than the trick done normally.


The routines in that case are designed to be entertaining, they don't give away secrets that aren't theirs to begin with, and there's often a double bluff where they purport to give away secrets, but there's still an element they don't disclose, or the supposed secret is just misdirection (e.g. the phone inside fish trick)

A lot of P&T tricks are boring once the secret is revealed. They don't reveal those tricks.


> A lot of P&T tricks are boring once the secret is revealed.

This is the mindset I don't understand. Unless the secret is something the spectator might reasonably consider "cheating" (like, if it turns out that a video production that's ostensibly of a live performance actually used post-production visual effects), I don't see in what sense knowing the secret ruins the trick. Perhaps for some people it might, but as long as the "secret revelation" content is separate from the "trick performance" content, I trust people to identify for themselves which content they want to watch.


All magic tricks are cheating. It's just sometimes the cheat is just something you didn't think of and not a lot more. Sometimes it's a gadget or gimmick; not something that requires a lot of practice.

Of course there's amazing sleight of hand -- you are correct. But a lot of magic is creativity & performance, not necessarily skill. The lines are blurred and that's the fun.


> All magic tricks are cheating. It's just sometimes the cheat is just something you didn't think of and not a lot more.

I think we're using different terminology here. I think there's a pretty big distinction between, for instance, the widely known variants of the sawing a woman in half trick where there are two people in the two halves of the box, and watching a video broadcast of a magic show where it turns out they just used visual effects to accomplish the effect. Perhaps the lines are blurry and different spectators might disagree in some cases, but I think there's a set of explanations that would be considered "cheating" in the negative sense.


Exactly. When the audience needs to observe the trick by proxy, because it's not practical to have everybody touching the object, standing on stage, or being in the TV studio, that proxy must be honest.

If I can't trust that to be the case, I'd only be interested in a trick if I can be the one on stage touching the object. No more global audience for you, cheating magician.


Right. It's the same with audience plants, unless there's also something specifically interesting about the way the audience plant operated. If the magician just picks a stooge from the audience, says "the number you're thinking of is 17," and the stooge says "wow, how did you read my mind?" that is not a remotely legitimate magic trick in my view. Likewise, if you're watching a guerrilla magic television special (e.g. David Blaine: Street Magic) and it turns out it's just a completely staged, fictional production using post-production visual effects, paid actors, etc., then in my view that's not remotely legitimate.


This is why Fool Us is what it is. P&T put magicians on TV but they put themselves in the audience so the TV audience trusts that it isn't just video editing like so many TV magic shows.

But Fool Us does edit out "tells" that you could see by freeze-framing the recording but wouldn't notice in real life.


I'm not sure we are really disagreeing. Being receptive of magic is to enjoy the idea of being "cheated" on, so I'd agree that it's not necessarily rational to feel cheated in the way you were cheated. Whatever the end justifies the means, and so on.

But I think the role of good magic is somewhat to test the boundaries of negative cheating in almost anyone.

For example, you've made it fairly clear you'd think of any visual effects to be negative cheating. But what if I actually do use visual effects, but successfully double down and convince you that it _isn't_, even though you'd normally be technically aware to spot such a thing. Would you enjoy being misdirected like that?

We're far from the original point, but what I think I'm saying is there's a selection/survivorship bias here; a smaller number of great tricks with fascinating explanations and, often, decoy explanations. And the rest is just cheating ;-)


> I'm not sure we are really disagreeing. Being receptive of magic is to enjoy the idea of being "cheated" on, so I'd agree that it's not necessarily rational to feel cheated in the way you were cheated. Whatever the end justifies the means, and so on.

I'm confident that we're disagreeing. Sure, you expect to be deceived at a magic show. But that's a necessary part of magic, not a sufficient one. If you attend a magic show and it's just someone playing acoustic guitar for 2 hours, you'll feel cheated. That's different than thinking the magician's hands were empty when in fact he was palming a card. There are clearly two very distinct senses we're using for the same term "cheated." You can't just sell someone a fake ticket to a magic show then say "tada!"

> For example, you've made it fairly clear you'd think of any visual effects to be negative cheating.

If I'm watching a video production that is ostensibly a live recording of a magic performance, then of course I think post-production visual effects are just straight up cheating, in the same way that I would feel cheated if it just ended up being a video of someone playing acoustic guitar.

> But what if I actually do use visual effects, but successfully double down and convince you that it _isn't_, even though you'd normally be technically aware to spot such a thing. Would you enjoy being misdirected like that?

If I literally can't tell the difference and thus I'm completely deceived, then obviously I can't be upset. But if I later found out, then of course I would be upset. Again, being "misdirected" is necessary but not sufficient.

And at the end of the day, I still enjoy learning how a magic trick is done more than I enjoy just watching magic tricks.


I find the secrets more interesting than the tricks in most instances. I see it as a form of social hacking.


> I find the secrets more interesting than the tricks in most instances. I see it as a form of social hacking.

It depends. I've seen more than one person learning the French Drop fool their own eyes despite performing the trick themselves, feeling the object in their hand, and knowing exactly how it works.

Our brains are interesting, and the degree of surprise we can get from cognitive dissonance or mismatched perceptions is hilarious.

IMO, most of the secrets are boring. But the overall performance that makes it work is fun.


> a lot of good slight of hand also falls into the category of the method being amazing.

That's true but when slight of hand is amazing it's usually amazing in a different way than the OP's method. At the highest conceptual level, the "secret method" of most sleight of hand can be boiled down to "You hid something in your hand." At least to other magicians, uniquely good sleight of hand is amazing due to the insane level of skill and years of rigorous practice required to "hide something in your hand" in a way that appears impossible.

While developing the OP's method did require amazing effort and serious engineering skill, someone else could then perform with that method without the same unique level of technical skill.


> At the highest conceptual level, the "secret method" of most sleight of hand can be boiled down to "You hid something in your hand."

I'm not sure if I agree with that. There are certainly some clever and skillful methods for how an item is literally stored and retrieved, but what's more interesting and impressive to me is the overall choreography. The way all the moves are sequenced and how one move provides misdirection for another move is where the magic happens.


> what's more interesting and impressive to me is the overall choreography.

Yes, I agree. You've described appreciating a magical performance like a magician would appreciate the work of another magician. The general public usually focuses on what they perceive as the "trick" part of creating the illusion (such as an object hidden in the hand they are unaware of). Advanced magical skill involves understanding and then perfecting the often subtle surrounding elements that make the effect so deceptive.

In the past I've taught sleight of hand magic to relatively novice students and in the beginning they are always puzzled that even when they've learned "the move", a spectator will often just say "it's in your other hand." Yet when I perform the exact same move to similar spectators it never even occurs to anyone that something might be in the other hand. The difference is a dozen subtle things from where my eyes are looking, to the position of my body, to the pacing of my speech. I had to learn these techniques from my mentors and then rigorously practice them until perfected. In a lot of sleight of hand magic, any "move" by itself is not all that deceptive. The context and choreography around the move are what elevate the performance to what seems like real magic.


I too have a passion for complex magic tricks. And while what you say may be true for tricks which rely on gimmicks, with sleight of hand, the opposite is often true. I was a stage illusionist in a 'former life', and started practicing sleight of hand at age 6. The thing that kept me interested is that the methods of producing the effect were almost always far more interesting than the effect they produce.

In my own art, I focused on vintage effects that were complex. I recreated dozens of effects from Dunninger's book, and relied on technological principles from that era - lots of clockwork and curious mechanisms. I could have produced the same effect in much easier ways, but what would be the fun in that?

Many methods require inconceivable practice to master. One example is an obscure method of the "front to back palm" with a coin, which thereafter goes back to front - the most complex sleight of hand I worked on, which produces a completely mundane effect (showing the hands empty). In my experience, if you see someone doing sleight of hand - making cards, balls, coins, cigarettes appear and disappear - watching how they do it is much more interesting than watching the effect!


I too had Dunninger's book when I was a kid. You may already know this but it was subsequently shown by magic historians that Dunninger actually never used some of the methods described in the book and never even performed some of the effects shown by any method. He just made some of the effects up along with their supposed methods to have more fodder to fill the book. It's a pretty fascinating story and perhaps his 'best' trick.


Penn likes to say that a lot of magic boils down to no one really believing anyone is going to spend the time and resources to do the obvious thing. Magicians are people who are willing to spend the time and resources to do the obvious thing.

Like people who seem to swallow things and then reproduce them later. The easiest method to do that is to swallow the thing and then regurgitate it. And you can train yourself to do this. But it takes time and effort. And is a little gross and if you're working with live animals, you are also on a time limit.


My favorite example he gave: Buy 52 decks of cards. Put all the 7s of diamonds together in one deck. Let your audience member pick a card. It's the 7 of diamonds.


> This is a stellar example of a quite rare class of magic trick where the method is actually more amazing than the effect. The vast majority of magic tricks are the opposite.

I don't know much about magic, but I've always felt that the method is almost always more amazing than the effect. I am vastly more interested in the methods, skills, and preparation that goes into a trick than I am in just watching a final performance.


That’s fine. I think the next step is to also appreciate the live performative element and to perhaps integrate it all into your own routine.

If not, recognize that people with other hobbies would rather appreciate a performance and then study what interests them with the remaining time.


I like this one a lot as it is amazing on both method + effect.

Effect: https://www.youtube.com/watch?v=SCFXV6o7cro

I won't reveal the method but here it is in Penn's words (from 1:20): https://www.youtube.com/watch?v=MuKail7Jwwg


Penn (of Penn and Teller) says that there are two kinds of magic tricks. Ones that are so unbelievably easy you cannot imagine the method, and the ones that involve so much work you cannot imagine the method. One time, he saw a magician perform a trick and guessed he had been in prison, because the amount of work it takes to prep it is so long there's no way anyone else would have the time.


and Teller says that the secret to a good trick is to put in more effort than the audience thinks any same person would. The Prestige has tricks like this (some totally fictional, some based on real magicians).


The method is interesting, but magic entertains because of the performance/mystery. If you use this tool without providing any of that, it's boring, and people will probably assume you're some form of camera/tool/cheat/hidden helpers and leave unimpressed.


> a quite rare class of magic trick where the method is actually more amazing than the effect

I once heard this described as when you hear the method of a trick, a great trick is one where you go "Ah!" with amazement instead of "Oh", disappointed.


Nice analysis! As James Randi said of Uri Geller “[he] may have psychic powers by means of which he can bend spoons; if so, he appears to be doing it the hard way.”


This tech could be a game changer for accessibility. Many card games are not or cannot be adapted to braille, so I haven't been able to play them with friends. If cards can be sold with invisible ink in an open format, then I would need only a scanner and a earphone to be able to check my cards without other help.

I've thought of doing with with QR codes, but I'm not sure if it will look okay for the other players and if the qr codes won't be recognizable enough by a human to give someone unfair advantage in some situations.


Duplicate bridge cards are often printed with barcodes on the card faces, to facilitate automated dealing machines with computerised hand records. I've never seen a system which reads the barcodes for a blind player, but I'm sure it's possible. (The traditional approach is with a human 'card turner' assisting, which sucks for all kinds of reasons). Or even just reading the standard face images: it's a much easier problem than reading codes on the edges, and has the advantage of not making it easier to cheat!


Normal cards are a solved issue. You can print two braille symbols on each and it is done. Imagine though something like cards against humanity for example, where the text on the card would take ten times the space in braille. In different games images and details could have different meaning and simple ocr would be the wrong solution.


That makes sense!

If the QR codes or whatever are on the faces and only encode information already printed there (suit+rank for standard cards, the title and text for board games) I can't imagine there would be any cheating/unauthorised information problems.


Yep, this is the main idea at the moment. Currently looking for a game that needs the solution and is interesting for my social circle.


Dominion might be a good one.


Combined with a system like [0] on a head-mounted device with earbuds, it could make many card games accessible to blind and partially sighted people! No idea if this prototype was ever put into production though.

[0] https://www.youtube.com/watch?v=C0biAdmuons


Another option is an image recognition system trained on already existing cards. No need for special ink or qr code, just a camera as the reader.


Just OCR against the card-corners may be sufficient.

I guess you also need suits, but that's only four special characters (all of which may be in more-modern OCR-libraries).


As I said in another comment, normal cards are easy. The issue is with everything else where each card might have a picture with different animals and you are looking for the lama giving you the bird.


I think it is very doable for card games with thousands of different cards like MTG. I remember there was an old school SIFT/SURF image retrieval system that was able to deal with tens of thousands of album covers super fast. That was more than 10 years ago IIRC.


If the manufacturer is willing to provide the entire db of cards or a well-trained model that could be embedded or a ready mobile app, that would be great. However, waiting on them is not a winning strategy. The other option is community contributions, but you need a large community. This will be welcomed as well, but again not something that should be relied on. Both developments would be wonderful to happen, however in the meantime I'm looking for something cheap, fast, and easy to implement that I can do on my own in the local scope of my deck.


For some of the card games I am familiar with (Netrunner, MTG) there are resources online (wikis, dbs, deck builders) that have all the graphic assets. Alternatively, you can scan or photograph each card in your deck, but that may be time consuming.

As for software, there are engines out there that do content-based image retrieval (CBIR) out of the box [1]. It should be possible to build something quickly in OpenCV. You may be able to get away using simple image template matching by putting a few constraints on how the camera sees each card. Something more robust can be also be build using image descriptors and approximate nearest neighbors, as in [2].

[1] https://en.wikipedia.org/wiki/List_of_CBIR_engines

[2] https://blog.francium.tech/feature-detection-and-matching-wi...


There is already tech like this for TV poker games. RFID chips in the cards I think, and sensors in the table. There was a huge scandal a couple of years back about a player who had access to the info while playing. Google Mike Postle...


This is how a poker TV table actually work now. Each card has an HF RFID tag, each position has one antenna where players must put card when not seeing them. In addition there is another antenna in the middle of the table to read the common cards. In the past mini cameras were used for each position in combination with OCR to decode the cards. This sort of tables require collaboration from the players and from the dealer to obtain something useful to show on TV. They are instructed before the game.


This looks like an open source implementation of "Cheating at poker James Bond Style - Defcon 24 (2016)" https://www.youtube.com/watch?v=bRgCvCTG_XQ

Very neat. In the video, the illicit cheating device was hidden in a phone. It is theorized that these magic trick could be used in private poker houses to cheat players.


This is what I thought of as well.


This is amazing! This tech unlocks some impossible card effects (ex: "shuffle the deck, pick your favorite card from it, hand the deck back to me, your card is the Ace of Diamonds").

While reading through this repo I was reminded of a project I'd heard Randy Pitchford, the CEO of Gearbox Software (creators of the Borderlands franchise) talk about wanting to make after one of the magic shows he hosted at his house in Frisco, Texas.

Randy is a huge fan of magic. He's the great nephew of Cardini and notably recently purchased the Magic Castle[1].

Lo and behold, the primary contributor to this project—Paul Nettle—is an employee at Gearbox Software[2]. What a small world! I'm so happy they've made this open source.

1. https://www.lamag.com/culturefiles/the-former-magician-who-n...

2. https://github.com/nettlep


That's interesting background for having Pen and Teller in the Borderlands 3 [0], and also for the passing resemblance between the Calypso twins and the Ehrlich brothers...

[0]: https://borderlands.fandom.com/wiki/Pain_and_Terror?file=Pai...


When I was a kid, my dad had my brothers and me pick a card from a deck without showing it to him then reinsert it into the deck. He then threw the deck into the air scattering the cards on the floor and then picked our card up from the floor.

The secret? Amazing dumb luck.



Yes, he was as amazed as we were when the right card came out and has (a) never replicated the trick and (2) always said it was dumb luck.

Of course, this could be a long-game illusion like the old Chinese magician or the twins in The Prestige.


I don’t know your dad of course but that meta joke would have been right up my dad’s alley.


> impossible card effects (ex: "shuffle the deck, pick your favorite card from it, hand the deck back to me, your card is the Ace of Diamonds")

There is one deceivingly simple trick that is essentially just that.


There's more than one that I can think of, and the best I've ever done is the "imaginary deck" one.

Setup: shuffle an imaginary deck, fan the imaginary deck, tell someone to pick an imaginary card and remember it, shuffle it back into the imaginary deck and put the deck in your pocket.

Remove a deck from your pocket, ask what the card was, fan the deck out, and - it's the only upside down card in the deck!?


This is one where if you have the time and effort to dedicate to it, can be simple. You memorize your deck, so when they tell you the card, you thumb to it and flip it so when you fan it, the card they picked is upside down.


The "Invisible Deck" is a very famous trick. It can be purchased[1] for about $10 and just about anyone can master it in about 10 minutes. With the standard method, you don't need to memorize the deck or flip the card.

[1] https://www.amazon.com/U-S-PLAYING-CARD-COMPANY-SG_B002MI1B3...


What did you buy today honey?

A box of invisible cards.


This is not how invisible deck is done though. It takes a gimmicked deck, no memorization, and not too much skill.


That's close to how the version I know worked, but it was a step or two from that (and a bit simpler).


A magician I know talks about the three kinds of magic: sleight of hand, mechanical, and mathematical. The first requires a lot of skill and practice (e.g., palming coins, manipulating cards). The second requires a lot of preparation and engineering (e.g., sawing a person in half, floating person illusions). The third relies on the nature of reality (e.g., dividing sets of cards in a known pattern that forces a result, or manipulating numbers that force an unexpected result).

So this is a cool example of the second type. All three types require some showmanship, and good patter. Some of the best tricks combine the types.


Mathematical are often the "easiest" to learn, though they can be the hardest to "sell" when performing, because you have to play ups the magic and downplay the math (often forcing the "numbers" used is a great way to mask it.

Mechanical involves some training and skill to exercise well.

But above all I put the sleight of hand as the hardest to execute but the best when done well, especially added as flourish on top of the others.


The tangent to this is done with invisible ink.

https://www.markedcardsshop.com/collections/poker-analyzer

There is a corresponding custom phone that has a hidden camera on the side (facing the deck) that then communicates with some haptic feedback that the cheater is wearing.


Here's an article from 2017 talking about this class of devices:

https://elie.net/blog/security/fuller-house-exposing-high-en...


Wow, what a next level magic trick enabler. Just me that get the feeling that I am reading a documentation that could be under NDA in a billion dollar magic trick company?

https://nettlep.github.io/magic/


I read things like this, and I am reminded of how mediocre my own intelligence and skill as a developer is.

Still, compared to other possibilities, you take what you can get.


Barcodes are an underapprecated technology for amateur projects in general. The technology is error-resistant, mature and reliable in a hardware sense, cheap at the entry level and cheap to deploy at scale, etc. I got a surplus commercial Zebra/Symbol 2D/3D barcode scanner gun with dock (or it also talks bluetooth, USB, or naturally RS232) for $35 and a new OEM battery was $15, and tbh you could just have used a smartphone with an app instead if I didn't want the speed and reliability of the scanner gun. Barcodes are the cost of a sheet of printer paper and some tape (or sticker paper if you want to be fancy!) and are an extremely accessible and tactile way to operate all kinds of systems (a barcode doesn't have to be a "thing", it can represent an "action" too) via a control server, same as via an app. Pressing a button in an app is way slower and more cumbersome than scanning a barcode on the wall that says "advance belt to next item", a scanner gun is an enormously fast and tactile UX, and RS-232 and other low-level interfaces make it easy to tie into other stuff. It's a fantastic project tool that is really underexploited compared to "everything is ESP32 on the network".

The bar-code and shipping container are probably some of the greatest inventions of the 20th century, and unlike a shipping container it's completely appropriate and accessible to individuals for messing around with projects.

(no, your shipping container home is not actually a good idea)


Building your own "barcode" reader with anything like a camera is surprisingly easy - you don't need much at all to get it to work.


I've never thought about how it works on a technical level, but my guess is you just draw a random line across the image field and the widths of the barcode encoding characters are designed such that the dot-dash pattern produces distinct beat frequencies as the laser traverses. Your "software" is basically a FFT transform and then you look for your target pattern within your designed beat frequency range, so as long as the beam will randomly cross the barcode a reasonable amount the signal will pop out of the noise, and it's completely irrelevant which direction you go (although you do need to go along it not across it - hence it being wide and not square). Yeah it's not zero computational power but by the 70s you can bring a shitty fixed-function FFT chip to market for cheap enough, with the CMOS revolution and all.

People underestimate how much can be done with spectrographic watermarks like that, they're resistant to scaling (because harmonics), rotation and flipping (because it's not about any one position... it's about the beat frequencies between them), translation (of course), etc. That's iirc how the Eurion Constellation works - the patterns form a spectrographic fingerprint, but in 2D instead of just a 1D beat frequency. But it pops right out of a fft so you can put it into random copiers and printers.

I went to look up a source to describe the Eurion Constellation scheme (I'm not sure if an academic description exists given the commercial and sensitive nature?) and they brought up the practice of microprinting (of the super fine lines) and that probably is detectable with FFT and edge detection.

https://murdoch.is/projects/currency/

I wonder if phase (of micro-printed regions) would also work similarly to how frequency fingerprinting does?


How do QR codes compare for reliability and versatility?


QR codes are much less resilient to interference. Barcodes can be easily read on flexible material and handle glare and obstructions quite well. QR codes need to remain flat and are very error prone if even a small bit of the pattern is blocked.


> are very error prone if even a small bit of the pattern is blocked.

IIRC, that's a matter of personal tolerance because the degree of error correction can be arbitrarily adjusted.


As far as I know, that really only helps wit the "bulk data" in the middle. If one of the corners or borders is obstructed, you're screwed.


Very cool project! I’m curious how the magician would typically use this, would the scanner and an output monitor be hidden somewhere on stage or similar?


Not a magician, just watch tricks occasionally and enjoy thinking about how they're made.

I wouldn't necessarily expect the monitor to be visual as card tricks usually just need knowledge of a couple of cards. This could be communicated through sound (e.g. discrete earpiece or bone conduction headphones) or even haptics (e.g. Morse code vibrations from a phone in a pocket).

As for the scanner, it'll depend on the trick, the goal is just to hide a camera. It could be concealed in a prop or an item of clothing. The scanning could even be incorporated into the trick, for example by sealing the cards immediately in a "safe".


I would think it would mostly be for practice and rehearsal, to see if you've gone wrong before you reach the end of the trick.


I could see someone using this on stage in Penn & Teller's Fool Us. The camera hidden in the table, on the table an elaborate box that never comes into contact with the cards, is used as some elaborate red herring (maybe you have to knock on it, or draw something from it), but really serves to hide a small screen.

Now you only have to come up with some impressive card trick that seems impossible to pull off with conventional methods.

Of course you could also come up with a better method to communicate the information than an ipad screen. Maybe a tactile signal.


The impressive card trick could would be the greatest of all time:

Have an audience member shuffle the deck to their hearts content, then place it on a table. Tell them what the top card is, then ask them to flip it to verify. Then proceed to do the same to _the entire deck_


that would be a trade secret and as a magician I won't disclose in the open forum.


Nice to see this open sourced as devices like this have existed underground since it can be used for card cheating/stacking as well.


I was thinking the same thing, I think there is a greater potential for these cards to be used for cheating rather than for magic.

Related, is there a way for casino operators to assure their guests that the cards are not marked? I am thinking something similar in spirit to the transparent dice that show they are not loaded, but cards would require something different.


"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke


I've wanted to build something pretty distantly adjacent to this for real-world spaced repetition cards. Have a deck of 3x5 cards, with qr codes at one corner. Dump the deck into your scanner (like a money counter) and it splits the deck, giving you a pile of the cards you should review today. Then you switch the scanner into "trying to remember" mode, and you put the cards you successfully recalled into one slot, and the ones you failed into another. The scanner reads their QR codes, notes that you succeeded/failed, so it can updated spacing windows for the next run.


Super cool project and amazing documentation! It's well worth a read.


In the article, I didn't see any information about what ink (and what printer type) can be used for this... any clue where such IR-visible inks can be found?

EDIT: Actually, found it in the full "manual"! https://nettlep.github.io/magic/ -- it's not a printer but rather a stamp... :-)


> most magical methods are rather disappointing compared to the astonishing impact of the effect created.

I have taught a lot of people to do a simple French drop as an intro to magic. People are often a little disappointed at the realization that making a coin "disappear" is really just hiding it in your other hand.


Someone mentioned Penn & Teller's "Fool Us" show. You won't learn any trade secrets, but you'll sure discover that they know them.

A magician does a trick, then they come up and whisper to him what they think he or she did. You don't get to listen in on that.

If they can't figure out the trick, then the magician gets to be the opening act for them at some show. Occasionally someone does fool them. Not often, though.


Amateur magician here. On more than one occasion I've felt that P&T have thrown the game and pretended to be fooled when the method was obvious to me, and therefore almost certainly obvious to them.

This is one example:

https://www.youtube.com/watch?v=ufpoQmsvJEg


If they can’t see when the sleight of hand occurs or when a swap happens then they might have an idea of how to perform the trick but not exactly sure when the person performed it. That’s them being fooled.

I’ve watched many of the acts on YouTube and you can slow them down to see when it occured.

There’s one with a ring where he appears to move the ring from finger to finger. Then at the very end he appears to pull the ring off his finger. When you slow it down you can see his finger bend down at a very unnatural position that is borderline dislocated. But he then hands the ring over. Now we know he’s using a retractable ring. But he swapped it prior to the end of the act so it appears that he used a solid ring the whole time. P&T don’t know when he swapped it. Slowing it down you can see when he pockets it tho.


So in that one, with the hand motions and the emphasis on "thread" and "well lit" and the motion across (where the Christmas lights connected the two lamps) they were implying that a thread was hanging from the Christmas lights. But since he said he "tried that" and he had to come up with something else, I assume it's some sort of front facing edifice that allowed him to circle the whole thing with a pencil (at about 85% depth) to sell it. Maybe he technically fooled them since the Christmas lights had nothing to do with it and it was something between the two lamp arms themselves.


I'm not going to tell you because that would be breaking the magicians code. But I will tell you this: there is a general principle of magic that the details matter. If there's something that gets your attention, like the Christmas lights, it's almost certainly there for a reason.


I'm sure they had other methods in mind - the general format of the show is they have to pick which they think was used and if wrong then it's a "fool".


Good to know.

Las Vegas: Why do you think they call it "Lost Wages"?


Because the expected return on a dollar is less than a dollar, but the variance is high. Nothing to do with any magician's sleight-of-hand.


True about gambling in general, but OP's comment was that the "game" itself was dishonest, according to its own rules.


Part of the fun with that show is that Penn speaks out loud and slips in key words the performer will understand, they don't often move on to whispering.


Can someone explain the “stamp” method for printing the code on the cards? The stamp images shown on the website seems to be stretched and I can’t figure out whats going on.


why can't you use just a diagonal line? That's what we used to do when I was a kid (to see if a deck was shuffled or sorted)


That would work well if the camera had sufficient resolution and the cards were stacked nicely. It looks like this can still read the cards when they are stacked unevenly since each card has a unique marking and a common marking to compare against. There are more bits than necessary in the barcode so it can contain error correction in the code. Trying to decode 1 of 54 possible spots for the mark to be in is going to be harder than seeing which of 13 possible spots are marked with the added benefit of only needing to get at least 10 to 12 of them right.


Yeah I’ve tried that method but with the camera resolution I had it was practically impossible to decode.


Sheldon Cooper's magic trick


Definitively cooler, though much less funny, than Leonard's psychological trick!


Very cool, feel as though a form of this would be in an Ocean's 11 type heist.


Anyone else notice the barcode encodes 14 bits but you really only need 6?


Error correction and redundancy to make it work with weird lighting, obscured line-of-sight to portions of a card, shadow from the card on top obscuring part of the edge of the card under it, and general error correction to handle reading such a thin strip with a pretty poor camera?


“Any sufficiently advanced technology is indistinguishable from magic.”


It's like a modern day Nintendo eReader for magicians! Neat.


Can we have the barcode printed in invisible ink that’s only visible to the raspberry pi?


It's almost like you didn't read the article.

https://nettlep.github.io/magic/#marking/irabsorbinginks/use...


Woah woah woah, you can't just say that! this is HN, we have rules about pointing out when people obviously didn't read the article, it makes them feel bad!


That's not a rule, it's a guideline.

Rules don't start with "please":

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."


I did actually. Must have missed that part.


Personally if I found out a magician was using this it would completely destroy my appreciation of the magic.


"Never show anyone. They'll beg you and they'll flatter you for the secret, but as soon as you give it up, you'll be nothing to them."

-Alfred Borden, The Prestige


Ah, I see you've been watching closely.


Marked cards and other such systems have been common for decades, if not centuries; this is a variation on it.

Many tricks are more than slight-of-hand, they often are "technical" and involve special decks that are modified in certain ways; you can even buy equipment to reseal decks and rewrap them in plastic so they appear brand-new.


It's it pretty common that learning the secret of any trick has a chance to destroy the appreciation of the execution?


Eh. I’ve learned a few card tricks and the mechanic often makes me appreciate the trick more… differently, but more. This would fall into “cheating” for me.


If you found out a magician was using this they aren't a very good magician.


If I encountered a magician who could read a barcode like this in their head I'd really be amazed!


To me the really fascinating magic tricks are the ones that use the basics like sleight of hands and misdirection to build a proper story and presentation, this is just blatant cheating, it's fascinating to know how it's done but it probably won't be part of your favorite magician's routine.

And about those tricks, I recently played the demo of a game called "Card Shark" and it does a really nice job of incorporating the more cheating-style tricks into a compelling narrative.


Aren't all magic tricks "cheating" in the end? Otherwise they would be real magic ;-)


I appreciate the feeling. Finding out how a trick is done quite literally takes away the magic.

But pretty much all magic tricks are like this. From the very simple to the extremely complex. The mechanics of a trick are only a small part of it. The story, presentation, emotional content and humour of a performance are even more important.

It's the difference between ballet and a high-jump. Both are physically impressive feats, but one is so much more than that.


Everything you listed is cool, this mechanic is cheating.

Learning about other mechanics is fascinating, learning about this one would disappointing.


There is no silver bullet when it comes to protecting against ransomware. A ransomware attack A prime example of this was the WannaCry virus attack in May 2017, where 200,000+ computers worldwide were infected due to a weakness in Windows SMB EnternalBlue, which allowed hackers to hijack computers running on an unpatched Microsoft Windows operating system. Users were asked to pay anywhere from 300-700 bitcoins to decrypt the data in 3 days.

https://www.spiceworks.com/it-security/cyber-risk-management...


Why does this comment read like someone asked an AI what the solution to ransomware was?


Because it’s some kind of weird bot.


I think you may be in the wrong thread?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: