« first day (1769 days earlier)      last day (3370 days later) » 

16:06
Is this a catalog question: http://codegolf.stackexchange.com/questions/85/fibonacci-function-or-sequence
If not, is there a Fibonacci catalog question?
Hi, Squirrel!
Throws a nut somewhere
eats nut
had poison
(Recognize it? :P)
16:13
forgot antidote
@Optimizer dies
I didn't die!
(I think this is the perfect opportunity to use stealth ping as that would be the most fitting)
is still dead
I'll use revive if you convert that to stealth ping :P
16:24
uses anti-revive to block the affect of any future revive
but but but
@Optimizer If he's dead, how's he to edit his post?
oh no I accidentally pinged doorknob D:
not you
@TimmyD the same way he is cribbing about being dead. He sure is talkative for a dead squirrel
@anOKsquirrel I meant change the "@Optimizer dies" line to stealth ping so that it reads "dies" only
@Optimizer oh.
uses anti-anti-revive to block the affect of anti-revive and every future anti-revive
gets sock to revive
Ha! I'm back!
16:28
and now get ready for a chat ban for using stealth ping on mod
plays dead
buries the dead squirrel near the tree
shhh, i'm pretending to be dead
Now I'm scared
16:31
I accidentally stealth pinged doorknob
I wonder if
import sys
print(sys.version[0])
is allowed considering different python versions in http://codegolf.stackexchange.com/questions/65641/the-versatile-integer-printer
Would output 1, 2 and 3
@StewieGriffin
Yeah, must be allowed
:X
A bit cheap
Anonymous
17:09
@anOKsquirrel No such thing
Anonymous
Stealth pings got fixed yesterday
Anonymous
(or was it day before yesterday? idr)
What's a stealth ping?
You ping and turn off your computer?
Anonymous
A long-gone method of annoyance
Really, they got fixed! OWO
Anonymous
17:10
It's been 14 hours since the last starred message :o
4
Anonymous
@Stefnotch As it should be
Anonymous
I don't know what I expected
@Optimizer sounds more like EXTREME ping
(Looks like we have to find a new way?)
17:11
what got fixed?
Anonymous
@Stefnotch Or we could just not have stealth pings, and everything will be nice
0
A: Sandbox for Proposed Challenges

Kριτικσι ΛίθοςArithmetic Progressions code-golfmathsequence Your task is to analyse the input and output the formula for the n-th term if it is an arithmetic sequence, otherwise it should print "NAAP". Input Input (from STDIN) will consist of few numbers, between 4 to 10 numbers where each number will be...

XD
Do those:
How to Format

► put returns between paragraphs

► for linebreak add 2 spaces at end

► _italic_ or **bold**

► indent code by 4 spaces

► backtick escapes `like _so_`

► quote by placing > at start of line

► to make links

<http://foo.com>
[foo](http://foo.com)
<a href="http://foo.com">foo</a>

things work in the chat?
italic
bold
backticks
> quote
I don't think formatting works in the chat
I'm pretty sure
<a href="http://foo.com">foo</a>
So, pretty much everything except HTML...
17:14
[zombo](www.zombo.com)
rip
  code test
Cool!
Anonymous
Chat uses mini-Markdown
We should get MathJax or something here
Anonymous
@ChrisJester-Young is all-knowing and can tell you more
Oh! @ChrisJester-Young Mind telling me more?
Anonymous
17:15
url test <http://www.googleFake.com>
Anonymous
I think there's also a FF plugin
Anonymous
But I don't use FF so shrug
17:16
Header 1
=====
- Not working
- list
Why is my Python answer getting more upvotes than my Subskin, Brainfuck and Fob answer?! D:
I worked so hard on that :<
Anonymous
Because 1) it's shorter 2) it's the most recent answer
ah
Megabrain
Martin's answer is sick
Anonymous
Yeah it is
Anonymous
Dude is insane
17:20
I like how you managed to get Befunge into your answer @Mego
I should learn some Befunge
or some other fun Esolang
Anonymous
I borrowed a trick I saw in another Fish/Befunge polyglot - using `\` to separate the IPs
Anonymous
Since it's a mirror in ><> and a swap in Befunge
I like tricks
ah!
Like the fast inverse square root
Anonymous
So it's v in ><> and a NOP in Befunge
Anonymous
Which lets me send the IPs where I want them
17:23
Try it online! currently has 15 languages.
</selfpromotion>
Anonymous
And mixing Seriously into any polyglot answer is pretty easy due to the lack of syntax errors
Nice @Dennis!
I tried Brain & Chuck once
Anonymous
You just wrap the Seriously code as é<code><0x7f> and you're golden
Still waiting for a Seriously answer to codegolf.stackexchange.com/questions/65519/…
Me days of stealth-pinging are over ;( :( X( D:
17:25
@VisualMelon that one was too hard for me :<
Came up with a grotesque solution
in C++ though, not Seriously
it was suggested that it should be easy, and I'm interested to see how it works (if it's not just o=1,e=0,eval(input)%2<1?'o':'e')
(or however that would be expressed in Seriously, I've never bothered to learn any golfing languages)
I tried that approach, it's not that simple I think
I mostly golf in C++
Since it's fun and I know the language
I gave up on golfing languages when I figured I couldn't even write a simple loop in CJam
#toomuchformybrain
@sweerpotato Me too!
Anonymous
0
A: Well that's odd... no wait, that's even!

MegoSeriously, 25 bytes ,R'2'er(Æ'1'o(Æ£ƒ'e'o2(%I More efficient stack manipulation could probably make this shorter, but meh, I'm happy with it. Takes input as a string, like "+*oee" Try it online (input must be manually entered)

Anonymous
Ask and ye shall receive
17:30
hurrah!
@Mego I want a million quacking cows
Really? @Mego
You whipped that up instantaneously
Oct 26 at 18:03, by Kritixi Lithos
user image
Anonymous
@sweerpotato Writing code in a language I designed is unsurprisingly easy :P
Still have to come up with an algorithm!
I can't write crap in my language
Anonymous
17:33
The fact that + and * are the only ops means that simply reversing the string will get it into RPN. Two simple replacements, and it can be directly eval'd.
Maybe I was overthinking my solution
Thought of making a tree calculator
Anonymous
3rd place to CJam and Pyth isn't bad
Martin added another language..
Anonymous
The dude's insane, are you really surprised?
I'm very impressed
Martin is the Dumbledore of code
Anonymous
17:38
He manipulates others and makes their lives hell for his own ends?
err
The Gandalf?
Anonymous
17:48
Not much difference
What about Sauron
err
@Mego MarkdownMini, yes. It's the same code as that which formats comments (with a few chat-specific tweaks like strikeout).
Anonymous
@ChrisJester-Young That's what I thought, thanks for clarifying :)
Anonymous
@sweerpotato
6
17:50
:D
My friend, who is a C programmer, works in a project where they have defined true as 0
Anonymous
whyyyy
I have no idea
#define while if
Anonymous
flags as offensive, blasphemous, and just plain wrong
It's sick
In a bad way
Makes you cry in a corner at night
0
Q: Parse a two-dimensional syntax

ZgarbBackground Alice and Bob are creating a golfing language to win every single PPCG challenge. Alice wants to make a two-dimensional language, like ><>, but Bob prefers a prefix-infix syntax like in J. As a compromise, they decide to create a two-dimensional prefix-infix language. The parser is a ...

18:02
Sup @Linus
@Mego Because the return value 0 is usually considered success. success would be a better choice though.
@sweerpotato Just checking up on things.
Sorry for editing your bot post yesterday
@Sparr I've written up the core part of the CodeBots 4 challenge
0
A: Sandbox for Proposed Challenges

Nathan MerrillCode Bots 4 sheesh, is this really the 4th? For all you oldcomers, the core challenge is the same, but we are using Java instead of a custom language The goal of CodeBots is to make your bot as viral as possible. Each bot carries a Flag, and you need to make sure that your Flag is everywhere....

does it make more sense now?
@sweerpotato, it's alright. I will get over it.
18:05
Mental scars forever
:(
Anonymous
@Dennis EXIT_SUCCESS is the best choice
Anonymous
Remember: if you're about to define a macro in C, either a better one already exists, or you should rethink your design choices
Macros are the devil
I dunno why they kept them in C++
Anonymous
Backwards compatibility
Anonymous
For the most part, C++ is a superset of C
18:08
0
A: Sandbox for Proposed Challenges

Nathan MerrillCode Bots 4 sheesh, is this really the 4th? For all you oldcomers, the core challenge is the same, but we are using Java instead of a custom language The goal of CodeBots is to make your bot as viral as possible. Each bot carries a Flag, and you need to make sure that your Flag is everywhere....

@Mego dunno.. iirc Bjarne even stresses that C++ is not a superset of C
Not sure
But I get the idea.. sort of
Macros serve no purpose in C++
other than backwards compatibility I guess
if you are going to break backwards compatibility at all (such as C to C++), it makes no sense to keep around the old ugly ways (such as macros)
Anonymous
@sweerpotato He can stress it all he wants, but at the end of the day,
Anonymous
Valid C code is valid C++ code
18:13
int typename = 1; is valid C but not C++
9
Q: What prevents C++ from being a strict superset of C?

Mike Possible Duplicate: “C subset of C++” -> Where not ? examples ? I'm aware that C++ is not a strict superset of C. What language features prevent C++ from being a superset of C?

Anonymous
Okay, except for a few corner cases involving keywords
@NathanMerrill I think your bot challenge is pretty cool! What is the "flag" that you are talking about?
@Stefnotch how I determine the winner
which ever submission has the most flags wins the competition
But what is it? Example?
18:14
a string
whatever you want it to be
as long as it is unique
So,
function sendMessage(){
string = "mahOwnReallyUniqueString";
}
(Ok, this might not be Java, but whatever..Java, Javascript, who cares about the tiny difference.)
function getFlag(){
    return "AwesomeBot";
}
@Mego what about macros is bad design? Would be bad in a library but otherwise I don't see it.
@Linus if you don't know exactly what you're doing, macros can turn out really bad
also we have functions in C++
@Linus the same reason I hate doing find/replace in code
18:18
Miss a pair of parentheses and it's rip in programming
@NathanMerrill Oh, that's what you mean! (Mind updating your question to make this clearer?)
I'm not sure what's unclear?
is step 8 unclear?
also, completely different topic
does stack exchange check for serial comment upvoting?
Yep, step 8..
18:23
so, if I upvote every comment on a post
Serial comment upvoting?
I go to a popuar post, and upvote every comment on that post
does SE detect and reverse such voting?
I don't think so
I like handing out upvotes
@sweerpotato okay I can see how that might be an issue. Obviously I'm smart enough to know that marcos are replaced before the compiler assesses order though.
Oh, I don't doubt you!
The problem is less experienced programmers
:<
18:27
not just less experienced programmers, but often times these things need communication, and even that fails with highly experienced programmers
You really need to be careful
You as in the general public of programmers, not you specifically
:~)!
@NathanMerrill I can see that being an issue as well. Thanks.
I find macros obsolete in C++, and very much so
They have no place in my language >:(
(I can't wait to learn C++ and to try out the macros...)
18:29
do C compilers try to identify similar code blocks and make them subroutines?
unsure @NathanMerrill
2015: the year where it's normal to ask someone if they are the avocado
I haven't dabbled in compilers
well, your typical compiler won't
I had a site which shows you the expanded assembly code
err
Let me see if I can find it
Wish it was Friday
I don't want to work tomorrow :<
18:33
bah, the compiler there is doing optimizing and precalculating the result
Isn't that.. a good thing?
@Nathan yes, code optimization is sneeky
yes it's a good thing
but it makes testing if compilers identify similar code really hard
effectively, I want to know if #define y(a, b) (a) * (b) produces code of a similar length to int mult(a, b){return a*b;}
Anonymous
@NathanMerrill No, it's much shorter, but you need more parentheses
what is much shorter?
the function should be shorter
Anonymous
18:36
The macro
I'm talking assembly shortness
Anonymous
So am I
but if I'm injecting code in lots of places, wouldn't the code in a single spot be shorter?
0
Q: Arithmetic Progressions

Kριτικσι ΛίθοςYour task is to analyse the input and output the formula for the n-th term if it is an arithmetic sequence, otherwise it should print "NAAP". Input Input (from STDIN) will consist of few numbers, between 4 to 10 numbers where each number will be in the range between -1000 and 1000 inclusive, ...

Anonymous
With macro:
Anonymous
18:38
	.file	"assemtest.c"
	.def	___main;	.scl	2;	.type	32;	.endef
	.text
	.globl	_main
	.def	_main;	.scl	2;	.type	32;	.endef
_main:
LFB0:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	andl	$-16, %esp
	subl	$16, %esp
	call	___main
	movl	$4, 12(%esp)
	movl	$0, %eax
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
LFE0:
	.ident	"GCC: (GNU) 4.9.3"
Anonymous
With function:
Anonymous
	.file	"assemtest.c"
	.text
	.globl	_mul
	.def	_mul;	.scl	2;	.type	32;	.endef
_mul:
LFB0:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	movl	8(%ebp), %eax
	imull	12(%ebp), %eax
	popl	%ebp
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
LFE0:
	.def	___main;	.scl	2;	.type	32;	.endef
	.globl	_main
	.def	_main;	.scl	2;	.type	32;	.endef
_main:
LFB1:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
Anonymous
The function creates an additional function in assembly, with all the call/ret overhead
right, but that's for a simple function used only once
Anonymous
The macro version is identical to int main(){int c=2*2;return 0;}
18:40
I really hope nobody is actually writing the multiply macro
Anonymous
Macros are expanded by the preprocessor before the compiler even starts thinking about generating assembly
right, but I imagine that most macros actually being written expand to a larger amount of code, meaning that it will overcome the call/ret overhead, and over multiple uses will produce shorted asm code
Anonymous
Maybe, probably not
Anonymous
It depends on the specific case I would think, but generally, macros lead to smaller assembly
Anonymous
That's of course assuming -Os isn't on; if it is, all bets are off
18:52
If you're in or near #Toronto there's a #Pebble #Hackathon on Friday night http://www.meetup.com/PebbleTO/events/226590468/
someone here pebble'd na?
narr
I live in Sweden
If the macro is used at least twice and is very large I would think @Nathan is right. Not versed in the practical details of putting functions to assembly, but overhead for the stack should be finite in comparison to arbitrarily large subroutines.
too long a trip :<
someone other than you too

« first day (1769 days earlier)      last day (3370 days later) »