|
HFX posted:Just that many languages such as C / Java are utterly terrible about making you constantly declare a rather low level when it would be better off to give you something high level and then have a low level if you need it. maybe you don't 'get' languages that are meant for performance.
|
# ? Oct 5, 2009 08:14 |
|
|
# ? Jun 6, 2024 06:31 |
|
floWenoL posted:maybe you don't 'get' languages that are meant for performance. Java is meant for performance? ho ho
|
# ? Oct 5, 2009 08:37 |
|
floWenoL posted:maybe you don't 'get' languages that are meant for performance. Yeah you are probably right. Wouldn't know anything about performance at all or when and where to use it.
|
# ? Oct 5, 2009 08:42 |
|
HFX posted:I write for my needs. Often times, this does mean using C, C++, Java. However, I've also realized how much time I waste coding for them. This is especially true when you realize that static type inferring functional languages are often more then fast enough without making you think about the small details when they aren't necessary. Function Programmers posted:Yeah it's easy to implement this, I just declare a simple monoidal transform using arrow notaion using the fixed point combinator. Glad I don't have to do anything complicated like declare an int.
|
# ? Oct 5, 2009 10:53 |
|
Mikey-San posted:Java is meant for performance? I would say Java nowadays has a very good trade-off between being semi-interpreted, virtual machine language and being fast. Doing OOP is a lot easier and friendlier in Java, but if you are really worried about speed, then you can always write parts of your project in native code and still use it from Java. I guess that is true of most language, however.
|
# ? Oct 5, 2009 18:31 |
|
Lonely Wolf posted:Well I hope this thread has taught you that it's far cheaper and far more effective to simply hire worse programmers. We did have a guy overloading different Collections classes so he could rename the access methods, so there's that. CollectionSubtype.count_mine() is clearly superior I think the real moral of the story is that you should buy your IL obfuscater from the same place you get your prebuilt UI widgets because saving a few hundred bucks is totally worth days of programmer time per release and you know those guys know their IL obfuscation because that ribbon widget is totally shiny as gently caress.
|
# ? Oct 5, 2009 20:19 |
|
RussianManiac posted:I would say Java nowadays has a very good trade-off between being semi-interpreted, virtual machine language and being fast. http://www.ibm.com/developerworks/java/library/j-jtp09275.html http://www.theregister.co.uk/2008/05/22/java_performance_myths/ etc, etc
|
# ? Oct 5, 2009 21:29 |
|
Inverse Icarus posted:http://www.ibm.com/developerworks/java/library/j-jtp09275.html Today I learned the concept of defensive copying. In hindsight it's totally obvious, and I've even thought that doing stuff like Point getPoint(){ return this.point; } is kind of dangerous, but it never occurred to me that I could do a return new Point(this.Point);. Also, I never thought that I should also make a copy of the object passed to my constructor for the same reason. I'm a coding horror
|
# ? Oct 6, 2009 08:09 |
|
Wheany posted:Today I learned the concept of defensive copying. In hindsight it's totally obvious, and I've even thought that doing stuff like Point getPoint(){ return this.point; } is kind of dangerous, but it never occurred to me that I could do a return new Point(this.Point);. Also, I never thought that I should also make a copy of the object passed to my constructor for the same reason. I would say that this is why a language needs user-defined value types.
|
# ? Oct 6, 2009 09:49 |
|
Janin posted:It doesn't even exist in the real Jargon File, just the bizarro ESR version. Hey, you might call the Jargon File bogus, but ESR made it accessible to Aunt Tillie.
|
# ? Oct 6, 2009 11:48 |
|
Vexed Morgan posted:Hey, you might call the Jargon File bogus, but ESR made it accessible to Aunt Tillie. Thanks to the appendices, I learned that I'm likely to be politically moderate to neo-conservative, and my love of "exotic beers" like Guinness is influenced by Linus Torvalds. Also, "anti-idiotarianism" is a very common term. Thanks ESR!
|
# ? Oct 6, 2009 12:24 |
|
http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html hakmen is the real hackers' file. esr's dictionary is best left to rot somewhere.
|
# ? Oct 6, 2009 12:24 |
|
code:
|
# ? Oct 6, 2009 12:49 |
|
tef posted:http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html hey, Oderint, dum metuant
|
# ? Oct 6, 2009 12:53 |
|
Vexed Morgan posted:hey, Oderint, dum metuant I'm not scared of 'bullets slathered in pork fat'.
|
# ? Oct 6, 2009 13:13 |
|
wrok posted:
So this is such a bad varation of the for-switch that once it matches either "mail", "facsimiletelephonenumber", or "telephonenumber" it's going to exit the loop. Unless the author meant to only initialize one of them, but then it would just be much easier to use if(_ptAttributeDic.Contains("X")) base._X = _ptAttributeDic["X"]; ...
|
# ? Oct 6, 2009 14:37 |
|
code:
|
# ? Oct 6, 2009 14:54 |
|
chocojosh posted:
|
# ? Oct 6, 2009 16:28 |
|
Jethro posted:The break; in this example only exits the switch statement; it doesn't exit the loop. The one "benefit" to this particular foreach-case is that it replaces checking for the existence of each key, but then of course it does so at the cost of looping through each key of the dictionary. I suppose if the dictionary in question was only going to contain at most the three keys used here it might even count as a clever trick, but other than that it's a pretty standard example of the for-case paradigm. I think the reason for the whole for-switch business is so they can search the keys in a case-insensitive fashion.
|
# ? Oct 6, 2009 20:03 |
|
chocojosh posted:So this is such a bad varation of the for-switch that once it matches either "mail", "facsimiletelephonenumber", or "telephonenumber" it's going to exit the loop. I love it when coding horrors spawn even more coding horrors, like this sentence.
|
# ? Oct 6, 2009 20:27 |
|
Marmaduke posted:I think the reason for the whole for-switch business is so they can search the keys in a case-insensitive fashion. A sane person would write a different comparator for the map.
|
# ? Oct 6, 2009 22:01 |
|
Oh chocojosh, never stop posting.
|
# ? Oct 6, 2009 22:54 |
|
chocojosh posted:So this is such a bad varation of the for-switch that once it matches either "mail", "facsimiletelephonenumber", or "telephonenumber" it's going to exit the loop. Serious question, have you ever used C, C++, C#, or Java?
|
# ? Oct 7, 2009 04:15 |
|
Scaevolus posted:Serious question, have you ever used C, C++, C#, or Java? Can't switch on strings in Java (unless it gets added to Project Coin and by extension Java7) so it wasn't Java
|
# ? Oct 7, 2009 04:21 |
|
So I was dicking around on Wikipedia when I noticed that the source code of the article on Abraham Lincoln had the following line in its source:code:
code:
edited to not break tables, the original has no linebreaks vvvv is that the regex for matching all valid e-mail addresses? Opinion Haver fucked around with this message at 04:39 on Oct 7, 2009 |
# ? Oct 7, 2009 04:30 |
|
yaoi prophet posted:oh god my eyes (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
|
# ? Oct 7, 2009 04:36 |
|
yaoi prophet posted:vvvv is that the regex for matching all valid e-mail addresses? Ding ding ding.
|
# ? Oct 7, 2009 04:52 |
|
Zakalwe posted:Ding ding ding. Why is it so much shorter than Mail::RFC822::Address?
|
# ? Oct 7, 2009 04:55 |
|
Janin posted:Why is it so much shorter than Mail::RFC822::Address?
|
# ? Oct 7, 2009 04:59 |
|
Janin posted:Why is it so much shorter than Mail::RFC822::Address? Different RFC. I posted RFC2822
|
# ? Oct 7, 2009 04:59 |
|
Scaevolus posted:Because normal people don't care about adhering to RFC822. Well if you don't care about adhering to the standard, here's an even shorter regex: .*@.*
|
# ? Oct 7, 2009 05:00 |
|
Janin posted:Well if you don't care about adhering to the standard, here's an even shorter regex:
|
# ? Oct 7, 2009 05:02 |
|
how exactly do comments inside email addresses work?
|
# ? Oct 7, 2009 05:16 |
|
Scaevolus posted:Serious question, have you ever used C, C++, C#, or Java? I'm a .NET developer working on WPF, WCF, and Windows Mobile. I had a brain fart about how break works. Other stuff was on my mind.
|
# ? Oct 7, 2009 05:53 |
|
RussianManiac posted:how exactly do comments inside email addresses work? They're used to add additional human-readable text to an email address. For example, you might have the following addresses: John Smith <jsmith@work.com> (Work) John Smith <shscgoon420@aol.com> (Home) In which the "(Work)" and "(Home)" segments are comments.
|
# ? Oct 7, 2009 06:05 |
|
chocojosh posted:I had a brain fart about how break works. Other stuff was on my mind. Sorry about your girlfriend, mang.
|
# ? Oct 7, 2009 06:34 |
|
Shavnir posted:Can't switch on strings in Java (unless it gets added to Project Coin and by extension Java7) so it wasn't Java Hint: he wasn't talking about chocojosh familiarity with switch statements.
|
# ? Oct 7, 2009 10:32 |
|
RFC 822 compliance is pointless anyway since there's a sizeable amount of e-mail servers that can't deal with perfect compliance anyways. Being technically correct in this case leads to more problems than it solves. The best check of e-mail correctness (beyond checking if it looks vaguely like an e-mail address) is to see if it bounces the first time you actually have to send an e-mail to that person.
|
# ? Oct 7, 2009 15:38 |
|
enki42 posted:RFC 822 compliance is pointless anyway since there's a sizeable amount of e-mail servers that can't deal with perfect compliance anyways. Being technically correct in this case leads to more problems than it solves. The best check of e-mail correctness (beyond checking if it looks vaguely like an e-mail address) is to see if it bounces the first time you actually have to send an e-mail to that person. *sets up accidental spam relay*
|
# ? Oct 7, 2009 16:14 |
|
|
# ? Jun 6, 2024 06:31 |
|
Zombywuf posted:*sets up accidental spam relay* Yeah maaaan if you're going to be helping spammers out, the least you could do is validate their email address list for RFC compliance for them first.
|
# ? Oct 8, 2009 02:56 |