« first day (3419 days earlier)      last day (1529 days later) » 

2:00 PM
I dont do JavaScript
its heresy has haunted my perfect logic for too long
 
if 1 answer lead to two question, means infinity
 
never shall they return
 
Task.Factory.StartNew(() => {}, TaskCreationOptions.LongRunning)
* How can you pass an entire function declaration as an argument to a method call:
 
@nyconing but there is infinite time
so, we should be fine
because a function is also a thing
its a value by itself
 
LinkedList can do infinity
 
2:02 PM
I know that in JavaScript function's are objects
@Wietlol a function is a value?
In C# what value type is a function?
 
functions are objects or values, yes
 
((a,b) = {})("foo","bar")
 
in C#, they are separated in a few types
 
one project has missing nuget packages
delete packages folder
 
some are Func<In, Out>
 
2:03 PM
restore nuget packages
 
var r = ((a,b) => a+b)("foo","bar")
 
all projects have missing nuget packages
 
One of the most simple method types in C# is Action
 
What! functions in C# are objects?
 
It's a delegate with no parameters and no return value
 
2:04 PM
@MyWrathAcademia all, if you want them to be
 
!~>((a,b) => a+b)("foo","bar")
 
Func<String, String, String> r = ((a, b) => a + b);
 
<!>Method name expected
theck
 
@Squirrelkiller what's a delegate here?
 
||>((a,b) => a+b)("foo","bar")
 
2:04 PM
@nyconing "foobar" Logged: ``
 
A function pointer
 
> Func<String, Boolean> r = String.IsNullOrEmpty;
 
@Squirrelkiller the whole lambda expression?
 
yes
If you look at some framework method signatures, they take something with Expression<...> - those take lambdas.
 
@Squirrelkiller Okay so the function reference is a delegate because the function reference is a reference for methods with the same parameter list and return type?
What is the return type of a lambda expresson since the function declaration () => {} does not specify a return type?
 
2:08 PM
> Console.WriteLine("Memory Used Without Iterator = \t" + string.Format(((memoryAfter - memoryBefore) / 1000).ToString(), "n") + "kb");
I don't understand the meaning of "n" there
The line works fine without that "n".
 
@nyconing are you missing a > in:
5 mins ago, by nyconing
((a,b) = {})("foo","bar")
 
The delegate is a specific type of variable. Where object o is a reference to a specific object, Action a is a delegate to a specific method.
 
Should it be ((a,b) => {})("foo","bar")?
 
@MyWrathAcademia That type would be an Action
 
@Squirrelkiller what type?
 
2:09 PM
Or in this case ThreadStart. Which is basically an Action, but can also be an Action<T> IIRC.
 
yes, > was missing
 
The type Action
 
@Squirrelkiller type of what?
 
!~msdn action
 
@CopperKettle String.Format("text", "n") should use "n" as value in the text template
 
2:10 PM
[Toast Notification and Action Center Overview for Windows 10 ...]
https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/07/08/toast-notification-and-action-center-overview-for-windows-10/
Jul 8, 2015 ... Toast notifications allows your app to inform the users about relevant information
and timely events that they should see and take action upon ...
 
but in your case, it will not be used
 
@nyconing wat
 
V.7
2:11 PM
@MyWrathAcademia This is too jsly
 
@Squirrelkiller hahaha I laughed like duck sound
 
Where do you want to go today?
 
@Squirrelkiller I get the first sentence but don't understand th rest because I dont know what object o and Action a is. Are you missing a definition/signature that could help me visualize this:
3 mins ago, by Squirrelkiller
The delegate is a specific type of variable. Where object o is a reference to a specific object, Action a is a delegate to a specific method.
 
@Neil long ago
 
@HéctorÁlvarez dcab
 
2:14 PM
@Wietlol That's a huge page, so I found nothing there about the use of String.Format(String, String)
 
I already read it long ago, but it makes no sense to me
if there is a pattern, I don't see it
 
@Wietlol Thank you! ))
 
only Q4 is true in that regard
 
@HéctorÁlvarez if there is no pattern, do you see it then?
 
2:16 PM
Q1-3 just follow one after another
but that's far from the question
 
that is the question
 
it has nothing to do with that, datebayo!
it's like those terrible jokes like "what's the difference between <insert 2 things that have literally nothing to do with one another>"
 
I like the Windows XP flying commercial with Madonna lmao
 
@HéctorÁlvarez it only has one answer tho
and you get that answer through logic
even I got the answer
so the logic must be really simple
 
the XP Media player was so stylish
and Apple said ms had no culture pfff
 
2:21 PM
@Freerey oh ya good old times
 
I mean even now Windows 10 has a definite style and they've been slowly evolving it
 
Remember Windows ME?
 
if it had better font, I would still find it viable UI
 
Windows ME: 2000's deformed sibling
 
V.7
I remember XMPlay(portable/awesome)
 
2:25 PM
I wonder how they would make a UI like that without it being an image
 
MS had some weird obsession with different-colored squares in 2000
 
and it shouldnt be an image because then you would have issues with sizes
 
V.7
@Wietlol Wasn't that a bunch of images?
 
I have no clue
 
V.7
2:26 PM
IMHO I mean, 99% of old designs were from image sets
 
Bunch of bmp inside dll
 
@Wietlol XP predates WPF, but the WPF approach would be to define paths, similar to SVGs, and add shading/textures to the resulting geometries.
 
@Wietlol following the answers I still don't find it is a valid answer
 
For XP, it was probably a bunch of BMPs at different resolutions and a window that didn't allow resizing.
 
@Freerey Windows ME (Mistake Edition) xD
 
2:27 PM
@HéctorÁlvarez start on question 2
 
I would literally never get there through logic with the given information
I did
 
Q1) What is the first question for which 'c' is the correct answer? a) Q3 b) Q4 c) Q1 or d) Q2 ?
Q2) What is the first question for which 'a' is the correct answer? a) Q4 b) Q2 c) Q3 or d) Q1 ?
Q3) What is the first question for which 'd' is the correct answer? a) Q1 b) Q2 c) Q4 or d) Q3 ?
Q4) What is the first question for which 'b' is the correct answer? a) Q2 b) Q4 c) Q3 or d) Q1 ?
on Q2, would A be a valid answer?
 
@bluetoothfx that wallpaper was from 2000
 
i know :)
 
I think so
 
2:28 PM
why so?
 
because Q4 A is Q2
 
> Q2) What is the first question for which 'a' is the correct answer? a) Q4
> a) Q4 is the first question for which 'a' is the correct answer
but "Q4 is the first question for which 'a' is the correct answer" is wrong
because Q2's answer is A
(we assumed so at least)
and Q2 is before Q4
 
V.7
Does anyone know if it's possible to replace something like ["101","114"] via correct values for 101 and 114 in Excel?
Or, "101, 114"
I.e. 101 is A, 114 is B
So, 101, 114 -> A, B
 
2:35 PM
that's a nice background
 
V.7
@DKDhilip ... it's so dark there
 
V.7
 
is it me, or has the "space aesthetic" died out?
I'd very much like to know how to make something similar to that longhorn pic, though
 
V.7
@Freerey It's in sleep rather dead
 
@Freerey, just a bunch of filters
 
I remember going to a bowling alley around the mid-2000s and they decorated the walls with realistic pics of the planets
 
V.7
@Freerey Might be possible via moving a phone/camera very sickly while photographing + photshop
 
ghhhh I've gotta find out now
 
Windows .NET
 
2:37 PM
I'm sure photoshop is how it's done, but I wann see the full process
 
V.7
@Freerey Just set a timer and drop a camera + spin it
 
There'll be a couple of approaches
V.7's is one lol, bit expensive though for one photo :P
 
I mean...motion blur exists
 
@Wietlol @Squirrelkiller @DKDhilip so the first argument in Task.Factory.StartNew(() => {}, TaskCreationOptions.LongRunning); means that you are passing an object (more accurately the wire to a function object) to the method Task.Factory.StartNew()?
 
you don't need to actually move the camera for it
 
V.7
2:38 PM
@DAustin Depends on author. Some might sell it +200% :D Labeled: "1 camera ~ 1 shot"
 
@V.7 lol
I think you've got a great idea for a business there :P
 
@MyWrathAcademia Passing Action or Func delegate
 
@Hans1984 ahah
 
V.7
 
@DKDhilip thank you. So Action object represents a function? What is Func delegate?
 
2:45 PM
Like Action but with Return value
Action = void, Func = return result
 
IEnumerable is an interface, which means that the only way to use it is to create a class that implements it. However, we can announce IEnumerable<String> stringsFound; How on Earth is this logical? Is this an interface or an object or what?
It's so arcane.
 
its a variable
with an upper bound type constraint
 
@DKDhilip I don't get this:
2 mins ago, by DK Dhilip
Action = void, Func = return result
 
"upper bound type constraint"? I googled it and found nothing.
 
it means that the value's type must be upper bound to IEnumerable<String>
aka, it must extend/implement IEnumerable<String>
 
2:48 PM
@DKDhilip = is an assignment operator so what's going on in that line you wrote
 
(@MyWrathAcademia its not code)
 
an upper bound is a maximal value of something
 
Just explanation, not code
 
Please explain in words
 
You can see Action as a void method, Func as method with return type
 
2:49 PM
> An upper type bound T <: A declares that type variable T refers to a subtype of type A.
in C#, this would be like
IEnumerable<String> myVariableName;
 
Thank you! I don't understand. Will try to just read on ))
 
The upper type bound IEnumerable<String> declares that the type of the value of myVariableName refers to a subtype of type IEnumerable<String>.
its like Object obj = "Hello";
it is a String, not an Object
 
whom invited me to the github org??
 
but since String is a subtype of Object, this is valid
 
The IEnumerable<string> stringsFound is a reference. Not an object.
 
2:52 PM
my cat has 0 qualms about sitting in front of the monitor
I'm lucky I have 16:9 ratio
 
@CaptainSquirrel Whom'st've thought you took so long to realize it
 
I Don't check my personal emails during the day
...normally
ohhhh twas you
A DUN HAVE PERMISSIONS TO MAKE A REPO
 
@Wietlol But IEnumerable is not a type, it is an interface: a set of "empty" methods that must be implemented by the user in a class created by the user.
 
an interface is a type
interfaces, classes, enums and structs are all types
 
I thought a type was int, bool etc.
 
2:59 PM
Those are simple types
 
int, bool, etc are also types
 
@CaptainSquirrel Try again
 
int is a struct
same as bool
string is a class
 
IEnumerable is an interface
 
2:59 PM
But when I announce IEnumerable<String> stringsFound; - who is creating the class that implements IEnumerable? Is the class created automatically by the computer?
 
no one is creating the class
 
I can't imagine the mechanism in my head.
 
for example this code
 
A class is only ever created by a developer or a code generator.
 
IEnumerable<String> stringsFound;
foreach (var item in stringsFound)
{
    Console.WriteLine(item);
}
 
3:00 PM
WHat you need is an object
Or an instance of a class
 
this code results in a compilation error
 
@Wietlol Your reference is null
 
I'll push the code there later this evening if i remember
 
because it is still missing a very important piece of information
@Squirrelkiller no, its undefined
 
3:01 PM
@CaptainSquirrel Noice
@Wietlol Get your javascript mentality outta here
 
there is a major difference between IEnumerable<String> stringsFound; and IEnumerable<String> stringsFound = null;
ok?
 
Yeah it's very much defined, but very much UN-assigned... I iz a poet innit
 
Either you go modern, then you have to make it nullable
Or you don't, then there's no difference between the two
 
the first is a compilation error
the second is a runtime error
there is quite a big difference between the two
 
3:03 PM
second is a compilation error too actually
 
nope
 
unless you dont have nullable references yet
 
even then, its only a warning, right?
still no errors
 
Oh right it's jsut a warning normally
You null isnt underlined? MIne is on the first line...
 
@Wietlol @DKDhilip if the function on the right side of the assignment operator = in Action a = () => {}; does not return any thing and the function body is empty so no task is performed then what is the point of Action a = () => {}; or the first argument in Task.Factory.StartNew(() => {}, TaskCreationOptions.LongRunning);
 
3:06 PM
no-op? :D
its not always useful
but sometimes it is just required
its like an empty method
 
I was giving example, not exactly useful code
So I put empty method body
 
OK thanks. I still don't understand what a delegate is?
 
its just terminology
no one here understands what a delegate really is
 
Delegates are easy. It's a method that pretends to be some other method.
 
Delegate is just the memory address of a function that adheres to a specific signature. A signature is returntype, paramtype1, paramtype2 ...
 
3:11 PM
^ see?
 
In Action a = () => {}; what is a delegate?
 
two completely different answers
 
we're still on this?
 
But what IEnumerable<T> is something that boggles me.
 
same tbh
 
3:12 PM
IEnumerable<T> is the memory address of an object that implements IEnumerable interface methods for objects of type T
 
in C++, it was a literal pointer to a method
 
can someone tell me in Action a = () => {}; which part is a delegate?
 
"Action" would be the delegate
 
But Action is a class
?
 
it's the method signature
 
3:14 PM
sigh I've gotta make a c++ app someday
 
in Action, it has a single method which takes no parameters and returns nothing
 
@Neil So is Action a class that has a single static method?
 
when did I say it was static?
 
Oh sorry
 
No. Action is a delegate, it represents a function signature. The signature is: Any function that returns void and takes no parameters.
 
3:16 PM
the single method belongs to instances of the class Action.
 
I think there's an implicit conversion there between a class with only one method and a delegate
 
@Squirrelintraining ;)
 
clearly () => {} isn't a new Action instance
 
Are you sure about that?
 
depends on where it is used
lambdas are not explicit about their typing
they accept the type of the requesting node
when used as value when expecting an Action, it will be an Action instance
the instance can be made a singleton tho
so it doesnt have to be a new Action instance every time
 
3:22 PM
@BlackSquirrel But how does it implement the IEnumerable interface in this example code? I see no implementation, it is only announced and used. An implementation would mean that some class is created that "fleshes out" the bare declarations of methods made inside the interface.
 
     stringsFound =
           from line in new StreamReaderEnumerable(@"c:\temp\tempFile.txt")
           where line.Contains("string to search for")
           select line;
that is a very important part of the code
that is where an instance is given to the variable
 
Action is a delegate type
 
the instance's type is definitely not just IEnumerable<String>
 
It's a type of delegate
 
it is probably a class that implements the IEnumerable<String>
 
3:24 PM
When you decalre Action a; - a is a delegate
 
however, the code that provides the instance or implementation is hidden deep in the .net library
 
@BlackSquirrel cue john cena
 
@CopperKettle This query returns an IEnumerable:
from line in new StreamReaderEnumerable(@"c:\temp\tempFile.txt")
               where line.Contains("string to search for")
               select line;
THere is of course an instance of an actual class there, but we don't know that. We only know it's a nIEnumerable.
That's polymorphism.
 
3:39 PM
remove the duckduckgo stuff in front if you want a onebox
 
silly question
if im looping through something, do I want the exception handler inside our outside the loop?
inside or outside*
 
depends on where you wanna handle it?
 
I guess inside it will continue looping even if theres 1 pass that errors whereas outside the loop will stop?
 
HAMMERTIME!
 
If you parse a csv, and one line cant be parsed, do you want the whole thing to stop of do oyu want to skip that line?
@DAustin Exactly
 
3:43 PM
good thought, thankfully its whole orders as opposed to lines, so yes I'd want it to process the next order
thanks, just needed a second opinion if there was some design guideline I was unaware of
xoxox
 
@Squirrelkiller Like this?
https://i.ytimg.com/vi/gucf5E3R0do/hqdefault.jpg
Ta :)
 
I tell you what, reverse engineering old code is a great way to find out where they wrote redundant code lol
 
Aha! Apologies I should be in the sandbox I know..
 
there is a loop that literally updates the order status to say its been imported, but does nothing xD
i totally see no problems with that
 
when you have to call someone but you're about to make a breakthrough in your code @.@
 
3:49 PM
@DAustin you could also map each element to a result
then it will loop over all of them an tell you if they succeeded, what the result of the success is and if it failed, why it failed
 
come again wiet?
 
I remembered last time when rewriting a program, I do reverse engineering on protocol message format rather than looking at their stupid code
 
ah ok, tbh that might be overkill at this point in process, but its a good thought, will possibly add it next refactor
99% of the errors are connectivity or fileIO issues
 
but if you dont, you only add more options to silently fail
 
oh im past that point Wiet lol
Im on another automated process that does price checking etc
 
3:52 PM
and if price checking fails... you accept everything anyway?
 
yeh its checked manually anyway, they have this bizarre pricing matrix so if the price seems off it'll flag a warning to sales
like each item has 40 prices, no joke
but obv, it may not match any of those because "mr. x in your sales dept agreed that I could buy 100 at this price"
granted that's only through the FTP vector, the website etc does it all at thefront end
I hear you though, it's really dumb, but it's what I've got to do :(
 
xD
I'm really only just reaching the stage where I can make improvements to the code
atm I've just ported it
but the service im working on now seldom throws an eror, if it does it'll be a connectivity issue
at least that's all it's ever been for the last 2 years lol
Send Order Confirmation, Create Print Files, Push To PoS Till for manual processing
so smtp failure, FileIO failure, or SQL connection failures are the only exceptions that come out of this service
 
My systems havent had an error in the past decade
... they are offline...
 
Does Action a = () => { }; return an Action delegate because () => {}is parameterless and does not have a return type?
 
3:59 PM
^ yes, mostly
 

« first day (3419 days earlier)      last day (1529 days later) »