Jump to page: 1 2 3
Thread overview
Fun: Shooting yourself in the foot in D
Oct 27, 2016
Ali Çehreli
Oct 27, 2016
Ali Çehreli
Oct 27, 2016
cym13
Oct 27, 2016
Guillaume Boucher
Oct 27, 2016
Stefan Koch
Oct 27, 2016
A D dev
Oct 27, 2016
Idan Arye
Oct 27, 2016
Ali Çehreli
Oct 27, 2016
Temtaime
Oct 28, 2016
Kirill Kryukov
Oct 28, 2016
Chris
Oct 28, 2016
Patric Dexheimer
Oct 28, 2016
Chris
Oct 28, 2016
Guillaume Piolat
Oct 28, 2016
Ali Çehreli
Oct 28, 2016
John Colvin
Oct 28, 2016
Ali Çehreli
Oct 30, 2016
captaindet
Oct 31, 2016
Ali Çehreli
October 27, 2016
  http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html

Some entries for reference:

C
- You shoot yourself in the foot.
- You shoot yourself in the foot and then nobody else can figure out what you did.

C++
- You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."

Python
- You shoot yourself in the foot and then brag for hours about how much more elegantly you did it than if you had been using C or (God forbid) Perl.

What would the entry for D be? :)

Ali
October 27, 2016
On 10/27/16 3:49 PM, Ali Çehreli wrote:
>
>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
>
> Some entries for reference:
>
> C
> - You shoot yourself in the foot.
> - You shoot yourself in the foot and then nobody else can figure out
> what you did.
>
> C++
> - You accidentally create a dozen instances of yourself and shoot them
> all in the foot. Providing emergency medical assistance is impossible
> since you can't tell which are bitwise copies and which are just
> pointing at others and saying, "That's me, over there."
>
> Python
> - You shoot yourself in the foot and then brag for hours about how much
> more elegantly you did it than if you had been using C or (God forbid)
> Perl.
>
> What would the entry for D be? :)

You create a large meta-template library called footMassage, which then ends up via compiler inference compiling into a gun instead.

-Steve

October 27, 2016
On 10/27/2016 12:59 PM, Steven Schveighoffer wrote:

> You create a large meta-template library called footMassage, which then
> ends up via compiler inference compiling into a gun instead.

The first thing that came to my mind was a template-generated gun as well. :)

Ali

October 27, 2016
On Thursday, 27 October 2016 at 19:59:09 UTC, Steven Schveighoffer wrote:
> On 10/27/16 3:49 PM, Ali Çehreli wrote:
>> [...]
>
> You create a large meta-template library called footMassage, which then ends up via compiler inference compiling into a gun instead.
>
> -Steve

Then the GC kicks in and triggers it.
October 27, 2016
On Thursday, 27 October 2016 at 19:59:09 UTC, Steven Schveighoffer wrote:
> You create a large meta-template library called footMassage, which then ends up via compiler inference compiling into a gun instead.

Accidentally compiling a massage into a gun is not a high priority bug.  In order to become the safest language available, we should concentrate our effort implementing a nitrogen oxide detector (which handles all non-pathological examples of smoke).

October 27, 2016
On Thursday, 27 October 2016 at 19:59:09 UTC, Steven Schveighoffer wrote:
> On 10/27/16 3:49 PM, Ali Çehreli wrote:
>>
>>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
>>
>> Some entries for reference:
>>
>> C
>> - You shoot yourself in the foot.
>> - You shoot yourself in the foot and then nobody else can figure out
>> what you did.
>>
>> C++
>> - You accidentally create a dozen instances of yourself and shoot them
>> all in the foot. Providing emergency medical assistance is impossible
>> since you can't tell which are bitwise copies and which are just
>> pointing at others and saying, "That's me, over there."
>>
>> Python
>> - You shoot yourself in the foot and then brag for hours about how much
>> more elegantly you did it than if you had been using C or (God forbid)
>> Perl.
>>
>> What would the entry for D be? :)
>
> You create a large meta-template library called footMassage, which then ends up via compiler inference compiling into a gun instead.
>
> -Steve

You would never shoot youtself in the foot. after 5 minutes the compiler dies with an OOM.

October 27, 2016
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
>
>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
>
> Some entries for reference:
>
> C
> - You shoot yourself in the foot.
> - You shoot yourself in the foot and then nobody else can figure out what you did.
>
> C++
> - You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
>
> Python
> - You shoot yourself in the foot and then brag for hours about how much more elegantly you did it than if you had been using C or (God forbid) Perl.
>
> What would the entry for D be? :)
>
> Ali

1) You pre-shoot the bullet while the gun is being made - for efficiency (CTFE). As a result, it misses the foot, which has not grown yet.

2) From that link:

http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html

this one is good:

Concurrent Euclid:

You shoot yourself in somebody else's foot.


October 27, 2016
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
>
>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
>
> Some entries for reference:
>
> C
> - You shoot yourself in the foot.
> - You shoot yourself in the foot and then nobody else can figure out what you did.
>
> C++
> - You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
>
> Python
> - You shoot yourself in the foot and then brag for hours about how much more elegantly you did it than if you had been using C or (God forbid) Perl.
>
> What would the entry for D be? :)
>
> Ali

You conceive a baby which is born with a bullet genetically shot in the foot
October 27, 2016
On 10/27/2016 03:07 PM, Idan Arye wrote:
> On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
>>
>>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html

> You conceive a baby which is born with a bullet genetically shot in the
> foot

Like others, this one is very nice! Especially interesting to note that genetic and generative have the same root. :)

Ali

October 27, 2016
On Thursday, 27 October 2016 at 19:49:16 UTC, Ali Çehreli wrote:
>
>   http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.html
>
> Some entries for reference:
>
> C
> - You shoot yourself in the foot.
> - You shoot yourself in the foot and then nobody else can figure out what you did.
>
> C++
> - You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
>
> Python
> - You shoot yourself in the foot and then brag for hours about how much more elegantly you did it than if you had been using C or (God forbid) Perl.
>
> What would the entry for D be? :)
>
> Ali

You create some complicated template function and then compiler show you an ICE.
« First   ‹ Prev
1 2 3