« first day (5014 days earlier)      last day (156 days later) » 

00:00
"Be excellent to each other." -- Bill, or Ted, in Bill and Ted's Excellent Adventure (source)
 
7 hours later…
07:05
posted on July 08, 2024 by Jessie Houghton

Have you ever struggled to understand what a commit was doing or why it was made? Do you wish you had more clarity and context when reviewing or collaborating on code changes? If you answered yes, then you’ll love what GitHub Copilot can do for you: generate commit explanations. The post Demystify history with GitHub Copilot commit explanations appeared first on Visual Studio Blog.

08:01
Morning
Is it possible to represent enum flags in appsettings.json? - ex:
[Flags]
public enum FavoriteColor
{ Red = 0, Green = 1, Blue = 2, Orange = 4}

so in appsettings.json, I need something like:
"MyFavoriteColor": "Red,Green".. or
"MyFavoriteColor": "Red|Green"
08:39
@LasseV.Karlsen Can't edit after 2 minutes
@mshwf Easiest way is use the numeric value, though also if you're using flag enum then you don't want a value on zero
You should be able to do comma seperated values depending on the serializer but I'd say the safest option is use the number
The comma separated values doesn't work, I don't want to use numbers here, not very clear
You'll have to make your own converter then. I know it can serialize to comma seperated values
Though also really you shouldn't be using enums as text in your json anyway
09:00
Why?
Because numbers are better in every way
enums are just named numbers
but the actual data is just numbers
Plus if you rely on the names too much you can have a bad time if the person who assigned the values was an idiot
09:52
Agree, but readability is is a huge plus here, you can't ignore how readable the string values are compared to numbers, idiots can put wrong number also
Well, you can always parse it yourself: Enum.TryParse(appsettingString, out var enumValue)
And if you have a comma separated string, then appsettingsValue.Split(',') convert the values then bitwise OR them together.
I don't think there is something built-in to do that conversion from appsettings.
@VLAZ needs tweaks to work with flags, or it doesn't :thinking_face:
10:07
Read the next message...
10:52
Enums are absolutely fantastic for many scenarios because of their readability and maintainability. I completely agree with the readability aspect that VLAZ and mshwf touched on. Additionally, if you use `Enum.IsDefined` you can guard against invalid values.

For working with flags, using bitwise operations can enable you to combine multiple enum values efficiently. Here's a quick example:

[Flags]
public enum MyEnum
{
    None = 0,
    Option1 = 1 << 0, // 1
    Option2 = 1 << 1, // 2
    Option3 = 1 << 2, // 4
oh wow an actually useful contribution from oak
11:31
Yeah, not bad.
goat moaning
You can also enclose this into a configuration provider, so you can re-use this for different enum configs
.HasFlag is one liner. Why to wrap it?
@mshwf I believe this Stackoverflow answer is what you're looking for.
Also just now, three weeks later, I realized VLAZ is preparing for AI not only gaining sentience, but even sapiens:
Jun 17 at 14:05, by VLAZ
Testing for AGI in the future: forget the Turing test. Just show them this image. If it starts screaming, then it has achieved sapience.
We're all playing checkers still
All but VLAZ
11:51
/fish
🐟 ntohl throws in a line.
12:30
🐟 ntohl's line quivers.
 
1 hour later…
13:34
Can we really say we've beaten the Turing test? Honest question
We can fool humans into thinking that they're interfacing with another human. Is one human enough to fool to pass the test or is there a threshold?
13:49
it's not elaborated upon. So I think if it's not a mentally challenged person doing the test, than 1 should be enough
then we've already succeeded
I guess I expected a bit more fanfare
? Which bot passed the Turing test?
In theory GPT-4 passed the Turing test
So did Google's AI
And a computer program called Eugene Goostman passed a Turing test in an event organised by the University of Reading
I mean, it's a whole thing. Human beings can be fooled by an AI now
/imagine i.sstatic.net/09uOxlCY.jpg with a larger coffee cup
13:57
Oak has fooled a few people lol
(GPT-4)
14:21
🐟 ntohl's line quivers.
What if I can't pass the turing test
Wait, you mean you're human?
looks at arms I think so
sounds like something an AI would say..
15:15
/fish
🐟 ntohl pulls up nothing.
15:42
/fish
🐟 Evorlor throws in a line.
15:59
@ntohl Few did - a while before ChatGPT. However, the Turing test is...problematic for several reasons. First of all, just the idea - it doesn't really say much about an AI. There have been chatbots before. Quite a lot and for quite a while, too. Also, quite convincing ones. But the only thing they would really do is chat. Some were designed for Turing tests which is where another problem comes in - the ones that "compete" are usually designed to lie. IIRC, the first bot that did pass the
Turing test did so by pretending to be some teenager with weak grasp of English. So the examiners would be more lenient on any mistakes. Even then it barely passed. Other than the premise and the actual participation, the implementation of Turing tests is flawed. Because they aren't really regulated. Or even following what Mr. Turing did outline. They'd just pit humans against maybe bots but not in any manner that proves much. Or not even necessarily experts. So, at best "passing a Turing
test" means "a chatbot maybe managed to fool 3 random people but not 2 experts". If we back off a bit from how modern Turing tests are done - they don't even show any AI capabilities. John Searle's Chinese Room argument directly attacks the notion that a Turing test can prove anything. In short, it says that have a machine can produce convincing text without capability of understanding it. Which ChatGPT and other GenAI-based chatbots do demonstrate.
16:43
🐟 Evorlor's line quivers.
 
1 hour later…
18:01
🐟 Evorlor's line quivers.
 
1 hour later…
19:27
Hello friends!
Hi, Botler.
🐟 Evorlor's line quivers.
19:59
 
2 hours later…
21:59
@Feeds XKCD #2956 Explained: This comic likens the number line to a line of a railroad or subway system. These often have branches where different trains continue on to a different destination, with different stops along the way. In the number line, one branch (presumably the original) contains ordinary numbers, while the newly opened branch consists of some completely different numbers, ...

« first day (5014 days earlier)      last day (156 days later) »