......so...because I was thinking about how to parse commands from program text, I figured out how to golf Blitz 2D/3D code even further. I don't actually need newlines most of the time. o.o
What was
Function circ(x,y,r, f=0)
Oval x-r,y-r,2*r+1,2*r+1,f
End Function
is now
Function circ(x,y,r, f=0)Oval x-r,y-r,2*r+1,2*r+1,f End Function
Y'see, I have an idea for an algorithm based on prime factorizations. However, it's possible to have [2,2,1,1] (where 6 are needed) so you get the LCM of the single hands in order to have [2,2,2], which fulfills the requirements.
That feeling when you have a built in that almost entirely solves the problem and yet the manual solution in CJam is shorter. — Alex A. ♦Jun 30 at 21:54
@AlexA. There are some built-ins in Mathematica which I can reimplement in fewer bytes in Mathematica. — Martin Büttner ♦Jul 2 at 15:53
I just had a lesson in school about alkanes and figured it would probably make for a great code golf challenge! Don't worry, it isn't as complicated as it may look!
A Quick Rehash
(Please Note: To keep this brief, not all information is 100% accurate.)
Alkanes are strings of carbon and hydroge...
@AlexA. Having drunk alcohol makes you in possession of it. Your body literally contains it. The only way to consume it without possessing is to have it begin to enter your body and then teleport it away.
Dobos torte or Dobosh (pronounced [ˈdoboʃ], Hungarian: Dobos torta) is a Hungarian sponge cake layered with chocolate buttercream and topped with caramel. The five-layer pastry is named after its inventor, Hungarian confectioner József C. Dobos, who aimed to create a cake that would last longer than other pastries in an age when cooling techniques were limited. The round sides of the cake are coated with ground hazelnuts, chestnuts, walnuts, or almonds, and the caramel topping helps keep it from drying out.
The name is also sometimes spelled Dobos-torta or Dobostorta.
== HistoryEdit ==
Dobosh...
that might finally get to the point that people reuse some code. it annoys me that most of the multi challenges people just add together different solutions
@AlexA. yeah, i think it doesn't render in most browsers.. Why are we not doing anything about it? I guess the author of the language wants it to be known as the "blank squares language"!
I just read through the Syzygy challenge. I remembered we had something about the Lonely Runner conjecture and wanted to post it as related. When I searched for it, I didn't find anything. So I searched meta for a sandbox proposal. Still nothing. So I thought maybe someone brought it up in chat and searched the chat messages in here. Someone did bring it up once... I did... -.-
Dissociative fugue, formerly fugue state or psychogenic fugue, is a DSM-5 Dissociative Disorder. It is a rare psychiatric disorder characterized by reversible amnesia for personal identity, including the memories, personality, and other identifying characteristics of individuality. The state is usually short-lived (ranging from hours to days), but can last months or longer. Dissociative fugue usually involves unplanned travel or wandering, and is sometimes accompanied by the establishment of a new identity. It is no longer its own classification or diagnosis as it was in the DSM-IV, but now a facet...
I'm so glad that three-finger taps lookup through Wikipedia as well as the dictionary. xD
@Sparr unless there is some interesting interaction between the challenges, I don't think there is any benefit over posting the challenges separately, and it causes a few problems.
@MartinBüttner lack of interesting interaction between the challenges is what has bothered me most about all the multiple-hole challenges up until now. eveyrone just keeps solving them separately and adding up the totals. I expect to see code reuse in this one!
By interaction I mean things like not being able to use characters in multiple solutions, or related tasks where code could be reused between multiple solutions (e.g. my Kingdom Builder challenge)
@AlexA. The main problems it causes: a) the optimal tactic is stealing the shortest solutions for subtasks from other answers. b) it escapes the duplicate system.
Python, 223 209 bytes
Thanks @Sp3000
from turtle import*
def D():fill(1);fd(100);rt(90);fd(200);rt(90);fd(100);rt(90);fd(200);rt(90);fill(0)
lt(180)
fillcolor("#0055a4")
D()
fillcolor("white")
goto(100,0)
D()
fillcolor("#ef4135")
goto(200,0)
D()
Try it here
One person wants to delete it... I have told everybody it works, but 3 people have upvoted Mego's comment! is there something wrong with the code? it works fine when I run it...
Packing Circles
graphical-output (code-golf or code-challenge)
(Image source)
Notice how the pipes are packed in a hexagonal pattern. It is known that in 2D, this is the most efficient way to pack circles (in the sense that the circles occupy the greatest proportion of the available space). ...