« first day (1752 days earlier)      last day (3092 days later) » 

5:00 AM
@Sp3000
#1: Assume that the indent argument is the same with the input program.
#2: Space beforehand does not matter.
 
k :)
 
Anonymous
It's a little past Halloween, but are you guys ready to be scared?
 
@Mego spook
 
@Mego is it a Java program?
 
Anonymous
5:02 AM
@ThomasKwa close
 
Anonymous
 
WAAAAA
 
@Mego from where?
 
BIN IT
 
/me faints
 
5:02 AM
EEEEEGH
 
AHH!
 
I code Java a lot, and I'm ok with it.
 
Anonymous
@TanMath from my github repo for the draughts koth
 
me running
 
Anyone wanna go for my bounty? 168 bytes is the score to beat...
10
Q: Across the alphabet

VɪʜᴀɴAcross the alphabet In this challenge, you have trouble remembering the letters of the alphabet. To circumvent this, you go up and down the alphabet, till you get to the letter. Because you want your code to be portable, you'll be writing it with letter blocks. You have a limited amount of let...

 
Anonymous
5:03 AM
I haven't done Java since my second semester of college
 
Pretty similar to my Alphabet Between Encryption, but this already has twice the votes so I'll just flag mine. — phase Nov 9 at 7:38
 
@Vɪʜᴀɴ i didn't get your challenge, what exactly is the code supposed to do?
 
@phase I'd say there different enough though, yours has a few more conditions to meet
@TanMath Essentially you're chaining letters so AD would become ABCD
 
Anonymous
@Vɪʜᴀɴ "-25% bonus if your code chains all Unicode letters" - doesn't that kind of go against the swapping case rule?
 
Vihan: I might try
@Mego No, not really.
 
Anonymous
5:07 AM
Bd would be BCDEFG....abcd if you went through all Unicode characters
 
@Mego Hm, I should probably remove that bonus, didn't think that through. I don't think anybody has used it yet
 
@Vɪʜᴀɴ ok...
 
@Vɪʜᴀɴ i.e. filling in the missing letters? (chaining is a confusing word here)
 
@Calvin'sHobbies Yeah, that would of been a better title
 
@Vɪʜᴀɴ Just clarify that the swapping case rule supersedes the bonus.
 
5:08 AM
Nobody loved my answer
0
A: Parenthifiable Binary Numbers

phaseD, 209 170 bytes import std.stdio;import std.format;import std.conv;void main(char[][]a){string b=format("%b",to!int(a[1]));int i;foreach(c;b){i+=c=='1'?1:-1;if(i<0)break;}writeln(i==0);} This does exactly what it is supposed to do without any additions or benefits.

 
(e.g. that if you start in an alphabet, you can't leave it except to change case)
 
@phase Dennis got 90% of the love
 
@quintopia The problem with that bonus would be that ÀÈ would really be able to be chained. I've just removed the bonus as no one as used it yet
 
@Calvin'sHobbies Dennis has my love
 
@Vɪʜᴀɴ Neat!
 
Anonymous
5:10 AM
But then how should something like üb be handled? ü<every UTF-8 character outside of ASCII><unprintables><ASCII 32-64>Ab? Or should it go through 65-98?
 
@Dennis Stop stealing the love from my other contenders >:(
 
Why on earth do I keep running out of stars?!?!?
This is like the third day in a row I've run out of stars
 
Anonymous
@phase Star less pointless stuff
2
 
@Calvin'sHobbies Haha, sorry.
 
Anonymous
downstar
 
Anonymous
5:13 AM
@Dennis Translation: Stop being so good :(
 
O man 18 rep till 1k
 
Anonymous
I challenge this room to go the entirety of the UTC day of November 17th, 2015 without starring anything
6
 
Well, then some people need to be banned.
 
I'd star that if I could
 
downstar
not possible
 
5:15 AM
downstairs star
 
All people would need to be banned
 
Anonymous
@phase Whoa now, you'd have to buy me dinner first for that
 
@phase Congrats on hitting 1k!
 
@Mego Why not the day of the 16th?
 
Anonymous
@AlienG Because that's already started
 
5:16 AM
@Dennis thanks <3
 
Time zones...
 
Anonymous
> UTC
 
facepalms
 
@Mego woah woah woah hold your horses I wasn't going that far down the stairs.
I was mostly just picturing me going down into the basement I don't have and starring everything
 
Anonymous
@phase Anything below the attic requires a moderately-priced Italian dinner
 
5:17 AM
I'm going to go make a sock account to star everything, bbl
 
@phase good idea!
 
Anonymous
please for the love of god no
 
Anonymous
mods get the banhammers ready :/
 
Anonymous
At least the rep requirement for chat will help some
 
5:18 AM
@Mego I accept. I use perhaps one star per day.
 
Anonymous
@Calvin'sHobbies I have yet to star anything today :P
 
Anonymous
 
:25440643 I don't have the time nor the energy to google it.
 
@AlexA. Can penguins be green and/or purple? (I'd figure you would know.)
 
Anonymous
@Calvin'sHobbies ಠ_ಠ
 
5:20 AM
Oh right..
@Mego Your avatar is too small to remember that it's a penguin! Alex is my go to bird.
 
Anonymous
@Calvin'sHobbies Fine, I'll make my penguin avatar bigger
 
Anonymous
@AlexA. be kind and refresh? <3
 
@Mego i like your original better...
 
You have no idea how difficult it is to screen grab a high res picture of a -1 for an avatar
 
Anonymous
5:26 AM
@TanMath I only changed it for PPCG. My network avatar is still the motivational penguin. If I ever use the rest of the SE network, you'll see it :P
 
Anonymous
@Vɪʜᴀɴ I could help you with that
 
@Mego Your penguin looks like a rice ball anyway...
 
Can someone downvote one of my posts?
 
@Vɪʜᴀɴ sure!
 
5:27 AM
@Vɪʜᴀɴ You could mess with the CSS
 
sounds like a job for @Geobits
 
@Calvin'sHobbies tried but I can't find the right color
huh, it didn't show up
 
Anonymous
 
How do you put a < in a <pre> block?
 
&lt;
 
5:33 AM
Now I'm just hoping my avatar doesn't subliminally influence anyone
 
@TanMath working on it now
 
@Vɪʜᴀɴ It's plain red (#f00) for inbox messages. Not sure if negative rep is different
 
Anonymous
Do I have to do a network-wide avatar change to make it show up in chat?
 
@Mego You need to change your parent site at least I believe
 
@Mego if you go to chat.stackexchange then click on your name, if you change you main profile from and then back to PPCG it should update I think
 
5:37 AM
@Mego PPCG is your parent site, so you only have to change it there.
brb refreshing profile
 
Anonymous
@Dennis Thanks :)
 
How do you specify the language to highlight in <pre>?
 
Anonymous
@phase <!-- language: lang-whatever -->
 
Anonymous
Huh, it didn't change my chat avatar
 
Anonymous
Oh there it goes
 
Anonymous
5:38 AM
It didn't wanna reload on my side
 
216
Q: What is syntax highlighting and how does it work?

ben is uǝq backwardsI noticed that sometimes my code gets highlighted in different colors when rendered. What is syntax highlighting? How does it work? What if my code isn't highlighted correctly? How do I report a bug or request a new language? What languages are currently available on Stack Exchange? Return to...

 
Anonymous
^
 
@Mego it is seriously hard to program in seriously...
or maybe for me, since i have never used stack based languages!
 
@Mego 2cute4me
@Hipe99 Hello!
@TanMath I'd just do it in a hex editor
 
@TanMath Stack-based languages take a while to get used to.
 
5:40 AM
@phase Hello!
 
@phase what?! how does that even work?l
 
I saw on github.
 
Anonymous
Protip: for lower ASCII (0-127), ALT-0<ordinal> inserts the character. For upper CP437 (128-255), ALT-<ordinal> does the trick.
 
Anonymous
(at least it works on Windows, haven't tried in Linux/OSX)
 
5:42 AM
@phase you're taking all the golfing suggestions.
 
@Mego A penguin who doesn't use Linux..
 
Interesting that so many people have trouble wrapping their heads around the concepts involved in stack-based languages. It seems to me to be one of the simpler ways to have a programming language.
 
Anonymous
@Calvin'sHobbies I use Linux; I've just never tried to use Seriously on Linux
 
@Hipe99 If you've got any ideas I'd love to hear them
 
I mean, most esolangs are stack-based.
 
Anonymous
5:43 AM
I like to treat Linux right by not subjecting it to the horror of Seriously
 
now i know why @Mego's avatar looked so similar!
 
@El'endiaStarman Forth!
 
Anonymous
Programming in stack-based languages requires a mental paradigm shift, which is hard to do
 
Anonymous
I'm still not great at it - my Seriously code still looks like ported Python code
 
Anonymous
(fed through a blender, of course)
 
5:44 AM
 
@Mego Like eating bread inside out
 
I still cannot write a for loop!
@phase how do you do programming in hex?
 
Anonymous
@TanMath For loops (or something close enough) are a command I'm working on figuring out how to add
 
@El'endiaStarman I've learned to love stack-based languages. They're the one I have most fun golfing in, and the fact that everything is evaluated in reading order certainly makes it easier to write and read a stack-based language. That's once you get used to it though. I still remember my beginnings with GolfScript:
 
@TanMath You just use the commands.txt and put the numbers for the things you can't type in where you want them. I did it a ton while working on my VM
 
5:46 AM
I tried to come up with a Golfscript input validation, but it made my brain hurt. — Dennis ♦ Apr 7 '14 at 16:39
 
@Mego I wonder why I didn't have that difficulty. I never used a stack-based language until this summer but I still picked it up really quickly.
 
deletes phase's post to unbreak context
 
@Dennis I hate it when that happens :\
 
Anonymous
You can also copy-paste the characters from commands.txt (for >= 32) or use the alt trick I mentioned
 
@Mego you should! but for now, how is it possible? you need a variable to keep track of the incrementation, etc...
@phase how is that any bit helpful?! you still need to know the commands used and its order, don't you?
 
Anonymous
5:48 AM
@TanMath for i in range(5):print i -> 5rW;.-
 
@Mego can you add the hex equivalent of each command to the commands.txt?
 
@Mego For the record, it's Ctrl+Shift+u<hexcode> on Linux.
 
Anonymous
@phase sure thing, hope it doesn't break my script
 
Anonymous
@Dennis Thanks!
 
Anonymous
I might just make a commands.hex.txt that is identical to commands.txt, but it has hex codes in the parentheses
 
5:49 AM
@Dennis Hmm. Input validation. I think the issue there is that stack-based languages are not well-suited to multiple branches and edge cases.
I'll have to keep that in mind for the next language I make...
 
@phase it seems you're porting O to Nintendo systems
 
@Mego something like 255(ff) (6): does stuff should work fine
@Hipe99 maybe... ^.^
 
Why just those?
 
@Hipe99 What else did you have in mind?
 
Anonymous
@phase I'm lazy and don't want to have to rewrite my script that makes explanations.js
 
5:50 AM
@Doorknob's message is up to 46 ;-;
@Mego that won't break it though
 
@Mego what does ; do?
 
@Mego oh wait nvm
 
Anonymous
@TanMath duplicates the value on top of the stack
 
Anonymous
pop a: push a,a
 
@phase nothing in particular, just wanted to know why you were restricting yourself to nintendo
 
5:51 AM
@El'endiaStarman Well, you can't really compare GolfScript to our newer stack-based languages. It still surprises me that GolfScript used to do so well in challenges, since it has a very limited number of built-ins. In fact, only two of the 52 ASCII letters corresponds to a variable/operator.
 
True, true...
 
@Mego oh, so there are two a's?
 
@Hipe99 Nintendo systems have the most organized homebrew communities.
 
@phase that's true
 
Anonymous
@TanMath If your stack looks like [1,2,3,4,5] (with leftmost being the top), ; will make it [1,1,2,3,4,5].
 
5:52 AM
@Mego ok.. i understand, thanks..
 
But isn't Xbox using windows architecture?
(Oh, it's just Xbox one.)
 
Anonymous
@Hipe99 You can't sideload apps on Xbox unless you shell out a ton of money for a dev account
 
@Hipe99 no, Windows 10 just copied its design
 
@Mego Out of curiosity, why do you write the stack with the top on the left?
 
@Mego so I change the . to whatever I want it to do?
 
5:54 AM
@El'endiaStarman I was just thinking that
 
Anonymous
@El'endiaStarman I wrote it once like that and it stuck
 
Never too late to change...
Also, what happens if you print the stack? Top is on the right, yes?
 
Anonymous
Hmm?
 
Anonymous
The stack is internally implemented as a Python list. .pop() is stack.pop(0)
 
@El'endiaStarman I think so.
 
5:56 AM
@Mego why
It's SO much easier the other way around!
 
Anonymous
Probably
 
.pop() and .append(...)
 
Anonymous
But changing it now would break a lot of code
 
...how many lines of code do you have?
 
Anonymous
see github repo
 
5:57 AM
@Mego I'd recommend changing it at least for performance reasons, seriously.
 
Anonymous
@Sp3000 ಠ_ಠ
 
Or, if you really want to pop from the left for whatever reason, at least use a deque
 
Anonymous
Well
 
Anonymous
Sort of
 
5:58 AM
They're not - .pop(0) is O(n)
 
Anonymous
Huh
 
Anonymous
Ok maybe I will go in and change that
 
25
Q: Efficiency of using a Python list as a queue

Eli CourtwrightA coworker recently wrote a program in which he used a Python list as a queue. In other words, he used .append(x) when needing to insert items and .pop(0) when needing to remove items. I know that Python has collections.deque and I'm trying to figure out whether to spend my (limited) time to re...

 
Okay, Seriously's commands.py has 513 lines of text. Minkolang's minkolang_0.12.py has 1098 lines of text.
 
Anonymous
6:00 AM
I deleted my stupid shame
 
And note that I am seriously (pun not really intended) planning to change the stack to a custom class because I have so many a = stack.pop() if stack else 0 lines of code.
 
@El'endiaStarman actually* (someone better not make a language named that)
 
@El'endiaStarman oh hey maybe I'll do that in my python implementation of Rotor.
 
Anonymous
@phase That's actually what Seriously 2.0 will be called, seriously.
 
@Mego I'm done with life.
3
dies
 
6:02 AM
@El'endiaStarman Told you ;D
 
@Hipe99 I thought @quartata was working on Rotor? Or are both of you working on it?
@Sp3000 I see (and saw) the sense in the suggestion. I just wanted to prioritize implementing commands... :P
 
:P
 
@El'endiaStarman writing a python implementation to get a feel for the language
 
@Hipe99 Ahh, gotcha.
 
Anonymous
I'm not sure which part of Seriously's code I'm more ashamed of
 
6:03 AM
@Hipe99 because everyone just writes a python implementation for things they don't understand
@Mego at least you don't have an interpreter that is golfed itself
 
Anonymous
old_stack = self.stack[:]
try:
    self.fn_table.get(ord(c), lambda x:x)(self)
except:
    if self.debug_mode:
        traceback.print_exc()
    self.stack = old_stack[:]
 
Let's play the game called "everybody code review Mego's code"
 
Anonymous
Or...
 
@phase 'let's write a python implementation of string theory!'
 
Anonymous
import cmath
import math as rmath
class MathSelector(object):
    def __init__(self, fn):
        self.fn = fn
    def __call__(self,*args):
        try:
            return getattr(rmath,self.fn)(*args)
        except:
            return getattr(cmath,self.fn)(*args)

class Math(object):
    def __getattr__(self, fn):
        if fn in ['pi','e']:
            return getattr(rmath,fn)
        else:
            return MathSelector(fn)

math = Math()
 
6:05 AM
@Mego That's......actually kinda clever.
I like it.
 
Anonymous
Wait I can improve that second one
 
It means you don't have to do a try except for every math function that will fail with some real arguments.
 
//stack
typedef struct{P*st;L p,l;}STB;typedef STB*ST; //type:stack,top,len
ST newst(L z){ST s=alc(sizeof(STB));s->st=alc(z*sizeof(P));s->p=0;s->l=z;R s;} //new
V psh(ST s,P x){if(s->p+1==s->l)ex("overflow");s->st[s->p++]=x;} //push
P pop(ST s){if(s->p==0)ex("underflow");R s->st[--s->p];} //pop
P top(ST s){if(s->p==0)ex("underflow");R s->st[s->p-1];} //top
V swp(ST s){P a,b;a=pop(s);b=pop(s);psh(s,a);psh(s,b);} //swap
V rot(ST s){P a,b,c;a=pop(s);b=pop(s);c=pop(s);psh(s,b);psh(s,a);psh(s,c);} //rotate 3
 
Fib = lambda n:int(phi**n/5**.5+.5) <--- oh god
 
@phase apl-style!
 
6:06 AM
goodnight you wombats
 
@phase what time is it for you?
 
Anonymous
@Sp3000 What's wrong with that lol?
 
@phase That looks like J source code.
 
@Vɪʜᴀɴ done
0
A: Across the alphabet

orlpPyth, 40 bytes +sm?-rdZGhd+hdsrVc2jktr.*rdZm!}kGd.:z2ez

 
@Mego Have you tried Fib(100)?
 
6:07 AM
@Hipe99 10pm, I'm going to go get a shower and food and stuff, night o/
 
Anonymous
@Sp3000 I know the spaces around the = could be golfed, but 2 bytes isn't worth it
 
@Mego I also have a mostly "no error" philosophy for Minkolang, but I do push something onto the stack when an operation fails (for some of them, at least).
 
@Dennis It's C...
 
@phase see you!
 
@phase Yes, the J interpreter is written in C.
 
6:08 AM
do I get bonus points
for ending my answer in 2ez?
too easy :D
 
Anonymous
$ time ./seriously.py -c ':100:F'
354224848179263111168

real 0m0.206s
user 0m0.031s
sys 0m0.140s
 
@Dennis oh you mean the source code of J
 
100th Fib is 354224848179261915075
 
Anonymous
Hmm yeah that's a bit of a problem
 
You don't need the speed, you're just sacrificing accuracy by bringing in floats
 
6:10 AM
@orlp maybe a +100 bounty if no one else beats you :D
 
@Vɪʜᴀɴ how dare you insinuate my answer is not perfection itself
 
Anonymous
@Sp3000 Is there a sublinear algorithm for fib that doesn't involve floats?
 
@Mego yes
@Mego plethora of options
In mathematics, the Lucas sequences Un(P,Q) and Vn(P,Q) are certain integer sequences that satisfy the recurrence relation xn = P xn−1 − Q xn−2 where P and Q are fixed integers. Any other sequence satisfying this recurrence relation can be represented as a linear combination of the Lucas sequences Un(P,Q) and Vn(P,Q). More generally, Lucas sequences Un(P,Q) and Vn(P,Q) represent sequences of polynomials in P and Q with integer coefficients. Famous examples of Lucas sequences include the Fibonacci numbers, Mersenne numbers, Pell numbers, Lucas numbers, Jacobsthal numbers, and a superset of Fermat...
just dig around in the equivalences there
U_n(1, -1) is fibonacci
 
> Another consequence is an analog of exponentiation by squaring that allows fast computation of U_n(P,Q) for large values of n.
^ That's a good place to start.
 
I had ideas for making the design better in my python rotor implementation
But then i got tired
 
Anonymous
6:16 AM
@El'endiaStarman Yeah, but squaring large values is like the opposite of constant time
 
@Mego And phi**n isn't?
 
You wanted sublinear though, right? Exponentiation by squaring is sublinear
 
Anonymous
@Sp3000 Not when squaring a long is O(n)
 
Anonymous
x**n is logarithmic in ints, but linear in longs
 
Anonymous
I'll just do the iterative formula
 
6:18 AM
Unless mentioned otherwise I always assume the Transdichotomous model of computation
 
Anonymous
That's a poor assumption to make with exponential sequences
 
it makes it very hard to compare algorithms otherwise
 
@Mego How does that compare with exponentiating a float?
 
I mean, do I really need to explain the FFT to someone when I need to explain the complexity of my algorithm?
just because theoretically the FFT multiplication will be best asymptotically
 
Anonymous
def Fib(n):
    if n<2:
        return n
    a,b=1
    while n>2:
        a,b,n=b,a+b,n-1
    return b
 
Anonymous
6:23 AM
Much nicer
 
Anonymous
I should also check my fib index algo
 
Anonymous
Oh man
 
Anonymous
That fails so badly
 
Anonymous
Why didn't I test that with bigger values
 
@Mego what is your 'fib index algo'
I am hoping for it to be twisted
 
Anonymous
6:26 AM
In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence: or (often, in modern usage):  A000045. By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending on the chosen starting point of the sequence, and each subsequent number is the sum of the previous two. In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation with seed values or The Fibonacci sequence is named after Italian mathematician Fibonacci. His 1202 book Liber Abaci introduced the sequence...
 
I just added Visual Studio as a non-steam game XD
(I have no life) ;_;
 
I know what the fibonacci numbers are
 
Anonymous
@Hipe99 Click the link, read the section, be enlightened
 
Anonymous
(oneboxes don't show you the selected section unfortunately :()
 
OK
How did it fail?
 
6:31 AM
HOLY SHIT
MY REP
2
IS OVER 9000
 
@orlp +9001
 
Anonymous
@Hipe99 Floating point exponentiation, just like the other algo
 
@orlp my rep... is over 50.
 
My rep is over 90.00!
 
Anonymous
I should start working on the Python 3 conversion
 
6:33 AM
@Mego it's not too hard
 
@Mego YES. That is a good idea!
 
Anonymous
@Hipe99 You say that, but you don't realize the core of the interpreter deals with byte strings
2
 
@Mego oh dear
 
Anonymous
Yeah
 
@Mego i was gonna say most of the work is the prints
 
Anonymous
6:35 AM
I should probably future-proof and unicode-proof it
 
Anonymous
@Hipe99 No, most of the work is the maps and ranges
 
Anonymous
A lot of stuff works (albeit inefficiently) because map and range return lists in 2
 
@Mego ah, xrange
Forgot about those. started with python 3 so...
 
@Mego In some cases, those will still work in 3. Mostly cases where you iterate through them.
 
Anonymous
@Hipe99 Nope. xrange is in Python 2. The difference is, they return custom generator-like objects.
 
Anonymous
6:37 AM
(maps and ranges in 3, that is)
 
For others where you have to use L = list(...), you may instead do *L, = .... Both will work.
 
@Mego that's what I meant
 
> IS OVER 9000
> MY REP
sigh oh, starboard...
 
Wait
I got a badge
'Talkative'
 
@El'endiaStarman I hope we're not trying to golf interpreters here :P
 
6:40 AM
@Sp3000 Hehehehe. Although, really, that's kind of a tame golf.
 
Anonymous
@El'endiaStarman That doesn't work so well when most of the offending code is in lambdas :P
 
Oh, nevermind then. :P
 
@El'endiaStarman each of you is replying to the other. how is that even possible?
 
@Hipe99 Eh? You mean using the reply function like you just did?
 
@El'endiaStarman I fixed it
 
6:43 AM
@Optimizer :D
 
Anonymous
@Optimizer No, you made it worse
 
Anonymous
Downstars would fix it
 
shudap
 
Phase and fisheye left at the same time.
 
Anonymous
 
6:50 AM
SOCKPUPPET CONFIRMED
 
What does a 10cm^3 cube look like O_o
 

« first day (1752 days earlier)      last day (3092 days later) »