« first day (2086 days earlier)      last day (2755 days later) » 

9:05 AM
@ASCII-only forthlike syntax
I think. I haven't used forth. but commands don't take arguments and they don't need to be parsed, as commands don't interact, like [] do in BF
so it would be simple enough to str.split(), but for strings, if I include them I guess...
but I don't think I want strings anyway
so str.split() actually would contain all the functionality I need
Pretty much, this is simultaneously going to be one of the easiest but also most complex language interpreters I make, because the base is easy, but the language will have so many commands
hmmm, maybe I'll call my language 'split'
 
For some reason I have a  character in my input box... -.(o.o).-
The character in question is: 
 
the backspace
 
@DestructibleWatermelon Yes.
The TNB tab was loading, and I pressed Backspace to remove a 0 character, and... -.(o.0).-
 
should I call my lang split or dotsplit?
@wizzwizz4 must've pressed tab or something
 
9:27 AM
also I made the first part of the interpreter yay
 
Yay
 
#initial parts. This will be the least extended part,
#but I imagine stuff will be added for some language features
stack=[]
program=input().split()
pop=lambda:stack.pop() if stack else 0
for command in program: #the part that will be the most extended
    if command=="five":
        stack.append(5)
    elif command=="divide":
        stack.append(pop()//pop())
    elif command=="add":
        stack.append(pop()+pop())
print(' '.join(str(i) for i in stack))
 
I have 93 megs till tis nite
 
more language features will be added with little justification
 
How useful are list methods (e.g. Map, Some and Every) in an ASCII-art oriented language? Do they merit a one-char builtin?
 
9:29 AM
Screw it, making an IDE is too hard
 
@DestructibleWatermelon eww too many elifs
 
(Or I'm just bad)
 
@Qwerp-Derp Why not use Tkinter
 
@ASCII-only ewwww python doesn't have a switch case ;_;
 
@ASCII-only (We both know it looks terrible)
 
9:29 AM
Sad
 
I'm still wrapping my head around Python's Popen thing
So let's say I have a derp.py which is like this
 
{
    "five": lambda: stack.append(5),
    "divide": lambda: stack.append(pop()//pop()),
    "add": stack.append(pop()+pop())
}.get(command, lambda:None)()
@DestructibleWatermelon ^ Yes it does
 
if input() == "derp":
    print("Derp")
else:
    print("Nope")
And if I have another file, asdf.py, which is like this
p = subprocess.Popen("derp.py",
stdout = subprocess.PIPE,
stdin = subprocess.PIPE)

p.stdin.write("derp\n")
p.stdin.close()

print p.stdout.readline()
Does it print Derp?
 
@ASCII-only wtf is get
 
@DestructibleWatermelon iterable.get(key, default)
 
9:33 AM
@ASCII-only also I'm fairly sure you can make that another thing:
 
Whoops forgot the third lambda
 
{
"five": lambda: stack.append(5),
"divide": lambda: stack.append(pop()//pop()),
"add": stack.append(pop()+pop())
}[command]()
 
@DestructibleWatermelon It's like using a key except that you also get to specify a fall-back default when the key doesn't exist.
 
ok
@ASCII-only won't lambdas be more difficult to make functions with?
 
@Qwerp-Derp No, Popen runs via a shell, meaning you need to do something like this instead:
import subprocess
p = subprocess.Popen(["python3", "test.py"],
stdout = subprocess.PIPE,
stdin = subprocess.PIPE)

p.stdin.write(bytes("derp\n"))
p.stdin.close()

print p.stdout.readline()
 
9:39 AM
Ah
 
@DestructibleWatermelon What do you mean
 
can't use while loops for one thing...
 
Yeah, for small functions use lambdas, for more complex ones use a def and then "key": FunctionName in the dictionary
 
@Qwerp-Derp added
 
A beautiful song that I like more each time I listen to it:
 
9:43 AM
@Qwerp-Derp also added derp-nocase
 
lol
 
one of the design principles is no non-bugfix changes, so couldn't change the original function
 
@ASCII-only How would you call a js file using Popen?
Or a java file?
(Or any other extension, for that matter)
 
Hello
@TheveryevilROFLcopter I understand Popen now, yay!
 
9:49 AM
Cool
 
@TheveryevilROFLcopter γγγγγ∃H
 
@Qwerp-Derp Just ["java", "-jar", "file.jar"] etc
 
> js
> java
Lolwut
Oh replied to the wrong message
Nvm
 
9:54 AM
@Qwerp-Derp ["node", "file.js"]?
 
Easier in C /s
 
["gcc", "-o", "file", "file.c"] and then ["./file"]. really easy
 
I meant running a subprocess is easier /s
 
ahk
But not really here too... :P
 
9:58 AM
It's popen in c too
 
wait microsoft makes/made open source stuff O_O
 
PowerShell is open source, yep
 
You can do it in python as a string as well IIRC, just it's discouraged
 
And also TypeScript
And VS code
And F#
 
the future lies in open source
2
 
Halp
IDK what to do
 
Watiz the problem?
 
I have nothing to do right now
 
Same D:
 
10:19 AM
help me with split!
I'll start a github repo
the start of it
 
0
Q: How many answers does this question have?

Filip HaglundWrite a program or a function that outputs the integer number of answers this question has. Your solution should still work as more answers are added. Languages that run in a browser may be run from the js console while on this page. Otherwise, you'd probably have to download this page. Multi-la...

 
The new Mathematica will be Y
 
@DestructibleWatermelon github.com/tuxcrafting/y
It have a lot of 1-character builtins, it can so some basic plotting and I am adding image manipulation functions
 
I was referring to the sunset[] kind of functions part of mathematica
 
10:25 AM
Ahk
 
I need version control though
 
Git is a CVS... ?
 
please how do this with a single file
 
wait how use git
oh right there is that xkcd thing
somebody post pls
 
10:40 AM
this or this?
 
Yay, remaking the Atomas thing!
 
Back
@DestructibleWatermelon Wat? But to use GitHub you need to use Git...
 
???
GitHub is a Git server
@DestructibleWatermelon try.github.io/levels/1/challenges/1 Tutorial to learn how to use Git
 
10:57 AM
kthx
 
Ah fixed the question!
Please reopen it, guys
 
10
Q: A game of atomic proportions

Qwerp-DerpANOTHER ANNOUNCEMENT: I have revised everything (hopefully), please reopen the question. Your task make a bot that plays Atomas, with the highest score. How the game works: The gameboard starts with a ring of 6 "atoms", with numbers ranging from 1 to 3. You can "play" an atom between two atoms...

 
11:26 AM
halp the tutorial says to use git init but what if I want multiple repos (with different names)?
 
You use a different directory... ?
 
HOW DO I USE A DIFFERENT DIRECTORY?
 
YOU cd TO THE DIRECTORY YOU WANT
 
THANK YOU
Also how does merging branches work, if all the changes are in one file
 
@DestructibleWatermelon The file is overwritten with the merged changes
 
11:38 AM
it suggests having branches with different features, but how do you put both features together if the features are in the same file? I mean, how does it know what you've purposefully removed, and what just was added to the main branch?
 
Yo mama so short that I could win every code golf competition with her.
 
TBH I have never ran in this sort of merging conflict
Two things can happen:
 
@Qwerp-Derp change short to dense
makes more sense
 
The file is overwriten with the merged branch
 
@DestructibleWatermelon Hey, that rhymes!
 
11:40 AM
Git will only add things in the 'diff' (But it could bork everything if new lines are added)
 
k
hooray I know git now
 
wat
halp I did git push [args] why isn't working ;_;
 
11:58 AM
Are you serious?
 
I didn't literally write [args]
if that's what you're thinking
 
Ahk
What is the error message?
 
there is none D:
 
WTF
What is the repo you are working on?
 
it says everything is up to date, but it isn't changing ;_;
 
12:00 PM
Do you commited the changes?
 
... oh stupid lol
 
uhhhhh, how do I finish writing commit message?
 
git commit -m 'My very fancy commit message'
 
:q if you only did git commit -m
 
12:08 PM
hooray
 
@DestructibleWatermelon Wtf the builtins
 
? what do you mean
 
For your language
 
Yeah, they aren't specific enough
bye
 
You can only push 5 and 5 0 lol
 
12:33 PM
@DestructibleWatermelon Conflict, it tells you what changes were in each branch, you have to manually edit the file and commit to merge
 
@ASCII-only >10 ಠ_ಠ I have more than 40
 
@TheveryevilROFLcopter Thanks for reminding me to subscribe to more people's GH activity
 
Forgot that you/Conor/DW had GH
 
lol
Oh, I can't follow a GH organization?
 
12:50 PM
Don't think so? But you can subscribe to their Atom feed
 
1:14 PM
Welp, sliced my finger on broken glass. Woo!
So, McDonald's is giving this Coca-Cola glass out when you upsize. Seemed a bit fragile but didn't think much of it. Dropped it 10 cm onto the sink and the glass cut me as I tried to catch it
 
upsizing a McDonalds menu when they're already too big...
 
@Emigna Congrats on 10k! :)
 
Stop changing avatars aaaargh
 
pls
 
1:22 PM
@Fatalize nupe
 
@EᴀsᴛᴇʀʟʏIʀᴋ ... yours doesn't even fit Halloween
 
exactly
I don't really do halloween, but I'm fine with a brief avatar change.
 
still not spooky
2cutie4me
 
1:31 PM
@Fatalize It's too bad you can't upsize the burgers here. The McDonald's burgers in Indonesia are too small, in my opinion
 
1:44 PM
0
Q: Generate a 6 character string from a 15 character alphabet

James WebsterIn one of our projects at work, we recently discovered a particularly large method for generating a 6 character string from a 15 character alphabet. A few of us claimed "I bet we can get that in one line" which started a little internal game of code golf. Your task is to beat us, which I have no...

 
@EriktheGolfer not here
 
TNB == Timezone hell
»  flex --help | head
C:\GnuWin32\bin\flex.exe [-bcdfhilnpstvwBFILTV78+? -C[aefFmr] -ooutput -Pprefix -Sskeleton]
        [--help --version] [file ...]
        -b  generate backing-up information to lex.backup
        -c  do-nothing POSIX option
        -d  turn on debug mode in generated scanner
        -f  generate fast, large scanner
        -h  produce this help message
        -i  generate case-insensitive scanner
        -l  maximal compatibility with original lex
        -n  do-nothing POSIX option
\o/
 
@EᴀsᴛᴇʀʟʏIʀᴋ I can't see any "write post" text area.
But I am a Writer???
 
try refeshing/logging in out
yes
 
Oh, you created a PPCG blog
 
1:57 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Does not work, went to the sign-in email message, clicked the link, but why no "Write here..." or something?
And yes I signed out, and I'm in again.
 
not sure?
can you click the "write story" button at the top of the page?
and publish it to PPCG blog?
 
There is no such button, I'm on the homepage (of the "code-golf" blog, not on the general Medium home page).
 
do you see the little "PCG" icon in the top right?
 
My avatar?
I can't get it to publish in the blog itself, as far as I'm aware.
 
yes
hm
click the avatar, click new story
 
2:04 PM
I did that, but how do I publish in the blog?
 
Question: How to use flex and bison with CMake?
Wait nvm
 
@Downgoat can you try to add @EriktheGolfer (erikkonstas) as an editor to the blog?
maybe that's needed
idk
 
I think so. Note that Vihanb might be sleeping right now?
 
I can add a draft, but I'm not sure how to publish it.
 
2:05 PM
he is
he's in cali like me, and its' only 7am here
 
Wait; did you get up in the morning too? I got up 7:45am on a SATURDAY! (not fun at all)
 
0
A: Sandbox for Proposed Challenges

NeilShow the Key Signature Here is are the key signatures for the key of C♯ Major in the treble clef, and C♭ major in the bass clef: ♯ ─────♯─────────────────────── ───────────────────────────── ♯ ──────────────♯────────────── ───────────────────────────── ...

 
2:14 PM
@EᴀsᴛᴇʀʟʏIʀᴋ I was at work by 6:15 am. :P
 
lol
what do you do for work?
 
LOLZ GUD
 
@EᴀsᴛᴇʀʟʏIʀᴋ It's basically a janitorial job at the local grocery store.
 
And the store opens when??
 
@El'endiaStarman oh cool
 
2:18 PM
@EriktheGolfer I think you can buy stuff from 6am to 2am, but there are people restocking the shelves throughout the night and morning.
 
@El'endiaStarman Wait; oh god. I just... oh god....
 
... why would you go to a grocery store at 1am?
2
 
guess i have to make an "Early Awake" room... and make it a gallery.
 
@Fatalize I think I've done that at least once during college.
 
Can't you go to sleep and then go there the next day?
 
2:21 PM
@EᴀsᴛᴇʀʟʏIʀᴋ will do at computer
 
@Fatalize Sleep? What's that?
 
@Fatalize What's sleep?
Ninja'd...
 
@El'endiaStarman You can't seem to know what sleep is, because you work 24/7, no brakes??
 
@El'endiaStarman Although, I have less experience of it than you, having never actually slept. I mean, being younger than you...
 
2:23 PM
Protip: sleep well
 
@EriktheGolfer How could anyone sleep when you could be awake programming?!?
 
@wizzwizz4 You seem not to have this luxurious ability then.
@wizzwizz4 Or, being a mod at Christianity???
 
@EriktheGolfer If you actively moderate you need sleep. From what I've seen, if your site is high-activity, moderation is hard.
 
Seriously though, there were times where I slept from 3am to 1pm, and when you're hungry at 12:30 and you're out of food...
 
I find it moderately challenging occasionally, and there are fewer than 200 people on Retrocomputing a day!
 
2:26 PM
@wizzwizz4 That's what doesn't make sense. At least there are Sundays, so it might be a 24/6 work instead... might.
 
@EriktheGolfer If you're moderating a site that's active all the time, you can never take a break.
...
Why did I post a meta question about making Retrocomputing more active?
 
@EriktheGolfer ...I am legally required to take breaks, and I'm one of six people who do this job.
 
@wizzwizz4 I was talking aabout the janitorial work there, not modding.
@wizzwizz4 I think it was... GRADUATE!!!! On the other hand, why even graduate?
 
@EriktheGolfer Why not stay low activity?
Posting questions to keep your q/day scraping the top of the "site deletion" threshold?
 
@wizzwizz4 Dunno, that is so unfair... don't think being a golfer is easier though, you need to monitor for new questions and answer as quickly as possible with a maybe over-3000 byte function while someone else has alerady answered with a 19-byte function in the same language before your eyes and then...
@wizzwizz4 Maybe get migration overloads and higher rep requirements? (You know, most users need rep because they are not mods) I think staying Public Beta is the best.
 
2:32 PM
I don't golf regularly any more, except when a question catches my eye.
 
@wizzwizz4 That's why I included the golfer's struggles.
 
@EriktheGolfer Yes. But graduation is what all sites work for, so I have to ensure that the site graduates. :-(
It'll be good once it's graduated though, because I will have helped to guide a site to graduation!
 
Yay
For some reason gcc can't find flex/bison libraries
 
@wizzwizz4 At least do not get a theme, we're fine here in PPCG without a theme... at least until rep requirements are the same as just graduation.
 
@TheveryevilROFLcopter I had a similar problem. Try including the necessary files directly in the command line.
@EriktheGolfer PPCG has a theme, but it's a theme that all of the other beta sites have copied. :-p
 
2:35 PM
@EriktheGolfer If you want a theme, use Downgoat's graduation userscript
 
@wizzwizz4 No, I think that graduating without a theme is now allowed, so I'm really sure there is no theme, because otherwise rep requirements would have been too much higher!
@TheveryevilROFLcopter I have it, but I'm not using it at the moment.
 
It does not work well, especially in chat.
 
@EriktheGolfer those bugs were fixed >_>
 
@EriktheGolfer It works better than my version:
while(1){}
 
2:38 PM
@wizzwizz4 Do you know what I'm talking about?
 
@EriktheGolfer Yes. I do.
But my userscript is rubbish compared to Downgoat's.
 
@TheveryevilROFLcopter yeah, you need to explicitly link them
 
@wizzwizz4 It's dangerous, not just rubbish, to be serious. while(1){}? It seems like a finite loop to me... (finite, as in "the world will be destroyed sometime")
 
@EriktheGolfer Yes. I don't understand why it just freezes my browser, then after half a minute displays a "slow script" prompt.
It's almost as if my code is fundamentally broken!
 
@wizzwizz4 It got to work, you have a good start :P
 
2:43 PM
@EriktheGolfer I think I have a better version:
for(;;){}
It's a little faster.
 
@wizzwizz4 code-golfing is not for serious use...
 
@EriktheGolfer Are you sure about that?
 
@wizzwizz4 Well, except serious golfing.
 
@EriktheGolfer I wrote a very golfed piece of code to reverse a hash.
It ran just as fast as the next-best solution.
(The hash was a proper cryptographic hash, not just md5.)
They can be reversed! I'll show you the code:
def f(hash,hasher):
 x=0
 while hasher(x)!=hash:
  x+=1
 return x
Golfed:
 
Good morning TNB!
 
2:51 PM
It's 17h in France...
 
def f(a,b):
 x=0
 while b(x)!=a:x+=1
 return x
 
@wizzwizz4 What is that x++ there? I don't think Python supports it.
 
@EriktheGolfer I thought it supported x++ and ++x.
 
Nope, Python don't support ++
 
Oh. :-(
 
2:53 PM
Yeah, it doesn't, that's why you never see it.
 
>>> a = 10
>>> a++
  File "<stdin>", line 1
    a++
      ^
SyntaxError: invalid syntax
 
@TheveryevilROFLcopter Thanks for being helpful!
 
Wait
libfl define main so ld don't want to link my code
welp
 
But I think you can do def(a,b,x=0):, if I'm not wrong. I haven't seen anyone doing it, though.
 
@EriktheGolfer You can do that, but the , is same num of bytes as \n.
But \n &nsbp; is 2 bytes, whereas , is 1.
 
2:55 PM
@wizzwizz4 There is no leading space, though!
 
So, yes. That's an extra byte.
Oh, and NINJA'D!
 
I've made decent progress on my first PPCG blog entry.
 
@PhiNotPi :-)
Have you only just got a PPCG blog?
 
It's the new PPCG medium blog.
 
2:58 PM
my draft (on the topic of KOTHs) is over 1,000 words so far
 

« first day (2086 days earlier)      last day (2755 days later) »