« first day (2228 days earlier)      last day (2617 days later) » 

12:00 AM
Arm? Why would anyone use Arm? No one likes Arm.
 
I have two arms. I'd rather keep them, thank you.
 
@JanDvorak : yes, the alternative for answering my question is to have full knowledge of the elf format.
 
It is well documented, and I only need to generate one valid header...
 
@user2284570 No, one person needs to have full knowledge of the elf format.
Everyone else copies him.
 
@Pavel : arm eabi 5 please :)
 
12:03 AM
You could also create a copy of an existing Elf file and then fill it with nops.
And specify the new size in the header.
 
1
Q: Convert λ-expressions to SK-expressions

Challenger5The λ-calculus, or lambda calculus, is a logical system based on anonymous functions. For example, this a λ-expression: λf.(λx.xx)(λx.f(xx)) However, for the purposes of this challenge, we'll simplify the notation: Change λ to \ (to make it easier to type): \f.(\x.xx)(\x.f(xx)) The . in lamb...

 
O_O Apparently github API is mixing up stars with wacthers
 
so does the SE UI
 
?
 
I'm talking about the per-site bookmarking feature that SE has, called "favorite"
 
12:13 AM
@Downgoat You should have it be black/gray until you (star|fork|watch) it, then it turns (gold|blue|purple)
 
@DJMcMayhem oh good idea
I have question
 
What's your question Downgoat?
 
current if you click on those, buttons, it shows you all info. (e.g. shows you all stargazers)
How should I add the ability to star too
 
@Pavel :And specify the new size in the header. Along the offset. Yes, you crossed the problematic part. In order to be valid for chrome, the elf file needs to have a.shstrtab. and a .ARM.attributesin the case of armv7.
 
@Downgoat tap to star, tap and hold to see info?
 
12:15 AM
@Downgoat hmm, good question... Long hold?
 
I was thinking clicking icon stars it, and clicking text will show details. (text can have chevron at right side)
 
Ninjad
 
@Pavel perhaps I could do like twitter and show icons of people who have starred and clicking on those will show all?
Thing is, long hold doesn't have "discoverability" as Apple calls it
 
Oh, good point
@Downgoat Btw, I really appreciate the sample repo you've been using :D
 
Swipe right on the Stars/Watchers/Forks bar?
 
12:17 AM
@DJMcMayhem :D cglad you like it
 
@Downgoat make the konami code in goathub
 
It's an iPhone App. Entering the Konami code would be a pain.
 
swipes or when typing you type UUDDLRLRBA and hit enter
 
CMC: Write a Non-cheating Quine with a Prime Character Count.
 
Meh. I'd have to remember how to golfscript.
 
12:28 AM
Oh Golfscript, there was a time when that was the language to golf in.
 
At least it was documented ;-)
 
Back when you could still compete on PPCG without needing a special keyboard
 
RProgN would have been competitive!
 
How about q++, is that a cheating quine?
 
In which language?
 
12:31 AM
HQ9+
 
It is not cheating
It is a "language"
Here 99 bottles of beer 9
 
It is cheating, q reads directly from the Source Code.
 
Anyone know a math website where you can draw basic shapes on a euclidean plane? e.g. "draw a circle with radius 10 centered at 60, 50"
 
But, your program can't read the source code. It can only output it.
@HelkaHomba yes
that is, if Geogebra counts as a math website
 
Although, Hello, World! is a non-cheating quine in H9Q+, ironically.
4
 
12:35 AM
@JanDvorak Yes! Thankls
 
And is 13 characters, thus making it a prime-quine.
 
12:47 AM
The 3 'l's are random noops to pad it to a prime length
 
12:58 AM
@user2284570 add a brief explanation of an elf?
@HelkaHomba desmos is also nice
 
1:13 AM
@HelkaHomba Wolfram Development Platform
 
@Riker Can't you PM each other this stuff >_<
 
but why?
it's 1 msg, and other people in tnb might also like it
@ATaco it's not valid by our rules though
iirc it has to be payload capable or smth
 
0
Q: Palindromic Quine Polygot

Julian LachnietCreate a piece of code that runs in as many different languages as possible, and is palindromic (the same forwards and backwards), and prints its own source code. This challenge is scored by how many languages it runs correctly in. Major versions of languages can be counted as different languag...

 
@Riker No, there has to be a part of the code that can be identified as encoding another part of the code.
 
1:22 AM
yeah but it also has to be payload-capable iirc
 
No
 
That's debated.
 
@ATaco Nope, still cheating.
 
I never said it was wrongly debated.
 
Well, there is the fact that HQ9+ isn't a language.
 
1:23 AM
I'd rather 1\n1 not be valid.
 
Do you think 2i2i should be counted?
 
@ATaco it's not
@Pavel it is, it's payload capable (mostly)
 
It was, for a time.
 
I think
<somethinghere>2i<somethinghere>2i
 
@Riker No, it technically is. The second 1 encodes the first one and vice versa
 
1:27 AM
10
A: What counts as a proper quine?

Ilmari KaronenInstead of arguing about what counts as a "real" or "proper" quine, which I suspect is too subjective and context-dependant to ever permit a non-contentious definition, let me try to instead suggest a related, hopefully slightly less loaded dichotomy: Definition: A quine is payload-capable if...

> "Solutions must be payload-capable, and must not read their source code or use string eval."
> Definition: A quine is payload-capable if it can be extended, in some systematic manner, to include a "payload" of additional code capable of performing arbitrary computation, in addition to printing its source code. A payload-capable quine, in its base form, must include all the code necessary to carry and execute a payload, even if no actual payload is present.
 
Notice how that has half the upvotes of the other one?
 
what other one
oh, i see it now
also, that's a really bad definition (the encoding one) as it stands IMO
what's "encode"
"One can easily identify parts of the string which encode bits of the code that are outside the string"
 
Listen, if you want to change it, feel free to answer it yourself.
 
@ATaco where is it valid btw?
I think 1\n is what you mean?
 
RProgN, and no, it's 1\n1
 
1:30 AM
@Riker hmm, why is String eval forbidden?
 
1\n1 was valid in RProgN because it's not just two literals, each literal is printing the other one.
However, due to payload capable being an outstanding rule in the polls, it's no-longer valid.
 
Payload-Capable has almost half the votes of the other one.
 
If I have 1 rep and I receive a downvote and an upvote on the same question do I get 6 rep or 4 rep?
 
@ATaco ah, ok
@WheatWizard which comes first
applied in order
 
downvote
 
1:33 AM
Then the downvote is not counted.
 
then you get 5, for a total of 6
 
ok thats what I thought
 
@ATaco why is the second one explicitly printing the first?
I'd say they're each printing themselves
but I do'nt know much about rprogn
 
1\n2prints 2\n1
Because the implicit printing is backwards, because that's how I wrote it.
 
ah, I see
 
1:35 AM
In similar languages, like GolfScript, 1\n2 would print 12\n
 
ye
that makes sense in rprogn yah
and to some extent, it is payload capable
 
you can add most strings int he middle, right?
 
Not particularly.
 
like 1\n"potatoplshere"\n1\n
right?
or do strings not work
 
1:36 AM
That would print 1\npotatoplshere\n1
Strings aren't implicitly escaped, but numbers are fine.
1\n12\n1 would work.
 
hm, I see what you mean
hm, you can put an arbitrary string it if you enclose it in {}
 
In RProgN2, yes.
I did a few things with 2 that was an attempt to break our current quine definitions.
 
The q function returns the the current running function, for instance.
 
o_O like?
 
1:39 AM
RProgN2 doesn't care for your multi-digit decimals.
 
??
ah I see
 
RProgN2 considers each digit separately, the . thus combined the 1 and the 0.
 
ah
 
You can use $0.2, but that's obviously not a quine.
 
But... why?
 
1:42 AM
The resulting string of {} isn't taken from the raw string used to construct it.
It's a best guess from the concept array it was passed.
 
So, it's an array. Why isn't the array printed with some delimiter between elements?
 
Because a Concept array is just a fancy name for a function.
 
oic
 
The function {]+} is a valid usable function, and I'd like it's string representation to also look like {]+}. But it doesn't particularly matter if it looked like { ] + } or {\n\t]\n\t+\n} either.
 
Yeah, I see.
 
1:46 AM
@Riker Does it really have to be payload capable? For example, 2i2i is not, but I don't think it's a cheating quine
 
it is, sorta
 
How?
 
20 mins ago, by Riker
<somethinghere>2i<somethinghere>2i
 
Oh, I didn't see you guys had already discussed that example
 
Yeah, why don't you consider 2i2i extensible?
 
1:47 AM
?
I do?
 
Because it isn't really? I mean, you can add stuff before it, but you could always add a quine before something non-quiney
@Riker (I think he meant me)
 
q was my attempt to prove the possibility of a 1 byte quine, because it's uniquely encoded, but it was overruled by the fact that encoding done by the end-of-program doesn't particularly count.
 
ah ok
@DJMcMayhem that's the point, you can't always
look at 1\n, in most langauges with implicit output
 
So something is not a cheating quine as long as you can prepend a quine to it?
 
it's not easy (if possible) to add any string to it
@DJMcMayhem vice versa
something is not a cheating quine if you can append any non-quine string/piece of code to the beginning (or end, or middle, or anywhere) and have it still work
 
1:49 AM
The difference here was that q is not just outputting it, but it was also encoding half of the quine.
 
i.e. if you can carry a "payload" and embed it in the code, then it's allowed
 
@Riker But that's not true. If I put i at the beginning of 2i2i, then it does not output the first i
 
hm
i<esc>2ii<esc>2i?
hm, that doesn't work
 
I guess you could do ñéÑ~"qpÿ2A2A which is two quines next to eachother that luckily work
 
welp, I'm out for the night
 
1:52 AM
Can we have the definition of a cheating quine be I know it when I see it?
 
That would be great.
 
see y'all tomorrow
 
Bye
 
o/
@DJMcMayhem wut please explain
 
"welp. sorry, tnb. this is why i shouldn't say brb when i might not be back." ~~ sans riker
 
1:54 AM
@Pavel ñéÑ~"qpÿ --> "Boring quine" 2A --> Two times append: 2A --> The string '2A'
 
Oh, I forgot what A did.
Do numbers work on any operation?
 
However, the reverse 2i2iñéÑ~"qpÿ most definitely does not work
@Pavel Other than some minor exceptions (that are mostly oversights on my part)
 
So, I don't have a computer with Vim on it right now, but can I do 2:s/./&&/g to quadruple every character? (I might have done that wrong, eh)
 
Almost!
Instead, that doubles every character on the current line and the next line Try it online!
Would you like a vim solution or a V solution? Because in V you could do 2ñ:s/./&&/g but in vim the shortest would be :s/./&&/g<cr>@:
 
@DJMcMayhem This, more than anything else, demonstrates why I don't, but want to, use Vim.
 
2:01 AM
So far the Shortest Valid RProgN2 quine is "%q]F"]F
 
2BlackMagic4Me
 
(Although technically in V you would want 2ñÓ./&& instead, it's basically the same thing)
 
But there are a lot of ways to write a quine, like {']C'.}]C
 
@Pavel Haha, it's not too complicated. @: simply means Repeat last ex-command
You can always ping me with vim questions, I enjoy sharing it with people/teaching about vim
 
If I'm writing a language, how do I make it so that installing it adds a man page?
 
2:15 AM
@ATaco is it possible to have a hash of classes? E.g., HashTable<String, E> where E is an interface
 
Maybe?
RProgN uses a Hash of initialized classes, not the classes themselves, but it may be possible.
 
@ConorO'Brien That creates a hash of objects that implement E
 
HashMap<String, Class<Callable>> classes = new HashMap<String, Class<Callable>>(); does work.
 
so, then I could do classes.put("asdf", foo); new classes.get("asfd")();?
 
@ATaco HashMap<String, Class<Callable>> classes = new HashMap<>();
Golfed it for you.
@ConorO'Brien No. You would have to call .run() or whatever the method is called on it.
You can't just put parentheses after it, nothing in Java works like that.
@ConorO'Brien are you trying to store objects or classes you can create objects from?
 
2:20 AM
This doesn't seem to support interfaces though, you'll need to use a class parent.
 
@Pavel classes I can create objects from
 
@ConorO'Brien Hashmap<String, Class> map = new HashMap<>();
This won't let you validate that the class extends a particular interface at compile time, but you don't need to.
 
and then, map.put("foo", foo); new map.get("foo")(); ?
 
@ConorO'Brien Not quite.
Class is it's own class that has various methods.
map.get("foo").newInstance();
 
map.keySet("foo", foo.class)
 
2:25 AM
Is class static? I always forget.
@ConorO'Brien Yeah, sorry, I assumed foo was a Class object and not the name of the class >_>
 
and I can pass init args to newInstance?
@Pavel oh lol
 
@ConorO'Brien No. You have to call getDeclaredConstructor() on it, with the args you need.
 
do I need any special imports for this?
 
This is the point where you have to look it up in the doc, becuase it gets really complicated.
@ConorO'Brien I think it's java.util.reflect.* but I'm not sure. One second.
Wait no
It's part of java.lang
@ConorO'Brien map.get("foo").getDeclaredConstructor(Integer.class).newInstance(4);
 
o_o what does 4 do
 
2:29 AM
It's an example.
 
like, for args?
 
I'm assuming that the constructor takes an int as a paramter.
 
That's also what the Integer.class is for.
And then you get an object of type Object, remember to cast it to the necessary interface.
 
@Pavel and collections of Integers
e.g. ArrayList<Integer>
 
2:31 AM
@MistahFiggins That, my friend, is where it gets incredibly terrifying.
I have no goddamned clue.
 
about?
 
How to tell it that it expects an arraylist of integers.
ArrayList<Integer>.class is an error.
I just tried it.
Reflection and Diamonds seem to just give up and die on each other.
 
I assume Internally, it's a collection of Objects, and there is a wrapping mechanism that casts to object when adding, and to whatever is in the <...>s when reading from it.
@Pavel But that is weird
 
@MistahFiggins Not really, the diamond is only used in declaration.
Wait, I have an idea.
Wait, I'll test another idea first.
I may have forgotten to import arraylists.
No it's still an error
Yeah, I got nothing.
You can't seem to extract a Class object with diamonds.
 
I'm a bit worried about why you need to store an array of Class's.
 
2:39 AM
@ATaco There is that, we spent so long trying to figure this out that we missed the underlying problem.
 
Doing new ArrayList<Integer>().getClass() works
 
The X-Y problem is a train with no breaks for Java.
 
@MistahFiggins You mean it doesn't error. As far as I can tell, the resulting Class object has no knowledge of what was in the Diamond originally, and just gives the generic ArrayList class.
 
But it doesn't give you Integer
@Pavel Yeah, it gives you ArrayList
 
Exactly, so unless your constructor need an arbitrary arraylist as a parameter...
Fun fact. 4+' ' gives 36, but as an Integer object, not an int.
 
2:42 AM
this doesn't help?
 
It probably does, but I always forget what the things are called.
 
The Integer object is just a wrapper for int.
 
I just call them diamonds.
@ATaco I know, but just 4 gives an int.
 
I both love and hate that Integer exists.
 
I understand the reasoning behind it, but I still wish you could put ints in an ArrayList.
@MistahFiggins tl;dr, don't store Class objects, store strings, and use a switch-case.
 
2:46 AM
Better, store the objects themselves, and don't use a switch-case.
 
@Pavel Enums?
 
Right, forgot about those.
Yeah, use Enums
The point is, don't store Class objects.
Ever.
It does not end well.
 
Most efficient
 
ew
why not store class objects
 
@ATaco See, now that there is godawful
@ASCII-only Because java Reflection is terrible.
 
There is always a better way
@MistahFiggins No, that's RProgN2's code.
 
Rude. That's my shitty programming you're talking about.
 
@Pavel How?
 
Hey, we all have at least a class's worth
 
Use the SO post I linked, then class.getConstructor().newInstance(params)?
 
2:50 AM
@ASCII-only It's a bit uglier than that in actuallity, but in essense yes. But the point is, there's always a better way.
 
I looked back on one of my year old projects, for about 5 seconds before I noped out of there. It's like I accidentally balanced a bunch of toothpicks with code, and If I touch it, it will all break
 
Like enums
 
Enums are just a pain
 
I know
Reflection is more so
 
how
use reflection to get the object -> you're done! no more reflection!
 
2:51 AM
Enums aren't so bad...
Maybe for that instance they are though
 
Yeah, enums are useful a lot of the time but definitely not here
 
@ASCII-only Generics are pain tho.
 
It depends how flexible you want your language, and other things.
 
Ok, it's really nice that we have the Reflection API at all, and there are certainly use-cases for it, but in general it should probably be avoided.
 
@Pavel could I also use a hashtable?
 
2:53 AM
@Pavel no generics are the best
 
also, ^
 
Generics are nice. Generics+Reflection are pain.
 
as long as you don't need to nest them like >4 times
 
@ConorO'Brien Probably, I don't honestly know the difference.
 
2:54 AM
I just remember that Hashmaps are the fastest in 90% of cases.
 
@Riker this should be common knowledge as long as you known what android or Linux is. But ok, It’s done.
Can it be reopened now ?
 
what if I'm a windows user (like I am)
 
Or a noob (like I am)
(I know what an ELF is, but no idea how it's structured and such)
 
@user2284570 Maybe you shouldn't be concentrating on this particular question.
 

« first day (2228 days earlier)      last day (2617 days later) »