« first day (2712 days earlier)      last day (1023 days later) » 

12:22 AM
To any of you who are good at brainflak: how do you clear both stacks?
@Zacharý ([]){{}{}([])}{}<>([]){{}{}([])}{}<> should work
NVM, the stacks were already clear (somehow)!
12:45 AM
CMC: print kalf-niarb in Brain-Flak...
and NOT kalf-nairb
Ah did I print the wrong thing
Either that, or I said the wrong thing
I will definitely thank you for it in the post... I don't want that balancing act to go to waste
Still says brian-flak instead of brain-flak when reversed
must have posted the wrong link
Read caird's profile
No -, but that'll do.
@Zacharý Are the Parens balanced without the use of comments?
1:01 AM
No, but that's not against the rules, considering no ones said anything yet when they were used starting at #2.
I'm not sure I understand
@CatWizard The parens ARE balanced, however, they use C/ObjC/D comments once.
Ok, because different interpreters for Brain-Flak deal with comments differently. For example if you use BrainHack you will need to balance the Parens, if you use RainFlak you will not. If the parens are kept balanced you can make a polyglot with the various different implementations.
Dear god no... since I used the name "brainflak" that's out of the question anyways.
again: thanks a lot for your help!
There would've been no way I could've golfed Brain-Flak
No problem, I rather enjoy shorter KCs in Brain-Flak anyway.
1:11 AM
Just in case: can you give me one with the -?
Not at the moment.
Q: Text to Brain-Flak

ChristopherYour challenge is to turn input text to brain-flak code that will output the text. Tutorial taken from here with permission here Brain-Flak has two stacks, known as 'left' and 'right'. The active stack starts at left. If an empty stack is popped, it will return 0. That's it. No other variables....

^ That is your friend
I almost always beat the machine but It is very good. It once had a World record Hello World.
@Pavel I saw your Brain-Flak answer to that. Somehow I had missed it.
Okay, I'll use it once then forget about it
@CatWizard I have BF answers?
3 too many bytes...
Ok give me a second
@Pavel Er, maybe that was someone else then. I lost the post.
1:19 AM
You can stop
@Zacharý 116
Not the best but it is short enough
I got the three bytes elsewhere, but I'll use that.
Don't try again, I already have the three bytes
Ok yeah, I need to write things out before I start writing brain-flak.
Keeping everything in my head obviously doesn't work
I'll definitely still keep the note about you.
Were you guys going to reopen the polyglot room?
I'm RO but I don't think that gives me the power to open it
1:28 AM
Don't awaken the gods just yet
(aka stasoid and Chance)
I don't know if they would even participate.
Okay, go ahead.
Ok, RO's do not have the power to reopen rooms.
at least that I can see
@DJMcMayhem then
Yeah, the room probably should be reopened, as it is for polyglot development
2:16 AM
@Zacharý Everything in that room?
in Polyglot Development, 38 secs ago, by Feeds
DJMcMayhem has unfrozen this room.
Up to and including this comment
Ok, I'll get that in 30 minutes or so (I can't move from mobile)
Or you could ask one of the other ROs
Nah, it's fine.
Any last comments before I post this?
2:38 AM
@DLosc Us folks over in the Japt room were wondering, do you plan on doing the Japt LotM post? If not, one of us can easily do it.
22 hours ago, by DLosc
I also think I don't want to be the one who has to post the new LotM every time, so maybe a meta question to clarify a procedure is in order.
If you follow the link you can see the full convo
@CatWizard Ah, thanks! Should've search for previous conversations on the topic
@ETHproductions Please do.
@ETHproductions Lord of the Mings?
@ETHproductions No problme.
2:44 AM
I was just getting ready to--then I saw you edit the nomination and thought, "Aha! Maybe someone else will do the work!" (Laziness: the first great virtue of the programmer.)
Ha :) I'll let @Shaggy do it if he wants, or I can do it myself tomorrow otherwise.
I'd just noticed the chat link pointed to this room rather than ours
@PhiNotPi Hmm... that sounds like a challenge title! Just needs a challenge to go with it.
Lord of the Rings: an abstract-algebra-themed king-of-the-hill
Don't know what a Ming could be
Ruler of Ming dynasty China, you could say
I was thinking of Ming Vases (warning: TVTropes)
2:58 AM
KotH where the objective is to break all of your opponent's Priceless Ming Vases
3:24 AM
Does a 1-byte Malbolge program invoke UB?
@ConorO'Brien pub challenge: get two telefrags in one game
I'm going to try it sometime
*one round
wonder if b4nny would do it
@quartata sounds fun.... does eureka effect teleport?
3:44 AM
It should telefrag, let me google it
Eureka Effect would definitely make it easier
Yeah it does
If you worked together with an enemy engi it would be trivial
3:57 AM
._. what is this jargon.
you should play it, tis a fun game
Q: Pleasanortmanteaus

DLoscA portmanteau word is a combination of two words that takes part of each word and makes them into a single new word. For example, lion + tiger => liger. Let's write a program to generate portmanteaus from a pair of input words. Computers aren't the best at English, so we'll need to establish som...

@ConorO'Brien Let us continue this discussion in chat... ;)
discussion continued! 'sup
Sup! The difficulty with bountying "no cheaty builtins" languages is, what counts as a "builtin that solves the task"? PPCG in general has struggled to define builtins, eventually deciding that builtins shouldn't be banned because we can't figure out where to draw the line.
4:07 AM
@Anush Why delete ...
@DLosc yeah, which is why I decided on a bounty -- it is, in the end, my whim and my subjectivity to award it. so if I feel like a language isn't playing nice, it's ineligible for the bounty. I feel like that's the easiest way to get people to play by "my rules" without having to get the entire community onboard with (heaven forbid) "subjective rules"
Then the problem is that I have to decide between winning the code-golf and being eligible for the bounty (which I might not receive anyway, if there's several answers that are eligible for it).
well how about this
I still want the original 15 challenges to count
but I'll weight the hidden challenges 5x heavier than the displayed ones, so cheating isn't really worth it.
4:24 AM
That would help. But a certain amount of cheating might still be worth it if it saves enough characters: e.g., a 2-character builtin that prints Greetings, Humans! will save at least 16 characters (probably more, since string literals have to be encoded using an alphabet of 10 characters). That's equivalent to 3+ characters in the answer to a hidden challenge--possibly enough to tip the results in a close contest. Or at least enough to make people think they will benefit from doing it.
Bad website design of the day: an account creation page where you specify your password, but there's a "Send my password via email" checkbox.
> Please note that sending your password has potential security implications.
At least they have that right.
2 hours later…
6:39 AM
@user202729 No one seemed to like the problem at all
1 hour later…
8:09 AM
@Mr.Xcoder what browser are you using?
@micsthepick Safari 11.1.1
can you try a different browser?
I trust you that it looks good on other browsers.
It's just unaesthetically pleasant for my Safari eyes :P
wait, can I install safari on windows?
I don't think so ¯\_(ツ)_/¯
8:27 AM
I had Safari on windows a long time ago
the last windows compatible version was released in 2012, Safari 5.1.7
2012, that was a while ago
I refuse to look at that screenshot, it is obvious advertising for an apple product :p
@micsthepick Thanks, but I barely ever open it and only use it to navigate to localhost pages, so I think I'm relatively safe.
you know that even localhost pages can be malicious (but they should be picked up by a decent antimalware)
but I agree, If you don't surf the web with it, it should be fine
@micsthepick How can localhost pages be malicious? I write them myself.
Q: Language of the Month for July 2018: Japt

ShaggyIn accordance with our meta agreement to have a Language of the Month, and since the list of nominations had a single highest-voted entry at the beginning of July, we have a new featured language! Throughout July 2018, our Language of the Month, nominated by myself, will be: Japt What's a L...

9:37 AM
@NewMetaPosts Huzzah!
3 hours later…
Ugh, Google is killing yet another useful tool: goo.gl
12:35 PM
I knew there was a reason I still used tinyurl.com
1 hour later…
1:41 PM
Where did Conor's comment on the starboard go
2:02 PM
Q: Saddle points in a matrix

ngnA matrix can be thought of as the altitudes of a surface in 3D space. Consider the 8 neighbours (orthogonal and diagonal) of a cell as a cyclic sequence in clockwise (or anticlockwise) order. Some neighbours may be higher than the original cell, some lower, and some levelled at the same height as...

@Poke His one about on-topic challenges? It just probably fell off because there are new(er) ones that took its place.
@AdmBorkBork i can't even find it in the scrollback
maybe i just suck at search
Jun 29 at 3:40, by Conor O'Brien
I despise this community's definition of valid challenges with more than I can express in words
ha that must be it, then
thanks adm
2:15 PM
didn't know about that tab
2:50 PM
Q: Filthy and Unique

Cat WizardIn this question I will talk about programs as strings, this is strings of bytes, not characters. How your resultant program is rendered or displayed is not important to this challenge, only how it appears in memory matters. A pristine program is a program \$S\$ that when run does not error, ho...

3:19 PM
When you deactivate a small experimental service you thought no one used and now 100+ GitHub repos have broken README badges :(
3:32 PM
Ah, well. I think I'll just put it back online next weekend.
here is a fun challenge which I don't have time to write. Write code that detects if a string contains 'a' then a vowel incorrectly. As in 'a apple'
This is harder than it looks
@Anush codegolf.stackexchange.com/questions/93264/an-a-or-an-an. It's not exactly your question but similar enough to be dupevoted
@dzaima How can people possibly have answered that?
E.g. a history but an historical event
@Anush For the sake of simplicity in this challenge, an precedes a word that starts with a vowel (aeiou), and a precedes a word that starts with a consonant.
It was simplified to be only aeiou based
3:35 PM
oh boring :)
I wanted a challenge that tried to always get it right
@Anush well you'd pretty much have to define all of english spelling to get it right
People speaking English can't get it right. Which one goes with herb?
@dzaima well.. you would need a phonetic dictionary
@AdmBorkBork In proper English? :)
@Anush is there even an actual 'proper english'?
What's "proper English?"
3:37 PM
when it starts with an h sound it is a when it starts with an er sound it is an
Note the smiley face above
so you would need to choose US English, say
@Anush good luck defining which one is when objectively
you mean there are too many variants of US english?
I suppose the easiest way would be to provide a phonetic dictionary
and say that was definitive
it was just a thought :)
Whatever happened to moving the stuff from the discussion room?
@Anush I mean I have no idea how definable english is (as I've learned 99% of it from watching random youtube videos) but it feels pretty impossible to "get it right" where there can be many, many definitions of right
@dzaima This is true.
3:48 PM
@dzaima right but my suggestion was to provide one phonetic dictionary which would be the definition for the question
@Anush by phonetic dictionary you mean just giving a dictionary of words & their IPA?
@dzaima right
Or a link to such a dictionary online
@Anush so it'd be just a lookup in the dictionary & check the first character?
sort of
"a history" and "an historical" is a tricky rule
I wonder if phonetic dictionaries tell you which syllable is stressed?
@Anush personally I'd say a historical but I guess I don't know 'proper english'
3:54 PM
you need that information to do it properly
hmmm "It is a traditional rule of English that an can be used before words that begin with an H sound if the first syllable of that word is not stressed. Indeed, some traditionalists would say it must be used before such words. Since the first syllable of historic is unstressed, it is acceptable to use an before it.

In the Corpus of Contemporary American English, there are 1591 incidences of “a historic” and 428 incidences of “an historic”, showing that usage of an before such words is dying out."
I give up :)
an historic... no
not usual english
maybe the code should just look the word up in the wikipedia and see how it is used :)
an historic is how I would say it
@dzaima THat's proper
@Anush okay that's as far from get it right as possible
sorry what is?
oh the wiki joke?
yes that was me giving in
3:59 PM
well actually no wikipedia might actually be a good way to do it in a way that people could agree with the definitions (and change them if they don't agree)
4:26 PM
@Riker My first thought was Gruyère, and the top post confirms that. :)
5:20 PM
Great ... I realized that I have to interpret statement separators separately in {} vs. in a program.
@Zacharý What is a "program"?
Something that's not in {}...
I'm saying I'd have to interpret 1⋄2 differently than {1⋄2}, I think I know how to do it...
I ran out of types to use, so I might as well create a class.
@Zacharý will in RAD {1 ⋄ 2} return 1 or 2?
@dzaima 1
aw. That returning 1 is the thing I hate the most about dfns
5:32 PM
⎕dfn? ... nah, too useless.
@dzaima Yeah, I'm with you on that. But the weird shy/no-result behaviour is bad too. Hopefully we'll get chained conditions soon…
Q: Draw a descendant pyramid (addition)

Luis felipe De jesus MunozChallenge Given a sequence of non-negative integers, create a function that output a descendant pyramid where the children are the sum of both parent numbers. The result is outputted as an string using tab \t. Note: trailing tabs on each line are not required 1\t\t2\t\t3\n\t3\t\t5\t\n\t\t8\t\...

@Adám I actually like those behaviors, because when they're combined: they let branching work
To any mod: Would you move this comment and all following comments to Polyglot development?
5:48 PM
@Zacharý unless I'm missing something, : is a way easier way to branch (that is, if : stops execution)
@Zacharý I don't understand. What I'm complaining about is that {1 ⋄ 2} gives 1 instead of 2, and that {_←1 ⋄ } gives a value error instead of 1. And I'm hoping {1:1:0} soon will give 0.
@Adám what do the first 2 1s in {1:1:0} do?
@Zacharý Can you give an example of the "branching" you're talking about?
@dzaima They are sequential conditions, as :If 1 ⋄ :AndIf 1 ⋄ 0 ⋄ :EndIf. E.g. {2≤⍵:⍵≤7:'in range' ⋄ 'outside of range'}
Ah, never mind. But I'll still have {1⋄2} give 1, as I've gotten used to that.
@Zacharý What's the downside to letting it give 2?
5:52 PM
@Adám What's the upside?
@Zacharý maybe I'm using APL wrong but I don't thing having 21 _←s in a dfn to get around that is very nice
@Zacharý ^ {'pco'⎕CY'dfns' ⋄ 1 pco ⍵}
Wait ... I know what to do!
(I mean I'm definitely using dfns for what I shouldn't be, but I find tradfns way too messy to use)
@Zacharý What? two different statement separators?
5:55 PM
@Adám I can't find another use for that.
@Zacharý my suggestion would've been have ; but that works too
@Zacharý What does it do?
@dzaima Disambiguated by being in brackets?
@dzaima The way A[1;2] is currently done makes that impossible.
@Zacharý why would you want multiple statements in []s
@Adám {1⋄2} returns 1, {1⍚2} returns 2.
5:57 PM
@Zacharý Oh, that's what you mean. But why would you ever write {1 ⋄ 2}?
returns the left argument, as long as it isn't shy. just returns the right argument. All of these would be parsed LTR (possibly RTL with trickery).
@Zacharý But the left statement will always be either shy or not. There's never any reason to write {non-shy statement ⋄ something else}, is there?
@Zacharý Also, btw, dfns don't terminate on non-shy statements, they terminate on non-assignments and guarded expressions.
@Adám Didn't know that
@Zacharý I'm with Adam on this - {1⋄2} should return 2 and there's no need for an alternative statement separator
one could use (and possibly a pair of parens) instead of
Then the question is: how do I implement : then
@Adám Maybe something'll be conditionally shy... say the result of {⍵=1:1⋄}.
6:12 PM
@Zacharý can't you just check if the condition is true and return?
Or, the most likely case: a bug happens that causes something to be shy when it shouldn't be...
@Zacharý why do you even need this "shy" stuff...
@ngn So ⎕←2 doesn't output 2 twice, and I've already gotten used to it from APL.
@Zacharý How is that conditionally shy? Actually conditionally shy: shy{⍺:_←⍵ ⋄ ⍵}value
@Zacharý there's a simpler way: if the leftmost part of the last expression is an assignment - don't print, otherwise - print
6:14 PM
@ngn Why do you need this "implicit output" stuff (other than in the interactive session)?
@Adám fair question :)
@Adám golfing...
@Zacharý APL is not a golfing language, besides, in a dfn, you can't use implicit output anyway!
@Zacharý why would you write ⎕←2 in an interactive session
CMP: should strings and characters be any different in RAD?
6:24 PM
@Adám wait so having any expressions after any non-assignment expression is pointless (and after an assignment, always useful)? god, dfns are worse than I thought
@Zacharý what do you mean? do you plan on having a string datatype (besides char arrays)?
@dzaima I mean, characters v. length-1 strings
@dzaima Correct. But watch out for empty statements after assignments, they cause your dfn to have no result (≠shy).
@Zacharý Not having scalar chars will cause an inconsistent mess.
@Adám js does that and it's not inconsistent, but I'd still prefer apl's way
@Adám oh god right fn←{⎕←'hi'} vs fn←{⎕←'hi'\n} is so horrible & annoying
@Zacharý well they can't be the same as ⍴scalar and ⍴,scalar are different
@dzaima I think he's suggesting that scalar characters just don't exist. I.e. (,'a')≡⊃'ab'
6:30 PM
@Adám how would that even work? that would be having a string type
@dzaima You're asking *me*‽
@Adám That concerns rank/depth of functions mostly, right?
@Zacharý Uh, what will 'a',(2 2⍴⎕A) give? LENGTH ERROR?
@Zacharý (⍴≡⍴∘⎕UCS)65 will give 0‽
@Zacharý so would a single character always be enclosed in an array? That'd break that on an array always removes 1 dimension, but only for chars
@Adám ('a' ('a' 'b') ('c' 'd'))
6:34 PM
@Zacharý Oh, I expected 'aAB' 'aCD'
@Adám That might happen as well...
Okay, I might as well rewrite RAD in D, but this time thinking things through beforehand...
@Zacharý But, if ⍴'a' is 1…
@Adám (⊂1)≡⍴'a', yes, that causes a WHOLE bunch of issues with function rank depth
I've already experienced that, "" not being the identity took me a while to fix (I think it's fixed, and " is a short form of ⎕UCS)
6:55 PM
hi all
I always think it's funny when you get more answers than upvotes :)
who are these people who post an answer but don't upvote?
@Anush ○/
I can't quite interpret that expression
@Anush Or more than one answer gets posted by a person...
It's literally one upvote below the answer count, nothing to fret over.
7:05 PM
right but I was hoping > 0 people who hadn't answered would also upvote
maybe it's just me that upvotes without answering
7:19 PM
@Anush Well, I personally upvote many questions without answering, but I often forget to upvote if I immediately think about possible solutions
@Anush people can forget to (e.g. being too busy being amazed at answers), can think a question is trivial (or too hard, just boring, or other reasons to not be upvote worthy), or have hit the upvote limit.
I generally don't upvote if I haven't read the entire question (which I don't if I'm just looking trough the latest questions)
7:36 PM
@Anush I only give out votes for questions or answers that are really worthy of an updoot or downdoot. I vote maybe three times per day, total, between questions and answers.
I don't think I've ever come close to the vote cap.
8:18 PM
After remembering generic inheritance is a thing I think I am ready to declare myself clinically insane
@Anush I definitely consider an upvote to be a higher bar to pass than an answer. I often will try a challenge out by writing an answer. If I find it fun I'll upvote, but I usually post the answer regardless. I don't downvote and answer however.
@Downgoat it's not so bad
@Downgoat I read this as "genetic inheritance" at first and was like "well, of course that's a thing ..."
@quartata I have been stuck implementing these for so long I have no idea how they should internally work. Because in like class A<T>: B<T> { } if I have T is TemplateType then B<T> can only be resolved when A<T> has a generic specialization but in a type expression let a: A<B<Int>> (for example) now we are doing B<Int> which is resolved but then A< ResolvedBIntGenericClass > means that now the whole inheritance chain needs to be setup again
but now I have to type-check it again because the superclass is different
@CatWizard Interesting
8:24 PM
I tried looking to see how clang does templates but then I remembered we are not doing C++ templates in the way they are like glorified macros
@Downgoat so you're saying the problem is that you resolve B<Int> first, then when you plug it into A the problem is then checking the constraint on Int
yeah, because since class A<T>: B<T> is basically type-checked as class A: B<Object> { typealias T = Object }
kinda sorta vaguely like Java type-erasure but in the actual output you have distinct classes/functions
So, you are doing C++ templates
but yeah we hack in generic types so that things like A<X>().f() where func f() -> T returns X
In that you emit distinct specializations
8:28 PM
So, basically, the real issue is just that you're doing it too early
You need to consider the whole type at once
You can't really check it if the information in B<Int> is gone and it's just some type
yes but that becomes more complicated. Since I basically have multiple classes, each is an AST pass. If I wanted to do that I'd basically clone the AST fragment (representing the class), swap T with the generic parameter and pass it through those AST passes again
Wait, when is specialization happening
the problem is VSL generates a lot of things like .parentScope and Scope classes so in this 'cloning the AST process and reprocessing it' you'd loose a lot of information
@quartata specialization happens as expressions are being resolved (either 2nd-to-last or last AST pass)
Oh OK I get what you're saying
8:31 PM
we have a TypeResolver which specializes in let x: A<T> and a TypeDeductor which specializes let x = A<T>()
The problem is emitting a new class?
@quartata yeah
Also given that we might specialize in the 1st pass, I have no idea what horrible side effects could occur given that now the specialized class is being evaluated while the rest of the program hasn't finished
8:59 PM
A: Sandbox for Proposed Challenges

Kamil DrakariUse Japt Shortcuts code-golfjapt Japt is the PPCG Language of the Month for July, and I'm excited to try it out! In accordance with the Tips post I should use the Unicode Shortcuts. However, my keyboard seems to be lacking those important characters like "upside-down exclamation point" needed f...

ok so I think if I do a really hacky type-erasure based evaluator this could work except now that means the trade off of not being able to construct based on generic params
2 hours later…
11:13 PM
Why does this line:
*(x + 4*n)
compile to:
 mov eax, n
 shl eax,0x4
 mov edx,eax
 mov eax, x
 add eax,edx
 mov eax,DWORD PTR [eax]
there is this shl eax,0x4 line which I would think does *(x + 16*n)
Do you mean in general? Constant factor integer multiplications are almost always optimized to smaller instructions, see Agner 2, page 148.
11:31 PM
@mınxomaτ in this instance, log2(4) == 2 so shouldn't it be doing shl eax,0x2?
@Downgoat I don't really know anything about pointers but my guess is that x is an int* so adding 1 shifts the pointer to the next int which is 4 bytes forward
*(a+b) is equal to a[b] and you wouldn't like a[1] of an int[] to point to 3 bytes of the 1st item and 1 byte of the 2nd
11:55 PM
Q: Concatenating n with n + 1

AmphibologicalIntroduction OEIS sequence A127421 is the sequence of numbers whose decimal expansion is a concatenation of 2 consecutive increasing non-negative numbers. Put simply, every number in the sequence is formed by putting together n with n+1 for some non-negative, integer value of n. The first severa...

@NewMainPosts if we were asked to only print the nth item instead, it would've been 1 byte in GolfScript

« first day (2712 days earlier)      last day (1023 days later) »