« first day (1900 days earlier)      last day (2944 days later) » 

3:00 AM
99.99% use cases for ranges can be done better with for loops
 
what
llama@llama:~/code/rust$ grep -oR '\.\.' **/*.rs | wc -l
155
 
Um, what about ranges used for for loops?
 
I have 155 instances of the range operator in my Rust directory
and I don't even have much stuff in there
 
@El'endiaStarman how do you pronounce your name?
 
@AlexA. why would you do that
 
3:01 AM
@Downgoat for x in 1..10 { ... }
I think he means that
 
@Downgoat Because you want to loop through some integers, say 1 to 10, without like six extra lines of code?
 
that is shorthand for for (x = 1; x < 10; x++) { ... }
not a range function
 
no it's not
 
@AlexA. for loop is one line?
 
@Downgoat ok where did you get this idea because it's not true in any language at all AFAIK
 
3:02 AM
@Doorknob looks an awful like a for loop to me
 
what if you need to do stuff with x
 
@Downgoat Okay, write a Python for loop without range where the index goes from 1 to 10.
for i in range(1, 10):
    print(i)
 
@AlexA. it is pythons fault for being so bad that for loops require an array to interate from one number to another
 
uhhhhh
> for
 
@Downgoat Look what I just wrote. It is a for loop.
 
3:04 AM
@AlexA. see update
 
range is not an array
 
They don't require an array
Yeah, in Python 3
 
but if your language supports for (a;b;c) style-loops. A range is only a shorthand
 
no, it's really not
 
Not at all
 
3:05 AM
please give one case where I could only use a range and not a for (a;b;c) loop
 
please give one case where I could use a while loop and not a for
that doesn't mean while is a "shorthand"
 
It's a shorthand, what else would it be besides a synonym for shorthand?
 
@Downgoat uh what?
 
@Doorknob for loop is pretty much shorthand / syntactic sugar for while
 
... what?
 
3:07 AM
@QPaysTaxes really?
how
 
is the exponentation operator "syntactic sugar" for repeated addition?
 
@Downgoat you can write everything in BF but that doesn't mean everything is shorthand for BF
 
for (a;b;c) === a; while(b) c;
 
@QPaysTaxes .u'i sai
 
@Doorknob it is semantic sugar, yes
 
3:08 AM
didn't we establish that everyone uses english already
 
@Downgoat what does that even mean
 
@poi830 that is completely different...
 
@poi830 .i .a'o drata binxo .i mi lojbo .ui baupli .i mi pacna lo nu ro do co'e
 
v
there is no difference in semantic meaning between for(a;b;c) and a;while(b)c;
 
and ranges do not in any way, shape, or form compile to the same thing as a traditional for
 
3:10 AM
@Doorknob I thought a range was for in some languages according to what I've been told?
 
...
8 mins ago, by Doorknob
@Downgoat ok where did you get this idea because it's not true in any language at all AFAIK
 
9 mins ago, by Doorknob
@Downgoat for x in 1..10 { ... }
 
@Doorknob .few .a'jf asdja jlew .a jfds kfew pasod
@Doorknob i only speak real languages
@Doorknob and also spanish
 
@QPaysTaxes I meant to say syntactic sugar
 
isn't for always shorthand for while?
 
3:11 AM
My point is. You do not a range function when you can do for(a;b;c)
 
@poi830 .i zo'o .o'o nai fatci fa lo du la jbobau cu bangu
 
@NathanMerrill they have no semantic difference in meaning but apparently they are completely different and you are silly if you think otherwise
2 mins ago, by Doorknob
and ranges do not in any way, shape, or form compile to the same thing as a traditional for
 
I think something you're missing here is that Python's for iterates through whatever iterable you give it.
 
@QPaysTaxes because that's what the original conversation was about
 
@Doorknob .i no hablo lojban...o?
 
3:13 AM
@Downgoat: Print out each character in a string on its own line, using a for loop.
 
@Downgoat I'd argue the other way. I pick while over for due to semantics, but functionally, they are nearly identical
 
@NathanMerrill that is what I was saying
 
for char in "string":
    print(char)
 
ah ok :)
 
3 mins ago, by Downgoat
there is no difference in semantic meaning between for(a;b;c) and a;while(b)c;
 
3:14 AM
this is quite possibly the dumbest flamewar I have seen here ever. can we just drop it
 
@El'endiaStarman JavaScript: for (i of "string") console.log(i)
 
@Downgoat Non-ES6.
 
@quartata yeah but that's no fun :D
 
@quartata The dumbest one is Tabs v Spaces
 
4 spaces 4 life
 
3:15 AM
@El'endiaStarman Pedantic note: That has a trailing newline :P
 
@El'endiaStarman what is wrong with ES6? JavaScript was shit before ES6
 
reminder that while loops have no place in "pure" code
 
@ZachGates I never said that wasn't allowed. :P
 
It should have a trailing newline. It's so annoying when programs output things without trailing newlines. :P
 
3:16 AM
@Doorknob True
 
@QPaysTaxes beautiful
 
@QPaysTaxes Yikes
 
@QPaysTaxes If I ever need anyone to write good code for me, I will be sure to hire you
 
@QPaysTaxes you should make your class final
 
@NathanMerrill but the class is still a draft
 
3:17 AM
@QPaysTaxes not enough comments
 
also, you forgot reverse indentation
 
:D
 
@NathanMerrill reversed indentation is better than tabs and spaces and newlines and reverse indentation!
 
wut
 
@El'endiaStarman you never answered my question, so I'll make it more specific. Where do you put the emphasis in El'endia?
 
3:19 AM
Oh, @Downgoat, I just remembered a way that I used ranges without doing it in a for loop: when determining whether a character was the start of an identifier (alphanumeric symbol) -
def isPossible(val):
    return ord(val[0]) in list(range(65,91))+list(range(97,123))
@NathanMerrill First syllable.
 
@NathanMerrill IPA for your usernames please. :P /dɔːrnɑːb̚/
 
bah, I knew I was doing it wrong
 
@QPaysTaxes not enough comments, how do I know what // does?
 
I originally wrote it as "Elendia", but people were saying the first E silently, so I added the apostrophe.
 
@QPaysTaxes nice
@QPaysTaxes what about the regular spec?
 
3:20 AM
@QPaysTaxes it was a joke...
 
ˈneɪθən ˈmɛrəl
oooh, there should be an English to IPA challenge
(and a reverse challenge)
 
I would pronounce it more like /ˈneɪθn̩ ˈmɛɹɫ̩/
 
it depends on how lazy you are
 
@NathanMerrill Can I win by drinking an IPA?
 
Oh, and I think it's actually a pharyngealized "dark" l, /ɫ/
 
3:31 AM
@QPaysTaxes The Dark English Language Learners?
 
ko lifri lo xamgu nitce
 
@QPaysTaxes if that means something along the lines of "good night", then: Night!
 
mine glosses to "you-imperative experience a good night"
 
@QPaysTaxes dream about gold?
Okay...
 
.a'o gleki senva
 
3:39 AM
Avez une bonne nocturne
 
@Doorknob "[hope!] happy dream"
 
Oh we are saying stuff in weird languages? My turn! dafuijadshfuawenvauhjahflk jsadfjkhaskljh laueshfdsaj halksjfhkjehla
 
@GamrCorps last time I checked english is not a weird langauge
 
\o
 
o/
CRAP
 
3:41 AM
hahahaha
 
I hate my keyboard
the stupid ?/ is sticky
 
@GamrCorps ?
 
@Downgoat cizra ga'a su'o lo prenu
 
@Doorknob this language is more obscure to me than JS is to most people
 
.ie
 
3:42 AM
IE is bad
 
@Downgoat Its a running joke from the skype/discord chats that I never could type o/ correctly (I always typed it o?, and I did it again while writing this message)
 
@Downgoat .ie is the attitudinal for "agreement" in Lojban
 
@GamrCorps oh, yeah, I think I saw that deleted memes post
 
lol
 
I've often wondered: the Zen of python includes "Explicit over implicit", yet its not statically typed
 
3:44 AM
@NathanMerrill JavaSc— nevermind
 
@Doorknob Doorknob uses Internet Explorer confirmed?!
 
.i'e nai sai
 
@Downgoat JavaScape Navigator
 
@AlexA. wat
> there is little difference between users with high reputation and ♦ moderators
uh huh...
 
What do you disagree with in that statement?
 
3:55 AM
^
 
@Doorknob the "little difference" part... I'm not saying there's a huge difference but "little difference" is a little understatement
 
why?
 
76
A: Who are the diamond moderators, and what is their role?

Brad MaceWhat special privileges do diamond moderators have? Diamond moderators are human exception handlers. The main function of diamond moderators is to follow up on flagged posts but they also have some special abilities necessary to handle rare exceptional conditions: They have access to all the ...

All of those reasons
 
I see only 10 bullet points. Some of them are obvious (they have all the privileges of 20kers—that's the whole point of your quote), some of them are pretty trivial (convert posts to CW), and some of them are very rarely used (refund a bounty).
 
What are all the attitudinals in Lojban? they sound like an interesting concept
 
I should really try to learn it
 
They're one of the most fascinating parts of Lojban (to me). They're emotional indicators, and they can be attached to single words, groups of words, or entire sentences.
So I could say {.ai mi citka} -> "[intent!] I eat" to express my intent to eat something
or I could say {.ai sai mi citka}—sai is a "strong" modifier, making the emotion stronger "I'm really going to go eat"
 
Who, Rory?
 
You can also further modify attitudinals under emotional categories (social, mental, emotional, physical, sexual, spiritual)—the difference between {.oi ro'o} (physical pain) and {.oi ro'i} (emotional pain)
 
4:03 AM
Yeah
 
@Doorknob {.oi ro'( ͡° ͜ʖ ͡°)}
 
hmmm... how would lenny be translated into Lojban
 
Lennjban
 
probably {zo'o .e'u ro'u}—"[humorously!] [suggestion!] [sexual!]" >_>
 
@AlexA. you mean: ".lenn 'jban"
 
4:07 AM
@Doorknob which can be compounded into zo'o.e'uro'u
 
@Doorknob s/compound/golf/
 
4:25 AM
@AlexA. Python: generators are great but not quite good enough. For instance, range(0,10)+range(20,30) fails, and you have to do list(range(0,10))+list(range(20,30)). Also, if you want to reuse a generator, you have to cast it to a list because they get exhausted. And aside from that, "string".join([1,2,3]) will fail because you have to map each item in the iterable to a string, so "string".join(map(str, [1,2,3])).
These problems will of course be non-existent in Pytek. :D
 
0
Q: Uptown Function

EMBLEMWrite a procedure, function, (sub)routine, subprogram, or callable unit named uptown. uptown must: Take no parameters. Output the current temperature in Harlem, NY; Hollywood, CA; and Jackson, MS to STDOUT, separated by newlines. If a given temperature is greater than 100 degrees Fahrenheit (38...

 
4:46 AM
I SURE DO LIKE IT WHEN MY UPSTAIRS NEIGHBORS VACUUM AT 2 AM
24
 
5:16 AM
Hello
 
Anonymous
I'm kinda surprised that my OEIS CnR answer hasn't been cracked yet
 
Anonymous
@El'endiaStarman You just listed all of my least-favorite features of Python
 
Anonymous
Specifically the str.join(iterable_of_not_strings) thing
 
Anonymous
I can see why that design choice was made (explicit is better than implicit), but that aggravates me on a daily basis
 
Anonymous
And the worst part is, builtin classes can't have their attributes modified, so I can't write my own str.join(iterable) without having to use it like join(str, iterable) (which admittedly isn't the worst thing in the world, but being able to modify attributes of builtins would be really nice)
 
5:25 AM
@El'endiaStarman itertools.chain() if you want to save on memory
Also, tee
 
@Mego My least favorite thing about Python is Py— nevermind
 
@Sp3000 teehee
 
5:41 AM
/o\
 
That's teepee
 
/ಠ_ಠ\
 
That's a very pretty but disapproving woman with long hair
 
Chat minigolf: giving a string of digits 12, output the corresponding teepee line, e.g. for 12112
    / \        / \
/o\/ o \/o\/o\/ o \
 
If I have an output like

PID TTY TIME CMD
5392 tty1 00:00:00 bash
5393 tty2 00;00:00 bash

How can I take the first number of each process and kill it? (using bash)
 
5:49 AM
@Sp3000 Probably similar to something already but IMO another nice candidate for main. ;)
@phase What does that output come from?
 
I'm pretty sure Calka's already done something like that :P
 
@AlexA. ps -u phase | grep -i tty
 
@Sp3000 1. I think you're right, 2. lol @ "Calka", 3. with all of these chat minigolfs, you're becoming the next Calka. :P
 
You're going off a sample size of 2 on a day when I'm bored :/
 
Gotta extrapolate them samples bruv
 
5:51 AM
0
A: {Curly Numbers};

Mama Fun RollJavascript ES6, 64 bytes x=>eval(x[r='replace'](/{/g,'(')[r](/}/g,'+0)*4')[r](/;/g,'+1')) Explanation It's pretty simple: { => ( } => +0)*4 ; => +1 Example: {;};; => (+1+0)*4+1+1

 
@MamaFunRoll Yes, and?
 
Did I do something wrong?
 
Yes
 
What?
 
I don't know. But everyone's done something wrong at least once in their life.
 
5:53 AM
Did I do something wrong within the context of this question and my answer?
It seems a bit short.
 
I don't know. But everyone's done something wrong with their answer at least once in their life.
 
@MamaFunRoll You mean you aren't sure if your answer works? I'm confused.
 
@AlexA. I thought it was a facepalm face.
 
@phase kill $(ps -u phase | grep tty | cut -d\ -f 1) would work.
 
@AlexA. Yeah, pretty much. It's also that no one (I think) used that algorithm, even though it seemed so obvious.
 
5:55 AM
@Dennis Upvoted
 
However, if you have a command with tty as part of its name, it will kill it as well.
 
in spirit
 
Anonymous
 
If algorithms that match a lot are called greedy, should a command that can kill a lot of processes be called murderous?
 
Anonymous
@AlexA. Homicidal would be better
 
Anonymous
5:57 AM
Or, sticking with the sins theme, wrathful
 
@Dennis cut isn't returning anything, except a lot of whitespace: ` `
 
Anonymous
(since there are also lazy algorithms)
 
Seriously, try it online!
 
@phase You might be able to do something with killall -r
 
Anonymous
A process that listens on all available ports/interfaces could be called lustful
 
5:59 AM
@MamaFunRoll Are you going both ways, e.g. if the input is a decimal number rather than a curly number
 
Anonymous
A program that suppresses all errors/exceptions would be proud
 
Anonymous
A program that tries to prevent losing focus in a GUI environment would be envious
 
:28946077

    phase@alpha ~ λ killall -r tty
    tty: no process found
 
Anonymous
And a process that uses a lot of memory/CPU time/disk access/network bandwidth/other resources would be a glutton
 
Anonymous
There, the 7 deadly sins of computing
 
6:01 AM
@phase Oh, because the process name doesn't contain TTY. Hm.
 
@phase o_O What OS is this?
 
@Dennis Kubuntu
@Dennis I think it's because the process id line starts with a space before the number.
 
@Mego And the (unfortunately) lesser-known seven virtues?
 
Anonymous
@phase What about ps | grep '^\s*\d+'
 
That should match the same things
 
6:04 AM
This article may help: en.wikipedia.org/wiki/Seven_virtues
 
Anonymous
That would match the PIDs, then all you need to do is kill them
 
@phase Ah hell, justification. kill $(ps -u phase | grep -Po '^\s*\d+(?= tty)') should do the trick.
Not with the ^.
 
ps -u phase | grep -Po '^\s*\d+(?= tty)' worked
 
\o/
 
\o/
ninja'd
 
6:06 AM
It's okay, more than one can celebrate
 
Anonymous
/o\
 
Anonymous
Oops it seems I'm upside-down
 
Celebration is for Kool and the Gang. This isn't a Highlander situation.
 
pgrep should work for this, but I can't seem to convince -t to accept a wildcard...
 
killing them didn't work...
wait nvm
 
Anonymous
6:07 AM
So I came across this earlier:
 
Anonymous
2
Q: I didn't pin that

MegoI was looking through a chat transcript, and wanted to see a message's revision history. So, I clicked the arrow, and saw something interesting: I did star the message, but I did not pin it (I am neither a room owner in that room nor a moderator, so I can't pin messages there). Furthermore, th...

 
@phase If they have nine lives, use kill -9.
 
Anonymous
 
@Mego Wonderful. Now everyone on the Stack Exchange network already knows what kind of weird things the feeds bots in here say.
 
Um, Martin already took care of that.
 
6:15 AM
>_>
 
Anonymous
> what kind of weird things the feed bots in here are forced to say
 
25
Q: Regular users can indirectly delete feed bot messages

Martin BüttnerOnce more, The Nineteenth Byte has uncovered an exceptionally obscure chat bug. We noticed that, apparently, a regular user managed to delete one of the feed messages in our chatroom. I think that link only works for mods, so here is a screenshot: It turns out that he didn't actually delete th...

Elevening the feed bot messages appears to uncover a lot of bugs...
 
Anonymous
> elevening
 
SE Chat: The Elevening
 
Anonymous
user image
2
 
6:17 AM
hahahaha
 
XD
 
Anonymous
Use cases for browser developer tools:
99%: editing HTML entities/text for jokes
1%: actually debugging something
 
Anonymous
Oh crap
 
Anonymous
11
Q: "You have starred and pinned this message"—no I haven't

Doorknob Once more, The Nineteenth Byte has uncovered an exceptionally obscure chat bug. When I click the dropdown arrow from the transcript next to this message, I see: However, I've only starred it, and the message isn't pinned at all: I can reproduce this for any message that I've starred.

 
Another TNB regular. Why am I not surprised...
 
Anonymous
6:20 AM
The real reason for this chatroom is to be QA for SE chat (and subsequently get all of our bug reports )
 
@Mego brb, totally not doing anything
inspects element
 
Anonymous
Man, I miss CJY working at SE. He seemed to be the only one who would actually fix chat bugs :P
 
@Dennis Elevening?
 
mod abuse eleven
 
makes up excuse to send message
 
Anonymous
6:29 AM
Like we need an excuse for chatting here
 
@Dennis I assume this refers to a list of mod abuse possibilities
@Mego Well, I'm in class right now
 
Someone should really add that to the meta post...
 
Anonymous
> Abandon all work, ye who enter
 
Anonymous
> Great minds waste time alike
 
@Sherlock9 mod abuse -> mod abuse!!! -> mod abuse !!11!1!! -> mod abuse !!eleven!1!! -> mod abuse eleven -> eleven
 
Anonymous
6:31 AM
@Sherlock9 No, it's the dial that controls the strength of the mod abuse. It goes from 1 to 11.
 
@Mego s/11/10
 
@Dennis Ooh
 
It's just that PPCG mods don't follow the rules of numbers
 
Anonymous
@MarsUltor No, it goes up to 11.
 
6:32 AM
Or it's in Unary
 
@MarsUltor Ever heard of "turn it up to 11"?
 
Anonymous
I think he may be a bit too young for Spinal Tap :P
 
@Mego I still have basically no idea who Spinal Tap is, or why they're famous, but I've known of the meme for many years.
 
Anonymous
@El'endiaStarman It's a movie about a real parody band
 
6:36 AM
Ah, huh.
 
Anonymous
It's also the source of inspiration for the curse on the DADA position in Harry Potter
 
Anonymous
In the movie, bad things repeatedly happen to the band's drummers, causing them to have to get new ones frequently
 
Huh, TIL!
 
Anonymous
“Up to eleven,” also phrased as “these go to eleven,” is an idiom from popular culture, coined in the movie This Is Spinal Tap, where guitarist Nigel Tufnel proudly demonstrates an amplifier whose volume knob is marked from zero to eleven, instead of the usual zero to ten. The primary implication of the reference is one in which things that are essentially the same are seen as differentiated due to the user's misunderstanding of the underlying operating principles. A secondary reference may be anything being exploited to its utmost limits, or apparently exceeding them. Similarly, the expression...
 
Anonymous
It's a really good movie, one of those that doesn't try hard to be funny, but is funny because of how realistic and absurd the subject matter is
 
7:23 AM
I may watch it if it's that good
(I spent 30 secs writing good...)
 

« first day (1900 days earlier)      last day (2944 days later) »