« first day (4498 days earlier)      last day (643 days later) » 

00:13
I've heard that eval tends to produce malicious codes. I presume it holds especially for Ruby?
Produce?
Using eval can possibly lead to ACE exploits, but I haven't heard of eval making code, malicious or otherwise
I dunno much about computer viruses tho.
Oh, actually it's not about eval. It's Ruby being able to parse strings to functions.
...yes, that's what eval is
same thing in JS
00:20
D:
Though JS has other ways of doing it, like Function and setTimeout
@user cries in Sympy
As a wise man once said, Do not ever use scanf. Use fgets and sscanf instead.
Wait why?
Like I get why %s but surely %d is safe?
Dunno the explicit reason, but maybe because scanf tends to forget to parse newlines?
The wise man is Steve Oualline, btw.
00:36
10
A: How to use sscanf correctly and safely

cnicutarThe scanf family of function cannot be used safely, especially when dealing with integers. The first case you mentioned is particularly troublesome. The standard says this: If this object does not have an appropriate type, or if the result of the conversion cannot be represented in the obje...

okay but surely like
int32_t i = -1;

while (!(feof(stdin) || scanf("%" SCNi32, &i))) {
    DISCARD getchar();
}
is safe right?
I wasn't regarding whether it's safe tho. More like whether it's cumbersome.
It's easier than cin in this case because I don't have to clear it on error
And that's why imperative languages should consider adopting parser combinators.
ReadP and ReadPrec FTW!
(DISCARD is a macro for either [[maybe_unused]] auto _ = or (void) depending on the language version)
00:40
> I strongly recommend the combination of fgets() and sscanf(), because that way you can prevent buffer overflows. Using scanf() only, you'll get a buffer overflow if the actual input is longer than the buffer you reserved for it, because there is no length check (AFAIK even scanf("%10s", ...) isn't safe, but I'm not absolutely sure about that). The result can be anything from unpredictable behavior to a segmentation fault.
7 mins ago, by Bbrk24
Like I get why %s but surely %d is safe?
> You might think of %5d tricks and such but you'll find they're not reliable. Or maybe someone will think of errno. The scanf functions aren't required to set errno.
6 mins ago, by lyxal
10
A: How to use sscanf correctly and safely

cnicutarThe scanf family of function cannot be used safely, especially when dealing with integers. The first case you mentioned is particularly troublesome. The standard says this: If this object does not have an appropriate type, or if the result of the conversion cannot be represented in the obje...

Also I'm okay with UB for too-big inputs
:P
then I guess it's safe for your purposes :p
Like I already read it into a 32-bit number and then truncate it to 24 bits
01:00
Sandbox posts last active a week ago: Complexity of a binary matrix
@OldSandboxPosts probably O(n)
Idk probably depends on the binary matrix
01:16
$ clang-format --version
clang-format NPM version 1.8.0 at C:\Users\bbrk2\AppData\Roaming\npm\node_modules\clang-format\index.js
 
2 hours later…
03:42
Hey @lyxal, did you want to continue that discussion from yesterday by any chance? I joined the room
Maybe another time - I have some uni work to do
and I'm already procrastinating enough here :p
Ok cool, talk to you later
Very late already here anyway, are you in Australia by any chance?
I am
Cool cool, colorado here, have a good day ;)
 
2 hours later…
06:13
0
A: Sandbox for Proposed Challenges

QueueBotGenerate a naïve isEven() We've all seen the memes of a beginner programmer writing an isEven() function that looks something like this: def isEven(num): if (num == 0): return True elif (num == 1): return False # and so on You and I know this is tedious to do by hand,...

 
2 hours later…
08:11
@SandboxPosts doesnt seem like a good fit for the site
 
2 hours later…
10:26
hopefully will finish my script today
 
1 hour later…
11:28
Tip: prepend view-source: to a url to see the source code of the web page!
 
2 hours later…
13:23
or just press Ctrl+U
ctrl+s also works
just takes a few extra steps :p
there's also ¨U (or ŒG if you're more gluten minded)
or gelatin
0
A: Sandbox for Proposed Challenges

HippopotomonstrosesquipedalianHow are you doing, PLDI? In this challenge, you must write a full programme that gets the Area 51 stats of the PLDI site and prints the numbers to STDOUT along with their labels without any HTML tags. To assist in the creation of your answer, here is the HTML source code. Remember, this is a code...

one of those two
idk
13:37
Since when is NaN ** 0 == 1? I thought anything to do with NaN is NaN
what language?
C#
so it’s spelled Math.Pow, not **, but whatever
fwiw js does it too
@SandboxPosts how is my sandbox post?
yeah I imagine it’s part of the IEEE standard. I don’t know why C# would deviate from it
13:39
@Bbrk24 shouldn't be doing that
@Bbrk24 EVERYTHING to the power of 0 is 1, even 0.
math
mɐth
meth
13:41
jesse
jesse we need to cook more NaNs
Oh you know what it might be
readies move to DBA
readies cakes
@Bbrk24 as a matter of fact, no
I don't :p
13:42
It’s a custom function with nullable arguments, and it treats null like zero. I just said that if arg2 is null it returns 1, without checking for NaN
someday I too will accidentally move a story about lizards to another site's main room
Maybe so that (0 / 0) ** 0 is still 1, since (x / y) ** z might be expected to behave like x ** z / y ** z in all situations?
which is honestly fair because in context it’s never supposed to get a NaN, I had to hardcode that NaN in to even see it
@RydwolfPrograms that would make sense
0
A: Sandbox for Proposed Challenges

Number BasherMonopoly, But its in Creative Mode (sort of) koth Starting Grid: 8x8 grid: +--+--+--+--+--+--+--+--+ |XX| | | | | | |XX| +--+--+--+--+--+--+--+--+ | |+1| | | | |+1| | +--+--+--+--+--+--+--+--+ | | |+2|+1|+1|+2| | | +--+--+--+--+--+--+--+--+ | | |+1|x2|x2|+1| | | +--+--+--+--+-...

gotta love how Microsoft says it should return NaN yet has a try online box that returns 1
5
13:45
@SandboxPosts plz give feedback thnx
It feels almost entirely randomness-based
I can't think of any strategy that would give you a particular edge
thanks microsot
@RydwolfPrograms perhaps choosing between saving money, or collectively building a utility
That's only a few things that can vary between bots
or whether it is worth it to risk losing money to demolish structures
13:49
When would it ever be
and for this question https://codegolf.meta.stackexchange.com/a/25784/111945 i think we should specify which stats we should output
@RydwolfPrograms if a structure has too high a rank, taking it down benefits everyone (except owner)
Oh so you can demolish someone else's structure?
That's interesting but the 25% success chance means it's basically pointless
You on average have to pay rent to someone four times to destroy their property
i just changed the pay btw
cuz i figured out the same thing
@NumberBasher and idk what you mean by “IHATE15CHAR”.
@NumberBasher fixed
@PlaceReporter99 there is a 15 character limit in comments
to avoid spam like thank you
13:57
@NumberBasher oh
like i mean
do i print stats like 7 days in beta?
or just the 6 stats in the center
so sample output would be
28.3
95
58
599
2.7
191
@NumberBasher just 6 stats in center
ok just add that :-)
@NumberBasher and there has to be the label names as well.
@PlaceReporter99 so like...?
just put a sample output there
@NumberBasher everything should be fixed now.
much better, upvoted
btw view-source:area51.stackexchange.com/proposals/127456/… doesnt work for safari
> view-source:https://area51.stackexchange.com/proposals/127456/programming-language-design-and-implementation
do... do you understand how URIs work
14:11
nnnnnnnnnnnnnnnno
works for me
w h a t
bruh
@Ginger what web browser do you use?
@SandboxPosts is the challenge ready?
14:59
@RydwolfPrograms can we get star clears on ^^^ and ^^^^?
@Ginger :(
they were worthy of a star
"star this message as useful / interesting for the transcript"
Those were not useful or interesting
@RydwolfPrograms intrestingness is subjective
i found them intresting
The starboard isolates messages from their context
"w h a t" on its own isn't interesting or funny
it's not even interesting or funny in context
it's just a situationally appropriate response
also what's the other one that got starred lmao
15:03
Plus also two adjacent messages should almost never be starred
^
wait did the bruh get starred
bruh
We don't need a repeat of 2015 y'all :p
did the 2015 thing even happen in 2015 or was that someone going back way later to star messages from 2015
I assume it was 2015
@RydwolfPrograms what thing
15:05
because i feel like it would have been cleaned up if it actually was 2015
i feel so missed out even tho its no good thing lol
who the X is messing around with the stars again...
@RydwolfPrograms that message was actually useful!
Yeah, but if I unstarred five messages and only left one of my own it would look like RO abuse :p
If someone else agrees it's useful they can star it
why did you remove the star from your super useful message?
for starters it's common sense
15:08
In general singly-starred messages can and will be removed for any reason
Does anyone have feedback for these sandbox posts listed above?
15:23
I don't think it adds anything new
We have a ton of /HTML-parsing challenges
It's just gonna get dupe closed
15:40
@RydwolfPrograms I searched through all the questions and found no dupes.
@PlaceReporter99 there's no exact dupe, but it's quite similar to basically every other challenge
And there are at least half a dozen that involve parsing HTML too
16:05
@Feeds I wonder who I’m replying to…
@PlaceReporter99 feeds is just a bot
feeds isn't just a bot
sometimes it posts feed items, sometimes it posts room status changes, sometimes it dreams about electric unic♦rns
There isn't even a user 0
I would have thought they would use #0 first
And #-1 (Community) isn't even on Chat
16:56
Final reminder that bots aren't allowed here. I don't care if it's entirely manually controlled; in order to enforce consistent policies, unless we've approved it explicitly, chat bots that interact here (read-only bots are perfectly fine) are not allowed and I will take necessary action to stop them if this rule is not followed.
Is that only for this room or a site policy?
just this room, but it's generally good to assume that bots aren't allowed
bots are explicitly allowed in other rooms, like the Sandbox
^. feel free to use the sandbox, make your own room, etc. this just applies to this room (and also I don't think we ever defined it but let's just say it also applies to our official off topic room)
Since TST is a subsidiary of TNB it'd make sense that the rules would be inherited
@hyper-neutrino would using a chat client count?
17:03
Presumably not, since you're the one sending the messages
humans != bots
> I don't care if it's entirely manually controlled
ginger is correct. yes, I know that makes the definition of manually controlled bots vs. clients a bit fuzzy but in this case the account is literally called Utility Bot so I think it's fair to make that judgement lol
I love being correct!
user image
5
when the edge is sus
Technically is the best type of love.
okay here's the thing - if I can't tell it's a bot then it's fine because the point is the health of chat and not because I hate fun and want to be very technical and literal with y'all lol
17:06
we do hate fun here tho, so be sure not to have any fun
so if nobody can tell it's a bot because it's effectively just you chatting then no harm done
a bot in human clothing
 
2 hours later…
18:47
@hyper-neutrino Yeah, we took advantage of the lack of rules on TST and put Snowpaw (a bot) in there, it ended up just being disruptive so copying the rule over to there would be for the best
@Ginger Arguably the other way around :p
@RydwolfPrograms correction: you gave me explicit permission to put Snowy in there
there's no "we" here :p
...based on the lack of a rule saying I couldn't :p
just wanted to make sure that you were completely under the bus
@Ginger I've been saying for a while we should fork TNB's chatiquette for TST (with a few changes)
you have?
18:59
Yes
TST is a lawless place right now :p
I assumed that the chattiquette was inherited by virtue of it implementing the OfficialRoom trait
> Do: Be On-Topic
Don't think so :p
Oh we should update TNB's chatiquette to include TST's existence
the topic of TST is off-topic stuff, so by being off-topic you're being on-topic
logic™
Brilliant
Also I'm starting on that invisible MathJax script
It can transform arbitrary code into arbitrary MathJax
good luck
19:02
@Ginger but if it’s on-topic, then it’s off-topic…
correct
So people without the script (with proper Unicode rendering) will see x² = y² - y + 2 while people with the script will see \$x^2=y^2-y+2\$
The way it'll work for the sender is that you click a button next to "send" (or hit a shortcut), which opens a popup. In the popup, you can edit the code block and the MathJax, with a preview of each
and presumably those of us without Unicode rendering will see x�²��� =��� y�² - y ����+ 2����?
The code block preview will show you how it looks both with and without Chat Monospace Fix
@Ginger Only if you don't have proper Unicode rendering
Which I checked yesterday:
24 hours ago, by Rydwolf Programs
CMP: Do you see any whitespace, boxes, or question marks in between the arrows in this code block? ->​᠎‍‌⁠­⁡⁢⁣⁤‎<-
19:05
ugh, I thought I said "without Unicode rendering" :|
@Ginger maaaaybe :p
���
(well actually in that specific case no invis chars would actually be needed whatsoever)
(aside from one soft hyphen at the start of the code block to indicate it's using CIMJ)
so �x² = y² - y + 2
my font renders U+FFFD differently when it's in a code block lol
(right is in code block)
WAIT
I MADE IT ITALIC
You don't have Chat Monospace Fix?
19:09
not on this device
(fun fact I actually don't, I use a userstyle instead)
@RydwolfPrograms whaz that
@RydwolfPrograms only on my phone
@RydwolfPrograms Anyways, what's wrong with my sandbox post?:
-2
A: Sandbox for Proposed Challenges

HippopotomonstrosesquipedalianHow are you doing, Beta? In this challenge, you must write a full programme that takes the beta site number (e.g. PLDI is 127456), retrieves all the stats except the number of days in beta and prints the numbers to STDOUT along with their labels without any HTML tags. If the beta site does not ex...

19:19
Like I said, it's a dupe
It also doesn't specify the format of the Area 51 page
@RydwolfPrograms something i'm certain it's not.
Which you need to do, since if it changes, it would break every answer
@RydwolfPrograms $\mathbb{sigh}$
@PlaceReporter99 "Duplicate" for a challenge doesn't mean "the same challenge". It means "the hard part of doing this challenge is the same thing that makes another challenge hard"
@RydwolfPrograms finally, a worthy domain name
Well no purchases any time soon, I'm saving up for something :p
oh right, you said something about a concert
Yeah, upgrading from a seated ticket to GA because I'm a bigger fan of Paramore than I was when I bought the first tickets
20:03
The number of unit tests I’ve seen today of the form x.y = z; Assert.Equal(z, x.y); is… concerning.
Like somewhere in the 30-40 range
20:48
@Bbrk24 what
@RydwolfPrograms it happened again
I left the tab open while my laptop was closed all day, and I guess the timer just kept ticking?
21:46
Happy Pansexuality Awareness Day!
22:30
@Ginger hey what about me?
I explicitly approved it too :p
 
1 hour later…
23:32
@mousetail did you see my comment codegolf.stackexchange.com/questions/260931/…
I wonder, can challenges employ parallelization?
I take this further: Perhaps the most parallizable code can be a winning criterion.
One would need a CPU with prolific amount of cores to actually see them parallelized tho. Like 65536.
23:56
They announced this almost a year ago and I'm just now finding out about it
(and controller script which i will write when i have time aka 10 months later

« first day (4498 days earlier)      last day (643 days later) »