« first day (2392 days earlier)      last day (2746 days later) » 

03:00
push, pop, peek and reverse
and it was supposed to have rotate but i forgot :P
is it possible to find largest number in an array with O(1) memory
@totallyhuman uh... that should be -2, right?
...that sounds right, but i'm pretty sure commata's switch works fine
lemme check
@totallyhuman your pop is probably 1-indexed
anyway it works for me with -2, thanks :)
def pop(self, index = None):
    if index == None:
        return self.items.pop()
    else:
        return self.items.pop(index)
yeah no it shouldn't be...
03:03
@totallyhuman well append(pop(-1)) does nothing to a list :P
oh
well great commata has been borked since forever
>.>
@totallyhuman I wonder if you've ever used that operator :P
:P
@totallyhuman also sheesh did i really compare to None with the equality operator >_>
@totallyhuman LOL
push height of stack hm, this seems kinda counterintuitive since it'll increase the height of the stack afterwards...
commata is one piece of badly written code
03:07
@StepHen Doesn't Brain-flak do that too
actually it's multiple pieces 'cause somebody told me it's a good idea to have stuff in separate files
@ASCII-only believe so, I wrote this spec over the last day or two and now I'm implementing it
so commata is exactly 5 pieces of bulldoodoo
@totallyhuman I'm keeping it in one file so I don't have to pass my stack to each of my 100 lambdas :P
@totallyhuman Well at least it has nowhere near as many files as Charcoal :P
@StepHen -infinity you have a global stack?
03:08
@ASCII-only it's not a very complicated language
yet
persuade me :P what are the disadvantages?
@StepHen Nothing
It's just bad practice (a bad habit)
@ASCII-only I know globals are bad but this is a simple interpreter
@StepHen That doesn't make globals any less bad
> Note that in Python, unlike C, assignment cannot occur inside expressions. C programmers may grumble about this, but it avoids a common class of problems encountered in C programs: typing = in an expression when == was intended.
hahahaha
@totallyhuman ... since when was that common
this is further proof Python was written for script kiddies
03:13
@totallyhuman when I started programming my classmates had conditions in C++ code that were if (value = true) {
...but... you use it
I kid you not
@ASCII-only it's like everybody in this chat writes perfect code
@totallyhuman Only because DLosc knew Python best
@totallyhuman Well it's PPCG, if you know how to make an eldritch abomination work you most likely know exactly when you've forgotten an == or ;
@ASCII-only oh my god do you actually say script kiddies
03:15
@DestructibleLemon yeah why
ok so: python: no assignments in expressions
c: no list comprehensions
@DestructibleLemon also no braces (well most importantly: whitespace significant)
honestly i can tell you which one I prefer
yep I prefer C too :P
@DestructibleLemon I will say, Python with assignments in expressions would make golfing better sometimes
03:16
Whitespace significance is evil.
@ASCII-only I would hate working with C, the lack of OOP would kill me
@StepHen still got list comprehensions though
@StepHen ye golfing
but practical code?
C has OOP, you just need to write it yourself.
I think @HyperNeutrino is allowing assignment in expressions in Proton :P
03:17
yeah
@ASCII-only you know script kiddies is a really dumb thing to say and has nothing to do with the topic at hand?
@StepHen That's why C++ exists
@ATaco that's like saying brainfuck has OOP, you just have to write it yourself
@StepHen he's even allowing 1 = b
@DestructibleLemon Yes but python is just that bad the two groups are basically the same :P
03:17
basically it's what crackers say like "uh duh you only have the right to cause harm to people if you can manually type the lines yourself!!!"
like, they're both dumb groups (crackers and "script kiddies") but one of the groups superiority complexes has slightly more justification
>.> this argument got really boring really fast
bye
@ASCII-only is this another REAL programmer talk thing?
and I'm not sure how not having assignments in expressions even makes sense in that topic
6 mins ago, by totallyhuman
> Note that in Python, unlike C, assignment cannot occur inside expressions. C programmers may grumble about this, but it avoids a common class of problems encountered in C programs: typing = in an expression when == was intended.
typedef struct _obj{
	int x;
	int y;
} obj;
:| :| :| :| :| why
03:19
That's almost OOP, kind of...
a REAL programmer will not accidentally type =?
a REAL programmer can take the time to write out assignments on separate lines
a REAL program rides a 30 story tall alpaca through Sweden.
@DestructibleLemon Sometimes it's harder to read
@ASCII-only ???
@ATaco what are you smoking? Can I have some?
03:20
Sometimes a REAL programmer doesn't want 30 extra lines of assignments
do I need to bring out the XKCD :P
^^
either you're abusing undefined behaviour or you can just use the variable after you assign it?
a REAL programmer uses Visual Basic, where = is assignment and comparison
Why is while (x=get(i++)){} bad..?
@DestructibleLemon wait what this makes 0 sense
03:21
@DestructibleLemon Not exactly, but a REAL programmer can kinda tell what the problem is pretty quickly if they run into it a lot
@ASCII-only A REAL programmer is not going obfuscate all of their assignments in some giant expression
Why are we capitalizing "REAL"?
Ironically I hope.
@DestructibleLemon Of course not
@Downgoat I mean, unless you're using the variable the outermost assignment is assigning to in the inner assignment, you can just assign the variable before using it in the expression
03:22
@PatrickRoberts because of the xkcd
I guess underlined caps == caps
@StepHen everything is all caps in xkcd :P
@DestructibleLemon 0/10 violates DRY
@DestructibleLemon then you can't assign it each iteration though :P
@DestructibleLemon that is not how loops work?
int x = get(i++);
while (x) {
    doSomething(x);
    x = get(i++);
}
03:23
@ASCII-only A REAL programmer can use multiple assignments on one line without assignments in expressions
Actually, I Much prefer while(x=get(i++)){} to x=get(i)while(x){statements...; x=get(i++)}
A REAL programmer would be more concerned about programming than rationalising a superiority complex
@DestructibleLemon if you don't have something to argue about with someone, what's the point?
A REAL programmer would not be able to take the square root of a negative number
Can we please stop this REAL programmer meme?
03:25
A REAL programmer would know that this is going to get moved to trash REAL soon
hmmm real is a weird word isn't it
how is "real soon" an acceptable phrasing?
semantic satiation? P
a real programmer would quit whining about other languages and use their preferred language
@Downgoat also the ways in which you can use it
@totallyhuman forgot the caps
Stack Overflow recently taught me that there are two types of technology: The kind that people complain about, and the kind that no one uses. Seeing arguments like this makes me believe clichéd claims like that.
@totallyhuman also you copied mine
03:26
What do you mean other people can like languages that I don't?
@DestructibleLemon what?
57 secs ago, by Destructible Lemon
how is "real soon" an acceptable phrasing?
@DestructibleLemon It isn't
@DestructibleLemon It's not, it's a bastardization of "Really soon".
03:27
@DestructibleLemon what are you talking about???
And furthermore, "Really soon" should probably be "Rather soon"
Is there a programming language named REAL yet?
because if not we need to make it
@StepHen does not count
if you program REAL, you can say, in all truthiness, "A REAL programmer would {something you would do}"
@DestructibleLemon no imaginary numbers allowed
only REALs
03:30
@StepHen I made this joke earlier
so, what kind of language should REAL be?
a real one
OK, but really, why does "test".split("") not work in Python
on the plus side, that emoji actually kinda looks like an orangy lemon with google's fonts
@StepHen str.split doesn't like empty separators
just use list('test')
@totallyhuman I know, but couldn't it just do if arg == "": return list(s)
@totallyhuman I know how to fix it it's just dumb
03:37
mm maybe
ok... next question... swap first and last items in list, in a lambda
@StepHen why don't you just do that?
@DestructibleLemon I do
but you'd think Python could
well, that would be unintuitive
@DestructibleLemon not from a JS perspective :P
and not after seeing "".join()
03:44
yeah but since when has js ever been intuitive?
@StepHen that works in a consistent way
I like JS.
ok, but it is insane still
That's fair.
+[]?
what is that equivalent to again?
@DestructibleLemon 0
03:47
classic
[] is truthy but [] == 0
!!+[] is false, !+[] is true
+!+[] is 1
![] is false?
@DestructibleLemon yes, and I dunno why, but ![] == []
oh wait I know why
03:50
fun times for you
[] evals to 0 and ![] evals to !true
[,,] == ","
just stay away from == :P never touch it, ever
03:53
[]==0 && !(![] == !0)
you guys: you can't have assignments in expressions!!! eww
@DestructibleLemon I was saying you should have that :P
also you: oh also we can't just use the default equivalence operators to check equivalence
@DestructibleLemon a REAL JavaScript programmer only uses === and !==
@StepHen I thought being a REAL programmer was about self flagellation?
03:55
aaaaa why are y'all infecting TNB with JS' madness
Because JS is good
no it's most definitely not
Ia! Ia! Javascript fhtagn!
@DestructibleLemon huh?
@totallyhuman The gods of JS disapprove of this ono why
03:57
@totallyhuman maybe this can help? mezzacotta.net/garfield/?comic=2688
@ASCII-only it's not bad, but it is most definitely not good with all of its crazy :P
some text of the first mezzacotta comic:
> I think this comic is going
downhill.
36
Q: Where did the phrase "Iä! Iä! Cthulhu fhtagn!" first appear?

ThunderforgeThere is a phrase that is pretty commonly known to fans of H.P. Lovecraft's Cthulhu mythos (whether or not they've actually read the stories or not): Iä! Iä! Cthulhu fhtagn! Sometimes a longer version of the phrase comes up as well (untranslated in his stories*): Iä! Iä! Cthulhu fhtagn!...

@totallyhuman find me a better language to make cross platform web-based (HTML) mobile apps like my boss wants
@StepHen CoffeeScript + Pug obviously
04:05
I swear, the bane of my existence is trying to get the index of numbers in an array where they are strings
@StepHen new RegExp(number).exec(string).index
wait array can't you just use find with the number casted to string
@ASCII-only yep
only problem is it takes me 10 minutes to figure out why 1 isn't in the array
every. freaking. time.
Um :|
Any mods here that can unfreeze this?
04:22
@ASCII-only uh oh :P
@StepHen ?
well g'night people on the other side of the day, I gotta sleep
> other side of the day???
05:03
Question: Are you allowed to abuse debug mode for golfing?
05:37
I wrote a program that lets me visualize the response of my lexer in real time and I it just helped me solve a bug that's been paining me for ages.
It's beautiful, I love it.
nice that's pretty cool
05:56
I just got the results I need to get into the uni I wanted :D
7
Congrats! 🎉
Anonymous
@muddyfish Hooray! Also I had no idea that you weren't in uni or already graduated.
@ATaco :| doesn't every good language have one of those
@Challenger5 what
Brain-flax @lt
(At least I think that's what it is)
@Challenger5 probably, but you need to count the space, dash and flag name in the bytecount
06:02
Hmm, I don't think I've seen that used...
Then again, I don't really study Brain-Flak answers that closely
@Challenger5 because it probably generally doesn't help
@ASCII-only Maybe, none I've ever written.
Take the number of digits and add 6, and that's how many bytes it takes
With a large, say, 9 digit number, it's quite possible that it's better than computing it
@Mego heh. I think I've mentioned it before. I got AAAC and the uni I wanted required AAA
Anonymous
@muddyfish I know those letters but not what they mean
06:09
They mean I did good
Grades go from A* being the best to E and then I being the worst
I got 3 A's and a C
Anonymous
Oh, good job
06:50
Where I can do some mapping of the complex plane ? i.e I give it some function $f(z) $(say, $f(z) = z^3-z^2+1$), and it shows me how the complex plane is trasformed ?
Say, an java applet or something like that ?
(Also, how to run the applets given here in Windows 8.1 with Java Version >7 ?
07:06
0
A: Sandbox for Proposed Challenges

Dom HastingsUnfurl a string Given a square string, produce all the output for the string at every stage of unfurling. Examples Input: A Ouput: A Input: DC AB Output: DC AB D ABC ABCD Input: GFE HID ABC Output: GFE HID ABC HG IF ABCDE IH ABCDEFG I ABCDEFGH ABCDEFGH...

07:36
0
A: Sandbox for Proposed Challenges

Kevin CruijssenUnfold in all directions code-golf Input: A string Output: 1) First we take remove character at the end of the input-string until we are left with a length that is a square root (i.e. 1, 4, 9, 16, 25, 36, etc.) So abcdefghijklmnopqrstuvwxyz (length 26) becomes abcdefghijklmnopqrstuvwxy (leng...

07:49
@AlexKChen just double click?
@AlexKChen as in it draws the new complex plane?
@AlexKChen here
 
1 hour later…
09:23
@muddyfish So AAAC >= AAA?
@ATaco Wow, really cool!
@flawr Yeah. I took an extra subject so it means I had a spare grade
Well congrats:) What are you gonna do at uni?
I'll be studying computer science
(Except for sleep, party and drinking booze)
09:26
Oh nice:) So CS with a minor in code-golf, right?
The one I'll be going to is ranked as 7th in the country for the subject and I only wanted to go to one other that's above it
pretty much :P
So UK if I remember correctly?
@flawr yes
Is it Nottingham? 'Cause computerphile :D
Warwick
09:30
So no muddyfish on computerphile =(
I'm so sorry
You should be :D
D:
*hides*
Sometimes I wonder whether I've actually seen some of the other golfers here IRL, without any clue that we chat so ferquently:)
that would be rather amusing
09:35
0
Q: Real base conversion

Luis MendoWe've had a few challenges for base conversion, but all of them seem to apply to integer values. Let's do it with real numbers! The challenge Inputs: A real positive number x, expressed in base 10. This can be taken as a double-precision float or as a string. A target base b. This will be an ...

0
Q: Reduce string to a snippet of the alphabet

MayubeGiven a non-empty string consisting of only lower and upper case alphabetical characters and spaces ([a-zA-Z ]), reduce it to a snippet of the alphabet, starting with the first character. To reduce a string, begin with the first alphabetical character, then remove every character after it that i...

woah that was fast
4 minutes !?!?!
@NewMainPosts slow down there bud, you might break something
@Mayube at least you got an answer faster ;)
@EriktheOutgolfer aaand it's gone
not anymore
10:09
aaand it's back
I just found a little mistake and fixed it...
@EriktheOutgolfer Hi
you're back!
Yeah !
(I for some weird reason can't delete the old account.)
(It doesn't matter anyway because all of them has 1 rep)
oh you did delete your old account, it's just chat
10:12
Anway, should I tell you the open seasame key ?
well the room is frozen rn (I let it be so that it doesn't get spammed)...I'll talk to the mod office over math.se to unfreeze it then you can come there
OK, after August, because I have the exam on 30th August
well then don't tell the secret key yet :p
:P OK
@ASCII-only Thanks. After googling around a bit, I found some good Wolfram Demonstartions too (but you need to donwload an 1 GB player to interact with them)
10:27
@LeakyNun ... We have a "not constructive" comment flag...
@wizzwizz4 it isn't a captcha
@LeakyNun It sort of is.
@wizzwizz4 alright
More importantly, it can be used as one to train bots.
But only if the bots are advanced enough to actually be contributors at that time.
(Unless passively.)
10:30
@LeakyNun umm, I remember seeing that as superuser.com hot meta question?
Does anyone know how to run Travis-CI with Java 8 / Java 9 instead of Java 7?
@TheLethalCoder I was opening VS to answer this, then I saw you commented, then I closed VS cause I know you would beat me to it :)
10:54
@LiefdeWen :P I usually do most of my answers straight in TIO now so I can do it quicker. Though I went with a naive for loop so you may be able to find a shorter solution with Linq.
@LiefdeWen VS has the advantage of intellisense and what-not, but the disadvantage of being bloaty, if you're trying to FGITW, going directly on TIO is better
requires existing knowledge of the libraries and such though
@Mayube To be fair for code golf you only usually use System and System.Linq so there isn't much to get used too.
true
but I could've sworn C# strings had a .IsEmpty() member (they don't)
You have the static string.IsNullOrEmpty. But for golf just use s==""
@Mayube If I had VS opened already I could've won maybe
11:03
To be honest I'm surprised you didn't answer before me cos I was trying to get a Linq approach working and just couldn't
@TheLethalCoder Like I said, when I saw your comment I just gave up
@LiefdeWen So many different approaches for C# you probably would have done a different one anyway.
I feel that C# gets so little love that spreading it among a few answers isn't right.
C#'s great
not for codegolfing
11:07
and thanks to Mono, you can even do C# in wasm
It does get little love, more answers might gain them more attention though!
Maybe
@TheLethalCoder s&&s=="".
Though in practice more answers only ever come when the question already has 30+ ones so the later ones get even less attention
@wizzwizz4 A string can't be truthy in C#, I'm guessing you're meaning s==null||s=""?
C# was my first language
and the only one I used for a few years
which is a shame cos I really like it but these days my area of expertise is backend PHP/Node dev
11:11
@TheLethalCoder C#?! .... Yes, that's what I mean.
Nice, it was the first main language and the one I'm currently using professionally.
@wizzwizz4 Well you can't do s&&s=="" in C# it will give a compile error about trying to convert a string to a bool.
@Mayube It was the first one I learned armed with no internet, a C# book and VS 2008, so it will always be my fave
I learned it in 2 weeks on an apprenticeship in 2013
I suppose technically I knew DarkBASIC, but eeeh
maybe I should do some DarkBASIC golfing some time
Oooh DarkBASIC, I looked at that but never actually did much with it
I looked at it for a day and then did nothing else with it.
yeah I used to make shitty text games
11:17
Technically I started with C and did the shitty text games in that for about 2 weeks and then I moved to C# and once I kinda understood it I did XNA
I touched on XNA after around a year
and I'm working on a MonoGame project atm
MonoGame is decent but when I used it they didn't have the level of shader support that XNA used to have and it put me off
they do now though
gunna say it's literally a port of XNA
it has everything XNA has
in the beginning they had this crappy tool to compile .fx files, which XNA's content pipeline just did automatically
now their content pipeline tool can compile the .fx files for you
not even the beginning, but like in 2013/4
 
1 hour later…
12:39
@ASCII-only as in it was midnight for me and the middle of the day for you
@StepHen APL: ⍕⍞⍞ (returns space,b,space,space,a,space)
@StepHen Braingolf, 4 bytes: # &@ outputs b concatenated to a, with a space at the end
12:58
@StepHen Actually (in APL, not in Actually), I think ⍞⍞ will do just fine.

« first day (2392 days earlier)      last day (2746 days later) »