Discuss Scratch

krett12
Scratcher
100+ posts

[ALC] String Alchemist

so on scratch, i saw this illuminati confirmed project. but it seemed to have a lot of random parameters, and made things unnessessarily long, something like this.

eye rhymes with pie
pie is food
and chicken is also food
you can get chicken at kfc
kfc has 3 letters
3 sides on triangle

when eye automatically means illuminati. so i am issuing a challenge.

whichever program (you may use any language except scratch) can get from any string to illuminati in the least steps wins.

its a dumb challenge but harder than you might think

edit: new rule, you are not allowed to use “you know what else is a blank”?

Last edited by krett12 (Jan. 22, 2017 04:16:26)


No signature currently stored in profile.
The_Grits
Scratcher
1000+ posts

[ALC] String Alchemist

krett12 wrote:

so on scratch, i saw this illuminati confirmed project. but it seemed to have a lot of random parameters, and made things unnessessarily long, something like this.

eye rhymes with pie
pie is food
and chicken is also food
you can get chicken at kfc
kfc has 3 letters
3 sides on triangle

when eye automatically means illuminati. so i am issuing a challenge.

whichever program (you may use any language except scratch) can get from any string to illuminati in the least steps wins.

its a dumb challenge but harder than you might think
I have an idea, but I need to know what's the max length of the string?


gdpr533f604550b2f20900645890
Scratcher
1000+ posts

[ALC] String Alchemist

Ihaveexpectations wrote:

done

krett12 wrote:

(you may use any language except scratch)
krett12
Scratcher
100+ posts

[ALC] String Alchemist

^^

edit: but I will still look at it for fun

Last edited by krett12 (Jan. 22, 2017 04:14:59)


No signature currently stored in profile.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

The_Grits wrote:

krett12 wrote:

so on scratch, i saw this illuminati confirmed project. but it seemed to have a lot of random parameters, and made things unnessessarily long, something like this.

eye rhymes with pie
pie is food
and chicken is also food
you can get chicken at kfc
kfc has 3 letters
3 sides on triangle

when eye automatically means illuminati. so i am issuing a challenge.

whichever program (you may use any language except scratch) can get from any string to illuminati in the least steps wins.

its a dumb challenge but harder than you might think
I have an idea, but I need to know what's the max length of the string?
it could be anything, but i will not do something cruel like 200 chars.

No signature currently stored in profile.
The_Grits
Scratcher
1000+ posts

[ALC] String Alchemist

So basically just get to triangle somehow or do you need to have ‘3 sides makes a triangle’ as the final sentence?


The_Grits
Scratcher
1000+ posts

[ALC] String Alchemist

Not sure if this is allowed, but this is my submission: http://labs.codecademy.com/D5hl#:workspace


krett12
Scratcher
100+ posts

[ALC] String Alchemist

The_Grits wrote:

So basically just get to triangle somehow or do you need to have ‘3 sides makes a triangle’ as the final sentence?

there are 3 ways to get “illuminati confirmed”

3 sides on triangle.
illuminati's got 10 letters.
edit: illuminati symbol contains an eye

Last edited by krett12 (Jan. 22, 2017 05:10:06)


No signature currently stored in profile.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

nice job

all copycats get a one million point penalty

No signature currently stored in profile.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

oh but here is something.
i said i wouldnt do two hundred, but what about one hundred

[ ‘askdkfjahsdkfjhasdkdjfahskdfjahsdffvffffkdjfahskdfjahskdjfahsdkjfahsdkjfahsdkfjashdkfjhaskdjfkajsdhf has 100 characters.’,
‘100 has 3 digit(s)’,
‘3 has 1 digit(s)’, // two un needed steps.
‘One has three letters’,
‘3 sides on a triangle’ ]

so if anyone can get it in four they win.

No signature currently stored in profile.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

welp, i forget to set a deadline. idk, five submissions *or* five days? (whichever is second)

No signature currently stored in profile.
Jonathan50
Scratcher
1000+ posts

[ALC] String Alchemist

Does
“Bar” has ten letters.
You know what else has ten letters?
That's right.
“Illuminati” has ten letters.
“Foo” is illuminati confirmed.
count as two steps or five steps?

Last edited by Jonathan50 (Jan. 23, 2017 21:47:03)


Not yet a Knight of the Mu Calculus.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

sorry but youre not allowed to use you know what else is a ___-

edit: also if you started with “bar” how does it confirm “foo”

Last edited by krett12 (Jan. 23, 2017 21:51:44)


No signature currently stored in profile.
Jonathan50
Scratcher
1000+ posts

[ALC] String Alchemist

krett12 wrote:

sorry but youre not allowed to use you know what else is a ___-
If I removed that one line would it be valid? It's more for decoration than anything else…
edit: also if you started with “bar” how does it confirm “foo”
That's not the whole thing. It could be like
Remove the first 42 letters of “foo”.
You get “bar”.
“Bar” has ten letters.
You know what else has ten letters?
That's right.
“Illuminati” has ten letters.
“Foo” is illuminati confirmed.

Not yet a Knight of the Mu Calculus.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

Jonathan50 wrote:

If I removed that one line would it be valid? It's more for decoration than anything else…
no, because i consider “you know what else” to be cheating. foo exists. you know what else does? illuminati.
That's not the whole thing. It could be like
Remove the first 42 letters of “foo”.
You get “bar”.
“Bar” has ten letters.
You know what else has ten letters?
That's right.
“Illuminati” has ten letters.
“Foo” is illuminati confirmed.
but that logic means you could confirm asdfasdfsadfadfasdfasdfsdfadfilluminatisdfsdf in one step tho.
eh, i guess that's alright since 42 is a special case.

No signature currently stored in profile.
novice27b
Scratcher
1000+ posts

[ALC] String Alchemist

I have an idea that will work for any word that has a wikipedia article!

Step 1: Using the official data dumps, construct a database which tells you which articles link to which other articles, and also stores the index of the sentence which contains it for context.

Step 2: Perform a BFS of all wikipedia articles, starting from the initial word, ending in the Illuminati

Step 3: Print out the list of pages that lead to illuminati with the sentence they occur in. A sample output of such a program, starting from “Microsoft”, might be:

Microsoft:

In March 2004 the European Union brought antitrust legal action against the company, citing it abused its dominance with the Windows OS, resulting in a judgment of €497 million ($613 million) and to produce new versions of Windows XP without Windows Media Player, Windows XP Home Edition N and Windows XP Professional N.

European Union:

The anthem of the Union is an instrumental version of the prelude to the Ode to Joy, the 4th movement of Ludwig van Beethoven's ninth symphony.

Ludwig van Beethoven:

He may also have been influenced at this time by ideas prominent in freemasonry, as Neefe and others around Beethoven were members of the local chapter of the Order of the Illuminati.

Microsoft is Illuminati Confirmed!

Now I just need to automate this…

i use arch btw
novice27b
Scratcher
1000+ posts

[ALC] String Alchemist

Here's my entry (which works entirely by web scraping)

import urllib.request
import re
import time
import html
 
origin = input("Please enter the title of a Wikipedia article: ")
 
print("Finding links...")
resp = urllib.request.urlopen("http://degreesofwikipedia.com/?a1=%s&linktype=1&a2=Illuminati&skips=&submit=%d&currentlang=en" % (origin, time.time())).read().decode()
 
if "was not a valid article" in resp:
	print ("%s is not a valid Wikipedia page." % (origin))
	exit()
 
if "success!!!" not in resp:
	print("Link not found. Illuminati unconfirmed.")
	exit()
 
print("Found links. retrieving context...")
 
links = re.findall(r"\[.*?\] => (.*)", resp)
 
for a, b in zip(links[:-1], links[1:]):
	print("\n%s:\n" % (a.upper()))
	resp = urllib.request.urlopen("https://en.wikipedia.org/wiki/" + a).read().decode().replace("\n", "")
	replaced = re.sub(r"<a[^>]*?\/wiki\/%s.*?>" % (b), "PLACEHOLDER", resp, flags=re.IGNORECASE)
	stripped = re.sub(r"<.*?>|\[.*?\]", "", replaced)
	isolated = re.findall(r"[^\.]*PLACEHOLDER.*?\.", stripped)[0].replace("PLACEHOLDER", "").strip()
	print(html.unescape(isolated))
 
print("\n%s is Illuminati confirmed!" % (origin))

(python 3)

example output (pretty much the same as in my comment above):

Please enter the title of a Wikipedia article: Microsoft
Finding links...
Found links. retrieving context...

MICROSOFT:

In March 2004 the European Union brought antitrust legal action against the company, citing it abused its dominance with the Windows OS, resulting in a judgment of €497 million ($613 million) and to produce new versions of Windows XP without Windows Media Player, Windows XP Home Edition N and Windows XP Professional N.

EUROPEAN_UNION:

The anthem of the Union is an instrumental version of the prelude to the Ode to Joy, the 4th movement of Ludwig van Beethoven's ninth symphony.

LUDWIG_VAN_BEETHOVEN:

He may also have been influenced at this time by ideas prominent in freemasonry, as Neefe and others around Beethoven were members of the local chapter of the Order of the Illuminati.

Microsoft is Illuminati confirmed!

The “context finding” code is a bit buggy/hacky, so I might need to improve that.

Where do I collect my prize?

Last edited by novice27b (Jan. 24, 2017 21:47:39)


i use arch btw
Jonathan50
Scratcher
1000+ posts

[ALC] String Alchemist

@Novice27b
That is amazing!! Now I have proof that Bjarne_Stroutstrup and C%2B%2B are Illuminati confirmed.

krett12 wrote:

no, because i consider “you know what else” to be cheating. foo exists. you know what else does? illuminati.
I can't think of any better way
but that logic means you could confirm asdfasdfsadfadfasdfasdfsdfadfilluminatisdfsdf in one step tho.
It takes 3 steps.
eh, i guess that's alright since 42 is a special case.
But it's more general, for your word it outputs:
(remove the first 35 letters of asdfasdfsadfadfasdfasdfsdfadfilluminatisdfsdf)
(you get natisdfsdf)
(natisdfsdf has ten letters)
(you know what else has ten letters?)
(thats right)
(illuminati has ten letters)
(asdfasdfsadfadfasdfasdfsdfadfilluminatisdfsdf is illuminati confirmed)
It's too general

Last edited by Jonathan50 (Jan. 24, 2017 23:07:51)


Not yet a Knight of the Mu Calculus.
krett12
Scratcher
100+ posts

[ALC] String Alchemist

novice27b wrote:

Here's my entry (which works entirely by web scraping)

import urllib.request
import re
import time
import html
 
origin = input("Please enter the title of a Wikipedia article: ")
 
print("Finding links...")
resp = urllib.request.urlopen("http://degreesofwikipedia.com/?a1=%s&linktype=1&a2=Illuminati&skips=&submit=%d&currentlang=en" % (origin, time.time())).read().decode()
 
if "was not a valid article" in resp:
	print ("%s is not a valid Wikipedia page." % (origin))
	exit()
 
if "success!!!" not in resp:
	print("Link not found. Illuminati unconfirmed.")
	exit()
 
print("Found links. retrieving context...")
 
links = re.findall(r"\[.*?\] => (.*)", resp)
 
for a, b in zip(links[:-1], links[1:]):
	print("\n%s:\n" % (a.upper()))
	resp = urllib.request.urlopen("https://en.wikipedia.org/wiki/" + a).read().decode().replace("\n", "")
	replaced = re.sub(r"<a[^>]*?\/wiki\/%s.*?>" % (b), "PLACEHOLDER", resp, flags=re.IGNORECASE)
	stripped = re.sub(r"<.*?>|\[.*?\]", "", replaced)
	isolated = re.findall(r"[^\.]*PLACEHOLDER.*?\.", stripped)[0].replace("PLACEHOLDER", "").strip()
	print(html.unescape(isolated))
 
print("\n%s is Illuminati confirmed!" % (origin))

(python 3)

example output (pretty much the same as in my comment above):

Please enter the title of a Wikipedia article: Microsoft
Finding links...
Found links. retrieving context...

MICROSOFT:

In March 2004 the European Union brought antitrust legal action against the company, citing it abused its dominance with the Windows OS, resulting in a judgment of €497 million ($613 million) and to produce new versions of Windows XP without Windows Media Player, Windows XP Home Edition N and Windows XP Professional N.

EUROPEAN_UNION:

The anthem of the Union is an instrumental version of the prelude to the Ode to Joy, the 4th movement of Ludwig van Beethoven's ninth symphony.

LUDWIG_VAN_BEETHOVEN:

He may also have been influenced at this time by ideas prominent in freemasonry, as Neefe and others around Beethoven were members of the local chapter of the Order of the Illuminati.

Microsoft is Illuminati confirmed!

The “context finding” code is a bit buggy/hacky, so I might need to improve that.

Where do I collect my prize?

you just used someone else's website, so…you don't.

edit: that other guy is the winner.

Last edited by krett12 (Jan. 25, 2017 04:51:03)


No signature currently stored in profile.

Powered by DjangoBB