« first day (3341 days earlier)      last day (1590 days later) » 
00:00 - 13:0013:00 - 00:00

12:57 AM
Using Systemm.Numerics is possible to create a Vector<int> with less values than the specified in Vector<int>.Count?
 
 
4 hours later…
4:32 AM
morning! :)
hugs
 
dodged
^ hugs them instead
 
 
3 hours later…
7:31 AM
@nyconing That's cute.
'Mornin.
 
7:53 AM
morning
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
mr5
you guys are late
 
Buenoos diiaaaaas CeeeShaaaarp! Como estan?
 
morning
 
8:15 AM
@Squirrelkiller ESTAS UNA MOSCHOKOLADE
 
8:32 AM
\o
 
8:49 AM
yoyoyp
 
mr5
9:04 AM
Are you guys on yearend break already?
 
whatth is yearend break
afaik engineering was never break
 
An extended break that some lucky bastards get at the end of the year for christmas
Alternatively, some people tactically use their annual leave which they forgot to use at other times of the year slotted in around christmas to result in over 2 straight weeks of not being in work
 
mr5
2 weeks including the unused leave?
Dude, 2 weeks is the normal duration
and the most common leave credits from where I'm from is about 1 week so you could possibly have 3 week in a row absent
I don't forgot my leave credits, it just happens that I used it when I feel like not going in work :(
now it's all gone
 
9:22 AM
> Project 'My.Epic.Project' load finished with warnings: The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.1. at (112:5)
uhm... windows update? what did you bork?
 
mr5
Does it comes with a builtin dotnet update command?
 
huh?
 
mr5
cli
 
I havent changed anything, I updated windows last fredas, and now everything is bork
both VS2017 and Rider give this error
project (which git claims to be the same as last week) built fine last week
I guess ill try a restart
 
\o
 
9:33 AM
well... restart did absolutely nothing
I guess ill try re-installing dotnet core
 
in KCG, 10 hours ago, by OakBot
Last yeer I kudn't spel Engineer. Now I are won. (source)
lol
@whoever said that
 
> Last year I couldn't even spell "engineer" and now I am one.
 
I taped strawberry into wall, sell $1.20
 
not sure where it comes from tho
cant pin a name on it
perhaps, noone said it
 
@nyconing what
wat
 
9:42 AM
 
@Hans1984 keep up wiff the news
 
oh!
now i get it
 
good morning
 
ohai
 
welcome
 
9:47 AM
can you give some of that "good" to me? I am missing it in my morning
 
@Wietlol everyone checks how to spell Engineer on their degree... duh.
 
yay, solved my problems
 
im a big fan of dr pepper
the old cans had this on it but they removed it
unfortunatly it didnt
 
@Hans1984 truth in advertising
 
I guess some idiot sued them..
ppl are so dumb I wouldnt be surprised
anyway I love dr pepper
I rarely drink it though
like 4 times a year
 
9:57 AM
Now I feel like a Dr. Pepper. But alas, all we have in our office kitchenette are Coke, Coke Zero, Sprite, orange juice, grapefruit juice and club soda. imgflip.com/s/meme/First-World-Problems.jpg
 
ugh
those are so generic
dr pepper is rare
and exciting !
why are my new glasses not shown yet
hmm
 
compared to Avner's problems, mine are negligible
who needs dotnet core >1.1 anyway?
 
its all about the soda
 
Dr Pepper is rare?
Nah
 
in germany it is
it is not very common over here
 
10:02 AM
 
I have to go to a gas station to buy it
overpriced of course
 
ArrayList wooooooo \o/
 
I wrote a tiny program, and it works, but I wonder why, because arlNames must be set to null each time the button is pressed, shouldn't it?
 
why should it?
 
Because as the button is pressed, the first instruction says "Create a new ArrayList"
 
10:04 AM
and?
 
What is problem?
 
prolly some C++ dev who is new to sane languages :D
no offense tho :D
 
No, I'm just a newbie. I'm a translator.
 
translator?
 
The newly created arlNames must be empty, mustn't it?
@Wietlol Yes, Russian to English, pharmacology and medicine.
 
10:06 AM
when you do new ArrayList() that list is empty
 
So it's recreated again and again, and always holds only the most recent string put into it.
 
2 weeks till vacation
 
it is created, and then destroyed
 
nods
 
your array list stops being used after the for loop
 
10:07 AM
 
so, the runtime will claim it as "garbage"
when you press the button again, the same procedure runs
 
What if I want to fill it with more than one item? Must I declare it outside the button-click procedure?
 
Exactly that yes
 
you must store it somewhere, yes
most probably as a class field/property would be sufficient for your case
 
Declaring it in the scope of that method will make it exist as long as the method does, which would probably be a few ms. Declare it in the class and it will exist as long as the class does, which I'm assuming the class is a window, so would exist as long as the window does
 
mr5
10:10 AM
whoa
it seems like programming is becoming a new literacy
 
keep in mind that
public void foo() {
    var list = new List<String>();
    myClassProperty = list;
}
will make it live longer than just the method scope, because it is still usable through the property
 
nods
Seems to work, thank you. I declared it in the overall class FrmMain:Form. I wonder why it does not work if I declare inside the public static void Main() which is inside the same form class.
 
Because main is just another method
Although it does live longer, variables declared inside a method are not accessible outside the method
 
it doesnt always live longer
I have many applications where main exits in milliseconds, while the applications remains running for days if not weeks... or months
wietbot for example
 
Uhh
What shitty languages are these
 
10:23 AM
threads
program doesnt exit while a thread is still running, even if main thread already completed
 
wietbot is a nutcase
 
only if ML is active
;)
 
Hello Guys ,
what is the best way to do some stuff inside foreach and don't wait for the result
i have a method that do some work then update DB
i want the update DB part to be executed without waiting
so when it reach to update DB , it fires and goes to next item in foreach
 
fire and forget task
keep in mind, updating the database might fail
 
why
 
10:26 AM
It's terribly unwise, but a new task or a new thread could be started and the insert done inside it
 
if you want to do something in case it fails, you have to wait
 
But you should absolutely wait for the database to return to know if it actually worrked or not.
 
you still missed a part
 
Task.Run(()=>{}) is a good choice ?
 
It does what you want to do yes. However, what you want to do is wrong.
 
10:27 AM
@CaptainObvious i just update a record and don't want to wait
@CaptainObvious please clarify
 
it does what you say you want it to do, but it is probably not what you want it to do
 
:o
 
Nobody wants to wait, but there's 2 solutions. 1. Suck it up and wait or 2. Optimise the database so the operation doesn't take as long
@Bassem What if the update fails?
 
can i log it to somewhere and continue ;
?
 
mr5
@CopperKettle are you switching career?
 
10:29 AM
But what do you plan to do if it fails?
 
nothing , i will see the log
 
I mean you could store the results until the end, but you still end up waiting for the inserts to finish
 
to know the reason and avoid it next time
 
Because the log is useless if you don't wait for the result
What if there is no errors one time, but there is next time
Basically, it's a really bad plan
 
so what is your suggestion ?
 
10:30 AM
Wait.
 
:|
 
either wait, or make it really asynchronous
 
Mkaing it async doesn't help though, the result still has to be awaited at some point
 
@Wietlol you mean saveChangesAsync ?
 
It might help some of the delay but it won't get rid of it entirely
I have a method which (in one instance) added 2342 rows to the database. It took less than 2 seconds
 
10:32 AM
@CaptainObvious can i make a new http web request ?
and will not wait the response
 
I mean, you send a request for an update to the server,
the server receives the request and tells you it will work on it,
then you use any technology to refresh the status and continue your process
 
What has HttpWebRequest got to do with it?
 
grabs popcorn
 
that is truly asynchronous
they are separate procedures
 
Using a task is fine if you don't want to wait for the response
But you should wait for the response
 
10:33 AM
you mean task.run ?
 
if you dont want to wait for completion of a request, you must split it up
 
sorry i don't get it :(
 
we have a policy where, if a task is likely to run for longer than 3 seconds, we make it a separated process
say you click on a button to update some stuff, that request is sent to the server to be processed (added to some queue)
 
@Bassem It's always better to abort doing the thing it is you're doing, clean up, and inform the user of the problem. Otherwise the user will end up with unexpected results and nobody is ever going to read the logs; they are only there for troubleshooting later.
 
TLDR; Just wait for the insert to finish
 
10:36 AM
the user almost immediately gets the response and knows the server is busy with his request
 
You can't just YOLO shit into the database and hope for the best
3
 
the user can then ask for a status update of his request
 
@Wietlol 3 seconds? My apps take longer than that to start
 
then starting the app would be a separate process in our business :D
 
job security?
 
10:37 AM
you can send a request to the server to start the app and ask for a status update XD
 
@Bassem Do you feel helped?
 
I see that most people don't like the idea and support waiting
while my job is i don't need to wait :(
 
why do you not need to wait?
 
so decide..if there is an error, but it doesnt matter..do as you said. but that seems bad
 
If that's your requirement, then your requirement is wrong
 
mr5
10:44 AM
then if it's wrong, the management is to blame.
 
only if they explicitly said to do it that way..which i doubt
 
if the requirements is wrong , why there is something called Async & Background Services
I believe there is a way to do it
 
Async exists for a silly reason
 
there is.
 
but why do you not have to wait?
what is the context of the operation?
 
10:48 AM
but it requires more than 1 second of thought..
 
@Wietlol because it is a job that must run every 1 min , it is something like when you set your alarm to 07:00 AM , it will be very bad to surprised that it ring @ 07:05 AM (Due to performance issues )
i have a background service that run every 1 min
do a lot of tasks
call people , etc
 
mr5
quston, what's the common fix for concurrency issue? I would like to wait for the first invocation of a callback to finish first before proceeding to the next call.
Should I use semaphore or lock?
 
I think you found actually the only good reason async exists
you do want to ensure that calling person A succeeded
and you want to ensure that calling person B succeeded
but you dont have to wait for the confirmation that calling person A has succeeded before starting to call person B
that is why you want to run all your tasks in parallel instead of in sequence
async helps a lot in that
you can do await SaveChangesAsync() and while the task is waiting, the same processor will start doing other tasks
 
so await operator will not stop the task till it done ?
any recommended articles please on how to do that
 
@Bassem All the await operator does is listen for task completion (whether successfully or not), grabs a thread context, unwraps the results, and returns them or throws an exception if it failed. It doesn't manage the task.
@mr5 You should wrap the callback in a Task and use async/await to get clear and coherent code flow across callbacks.
 
10:56 AM
so in my case i shouldn't use await , right ?
 
@Bassem Look at your requirements: "do some stuff [..] and don't wait for the result". The await operator, as its name implies, is there to wait for results.
 
ok Thanks
@wietlol , thanks for your help :)
 
@Bassem so what are you going to do?
 
Avner, if you dont want to wait for the results, shouldnt you do that on a higher level?
 
@ABuckau will try to apply saveChangesAsync as per Wietlol suggestion
 
10:59 AM
@Wietlol I don't know enough about the context here.
 
mr5
@AvnerShahar-Kashtan unfortunately, it's an event callback (sender, e) thing. Should I wrap it with another Task method?
 
basically, List<Process>, foreach process.RunAsync()
 
@mr5 You can use a TaskCompletionSource to wrap the callback with a task, yes.
 
should you fire and forget on process.RunAsync() or on processes.foreach ?
 
:48057598 var runningProcesses = processes.Select(RunAsync)
Now you have a list of tasks, running in parallel, for each process.
 
11:01 AM
Select() is lazy tho, in C-harp
 
@Wietlol Sure, so do a ToArray() to get it as a Task[].
Now, if you really don't care about the processes, simply don't keep the resulting tasks.
But it makes sense to hang on to them, or at the very least to hang on to a Task.WhenAll(runningProcesses), if you need to know whether they all finished, for instance.
 
Don't say that, that's what the Google devs did and look at Chrome
 
but you could also do a Task.Run(() => RunAll(processes));
@CaptainObvious he is a google dev now, he has to pick up their style
 
sorry guys , what is the difference between wrapping the code inside Task.Run(()={ savechanges() })

and use saveChangesAsync
 
SaveChangesAsync() frees the processor, Task.Run decouples the process from the process that called the Task.Run
 
11:04 AM
What does RunAll do?
 
a select with await all
 
@Bassem Most likely, a call to Task.Run(SaveChanges) will create a new thread, which will block while a synchronous I/O call is performed.
Whereas SaveChangedAsync will run synchronously until the I/O call is made, at which point it will release the thread, wait for the I/O to complete, and then resume.
No blocking thread.
 
mr5
 
@Wietlol How many tasks are you creating, and why? It looks like this Task.Run does the same thing as RunAll, and simply wrapping it in another task.
 
pick one or three
i dont like two
 
mr5
11:07 AM
which is the most correct format?
 
@mr5 You're overthinking this.
They're all fine.
 
@AvnerShahar-Kashtan the Task.Run... nvm, RunAll is ofcourse async itself, which you can fire and forget
 
mr5
It's been in my head for a long time and I still don't have an answer for that.
I think I'm not present in the school when our teacher taught that/
 
this is one of those monday
 
11:09 AM
@mr5 It's unlikely you would have been taught that in any meaningful way. The etiquette for email is different than for written letters, and for IM, and in all of them, all three of yours are fine.
 
where I have even less motivation then usually on monday
I need vacation
 
@Hans1984 Do you get a christmas vacation?
 
mr5
@AvnerShahar-Kashtan but there's got to be one right answer right?
 
yeah I sent in a request 2 weeks ago
 
@mr5 No, why would there be?
 
11:10 AM
im not sure
 
mr5
it's actually not an email
 
but I will take the vaction one way or the other
granted or not
I dont care
2 weeks
 
mr5
@AvnerShahar-Kashtan because I'm assuming everything is defined and established in the English literature
 
@mr5 Nope. Language doesn't work that way.
 
mr5
it should be the same as programming language, no?
 
11:12 AM
Do you say "hi" or "hello"? You can do both. They have their own nuances and differences in register. None are "right" or "wrong" because there's no universal definition of right or wrong.
@mr5 Nope. Doesn't work that way. Human communication is a lot more variable, nuanced, contextual and ever-changing.
 
mr5
I think there is as long as it's limited by the time and the environment
 
@mr5 Absolutely not. It doesn't work that way.
 
mr5
like, for the mean time, you are right, but after a certain time passed by, everything we say becomes irrelevant.
 
The same phrase "Hi, XXX", could be interpreted differently by different people based on the specific person and their history and local style and custom, but also by the relationship between you two ("Hi is too informal for someone in the organization!") but might be OK in an org that's less formal. All this is condensed into tiny nuances that are, again, interpreted differently in different places.
 
@AvnerShahar-Kashtan I am too used to wietlang now XD
I forgot how C# async await works
I am like "oh, I want a fire and forget, better use Task.Run( myLambda )"
 
mr5
11:15 AM
yeah that's what I'm trying to say. right and wrong is limited by some factor and becomes irrelevant if you add another factor
 
But in this case the difference between "no line break", "one line break" and "two lines breaks" in your examples is slim, and while I could, if I tried, find nuances between them ("#3 sounds a bit rushed, #2 might make you look a bit formal"), they're extremely slim, and trying to find "the right one", even ignoring the fact that I don't know what effect you're trying to achieve, is pointless. They're almost the same.
 
mr5
:D
but it still baffles me to find the most correct
same thing when I'm naming my variables
it sometimes taking me more time than it should
 
You'll have more luck if you don't try to find "correct". Look for "useful" or "effective".
 
mr5
and if I suddenly thought a more meaninful or suitable name, I'd refactor it immediately
 
Communication isn't finding the correct words, but about effectively and successfully conveying your intention.
Go for "good enough", not for "just the right name that correctly and fully captures the essence", because chances are there isn't one.
Same as for human communications. There's no "right way" to say something. There are many ways that convey many things, both intentional and unintentional, both as part of the grammar, the word choice and the pragmatic context surrounding it.
 
mr5
11:23 AM
yeah right
I would need to learn that
ayt
I'm heading out
o/
 
\o
 
11:57 AM
Question lads ... I got 20 procedures to execute from .net to oracle, now I made connection object, I open it once and close it at the end ... now I am thinking for oracleCommand object, should I make only one and keep changing command text ... or it's fine to go with using block within foreach
and always keep creating and disposing oracleCommand object
 
@Veljko89 What problem are you trying to solve?
 
No problem, just thinking about "optimization", will keep making 20 OracleCommand objects slow down my 20 procedures execute
OracleConnection connection = new
OracleConnection(dbConnector.GetOracleConnectionString());
connection.Open();

try
{

foreach (var item in appraisalReady.Items)
{
 
Don't optimize based on guesswork (and based on random advice from fake internet strangers). If you're worried about performance, check both options and see if there's a difference.
(My guess? No difference whatsoever. The OracleCommand object is simply a wrapper around a call to the DB. 99% of the execution time is in the DB, not in the call)
Of course, Oracle being Oracle and the ODP.NET being ODP.NET, you might find that the OracleCommand constructor does way too much work for no good reason. *shrug*.
 
ill go with your advice, try both ways
 
@mr5 Yes
 
12:08 PM
Also, check the docs: "To minimize the number of open server cursors, OracleCommand objects should be explicitly disposed".
So it seems that the objects do hold a server resource, so it's best to dispose and create a new one every time.
 
but as soon as he leaves using block, he will be disposed automatically, no?
 
@Veljko89 Yes, which means that you need to create a new one and not reuse the same instance.
 
2 hours ago, by Captain Obvious
You can't just YOLO shit into the database and hope for the best
people still say YOLO? :thonk:
 
I don't know. Most of us, we're old people. We don't understand the things the kids do these days.
 
no
noone says it anymore
except some brits
it seems
 
12:15 PM
yolo
 
and roaches
 
YOLO RIGHT? EHHEHHEHEHEHEH
 
ugh ugh ugh
 
I think the whole phase between "people started saying YOLO" and "people stopped saying YOLO" just kinda whooshed by me.
It was all like "wait, there's this new thing. What does it mean? Who says it? Ahh, douchebags, fine, I can go on ignoring it".
 
only keeedz use it
im too old for that
 
12:20 PM
it became popular around 2011 and died somewhere around 2014
 
I use yolo
 
hell, I remember once saying it ironically in 2015 when I was about to head into a thunderstorm and even then it felt cringey and outdated asf
 
its cringy af
writing it is already bad but saying it
 
you don't need school when you got so much swaaag
 
cringe level over 9000
 
12:21 PM
>over 9000
look who's talking
 
that was the point
 
I deadass have not heard anyone say that in ages lol
yet for some reason doge memes become relevant again
 
no they haven't.
please tell me they haven't
 
oh yes they ahve
and for some reason I'm the only person who hates it
>blue quadrant being the only one that doesn't look like a fucking idiot
hmm I wonder what kind of person made this meme
 
lol wth
 
12:27 PM
though the center one is hella accurate for me ._.
 
!~shiba
 
he is a good boy
 
I wanted a Shiba when I was in Japan lol
but the apt I was in wouldn't allow it
 
most japanese looking dog
 
that is so anime-like it shouldn't even be possible
 
@Neil loool
what a corny laughter
 
I thought it would be like a hyena, but NOPE
 
00:00 - 13:0013:00 - 00:00

« first day (3341 days earlier)      last day (1590 days later) »