« first day (1928 days earlier)      last day (3211 days later) » 

15:02
@ArtOfCode No one comes to the QPixel IRC channel! D:
@PhiNotPi Very nice "slight head turn to look at camera" shots. So appropriate.
@zyabin101 because it's not really meant to be used yet
@quartata Ikr.
@AlexA. I just went into the Julia room and saw the new vectorization syntax. Now my eyes are bleeding all over my desk. Next time please put a trigger warning
In C code, what is the most condensed line of code to traverse through a Binary Search Tree? (obviously using recursion)
15:14
@mınxomaτ you know what, I'm super surprised this hasn't come up again. I mean, there's got to be other sites that care about SRI and browser compatibility
before*
Right now, I have

void traverse (Tree t) {
if (t->left) traverse(t->left != NULL);
else if (t->right != NULL) traverse(t->right);
shorten variable names
remove whitespace
also, you don't need braces
how about that?
you still have whitespace
but better :)
also, instead of having two if statements, you can simply do if(t) around the whole function
Ok, I get the idea but is there a one-liner that uses conditional statement:

A ? B : C
@NathanMerrill what do you mean? can I remove that "else if (...)"?
15:20
void a(T t){if(t){a(t->l);a(t->r)}}
@NathanMerrill I C. Thanks! :)
@mınxomaτ First I've ever heard of SRI (I'm not a webdev), but I agree with Nathan that it sounds like a Firefox bug.
15:43
@NathanMerrill void a(T t){if(t)a(t->l),a(t->r);}
@JesterTran ^
cat
cat
0
Q: Where are the definitions for the prototype declarations in <bsd/stdlib.h>

catI have a C program on Ubuntu 16.04, in which I would like to use arc4random_uniform. typedef unsigned char u_char; #include <bsd/stdlib.h> int main () { return (int) arc4random_uniform(100); } Hopefully, this will return to the OS with a random exit code between 0 and 100. Compiling it: $ gcc...

@cat why do you want to use arc4random?
0
Q: Maintain the same average value while respecting ratios

artoorasI have such a problem on hand. Imagine there are 5 sliders with a range of values 0 to 100. In the beginning, they are all set to 50, so the average score is 50. Goal 1. Maintain average at 50 Say, if I move the first slider to 70, in order to maintain the average at 50, I decrease the value of...

15:47
@cat do you need cryptographic randomness?
cat
cat
I don't want to use rand() % whatever because of modulo bias.
@orlp Well... it's a toy project, but yes, I do want cryptographic randomness.
Currently, I use this:
what is your use case?
cat
cat
// stackoverflow.com/a/6852396/4532996
uint64_t rand_range(uint64_t max) {
  uint64_t
    // max <= RAND_MAX < ULONG_MAX, so this is okay.
    num_bins = max + 1ULL,
    num_rand = (uint64_t) RAND_MAX + 1ULL,
    bin_size = num_rand / num_bins,
    defect   = num_rand % num_bins;

  // This is carefully written not to overflow
  uint64_t x = 0;
  do {
    x = (uint64_t) rand();
  } while (num_rand - defect <= (uint64_t) x);

  // Truncated division is intentional
  return x / bin_size;
}
My use case is to generate a random number in a range
no
that's what you're doing
@NewMainPosts this isn't too bad of a potential challenge idea
15:49
what is your use case
what are you using the random numbers for
cat
cat
okay, it's for a guessing game where the user tries to guess the number, and I'm aware cryptographic security is not at all warranted
When people are appalled that you actually listen to rick astley because you like the music....
4
cat
cat
but I just really wanna use arc4random_uniform, also because it will impress my programming teacher
cat
cat
@EᴀsᴛᴇʀʟʏIʀᴋ 0.0
15:51
._.
>_>
I do actually like his singing....
cat
cat
@orlp I promise it's not X/Y problem :P
@NathanMerrill BootstrapCDN is now SRI-secured by default. And it works in Firefox. But that's a JS file, and apparently the SRI implementation is a bit wonky for other MIMEs. I don't really get why SRI is not more common. For large sites (like gstatic), it's the only way to protect against bitsquatting JS attacks.
@mınxomaτ I know some of these words. (What's SRI?)
@cat why are you so suprised?
@El'endiaStarman subresource integrity
aka, when I request a CSS file from a CDN, I have a hash in my code that ensures that the CSS file is actually the one I asked for
15:55
@El'endiaStarman Basically a checksum for the browser to check the integrity of an asset.
ninja'd
cat
cat
@EᴀsᴛᴇʀʟʏIʀᴋ I'm not really :P he is a good singer
@NathanMerrill Is that something that happens automatically or do you have to be explicit about it?
explicit. You add an attribute to your <link> or <script> tag
15:57
@NathanMerrill Which can happen automatically, if e.g. your server-side stack generates the hash JIT from the local, original file.
right, but it's not automatic on the browser side
@NathanMerrill That's physically impossible. :D
right :)
@mınxomaτ Huh, that's cool.
15:59
although, I did see a link where somebody was suggesting the browsers would hit the original server saying "the hash of this file is X, is that correct"
but I'm not a fan of that solution
are there any benefits to adding SRI to resources that aren't on a CDN (assuming that you are serving them over HTTPS)?
cat
cat
I gave gcc -lbsd but it still can't find the definition for arc4random_*, what is this bullcrap
Haha. One of our front office challenged one of our devs to a "Steps challenge" (who can take the most steps in a month, tracked by a specific pedometer, validated by the honor rule). The dev said "The biggest challenge for me will be seeing this as a challenge."
cries ... Trig is not a strong suit for PowerShell ...
430 bytes into this Fermat's point challenge, and all I've done so far is determine if there is an angle greater than 120 degrees
cat
cat
@TimmyD Maybe you should use Bash instead. Or jQuery.
16:10
@NathanMerrill Yes. Every asset is an extra request exposed to possible bitsquatting. There is no way to prevent this kind of attack. You can only reduce the amount of "vulnerable" requests. Ideally, the HTML should be the only exposed transfer, all other assets should be served with SRI attributes.
"all other assets" meaning anything that can hurt the user, i.e. code. Not images etc.
@Optimizer Ah classic German comedy show.
That's very... descriptive.
cat
cat
@Optimizer murica.
16:13
@zyabin101 Every time I read "VTCAKAVSMoACE", this is what I read first.
cat
cat
^
@mınxomaτ Wikipedia links are a crutch for the weak! Put the name of the article on the link like a [wo-]man.
cat
cat
@Cyoce person*
@mınxomaτ NSFW
cat
cat
^
16:16
@epicTCK Hardly
Though it might be awkward to explain to your boss.
Or worse, my dad...
my extra mouse keys are macro'd to switch desktops, so It's all good...
I keep TNB on one and school on another
> mouse key
@Cyoce Button
my mouse ^
mine ^
Are those considered keys or buttons?
buttons. keys are generally found on a keyboard
My dream mouse
Logitech mx master
I own my dream keyboard though
16:26
my keyboard^^
@Cyoce Does the color change?
lol, I use a touchpad and laptop keyboard
like a real programmer
@NathanMerrill Meh... touchpads are good until you start editing pictures, doing mouse intensive work, or gaming
so the are good for everything I don't do
what's "mouse intensive work"?
16:28
@Cyoce ermahgerd factory new mouse | fade
did you unbox that
Photo editing / gaming mainly
-.-
because while I do use a mouse for some of my games, I avoid it if I can
@ArtOfCode All right, so I have all of the IRC stuff down (I've tested it all too)
I'm super shit at Rails though so this next part will be.. more difficult
@quartata sweet
Wait what is this you guys are making
16:30
shout if you need a hand, though it'll be in an hour or so 'cos I've got to head off... soon? I think?
@epicTCK chat for stage.artofcode.co.uk
based on IRC, quartata is making auth for it
@ArtOfCode And also thinks it is not ready for production yet ಠ_ಠ
@EᴀsᴛᴇʀʟʏIʀᴋ HAI
@NathanMerrill I do also, just sometimes a mouse.
So what is it? like a secondhand SE? IDK...
yeah
@zyabin101 HAI
16:32
TIL we've had a Lego Stack Exchange for five years (still in beta).
yeah
not enough lego addicts fans
@zyabin101 Because it isn't?
What I have right now.
I'll need to redo a couple parts when I put it in the Rails side obviously
16:34
I stopped playing with lego
But literally the only thing missing is check_auth which is where Rails come into play
110
Q: How much usage can a LEGO piece take before it loses its 'clutch power'?

pcantinIn this article it's mentioned that one very important feature of the LEGO bricks are their 'clutch power' which is "the ability of its bricks to snap together tightly while also being easy to separate, thereby readily allowing for de- and reconstruction" Since a LEGO brick is ABS plastic and wi...

It only works on TS6 servers so ircd-ratbox, ircd-hybrid, etc..
@NathanMerrill That is insane...
I tested it on a local ircd-hybrid
16:36
lol yeah
and yeah the code is a little messy sorry
oooh, another interesting one
45
Q: Is it possible to build simple logic gates with LEGO mechanics?

SibboI built a simple bitshifter in Minecraft yesterday. I wondered if something like this could be built with LEGO? Maybe there is a possibility to build gates with rubber bands and those movable mechanic stuff. Did anyone of you do something like this?

LEt it GO
Instead of thinking about tits, I am now just angry that "Let It Go" is stuck in my head again.
hahahaha
16:39
@NathanMerrill Just saw that
@Rainbolt Hoping thats a typo
@Rainbolt I was gonna say that think only about the central part.. but then I remembered.. you have no interest :P
@NathanMerrill That guy deserved the rep he got. :P
@Art What is the IRC chan waiting for? A nickserv? Becoming production-ready? Something else?
Definitely made it worse :(
Rubbing salt in the wound
16:41
paprika
hmmm...SE needs a question of "What hurts the most when rubbed in a wound"
the question is what site it belongs on
@Optimizer Mmm, it's becoming a tasty wound
are you gonna eat it?
@NathanMerrill Omg do not click on the first question there
Wow, I am trying to get fired
16:43
@Optimizer SFW (phew)
@Rainbolt lol, did you read the title?
Read the title. Did not expect an image.
@Rainbolt or was it intentional ? :P
@Optimizer Did someone say... Paprika?
16:46
I've got this pandora channel that's been delivering awesome songs for the past couple of days. Its always been a struggle to keep my channels on topic and interesting, but its nice to finally have one
@Rainbolt Well the mods there are lazy or they allow those kinds of images...
@Sp3000 WTF?
-9 seconds'
it almost looks like I made the child drown..
if you find a security bug and report it to a site, how long should you wait before you exploit it?
(I didn't find a bug, just curious)
16:56
1 minute
I always thought you were supposed to exploit it first, then report it.
3
@ArtOfCode I made a separate branch for the IRC testing
@NathanMerrill Ok, ok. Exploit it and don't report it?
@quartata For QPixel?
16:59
@Geobits yup
Once I hacked the game vertix.io then had some fun then emailed the dev. He fixed it.
everyone is playing vertix
vertix*
*test
apparently markdown isn't greedy
that's bizarre
yes,*itis*
then why is the asterisk above in italics?
17:04
why not?
wouldn't that be consistent with greediness?
oh wait, yeah
what is it called when it stops as early as possible?
1*2*3*4
reluctant apparently
@NathanMerrill oh I see. I guess that's also a form of greedy algorithm. but the reason it didn't is that markdown doesn't do empty italics/bold sections.
****
^ well that's interesting
huh, yeah
@NathanMerrill lazy
@VTC Are you going to publish Laura?
@zyabin101 Not yet.
That's just to get me to actually work on it.
user image
5
17:16
beee cause
when the sun shines we shine together
@VTCAKAVSMoACE Meanwhile, in my household...
/me achieves maximum gif-age.
@ArtOfCode IRC ees ded D:
Because no one wants to develop it.
I thought quartata was working on it.
Anonymous
We can tell you're young by your gif-age :P
@El'endiaStarman It is.
17:26
@Mego ಠ_ಠ
But no one is chatting :(
@VTCAKAVSMoACE Another one?? How gif-old are you?
Apr 4 at 0:39, by Downgoat
What did I just walk into ._.
@trichoplax ∞
maximum. I see.
Anonymous
17:49
gif abuse eleven
what is gif-age?
Anonymous
@Downgoat A goat walks into a bar. And a stool. And a table. The bartender says, "I knew you were trouble when you walked in."
@Mego oh hey, it's my cousin uprightgoat in that video!
@quartata looking good, anything I need to do?
@Optimizer I think it's the tax payable for littering the transcript with data heavy nonsense
Anonymous
17:57
@Downgoat Unlike you, he's an upstanding citizen :P
@Agawa001 aahhhhh
nice thing that worked not as before, i thought i would have to repeat it
people im stuck in a sticky trouble, my company wants me to build software with VB 2015 and i really suck at oo languages
I really wish I could write queries on youtube videos
18:07
@Agawa001 Unless they're asking you for OO, you can write VB without using much in the way of object orientation
specifically, Select videos with at least 1 downvote, sorted by numUpvotes/totalVotes desc
You want to find the most popular of the somewhat hated videos?
basically, the least hated video
Anonymous
Least hated video is the video that has not yet been posted
Least instance of non-zero hatred
18:09
@trichoplax vb is nothing without objects
right. It can't be zero, because then you're going to get a bunch of videos with 10 views and 1 like
and every video of sufficient size has at least 1 downvote
although, finding the video with the most views with no downvotes would also be interesting
@Agawa001 You can write it more or less procedurally. You can use the existing objects for events and interaction without needing to make any of your own if you don't want to
events , that word is scaaaaary
I'd just like the option to filter youtube searches to show only videos with no ads. Or only ads below a certain level of irritation (like 30 seconds unskippable)
youtube red?
18:12
Adblock? :P
Is that paid youtube with no ads?
Anonymous
@trichoplax The problem is, the ads aren't deterministic. You can watch the same video twice, and get no ads the first view, and a 30-second ad the second.
@trichoplax and other stuff, yeah
@El'endiaStarman Does that work for ads within a video?
Anonymous
Or use AdBlock and get no ads, and fight back against the intrusive advertising
18:13
@trichoplax if its actually part of the video, no. Standard ads, yes
Anonymous
I only see Youtube ads on mobile now
@trichoplax Yep. I regularly see numbers in the thousands when playing a video on loop...
It's insane how hard some sites try to show you ads.
yeah, I'm on video #3 on youtube, and I'm on 106
quick poll: what are you currently listening to?
My laptop fan
Anonymous
18:15
My cat trying and failing to kill a fly
Haha, I just put back on my processors after taking a shower, so nothing at the moment besides ambient sounds.
you all are lame. Listening to Mika
Anonymous
My cat is all the entertainment I need
Anonymous
Except for maybe Path of Exile
@QPaysTaxes I hope you're typing quietly...
18:19
occasionally, I press the enter quite hard that I've got more than a few comments saying that I'm going to break my keyboard
usually when I'm submitting something (like on chat, or a url)
18:33
This review:
The close reason mentions a meta Dennis consensus. Link to statement?
note: I do agree, just apparently I missed something?
Anonymous
@EᴀsᴛᴇʀʟʏIʀᴋ Look 3 comments up
@QPaysTaxes well played
@QPaysTaxes no it's not.
there, have your star back :P
@QPaysTaxes wouldn't have fallen for it... I recognise the video code.
18:47
@QPaysTaxes I ninja'ed you to that, long long ago.. ;P
@QPaysTaxes variable?
so what is used?
@QPaysTaxes damn you're fast
ah, that's it - you want approximate
18:50
huehue
@QPaysTaxes ._.
Thanks for stars.
2
0
A: Sandbox for Proposed Challenges

Martin BüttnerCops and Robbers: Significant Whitespace code-golfcops-and-robberswhitespacestring For the purpose of this challenge, we'll define whitespace as tabs (0x09), linefeeds (0x0A) and spaces (0x20). Note that most languages and regex flavours consider many other characters as whitespace as well, bot...


« first day (1928 days earlier)      last day (3211 days later) »