« first day (2360 days earlier)      last day (2476 days later) » 

6:17 AM
His account seems to have been replaced by @user62131.
 
@Challenger5 He decided to quit
4 hours ago, by HyperNeutrino

ais523's last conversation :(

Jun 28 at 15:13, 12 minutes total – 38 messages, 8 users, 3 stars

Bookmarked 5 secs ago by HyperNeutrino

 
That's too bad.
I'm feeling more and more that we need to move this all to another site
If users are quitting over bad design, then we clearly need some better design.
 
That would be nice
The whole SE format feels very hacky
hopefully we will get some features when we get design
 
yeah but the day se cares about our site is the day SO doesn't have to be its own separate division of the site
which is to say, never
 
If we don't I will quit myself. Because this system is untenable.
 
6:23 AM
what if we made a new site
 
The problem is that we wouldn't get traffic from HNQ
But it seems that we've discovered that the voting population of HNQ is incapable of incentivizing hard work anyways
 
except that takes money
unless you get a .tk, but you still need a server?
 
> The solution is that we wouldn't get traffic from the HNQ
 
hey does anyone here know how to make circle collision things
 
Also, it should be a repository for esolangs (documentation + tio)
In fact, maybe we could convince Dennis... nah that'd never happen
 
6:25 AM
hmmm
 
What do you mean by circle collision, btw?
 
Because you can just check if the distance is more than the sum of the radii
 
for my koth, bots will be circles
and I want to check circle collisions while they are in movement
and I would like it to be precise
I imagine there is some sort of cool formula to figure out if two circles will hit each other, if neither is disturbed
 
We could all threaten to abandon the site unless SE gives us more stuff
See how much SE really cares about us
But that's not nice, and it would probably fail
 
6:26 AM
they don't
OR THEY WOULD HAVE GIVEN US A DESIGN ALREADY
 
I can't run userscripts on all my devices! They can't assume we've solved the problems ourselves.
 
ok, so, so far I have reduced the circle collision thing to this...
you can use one circle as a frame of reference, then figure out if the other circle is moving in that frame
 
If they do collide, what will be the first points that start touching?
Extend those points to lines and see if they intersect
 
@Challenger5 ...
crap
 
I don't know if that will work, just a thought
 
6:29 AM
nah, it wouldn't
because you'd need to figure out the angles and pointing and stuff first
 
OK, so say you subtract the velocity vectors and see if the result will come within a certain distance of the origin
And that distance is the sum of the two radii
I think
 
yeah, the other thing is figuring out A: how quick until they touch (some simple trig? (plus circle crap)) and B: what angle they are touching from
actually...
 
B is ill-defined given that not necessarily the centers will collide
 
just realised my formulas don't work
 
@Challenger5 why don't you do this lemon?
it's simple
 
6:31 AM
because
that is a very different issue
that's "are they currently colliding"
 
then what is your issue?
 
"will they collide"
also then I have to figure out how to handle imparted force
 
@Cowsquack I don't know what you mean by that
 
will they collide "in the next frame" or will they collide "sometime in the future"?
 
Also, is their a faster way to reply to a message than clicking in the corner?
 
6:32 AM
@Cowsquack in the next frame
but the next frame could be pretty long
 
@Challenger5 I was showing your message to lemon
 
Oh, I see
 
@DestructibleLemon what do you mean?
 
@DestructibleLemon Then just simulate that frame
and see if they have collided
 
6:34 AM
yeah but that takes a lot of steps?
also I want the exact point of collision
I forgot to mention that
as in, the place on the map
 
Again, point of collision is ill-defined
 
do both circles have the same radii?
 
@Challenger5 where the circles will be when they collide
@Cowsquack yes
 
Are you looking for any two circles on the board, or two specific circles?
Because if it's the latter
 
now this is a fun problem
 
6:35 AM
I guess you could assume radius 1 or 1/2 or something
 
you could only simulate those two
 
@Cowsquack no it isn't
@Challenger5 any two is going to be the goal
 
It's a fun problem when there's no pressure on you to solve it, I guess
Well you're going to have to run the next frame anyways
 
so, you can figure out a possible collision by adding speeds and stuff
 
so simulate one frame, save it, and then check if any are touching
 
6:36 AM
import math

class Point
  public
    func Point(x: float, y: float)
      this.x = x
      this.y = y

    func distance(a: Point, b: Point): float
      float x_distance = Math.abs(a.x - b.x)
      float y_distance = Math.abs(a.y - b.y)

      return Math.sqrt(x_distance ** 2 + y_distance ** 2)
  private
    this.x: float
    this.y: float
 
And if they are, you have all the information you need
 
I'm coming up with syntax for my langauge
it doesn't look that nice
 
@Challenger5 but like, that takes a lot of steps at high speeds
 
looks like Python
 
Is math lowercased or capitalized? You're not consistent
 
6:38 AM
¿por que no los dos?
 
And also, plz make primitive types capitalized as well
It really bothers me that most languages don't do that
plz
 
@DestructibleLemon what do you mean? Aren't you just going to add the velocity vector to the circle's coordinates in the next frame?
 
@Cowsquack yeah
but if I just simulate and check for collisions
 
then how is that going to take a lot of steps at high speeds?
 
They might have passed through each other
which is why you need multiple steps
possibly subdividing steps
 
6:39 AM
Oh, that's true
 
now you're getting it
also how do they impart force when colliding at angles that are off?
 
OK, so it's not an option to scale speed/size so that circles jumping past each other will never happen?
 
@Challenger5 ?
I guess you could
I mean, you can do a bunch of newtons' to find inverse sqrt, but fast inverse sqrt is popular for a reason
however that is a pretty bad example as that was for speed vs accuracy
 
What I mean by that is just, make the circles bigger or slower
 
I would also like accuracy
@Challenger5 yeah, that would be splitting into steps wouldn't it?
if you mean slowing them down and only doing that, then they would never touch
also sizing up circles would lead to really weird gameplay
 
6:43 AM
Make a visualization. That might help. Turn a frame into a bunch of points and lines
I don't see how that would help, but you never see those kinds of things until you do
And, as I said, I haven't yet.
 
so, I'm like 90% certain there is a nice formula for determining if they will hit eventually
 
$2r=\sqrt{((x_1+t*v1_x)-(x_2+t*v2_x))^2+((y_1+t*v1_y)-(y_2+t*v2_y))^2}$
to find $t$
 
not as sure about hitting in a certain amount of tim
 
Eventually, or in the next frame?
 
I think
 
6:45 AM
just because of circle things
 
@Challenger5 eventually, but then you check if $t<=1$ to check if it happens within the next frame
 
I think I mentioned before... but I honestly wouldn't mind switching to squares that badly :/
 
Squares wouldn't help a huge amount, I don't think
 
once you find $t$ you can find the x and y coordinates easily
 
Circles are nice because "touching" calculations are simple
 
6:46 AM
@Challenger5 yeah that's going to be tougher
 
@Challenger5 squares are simpler?
 
how do you do a collision check between two squares then?
 
@DestructibleLemon Are they? Checking if circles are touching is just finding the difference and comparing them to the sum of the radii
 
x distance (centres) =< combined "radius" and y distance (centres) =< combined "radius"
no square calculations
two comparisons but still
 
circles are easy because the distance from the centre is the same
 
6:48 AM
Meh, you can abstract square calculations
 
You can't abstract away more complicated calculations where you have to consider all the things
 
@DestructibleLemon how are radii in squares even going to work? What about edge cases?
 
@Cowsquack well, radius means half a side length
it works
 
then what about edge cases?
intersection in the corners?
 
6:49 AM
when they are both exactly equal, thats touching edges
 
Those are corner cases, not edge cases :P
 
I mean, it doesn't work when the squares are rotated
I'll admit that :P
 
but still, intersection in the corners aren't going to work
because that's outside of the radius
 
I still think circles are going to be simpler, though
 
as do I
 
6:50 AM
@Cowsquack nuh uh
either way, circles have the same issue
when passing by each other
 
Circles don't have corners
 
I know that
 
yeah
 
I mean when the circles graze each other
 
so there are no edge/corner cases
 
6:51 AM
when they are exactly equal, that is the corners colliding
 
@DestructibleLemon $\sqrt{xDist^2+yDist^2}<=2r$
you do <= instead to check for grazing
 
SE needs to give us MathJax...
 
@Cowsquack ok man
I don't have that entirely muscle memorified in chat
 
Is this syntax good?
func dist(Point a, Point b) -> float
That's for functions
 
@Challenger5 Here is a mathjax userscript created by ATaco: github.com/TehFlaminTaco/TacosUserscripts/blob/master/…
that's what I use
 
6:52 AM
hmmm circles will be simpler for this issue
 
OK, what if I don't have Tampermonkey and I don't want it?
@DestructibleLemon Ahh, he is starting to see the light :P
 
hmmmmmmm this is very hard ;_;
 
finally :P
 
@Challenger5 this is about different thing
 
8 mins ago, by Cows quack
$2r=\sqrt{((x_1+t*v1_x)-(x_2+t*v2_x))^2+((y_1+t*v1_y)-(y_2+t*v2_y))^2}$
 
6:53 AM
you didn't raise the issue exactly
 
Oh, ok :(
 
@Cowsquack I can't read that
 
it is very sad when you have a koth idea but aren't good enough to execute it ;_;
 
@Qwerp-Derp I think that's fine. Although honestly I like having the type signature outside of the function so I can write it first
 
6:54 AM
what are the values pls
 
Using this equation you find t
 
I feel dum
 
after which you can find the exact x and y coordinates of intersection
 
@Cowsquack t is what?
 
@Challenger5 Hmmm, I want the function to stand out as a function, though
 
6:55 AM
the time when the circles intersect
 
IDK
 
gtg
 
again, I don't want a pure math thing
I want to know where they collide, as in what positions the circles are in
 
Yeah, that's true. Maybe it's because I just learned Haskell and I am biased towards anything it does
 
which maths doesn't work exactly for
 
6:56 AM
It seems pretty verbose, though
 
though I guess time works ok enough
but ehhh
floating point errors ya know what I mean?
 
What about this:
 
Floating point errors are only super significant (except for equality comparison) at very high values
@Qwerp-Derp If you're referring to Haskell, then that's true, and I don't like how the type signature syntax forces you to repeat the function name
 
dist -> float: Point a, Point b
@Challenger5 I'm referring to my snippet
 
Or, for a very Haskelly syntax:
dist :: Point -> Point -> Float
As for the verbosity, you could have an explicit expose statement for fields you want to expose, and have the rest be private by default
Actually, unless you have currying by default, you'd have a signature like:
dist :: (Point, Point) -> Float
 
7:01 AM
I think this might look nice: dist@float: Point a, Point b
I was thinking of doing something like this: dist>float, but I'm using > for things like List>int (a List containing ints)
 
Pls not @ sign
 
Here's something:
dist(a, b) :: (Point, Point) -> Float { /* ... */ }
That might actually force you to use the really ugly alternative curly-brace style where you start the brace on the next line
 
What's wrong with C/++/# syntax anyway?
 
Although, if you have type inference, you can generally make the type signatures pretty ugly and nobody will care
Hopefully
Actually, probably not
 
@Challenger5 I'm planning for the langs to be whitespace-sensitive, so no curly braces
@Phoenix I need some sign there, I don't have anything better than @
 
7:07 AM
@Qwerp-Derp # maybe?
 
@Phoenix That could work
 
Why not func dist (Point a, Point b): float
And again, type inference
 
@Challenger5 Verbosity
 
I don't like @ because that's the apply operator in songs languages.
 
All explicit type signatures are verbose
Except for trivial stuff where it only takes one parameter
 
7:09 AM
@Challenger5 the thing is.... once you get t, if t is floatingpointed it messes up calculations in the next step
 
It's worse than Java when representing the same thing: float dist(Point a, Point b)
 
oh man why can I not do anything
 
Because Java lets you put the return type in front of the name
Really, if you're going to add explicit type signatures, Haskell- or Java- style is the way to go
 
I should probably do type inference then...
 
Most modern languages either do moderate type inference or are dynamically typed, yeah
 
7:11 AM
also that formula just calculates once you've gotten the angle/point on circle where they collide...
 
But you should always have the option
 
@DestructibleLemon I think math is not good for computations involving things that happen
 
Java style. Please.
 
Which is why the collatz conjecture, etc goes unsolved
auto dist(auto a, auto b) (Please don't do that)
 
7:13 AM
so... how to calculate which points on circle collide
damn... maths is hard
 
Now,I understand that in some places that aren't America people say maths and not math, but wouldn't it then be "maths are hard"?
 
"maths" means "mathematics"
You don't say "mathematics are hard"
It's just another one of those weird inconsistencies in the English language
 
neither way works that great
"mathematic is hard"
 
Ooh, what if I do this?
func dist#float: Point a, b
 
7:19 AM
What type is b?
 
Point
 
I think that should be explicit
 
The Point behind a is spread out
 
What if you wanted to take args of different types?
 
@Challenger5 Then you specify the type
func add#int: int a, b
  return a + b
 
7:20 AM
I guess that works, but it doesn't go well with type inference
 
What do you think?
 
I don't know, my philosophy is either be explicit about everything or implicit about everythinng, you shouldn't be allowed to mix them too much
That just causes confusion
 
Explicit > Implicit
 
func add->int: int a, b
 
Code should be readable.
 
7:22 AM
I think that's pretty readable
 
@Phoenix Up to a point. Explicitness should not mean redundancy.
How about func add(Int a, b): Int?
I think the return type should go after the parameters
because that's the way a reader would think about it
"params go in first, return val comes out after"
 
True, I'm all for C#'s var, but the return type shouldn't be implied from a return statement at the very bottom of the function.
 
@Challenger5 Yeah, that looks good
 
@Phoenix That's true. All the explicitness should be bundled together as to put all important information in one place
That's why I like Haskell's type signatures.
 
Hmmm, IDK
I'll ask around to see which one's cleaner
class Seq>T
  Seq(T start, func fn)
    this.start = start
    this.fn = fn

  func nth(int n): T
    int counter = 0
    T temp = this.start

    for _ in [0->counter]
      temp = this.fn(temp)

    return temp
 
7:33 AM
I used to use Haskell, as I recall, the type system in general was a PITA.
 
Scala people be like "Yeah, Haskell sucks. Types don't even have types!"
But actually, why?
Oh, you know what, I can relate.
But if you get GHC to stop complaining (this may take a SO question or three), then your code probably works
And it feels redundant unless you use good design
 
yeah I guess I will do the stepping collision tester... it doesn't need to be super accurate
 
Bye
 
or something
wait, this is a possiblity to actually do right
 
8:11 AM
What's the shortest way to map a list to the parities of its integer elements in Pyth? For example, [1,2,3,4] -> [1,0,1,0]>
11 bytes feel waaaaay to long
FNQ aY%N2;Y
 
m%d2 should work
with whatever the list is stored in as the following character
 
Golfscript, 5 bytes: {2%}%
 
@notjagan Oh, that's clever. Thanks!
I knew I could use map but I didn't know the syntax
 
note: "now" isn't even pronounced the same as "know".
 
@JanDvorak Typo, beat me to it.
 
8:16 AM
Pyth tip: if you want to map code across a list, use m and the argument of first nesting is d
however, if the code is only one command
 
@notjagan Will keep in mind
 
use M with a pure function; for example, to sort all elements of a list, use SM (pure function arguments precede the command)
 
@notjagan M can be preceded by any monad.
 
er yeah, that's what I meant by pure function
I've gotten used to calling it that
simply because Pyth calls them pf's
 
But since % is a dyad, I did not know where to place it
And I see Pyth has the first argument called d to m, interesting
 
8:28 AM
@Mr.Xcoder I hear Pyth
 
@LeakyNun You hear well :)
 
@Mr.Xcoder but it isn't the first day you used Pyth...
 
@LeakyNun So what?
 
and you still haven't cleared map?
@Mr.Xcoder %R2
 
@LeakyNun Can you help me golf this: KQJsw?%/KJ2-J%KJ%KJ
 
8:30 AM
why KQ when you can just Q?
 
@LeakyNun Ah, right
Jsw?%/QJ2-J%QJ%QJ
 
just use E instead of sw
 
@LeakyNun I didn't know that exists :P
Maybe taking them as a tuple would be shorter?
 
there's a shorter algorithm
but nobody has figured it out yet
 
Then testing it against modulo?
Go ahead and post it
 
8:34 AM
and there's a Jelly near built-in
 
@LeakyNun That's self-evident
Should I post my Pyth one (and then you'll outgolf me)?
 
@Mr.Xcoder how shall I outgolf you? As a comment or as another answer?
 
Or just wait and see?
@LeakyNun I think I'm better off not posting it, actually >_<
 
I've posted the other algorithm
 
My god, Jelly... 3 bytes?!
 
8:37 AM
@Mr.Xcoder I did say near built-in
it returns negative for some values, so A for absolute
 
@LeakyNun Pls add an explanation...
Jelly just got more attractive...
 
@Mr.Xcoder please improve my explanation
 
Symmetric modulo 2y; map x in the interval (−y, y]. Try 100Ræ%4 to get the hang of it.
 
I typed it
 
Should I edit in?
IDK how to make it readable either
 
8:42 AM
yes, just edit in
 
With this: Symmetric modulo 2y; map x in the interval (−y, y].?
 
no, I typed that also
I don't think that's very readable
 
Forget it
 
Btw I have a 5-byte Pyth solution
 
Your explanation is fine
 
8:43 AM
Should I post it?
 
You outgolfed the Python one
@LeakyNun Wait a tiny bit plsss
@LeakyNun Just cheer curiosity: do you use j? (I don't know if it is relevant)
You can post it
 
no I didn't
 
@Mr.Xcoder posted
 
Nice
Is one of the a s absolute value, and one absolute difference?
 
8:48 AM
no, both are absolute difference
it is a fork of my Python answer
 
Anyway, that's near-magic +1
 
oh no, I've been outgolfed
 
@notjagan by 2 bytes :p
 
I have another algorithm in mind but I don't know in which language it would be golfy..
 
@LeakyNun Mind if I ask (don't wanna steal) what algorithm?
 
8:50 AM
@Mr.Xcoder I can type it in Pyth
 
actually I found an alternate 27 byte solution based off of my answer
 
@notjagan Go ahead an post it
@LeakyNun Done?
 
@Mr.Xcoder done
 
it ended up being fairly similar to @LeakyNun's though
 
8:54 AM
@LeakyNun Trying to break it down and understand it
 
@Mr.Xcoder that's my challenge for you :)
 
as in very similar
 
@LeakyNun UQ is unary range
 
@notjagan nice
 
@LeakyNun You first get the unary range from the first input with UQ, then _SQ gets you the reversed list from the range 1...second input
Oh no
I'm wrong
@LeakyNun You get the unary range with UQ of the first input, in other words, list(range(first_input)). Then you get list(range(1,first_input+1) and reverse it with _SQ. You then append _SQ to UQ, such that you have [0,1,...first_input, first_input-1...2,1], and get the index of the evaluated input in that "palindromized list"
 

« first day (2360 days earlier)      last day (2476 days later) »