« first day (2313 days earlier)      last day (2524 days later) » 

11:08 PM
I'm pretty sure a-ta.co has a big security flaw because of the .jsd system I use.
 
...
9
Q: Prisoner's Dilemma v.3 - Petri Dilemma

GryphonA mad scientist has just created a new species of bacterium! He has decided to name it Noblus Gentlemanus, after observing its behaviour. However, his bacteria have ran out of food, and are have declared war, as they are able to harvest other bacterium's corpses for enough food to create copies...

the leaderboard...
the almost-a-joke answer comes second
 
@DestructibleLemon My Elephant was crushed... But it was so smart!
 
@ATaco *hacks a-ta.co*
 
seriously though, wtf happened
 
Actualy, first looks up what .jsd is
Then hacks a-ta.co
 
11:10 PM
To my knowledge, Nothing.
But It's Javascript Document to me.
 
I think I can win this petri dilemma
 
Re-inventing the wheel is how I roll (▀̿Ĺ̯▀̿ ̿)
 
70 tit for tat!!!11
 
What do you use it for?'
 
.jsd documents, when requested from a-ta.co, take any blocks of <script type="server/javascript"></script>, and executes them in a (very weakly contained) sandbox.
 
11:12 PM
So what you're saying is I can execute arbitrary node on your server.
 
If you can find a way to upload a .jsd file to my /www/www directory.
But currently, to my knowledge, I don't allow the creation of arbitrarily named documents anywhere in that subdirectory, so there's be no way to normally call it.
 
Question: if I have:
 
Then it's not a security flaw, it's just shitty code :P
 
@Downgoat *guetion
 
why
 
11:14 PM
class Foo {
    void method() {
        doThing(new Goat() {
            void otherThing() {
                // How do I call an INSTANCE method of the parent instance in which this is being called (of Foo)
            }
        });
    }
}
I try Foo.this but none of the fields are populated when I do that
 
@Phoenix It's a security flaw waiting to happen.
 
@Downgoat Is this Java
 
yes
 
class Foo {
    void method() {
        Foo scoped = this;
        doThing(new Goat() {
            void otherThing() {
                // How do I call an INSTANCE method of the parent instance in which this is being called (of Foo)
               scoped.thing
            }
        });
    }
}
 
I can't wrap my head around the function nesting.
 
11:15 PM
I think that works.
 
@Downgoat wait ono i spel quetion wrong
 
^^ Seems far too hacky. Then again, Java.
 
@ATaco *self
 
@ASCII-only ono :(
 
The point stands, Use scoping.
It works in Lua, after all
 
11:16 PM
@Phoenix ... How is this hacky
 
@ATaco 10/10 quality solution
 
IDK.
Why doesn't this.thing work?
You're not in an inner class.
 
Because this refers to the Goat instance.
 
@Phoenix ... You are, how is new Goat not an inner class
 
Wait I get it.
I was confused by the nesting
 
11:17 PM
I'm saddened print doesn't return anything, when it could return print so you could chain together prints.
 
@Phoenix :|
@ATaco example?
 
print ("Hello, World!")
("How are you?")
 
@ATaco there's a good reason why this doesn't exist
 
Or just print ("Hello, World!", "How are you?")
 
That tab sepeartes though.
 
11:19 PM
@ATaco solution: use cheddar
 
Chaining is newline separated!
 
who is hyped for my koth?
anyone?
 
I wish print returned the Printed string
 
And yes, Lua doesn't love your whitespace.
 
So you could use it in golfy ways.
 
11:20 PM
ok, I expected this
 
@DestructibleLemon what is the koth?
 
@DestructibleLemon Not really tbh
 
@Mendeleev dungeon of botdom
 
@DestructibleLemon no idea what that is
 
11:21 PM
0
Q: Log Scales are for Quitters

fireflame241Everyone knows log scales are for quitters. Therefore, you must write a program or function that de-quitifies a bar graph with a log scale given a base. The bar graph input is taken as a single string which is a list of bars, where each bar of the log scale bar graph is separated by the printab...

 
Is that your name for Maze KOTH or did that happen forever ago?
 

 Chatroom of botdom

Discussion of my dungeon of botdom koth
@Phoenix that got abandoned
if you want, you could try making a bot, and if you did, I would post the challenge
@Mendeleev wtf
 
exactly my thoughts
 
thank you
anyway, would you like to participate in this koth?
when it is soon posted to main
 
11:23 PM
link to sandbox post?
 
tbh that just has a bad description of the link I already gave
also I didn't bother with making a base class
yet anyway
 
@DestructibleLemon you what
 
@ASCII-only hey, they can still implement the things themselves
if you really want, I'll make a base class
 
-1 this will only discourage people from participating
 
fine
what happens if you have an import loop?
 
11:25 PM
i mean you don't have to but imo more people will participate if you have a base class so they don't have to reimplement some of the more simple stuff
@DestructibleLemon it breaks :P
 
What language are you using?
 
Welp, I have no idea how Python OOP works
 
Anonymous
@DestructibleLemon Nothing really, except your modules may be missing stuff when they get loaded initially. Try not to do them, but if you do, you should be mostly OK.
 
if I do from thingy import this specific thingy
would that be fine?
 
Anonymous
11:28 PM
Probably
 
@ATaco :( doesn't work
 
Anonymous
The only thing that causes problems is if you have a cyclic import and the module initialization requires something from that import
 
well, I might as well not risk it
 
@Downgoat Worth a shot.
 
ok now I made the base class
 
11:29 PM
See? Didn't take long
 
Anonymous
So if you have b.py: from a import x; y = a.x and a.py: import b; x = 5, then you'll have issues.
 
@ATaco already did shot and bullet went through but called 911 anyway :P
 
Anonymous
But if everything that depends on the other module is wrapped inside of a function or a class, you should be ok
 
If you name your file __main__.py, does that bork anything if you try to import it?
 
Anonymous
@Phoenix I'm about 90% sure the answer is "yes why would you do that what is wrong with you"
 
11:34 PM
 
also git didn't cache my special password
phoenix I blame you
 
Right, because your special password is special
It only caches ordinary passwords.
 
@Phoenix Thats like making a function called exit while you are in python's repl
 
yup, thats it
I'm disabling 2fa because it is too insecure
 
11:36 PM
@WheatWizard Works
 ~  python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def exit():
...     print 'foo'
...
>>> exit()
foo
>>>
 
Yes but now you need an interrupt to exit
 
Or EOF
The point being, it lets you redefine exit(), but you cannot import __main__
 
import __main__ doesn't error
 
See above TIO link
@WheatWizard or __import__("sys").exit()
 
Anonymous
@Phoenix Or __builtins__.exit()
 
Anonymous
11:40 PM
@WheatWizard It doesn't error, but it also doesn't work.
 
@WheatWizard am I the only one who doesn't use exit in python repl
 
I too use <C-d>
 
Anonymous
__main__ is already in sys.modules, so the import just silently does nothing
 
those underscores are there for a reason!!!
 
or __import__("subprocess").call(["killall","python"])
 
11:41 PM
<C-d> is also how I exit irb or Bash
 
I also use <C-d> but I used to use exit until I borked my repl by redefining exit
 
Anonymous
@WheatWizard I just yank the power cord out of my computer
10
 
Anonymous
That's also how most people exit vim
 
@WheatWizard What if you have other python processes running? __import__("subprocess").call(['kill', str(os.getpid())])
 
@Phoenix Good point, I also think my code doesn't work
 
11:43 PM
@WheatWizard Doesn't exit reset after reentering the repl
 
^
I also want to know what kind of repl you are running
 
Anonymous
@Phoenix Necessary sacrifices
 
If you assume there are no other python processes, pkill is golfier.
 
@Phoenix Yeah but it caused some weird things to happen I'm not 100% sure redefining exit was the root of the problem but as soon as I did it python stopped working
 
Anonymous
@WheatWizard Have you tried rm -rf ~ yet? 9/10 goats say it solves all problems
3
 
11:46 PM
Assuming you don't care about your computer ` __import__("subprocess").call(['rm', "-rf","/","--no-perserve-root"])` also works
 
I'm really bothered by the fact that it isn't the p part of pgrep that makes it search for proccesses by regex, but killing a process by regex is pkill
 
Ninja'd
 
@WheatWizard It does not, you need --no-preserve-root
Or rm -rf /* I suppose
 
Anonymous
@Phoenix For a long time, I thought pkill meant process kill
 
Anonymous
It took me a while to realize that was dumb
 
11:47 PM
To be fair, it's a dumb name.
 
@Phoenix Sorry, I didn't bother to test my code
 
0
Q: Radiation hardened semiquine

MendeleevChallenge Write two programs that: run in two different programming languages. when one program is run, it outputs the second program, and vice versa. The two programs must be different (no polyglots). Here's the catch though: The programs must be radiation hardened. This means that when...

 
How do you write a script that adds a man page for your program?
 
21
Q: How do I manually install a man page?

FlimmHow do I install a man page file system-wide? For example, if I have a man page file examplecommand.1, how do I install it so that I can just type man examplecommand to view it?

 
user image
2
@WheatWizard Thanks
 
11:58 PM
@Mego Doesn't it?
 
user165474
Hm. I'm still here. Interesting.
 
@Phoenix Where did you get that?
 

« first day (2313 days earlier)      last day (2524 days later) »