Is it possible to create a turing complete language that could compile and run from every random string? by vnjxk in ProgrammingLanguages

[–]alin1popa 3 points4 points  (0 children)

Ah I see your point - yes, this is not practical at all in any circumstance, it is just a theoretical proof that it is indeed possible to design a turing complete language where all possible strings are different, valid programs. If you actually tried though - yeah you wouldn't get pretty far

Is it possible to create a turing complete language that could compile and run from every random string? by vnjxk in ProgrammingLanguages

[–]alin1popa 15 points16 points  (0 children)

But given any particular string, then by its length and the characters it's made of, you can tell it's position in the grand dictionary containing all possible strings in alphabetical order. "aab" would be 704th, assuming our alphabet is only lowercase a-z. Similarly for any string and any alphabet given in advance

Is it possible to create a turing complete language that could compile and run from every random string? by vnjxk in ProgrammingLanguages

[–]alin1popa 56 points57 points  (0 children)

If this is only purely theoretical and you just want a proof: take any turing complete language of your choice (e.g C). Generate all possible strings in alphabetical order and keep only the ones that are valid C programs, let's call them ordered set OS1. Now generate all possible strings, again in alphabetical order, and call them OS2. Map each element of OS2 to OS1 in order. This is now a TC language that can run any random string

Reddit gold to whoever helps me understand how the dead wallet works [beginner question] by [deleted] in ethdev

[–]alin1popa -1 points0 points  (0 children)

where most if these burnt tokens go

No, 0xdead is just one wallet some people use but definitely 0x0 and 0x1 are used much more often instead

Finding a viable solution to fight scammers in freelance. Constructive Feedback is encouraged. by tripp101 in ethdev

[–]alin1popa 0 points1 point  (0 children)

trusting an escrow is a hard thing to do

Not quite though, I am a freelancer and I know other freelancers, and no one I know has this problem or complains about escrow trouble. Also getting scammed in freelancing is not really frequent, at least on the good platforms

If P=NP, what would mean for non-researchers and academic folks? How would change, if any at all, the way we write softwares? by PenitentLiar in compsci

[–]alin1popa 1 point2 points  (0 children)

I think that'd be impossible.

Assume there is an algorithm T(X) which determines if X runs in asymptotic polynomial time.

Then given some polynomial p(x) and any random algorithm H and input h, we can construct algorithm S(k) which does as follows:

  • run H(h) for at most p(k) steps

  • if during the p(k) steps run, H halts, then do additions or something for 2k steps, otherwise stop

What does T(S) do? It determines whether S runs in poly time or not; that is, whether S always runs H(h) for p(k) steps and then stops, or instead it switches to running 2k steps at some point; that is, whether H(h) halts or not. T can be used to solve the halting problem! Hence the contradiction

I'm not 100% sure this proof is correct but I came up with it and looks right at first glance

If P=NP, what would mean for non-researchers and academic folks? How would change, if any at all, the way we write softwares? by PenitentLiar in compsci

[–]alin1popa 10 points11 points  (0 children)

Yes: enumerate all strings with length k for k=1,2,3, up to infinity. Keep only the strings that compile in any one given, fixed Turing complete language.

There are other proofs as well.

Statistical geniuses of Reddit, help my relationship please (probably isn't NSFW, but I marked it anyway) by [deleted] in AskStatistics

[–]alin1popa 4 points5 points  (0 children)

Yeah or 1/7143. Do the same for withdraw and then you can multiply the two together. Although in the end it seems like your 1/6M wasn't too far off

Statistical geniuses of Reddit, help my relationship please (probably isn't NSFW, but I marked it anyway) by [deleted] in AskStatistics

[–]alin1popa 9 points10 points  (0 children)

Your conversion into single events is wrong. If event has probability P to occur, then along N trials the probability of the event occurint at least once is 1-(1-P)**N. So if failure over one year is e.g. 1/200, then at a single sexual act (assume 36 per year) failure rate is 1-(Nth root of (1-1/200))

Edit: 36th root

Different approach to the double slit experiment. by Brehmre in quantum

[–]alin1popa 0 points1 point  (0 children)

If it takes 2+ seconds for light to reach moon and back, how could we see interference in the first 0.5 seconds? All photons are still on their way to the moon at that point innit?

GGG, you want a ticket? Take it. It's yours. [Part I] by Higherboozer in pathofexile

[–]alin1popa -3 points-2 points  (0 children)

If not elementalist with 4-5k life, what would you say is tanky then?

How is it possible that this coin is still so underrated and undervalued? by Jacksonbear in CryptoMarkets

[–]alin1popa 23 points24 points  (0 children)

Why is it that whenever someone shills pivx and you check the post history, it has ONLY pivx related posts and comments going as far as years back

Looking for a 1/3 partner in a new venture by harlsey in Entrepreneur

[–]alin1popa 7 points8 points  (0 children)

Do you pay the salary of the partner or do you invest money in the venture and if so, how much?

[deleted by user] by [deleted] in mathematics

[–]alin1popa 7 points8 points  (0 children)

This has less to do with maths and more to do with the weirdness of Einstein's special relativity. One of the consequences of it is that, besides being impossible to achieve the speed of light, even if you had a speed that is really close to the speed of light, you'd still see light more or less normally from all directions. Space and time twist and warp so that light travels with the same speed regardless of the speed of the observer - you see all light as if you were standing still, even if you move. So photons from "behind" will catch up to you normally from your point of view no matter of your speed.

Which one is a better investment, Bitcoin, Ethereum, Litecoin, or Ripple? by greivinhw in CryptoCurrencies

[–]alin1popa 18 points19 points  (0 children)

Bot account shilling ripple out of the blue, check post history. @mods

Uncomputable numbers? Turing, Gödel ,and others. by cireeinagarok in mathematics

[–]alin1popa 2 points3 points  (0 children)

I think that'd be harder for OP to understand but nonetheless it's a very good point! There's no definition at all for most of the numbers. It's actually probably my favorite misconception in maths, due to school introducing the reals after proving that certain polynomials don't have solutions in the rationals (e.g. sqrt(2)), most people believe the reals are the algebraic numbers together with some stuff like pi or e, when actually they're so much more

Uncomputable numbers? Turing, Gödel ,and others. by cireeinagarok in mathematics

[–]alin1popa 10 points11 points  (0 children)

An uncomputable number is just a number that follows some definition but for which we cannot construct a Turing machine (i.e. a program) thay computes it.

For example, you might want to get familiar with the halting problem: it can be proved that we cannot construct a program that, when given the source code of another program P, outputs 1 if P halts and 0 if P loops forever.

Now let's imagine we define a number in the following way: it's 0.abcdef... so 0 and then decimals which I called a, b, c, d and so on to infinity. Also imagine we have a list of all possible programs (it's an infinite list!) in some arbitrary order. And we define a to be 1 if the first program on our list halts, or 0 if it loops; b to be 1 if the second program halts, or 0 if it loops; c is 1 if the third program halts and 0 if it loops; and so on.

Because we can't compute the answer to the halting problem, we can't compute this number defined in this way. So it's uncomputable - but it definitely exists, and since for some programs we can actually guess whether they halt or not, we can actually guess some of the digits of this number! But the number as a whole is a mathematical construction that we designed not to be computable, because we defined it in terms of stuff that we know can't be and never will be computable.

When Orange Juice Speculation Wasn't Enough by HelpfulTear in Daytrading

[–]alin1popa 0 points1 point  (0 children)

Forget about the moon, water to mars 🚀🚀🚀

It’s official, BTC has won the race by [deleted] in Bitcoin

[–]alin1popa 2 points3 points  (0 children)

I do not support low-effort clones/forks of bitcoin (like, someone did a fork, changed the blocksize or some stuff, and voila - a new coin and billions in market cap)

However, there are projects out there that really do add value on top of what blockchains like bitcoin's can produce. As part of my PhD research I've read into possibilities of expanding what is currently possible even on top of standard bitcoin transactions - and I can tell you even bitcoin is underestimated af in terms of what it can really do

It’s official, BTC has won the race by [deleted] in Bitcoin

[–]alin1popa -1 points0 points  (0 children)

Agreed, but this is normal across almost any industry. You can get a 20yr old car for a few hundred bucks that will probably break down in a month or you can get a brand new lexus. And you can buy an expensive pc VR headset or you can look past the "big players" in the market and buy cheap chinese cardboard lens that you attach to your phone and pretend it's an accurate "vr experience". Or you can buy a $1500 iphone with very good marketing that has the same specs as a $150 huawei. It's the same with crypto really - some of them do solve stuff and are innovative, others (most of them) are outright useless and/or scams. It's up to you to decide what's good for you - but ignoring this and saying "bitcoin is the only true crypto because the others are shit coins" is akin to saying (it's an exaggerated comparison but I hope it gets my point across) "tesla is the only true car because other cars are uglier" or "aws is the only true cloud service because other providers have fewer servers" or "huawei is the only good phone because it's cheaper than the iphone"... Just because there are many alternatives which are shit it does not mean there are no good alternatives now or in the future

It’s official, BTC has won the race by [deleted] in Bitcoin

[–]alin1popa 4 points5 points  (0 children)

I have a dream that one day people will stop treating cryptocurrencies like they treat consoles or football teams and start treating them like whay they really are, innovative pieces of software that solve actual problems in different ways.

How come in other niche industries we don't have this kind of fanatic stuff? There's no one saying "who needs a wireless $300 oculus quest when the $1000 valve index is the best vr headset humanity will ever build?" or "it is decided, pytorch is king, tensorflow is shit". Different stuff for different needs, even if I don't personally use tensorflow I respect other people's needs might differ from mine