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
Brain Candy
May 18, 2006

Nomnom Cookie posted:

i tend to agree, but java has synchronized blocks and Thread.stop() has to deal with them. there's no good way to immediately kill a thread while it's holding a lock. how is this not an intrinsic problem? the semantics of java practically guarantee that anything recognizably similar to Thread.stop() will be either broken or useless

executors exist and work in practice and you can trivially make one that is just a wrapper around a thread and a queue

the thread stop and suspend and whatever were almost always wrong because sun thought that the required thing would be to check if the thread was in the correct state and doing the thing now. the correct state check leads to awful sequential coupling which is terrible in general but is inexecusable in context. the now part requires blowing up mutexes. if you soften the requirements to eventually and only if you are in the correct state, you can actually do useful things controlling threads

these methods can never be fixed because of javas hard backwards compatibility goals and why bother because executors

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Nomnom Cookie posted:

the semantics of java practically guarantee that anything … will be either broken or useless

Nomnom Cookie
Aug 30, 2009



Brain Candy posted:

executors exist and work in practice and you can trivially make one that is just a wrapper around a thread and a queue

the thread stop and suspend and whatever were almost always wrong because sun thought that the required thing would be to check if the thread was in the correct state and doing the thing now. the correct state check leads to awful sequential coupling which is terrible in general but is inexecusable in context. the now part requires blowing up mutexes. if you soften the requirements to eventually and only if you are in the correct state, you can actually do useful things controlling threads

these methods can never be fixed because of javas hard backwards compatibility goals and why bother because executors

yes, java.util.concurrent is a good thing, and you have Thread.interrupt() for sanely loving with threads

making Thread.stop() work "eventually" isn't an option because it adds at least 2 tests to each synchronized block exit: checking whether this is the outermost synchronized block, and whether the thread should stop. plus it's stupid, even more stupid than regular thread fuckery


don't you have something to compute unreasonably slowly

suffix
Jul 27, 2013

Wheeee!

Nomnom Cookie posted:

work uses NIO to get read timeouts...but its still thread per connection. apparently nowadays you can easily solve the c10k problem by creating 10000 threads
well that's what this says.

ms is putting a lot of work into async in C# though, so i suppose thats still more webscale somehow

Gazpacho posted:

Service reminder that everyone should read lauer & needhams duality paper

it can't be easy going trough life with a name like needham

MononcQc
May 29, 2007

All the cool kids now work on C100k or C1000k. C10K is so 1990s :smuggo:

Then Whatsapp says screw you and do over 2MM connections per server.

The cNk things are more or less worthless without characterizing the load per connection and hardware, hth

Brain Candy
May 18, 2006

Nomnom Cookie posted:

yes, java.util.concurrent is a good thing, and you have Thread.interrupt() for sanely loving with threads

making Thread.stop() work "eventually" isn't an option because it adds at least 2 tests to each synchronized block exit: checking whether this is the outermost synchronized block, and whether the thread should stop. plus it's stupid, even more stupid than regular thread fakery

look at a executors, look awaitTermination. this is the non-stupid stop

Sapozhnik
Jan 2, 2005

Nap Ghost
Java would be so much better if it had logical processes and channels instead of threads, threading is amateur hour hack garbage where anybody who isn't a psychopath basically pretends every thread is a logically separate process connected by channels anyway

as a bonus you wouldn't have 2GB heaps that stop the world for seconds at a time while they garbage collect

the semantics for passing a massive chunk of memory across one of those channels (i.e. making it disappear from subprocess A's heap and appear in subprocess B's heap) are potentially tricky tho i guess

gently caress maybe i SHOULD just use erlang for server poo poo, i like having libraries available tho. and it's hard enough find gophers to help out with a java project when they just go "loljava why don't you just write it in php", if i showed them poo poo in erlang they'd be like "u wot m8"

Sapozhnik fucked around with this message at 16:25 on Dec 9, 2013

Shaggar
Apr 26, 2006
i only have one thing in prod where i had to use threads and its for occasional long running tasks. i just fire the stuff into an executor and forget about it. its dumb and lazy but it works.

Brain Candy
May 18, 2006

yeah why be that one weird uncle when you could be an inscrutable wizard

see, the video is teaching people

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

MononcQc posted:

All the cool kids now work on C100k or C1000k. C10K is so 1990s :smuggo:

Then Whatsapp says screw you and do over 2MM connections per server.

The cNk things are more or less worthless without characterizing the load per connection and hardware, hth

or response latency

i too can serve 1bil connections by sleeping on them

the whatsapp thing is cool as heck but its a chatapp

it pushes text around, they coukd do it in hardware or something


i mean how many packets do cisco edge routers handle per second? trillions?

Sapozhnik
Jan 2, 2005

Nap Ghost
yeah but they have to log and index all of those conversations in real time for the NSA and lmao if you think the NSA is paying for it

that's nontrivial at least

Zombywuf
Mar 29, 2008

Mr Dog posted:

yeah but they have to log and index all of those conversations in real time for the NSA and lmao if you think the NSA is paying for it

Pretty sure the NSA are paying for it. Remember that they have DoD level budgets and need to convince corporations to do stuff, giant truckloads of cash is the easiest way.

Zombywuf
Mar 29, 2008

MononcQc posted:

Go doesn't cover poo poo like goroutine A depends on goroutine B, and B dies, so what does A do? There's also no way for a goroutine to interrupt/kill another one.

I would really love for Go to garbage collect blocked routines like this. It could be done with simple reference counting, the circular reference problem is then the same as the deadlock problem for which SOL is a good enough handling mechanism.

Shaggar
Apr 26, 2006
i bet the nsa doesn't even bother hooking into apis or databases or w/e. they just get a feed of the unencrypted messages and do all the parsing and indexing themselves

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i mix tabs and spaces

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
vim

qntm
Jun 17, 2009
indent using semicolons

you know it makes sense

MononcQc
May 29, 2007

qntm posted:

indent using semicolons

you know it makes sense

use vim, show tabs as semicolons: :set listchars=tab:;;

code:
f() ->
;;;;this,
;;;;;;;;is,
;;;;tabs,
;;;;;;;;with a
;;;;few
;;;;;;;;  spaces.
:getin:

(use :set listchars=trail:; to do it with spaces)

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

MononcQc posted:

use vim, show tabs as semicolons: :set listchars=tab:;;

code:
f() ->
;;;;this,
;;;;;;;;is,
;;;;tabs,
;;;;;;;;with a
;;;;few
;;;;;;;;  spaces.
:getin:

(use :set listchars=trail:; to do it with spaces)

so is four semicolons one tab? (my vim-fu is old and weak)

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I'll be honest here

I don't get why people get so fussy about trailing whitespace what's up with that

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Symbolic Butt posted:

I'll be honest here

I don't get why people get so fussy about trailing whitespace what's up with that

i get irrationally angry about trailing whitespace, and all my editors are configured to strip it out when i save files

i care way too much about it; it's a crotchet :shrug:

MononcQc
May 29, 2007

prefect posted:

so is four semicolons one tab? (my vim-fu is old and weak)

It uses two characters: a leading one and a filling one. For example, if you use tab:»·, tabs will show up as »··· if you have tabwidth=4 tabs, and as »······· for tabwidth=8. In the case above I used ';' for both the leading and filling characters, so there's as many semi-colons as the tabwidth. In my own config, tabwidth=4.

gonadic io
Feb 16, 2011

>>=

Symbolic Butt posted:

I'll be honest here

I don't get why people get so fussy about trailing whitespace what's up with that

because it fucks up diffs, especially when somebody has an editor that strips it

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

AlsoD posted:

because it fucks up diffs, especially when somebody has an editor that strips it

who cares, its obvious if that's the only change on a specific line

Cybernetic Vermin
Apr 18, 2005

Symbolic Butt posted:

I don't get why people get so fussy about trailing whitespace what's up with that

the entire reason why this is somehow a subforum is because computer people are fussy about all kinds of silly poo poo

weird
Jun 4, 2012

by zen death robot
why is trailing whitespace bad? hmm, why does every editor have a shortcut to go to the end of a line?? C-e or $ not jumping me to where I think it will ruins my edits per minute

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

back when ebay was the new thing i wanted to make video games like my hero jeff vogel and for some reason i thought you literally couldnt program anything better than qbasic games without buying a c compiler. so i bought what i thought was a c compiler on ebay for cheap and it ended up being a collection of delphi code snippets

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

MeramJert posted:

back when ebay was the new thing i wanted to make video games like my hero jeff vogel and for some reason i thought you literally couldnt program anything better than qbasic games without buying a c compiler. so i bought what i thought was a c compiler on ebay for cheap and it ended up being a collection of delphi code snippets

the manufacturing support people here have been doing horrible things with vb6 for almost 20 years and the engineering department has to send an swe in every so often to unfuck their programs. it would be way easier if they'd standardized on delphi or turbopascal imo

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i think that cd is still somewhere at my dad's house

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

also my dad was forced to teach a high school class in vb6 because he had taken a single class in basic in the early 80s and the programming teacher quit. i read ahead in the textbook and taught the material to my dad a few weeks in advance of him teaching it to his class, but now i remember literally nothing about vb6. i assume it's real bad though

salisbury shake
Dec 27, 2011

Zombywuf posted:

Pretty sure the NSA are paying for it. Remember that they have DoD level budgets and need to convince corporations to do stuff, giant truckloads of cash is the easiest way.

lol. court orders bitch

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
anybody know what the aspect ratio of goatse is btw? it looks like i'll have about 3.5k of flash to spare and at one bit per pixel on a 128x64 screen i can put three easter egg images in

Zombywuf
Mar 29, 2008

salisbury shake posted:

lol. court orders bitch

Court orders get messy, easier just to throw money at it.

Socracheese
Oct 20, 2008

i got taught vb6 in high school and i used it to make a fake windows xp login screen and stole all the teachers' passwords :cool:

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Socracheese posted:

i got taught vb6 in high school and i used it to make a fake windows xp login screen and stole all the teachers' passwords :cool:

Nice!

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Zombywuf posted:

Court orders get messy, easier just to throw money at it.

the nsa has a special court that will rubber-stamp anything they want

Cybernetic Vermin
Apr 18, 2005

MeramJert posted:

also my dad was forced to teach a high school class in vb6 because he had taken a single class in basic in the early 80s and the programming teacher quit. i read ahead in the textbook and taught the material to my dad a few weeks in advance of him teaching it to his class, but now i remember literally nothing about vb6. i assume it's real bad though

eh, vb6 catches a rather ridiculous amount of flak it feels like. it is absolute trash as a high-level language, but if you wanted to quickly knock out terrible lob apps that more or less worked on no budget it was pretty unbeatable.

really a sure sign that microsoft forgot all that made them successful when they killed vb, token updates for the next 50 years would have meant guaranteed money and more happiness for many for 50 years

Qwijib0
Apr 10, 2007

Who needs on-field skills when you can dance like this?

Fun Shoe

Socracheese posted:

i got taught vb6 in high school and i used it to make a fake windows xp login screen and stole all the teachers' passwords :cool:

same but novell.

Zombywuf
Mar 29, 2008

prefect posted:

the nsa has a special court that will rubber-stamp anything they want

Google, Microsoft and a bunch of other people are suing them because of it.

Adbot
ADBOT LOVES YOU

cowboy beepboop
Feb 24, 2001

Cybernetic Vermin posted:

eh, vb6 catches a rather ridiculous amount of flak it feels like. it is absolute trash as a high-level language, but if you wanted to quickly knock out terrible lob apps that more or less worked on no budget it was pretty unbeatable.

really a sure sign that microsoft forgot all that made them successful when they killed vb, token updates for the next 50 years would have meant guaranteed money and more happiness for many for 50 years

i don't think vb is inherently easier than c# though you can knock out a lovely LOB app in either in 2 seconds

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