|
Shaggar posted:this is just as bad as it sounds with unknown changes getting shoved into your build left and right to the point where you have no idea where anything came from. what happens when you uninstall a package? who knows. it might clean up the project changes it made, it might not. even if it does, its guaranteed to break if you made any customizations to the build yourself. this is how windows works when you install programs so it makes sense
|
# ? Jul 27, 2015 12:42 |
|
|
# ? Jun 1, 2024 08:02 |
|
Soricidus posted:wow nested classes in java are horrible
|
# ? Jul 27, 2015 15:55 |
|
im gonna make my own maven for .net. gonna name it yosnet
|
# ? Jul 27, 2015 16:18 |
|
Bloody posted:im gonna make my own maven for .net. gonna name it yosnet i'll start the wiki
|
# ? Jul 27, 2015 16:22 |
|
Pie Colony posted:nested classes in java are horrible details
|
# ? Jul 27, 2015 16:24 |
|
They're alright. Actually, they have their uses. For instance, I like to implement callback interfaces as nested classes so that I don't have implementation detail callbacks hanging out of my class like some uncouth ingrate. Static nested classes don't inherit their parents' type variables, which is a bit annoying but whatever (I'm sure there's a good reason for it -- not being sarcastic here). They're nice for defining Builders and things like that. Anonymous nested classes are gross but those are mostly obsoleted by JDK8 lambdas.
|
# ? Jul 27, 2015 16:46 |
|
Plorkyeran posted:"as good as ant" generally isn't considered a compliment it was 2003, dude maven was brand new and untested. ant was the state of the art at the time. it was scads better than writing Makefiles
|
# ? Jul 27, 2015 17:02 |
|
Bloody posted:im gonna make my own maven for .net. gonna name it yosnet you should hang out with the nant guy and swap war stories about being ignored by the industry
|
# ? Jul 27, 2015 17:02 |
|
Mr Dog posted:Static nested classes don't inherit their parents' type variables, which is a bit annoying but whatever (I'm sure there's a good reason for it -- not being sarcastic here). e: gently caress, my eye skipped over the word "type" there. sorry bout that. yeah, that part has made me kind of annoyed for a few minutes once or twice but it's probably related to the fact that they're independent of the parent class there is literally nothing wrong with nested classes, other than that the definitions can get messy and confusing if they're non-trivial. but if you have a non-trivial class then it probably makes sense to put it in its own file anyway. if you have multiple non-trivial classes that are so tightly coupled that it's difficult to separate them at all, then you have bigger problems than java syntax. Soricidus fucked around with this message at 19:24 on Jul 27, 2015 |
# ? Jul 27, 2015 19:22 |
|
hepatizon posted:details nested classes are statically bound and not part of the instance of the enclosing object. essentially this will lead to a bunch of fun problems you discover a little too late. this is one example, similar situations arise when Outer actually starts to reference or instantiate Inners code:
code:
|
# ? Jul 27, 2015 22:52 |
|
Plorkyeran posted:msbuild as originally designed is actually kinda elegant: ideally the project file should contain nothing but a list of files associated with various tasks and some configuration settings for those tasks, with the tasks themselves defined in .net assemblies written in the .net language of your choice. unfortunately, the other 90% of msbuild is awful cancerous growths of functionality hacked in in the worst possible ways because for some reason they decided not to just tell people to write custom build tasks when they need some logic in their build system. the design was a failure from the start because its still task oriented instead of result oriented.
|
# ? Jul 27, 2015 22:53 |
|
Pie Colony posted:nested classes are statically bound and not part of the instance of the enclosing object. essentially this will lead to a bunch of fun problems you discover a little too late. this is one example, similar situations arise when Outer actually starts to reference or instantiate Inners Well that's what you get for using "Inner" twice.
|
# ? Jul 27, 2015 23:18 |
|
why the gently caress would you declare doubly-nested classes ever like if this is the least contrived situation in which you can cause nested classes to behave counterintuitively then that's a really weak argument
|
# ? Jul 27, 2015 23:28 |
|
hmm this toy program to demonstrate the problem is contrived and not practical?? the more standard example is code:
|
# ? Jul 27, 2015 23:36 |
|
bad code is bad
|
# ? Jul 27, 2015 23:43 |
|
here's an actual criticism of Java, or at least its stdlib: futures. Everybody knows standard Java futures are a little bare-bones: basically the only standard implementation of java.util.concurrent.Future<> in Java 1.5 or whatever is what you get back when you post a Runnable (closure) to an Executor (task pool). Then all you can do on that Future<> is block on it. Which is only marginally useful. I think the canonical case is kicking off a handful of network I/O operations in parallel and then waiting for them all to finish. Of course, Future<> is a rather simple interface that you can implement or extend yourself, so Guava (and other libs, AsyncHttpClient comes to mind) extended this interface into ListenableFuture<>. This lets you chain a future, e.g. code:
Java 8, instead, adds CompletableFuture. And this isn't an interface, it's a class with a bazillion methods taking various kinds of "function pointer" type interfaces. You can return a CompletableFuture<> from your API and your clients can attach another computation stage to it. but they can also supply a result as well which is goddamn loving retarded: this will broadcast that value to every other client that's currently listening or chaining on that future. Oh, and also, Future.get() throws the checked exception ExecutionException. So every loving use of Future has to catch CheckedException and then unpack what actually went wrong so you have some idiotic chain of instanceof if/elses. Whereas the correct way to do this would be something along the lines of code:
code:
Also maybe it wasn't possible to type-parameterize an exception specification back in the ancient days of Java 1.5 when Future<> was added idk.
|
# ? Jul 27, 2015 23:53 |
|
We used NAnt extensively at a previous job, it worked great.
|
# ? Jul 27, 2015 23:55 |
|
sarehu posted:We used NAnt extensively at a previous job, it worked great. too bad you were the only ones
|
# ? Jul 27, 2015 23:57 |
|
ant isn't good enough for anyone to make custom visual studio integration for. maven might be.
|
# ? Jul 27, 2015 23:58 |
|
Shaggar posted:the design was a failure from the start because its still task oriented instead of result oriented. i think the motivation there was for faster incremental builds when working in the ide, but of course in the time since tup and ninja have delivered the same benefits by just taking advantage of the fact that the dependency graph typically doesn't change between two incremental builds, and for the first few years of vs.net the ide couldn't really handle projects with enough files for it to matter anyway
|
# ? Jul 28, 2015 00:13 |
|
Mr Dog posted:Also maybe it wasn't possible to type-parameterize an exception specification back in the ancient days of Java 1.5 when Future<> was added idk. checked exceptions are part of the type signature, so just try two to see how bad this gets code:
but if that weren't enough, look at that InterruptedException. It's checked, so look how screwed I am if I use CheckedFuture<R, InterruptedException>, i have no idea whether the interruption was for my thread or not. if its for my thread, i might be able to retry, it might be a spurious wake, but if it's for the async execution it will always throw and I can't tell the difference. well, unless i compare stacks, which will be all sorts of misleading to logging don't take this as an apology for that trash through, because all this pain could be hidden behind the scenes with async/await
|
# ? Jul 28, 2015 01:28 |
|
checked exceptions are one of those things that sound really cool until you try using them
|
# ? Jul 28, 2015 01:45 |
|
they just feel like someone saw either/maybe/other type-based solutions for error handling and went "hmm... how can i make this loving terrible"
|
# ? Jul 28, 2015 01:47 |
|
Notorious b.s.d. posted:checked exceptions are one of those things that sound really cool until you try using them it'd be cool if the penalty for not handling was a compiler warning instead of error. the idiots will ignore the warning and it won't be any different from today, the pedants can handle them to shut up the compiler.
|
# ? Jul 28, 2015 01:48 |
|
I'm kinda warming up to Go (I liked Vala until I realized that its, or rather GLib's, approach to handling out-of-memory conditions was to fart really loudly and then immediately abort the entire process; GLib's code consistently assumes that memory allocations can never fail). But I know exactly what is going to happen to it: it will inevitably gain generics, just like every single other statically typed language that initially omitted generics because they overcomplicate things, and there will be a K-T event in its library ecosystem sediment, and god help any poor bastard who has to program something that has to interact with both sides of that K-T event. e: oh, apparently there is no way to recover from out-of-memory in Go either. cool. well, it has GC but no exceptions so that's hardly surprising I suppose. Sapozhnik fucked around with this message at 22:54 on Aug 3, 2015 |
# ? Aug 3, 2015 22:51 |
|
Mr Dog posted:I'm kinda warming up to Go (I liked Vala until I realized that its, or rather GLib's, approach to handling out-of-memory conditions was to fart really loudly and then immediately abort the entire process; GLib's code consistently assumes that memory allocations can never fail) what the hell were you doing to hit this boundary condition on your 32gb of ram dev server?
|
# ? Aug 3, 2015 23:10 |
|
ultramiraculous posted:what the hell were you doing to hit this boundary condition on your 32gb of ram dev server? it's a systems language because it requires all of the system's resources to work
|
# ? Aug 3, 2015 23:20 |
|
what does rust do when it runs out of memory?
|
# ? Aug 4, 2015 00:26 |
|
Soricidus posted:what does rust do when it runs out of memory? abort
|
# ? Aug 4, 2015 00:32 |
|
Mr Dog posted:I'm kinda warming up to Go (I liked Vala until I realized that its, or rather GLib's, approach to handling out-of-memory conditions was to fart really loudly and then immediately abort the entire process; GLib's code consistently assumes that memory allocations can never fail). But I know exactly what is going to happen to it: it will inevitably gain generics, just like every single other statically typed language that initially omitted generics because they overcomplicate things, and there will be a K-T event in its library ecosystem sediment, and god help any poor bastard who has to program something that has to interact with both sides of that K-T event. there's no way to recover from out of memory in the default settings for every single distribution of linux anyway, since overcommit means malloc will never fail, so your program will go happily on and then get brutally murdered by the oom killer
|
# ? Aug 4, 2015 00:41 |
|
trying to recover from fatally bad situations tends to amount to smearing poo poo all over yourself and a bunch of log files in almost all software on that theme i think the checked exceptions of java was a sort of correct idea, but in reality a vast number of exceptions shoukd never be checked since the software has no consistent world-view of what the failure means. even opening a configuration file resulting in a file not found exception is way out of the scope of the vast majority of all softwares purview, you have already left the operational parameters and pretty much anything the software does from there is lovely programmers lovely attempts at replicating the concept of a core dump in every log file that exists if you think you can deal with an out of memory error you really need to either be the operating system or be an application so deeply intertwined with it that you actually can start prodding around memory tables
|
# ? Aug 4, 2015 00:57 |
|
i mean, or you could release a bunch of cached data i guess also, swift-style checked exceptions are awesome, and c++ is rapidly moving in that direction (though taking the opposite tack with noexcept())
|
# ? Aug 4, 2015 01:06 |
|
Erlang also just goes "failed to allocate, gently caress this I'm out" if you don't allow it to use Swap or anything. For server-software (taking back the dig at Go), it's often a reasonable way to do things because most people build their poo poo to handle going offline on specific instances from time to time. That's how most people deploy anyway.
|
# ? Aug 4, 2015 01:11 |
|
hi here's a two hour talk on elevators, it's pretty good https://www.youtube.com/watch?v=rOzrJjdZDRQ
|
# ? Aug 4, 2015 02:25 |
|
tef posted:hi actually just said the same thing in the sec-fuckup thread
|
# ? Aug 4, 2015 03:15 |
|
Dessert Rose posted:i mean, or you could release a bunch of cached data i guess thanks, ive been hoping the bien-pensants in this thread would take a second to tear it to shreds abort on out-of-memory is really the only reasonable solution if you're not willing to go hardcore gently caress-you-this-is-systems and make allocation failure a checked error, which also (probably?) precludes any language features that do implicit allocation, and also fucks the optimizer
|
# ? Aug 4, 2015 03:37 |
|
MononcQc posted:Erlang also just goes "failed to allocate, gently caress this I'm out" if you don't allow it to use Swap or anything. For server-software (taking back the dig at Go), it's often a reasonable way to do things because most people build their poo poo to handle going offline on specific instances from time to time. That's how most people deploy anyway. Also, you know, the whole "linux makes it futile anyway" thing.
|
# ? Aug 4, 2015 03:38 |
|
Allocation failure is more likely the result of your program passing a garbage size to malloc anyway.
|
# ? Aug 4, 2015 06:24 |
|
tef posted:hi Holy poo poo, they really test their redundancies and safeties. Running at full speed overloaded into that pit buffer.
|
# ? Aug 4, 2015 08:34 |
|
|
# ? Jun 1, 2024 08:02 |
|
Cybernetic Vermin posted:trying to recover from fatally bad situations tends to amount to smearing poo poo all over yourself and a bunch of log files in almost all software drivers. drivers can't crash on oom, and this leads to interesting situations where sometimes handling oom requires allocating resources (e.g. for posting a notification somewhere), so you have to pessimistically pre-allocate all the resources you'll need in the worst case scenario lol jk, just leave the driver in an undefined state
|
# ? Aug 4, 2015 11:08 |