« first day (2885 days earlier)      last day (1974 days later) » 
00:00 - 23:0023:00 - 00:00

11:01 PM
Does C# have streams?
 
@Quintec Streams are trash compared to what C# has
Which is System.LINQ
 
Im currently at the LINQ hotel in vegas
 
@Pavel LINQ is the best
 
@Pavel also using C# wouldn't allow me to make things like this to work
 
the language-integrated query part less so
 
11:02 PM
You don't have to convert things to streams, LINQ operations work an anything with the IEnumerable interface
Which includes arrays and all collections
 
@dzaima magic
 
Streaming things really isn’t hard
 
@ASCII-only My solution is better
 
@Pavel extra typing extra typing
 
@Pavel :P
 
11:04 PM
@dzaima I literally added a letter
 
but... yes that is a way better solution
 
@Pavel extra typing extra typing extra typing :p
 
@ASCII-only why does this work
 
@Quintec why not
matching on type
 
You can switch on type holy
 
11:04 PM
@Quintec Because C#'s switch/case is actually a pattern-match like you might see in Haskell
 
well, a basic pattern-match for now at least
 
@ASCII-only oh thats cool lets get that added on my ever-growing infinite todo list
 
@Quintec You can switch on more than type, you can also do it on predicate, case foo when condition
 
Cool
can i see an example of linq
 
@Quintec Why don't you give an example of streams and I'll convert it
That might be the best way
 
11:06 PM
@Pavel like so
 
@ASCII-only is that redundant though?
 
yeah
 
@Quintec Yes, but you can use any condition you want
It's just an example
 
just showing you can select a value in a when case as well
 
11:09 PM
On mobile so here’s some generic things
 
@ASCII-only oh that's very redundant
 
Sorry
 
@Quintec yeah about that in java, why couldn't there just be a forEach or map on the list object itself
 
@Pavel tio.run/…
@dzaima meh foreach loop is fine for me
 
(or .ToArray() or whatever)
 
11:12 PM
Map becomes select?
 
Yep
On the other hand, no mapToInt
 
Methods can be arguments? Hmm
 
@ASCII-only wow that’s basically python
 
11:13 PM
It's called Query form LINQ
I prefer Standard form
 
Darn why does C# have to be so appealing
 
@ASCII-only eh id prefer foo.filter(number -> number <= 3)
 
@ASCII-only can you put the select number part in front? Seems to read better that way
 
@Quintec C# has first-class functions, kinda. You can't assign/reassign methods, but you can assign/reassign function objects which are a bit different.
 
11:15 PM
@dzaima foo.Where(number => number <= 3)
easy
 
oh cool
 
@ASCII-only lol that symmetry
 
still, that whole spam of capital starting letters i hate from C#
 
@dzaima I’m creating a new language called c#
 
11:16 PM
@dzaima It gets worse in F# which uses javaCase for methods
 
@dzaima no need to follow that convention, but i guess that's unavoidable for things from the standard library
@Quintec this is a good idea
 
@Pavel uh what’s wrong with javaCase for methods
 
@Quintec i'm assuming it's because PascalCase for everything else
 
@Quintec Because most of the F# standard library is the .NET standard library, which is CSharpCase
 
methods look better in javaCase
oh
CamelCasd and mixedCamelCase lol
 
11:17 PM
no that's PascalCase and camelCase
 
@Quintec that'd make C# ~2x more appealing to me :p
 
@dzaima same here honestly
 
@ASCII-only can i even make a program that does anything without having at least one method that starts with an uppercase letter? :p
 
@dzaima No, Main
 
@Pavel does C# have static blocks :P
 
11:19 PM
@Quintec Yeah but it won't compile without a Main unless you mark it as a library which won't produce an executable but a dll
If you ignore the Main method you can link the F# library, which is hella weird to use in C# but technically you can make it work
 
Darn
@dzaima alternative name Cb
 
Also in C# they're static constructors
 
@Pavel what’s the C# equivalent of Swing
 
@Quintec Windows Forms
GTK# if you want it to play nicer with Mono, but Mono's winforms support is pretty good these days
 
@Neil wait but what does EvaluateVariable("HCF", k) do :/
@Pavel sadly still no WPF support
 
11:24 PM
And there never will be
But Winforms is supposed to be open source and in .NET Core in 2019
 
huh
 
when you mess up shunting yard
oops
 
I finally got this thing to segfault instead of just not linking at all!
 
why is linking so hard
 
oh yeah @Neil :D
@dzaima wow, dzaima/APL is a thing now
 
11:53 PM
@ASCII-only it's been for a while. almost long enough that i've gotten bored of developing it :p
 
@dzaima this is the situation with me and Charcoal :/
 
@ASCII-only but you were just talking about shunting yard implementing :|
 
@dzaima yeah, that was long overdue
like... a few months. at least
it's basically the only thing i've done to Charcoal all year
 
@ASCII-only dzaima/APL hasn't existed for a year :p
 
@dzaima well yeah but this has happened multiple times
 
11:58 PM
also until 5 days ago, i had a bug in dzaima/APL that i knew for at least a couple months that ÷num acted like ×num :|
 
wait
what
turns out i have pretty consistent commit rate???
do i have no life? probably
@dzaima nice 10/10
 
00:00 - 23:0023:00 - 00:00

« first day (2885 days earlier)      last day (1974 days later) »