« first day (4364 days earlier)      last day (567 days later) » 

3:23 AM
good morning my neighbors
@Feeds i like this feed, this works on all engineering fields
 
mr5
3:57 AM
fkng AppStore is at it again
this has been going for 4hrs already
I downloaded Xcode, done in ~1hr
another update for some reason comes in and this
when will I ever learn to not update it from App Store
 
mr5
is it grammatically correct to say that "www.google.com" and "google.com" is canonically the same?
@nyconing optimize & security cycle
it's the same on CICD regarding about "secret" information like API keys, ...etc
they said don't put those secret info in the code, so they introduced runtime injection in which the dev can access it via environment variables or files generated during build time
but then again, you can easily create a script to read the env. variables, and print it on the cicd console or upload it to somewhere else.
e.g., in VS, there is a pre-compilation script, and so on...
in gitlab, they introduced "protected branches" which means, deployment can only run in this branch, which also means you can setup a process for code review to delegate the security check there
from automated to manual
 
 
2 hours later…
7:09 AM
whats up motherfathers
i see you @mr5
has anybody ever migrated xamarin to maui
is maui still that shitty lol
 
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
mr5
@c0dem0nkey have you tried that yet? I am away from .NET sphere for about a year now
 
Good morning
 
8:16 AM
good morning
 
8:46 AM
@c0dem0nkey maui still uses the same bad old design
until they drop templated html (xaml) and use proper in-code builder functions, I probably wont be doing any gui in .net
 
mr5
@Wietlol building GUI in code, based from my experience always result in unmanageable code.
And SwiftUI is retrying that approach. Let's see how it would turn out
 
@mr5 depends
building anything else does not result in unmanageable code?
the thing is, you already write gui in code
the problem is that that code is using a different language, using different technologies, and different patterns
and a different syntax
and then a new system to introduce bi-directional interop
it can be so much easier if you just have 1 language to do both
any sane person would still separate the gui code from everything else just as how we dont put our entire banking program in the program.cs file
perhaps it will take some time for people to understand how to use the tools, but it is not the tools' fault if you use it to make spaghetti
 
@Botler The fuck did you do
 
mr5
9:02 AM
@Wietlol I think there is no language or IDE that fully enforced modularization/SRP yet. You seem to not know that there are a lot of devs that does not even care about maintainability
 
then they dont care about maintainability
so it is no problem if they have unmaintainable code :D
 
mr5
I mean, at least putting the GUI in markup languages helps the code to be maintainable, even a bit.
4 hours ago, by mr5
is it grammatically correct to say that "www.google.com" and "google.com" is canonically the same?
^ I just want to use fancy words for my code
@Wietlol also, how do you think you can elegantly nest views in code?
 
9:26 AM
@mr5 I don't think it's wrong. But also don't think it's that useful. Overall, use it or not shouldn't make much of a difference.
With that said, "canonical" can be indeed the correct choice. Depending on context. For example, if you want to take string and format it to the same representation, e.g., "http://google.com", "www.google.com", "google.com" all transform to "google.com", then the term canonical (as in "canonical representation) is indeed correct.
 
@mr5 by decomposing them into separate functions
 
mr5
@VLAZ nooice. I knew it! Based from my feeling.
@Wietlol show code pls
@nyconing hmm, makes me think if port 80 is a standardized port for HTTPS
If so, then specifying port is unnecessary
It looks like it is
Can you use any other ports in HTTPS?
How do you debug a crash you can't reproduce? Not even crash logs for the exact problem
 
9:44 AM
damn
is this a sign lol
i have a small app initially done in xamarin.
 
yes, port is free to choose, the browser connect to 80 or 443 automatically
 
hi @nyconing been sometime
 
mr5
@nyconing why do you know a lot about networking?
 
been considering switching to another since xamarin was full of bugs but was hoping that maui will somehow be better and tolerable
 
mr5
What bug are you encountering recently?
 
9:49 AM
what i mean was its just a headache
the overall experience.
i dunno
would you advise me to continue with MAUI
 
mr5
Are you following MVVM strictly?
 
yeah i try to.
its initially xamarin / prism
now im migrating to maui
 
mr5
Dunno, in my experience, Xamarin has a lot of pros
 
just the boost i needed lol
 
mr5
I think migrating to MAUI is very risky at this stage
 
9:50 AM
why so
since its all so new?
 
mr5
Not a lot of community and documentation is ..I dunno actually
 
xamarin is ending support by sept 2023
 
mr5
I think if MAUI is basically Xamarin, then you can risk it lol
 
i figured its gonna be messier if i wait it out then migrate
 
lol from im child i used to play taiwan and china online actmmorpg games that rely and requires excellent low latency network, mess with vpn and l2vpn things for 7years lol after at adult I created own api by using low level socket at work (still actively used by our customer)
 
9:52 AM
more codes to resolve
 
@mr5 gimme example pls
 
mr5
@nyconing how come you know hardware as well?
 
are the squirrels still here
 
which hardware? like in 17 maybe 18 im buying seperate parts and install them together become a pc?
 
@nyconing i remember way back did you use to have a photo instead of a fox
like a real one
 
9:56 AM
@c0dem0nkey For better or worse, yes
 
or in 13 I hacked file system on cyber cafe , just for copying games into my thumb drive....
im skipping school to go cyber cafe
 
@VLAZ what do you mean
use xamarin better or worse? lol
 
The squirrels are here. But I'm not sure if they don't plot to take over the world.
 
@c0dem0nkey fox??
 
oh
its a cat
 
9:58 AM
no its a bird
 
i thought it was a fox all this time
 
wtf
 
what
never bothered to click on it
 
this is shocking lol
 
me finding out its a cat? haha
 
10:00 AM
[Captain Obvious] waht is going on here
 
@Botler Monkey business
 
[milleniumbug] HTTP uses 80 by default, and HTTPS uses 443 by default. you can use another port by specifiying it directly in the url like this https://example.com:2000/
[milleniumbug] this is with regards to an earlier convo
 
what if I overflow the port.... https://google.com:65536/
 
[Captain Obvious] 🅱arty
 
mr5
It's blocked on Chrome lol
 
10:35 AM
@mr5 no example?
 
mr5
@Wietlol srry, I'm still in train standing kek
 
[Captain Obvious] Firefox just searches if you enter a URL with an invalid port no
 
 
1 hour later…
mr5
12:00 PM
It's not mine. I forked it for some reason
Or maybe just this excluding the <script> tag github.com/mr5z/chatapp/blob/master/client/www/index.html
 
12:17 PM
so, what do you want to have nested?
 
1:12 PM
@mr5 anyway, given a literal translation from html to kotlin (because it already has the library to do it) would give something like this
fun Builder.render()
{
	input {
		id = "data-position"
		type = hidden
	}

	div {
		classes = listOf("container-fluid", "fill")
		div {
			id = "header"
			classes = listOf("row", "vertical-align")
		}
		div {
			id = "content"
			classes = listOf("row")
		}
		div {
			id = "footer"
			classes = listOf("row", "vertical-align")
		}
	}
}
obviously ignoring the head and script because of reasons
what you could do to decompose it is by defining either
- common reusable components
- component specific configurations
 
mr5
Oof, that looks really unmaintainable
 
it is literally the same as the html, just using different syntax
 
mr5
But yeah, it looks better on Kotlin, in other languages, not so much
 
anyway, a common reusable component would be something like a stack-pane
one that I like quite a lot is a "borderlayout" from Java Swing because it is probably the easiest to apply to any use case
this is a standard horizontal penta-split component
which would be quite suitable for a root component considering you can easily add a header, footer, main content and sidebar
using that component instead of the container-fluid stuff, you could do something like this:
fun Builder.render()
{
	input {
		id = "data-position"
		type = hidden
	}

	pentaSplit(
		top = {
			classes += "vertical-align"
		},
		center = {

		},
		bottom = {
			classes += "vertical-align"
		},
	)
}
(i assume the vertical align is still your-app specific)
an example of component specific configurations is when you create a component for example for your header
it is probably not going to be reused, but it is a very nice place to split your concerns
reading the main layout stuff shouldnt give you details of how the header works, it should just tell you that it is a header
fun Builder.render()
{
	input {
		id = "data-position"
		type = hidden
	}

	pentaSplit(
		top = ::header,
		center = {

		},
		bottom = ::footer,
	)
}

fun Builder.header()
{
	div {
		id = "header"
		classes += "vertical-align"
	}
}

fun Builder.header()
{
	div {
		id = "header"
		classes += "vertical-align"
	}
}
the center is usually (in my applications at least) filled with a react-router component
this way you extract out implementation details to achieve certain common component layouts
and this way you separate component definitions to isolate their details
the major advantage of doing in-code builders like these is that you only have to learn the component library
you dont need to learn the new patterns and syntax
for example, if I have a login thingy, I need a branching mechanism
fun Builder.loginComponent()
{
	val user: User? = App.findLoggedOnUser()

	if (user == null)
	{
		button {
			+"login"
			onClick = { doLoginStuff() }
		}
	}
	else
	{
		button {
			+"logout"
			onClick = { doLogoutStuff() }
		}
	}
}
because it is in code, I can just use an if expression
if this was in templated html, I would have to look up the documentation how to do an if statement in said html template
<xaml:if condition="{ App.FindLoggedOnUser() == null }">
    <xaml:then>
        <button>login</button>
    </xaml:then>
    <xaml:else>
        <button>logout</button>
    </xaml:else>
</xaml:if>
for example something like that
the same counts for loops
then you have data binding
event handlers
(de)composition and reuse
dynamic layout
etc
 
mr5
1:30 PM
One cons I can see of doing this is, it needs compilation when deploying
 
as if you dont compile your application anyway
if you use Javascript, you dont need to compile it :D
 
mr5
In Xamarin Forms, you can dynamically load pages as well
 
but yes, you cant just go to your production server, replace one specific html/aspx/razor file and expect it to work
 
mr5
And Android XML too
 
you need to re-deploy your build
I see it as an added bonus that you cant bypass your build pipeline :)
the downside of Javascript React is that they dont use builder functions, they use functions that return a component
 
mr5
1:33 PM
Who knows Kotlin would be really suited for gui code
 
and they mix html and javascript into jsx
which imho, was a bad idea
 
mr5
In SwiftUI, not many devs adapt to it yet because it lacks a lot of feature
 
F#'s Fabulous looks like they use the same design
so that might also be interesting to use
NavigationPage() {
	ContentPage("Counter",
		VStack(spacing = 16.) {
			Image(Aspect.AspectFit, "fabulous.png")
			Label(model.Text)
			Button("Click me", ButtonClicked)
		}
	)
}
where ContentPage is similar to pentaSplit where you pass normal arguments and VStack is similar to div where you have a content lambda function
the only problem is... it is F#, so you still have 2 languages if your primary language is C#
and I am not sure how good their bi-directional interop is... if there is any in the first place
the problem is that you cannot do this in C# currently as the language just lacks the right features
in my pipeline tool, where you define your pipeline in Kotlin, I experienced the same when trying to picture what it would look like in C#
it is perfectly possible... but...
kotlin:
task("deploy") {
	doWork()
}
c#:
await scope.TaskAsync("deploy", async scope => {
    await scope.DoWorkAsync();
});
there is just so much noise
and that is not even doing the async "the right way"
c# because microsoft still thinks configure await is a good idea
await scope.TaskAsync("deploy", async scope => {
    await scope.DoWorkAsync().ConfigureAwait(false);
}).ConfigureAwait(false);
 
mr5
How would you implement MVVM by this though?
 
2:01 PM
why would you implement MVVM by this though?
 
mr5
Dunno, what kind of GUI design patterns fit for this? MVC?
 
MVC fits better iirc
your view is the component
your model is the data that your component needs
your controller is events that your component needs
but generally speaking, just use whatever pattern React uses :D
 
mr5
I would want to see some gui library that is made in Kotlin
Do you know any?
 
quite a few
 
Hello , I have a question, I want to send email from a sender email function , it works separately , but when send to user's email , its body is null. I want to know can I pass @viewBag to send email function wih gmail?
 
2:46 PM
David Gibson on September 27, 2022
Is everybody coding on the weekends? Is everybody learning Rust?
 
3:05 PM
posted on September 27, 2022 by Iain Holmes

We are pleased to announce the second preview release of Visual Studio for Mac 17.4. This release has been focused on addressing feedback from customers and on improving the overall experience. If you are already using the Visual Studio for Mac Preview release, The post Visual Studio for Mac 17.4 Preview 2.1 is now available appeared first on Visual Studio Blog.

 
mr5
Rust has a lot of advertisement these days.
I have noticed, in Reddit app, they are using a subdomain to before redirecting to the target external link, and I'm guessing the reason is for analytics puroose. Isn't it more UX and perf wise to just record the click event before redirecting?
 
"copy link"
 
mr5
I think I've been seeing this approach on a lof of apps
Eh, not possible in mobile app
 
you mean you are not hackermann?
 
mr5
And this Android App Link is forcing a weblink to redirect on the native app instead of webapp
 
3:10 PM
generally speaking, it is the most reusable and easiest setup for these kind of features
referral system
cache proxy
exit-app security
link tracing
sometimes even for url shortening
but I guess that is rare
referral systems are basically "ooh you entered this website using the link of this person, lets give them bonus internet points"
 
mr5
Referral system?
 
cache proxy is like gmail for example, which downloads images themselves to avoid leaking cookies and timing stuff to 3rd parties
 
mr5
I don't see the benefit
 
exit-app security is like steam, where you get a special page to tell you you are exiting the steam website
link tracing is mostly just for analytics
referral systems are usually done in social media and games
either rewarding with reach, money or in-game rewards
 
mr5
Isn't it more for benefits between the source site and the destination site?
 
3:16 PM
referrals are more for a pyramid scheme
 
mr5
external-link?referral=reddit.com
 
it is mostly for benefits of the platform (source site) being able to understand behaviour better or having more users
and the user that caused it is rewarded
 
mr5
external-link would have recognized reddit to be the source of their traffic, thus rewarding them
 
and yes, it is chainable
 
mr5
But it can be done on click event as well
 
3:18 PM
a Reddit user making a post with an Upday link, which is sourced by the NY Times
NY Times rewards Upday
Upday rewards Reddit
Reddit rewards the user
 
mr5
Similar to how Discord does it, which I think is more UX wise
 
generally speaking, with http links, it can be completely behind the scenes
it just takes a bit longer
usually not that much longer though
usually unnoticeable
 
mr5
I can only see the benefit to be the exit-app security
 
ok
 
mr5
@Wietlol this one though, can you explain more?
 
3:21 PM
Running a legacy website in IIS express and I'm getting a windows auth challenge. Does anyone remember how to turn this off? I've set authentication mode to none and clientvalidationenabled to false
 
so, it used to be the case that you could add a 1 pixel transparant image on your email, which would be downloaded when the user opens the email
 
mr5
@BobTway check the headers being returned by the legacy site
 
the client, like Outlook would download the image and you would see the invisible image just like all the other images
the email sender (or more specifically, the host of the image) could then know that you read your email
alternatively, if you opened it in the browser, your http request would include your cookies, because that is how cookies work
 
mr5
Oh wow, I didn't know that
 
this could then be used for analytics and advertisement
Gmail now downloads the images (iirc) when the email is received by their email system
 
mr5
3:23 PM
Why do you know this stuff
 
then caches that image in their own servers
that way, when you open the email, the image is already downloaded anonymously
 
mr5
So they also replaced the URL within that email?
 
@mr5 because my mail tracing system using invisible images stopped working correctly
when you open an email in gmail, you will notice that the image urls are all google links
 
mr5
Confirmed. Wiet is a spy!
@Wietlol hasn't this any legal repercussion?
 
for example: "https://ci3.googleusercontent.com/proxy/randomshithere.png"
@mr5 I dont know much legal stuff, but I doubt that google would be sued because they protect user privacy...
 
mr5
3:26 PM
I think, at least they redirect them to the origin if the user navigates to it manually, so the "copyright" is preserved
 
ironically... for google
for images? no
if you open in a new tab, you download directly from Google's cache servers
iirc
 
mr5
So there is no way to get the actual server origin in email?
 
I just assume Alpha/Google knows their legal stuff
 
mr5
Is this a standard stuff or just gmail thing?
 
mostly gmail thing
 
mr5
3:29 PM
At least, it's good for end users
 
but others probably do similar stuff
Google is making quite a few nice features for user protection
 
mr5
GUI in Kotlin, but syntax is not close to your example
 
for example, I recently got an obvious scam email, but I was wondering what the website was that they linked to because I was curious how the scam worked
but then Chrome was like "nope, not letting you visit this obviously scam website"
> While this works, it's far from idiomatic Kotlin.
 
mr5
Okay, I didn't scroll enough on the docs. It looks a little neat
 
> Kotlin/Native bindings to the libui C library.
it is gui in C
but a wrapper library so you can use it in Kotlin Native
which they also mention in the libui readme
after which, it does look similar to the render functions
 
mr5
3:34 PM
Yeah
I wonder if there is a port for Android
Or some examples. I'm really curious how it would scale for a complex UI
 
I wouldnt use Kotlin Native for android purposes just yet
just stick with Kotlin JVM
 
mr5
Ok, one disadvantage is, it would hard for a person to imagine the UI from a code
 
only for those unfamiliar with it
a html dev finds it easy to imagine the UI from a html document
a new dev finds it hard
it is similar to the common "for loop" example
consider the following "simple" for loop:

for (int i = 0; i < array.length; i++) {
    println(array[i])
}
obviously you know immediately what is going on
ask a beginner, and they need about 20 minutes
consider the following "way too overengineered" for loop:
array.forEach {
    println(it)
}
 
obviously a senior C developer wouldnt immediately understand it, so it cant be simple
but a new developer would just be able to figure it out
 
mr5
3:39 PM
This looks ...err
I think gui in code is prone to being more complex. Dev who are less experienced with the lib would most likely "hard code" it to achieve maximum flexibility, thus increasing its unmaintainability
 
 
2 hours later…
5:15 PM
that is the benefit of being me
I use tools that are intended for professionals
not the tools that state you have to be 3 meters away from your keyboard at all times while using the tool
 
 
1 hour later…
6:35 PM
foreach (var item in lines)
{
    Debug.Log("show me the word " + item.Trim().Split(";"[0])[1]);
}
hi guys, how can it be that I get an IndexOutOfRangeException, when it is impossible that there is an item in lines which is out of range since it says: foreach!
aah I see there is an empty line in my csv file in the end
 
6:55 PM
guys, how would I programm such a functionality:

I have an array of given times in strings
start	          end
00:23.03	00:00:28.30
00:51.37	00:00:56.370
01:11.53	00:01:16.530
01:12.70	00:01:17.700
01:29.93	00:01:34.930
ok 2 arrays.. with starting and with ending timestamps
when the user clicks a button, a timer is started - and when the timer reaches the starting time it does log("hi"); and when it reaches the end time log("by");


would I do this with a coroutine?
 

« first day (4364 days earlier)      last day (567 days later) »