Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
oh no blimp issue
Feb 23, 2011


this image is everything wrong in the world

Adbot
ADBOT LOVES YOU

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD
devenv is great but turn off capital menu bars you psycho

triple sulk
Sep 17, 2014



i wish that the asp.net 5/webapi were usable on os x but i can't even get the generator to update/install correctly for some reason. thanks npm

Shaggar
Apr 26, 2006
nothing works on Linux. you have to use windows if you want things to just work

Bloody
Mar 3, 2013

i want my asp.net 5 app to spawn a long-running background worker thread. where should i do that? the configure method? sounds like that's kind of the start-up point?

Shaggar
Apr 26, 2006
the general wisdom is don't put long running background tasks in your webapp, but if you really want to then startup.cs is probably the right place. what is the goal of the thing cause if its something that handles work processing independently of the web app then putting it into a windows service or some other similar long running service application might be more appropriate

Shaggar
Apr 26, 2006
you can use the new DI stuff to configure it as a service in startup.cs ConfigureServices like

C# code:
services.Add(ServiceDescriptor.Singleton<LongRunningTaskProcessor>());
and then in the constructor of your controller or wherever else you might want to add it

C# code:

private LongRunningTaskProcessor _processor;
public ButtController(LongRunningTaskProcessor processor)
{
	_processor=processor;
}

Bloody
Mar 3, 2013

i guess it doesn't really need to be long-running. the app is just pulling poo poo from a few other internet apis and serving up cached results on page load. i could just hit the apis on page load but that sounds like it would be slow so i was gonna have a background worker just hit the apis every #update_period and cache that data in the webapp

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

~Coxy posted:

1. lol

2. whether you do this or not makes little difference. the update scripts are the ones that are actually executed.

3. that isn't going to help when trying to debug a big sproc line by line (or block by block)

4. sure, but that's primitive as hell. you can't mock anything, for example

5. you ignore my point entirely. there are no good tools to help you refactor any of these things.

ensuring that your update scripts produce the same thing as the create-from-scratch script is not difficult. as part of testing every commit that modifies either of them, your ci server just has to run the previous create script, run the newly added update script, and then run the new create script, and verify that they give identical results. if you don't have a ci server testing everything that you can ever dream of testing then you should fix that as it's pretty awesome

idk what to say other than that i have debugged sprocs in the range of a hundred or two lines and while having to copy and paste poo poo rather than being able to step over lines was dumb and annoying, proper debugging tools would not have fundamentally changed my debugging workflow in the way that they do for compiled languages. a debugger would be nice to have, but the lack of it does not make things impossible to debug

mocking out internal components is an antipattern that leads to useless tests. if your stored procs are making network requests or something then lol?

not having useful refactoring tools is the norm, not something unusual about sql. having anything more useful than an "extract method" which doesn't always produce working code and a "rename class" that also sometimes renames some unlreated things is pretty much limited to java and c#

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Bloody posted:

i guess it doesn't really need to be long-running. the app is just pulling poo poo from a few other internet apis and serving up cached results on page load. i could just hit the apis on page load but that sounds like it would be slow so i was gonna have a background worker just hit the apis every #update_period and cache that data in the webapp

http://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx/

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
my broader point is that while there isn't really a good standard ecosystem of tools for applying proper software engineering to your database stuff, that's still no excuse for not doing it anyway. if you're writing tests for your sql and doing absolutely everything you can to version your schema, then it's reasonable to complain about the shortcomings of your tools. it's not reasonable to look at the tools available and just decry that sql is "untestable" and just give up (or give a bunch of money to redgate and then give up)

the sad state of software engineering when it comes to database things is a cultural problem, and the tooling problem is a consequence of that, not the cause

jesus WEP
Oct 17, 2004


Bloody posted:

i guess it doesn't really need to be long-running. the app is just pulling poo poo from a few other internet apis and serving up cached results on page load. i could just hit the apis on page load but that sounds like it would be slow so i was gonna have a background worker just hit the apis every #update_period and cache that data in the webapp
write a windows service that does that and then ur webapp can pull the latest data from its results

Bloody
Mar 3, 2013

yeah but i dont know how to do any of that

Bloody
Mar 3, 2013

literally all i know is i can take an asp.net project and hit publish and then its in the cloud. everything else is unknown to me

Bloody
Mar 3, 2013

can i create a separate project that also somehow publishes to the cloud, and then have the first project ask the second project for stuff? how does any of that work? i have no idea.

i can come up with a dozen different ways to do this like just on my pc or something but... cloud

Bloody
Mar 3, 2013

i guess i could make em talk to each other through a database. thats a thing i know how to do. but then i gotta have a database, and i dont want to

Shaggar
Apr 26, 2006

Bloody posted:

i guess it doesn't really need to be long-running. the app is just pulling poo poo from a few other internet apis and serving up cached results on page load. i could just hit the apis on page load but that sounds like it would be slow so i was gonna have a background worker just hit the apis every #update_period and cache that data in the webapp

if you know everything that might be accessed then doing a big round of precaching at startup might be an ok idea, but If the data changes then you should be requesting it during each page load. use async controller actions and async requests to get the data.

if you want to cache create a memorycache and check it for the data during the page load, if it doesn't exist grab it from the api and stuff it in the cache. you can configure the cache expiry when you add it to the cache.

if the api provides cache headers you can base your caching on that

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
you might need some kind of persistence if you're going to do results caching so you may as well use a db if your data is structured or a queue or something

use azure webjobs and write a exe that does your querying and stores the data in a db/queue then hit that datastore from your webapp

Bloody
Mar 3, 2013

eh thats probably easy enough

Shame Boy
Mar 2, 2010

Shaggar posted:

nothing works on Linux. you have to use windows if you want things to just work

i will admit that i have had to manually hunt down, download and install more drivers in the couple months i've been using my work macbook than i had to in the near decade or so since windows was able to do that for you and linux came with all drivers ever made built in. and these are drivers for new things like modern printers and scanners too, not even some ancient parallel port garbage or some bullshit like that. "it just works" my rear end :colbert:

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

NihilCredo posted:

give paket a try maybe? it's basically "nuget, but a bit better"

in visual studio the migration process is 1) install paket from the VS Gallery 2) tools -> paket -> "convert from nuget" -> done



jesus not a single version number/git tag, just pull and hope

Jerry Bindle
May 16, 2003
move fast, break dependencies

AWWNAW
Dec 30, 2008

Parallel Paraplegic posted:

i will admit that i have had to manually hunt down, download and install more drivers in the couple months i've been using my work macbook than i had to in the near decade or so since windows was able to do that for you and linux came with all drivers ever made built in. and these are drivers for new things like modern printers and scanners too, not even some ancient parallel port garbage or some bullshit like that. "it just works" my rear end :colbert:

lol if you print in 2016

Shame Boy
Mar 2, 2010

AWWNAW posted:

lol if you print in 2016

actually most often it's been scanners, OSX seems to loving hate scanners without installing the 200MB bloatware SCANNER ENHANCEMENT DRIVERS or whatever, it either outright doesn't recognize them at all or can tell it's a scanner enough to make it a scanner icon and open the scanner program but when you try to tell it to scan it just freaks out and bitches about drivers.

Shaggar
Apr 26, 2006

hackbunny posted:

jesus not a single version number/git tag, just pull and hope

its the web "development" way

AWWNAW
Dec 30, 2008

what's the typical lifespan of a web "app" these days anyway? 1 year?

MeruFM
Jul 27, 2010

Parallel Paraplegic posted:

actually most often it's been scanners, OSX seems to loving hate scanners without installing the 200MB bloatware SCANNER ENHANCEMENT DRIVERS or whatever, it either outright doesn't recognize them at all or can tell it's a scanner enough to make it a scanner icon and open the scanner program but when you try to tell it to scan it just freaks out and bitches about drivers.
That just sounds like scanner makers being poo poo and not adhering to some supposed standard.

also linux driver support for gpu, sound, drawing tablets, etc is atrocious + buggy

oh no blimp issue
Feb 23, 2011

like shaggar says, if you want something to work, use windows

Bloody
Mar 3, 2013

MeruFM posted:

That just sounds like scanner makers being poo poo and not adhering to some supposed standard.

also linux driver support for gpu, sound, drawing tablets, etc is atrocious + buggy

things linux developers dont use.txt

suffix
Jul 27, 2013

Wheeee!

hackbunny posted:

jesus not a single version number/git tag, just pull and hope

i assume they're at least recorded in the paket.lock file

Shaggar
Apr 26, 2006

AWWNAW posted:

what's the typical lifespan of a web "app" these days anyway? 1 year?

less than 6 months or longer than 5 years. theres nothing inbetween

Shame Boy
Mar 2, 2010

Bloody posted:

things linux developers dont use.txt

GPU is terrible, i'll concede that, but sound's been pretty fine for a while now unless you have some :krad: bitchin' $200 sound card or something.

also i have a wacom intuos that i originally got for drawing cute anime boys gently caress you don't judge me that works fine* on linux :colbert:

*if you don't mind that 95% of the settings can only be accessed via a command line utility and it resets everything to defaults every time you unplug it

MeruFM
Jul 27, 2010
the test for sound is if you can get 2 midi devices to play samples at the same time with sub 50ms lag

windows still cannot unless you buy ASIO supported hardware

MeruFM
Jul 27, 2010
the people who say "just werks" are usually people who know little enough about computers to say it completely sincerely and without knowledge of the unironic version.

Shame Boy
Mar 2, 2010

MeruFM posted:

the test for sound is if you can get 2 midi devices to play samples at the same time with sub 50ms lag

windows still cannot unless you buy ASIO supported hardware

like physical midi devices? because i've gotten stacks of software synths + my midi keyboard working fine with pretty low latency before but it's not like i actually use that poo poo professionally or anything.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

ffs guys

suffix posted:

i assume they're at least recorded in the paket.lock file

yes, the paket.lock file is autogenerated and it will include all version numbers / git commits, plus transitive dependencies and such.

if you don't specify any versioning in the dependencies file, when you *manually choose* "Update packages" the paket.lock references will update to the latest version.



you normally DO specify versioning in the paket.dependencies file, though. this is how:



https://fsprojects.github.io/Paket/dependencies-file.html posted:

The file specifies that Paket's NuGet dependencies should be downloaded from nuget.org and that we need:
  • NUnit in version 2.6.3 <= x < 2.7
  • FAKE in version 3.4 <= x < 4.0 as a build tool
  • DotNetZip with version which is at least 1.9
  • SourceLink.Fake in the latest version
  • FSUnit.fs from GitHub.
  • Gist number 1972349 from GitHub Gist
  • External HTTP resource, e.g. 1n from FSSnip

Paket uses this definition to compute a concrete dependency resolution, which also includes transitive dependencies. The resulting dependency graph is then persisted to the paket.lock file.

Only direct dependencies should be listed and you can use the paket simplify command to remove transitive dependencies.

Asshole Masonanie
Oct 27, 2009

by vyelkin

NihilCredo posted:

ffs guys


yes, the paket.lock file is autogenerated and it will include all version numbers / git commits, plus transitive dependencies and such.

if you don't specify any versioning in the dependencies file, when you *manually choose* "Update packages" the paket.lock references will update to the latest version.



you normally DO specify versioning in the paket.dependencies file, though. this is how:



oh wow this poo poo is soooooo much better than node

Shame Boy
Mar 2, 2010

Power Ambient posted:

oh wow this poo poo is soooooo much better than node

i'm the special snowflake tilde arrows

return0
Apr 11, 2007

Parallel Paraplegic posted:

i'm the special snowflake tilde arrows

lots of things (like gems/bundle in rails) do that? maybe node too?

Adbot
ADBOT LOVES YOU

Gus Hobbleton
Dec 30, 2003
Probation
Can't post for 3 years!
people actually give a poo poo about midi in tyol 2016?

  • Locked thread