« first day (2433 days earlier)      last day (2528 days later) » 

9:01 PM
@TheWanderer Are you still here?
Uhg, I literally can't read code with the { on the same line as the statement!
 
9:12 PM
feels a need to post an egyptian image
 
@RobotHumans Purely out of curiosity, which style do you prefer for your brackets?
 
I like something like:
do something {
  whatever you're doing
  something else you're doing}
so the indentation speaks, and you don't need braces. makes it read more like python
 
@TheWanderer Wat --^
 
oh god my eyes.
 
@RobotHumans It's fuzzy for me too. You might need to right click and open in a new tab
 
9:19 PM
no, it's poorly written and taken in a two line dose so you can't see it
 
@RobotHumans That's not even why I was bringing it up... look at it again... :)
 
aside from the fact that it reads badly, the if uname is blank or password is blank do something. and the something requires another check as to which thing is blank. why not separate it to if uname is blank do something, and if password is blank do something
it would flatten the logic. it would be better
 
Exactly :)
Wow, that's a lot of indentation --^
 
must use lots of tabs
 
@AndroidDev "remove this chat" shudders. Don't they mean message?
 
9:25 PM
i think android_dev is trying to tell me to go away, but i'm not worried about it.
 
Eh?
 
hahahaha
 
@Seth If Zach had somehow rigged this to have mod access and allow the average user to delete this general room...
 
@AndroidDev where? There aren't any issues, just code lint
@Seth no, it's like closing the tab.
@RobotHumans how though? Those two conditions have to work independently, but also block the submission from happening if either is met
@AndroidDev isn't showing the full block; there's a reason for it
@AndroidDev that would be @NathanOsman. Idk how to use the chat API :p
@AndroidDev AlertDialogs have to be run on the UI thread because reasons
 
9:45 PM
@TheWanderer if you block on or, then evaluate each one independently, it's slow. blocking on each individually and acting intrinsically is both faster and better.
 
blorps
 
if a or b:
if a do something
elif b do something

is cleaner if you just say

if a do something
if b do something
@ThomasWard i'm sure that's a reference i don't get, but the sound of saying it out loud in my head made it funny
 
@RobotHumans that was the idea
in other news, Android Studio is a data space whore.
though I have a pretty decently stable internet so I'm downloading it decently lol
 
I remember questions about installing that from ages ago that got crossposted b/c brazilians were timing out during the download and eclipse didn't catch it
 
@RobotHumans well obviously it would be, but if neither is done, then something else needs to be done, but only if neither condition is met
 
9:49 PM
@TheWanderer that's why you have else
 
@TheWanderer have you heard of else if
 
@AndroidDev I'm not beating you up on that one, but he's looking for else not else if
 
Guys
 
Yes?
 
        if (mEmail.getText().toString().isEmpty() || mPassword.getText().toString().isEmpty()) {
                if (mEmail.getText().toString().isEmpty()) {
                    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N)
                        mEmail.setHint(Html.fromHtml("<font color='#ff0000'>" + getResources().getText(R.string.activity_authenticator_email_required) + "</font>", Html.FROM_HTML_MODE_LEGACY));
                    else
                        //noinspection deprecation
                        mEmail.setHint(Html.fromHtml("<font color='#ff0000'>" + getResources().get
 
9:51 PM
AAAAHHH!
Use pastebin :P
 
Mobile
@RobotHumans that's the full block
 
And that blob has context
 
@TheWanderer pastebin works on mobile. BLARGH.
grabs a hammer
 
I honestly don't see another way to do it
 
starts juggling hammers and chainsaws
3
 
9:52 PM
@ThomasWard since when is augr against code blocks?
 
user136984
Goodnight folks! :)
 
@TheWanderer bad indentation is bad
:)
 
@RobotHumans I could do two if else blocks for each one, but I think this is cleaner
@ThomasWard mobile is mobile
 
uhm
@TheWanderer you're working on that ChatExchange thing right?
 
Yehs
 
9:55 PM
either i'm missing dependencies
 
But it doesn't actually do anything
 
or you're developing for ancient crap
 
if (mEmail.getText().toString().isEmpty())
{
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N)
{
mEmail.setHint(Html.fromHtml("<font color='#ff0000'>" + getResources().getText(R.string.activity_authenticator_email_required) + "</font>", Html.FROM_HTML_MODE_LEGACY));
}

else
{
//noinspection deprecation
mEmail.setHint(Html.fromHtml("<font color='#ff0000'>" + getResources().getText(R.string.activity_authenticator_email_required) + "</font>"));
}
}

else if (mPassword.getText().toString().isEmpty())
 
It's API 15-25
 
@TheWanderer --^
 
9:56 PM
@TheWanderer Android Studio disagrees
 
@AndroidDev but if they're both empty that won't work
 
if A uname blank do something
if B password blank do an additional something
else startAuth

apologies for not catching the fallthrough straight away on two lines
 
@RobotHumans but that else only applies to B
 
@TheWanderer if A is blank it does nothing
 
@TheWanderer no, it applies to both.
 
9:57 PM
@ThomasWard Gradle versions don't correspond to Android versions. Gradle is 2.3.2
 
@RobotHumans erm, does it? IIRC, you need an elif in there
 
@TheWanderer Yes, it will --^
 
@TheWanderer well gradle sync failed so
i'mma beg to differ :P
 
no. a is a separate clause
 
9:57 PM
@AndroidDev no because it's an else if
 
@RobotHumans If you depend on A or B existing, then you need it as if/elif/else
that's just how Java if statements work
 
@RobotHumans how can else apply to both conditions unless they're nested?
 
if you make A a separate clause and close the clause. there is no else if
 
@TheWanderer "remove"?
 
@RobotHumans that doesn't work if there is no 'A' value
 
9:58 PM
the wording just feels weird.
 
That's not how it works @RobotHumans
 
Consider the following:
 
@TheWanderer Ok hold on, you say if they're both empty it won't work; what specifically won't work?
2
 
@AndroidDev the 'else' statement will trigger if A is not empty but B is
in Python, it'd be analogous to this case:
 
@AndroidDev if both are empty, it'll enter the email block but never reach the password block
 
9:59 PM
a = "foo"
b = None
if a:
    print("A")
else:
    if b:
        print("B")
    else:
        raise IOError
 
I could use ternaries
But no one likes ternaries
 
the tricky part is if we need to also trigger on B
 
YES
 
@TheWanderer are we requiring both to be valid, and not empty items?
 
It needs to be able to execute both A and B conditions without executing C
Hence the nested ifs
 
10:01 PM
they both trigger if both are none. i don't see what you're trying to accomplish evaluating it multiple times.
 
@RobotHumans I need to prevent that Auth function from running if either box is empty
But I need to also deal with each box separately
 
lol i'm missing API24 lol
hey api24 comes with google play store on it nice
 
You shouldn't need 24 o_O
 
The app is 25
 
10:02 PM
@TheWanderer -I suppose you could do that then --^
 
@AndroidDev that will still submit if email is empty but not password
Oh I see
But that's honestly messier than nested ifs
 
@TheWanderer But at least you'd only be reading a boolean and not having to do the call again
 
@AndroidDev I don't see how it's any better
Nested ifs are easier to understand than a weird boolean
And I could always assign them to variables to avoid multiple calls
 
@TheWanderer If the user denied that permission, then it would crash, no?
 
@AndroidDev what permission
 
10:13 PM
@TheWanderer find accounts on device I guess
@TheWanderer Question, what happens when you run out of space for more tabs on the bottom?
 
@AndroidDev 666BOOM666
 
@AndroidDev it's in a scrollview
@AndroidDev that isn't a runtime permission
 
@TheWanderer i has concern - no OpenID logon process
 
@ThomasWard Yeah well... he's only been working on this for like 3 days
 
true. looks pretty smooth for an app tho
properly fetches chat names too heh
 
10:22 PM
@ThomasWard that's Nathan's job
 
i see your rotation works too heh
 
@ThomasWard that's my job and a mess
 
good thing too, i'd burn ya if it didn't.
 
@ThomasWard rotation is default
 
@TheWanderer the only problem is I can only run it in Android Studio lol
ALSO
it didn't find that dependency in Gradle until I installed everything back to KitKat lol
making me think something is broken
and it requires compat stuff
 
10:23 PM
Well the app is built for API 15 as well
 
Android Studio freaked out for me too @ThomasWard
 
indeed, i'm on API24 for the Google Play support in the emulator
 
So yeah it needs compat
 
FORTUNATELY it has compat :)
@AndroidDev I have specific apps that aren't API25 yet so... :P
 
@TheWanderer So who's job is it to make it actually stream the messages?
 
10:24 PM
Nathan
I'm Mr UI
 
Oh yeah, I remember the other day Nathan saying he likes the back end and you can make it pretty :)
 
Sigh
 
Wait so do we have to reverse engineer the web app to figure out how to stream the data?
Or do they provide an API?
 
I DON'T KNOW
Gah
It's @NathanOsman who does that stuff
 
3
A: Is there a way to programmatically access chat?

Nathan OsmanThere is no official API provided for the chat network. As Marc's answer mentions, there are a number of community efforts to bridge the gap: Go go-sechat JavaScript ChatBot ChatExchange ThirdPlace ArtOfChatbot Python ChatExchange Rebol RebolBot If you are the author of a library...

 
10:29 PM
But Nathan has disappeared
 
I found and answer by him --^
 
didn't toss in an rstrip, but this is what i was talking about:
from sys import stdin

username = None
password = None

x = 0

def eval_box(username, password, x):
	x+=1
	print(x)
	print(username)
	print(password)
	if username == None: username, password, garbage = eval_box(stdin.readline(), password, x)
	if password == None: username, password, garbage = eval_box(username, stdin.readline(), x)
	#DO AUTH
	token = username+password
	print(token)
	return username, password, token


username, password, token = eval_box(username, password, x)
print('done')
print(username)
 
@NathanOsman Google rejected the app for IP violation
 
10:49 PM
@TheWanderer - this is why I like New Zealand. There's only one right way to do software, so people cannot be punished for doing it the one right way unless there's a hardware component.
 
@TheWanderer Which app?
 
@AndroidDev guess
 
SEChatNotifier
pshaw joke
 
..........,.....................
 
@TheWanderer why would you want to submit it when it's not even functional yet?
Also what did it violate?
 
10:55 PM
@AndroidDev closed alpha for key sharing
@AndroidDev there are no specifics
 
That's interesting.
sup @chaskes long time no speak. read/watched anything interesting recently?
i think last time we talked, i was on about alphago and lee sodol
 
Nothing special going on. Started reading Stephen Donaldson for the first time.
The show Nobodies on tvland (?) is funny,
 
Stephen Donaldson sounds interesting. I may read that. I liked the coldfire trilogy a lot if I didn't tell you already... and I'm complementing you wanting to read Donaldson b/c I generally stay away from authors with more than 4 books
e.g. robert jordan died before he finished.
 
But Sanderson did a much better job with the last 3 Jordans than Jordan did with the previous 3 Jordans.
I'll have to try Coldfire.
 
That's entirely possible. I just wanted to know what was in his head before he kicked. Not what someone else could invent after he kicked. Coldfire was interesting.
 
11:07 PM
He just wrote out the notes really, but he's a very good writer on his own, and the series had turned into sort of a mess before Sanderson cleaned it up. There is at least one thing that was not wrapped up because (based on sanderson interviews) Jordan never wrote it down and Sanderson didn't invent anything new.
Recently read Sanderson's first: Elantris. Pretty good.
@RobotHumans Gotta go. ttyl.
 
Will be worth reading probably. Have fun. Later on @chaskes
 
11:29 PM
Going for a smoke @DragonGuy, but I see you're active on codegolf. Any thoughts on the code above?
 
11:47 PM
@RobotHumans Don't smoke! It's bad for you! And that goes for CLnetbox too :)
 
I mostly smoke to walk away from the screen. Either way, I can't walk the dog all day, so sometimes I find it to be necessary.
 

« first day (2433 days earlier)      last day (2528 days later) »