|
lol I just took a report that used to run 40+ minutes down to ~2mins I made the original report i made the optimized report I am a bad programmer not really, mgmt just didnt point me towards spending time optimizing
|
# ? Jun 23, 2015 23:59 |
|
|
# ? May 13, 2024 08:41 |
|
KoRMaK posted:lol I just took a report that used to run 40+ minutes down to ~2mins what technology? what was the problem?
|
# ? Jun 24, 2015 00:09 |
|
Malcolm XML posted:c# has operator overloading homeboy gross
|
# ? Jun 24, 2015 00:15 |
|
i cant think of a reason to use operator overloading unless i was making a maths library or something
|
# ? Jun 24, 2015 00:21 |
|
functors, smart pointers, int-vs-float math, drop-in checked arrays
|
# ? Jun 24, 2015 01:08 |
|
beyond the obvious things theyre already used for
|
# ? Jun 24, 2015 01:17 |
|
optional typing in a dynamically typed language for reasons beyond performance is an absurdity and the product of a deviant mind
|
# ? Jun 24, 2015 01:30 |
|
yes, and tests that are not there to seed the JIT into being fast earlier are also useless obviously.
|
# ? Jun 24, 2015 01:34 |
|
comedyblissoption posted:optional typing in a dynamically typed language for reasons beyond performance is an absurdity and the product of a deviant mind type specialization is good enough these days that you don't use typing for speed in most cases. you use it to tell the compiler and runtime that there are some invariants that you're going to depend on and could it please scream if they're violated. you have to be fast on untyped code anyway, after all. (and in fact optional typing can make it harder to be fast, because you have to check types more eagerly than you might with a strong JIT.) Awia posted:beyond the obvious things theyre already used for smart pointers weren't a trivially obvious application, IMO, but if you want something nobody has thought of then I'm going to have trouble coming up with one
|
# ? Jun 24, 2015 01:51 |
|
what token should i use for my very quick and lovely bespoke html templating thing for crystal
|
# ? Jun 24, 2015 02:15 |
|
Subjunctive posted:type specialization is good enough these days that you don't use typing for speed in most cases. you use it to tell the compiler and runtime that there are some invariants that you're going to depend on and could it please scream if they're violated.
|
# ? Jun 24, 2015 02:19 |
|
your point didn't sound like that at all, but lots of programming models have features that are more useful in some parts of a program than another. you don't write everything in assembly, but you might for the core loop. you would want to put a parser handling untrusted content in a sandbox, but probably not worth it for your command-line argument handling. I might choose to type my API boundaries but not inside (perhaps for better perf internally!), for example, just like I might write extensive docs for that API and not for the internals. or I might choose to use types in all of my code, but still employ others' libraries whose authors prefer untyped code. or just migrate gradually, as we've done with hack to substantial success.
|
# ? Jun 24, 2015 02:34 |
Awia posted:beyond the obvious things theyre already used for I mean writing a functor is a great example of operator overloading being useful to pretty much everyone (you want to overload operator()). Also writing a class which represents a grid of some sort (you want to overload operator[]). Also implementing an iterator (you want to overload operator++ and operator*, and maybe more depending on the type of iterator). Also implementing some type of custom math thing is not really *that* uncommon--I've did it earlier this year when I implemented a "data point with gaussian errors" class. Basically operator overloading rocks, and just because some people will abuse it doesn't mean it shouldn't exist in a language.
|
|
# ? Jun 24, 2015 02:50 |
|
VikingofRock posted:
wrong and wrong
|
# ? Jun 24, 2015 02:58 |
|
operator overloading means that user types can participate fully in the language semantics, alongside builtin types most code won't need it, but the code that needs it will really benefit from it (like volatile in C, perhaps)
|
# ? Jun 24, 2015 03:02 |
rrrrrrrrrrrt posted:wrong and wrong I mean people will abuse literally anything you put in a language. I'm pretty sure you could figure out a way to abuse brainfuck and that only has eight possible operations. Also, there's nothing stopping you from doing whatever you want in a function called add(), so why is doing whatever you want in a function called operator+() any different?
|
|
# ? Jun 24, 2015 04:04 |
|
comedyblissoption posted:my main point is that it's baffling to see the value in enforcing invariants but then forego them almost everywhere it happens because they only saw the value in enforcing invariants after they had already accumulated a codebase where they are foregone almost everywhere, and now they want to go back and patch things over rather than rewrite everything in a sane language
|
# ? Jun 24, 2015 04:36 |
|
what does multiplying an iterator do and why it that an obvious good case for operator overloading
|
# ? Jun 24, 2015 05:27 |
|
Bloody posted:what does multiplying an iterator do and why it that an obvious good case for operator overloading it's not multiplication, it's unary * for pointer dereference, because the iterator is like a pointer you see, because we're c programmers and all we know how to do is increment a pointer in a loop to traverse an array
|
# ? Jun 24, 2015 05:29 |
|
lol
|
# ? Jun 24, 2015 05:30 |
I'm pretty sure an iterator is literally worthless if you can't dereference it (or use operator-> or whatever).
|
|
# ? Jun 24, 2015 05:47 |
|
http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html literally worthless
|
# ? Jun 24, 2015 06:08 |
|
lol also overloading the dereference operator for a reference type..that's hosed up dude
|
# ? Jun 24, 2015 06:24 |
|
operators are basically good. they make code more readable when used correctly. overloading operators when it makes sense like + for Points or Vectors or whatever is fine.
|
# ? Jun 24, 2015 06:26 |
|
Notorious b.s.d. posted:what jvm is that ? it's called "phoneme " and it was made by oracle themselves. or sun.. i forget how that works
|
# ? Jun 24, 2015 07:21 |
JewKiller 3000 posted:http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html literally worthless Isn't next() is doing the same thing as dereferencing it?
|
|
# ? Jun 24, 2015 07:32 |
|
Janitor Prime posted:Why does everyone forget Perl it's much better than bash
|
# ? Jun 24, 2015 07:33 |
|
Janitor Prime posted:Why does everyone forget Perl it's much better than bash "it's better than bash" is not a high bar
|
# ? Jun 24, 2015 07:53 |
|
Arcsech posted:"it's better than bash" is not a high bar well yeah but my point is that why would you ever choose bash, even poo poo old *nix have perl
|
# ? Jun 24, 2015 08:16 |
|
Janitor Prime posted:well yeah but my point is that why would you ever choose bash, even poo poo old *nix have perl why would you ever choose perl
|
# ? Jun 24, 2015 08:19 |
|
horse mans posted:why would you ever choose perl because it's a practical language for extraction and reporting
|
# ? Jun 24, 2015 09:35 |
|
c terrible mathematician s: doing a stock prediction thing for interview homework either the market they've picked these (anonymous) stocks from is very efficient or i am not very good at ML
|
# ? Jun 24, 2015 09:44 |
|
VikingofRock posted:Are there any plotting libraries as good as matplotlib in languages besides Python? ggplot2 is a great R plotting library
|
# ? Jun 24, 2015 12:44 |
|
rrrrrrrrrrrt posted:what technology? The main loop was n^3 or whatever (a loop, inside a loop, inside a loop) I decided to flatten it by indexing and caching all the relevant data that was cuasing the second and third loop and just refer to that index. I was instantiaing objects too many times
|
# ? Jun 24, 2015 14:02 |
|
JewKiller 3000 posted:it happens because they only saw the value in enforcing invariants after they had already accumulated a codebase where they are foregone almost everywhere, and now they want to go back and patch things over rather than rewrite everything in a sane language optional typing makes a lot of sense for existing codebases
|
# ? Jun 24, 2015 14:08 |
|
horse mans posted:why would you ever choose perl serious question what's wrong with perl all of a sudden
|
# ? Jun 24, 2015 14:56 |
|
abigserve posted:serious question what's wrong with perl all of a sudden Apart from the fact that it's executable line noise, because counter-argument, Haskell's infix operators.
|
# ? Jun 24, 2015 15:55 |
|
abigserve posted:serious question what's wrong with perl all of a sudden it has a bad reputation. the main spots you'd go for perl knowledge are old as gently caress - design wise + if you aren't paying attention you're going to get advice from 15 years ago where people seemed to tolerate horseshit. perl is good at certain things and has been bludgeoned into other roles like any other plang. idk CPAN is at least sane to use.
|
# ? Jun 24, 2015 16:02 |
|
darthbob88 posted:Apart from the fact that it's executable line noise, because counter-argument, Haskell's infix operators. lol, lens defense incoming!!
|
# ? Jun 24, 2015 16:06 |
|
|
# ? May 13, 2024 08:41 |
|
abigserve posted:serious question what's wrong with perl all of a sudden lots of things, but it still makes a fine glue lang so who cares. just don't write your application in it.
|
# ? Jun 24, 2015 16:11 |