|
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
|
# ? Dec 9, 2013 03:08 |
|
|
# ? Jun 12, 2024 01:11 |
|
Nomnom Cookie posted:the semantics of java practically guarantee that anything … will be either broken or useless
|
# ? Dec 9, 2013 03:11 |
|
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 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
|
# ? Dec 9, 2013 03:46 |
|
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 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
|
# ? Dec 9, 2013 06:21 |
|
All the cool kids now work on C100k or C1000k. C10K is so 1990s 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
|
# ? Dec 9, 2013 13:41 |
|
Nomnom Cookie posted:yes, java.util.concurrent is a good thing, and you have Thread.interrupt() for sanely loving with threads look at a executors, look awaitTermination. this is the non-stupid stop
|
# ? Dec 9, 2013 15:50 |
|
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 |
# ? Dec 9, 2013 16:22 |
|
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.
|
# ? Dec 9, 2013 16:32 |
|
yeah why be that one weird uncle when you could be an inscrutable wizard see, the video is teaching people
|
# ? Dec 9, 2013 16:33 |
|
MononcQc posted:All the cool kids now work on C100k or C1000k. C10K is so 1990s 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?
|
# ? Dec 10, 2013 09:27 |
|
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
|
# ? Dec 10, 2013 11:17 |
|
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.
|
# ? Dec 11, 2013 14:38 |
|
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.
|
# ? Dec 11, 2013 14:40 |
|
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
|
# ? Dec 11, 2013 15:48 |
|
i mix tabs and spaces
|
# ? Dec 12, 2013 07:36 |
|
vim
|
# ? Dec 12, 2013 09:24 |
|
indent using semicolons you know it makes sense
|
# ? Dec 12, 2013 12:30 |
|
qntm posted:indent using semicolons use vim, show tabs as semicolons: :set listchars=tab:;; code:
(use :set listchars=trail:; to do it with spaces)
|
# ? Dec 12, 2013 13:52 |
|
MononcQc posted:use vim, show tabs as semicolons: :set listchars=tab:;; so is four semicolons one tab? (my vim-fu is old and weak)
|
# ? Dec 12, 2013 13:54 |
|
I'll be honest here I don't get why people get so fussy about trailing whitespace what's up with that
|
# ? Dec 12, 2013 13:55 |
|
Symbolic Butt posted:I'll be honest here 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
|
# ? Dec 12, 2013 13:56 |
|
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.
|
# ? Dec 12, 2013 13:58 |
|
Symbolic Butt posted:I'll be honest here because it fucks up diffs, especially when somebody has an editor that strips it
|
# ? Dec 12, 2013 13:59 |
|
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
|
# ? Dec 12, 2013 14:44 |
|
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
|
# ? Dec 12, 2013 14:51 |
|
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
|
# ? Dec 12, 2013 15:01 |
|
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
|
# ? Dec 12, 2013 15:08 |
|
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
|
# ? Dec 12, 2013 15:14 |
|
i think that cd is still somewhere at my dad's house
|
# ? Dec 12, 2013 15:17 |
|
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
|
# ? Dec 12, 2013 15:20 |
|
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
|
# ? Dec 12, 2013 15:20 |
|
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
|
# ? Dec 12, 2013 15:28 |
|
salisbury shake posted:lol. court orders bitch Court orders get messy, easier just to throw money at it.
|
# ? Dec 12, 2013 15:31 |
|
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
|
# ? Dec 12, 2013 15:34 |
|
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 Nice!
|
# ? Dec 12, 2013 15:38 |
|
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
|
# ? Dec 12, 2013 15:48 |
|
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
|
# ? Dec 12, 2013 15:49 |
|
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 same but novell.
|
# ? Dec 12, 2013 16:14 |
|
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.
|
# ? Dec 12, 2013 18:34 |
|
|
# ? Jun 12, 2024 01:11 |
|
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. i don't think vb is inherently easier than c# though you can knock out a lovely LOB app in either in 2 seconds
|
# ? Dec 12, 2013 21:11 |