If you guys want to see a horror show, look at Imgur today. It's upvote-everything-in-usersub-so-the-front-page-has-to-see-what-kind-of-crap-we-deal-with-day.
What's curious though is that most of it is face-related, which isn't really typical of usersub. Maybe it's because posters decided to be extra creepy today.
@NathanMerrill The only implicit conversions I can think of are stuff like the integer 3 being converted to float 3.0 upon addition with another float.
@quartata The integer and float types aren't just internal. I don't think it's possible to add a small float to a big int without losing precision (or rather, it errors, I think).
>>> 10**1000 + 0.1
Traceback (most recent call last):
File "<pyshell#171>", line 1, in <module>
10**1000 + 0.1
OverflowError: int too large to convert to float
@JustinTervay 3 + 0.3 is subtly different from 0.3 + 3, though they give the same result. I think that the former will call int.__add__ and the latter will call float.__add__, but it's also possible that the former calls float.__radd__ ("right add") and/or the latter calls int.__radd__.
I guess my question is "Does JS say "oh! were're adding two primitives, lets cast one of them before we add them", or does the add function take care of it?"
@LeakyNun I think I celebrated prematurely, as I've been grappling for a while on what I thought was a stack overflowing error but seems to be an arity error instead :/ Either way, the current parser is not equipped to tackle the challenge
@El'endiaStarman he's got a few other interesting ones (e.g. pathfinding and procedural terrain generation) but this one is the best I think (at least out of the ones I've seen)
the memory model was a bit trickier, I think it stores also an axial coordinate along with one of three values indicating the NE, E or SE edge of that hexagon
@JustinTervay I'm biased because I love ASM (I wrote several assemblers and even a book on learning it). But IMO ASM is really easy once you get over the first few obstacles. If you have a pretty good idea of how computers work in general, it should be no problem.
@mınxomaτ That's good to hear. I'm confident in ability to grasp the concepts of it but the lowest level I've gone is a semester with C, so it's still quite new to me
Executive summary
Given input representing two vectors and their respective "weights", produce output that also represents the weighted sum of those vectors.
Challenge
The input will consist of one or more lines of the following characters:
exactly one occurrence of the digit 0, which repres...
I'm working on a lengthy script, and so want to use the write-progress with the -secondsremaining parameter so whoever is running it knows an estimate of time remaining. I have the timespan from "now" to when the script started, and the percent complete, but I can't seem to brain in my head to translate those into how many seconds remain. Can anyone assist?
@FryAmTheEggman Only if said human had yottabyte/yoctosecond connection speeds, the newest quantum gaming supercomputer and very, very fast reflexes. Or, you know, a mouse.
I mean, suppose you have a cafeteria for those ~6500 employees (likely) ... food waste through a composting process will yield a good chunk of nitrogen without a lot of effort.
a(n---a(n)) is equivalent to a(n-a(n-1)) because it gets parsed as: a((n--)-a(n)). The n-- returns n, but later decreases the value of n by 1. Therefore, when it gets called again later it's the same as n-1.
@Optimizer Challenge idea: Draw random non-intersecting line path on blank image. In every step choose a random length from a to b and random angle from c to d respective to the last angle. Draw a black line with that length at that angle stemming from endpoint of last line (or origin if it is first). Exception is that if new line intersects with path, backtrack and retry with new randoms. Repeat until N segments are drawn.
> You can use enclosures, such as parentheses, to override the standard precedence order and force Windows PowerShell to evaluate the enclosed part of an expression before an unenclosed part.
In many instances, the parens can be a completely separate pipelined expression, and is usually treated as such.
That's my point, I don't think the parens will affect that. What you have is <expression>-<expression> and I don't think what you are reading applies to <expression>-(<expression>).