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
Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

There Will Be Penalty posted:

lmbo if you're not using the select builtin noobz
probably the way to go tbh

Adbot
ADBOT LOVES YOU

TimWinter
Mar 30, 2015

https://timsthebomb.com

Gazpacho posted:

found this while looking for a bash menu framework

https://github.com/niieani/bash-oo-framework

doesn't use directories and symlinks to implement polymorphism, but still does a lot!

What is stronger, my spite for bash or my desire to spite my fellow developers by using a bash oo framework...

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
sounds like a self-own to me, unless you’re a non-coding dev lead or something and can only mandate that others use it

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
if you hate your fellow developers that much you owe it to them to create your own OO mechanism for bash

using files and directories

maybe make it use one of the different styles of OO too, like generic functions instead of message sends

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
my idea is that since : is not lexically significant in bash you could define a command "::" that introduces a method call. it would locate the directory named by its first argument which contains an object, use the second argument as a method name to find a method script symlinked within that directory, then run that script. the script would receive the object path as a prefix of its own

e.g.

:: butt fart .... --> butt/.class/methods/fart ....

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



:stonk:

gonadic io
Feb 16, 2011

>>=
And Canadian Aboriginal Syllabics for generics

JawnV6
Jul 4, 2004

So hot ...
im sorry but programming languages are over no need for this thread, mods pls close

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

JawnV6 posted:

im sorry but programming languages are over no need for this thread, mods pls close

i hate javascript weeabs so much

Arcsech
Aug 5, 2008

JawnV6 posted:

im sorry but programming languages are over no need for this thread, mods pls close

there has never been a vm-based language that let you write lovely, resource-hungry web back ends, web ui, desktop applications, phone applications, and kinda-sorta video games before. nope. definitely not

e: too bad, it could have been called something like javascript, except shorter, because it came earlier, you know

MononcQc
May 29, 2007

if node is the last language to be used then I'm gonna become a software architect that asks devs to do poo poo that is glaringly painful in JS to punish them as much as I can for what they allowed to happen

Shaggar
Apr 26, 2006
i cant wait for web rear end to deprecate javascript.

gonadic io
Feb 16, 2011

>>=

MononcQc posted:

if node is the last language to be used then I'm gonna become a software architect that asks devs to do poo poo that is glaringly painful in JS to punish them as much as I can for what they allowed to happen

Hi I need a rest service to check if two numbers are equal.

Then 3 days later make them change it to not equal

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Shaggar posted:

i cant wait for web rear end to deprecate javascript.

:same:

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

JawnV6 posted:

im sorry but programming languages are over no need for this thread, mods pls close

what is this hacker noon site. are people paid to write for it

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
wrap it up, ruby on railures

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Shaggar posted:

i cant wait for web rear end to deprecate javascript.

JavaScript has been deprecated since 2008, when the iPhone SDK was released

there is no reason to use JavaScript on web pages now that you can build fully native applications for desktop, mobile, TV, and watch

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

eschaton posted:

JavaScript has been deprecated since 2008, when the iPhone SDK was released

there is no reason to use JavaScript on web pages now that you can build fully native applications for desktop, mobile, TV, and watch

i was just thinking yesterday how aggressively awful the youtube app is on literally every device now that it's the same lowest-common-denominator web garbage it is on the goddamn wii

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
iPhone ... SDK? is that the thing that sits under react native?

Notorious b.s.d.
Jan 25, 2003

by Reene

eschaton posted:

JavaScript has been deprecated since 2008, when the iPhone SDK was released

there is no reason to use JavaScript on web pages now that you can build fully native applications for desktop, mobile, TV, and watch

your cremnob is showing

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Shaggar posted:

i cant wait for web rear end to deprecate javascript.

i want to agree but also isn't the next hot thing web assembly?

Space Whale
Nov 6, 2014
Is reopening a file (read only!!) THAT much slower than just hanging onto 200+ handlers? C# in windoze.

JawnV6
Jul 4, 2004

So hot ...
whats a handle
how big is it
will TWO HUNDRED HANDLES take more than like... a meg of memory


just keep them around, dont talk to spinning disks

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today

Boiled Water posted:

i want to agree but also isn't the next hot thing web assembly?
that's what he said

Space Whale
Nov 6, 2014

JawnV6 posted:

whats a handle
how big is it
will TWO HUNDRED HANDLES take more than like... a meg of memory


just keep them around, dont talk to spinning disks

This is where I learn a lesson, 'cause this is on a SSD and still slower than I'd expect. Glad I at least realized wtf I should be doing.

Also I'm sorting a huge file with a weird sorta merge-sort and it turns out that the hidden message is the entirety of Moby Dick. 🐳

JawnV6
Jul 4, 2004

So hot ...

Space Whale posted:

This is where I learn a lesson, 'cause this is on a SSD and still slower than I'd expect. Glad I at least realized wtf I should be doing.

Also I'm sorting a huge file with a weird sorta merge-sort and it turns out that the hidden message is the entirety of Moby Dick. 🐳
i saw your other post, i knew the problem behind

https://gist.github.com/jboner/2841832

main memory is stupid fast. any read from the ssd is 1500x more expensive than grabbing from ram, much less doing 200 and potentially having it open/close pages or banks or w/e it is SSD's do

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Shaggar posted:

i cant wait for web rear end to deprecate javascript.

save the fiction for nanowrimo

akadajet
Sep 14, 2003

Gazpacho posted:

iPhone ... SDK? is that the thing that sits under react native?

that thing you have to sometimes drop to when react native doesn't have a suitable control.

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Ralith posted:

that's what he said

i'm terrible at reading turns out

Space Whale
Nov 6, 2014

JawnV6 posted:

i saw your other post, i knew the problem behind

https://gist.github.com/jboner/2841832

main memory is stupid fast. any read from the ssd is 1500x more expensive than grabbing from ram, much less doing 200 and potentially having it open/close pages or banks or w/e it is SSD's do

Holy poo poo just passing around StreamReaders (I'm in C#land) is so much loving faster :stare:

Space Whale
Nov 6, 2014
I can't just do a using() them since I'm passing them around.

If the program just terminates after I finish my file handle twiddling/stream twiddling is this going to be a memory leak or a file handle lock on the temp files? Can I just .Dispose() the StreamReaders or do I somehow need references to all the filestreams too?

raminasi
Jan 25, 2005

a last drink with no ice

Space Whale posted:

I can't just do a using() them since I'm passing them around.

If the program just terminates after I finish my file handle twiddling/stream twiddling is this going to be a memory leak or a file handle lock on the temp files? Can I just .Dispose() the StreamReaders or do I somehow need references to all the filestreams too?

StreamReader objects dispose their underlying streams when they're disposed. even if you forget to dispose them they will be eventually finalized unless you're actually keeping references around. i suspect that you are being unnecessarily paranoid about whatever it is you're doing but it's hard to tell without code.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Space Whale posted:

I can't just do a using() them since I'm passing them around.

If the program just terminates after I finish my file handle twiddling/stream twiddling is this going to be a memory leak or a file handle lock on the temp files? Can I just .Dispose() the StreamReaders or do I somehow need references to all the filestreams too?

AFAIK if you don't call .Dispose() on an object that implements IDisposable and have no more references to it, the garbage collector will eventually take care of it for you because IDisposable objects call .Dispose() in their .Finalize() method.

I think you're technically not supposed to depend on that because it's not explicitly required of IDisposable objects to call .Dispose() in their .Finalize() and also the garbage collector makes no guarantees of when it'll actually get around to the object, but you shouldn't need to worry about leaks.

ThePeavstenator fucked around with this message at 01:00 on Mar 29, 2018

redleader
Aug 18, 2005

Engage according to operational parameters

Space Whale posted:

I can't just do a using() them since I'm passing them around.

If the program just terminates after I finish my file handle twiddling/stream twiddling is this going to be a memory leak or a file handle lock on the temp files? Can I just .Dispose() the StreamReaders or do I somehow need references to all the filestreams too?

the kernel will close any open file handles when a process ends (on windows, dunno about other oses). i'd expect other kernel handles to be closed as well, but i'm not sure about this. other unmanaged, non-os resources? who knows!

also finalizers are delicate, fragile things that need to be written with care. and they're not guaranteed to run at all

JawnV6
Jul 4, 2004

So hot ...
there is no way your C# program is leaking memory after program termination

Space Whale
Nov 6, 2014
I called .Dispose() on each file handler as the file was exhausted, so if the StreamReader disposes of the inner FileReader I'm fine, thanks.

JawnV6 posted:

there is no way your C# program is leaking memory after program termination

Well, no, but lots of people looking over code will wag a finger at the very least.

Plorkyeran
Mar 22, 2007

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

Suspicious Dish posted:

what is this hacker noon site. are people paid to write for it

no. it's just a curated selection of medium posts that are written for ~exposure~

redleader
Aug 18, 2005

Engage according to operational parameters

Space Whale posted:

I called .Dispose() on each file handler as the file was exhausted, so if the StreamReader disposes of the inner FileReader I'm fine, thanks.


Well, no, but lots of people looking over code will wag a finger at the very least.


yeah, streamreaders and writers are a little odd in that they will dispose of the underlying stream when you call their Dispose() method (unless you use one particular ctor)

but if your coworkers wag their finger at you for not worrying about memory management, you should consider finding different coworkers

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

redleader posted:

yeah, streamreaders and writers are a little odd in that they will dispose of the underlying stream when you call their Dispose() method (unless you use one particular ctor)

but if your coworkers wag their finger at you for not worrying about memory management, you should consider finding different coworkers

I mean you can’t just leak file handles in software that matters, I wouldn’t call wanting to properly close stuff finger wagging

Adbot
ADBOT LOVES YOU

feedmegin
Jul 30, 2008

JawnV6 posted:

there is no way your C# program is leaking memory after program termination

Technically I can think of ways of doing that, e.g. System V shared memory segments :sun:

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