|
Zamujasa posted:I might be misreading this, but it looks like an infinite recursion, since if you give it a value of "EXAMPLE" it will try to return the result of IsNullOrEmpty("EXAMPLE".Trim()) (essentially, the same function call), which will call itself again and so on and so forth. Nah. Hibame said this was in a custom StringUtil class, so the stack will just go StringUtil.IsNullOrEmpty("EXAMPLE") -> String.IsNullOrEmpty("EXAMPLE".Trim()).
|
# ¿ Sep 11, 2012 21:17 |
|
|
# ¿ Apr 28, 2024 19:47 |
|
rjmccall posted:I agree that it's wrong enough that nobody mistakes it for correct English meaning something else. It's Indian English. quote:July 12, 2006
|
# ¿ May 15, 2013 14:23 |
|
npe posted:Maybe e-discovery is a horrors thread unto itself, though. It is. At the intersection of the "Coding Horrors" and the "Started off Barrister, Ended Up Barista" threads.
|
# ¿ Nov 21, 2013 02:05 |
|
Jonah Hex posted:Saw this and shook my head. Can you spot the problem(s)? Most critically, time / freq is done in an integer context, isn't it? - http://stackoverflow.com/questions/6517435/dividing-unsigned-long-long Also, I can figure out how many milliseconds there are in a second without that define, but if you must. And you should probably multiply before dividing if you're gonna do that. ulmont fucked around with this message at 20:47 on May 27, 2014 |
# ¿ May 27, 2014 20:44 |
|
Thermopyle posted:What's that about? Wikipedia claims it's more because those templates are used so frequently that even temporary vandalism would be catastrophic: http://en.m.wikipedia.org/wiki/Wikipedia:High-risk_templates
|
# ¿ Jul 27, 2014 02:40 |
|
Skuto posted:That's the sane behavior...which JS can never ever get. Is there any real reason to support octal literals (as opposed to math functions that handle arbitrary bases) anymore? I know they look neat for some bit twiddling, but hex is always there for that as well.
|
# ¿ Aug 8, 2014 12:44 |
|
Zorro KingOfEngland posted:Comments are mine. One exception shows up in the log 6 times, in slightly different forms. I was trying to speed up a server of mobile phone (at the time, mostly WAP) applications in the early 2000s. I discovered, at one point, that through logging of this sort one single WAP request would generate around 10MB of debugging information...
|
# ¿ Sep 9, 2014 19:19 |
|
het posted:I used SOS but I thought it was just a third party VSS client (don't get me wrong, VSS is definitely awful) I think there are multiple SOS source controls. This one appears designed for hardware development: http://www.cliosoft.com/news/stortek/snug00.htm (and looks like that may be the 2000-era UI): http://www.cliosoft.com/products.php http://www.semiwiki.com/forum/content/2011-brief-history-cliosoft.html SourceOffSite from Sourcegear, on the other hand, I think is just VSS: https://sourcegear.com/sos/
|
# ¿ Oct 23, 2014 15:08 |
|
Less Fat Luke posted:Can you elaborate on that a bit? I'm familiar with both and I'm used to having applications in the Ruby world that generally load an application and fork a bunch of worker processes (because LOL at Ruby threading) but I'm not sure what it means to fork() without exec(). quote:The environment in the child process is harsh and makes it difficult to write correct code to run there. Anything you do beyond a direct call to an exec function has to be done with great care. That's why the error handling code is written the way it is. quote:In my opinion there are so many problems with fork(2) in multi-threaded programs that it's almost impossible to do it right. The only clear case is to call execve(2) in the child process just after fork(2). If you want to do something more, just do it some other way, really. From my experience it's not worth trying to make the fork(2) call save, even with pthread_atfork().
|
# ¿ Feb 6, 2015 15:12 |
|
Karate Bastard posted:On the other hand object oriented programming is an expensive disaster which must end. Did I get that link from here btw? Probably - I've seen that link in this thread before.
|
# ¿ Mar 22, 2015 23:39 |
|
LeftistMuslimObama posted:In boonie parts of the US people don't have house numbers. Instead they have coordinates. I used to live at "Rt. 4, Box 352", which was just stop number 352 on the mail carrier's route number 4. E-911 mostly killed off route numbers though.
|
# ¿ Apr 17, 2015 16:43 |
|
KernelSlanders posted:Not to go all Schmiegel on you, but... it hurts us... Sméagol.
|
# ¿ Aug 20, 2015 04:21 |
|
Bongo Bill posted:This story is unfamiliar to me. Charles Babbage posted:"On two occasions I have been asked [by members of Parliament!], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."
|
# ¿ Nov 21, 2015 21:23 |
|
pokeyman posted:I must be missing the part of this trademark that covers a dozen lines of JavaScript to poorly pad strings: Without getting into excruciatingly boring detail: 1) Trademark infringement is based on comparing a number of factors to determine if consumers will confuse two marks. Having the same name for two software products from different sources could very likely be confusing. 2) Case law says that a trademark owner does not actually have to defend their trademark against all potential infringers, although there is a risk that a) their trademark may become a generic term and then be unprotectable (most famously aspirin, although there are other examples) or b) the owner may after enough time be unable to eventually enforce their rights against a particular person. Disclaimer: the above is generic information from a US perspective.
|
# ¿ Mar 24, 2016 02:03 |
|
Zemyla posted:Threads are terrible, and the only thing worse is not having them and having to fake them. Back when I was doing DOS programming, there were lots of C libraries where cooperative multithreading was faked with setjmp/longjmp. Every one of them had their own unique... well, "quirks" was the most charitable word for it. I had to write one of those libraries in college. As best I can recall we would have aspired to only have "quirks."
|
# ¿ May 6, 2016 13:48 |
|
VikingofRock posted:I hope everyone is contemplating gentians on this fine nonidi of 19 Thermidor 224! Wall calendar available now,* citoyen! https://www.etsy.com/shop/JacobinCalendar *Soon, after the reprint, anyway.
|
# ¿ Aug 6, 2016 19:10 |
|
Pretty sure both have been posted here before, but helpful links regarding floating point: 1) A long (16 part) series with more than you would ever want to know about floating point weirdnesses. https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ 2) What Every Computer Scientist Should Know About Floating-Point Arithmetic http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html 3) Simplified version of 2) http://floating-point-gui.de/
|
# ¿ Sep 14, 2016 14:56 |
|
xzzy posted:Decimal time. Let's try it again. What do you man, again? Today is Black Salsify day in the Foggy month of the 225th year!
|
# ¿ Oct 29, 2016 22:57 |
|
Asymmetrikon posted:I can't really figure out what exactly he means by Turing completeness, because nothing he writes about it bears any familiarity to what it actually is. What he's saying is that the python team is either incompetent or evil for not making a perfect 2-3 translator or better yet a way to run python 2 on the python 3 vm. Turing completeness is just short handing that it should have been possible.
|
# ¿ Nov 23, 2016 19:23 |
|
JewKiller 3000 posted:*puts a \0 in your "opaque" string* Works out if you're in the NT kernel, since it uses counted strings per the linked article.
|
# ¿ Nov 29, 2016 05:24 |
|
sarehu posted:That it'd be undefined behavior is a good thing, because the standard abs function is undefined on -INT_MIN too. Not for current Java or C# (admittedly true for gnu libc though). The former returns Integer.MIN_VALUE, while the latter throws an OverflowException. ...abs(double x) has even more special cases to include.
|
# ¿ Dec 2, 2016 22:47 |
|
Doc Hawkins posted:A chocolate and peanut butter joke, but the chocolate is fresh steaming poo poo and the peanut butter is an ancient coprolith.
|
# ¿ Dec 4, 2016 08:17 |
|
Suspicious Dish posted:of all the cool things to emulate about UNIX, why signals and its lovely process model It looked like the goal was to be able to just cross-compile (or w/e) an existing Linux distribution to run in a web browser, with all that entails.
|
# ¿ Dec 4, 2016 18:12 |
|
Suspicious Dish posted:i don't see a goal in there I think these are the same kind of people that run programs under Cygwin in Wine on a Linux box.
|
# ¿ Dec 4, 2016 19:04 |
|
xtal posted:Still don't get it For at least the Classical Latin period, "vici" would be pronounced as English now pronounces "wiki". So, someone will start the "vici" for RFC V̅MMMXLIX (8049, which is the next RFC number). E: one day I will remember to refresh a thread before responding. ulmont fucked around with this message at 18:59 on Jan 3, 2017 |
# ¿ Jan 3, 2017 18:57 |
|
Absurd Alhazred posted:
Does the "auto error" inside the if lose scope at the end of the if block, leaving you with the previous error that we already know is bad?
|
# ¿ Mar 29, 2017 01:44 |
|
canis minor posted:But it's a string, it's not timestamp, since my confusion. It's a timestamp or it would be shown as '10:00:00. One way to concatenate is as noted to format the time: =CONCATENATE("Time is ", TEXT(L2, "hh:mm:ss"), " WOW") See also http://stackoverflow.com/questions/220672/convert-time-fields-to-strings-in-excel
|
# ¿ Mar 29, 2017 17:08 |
|
QuarkJets posted:Is this just a really bad joke or do you live in some weird country that actually uses a base-10 system of time? Revolutionary France isn't weird, just dead. http://mentalfloss.com/article/32127/decimal-time-how-french-made-10-hour-day The calendar lives on, though. https://www.frenchrepublicanwallcalendar.com/
|
# ¿ Mar 29, 2017 22:35 |
|
Jethro posted:The magic has to stop somewhere, and a function that depends on you knowing what string means is as good a place as any and probably better than most. This is almost exactly (date versus time) the scenario Excel uses in its example of the TEXT function. https://support.office.com/en-us/article/TEXT-function-20d5ac4d-7b94-49fd-bb38-93d29371225c
|
# ¿ Mar 29, 2017 22:44 |
|
NtotheTC posted:I know it's a Joel on Software story but I was always fascinated by the lengths Microsoft went to for backwards compatibility Raymond Chen did a lot of work on this. Here's another story: quote:There was a popular MS-DOS game from 1994 that didn't run in Windows 95. After some investigation, the conclusion was that the game didn't work if your computer had more than 16MB of memory (physical, if running under MS-DOS; virtual, if running under Windows). The 16MB limit comes into play because the game was written for the 80286 processor, and that processor supports a maximum of 16MB of RAM. I guess that when the game found more than 16MB of memory, it didn't know what to do with the extra memory; maybe it overflowed a buffer, or a calculation overflowed. Whatever. Doesn't matter. Another one here for Speed Racer in the Challenge of Racer X: https://blogs.msdn.microsoft.com/oldnewthing/20160404-00/?p=93261 ulmont fucked around with this message at 18:45 on May 3, 2017 |
# ¿ May 3, 2017 18:42 |
|
Jabor posted:Java has a similar debate around import statements. In Java, you can import a single class: In Java specifically, Java version 1.2 was the first wildcard apocalypse. There was already a java.awt.List, so anything that did the below might compile under Java 1.0 or 1.1, but broke under 1.2. code:
|
# ¿ Jun 1, 2017 16:35 |
|
Munkeymon posted:Which presumably only became an issue because there were no generic lists, right? When did Java get those, again? Java got generic (in the sense of generally useable, not in the sense of just a collections API) lists in Java 1.2, but the actual templating feature came later. edit: and the templating feature is basically syntactic sugar for casting from Object on the way out of the collection. ulmont fucked around with this message at 17:34 on Jun 1, 2017 |
# ¿ Jun 1, 2017 17:31 |
|
Munkeymon posted:Oh well derp I assumed AWT had its own local-types-specific List implementation for some reason. I think some .Net modules did that back in the dark, dark pre-generics days (but without name conflicts), so maybe that's why I jumped to that conclusion. Ah, no. Here's two java.awt.Lists:
|
# ¿ Jun 1, 2017 18:27 |
|
CPColin posted:(Now that the behavior is defined, it's documented, right?) ...the behavior is still not defined - the ordering can be anything.
|
# ¿ Jul 7, 2017 06:06 |
|
TooMuchAbstraction posted:I've been arguing for this position for awhile. Nobody ever agreed with me before. I agreed with you without ever having the conversation, and I think China did as well.
|
# ¿ Aug 20, 2017 04:59 |
|
eth0.n posted:Isn't It depends on your language. In C# and Java (and presumably most non-C languages) that is specified. In C it is undefined. http://c-faq.com/expr/ieqiplusplus.html
|
# ¿ Sep 7, 2017 22:20 |
|
Munkeymon posted:Can't remember where I read it but javac is supposedly a lovely, low-effort compiler and the JIT is doing the real work and emitting very different JVM instructions. This is deliberate - compile-time optimization gets in the way of JIT-time optimization. https://stackoverflow.com/questions/13611829/why-javac-does-not-optimize-even-simple-code https://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/
|
# ¿ Nov 7, 2017 21:41 |
|
Pollyanna posted:I still don’t understand how 64-bit is somehow different between Javascript and anywhere else. quote:JavaScript Numbers are Always 64-bit Floating Point Unlike, say, .NET, where a long integer is a signed 64-bit integer, and not a floating point value. quote:long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Signed 64-bit integer
|
# ¿ Dec 12, 2017 21:42 |
|
eth0.n posted:Besides, the C++ naming is better because it describes them functionally, not by how they're implemented (so what if the specs all but demand certain implementation details). Java describes functionality in the Interfaces: Collection (any order, may contain duplicates), Set (any order, no duplicates), List (ordered, generally allows duplicates), Queue (basically a list with more access options), Deque (double-ended Queue), Map, SortedSet (ordered set), SortedMap (map ordered by key), and some even more esoteric funcationality. The implementation details are described in the implementations: HashSet, TreeSet, LinkedHashSet, ArrayList, ArrayDeque, LinkedList, HashMap, TreeMap, etc.
|
# ¿ Mar 1, 2018 19:26 |
|
|
# ¿ Apr 28, 2024 19:47 |
|
hailthefish posted:If anything, Java's the weird one for not having it. Java had it during development, but then took it out before release. quote:2.2.6 No More Goto Statements
|
# ¿ Mar 26, 2018 17:10 |