« first day (3306 days earlier)      last day (1649 days later) » 

You're running in a managed environment
 
AHOY MATEYS O/
 
V.7
Why not? In my decission, controlling memory manually is fine.
 
@V.7 But .NET is a managed environment, managed by the runtime and the GC. If you want explicit memory management, you're using the wrong platform.
(Not to mention the fact that the GC will probably do a better job for common scenarios like this one)
 
managing memory manually, by itself? looks horror
 
V.7
10:02 AM
Hm, you think trying do something like: dialog = new dialog; result = dialog.ShowDialog(); dialog.free(); is bad?
 
@V.7 It might be. What does dialog.free do? It might hold a reference to hundreds of objects. Will you now go and clean them all up? Check if anything else holds a reference to it? Why do it now, when you user is expecting the dialog results?
 
bug
you didnt wait for the dialog to complete
 
V.7
Doesn't ShowDialog makes main thread to wait?
 
depends
You like to invent things yourself instead of use existed technology... this mean the dialog have higher chance that is your created...
 
@V.7 That is going to make your code trash.
 
10:06 AM
@V.7 Let's say your dialog has a custom control in it, and that custom control accesses a static variable, say ServiceLocator.GetService("SomeService"). So now your dialog holds a reference to a control, and that control holds a reference to a service. What happens when you call Free()?
 
I don't understand, why do you want to manage memory manually instead of letting the GC release your window when it's no longer used?
I mean, that's equivalent to saying you want to push your car around because you don't want to let the engine move it.
 
V.7
@AvnerShahar-Kashtan For example calls some Dispose which checks if any reference exist and then nulls them recursively(their types are known).
 
@HéctorÁlvarez A more precise analogy would be to prefer using manual transmission because you want to optimize the precise engine performance. That's fine, except that 1) chances are the automatic transmission will do a better job 90% of the time, if you're not a specialist in exactly this, and 2) what precisely are you optimizing here?
 
V.7
@HéctorÁlvarez Uh ... might be a 10 years of C++ usage
 
@V.7 Ok, how does your nulling know if there are any other references held to this resource?
 
V.7
10:10 AM
Can't trust GC for unknown reason
 
What
 
OK so there's the issue, you try to make C# work as C++, that's not going to work.
 
But you cant turn off GC
 
V.7
@AvnerShahar-Kashtan These types are known so these types have to be recursively freed.
@HéctorÁlvarez I see ..
 
Again, even if we ignore hte fact that you're executing a potentially costly operation (going over hundreds of references, checking if there are any other users of those references, nulling them, deallocing, etc) which will now run synchronously when you just want your operation to return.
 
10:12 AM
why not Qt?
 
@V.7 What do you mean by "known"? My object has a method that calls ServiceLocator.GetService("blah"). I know have a reference to an IBlahService.
I mean sure, you might have IBlahService implement methods like Release that will dispose of it when the reference count reaches 0... but that's basically reimplementing COM-style reference counting. That's not .NET's architecture.
 
@V.7 What I'm trying to say is that C++ was very exhaustive low level programming, you handle everything and it goes lightning fast, but you must spend a lot of time making sure it works.
C# shifts your concern into higher level of abstraction, you no longer care about memory or other internals, you focus on doing what you want and let the runtime environment handle the picky stuff.
 
@HéctorÁlvarez I wouldn't go as far as saying "you don't care about internals or memory", but you care differently.
 
V.7
Perhaps ...
 
simple you just cant managing memory in .net, there is no way...
 
10:14 AM
And in recent years C# and .NET got quite a lot of work for lower-level processing with Memory<T> and Span<T> for doing work with unmanaged memory.
But it's an optional improvement, not the default behavior.
 
Like Avner's transmission example, you'd like to use manual because it feels better, driving automatic for me is really boring so I want manual, but the truth is I shouldn't focus on shifting gears when I should be focused on the road.
 
V.7
@HéctorÁlvarez Fair enough. Same about gears though
Although, for me it like trust a machine to do its work without controlling such.
 
It makes sense for a race car to have manual transmission and for a race car driver to know precisely when to shift. But 99% of us aren't race car drivers, and we drive regular cars to regular places at regular speeds. Focusing on gear shifts in that mainstream case is focusing on the problem and not the goal.
 
@V.7 qt.io
just go Qt. (I hate it)
 
@V.7 But you already trust the machine to do a lot you don't know. At the OS level, the hardware level, and more. You can insist on control wherever you can, and that's fine, but it comes at a cost - a cost of productivity.
And bugs.
 
V.7
10:17 AM
@AvnerShahar-Kashtan Fixing manual shifter is much lower than automatic though
 
!~>()=>{var a="";while(true){a+=a+long.MaxValue;}return a;}
@nyconing CodeRunner: Maximum execution time exceeded
 
@AvnerShahar-Kashtan Yep, true. What I mean is you don't pay attention to it most of the time. Perhaps you wonder how to do it initially when you're about to implement it, or refactor later on, but nothing close to "I need to declare an array... I need 17 bytes available to store this bytestream"
 
!~>GC.Collect()
@nyconing {void}
 
@V.7 unless it's already tangled up. Usually the automatic version have NO CODE for memory management. And we all know that no code is better than code.
 
10:19 AM
@V.7 Right but that's assuming there's a problem that doesn't exist.
In the case of a car, yep, you'll face a higher cost, but when it comes to .NET you can assume the GC will work properly.
It doesn't degrade or anything
 
Manual shifters are better than automatics.
 
And the only repairs you'd need to do would be along the lines of installing the new version of the framework, which is freely available.
 
what about our rescue plan for caprica ?
 
@CaptainObvious in term of speed?
 
is the SWAT team ready
?
 
10:21 AM
They're just better
 
automatic are faster than manual
 
100% not true
 
we will have to storm rLemons mansion
 
search
 
Automatics are slow as dick
Source: Have driven automatics and manuals, autos are trash
 
V.7
10:22 AM
@HéctorÁlvarez How does it know exactl when resource won't be used anymore? For example, I've seen some app which has mouse event implemented and every mouse move generated 10KB of mem, so just moving that mouse continuously filled 1GB of ram and only when mouse was left for a liitle, RAM was freed
 
@CaptainObvious Listen Butler, we're trying to make a point here. The metaphore was between a car transmission utility vs whether he should dispose managed resources manually. Stahp.
 
HAMMAHTIME!
even they are 'manual', its technically automatic behind
because automatic shift are faster
 
stahp ?
 
Well he should do it automatically becayse it's easuer
 
hmmmmmmmmm
 
10:23 AM
i mean
 
Although with skill manual would probably return better results.
 
if you drive properly
manual shifts are quick af
 
Exactly
Not that you'd know etc etc
 
if you drive like an old woman they'll be slower
 
@V.7 GC has several generations, the garbage collector knows when there are no more references and disposes it. If it's constantly being used it shall be promoted across generations until Gen2 (I believe) where the GC will check less often. But nevertheless, it will efficiently get rid of all your resources in a timely manner. Normally memory is freed upon ending the current code block scope.
 
10:24 AM
you also dont get to choose when the shift is made in an auto so you can't rev the engine more for better acceleration
 
When I hired a car when I was in Freedomland I was driving an auto and it was terrible. I used to drive a manual at home and it was decent
 
how can a clutch achieve less than 100 milliseconds
 
I don't know about the implementation details of that mouse movement.
 
but automatic shift can
 
@Harry The issues with autos is they don't shift until you're almost redlining anyway
 
10:25 AM
@CaptainObvious most of the ones i've been in rev match at 3000
 
You end up going like 25mph still in first because it hasn't woke up yet
I like to shift early
 
There are many ways and reasons why one would like to stack information about the mouse movement without purging it, like creating a random RSA key for example, but even then I'd personally purge the tail when it exceeded the size I wanted.
 
@CaptainObvious automatic shifters still need a clutch...
 
@CaptainObvious and Audi S3 Automatic is not slow at all
 
Regardless, for the last 18 months or so it hasn't been a problem, as my current car doesnt have gears
 
10:26 AM
Just sayin'
 
Nvm
I figured out
 
Ew you drive an S3
 
The class "Image" in xamarin
doesn't scale properly
 
@CaptainObvious i thought he drives a golf
 
@CaptainObvious i drive a golf
 
10:27 AM
SO I have to use CachedImage
 
I have driven an S3
back in 2014 before everyone had one
And ooooo boi
Its quick af
 
Was at 100 before i even realised
 
manual would be faster
 
My car is fast
 
10:28 AM
lol
Your both mad
 
we re all mad here
:3
 
My car is fast but I'm slow
 
V.7
@HéctorÁlvarez Looks like an AI implemention where machine searches for possible variations of situations.
 
my car is slow but im fast
 
I've spent like 1200€ to get my driving license
I don't wanna lose it
 
V.7
10:29 AM
@HéctorÁlvarez Doesn't these variations are bordered(limited) via programmers who developed a GC?
 
thats cheap
i spent like 2400€
 
@Harry what are you driving?
 
@Hans1984 Where are you from
 
but its 15 years ago
 
@CaptainSquirrel 2010 corsa vomiting
1.0
 
10:29 AM
germany
 
Oh dear
 
V.7
@Developer00 In Lithuania(EU) is about 350Euros with learning, testing and examination.
 
Here in Italy they had just introduced a tax on driving lessons
 
but then you only earn 350€/month in lithuania
just kidding
 
10:30 AM
Like +22% on each lessons
And they wanted to apply that to ALL licenses released since 2015
 
Retroactively? How would that even work
 
It wouldn't
 
many driving school would have closed
 
i bought it when i was 17 and had no money
 
so they decided not to apply it or maybe they are still arguing
 
5508 per year holy
 
Wait what the fuck
 
Love how thing go here
 
I thought QT was free
 
10:33 AM
For non-commercial maybe?
 
Last week a senator who survived the Holocaust proposed a law against racism online
half of the parliament didn't vote
That's so dumb
 
 
Well
 
Qt not free? WTF. They have the guts to ask money for that utter pile
 
I'd like to know how you could possibly enforce a law like that
 
10:35 AM
its free
just not for commercial
 
You might as well make pornography illegal on the internet for the kind of success you can expect to have
 
@V.7 I don't know the entrails of it, I didn't really go in-depth with the GC so perhaps someone else can help you further. But what I got from it was that it simply makes sure anything that isn't used is deleted in a timely manner, and more important items are promoted so other more trivial memory instances take precedence to be deleted sooner.
 
free via LGPL license
or paid 5508 per year
it was SOOO MUCH EXPENSIVE
 
@Neil ofc you can avoid that
But there are some people/pages on social network
which are extremism
OIr like
 
pretty sure social networks already have incentive to censor such pages
 
10:38 AM
@V.7 What limitations? I don't think there are any, or at least I've never had a problem nor seen anyone who had issues with garbage collection.
 
me neither
 
On most cases, if a memory leak existed (which is pretty uncommon in C#) it's usually due to unmanaged code not being flushed out properly, like a database connector that is never closed.
 
@Neil It's not like that
 
V.7
@HéctorÁlvarez I mean, every AI even developed has limitations. GC looks for me like an AI.
 
because it's against freedom of expression
But if they post a picture of Mussolini
 
10:39 AM
its not AI, GC are stable and just fine
 
there are extremeties, where for example make a variable static, and instantiate only once made 200% speed degradation
 
it's punishable by our law
 
V.7
@nyconing So LG pays every year 6k for Qt?
 
law
@V.7 per developer
 
well, censor something enough, and you'll begin to have people believe it never happened
I don't believe in throwing a blanket over such things and pretending they don't exist
that's not the right approach
 
10:40 AM
That's a discussed problem
 
Fuck me
2
At $5k/yr I thought that must be a company price or something. Wasn't expecting per deveoper
 
Because most of our laws were written after fascism
 
V.7
Thank you @AvnerShahar-Kashtan @HéctorÁlvarez for pointing out the right direction
 
And the purpose of them is to repress fascism and prevent a comeback
 
Maybe their marketing department knows no one developer will buy a license
 
10:42 AM
@V.7 The Garbage Collector is just a background process. You can call it manually if you so desire through GC.Collect(). That's not considered a good idea on most cases, but I've used it seldom in places such as WinCE 3.5 where memory was VERY limited and I wanted to make sure everything was purged in time.
 
Developer will just find a way to bypass LGPL
 
V.7
@HéctorÁlvarez What if calling somehow GC on some exact object?
 
@Developer00 the end effect is that people won't learn from history
 
@Neil And fascism is slowly returning
 
what if you stopped teaching ww2 in history class? we may very well see the same type of thing repeated all over again
 
10:44 AM
One of our mps is mussolini's granddaughter
 
@Developer00 You know I'm Italian, right?
 
Oh
lmao
 
now you know :P
 
Calling the GC is something we need to do in out asp app sometimes
 
I don't know if you can do that, but I encourage you to build a small test with one of your controls and try to call GC.Collect() and see if the resource was freed correctly. Then again, I advise against calling the Garbage Collector manually.
 
V.7
10:45 AM
@Developer00 I will not continue politics in C# topic, but my 2 two cents are just that all of these problems, criminals, wars and such because of wrong schools, teachers and teaching process.
 
Memory just leaks all over the place but we have no idea why
 
@V.7 Sorry if I went off-topic
Btw
Still having issues with images
In that xamarin project
WidthRequest doesn't resize the image
 
@V.7 I agree 100%
education is very much the heart of a lot of the problems in society
 
@Developer00 Is that reproducible?
 
what do u mean
 
10:50 AM
Do you tried to reproduce your problem?
 
I've written some code
and checked
and I didn't get any result
I have two ways to deal it
setting width/height request with Image class
but I still don't have figured out how to transform pixels into whatever xamarin uses as a measurement unit
Or by using cachedimage class by ffimageloading
but it's not resizing at all even though setting width
 
Xamarin.?
 
forms
I thought it used DIP
but it doesn't
It's like units
 
Okay, then minify your codes, and post here?
 
I find it hilarious how so many people throw threads at an application in a bid to 'make it faster'
 
10:55 AM
just like throwing in any buzzword will magically make everything bug free and/or faster
the biggest one was cloud ofc. So yeah
 
 
@nyconing here it is
 

« first day (3306 days earlier)      last day (1649 days later) »