« first day (1924 days earlier)      last day (3133 days later) » 

6:00 PM
@StrixVaria in python it'd be
 
@djsmiley2k He's into gaming a lot, he just doesn't usually use the site.
But he knows about this place.
@SaintWacko Is that the Corsair keyboard?
 
for _ in file.readlines():
  if re.match(_, regexp):
    print _
 
@Powerlord developer intent?
 
the hidden, implicit variable is literally called $_, IIRC.
 
@Powerlord I think 'game development' would be suitable, doesn't that include things like developer intent?
 
6:01 PM
@badp So it's an implicit foreach loop without a variable name, and the methods inside the loop magically all act on the implicit invisible variable?
 
@StrixVaria yes
 
That sounds stupid.
 
So do you guys mind at all if I show the chat transcript here to my IT teacher, then?
I want to share all this with him.
 
@Texenox It's public domain.
The transcript is indexed in Google.
 
@StrixVaria So that's a yes, then.
 
6:02 PM
And presumably other search engines.
 
page 95 or so
 
@badp This makes it sound ever so slightly less stupid, but I'm a big fan of languages being more explicit so I still don't like it.
 
dear lord.
 
I'm being particularly cautious with I think's because I haven't installed a Perl interpreter yet, and not everything I'm reading really makes sense
 
@Texenox Can we point out we haven't previously helped you with any homework or anything else!?
As we wouldn't want him to get the wrong idea!
 
6:04 PM
if @foo is a list, $foo is the number of elements in the list, but $_ is the implicit variable and functions have their arguments set to @_
 
@badp Is there a reason you're learning/planning to install an interpreter for Perl other than a desire to suffer?
 
@djsmiley2k Of course, of course.
 
Wait, why are we talking about Perl 5 again?
 
Infact you clearly don't need help with this kind of thing anyway
 
@StrixVaria I'm going to work for booking.com, and it's pretty much all Perl
 
6:05 PM
Things I have gotten good at since I started programming: 1) Drawing freehand curly braces 2) Nothing else
 
(except for the bits that run client side)
 
Side note: If you have a variable @something in Perl 6, $something doesn't give you the number of arguments. They changed it so you need to access @something in a scalar context to get the count.
 
No. Perl no. No.
 
@badp Oh, nice. I actually knew they used all Perl, due to a coworker of mine managing a Perl client library for our API that they use.
 
Or they did in the last Perl 6 doc I read 5+ years ago.
 
6:06 PM
print$/,map~ZjN^G^0.0.3x rand 2,1..80for%
 
@fredley Hey, have you heard about my syntax substitution for Perl that uses Archer characters...?
 
@Powerlord so $something would be an entirely different variable?
 
Perl is one of the most wtfy languages I've ever used.
 
@twobugs ಠ_ಠ
 
@badp Yes. Aren't inconsistencies with previous versions of the language great?!
 
6:07 PM
@Powerlord print becoming a function in Python 3.x springs to my mind.
 
@Powerlord Because lets add more wtf
 
@Powerlord The Perl 5 book did mention that every sigil is basically a separate namespace, but then it also tells you that if @foo is a list, $foo is the number of elements therein
 
No they are not.
 
The fact that scalar and list contexts do different things with a variable in Perl has always been weird, they just made it weirder in Perl 6.
 
6:08 PM
so I guess that if you assign both to @foo and $foo they become completely distinct variables, but if you only assign to @foo but not $foo then Perl tries to be smart?
I need to get an interpreter
 
@badp fortunately that's what perl is so
 
@KevinvanderVelden as in I need to stop theorycrafting and start running code
 
@badp '{Langauge} tries to be smart' <- if you hear this, in any context, stay away from {Language}
 
I'm looking at you, Javascript
 
6:09 PM
@badp install cygwin, jobs done
 
> Enter h or 'h h' for help
h h
 
@fredley hhhhhhhhhhhhhh
 
h h is significantly more verbose than h
 
help help
 
6:13 PM
@badp That looks like your avatar
 
@fredley no this looks like my avatar
 
0
Q: How do I create a desktop shortcut for GoG Galaxy games after installing them?

Nate KerkhofsApparently, you can create a shortcut when first installing a game using GoG Galaxy. I forgot to enable that option for Witcher 3 when installing it, so I don't have a shortcut on my desktop. According to their forums (http://www.gog.com/forum/general/desktop_shortcut/post4), you can enable an o...

 
the attitude in this "javascript: the good parts" book is great
> If you want to learn more about the bad parts and how to use them badly, consult any other JavaScript book.
 
 
No, this looks like your avatar
 
6:15 PM
 
@Unionhawk you'll notice the colors are the same
 
hurrrraaaz
if(stripos($line, '<registrationid>') !== false){
not === true
sigh
 
btw is strcpy a compilation error in C yet?
 
Yes, if you do #define strcpy YOU IDIOT!
 
6:19 PM
@djsmiley2k that brings back hideous memories of PHP
 
@fredley BADPBURGER
 
burgerp
 
padburger
 
I got asked about PHP in an interview. I started to projectile vomit.
 
burgerburger
Great, now I'm hungry.
 
6:21 PM
@fredley are there any other memories?
 
no
 
php test using === true != !== false
D:
 
@twobugs This is the only correct answer to a PHP interview question.
 
That's how you know PHP is real
 
6:22 PM
@KevinvanderVelden I think I bleached all knowledge of PHP
 
@StrixVaria One of those books is way too big. Of course, I'm referring to "JavaScript: The Good Parts."
 
@StrixVaria Oh man, I remember this. Great article.
 
pls
 
@djsmiley2k Psst, JavaScript has the same operators
@badp Wait, people still use strcpy instead of one of its variants?
 
@StrixVaria oh i've seen that
guess what
it's not my job to decide what language to use
 
6:24 PM
I mean, I know strncpy isn't perfect, but it at least won't buffer overflow
 
@djsmiley2k Presumably, it's your job to understand the language you're using, though.
 
I've managed to learn php to this point in the 9 months I've been here, plus doing other things at the same time
 
memcpy best copy function
 
@StrixVaria It's my job to do things, and if I get the chance, to make things easier to do
 
Use Python strings, never worry about copying them, lolperformance
 
6:25 PM
so..... that's where the programming come in.
 
If I had my choice of languages, I'd never be coding in Ruby.
But I get to code in Ruby all the time. It's a thing.
 
@djsmiley2k No, your job as a PHP developer is to suffer.
 
The fact I've gone from not being able to write anything to writing somethign that actually works, with broken tools, is awesome
 
@Powerlord it has one major flaw though
 
I'm actually happy that I spend most of my time coding in Node.js JavaScript
 
6:26 PM
I'm not a php developer tho :P
 
Python ftw
 
One that renders it unusual in a decent application except for maybe internal stuff
That is: char, not wchar
 
@KevinvanderVelden Keep in mind that I don't routinely use C/C++. I know there are "safe" versions of it as well, but I couldn't tell you what the names of them are.
 
I like Javascript, but I have some frustration (most of this is due to the API that I'm working with and Dojo)
 
@Powerlord put a w in front of it, 90% chance of being correct
 
6:27 PM
As for the last thing I did that needed to do a strcpy type operation, the devs switched over to some internal library of their own for common operations like that
That and they weren't allowing std::string, probably because it was a Valve Server Plugin and so it's based on some pre-2003 version of C++
 
Dojo just seems really janky. I'm not a fan when even your core website and documentation website have pretty clear and easy to reproduce bugs.
dojotoolkit.org/reference-guide/1.10/dojo/dom-class.html Scroll all the way down to the bottom. Take a look at the nested scroll bar. Whoops!
 
The test is here : Array ( [0] => 654321 )
we're actually returning something \o/
 
@Powerlord so long as it isn't a compilation/runtime catastrophic error
 
Oh right, I forgot I removed the strncpy call anyway because a new signature was added for FindMap.
 
0
Q: How do I do a /setblock for under a player?

Henry DillmanI'm trying to make a vanilla spleef arena, with a redstone clock attached to a /setblock command. No matter how I tried, I could not get the command to set the block under the player air. this was the closest I got: /setblock ~ ~-1 ~ air is there some way I can attach the ~ ~-1 ~ to @p? If not wh...

 
6:33 PM
Basically, we changed it so that our internal version of FindMap takes const char*, char*, size_t while Valve's took char*, int and modified the string you passed to it.
 
job interview question: reverse a string in C. If their face doesn't turn a convincing enough shade of white, flunk 'em
4
 
is flunked
 
@badp I know people whom if you ask that question of them they will walk out
 
@badp ?
 
also programs in C++ for a hobby
 
6:34 PM
@badp I had to implement a linked list in C in college, essentially to prove that I actually understood pointers. It wasn't a fun assignment.
 
@KevinvanderVelden Not C++. C
 
@SaintWacko yes
 
I am one of those people. if I don't walk out, then I think less of you.
 
@James wise people
 
Reversing a string in c is not difficult
 
6:34 PM
Hah, look at all these rubes who don't know the answer. Anyway, I'll let someone else explain why you're all fools because I'm laughing too hard. At your expense!
 
@KevinvanderVelden yeah, let me try with this emoji
 
@badp Hehe, If your resume says 10+ years as a professional developer, you start with harder questions
 
I've just wondering why reversing a string in C would be hard. I mean, sure, you probably have to use malloc, but...
 
can you get the len of a string in C?
 
@djsmiley2k yes, strlen
 
6:35 PM
@djsmiley2k strlen
 
@James reversing a string is plenty complicated :P
 
@djsmiley2k strlen() if ya want
 
can you append to a string in C?
 
But you dont need it for reversing
 
@djsmiley2k strcat
 
6:36 PM
K, I can do it `o/
 
@djsmiley2k Only in O(n) time, by scanning through looking for the end.
 
(You're in charge of ensuring thee memory is large enough)
 
I don't quite think strlen() is sophisticated enough
 
@badp On most (all?) platforms, strlen does what @StrixVaria said.
 
@badp It will return nullchar - starofstring as the size
 
6:36 PM
@Powerlord what c platforms don't follow the standard?
 
I doubt strlen() will count a string containing an emoji with ratial colorations as being 1 long
 
get the length, count the string out, take the last chara, deduct 1, repeat
no one said it had to fast or efficent
 
@badp that's what wstrlen is for
 
@badp Of course, if you redefine "string", then existing string operations won't work correctly
 
chrcpy or something?
 
6:37 PM
@badp Nowhere did you say this is a unicode string.
 
You're talking about a string in C, that is by default a char*
 
A C string is a 0 terminated byte sequence
 
@Powerlord of course it was gonna be an unicode string.
 
reversing 2bit UTF-16 chara's is kinda difficult, but screw em for using weird input
 
@badp If emoji are multi byte interpreted strings changed into a single character, then yeah it wont treat that as a single character
 
6:37 PM
What isn't an unicode string today?
 
@badp C strings
 
@badp valves code apparently!
 
But from its point of view, thats not a single character. Its dealing with stored memory not displayed result
 
I want a new version of strlen() that works :P
 
@badp char * arrays
 
6:38 PM
Else, you've just cmpared C to PHP and found them ===
 
@djsmiley2k then don't use strlen
 
Well, as already noted, C also has a wide character type.
 
@djsmiley2k what does that even mean?
 
@murgatroid99 'they' told me that the strlen() in C doesn't work
 
@Powerlord Indeed.
 
6:39 PM
After telling me that PHP is full of useless tools.... that don't work
So I'm saying maybe there comparable :P
Devils advocate or something :<
 
@djsmiley2k strlen() will -always- tell you the number of bytes in the provided char array.
Always
 
@djsmiley2k don't work for what?
 
The fact that C has one thing that in some cases doesn't work as you might expect doesn't make it equivalent to PHP, which does everything terribly
 
@djsmiley2k it's full of useless tools that work in slightly different ways
 
3 mins ago, by badp
I doubt strlen() will count a string containing an emoji with ratial colorations as being 1 long
 
6:40 PM
@djsmiley2k Yeah cause that is a dumb case
 
@djsmiley2k yes, because it's expecting an ASCII encoded string
 
K
/me doesn't know :P
 
That is like saying strlen("<P>Hi</P>") should return a value of 2 not 9.
 
20min til hometime
 
If you give it a utf8 encoded string then you're violating the contract (if you're casting a wide string to a narrow string and passing it to strlen I will smack you)
 
6:40 PM
That's not "a function doing the wrong thing", it's "pretending that you're asking a different question, and being surprised that you're getting the same answer"
 
The string is 9 characters long, just cause an HTML renderer will only display 2 doesnt make the length of it 2.
 
C strings worst strings.
 
I see. In this case I would flip the table and start throwing things at the person who asked me the question because they're a jerk.
 
yeah
ok
 
@twobugs Agreed
 
6:42 PM
so reversing a string in C, isn't that hard?
 
@djsmiley2k reversing a c string in C? no
 
@djsmiley2k In a normal case, I don't see any reason it would be. But a goofy case like this? yeah.
 
Reversing a UTF-8 string in C? yes
 
Reversing a UTF16 string in C? Probably I'd have to look it up
 
6:42 PM
Obviously you need deeper knowledge of C than I have, to undeerstand the question.
 
And it gets even more painful with combining characters and stuff
 
@twobugs @djsmiley2k @badp ^^
 
I think it's a deceptive question. I assumed c-string given the premise of the question.
 
Damnit onebox you stupid thing! :D
 
at least onebox it :P
 
6:43 PM
 
@James remove the s from https
 
Here's the thing... the high bit in a UTF encoding signifies whether it's part of a multi-byte set or not.
 
Lesigh
 
See, I never got that one. I never really spent more than a few seconds glancing at it, though.
 
@Powerlord Yeah, reversing a UTF-8 codepoint sequence isn't that hard either. But that combines ligatures with the wrong characters
 
6:44 PM
i dun't get it.
 
@djsmiley2k Get what?
 
the comci :<
wtf is iwth the I key on this stupid mac!
 
> Communicating badly and then acting smug when you're misunderstood is not cleverness
That's the point of the comic
 
The person asked a straight forward question, what is a third word in the english language to end like that
 
@djsmiley2k there's this common "joke" that the person in the first thing is saying
 
6:45 PM
ok
 
Then when there isnt one
said he was referring to the phrase and asking the third word
So he lost his arm
 
Sigh...
Guys, my cat is arguing with me
 
i'm still lost D:
 
@SaintWacko Seems legit
 
@SaintWacko you can't win.
 
6:46 PM
@SaintWacko Its ok as long as the cat wins...
 
Well I mean, how does "Language" answer it? It's probably something really dumb on purpose which is why he is... disarmed.
 
1 min ago, by murgatroid99
> Communicating badly and then acting smug when you're misunderstood is not cleverness
 
Actually, I think I did win
She wanted to jump up on my desk
 
@SaintWacko No, you won a temporary respite. You will pay for this later.
 
u gave her a box?
 
6:46 PM
@twobugs There are three words in "The English Language" Ignore all this part of the phrase, What is the third word? A: Language
 
But my chik fil a is up there, so I don't want her to
So I told her no
She turned and meowed at me
I said no again
 
@James :|
 
@James ah yes, that's dumb
 
She meowed again
 
He deserved worse.
 
6:47 PM
:D
 
This went back and forth a few times, and then she wandered off
 
Shall we go get @badp's arm? :)
 
So I won for now
 
0
Q: How to get all the vault team members in Tales from the Borderlands?

k0pernikusMy team consisted of additonal three members: Cassius Athena August Yet it is shown that there could have been more. How do I get the possibility to recruit them all?

 
6:51 PM
@fredley The proper response to all forms of this riddle is to give them the finger and point out "Hangry" exists in at least the Collins English Dictionary.
 
Oh wow.
I go for about 40 minutes to eat, and I see 176 new messages here.
 
@TimStone as well as aggry, begry, conyngry, gry, higry-pigry, iggry, meagry, menagry, nangry, podagry, puggry and skugry (as linked before)
 
I feel like hangry would ruffle the feathers of anyone attempting to be clever like that the most, though :P
 
@murgatroid99 @James even with C strings -- ESPECIALLY with C strings you have to know what sort of encoding you're reading
 
Well then you just get nangry at them for trying to be clever in such a dumb way
 
6:58 PM
there is no encoding that's any use nowadays where 1 byte = 1 character
 
@KevinvanderVelden NaNgry
 
...I guess that sometimes stuff will default to cp1252 on Windows
 

« first day (1924 days earlier)      last day (3133 days later) »