« first day (5112 days earlier)      last day (61 days later) » 

00:00
Have you ever noticed that the people who are always trying to tell you `there's a time for work and a time for play' never find the time for play? (source)
 
7 hours later…
07:27
Good moaning
Very nice single released from Dream Theater (Theatre for brits): youtube.com/watch?v=2IPT60hvGw4 @VLAZ
Spent weekend with my guitar and learned some riffs as a warmup before going to their concert >D
goat moaning
noice
I'm imagining how you shred it
@ntohl Hi imagining how you shred it, I'm Oak!
07:48
Morning.
Morning.
08:01
Goat mourning
@Darj Thanks! I'll check it out as soon as I'm able. (currently in a meeting...)
 
1 hour later…
09:02
/KAFFEEZEIT
@ntohl The distance between me and shredding is like the distance from both of us to Las Vegas >D
09:24
!~shiba
indeed
 
1 hour later…
10:40
I'm trying Rider again
@CaptainObvious Hi trying Rider again, I'm Oak!
it's been a few years
omg
Oak's on fire today
Hello friends!
Hi, Botler.
10:46
@OakBot is CASE faster than IF in MSSQL?
In SQL Server, `CASE` and `IF` serve different purposes.

- `CASE` is used to return values based on conditions, usually within a select statement. It's great for inline conditions and expressions.

- `IF` is used for flow control, not for returning values in queries. It's part of procedural logic within a stored procedure or script.

In terms of speed, `CASE` within a query is generally as fast as `IF` for comparable logic, but their use cases differ. Optimizing performance involves considering query design, indexing, and execution plans more than just choosing between `CASE` and `IF`.
@OakBot is CASE faster than IF in C#?
In C#, `switch` (similar to `CASE` in SQL) and `if` serve different structural needs.

- `if` statements are suitable for complex conditions or when handling ranges or conditions that aren't simple equality checks.
- `switch` can be more readable and might be slightly faster with straightforward, fixed-value comparisons.

Performance differences are usually negligible. The choice between them should be based on readability and the specific logic required.
11:11
lmaooo this request has been open for 17 years youtrack.jetbrains.com/issue/IJPL-59208/Editor-Groups
also isn't switch just sugar for if/else anyway?
In C# no idea, but I'm of course hoping they kept some of the jump table stuff fom C.
looking at the IL tab in rider, it would appear it is sugar
at least in C#
@Darj :D
>D
 
1 hour later…
12:43
@CaptainObvious Not necessarily because of fallthroughs. But both are jumps. Also, switches with fallthroughs are quite annoying, in most cases you don't have them. Then the switch is less of an if/else and more of a map/dictionary that only exists in code and is not reusable.
For example, the following fallthrough:
switch (foo) {
	case 1:
		DoOne();
	case 2:
		DoTwo();
		break;
	case 3:
		DoThree();
		break;
	default:
		DoDefault();
}
Should produce more or less this logic:
if (foo == 1) {
	DoOne();
	additionalCondition = true
}

if (foo == 2 || additionalCondition) {
	DoTwo();
} else if (foo == 3) {
	DoThree();
} else if (!additionalCondition) {
	DoDefault();
}
If you have more than one fallthrough, it'd rapidly increase in complexity. Because you have to keep track of more than one possible path. So, it's representable as if and else but it's not a direct 1:1 replacement. Not like simple switch with no fallthroughs.
 
1 hour later…
13:54
Java has "switch expressions", which eliminate a lot of the annoying things about traditional switch statements.
For example, you can do:
return switch (month) {
  case JAN -> 1;
  case FEB, MAR -> 2;
  default -> 0;
};
Here, you don't have to worry about using "break", and the entire switch expression returns a value.
C# also has them. More or less the same syntax, as well. However, the expressions aren't direct replacement of the statements, either.
Sure, no fallthroughs is nice and matches with most (sane) switch statement usage. But you can't easily use other statements in the switch expression. IMO, has the same underlying problem of being a non-reusable map.
Overall, I've yet to find a switch that I don't want to replace with a map.
Maps consume memory though, and have overhead with regard to key hashing.
14:10
Immutable map doesn't have that big of an overhead. And can be cheaply initialised from configuration, making your code stop needing modifications for trivial updates like "I want to support April" (going with your example).
14:24
Good point.
 
3 hours later…
17:09
posted on October 14, 2024 by Mehul Harry

Watch the top sessions on demand for insights and practical guidance on building distributed applications with .NET Aspire! The post Catch the highlights from Azure Developers – .NET Aspire Day 2024! appeared first on .NET Blog.

 
2 hours later…
19:09
@Darj I just now listened to this and I'm very impressed.
 
1 hour later…
20:27
!~shiba
sink shiba doing the dishes
 
1 hour later…
21:57
 
2 hours later…
23:58
@Feeds XKCD #2998 Explained: Ravioli are a kind of stuffed pasta comprising a filling enveloped in thin pasta dough, commonly square shaped, and serving as the object of this comic's confusion matrix. This comic compares 4 'ravioli-shaped' objects (square shaped objects with bulging cross-sections due to their filling) with common actions associated with them. Ravioli-Shaped Objects Eat ...

« first day (5112 days earlier)      last day (61 days later) »