Message Boards Message Boards

10 Replies
12 Total Likes
View groups...
Share this post:

Wolfram Tweet-a-Program Launches Today

Posted 10 years ago

Because a little code can go a long way, the Wolfram Language is quickly becoming a part of hackathons across the country. To encourage programmers to have fun with short code, we’re launching Wolfram Tweet-a-Program today.

For details, read Stephen Wolfram's blog post.

Submit Your 140-Character Program

Show us what programs you can create in under 140 characters by sending code submissions to @wolframtap. To create your code, you can use Wolfram Programming Cloud or any other Wolfram Language system.

On Twitter, send your tweets in the following format:

@wolframtap [Wolfram Language code]

If you don’t have a Twitter account, you can ask Wolfram to tweet on your behalf by posting your code here in the Tweet-a-Program Community group.

Discuss Your Code Submissions Here

Bookmark this Community group to:

  • Connect with other short code enthusiasts
  • Post your Tweet-a-Program submissions
  • Troubleshoot
  • Add commentary

Tweet-a-Program Examples

The first 1000 digits of ?, sized according to their magnitudes:

@wolframtap Row[Style[#,5#+1]&/@First[RealDigits[Pi,10,1000]]]

A 36-character “fractal hack”:

@wolframtap NestList[Subsuperscript[#,#,#]&,x,6]

POSTED BY: Emily Suess
10 Replies

Give it a try: Fractal Fun: Tweet-a-Program Mandelbrot Code Challenge

ImageAdd[Rasterize@Rotate[MandelbrotSetPlot[{-1.9+I,-.85I},ColorFunction->(If[#3>.9,Black,White]&)],3Pi/2],=[Mandelbrot Pic]]

enter image description here



POSTED BY: Bernat Espigulé

Slightly shorter version that should fit in a tweet:

b = c = ConstantArray[0, {256, 256, 3}]; s = 21 ;; 236; 
b[[All, s]] = c[[s, All]] = Tuples[{0, .5, .05, 0, .5, .05}, 3]; Image[b + c]
POSTED BY: Ilian Gachevski

Illian, Thank you. It runs as: @wolframtap b = c = ConstantArray[0, {256, 256, 3}]; s = 21;;236; b[[All, s]] = c[[s, All]] = Tuples[{0, .5, .5, 0, .5, .5}, 3];Image[b + c]

I had to cut into my variables!

POSTED BY: Douglas Youvan

I like it!

(Stephanie: Thank you for telling me about this)

When do we go to 156,000 cores?

A really good programmer might be able to take this "Tuple Imagery" program down to tweet size. Please try.

b = c = Table[{0, 0, 0}, {x, 1, 256}, {y, 1, 256}]; t = Tuples[{0, .5, .05, 0, .5, .05}, 3]; For[j = 1, j <= 216, j++, b[[All, j + 20]] = c[[j + 20, All]] = t[[j]]]; Image[b + c]

It's 41 characters over the limit.

Really close:

t = Tuples[N@{0, 1, 0.5, 0, -1, -0.5}, 3]; l= Length@t; Image[Array[<a href="mailto:Total@t[[{##}]]&,{l,l}]">Total@t[[{##}]]&,{l,l}]]

POSTED BY: Douglas Youvan

Also, I'm getting some double results.

POSTED BY: Jesse Friedman

Yep, a known bug. Working on it, though we might not get to fully sorted out until tomorrow...

POSTED BY: Andre Kuzniarek

Does it use the same protection against malicious input as standard Cloud APIs?

POSTED BY: Jesse Friedman

Yes, we have sandboxing that is part and parcel of Wolfram Cloud. We also filter some obvious useless inputs, and return error messages for failed code, but people are coming up with other examples of things that just aren't too useful that we will work on filtering. And we are monitoring for troll silliness.

POSTED BY: Andre Kuzniarek

I really like this image which Arnoud B. generously allowed me to steal from his Tweet-a-Code testing collection:


enter image description here

POSTED BY: Andre Kuzniarek

Shades of Kandinsky. Well, lines too.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract