« first day (3754 days earlier)      last day (1177 days later) » 
03:00 - 16:0016:00 - 23:00

mr5
3:38 AM
@Wietlol do you know if AWS supports the new .NET 5.0? Also, do you have any idea how much is the hosting fee for MSSQL + API services?
 
 
4 hours later…
7:14 AM
AWS EC2 supports whatever your machine can support
Lambda probably will not support .net 5 at all, and they will just wait for .net 5.1
assuming 5.1 again is LTS
AWS RDS pricing (for sql server) is from $12.50 per month for processing and $0.115 per month per gigabyte for storage (so for 20GB, you'd have about $15 per month)
Wietbot used a mysql database, which supports a smaller machine which costed $6.20 per month
for API, do you mean SQL with web or just an http server?
also for the first year, RDS (given a small instance) will be free
but the size of that free server might not support mssql
 
7:32 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
looking at .net 5, the first LTS version might even be .net 6
 
Good morning
.NET 6 will definitely be LTS
Why do I get segmentation fault trying to compile this?
int number = (int)(50.0*rand()/RAND_MAX);
In C
 
what ancient compiler do you use?
 
gcc
i think
 
mr5
7:54 AM
speaking of C, some recruiter messaged me for a senior C++ position. they like throwing random messages without reading profiles.
now if I consider to go back to C++, I think I'd have to start for a basic salary again.
@Wietlol I'm not really sure the difference between a web an an http server. It's a typical web pages + API serving services I'm planning to host.
@Wietlol I guess it doesn't matter since I only need to deploy compiled code right? I guess I need to check for runtime requirement for .net 5
 
im not sure what the difference is either
but sql server appeared to have a web thingy with it
but for an http server, API Gateway would be your thing
which is priced about $1 per million requests
 
mr5
hmm not bad
but still, AWS wouldn't let me register an account!
 
haha
 
mr5
I'm stuck at this page for 2 freaking years!
 
8:12 AM
@mr5 you might be able to supply a custom runtime for .net 5 but I doubt it is worth it
so... you dont get an email?
 
@mr5 Have you completed steps 1-3 yet?
 
mr5
Nope. Can't get pass step 1
Here's what's happening. They don't support our country code for phone verification and there's no other option aside from phone.
And I contacted their support 3 times but still ignored.
oh they replied to me. my bad.
took them too long.
 
I assume you have a mismatch between your phone code and your country
maybe you skipped the input for country and it defaulted to USA?
2
A: Cannot verify phone number in AWS

Eugenia PaisI had the error code "DIVA_VERIFICATION_FAILED" and even I tried with another account and didn't work. But it seems that they were blocked my phone number because the retries, so in that case you need to create a new ticket and select the option of chat to verify your account manually after they ...

or you just spammed too much :D
 
mr5
8:27 AM
I tried with a new number again actually since I lost my previous one.
Am I doing it wrong?
 
+63927... ?
without the 0?
there is a 10% chance that your actual number starts with 0, so not sure
wait... no it isnt
try without the 0
 
mr5
+63927...
0927..
927..
doesn't work
maybe I should provide the +63 on ext using 927?
 
what did the reply say?
 
dingeding...
 
mr5
still not the DIVA their looking for.
 
8:33 AM
!~shiba
 
errm, can you 2 help me with a lil problem I am facing in my JS?
 
> oh they replied to me. my bad.
what did they say?
@d4rk4ng31 ew, JS
:)
 
mr5
@Wietlol gfys.
 
sounds official
:p
 
8:35 AM
@Wietlol uh huh! And you're in JS room as a regular? :D
 
:)
 
anyways
 
mr5
tis also :)
 
umm, you see, I am trying to set a marker on google maps
but it simply resets the map when I press OK
 
mr5
@d4rk4ng31 is you and kesarling the same person?
 
8:36 AM
@mr5 you found that out now?
Fuck😂😂😂😂😂
 
Go easy, he's being confused by scrum right now
 
lol
okay
poor dear
but someone please help!
I have to turn this in by tomorrow
 
mr5
@Squirrelkiller wat so you're telling me it's part of his scrum tasks?
@d4rk4ng31 why do you have two accounts? are you hiding from FBI?
 
@mr5 and the NSA and All the agencies. :D
nah man! That was the old username
It was kesarling here too
 
[kesarling] and if I am not wrong, it should say kesarling in the discord chat
 
8:40 AM
see?
 
Told ya discord would just ( •_•)>⌐■-■ sow discord (⌐■_■)
 
@Squirrelkiller lol
anyways, please help with the JS a bit. I am trying to set a map marker. (Gist coming up)
 
No idea about js lol
goto :room17
 
There you go
@Wietlol, some help please?
What I am guessing is, as soon as I redirect to Map.cshtml
its running the whole of <head> again
 
I have 0 experience with JS
 
mr5
8:45 AM
I have -1
 
so that settles it :D
 
9:24 AM
okay, can we at least save the state across pages?
 
mr5
you can use:
localStorage
window.location
cookies
query parameters
or make it a single page so it's stateful
 
9:53 AM
@d4rk4ng31 localStorage or sessionStorage if you don't want the server to access the data, cookies if you do want the server to access the data, history if you want to show the data in the URL and make history entries
 
mr5
oh window.history
how do I read the elements of it?
 
mr5
ah yeah I remember now. It's what YT and GH uses for their single page right?
 
Not sure, but probably! And they match their SPA urls with server-side rendering
 
10:33 AM
Help, why is this wrong?
    char* str = "Num: %d";
    sprintf(str, str, 1);
 
mr5
I think the first arg is supposed to be the buffer for the resulting string
hmm but yeah, that might work too.
 
11:04 AM
turns out it's a constant string lol
havent done C in a long time...
Still sprintf wont start working for me ffs
 
sup homies
 
 
1 hour later…
12:12 PM
@Hozuki you still there?
I am basically trying to add a marker to google maps
but the map is being reset
 
@d4rk4ng31 So what's the question?
 
@Hozuki Yeah, umm, how do I prevent that from happening?
If you can come to the stream on Discord, you will understand the issue I am facing better (like when @mr5 was helping me with another yesterday)
 
Save and restore the map/marker state.
 
[kesarling] I am a complete newb to JS
\[**[Hozuki Ferrari](https://discord.gg/PNMq3pBSUe)**] Try these in your console:
localStorage.setItem('data', 'hello world');
console.log(localStorage.getItem('data'))
[kesarling] I mean, this might even be an XY-Problem
[kesarling] All I want to do is display marker on the map
 
mr5
I think it's as simple as:
gmaps.addMarker(new Marker())?
 
12:24 PM
[kesarling] yes, but that is not working
[kesarling] I tried that
 
mr5
tried that before. it works for me.
 
[kesarling] @Hozuki are you able to see the stream?
[kesarling] Great
 
mr5
you probably have some recentering put somewhere.
oh kesarling is doing another show again :D
 
[kesarling] lol
[kesarling] so, as you can see, whenever I click on the location in the dropdown, it's supposed to take me there and add a marker
[kesarling] but it isn't
[kesarling] I'll show you the code
[kesarling] function moveToLoc takes me to the location on the map
[kesarling] then it calls setMarker
[kesarling] err, you still watching?
[kesarling] @Hozuki
[kesarling] am I audible?
[kesarling] wait a sec
[kesarling] Now?
[kesarling] aww man
[mr5] oh damn. I'm late at the show.
[kesarling] Show's over
[mr5] I'm late at Roel's TED talk
[kesarling] go home
[kesarling] Who's Roel?
[kesarling] lemme guess, some MS guy?
[mr5] Hozuki
[kesarling] Ah!
[kesarling] I didn't know that
[kesarling] I thought he was a japanese brother
[kesarling] lol
[kesarling] BTW, Thanks loads @Hozuki !!
[mr5] He's a brazillian guy from Uden
[Hozuki Ferrari] Lol what
[mr5] 😄
[Hozuki Ferrari] You're welcome :3
[kesarling] 😂😂BTW, why "Hozuki"?
[kesarling] Some Manga/Anime character that I don't know of?
[kesarling] that's Hozuki?
[mr5] Hozuki van Uden
[Hozuki Ferrari] Because Hozuki is cute!
[kesarling] Aww!
[kesarling] !~shiba
[mr5] remove the ~
 
12:47 PM
!~shiba
!shiba
 
[mr5] !shiba
 
stupid bot
 
[Hozuki Ferrari] I am perpetually bored, so I switch names often. But for some reason, Hozuki stuck for a long time now.
 
mr5
it's on datcord
 
12:48 PM
[kesarling] lol
[kesarling] anyways, gotta get back to the project
[mr5] No, it's Roel that stuck for a long time. I can remember still back in 1993
[Hozuki Ferrari] I remember clearly, the Russians were attacking.
 
1:07 PM
\[**[mr5](https://discord.gg/PNMq3pBSUe)**] DTO/
Dto/
Which one is more suitable for .NET standards naming convention for folders?
[kesarling] Another doubt guys, (I followed your suggestion @Hozuki and created a new js file), how do I access the function in an event now? It appears that it is not being accessed
[kesarling] I mean, it still drags the map to the proper location
[kesarling] but does not add a marker
[kesarling] What is the full-form for DTO?
[mr5] Data Transfer Object
[kesarling] DTO
[mr5] Used for serialization.
[kesarling] yeah, DTO use DTO and not Dto
[mr5] Why DTO?
[mr5] and not Dto?
[kesarling] First letter of each Word... capital
[kesarling] Camel Case with initial letter of the variable capital
[kesarling] if it were Dto, that would mean the word is Dto<some characters here>
[kesarling] If it were DtO that would be DatatypeObject
[kesarling] or something on the lines of that
[kesarling] if it were DTO, that would mean each character = different word
[kesarling] I have included the script
[mr5]
There was a naming convention from Google, which I am also influenced by as of now, that whenever I encounter an acronym, I should not acronymize it, instead follow the title casing such that:
cs
HTTPClient httpClient = ...
would be
cs
HttpClient httpClient = ...
[mr5] nah, that's just bad convention.
[kesarling] yeah, that would be DO😅
[kesarling] horrible!
[mr5] This is just for folders though so I think it's a different case. For any code related thing, I would immediately follow the Google naming convention.
[mr5] So you would rather have HttpClient be HTTPClient?
[kesarling] HTTPClient
[mr5] Ew.
[kesarling] Nope, that tells HTTP is an acronym
[kesarling] which you are supposed to know anyway😂😂
[mr5] If you've been into Java, you would think twice with that naming convention.
[Hozuki Ferrari] Doesn't C# also use HttpClient?
[kesarling] Ew, Java!
[mr5] This one stick with me.
[Hozuki Ferrari] I actually use the same, acronyms as words. For example, HlsManifest
[mr5] How about for folders?
[Hozuki Ferrari] I would use a different term than the acronym 😂
[Hozuki Ferrari] Like Models instead of Dto
[mr5] But I have a Models folder already.
[Hozuki Ferrari] Then what makes these different?
[mr5] DTO models are optimized.
[mr5] includes less properties.
[Hozuki Ferrari] And what purpose do they serve?
[Hozuki Ferrari] Why have them?
[mr5] DTO models are shared between server and client.
[Hozuki Ferrari] So... they're for an api or something?
[mr5] Yes. For data serialization.
[Hozuki Ferrari] ... ApiModels 😉
[Hozuki Ferrari] Or DataModels
[mr5] Haha
[Hozuki Ferrari] Or even ViewModels if you consider the API a view.
[mr5] You completely avoided DTO
[Hozuki Ferrari] That's the Hozuki way.
[kesarling] anyone?
[mr5] But what if you encounter that dilemma in the future?
[Hozuki Ferrari] I will always shuffle words around
[mr5] Hmm
\[**[mr5](https://discord.gg/PNMq3pBSUe)**] ApiModels/
Models/
\[**[mr5](https://discord.gg/PNMq3pBSUe)**] Or should I just
ApiModels/
DatabaseModels/
[Hozuki Ferrari] ApiModels and EntityModels imho
[mr5] Alright. I'll try that approach. Thanks!
 
1:54 PM
the title of this is hilarious because that's what I'm doing at home with my cryptominer
speakin of: I finally hit my pool limit and now the money has been deposited into my wallet
 
mr5
how many eth did you able to mine?
eth is on all time high rn
 
I have 0.2 that I can exchange at any point...which is about $271 USD
 
mr5
how long did that take you?
 
about 3.5 months
 
mr5
not bad
 
1:58 PM
I wanna get one of those 30-series cards soon, so things are only looking uphill
 
guys, how would I refactor this code, so that I will be able to add new locations easily?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;

namespace AdminPortal.Web.Pages.Partials
{
    public class SelectLocModel : PageModel
    {
        public string Location { get; set; }

        public List<SelectListItem> Locations { get; } = new List<SelectListItem>
        {
            new SelectListItem { Value = 0.ToString(), Text = "Select Location" },
 
mr5
@Freerey can you make a blog about your miner? I might buy some dedicated miner too in the near future.
plan*
 
blog?
 
mr5
I mean, in your website lol
 
[kesarling] the code's on Discord (we've got to fix that)
 
2:00 PM
what exactly would that entail, me talking about it on the blog?
 
mr5
Speaking of blog, I did have a dream where the antagonist is cannibal programmer/hacker. The summary of the story is, once he developed an interest with you in chatting online, he can basically trace you down and hunt you. It took me some few minutes to recover from that traumatizing dream.
@Freerey yeah, just some random things.
 
like what?
 
mr5
diy: miner
idk
 
meh there's plenty of other places people can find info about that :P
what I was thinking about doing was having a donation page where people can set their cryptominer to mine to my wallet if they want
on top of the patreon page (which nobody has given money to)
 
mr5
xD
 
2:06 PM
@mr5 oh, that was a few hours ago on discord?
 
mr5
@Wietlol ohhhh fuuuuuuuuuuk
was that you haxxing into my dream?
 
I mean... oh what an interesting dream, never heard of it though
 
dream-haxxing, a la Dagoth Ur?
btw I'm still srsly proud of that dunmer pic I put in the server yesterday
 
[Hans1984] 😮
 
2:09 PM
dunmer pic?
 
mr5
drummer* pick*
basically a pick, but for drums
@Freerey I lyk that brown guy.
 
you mean Robert with the brown hair + glasses?
dam background
still has background, but at least it's not jarring
 
2:26 PM
[Hans1984] 👍
 
The school will tell Sarah, and Sarah will tell mom, and mom will tell dad!!, and DAD WILL JUST SIT THERE AND WATCH TV!!
 
Is it possible to declare a interface variable with a generic type?
IOrder<T> handler;

switch(type) {
case 1:
handler = new TestHandler<SaleOrder>();
break;
}
Obviously that on doesn't work. Is it possible somehow to make i work?
 
mr5
2:42 PM
@Zacharias yes, that's possible.
Where did you declare the <T>?
 
I have not, thats the point
i know which type i want in the switch-case
but not before
 
I'm having a deja-vu
I feel like 3 or so months ago the answer to this exact problem was something like "don't try to play the system but use good architecture" lol
 
[Hans1984] ha done yesterday
 
Is SaleOrder in this case the T?
(From IOrder<T>)
 
Yes
 
2:46 PM
Then why not pass the T into the TestHandler?
...oh wait
I just read it completely wrong lol
So technically you can indeed take a type object and make a generic from it, but it's...unclean.
Is there really no other way to solve it by changing the structure a bit? Making the containing method generic maybe?
 
Rob
@Zacharias How then, should it behave after the if block? What if IOrder<T> exposed a return type of T?
 
mr5
@Zacharias can you use C#8+?
you can try the switch pattern matching
I'm not sure about the covariance rules though.
You can also workaround this using reflection but that's too much.
 
im confused
class TestHandler : IOrder<T> ?
class SaleOrder : IOrder<Sale> ?
from the code, I should assume the first
from the names, I should assume the second
other than that, it is probably a bad idea to initialize the handler via the switch case
 
Yeah i probably might have to rethink the design
Could you elaborate in why initializing the handler via a switch case would be bad?
 
it depends on the reason why you do it
if it is a property, you probably want to initialize it in the constructor, allowing you to also provide more type information to the instance
if it is a local variable, you probably want it in a factory instead
 
3:00 PM
Its a bit like a factory pattern. Based on a integer, i create different instances of classes that does different things
Where all of the classes implements the same interface
and therefor in the end of the switch-case, i call a function which all the classes have
 
but the upper type bound must be predefined
 
sorry, what do you mean by that?
Oh, you mean in the example i gave?
 
IOrder<SaleOrder> cannot be IOrder<T> because you cannot guarantee that SaleOrder is a T
you would need to have an upper bound
but it is quite difficult to explain not knowing how the type structure is set up
 
mr5
3:17 PM
it does work if handler is an object though.
 
because everything is an object
but objects on their own are pretty dang useless
 
Ben Popper on January 25, 2021
We take a detailed look at a hacking incident that gave a user unauthorized access to our code and data.
 
03:00 - 16:0016:00 - 23:00

« first day (3754 days earlier)      last day (1177 days later) »