« first day (3758 days earlier)      last day (1181 days later) » 

static int F(int p) => p == 0 ? 1 : p == 1 ? 1 : F(p - 2) + F(p - 1);
 
4:25 AM
Console.WriteLine(string.Join('\n', Enumerable.Range(0, 43).AsParallel().Select(x => F(x)).OrderBy(x=>x).ToArray()));
This is why we here F(int.MaxValue)
 
4:50 AM
static async Task<long> Fa(long p, long d = 1) => p == 0 ? 1 : p == 1 ? 1 : (0 == d % 18 ? await Fa(p - 2, d++) : F(p - 2)) + (0 == d % 18 ? await Fa(p - 1, d++) : F(p - 1));
 
mr5
 
 
3 hours later…
8:54 AM
@nyconing ew
@nyconing why async?
 
9:19 AM
@nyconing What the ternary fuck is going on here
 
10:10 AM
normal iterative fibonacci is so much more worth it
using it on a BigInteger, I get 50k numbers per second
keeping in mind, you cannot do it on longs at that point
considering each 50k next numbers, the number's size increases by 10.449,33 digits on average
which exceeds the 19 digits of a long
 
I hardcoded it, cost only <1ms per "calculation"
 
for long calculations, it gives me about 50 million per second
and it is linear in time complexity
obviously, after a few iterations, it goes negative, but whatever
	89: 1779979416004714189
	90: 2880067194370816120
	91: 4660046610375530309
	92: 7540113804746346429
	93: -6246583658587674878
"few" is 93
 
What if you do it with floating point numbers
 
hmm...
90: 2880067194370816000 (aka) 2.880067194370816E18
90: 2880067194370816120
it does kind of move away from the accurate numbers
as expected
 
10:34 AM
7540113804746346429
12200160415121876738
bit overflow
 
Are you in C#? What happens when you use decimal? I don't even know the max value of that, but it's about as giant as double.
 
although, around 1k, stuff is pretty clear
43466557686937430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (aka) 4.346655768693743E208
at 10k, it lost it
∞ (aka) Infinity
not in C#, but I can easily replicate it
 
The data type?
 
everything
although, the formatting is quite a bit different
        137:    19134702400093278081449423917
        138:    30960598847965113057878492344
        139:    50095301248058391139327916261
System.OverflowException: Value was either too large or too small for a Decimal.
 
10:52 AM
Is there any reason to put CPU-bound work into a Task? Dude on Udemy used manipulating strings as an example use case for demonstrating how PLINQ works.
 
not really
unless you can parallelize it
such as
var a = DoWorkAsync(foo);
var b = DoWorkAsync(bar);
return await a + await b;
which could work for ny's example above, but since those are immediately awaited, they are just decoupled sync operations
if you just have a direct await AsyncCall() then you are just putting more CPU work in a 100% CPU operation...
and if you want it to run separately of whatever you called it from, then you can just put it inside a Task.Run
although the time complexity of the algorithm for the fibonacci is O(n)
the space complexity of the same is also O(n)
so the effective time complexity is far worse than O(n)
computing   100.000 fib numbers: 00:00:00.8235170
computing 1.000.000 fib numbers: 00:00:45.5183187
for JVM (Kotlin) about the same growth
computing   100.000 fib numbers: 00:00:00.588
computing 1.000.000 fib numbers: 00:00:26.274
(not to be taken as perfectly comparable results as my machine is doing a lot of stuff atm)
but considering the numbers are in the the range of 20.899 digits and in the range of 208.988 digits
the space to store the data per number is quite a pain
 
Noice
 
11:07 AM
given normal 2's complement integers, it would be approx 700k bit integers
roughly 100KiB per number
given neither C# nor Java use garbage recycling, both would be having a hard time to deal with this given the code I wrote
 
 
1 hour later…
12:25 PM
@Squirrelkiller I hef question RE: blazor
before i ask it, i must warn it is a wierd one
I basically need to get an onfocus event that will show/hide some html on all our components
however
the components are in a nuget package & the logic that will allow the show/hide is in the project
 
Hello friends!
 
12:44 PM
@CaptainSquirrel sounds fine
 
@Wietlol it sounds like it's simple enough to do, but i can find exactly 0 examples of anyone doing anything remotely similar online
 
all you have to do is update your components
 
>:(
I KNOW THAT WIET
I don't want to have to add this fucking hover shit to all of our components manually
 
iDunno how blazor would work, but in React for example, each component would have to rerender, which happens after the state update, so you just have to link the global state to the components and update that global state
 
because that's bad for maintainability
blazor is nice
until its not
and then it's stupid
and i hate it
 
12:48 PM
obviously
it is the Wietlol paradox
eventually, everything sucks
:)
 
it's fRYEday FRyeDay let's get lAID on FryEdae
 
1:07 PM
@CaptainSquirrel IIRC someone did this but it turns out you have to use js interop for the event
Yet I have no idea how...your interaction with the nuget components looks like.
 
[Squirrel in Training] xvgcvgjhbknml,ö-ä.#
 
@Botler Bless you
 
just out of curiousity, what is it you want to hide/show?
 
mr5
fck devops
fck u microsoft
 
thank you
 
1:17 PM
is that John guy allowed to talk here again?
 
mr5
it's really a disaster for a project with a lot of devs that have no idea how git works.
 
yep J.Doe can speak here again
 
@Squirrelkiller basically we just consume the nuget package and add the components onto the razor file as you would a normal component
 
@mr5 I doubt that is devops' fault though
generally speaking it is a disaster for a project with a lot of devs that have no idea how git works
no matter what you use
 
@Squirrelkiller I think we may need to do some sort of interop bullshit unfortunately
bleh
 
1:32 PM
can you do it for one component?
then you should easily be able to do it for all of them
 
mr5
this is the scenario for every pull / checkout I made with my current job:
1 dependency being removed from .csproj
2 my code gets reverted back by 1 - 5 commits
2.1 someone claiming my code is broken, suggested a fix and pushed their commits
2.2 they realize their honest mistake so it's time to revert, but not by 1 commit but maybe 2 - 5 commits because why not?
3 not accepting new idea how to resolve an issue thus forcing us to adapt with their legacy convention so need to push again
 
our scenario is quite simple, but we are cheating though, so it prolly doesnt count
1, only 1 person works on a project at the same time
2, profit
 
mr5
also, I forgot the one that copy-paste codes/files directly from devops to their local repo and push it.
 
but we have approx 75 times more repos than developers
 
mr5
1:48 PM
what
each repo / version?
 
?
 
mr5
!
 
that is not how I use git mostly
that repo is just a shadow repo of all the different ones under it
every folder 2 levels deeper is a git repo
so it actually has 14 repositories
 
mr5
you mean submodules?
 
no, I learned about those later :D
for now, they are just 14 separate repositories in AWS CodeCommit
 
mr5
2:00 PM
Eww
Why not just package those libraries
After GameStop, they're doing it now on BTC
 
[JoyfulReaper] up 14% today already
 
package those libraries?
 
Medi Madelen Gwosdz on January 29, 2021
Welcome to ISSUE #58 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. This week, the unreasonable ecological cost of #cryptoart, why nobody is practicing continuous deployment, and our new feature: personalized feeds on Stack Overflow for Teams. From the blog Personalized feeds now…
 
2:16 PM
[kesarling] people, what is called first? onload event handler or OnGet method?
[mr5] It's over 20% in our currency 😁
[mr5] Sounds like you're mixing backend and frontend here.
[kesarling] umm, yeah. Kind of
[kesarling] You see, the onload event handler is not calling the JS function properly in my code
 
2:51 PM
I'd say OnGet is called first, then when the http GET is done onload is called
As OnGet is executed on the server to generate static html for the client
 
 
1 hour later…
4:15 PM
Hello o/
My Visual Studio just went full retard mode and stopped highlighting properly.
The problem is I don't really know what should I google as I don't get any good results :(
Any idea what it should be? Struggling with this for a good hour. Tried to "repair" VS but even that didn't help
 
4:36 PM
clear local cache
not sure what it is in VS, but in Rider we have a shiny button for it "Invalidate cache and restart"
 
I already did clean the solution and did a Visual Studio repair.
So it should be cleaner than ever
 
that is still not the local cache
that is only the solution binaries and... stuff
although
that might remove a bit too much
> Usually, we can delete the folder C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_xxxx to clean up the VS local cache, then VS will start like the first startup after the VS installation, all sign in accounts and customized setting will be removed.
 
Thanks for the help, didn't help either.
I will let it for tomorrow :) It may fix itself hah
 
5:45 PM
 

« first day (3758 days earlier)      last day (1181 days later) »