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.
 
  • Post
  • Reply
Zlodo
Nov 25, 2006

Internet Janitor posted:

how do you feel about your processor's cache

it doesn't drop uninterruptible 40 ms turds in our game's main thread profiles like the scaleform garbage collector likes to do sometimes (our target framerate is 30fps where a frame must last less than 30ms)

Adbot
ADBOT LOVES YOU

uncop
Oct 23, 2010
i would agree that refcounting is just a naive garbage collection strategy, but isn't rust's thing supposed to be that unless you explicitly use a refcounting pointer, it directly inserts the instructions to free memory at compile time rather than storing a reference count, having a runtime check for whether the count has reached zero when it's decremented and so on? surely garbage collection has to be a runtime thing, otherwise you might as well say that c has ad-hoc programmer-defined garbage collection?

uncop fucked around with this message at 18:09 on Oct 22, 2018

Volte
Oct 4, 2004

woosh woosh
the garbage is still collected at runtime, it's just a surgically precise GC pass that collects exactly one piece of garbage that is known at compile time

tef
May 30, 2004

-> some l-system crap ->

uncop posted:

i would agree that refcounting is just a naive garbage collection strategy, but isn't rust's thing supposed to be that unless you explicitly use a refcounting pointer, it directly inserts the instructions to free memory at compile time rather than storing a reference count, having a runtime check for whether the count has reached zero when it's decremented and so on? surely garbage collection has to be a runtime thing, otherwise you might as well say that c has ad-hoc programmer-defined garbage collection?

don't tell me there's not one bit of difference between c and rust's model


that's exactly how many bits are different

it's literally a one bit reference count that's checked at compile time

tef
May 30, 2004

-> some l-system crap ->
like the whole thing in rust isn't a lack of gc it's using lifetime limited borrowing instead of dynamic checks,

where you can

and then using rc, arc, etc when you can't

VikingofRock
Aug 24, 2008




I thought that most cases don't require a drop flag in rust? I.e. the compiler can usually elide the "one bit" and generate the same code that would have been generated from a manual use of malloc() / free().

tef
May 30, 2004

-> some l-system crap ->
i thought that in most cases java could elide heap allocation and use escape analysis so is it really gc?

yes

Volte
Oct 4, 2004

woosh woosh

VikingofRock posted:

I thought that most cases don't require a drop flag in rust? I.e. the compiler can usually elide the "one bit" and generate the same code that would have been generated from a manual use of malloc() / free().
yeah and someone coming to my house and picking up my trash and taking it to the dump has the same end result as me driving my own car to the dump and dropping off the trash myself. and yet only one of them is garbage collection

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Volte posted:

the garbage is still collected at runtime, it's just a surgically precise GC pass that collects exactly one piece of garbage that is known at compile time

i too can delete my own files

uncop
Oct 23, 2010

tef posted:

don't tell me there's not one bit of difference between c and rust's model


that's exactly how many bits are different

it's literally a one bit reference count that's checked at compile time

depends on how you calculate two qualitatively different bits, in rust its stored by the compiler and in c it's commonly stored by the programmer's brain cells. it's obvious that the latter is not garbage collection, but at which point between the human and the actual running program does it become garbage collection? would self-imposed restrictions that let one know when to correctly free memory without having to personally keep track of when things have fallen out of use count as garbage collection? like, for instance, one could compose a program out of short-lived processes that share nothing and everything they own is manually freed exactly when they end, would that practice count as garbage collection that exists in unprocessed source code or outside the computer altogether depending on how you prefer to look at it?

Notorious b.s.d.
Jan 25, 2003

by Reene

tef posted:

i thought that in most cases java could elide heap allocation and use escape analysis so is it really gc?

yes

the jvm is really good at escape analysis but the ways programmers actually use java often make stack allocation impossible

Notorious b.s.d.
Jan 25, 2003

by Reene

Zlodo posted:

it doesn't drop uninterruptible 40 ms turds in our game's main thread profiles like the scaleform garbage collector likes to do sometimes (our target framerate is 30fps where a frame must last less than 30ms)

that's not impossible to hit with a gc

it will also, occasionally, be violated by a particularly lovely amount of heap fragmentation

tinaun
Jun 9, 2011

                  tell me...

VikingofRock posted:

I thought that most cases don't require a drop flag in rust? I.e. the compiler can usually elide the "one bit" and generate the same code that would have been generated from a manual use of malloc() / free().

when MIR came along rustc was able to remove drop flags from the type itself but they still exist on the stack subject to the whims of LLVM

for me a gc is a gc if it's able to free whatever complex graph of nested references you throw at it, which none of rusts pointer types can do (the pre 1.0 Gc<T> type (nee @T) did)

tef
May 30, 2004

-> some l-system crap ->

uncop posted:

depends on how you calculate two qualitatively different bits, in rust its stored by the compiler and in c it's commonly stored by the programmer's brain cells. it's obvious that the latter is not garbage collection, but at which point between the human and the actual running program does it become garbage collection? would self-imposed restrictions that let one know when to correctly free memory without having to personally keep track of when things have fallen out of use count as garbage collection? like, for instance, one could compose a program out of short-lived processes that share nothing and everything they own is manually freed exactly when they end, would that practice count as garbage collection that exists in unprocessed source code or outside the computer altogether depending on how you prefer to look at it?

well in the sense that a gc simulates a machine with inexhaustable memory, running a program and never calling free is roughly the same if a gc didn't run a collection cycle

tef
May 30, 2004

-> some l-system crap ->

Notorious b.s.d. posted:

the jvm is really good at escape analysis but the ways programmers actually use java often make stack allocation impossible

as go and rust are finding out, escape analysis is great if you put most poo poo in boxes already

tinaun posted:

when MIR came along rustc was able to remove drop flags from the type itself but they still exist on the stack subject to the whims of LLVM

for me a gc is a gc if it's able to free whatever complex graph of nested references you throw at it, which none of rusts pointer types can do (the pre 1.0 Gc<T> type (nee @T) did)

eh a gc can be imperfect, or approximate, or conservative, so no

echinopsis
Apr 13, 2004

by Fluffdaddy
if i was to make a website in python what would be a good host i could do it all on?

idk how that poo poo works? like my own pc and i work on it only it’s not my own pc it’s someone else’s i log into ala teamviewer? or ssh? and store the data base and the python files and it serves up the http over the cat5s?

echinopsis
Apr 13, 2004

by Fluffdaddy
ps i don’t really even know if i’m on the right train of thought or if i’m shamefully wrong about how it really works. i just wanna make it work. i don’t mind doing my own research but a jump start on what i should be looking into for a start would be very helpful

mystes
May 31, 2006

Start developing it on your own computer and then set it up on digitalocean or ec2 or whatever using ssh.

AggressivelyStupid
Jan 9, 2012

you can use Django (more involved, but also more stuff is done for you) or flask, and buy like the five dollar a month digitalocean droplet

you'll also need a domain name

Nomnom Cookie
Aug 30, 2009



can we also call x86 asm a scripting language. it’s basically interpreted by the uarch nowadays

JawnV6
Jul 4, 2004

So hot ...

Kevin Mitnick P.E. posted:

can we also call x86 asm a scripting language. it’s basically interpreted by the uarch nowadays

no

fake edit for more information: not really

Arcsech
Aug 5, 2008

echinopsis posted:

if i was to make a website in python what would be a good host i could do it all on?

idk how that poo poo works? like my own pc and i work on it only it’s not my own pc it’s someone else’s i log into ala teamviewer? or ssh? and store the data base and the python files and it serves up the http over the cat5s?

honestly if that's the level of questions you're asking, probably just throwing it on heroku is your best bet

Nomnom Cookie
Aug 30, 2009



JawnV6 posted:

no

fake edit for more information: not really

but it’s garbage collected also. there’s no free instruction

echinopsis
Apr 13, 2004

by Fluffdaddy

Arcsech posted:

honestly if that's the level of questions you're asking, probably just throwing it on heroku is your best bet

ok cool

mystes posted:

Start developing it on your own computer and then set it up on digitalocean or ec2 or whatever using ssh.

ok cool

AggressivelyStupid posted:

you can use Django (more involved, but also more stuff is done for you) or flask, and buy like the five dollar a month digitalocean droplet

you'll also need a domain name

ok cool


i’ll look at these and see what suits my needs and profound lack of skill and knowledge and funds

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
after gettin bought by salesforce, heroku has done a grand total of bupkis in new features and poo poo

the old features remain good af tho

abraham linksys
Sep 6, 2010

:darksouls:

bob dobbs is dead posted:

after gettin bought by salesforce, heroku has done a grand total of bupkis in new features and poo poo

the old features remain good af tho

i really wish we were currently running on heroku instead of an over-architected AWS setup for our [checks pages and pages of data reports] <100 daily users

at least we have a backend dude who seems very into managing the AWS setup and actually documents all his poo poo with graphics and poo poo so if he quits i'd actually be in an okay place to inherit it, and tbf we can scale up very cheaply once we do get more users, as well as do things like "spin up individual staging environments" for cheap

still seems very silly and i need to find out exactly why we went down this path, because i think they launched this app on EC2, which is baffling because it's a bog-standard rails app with zero special considerations. i guess being able to ssh into a persistent box is occasionally useful but mostly this is dumb!

echinopsis
Apr 13, 2004

by Fluffdaddy
i do want to code my website directly (well tbh i don’t care about that but i do have a specific vision and prepared to code directly) and my only code skill is with python and this thing will need a database and sql is the only one of those i know OF lol so if whatever can do that i’ll be happy

where’s the best place to buy a domain from in this day and age? godaddy?

Arcsech
Aug 5, 2008

echinopsis posted:

i do want to code my website directly (well tbh i don’t care about that but i do have a specific vision and prepared to code directly) and my only code skill is with python and this thing will need a database and sql is the only one of those i know OF lol so if whatever can do that i’ll be happy

this is one reason i recommended heroku. you do development locally, then just do "git push heroku" and bam. when you set it up you can say "i want a postgresql plz" and you will magically have one with backups and poo poo all done for you.

echinopsis posted:

where’s the best place to buy a domain from in this day and age? godaddy?

I use name.com, gandi.net also doesnt suck. definitely not godaddy under any circumstances

redleader
Aug 18, 2005

Engage according to operational parameters

Kevin Mitnick P.E. posted:

can we also call x86 asm a scripting language. it’s basically interpreted by the uarch nowadays

x86: the p'est of plangs

echinopsis
Apr 13, 2004

by Fluffdaddy

Arcsech posted:

this is one reason i recommended heroku. you do development locally, then just do "git push heroku" and bam. when you set it up you can say "i want a postgresql plz" and you will magically have one with backups and poo poo all done for you.


I use name.com, gandi.net also doesnt suck. definitely not godaddy under any circumstances

hmm ok i can deal with this

also guess i need to learn git now

🤔 i’ll learn something for sure

Notorious b.s.d.
Jan 25, 2003

by Reene

Kevin Mitnick P.E. posted:

can we also call x86 asm a scripting language. it’s basically interpreted by the uarch nowadays

at least scripting languages have debuggers

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

Volte posted:

the garbage is still collected at runtime, it's just a surgically precise GC pass that collects exactly one piece of garbage that is known at compile time

what language stacks the garbage by the door because it’s too depressed to go outside?

MononcQc
May 29, 2007

bob dobbs is dead posted:

after gettin bought by salesforce, heroku has done a grand total of bupkis in new features and poo poo

the old features remain good af tho

the new features all went to getting bigger commercial deals and catering to larger orgs.

hobbysists and small orgs were always annoying because of how creative they were in finding ways not to pay. And I'm not talking just stolen credit cards though there were many of these, but poo poo like:

- writing software to rotate a website and its DNS over multiple accounts so it would never run out of free hours and people could run bigger sites for free
- all the loving bitcoin miners you can think of
- reverse engineering how limitations were set (i.e. was traffic shaping based on packet count or bandwidth or a combination? If you bump CPU 100%, what's the interval window not to get caught?) to specifically figure out how to get more resources than you were allocated and get 100% of a node's resources and gently caress other customers over
- finding that the data cap was a soft cap, so they'd run like 6TB of data in a day, then shut down the account after having migrated it to another one to keep using more forever
- using free accounts to set up sharded free DBs, then 200 other free accounts to get parallel front-ends for free
- running what is essentially data exfiltration services, proxies, or torrent servers, which would gently caress stuff up for other customers
- fun edge cases where someone would make a single website but try to attach 500,000 domain names to it just to provide customized subdomains for every user (please adapt the service to support this use case)
- all the other illegal poo poo you can think of

and so on.

The shared platform more or less became playing cops and robbers against cheap people looking for dollar hosting to preserve the quality of service for actual customers who paid actual money. So the org did the logical thing: creating features and a platform for customers that pay actual money. That's why the feature addition rate went down mainly.

Nevertheless there's been a few interesting projects for new features, but mostly every bit of development on the shared platform had to clash against almost a decade of technical debt to clean stuff up while it would bring almost no new money (including finding how to migrate thousands of customers who had no interest in updated their apps). We still shipped a few features here and there, and I know that during my time there we went from 99.9% monthly uptime up to 99.99% (and higher) monthly uptime for most apps. That kind of stuff doesn't come cheap, usually.

There was also a lot of traffic and load growth during that time, and mostly the devs had to adapt to it as well.

MononcQc fucked around with this message at 13:32 on Oct 23, 2018

MononcQc
May 29, 2007

Vomik posted:

what language stacks the garbage by the door because it’s too depressed to go outside?

that would be PHP before v7, since the GC basically captured maybe 5-10% of the actual garbage and the rest of it was just never deallocated until the connection was closed. Nobody would find out about it except if you ran long-running scripts, and few people were mad enough to do that.

Zlodo
Nov 25, 2006

MononcQc posted:

that would be PHP before v7, since the GC basically captured maybe 5-10% of the actual garbage and the rest of it was just never deallocated until the connection was closed. Nobody would find out about it except if you ran long-running scripts, and few people were mad enough to do that.

tbf if php tried to collect the actual garbage it would have to terminate its own process

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

MononcQc posted:

that would be PHP before v7, since the GC basically captured maybe 5-10% of the actual garbage and the rest of it was just never deallocated until the connection was closed. Nobody would find out about it except if you ran long-running scripts, and few people were mad enough to do that.

this doesn’t even seem that unreasonable given how php is typically used

I’m not saying I’d be proud to ship such a technically deficient project, and would probably argue for no gc whatsoever if it was really that bad, but eh

MononcQc
May 29, 2007

pokeyman posted:

this doesn’t even seem that unreasonable given how php is typically used

I’m not saying I’d be proud to ship such a technically deficient project, and would probably argue for no gc whatsoever if it was really that bad, but eh

Yeah. I remember finding about it because I had such a long running script at my first job, and you basically had to manually set a bunch of variables to null explicitly. Basically you could:

- let the variable go out of scope and let the GC do its thing (it wouldn't)
- call unset($var) to remove the variable from the symbol table and schedule it for GC (may or may not release memory given who knew when GC would kick in, and it couldn't cope with cycles)
- set $var = null, which would rewrite the content and shrink memory right away (as long as the term stored was larger than the null value + variable table entry)

So in long running scripts, depending on the data type and urgency of reclaiming memory, you had to juggle nulling and unsetting a variable (or both) to cope with the GC not doing the right thing.

But any other usages were fine in the context of short-lived request/response cycles and PHP did not really need a GC there.

E: in any case I believe PHP7 fixed all of that, but by then I was no longer using it.

echinopsis
Apr 13, 2004

by Fluffdaddy

whole thing is extremely new to me, but I’m very imprsssed with it so far. still don’t really “get” what an “app” is in its lingo but I guess it’s coz my knowledge/awarenesss of things on the internet is so shallow. presumably ultimately my one website will be a single “app” and if one day there was iOS app you’d have a seperate “app” to deal with it.

slowly working thru the tutorial thing like doing a git and about to click a button that’s saying “I know what a proctfile” is but I really don’t know what one is, only that they now exist

Coffee Jones
Jul 4, 2004

16 bit? Back when we was kids we only got a single bit on Christmas, as a treat
And we had to share it!

Lutha Mahtin posted:

does this compile to the CLR bytecode (or whatever it's called) that "regular" languages like c# compile to? or can you do wacky mix and match stuff with both CLR and traditional machine code

yes, It compiles to Intermediate Language (bytecode) for easy interop with the rest of the CLR languages. And you could always call out to traditional unmanaged native code, it’s just not in the same .dll

This stuff made more sense in fifteen years ago when adoption was more of an issue.


FWIW every place I’ve worked at over the past five years was migrating off of Windows and took the opportunity for a platform change to do a rewrite instead of migrating to .net core, which makes part of my skillset less valued.
The JVM world has no such problems, really. They can move onto more interesting functional first languages like Scala and find employment.

Adbot
ADBOT LOVES YOU

fritz
Jul 26, 2003

Kevin Mitnick P.E. posted:

can we also call x86 asm a scripting language. it’s basically interpreted by the uarch nowadays

no its too strongly typed to be a scripting language

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply