« first day (2245 days earlier)      last day (2707 days later) » 

wim
7:00 PM
so this is what they look like in reverse
if anyone want to write the script to generate the instructions for the input CABBAGE ..
 
Hah. You tempt me.
 
I envy your animation skills, all of you
that's pretty damn impressive
 
you aren't alone Joe.... I still secretly hoping kevin employs the 'rainbow' color from mario kart, just to see how trippy it would be
im still reading kevin's code... wishing i had PIL on my work machine xD
 
Having arbitrarily colored squares would be... Nontrivial.
 
i meant like everytime you pushed a block or soemthing you either change all the square's colors or random color for every square
but that might be a nightmare to watch
 
7:05 PM
Or, hmm, maybe if I store the color tuples straight in the field matrix...
 
epilepsy warning
@Kevin sounds like star trek
 
Season 2 Episode 15, "The Trouble With Tuples"
^ Me, trying to identify a memory leak
 
try shallow copies
 
Ain't nothing shallow when you're elbow-deep in t(ribb|up)les
 
That's the cutest stack overflow ever.
 
7:09 PM
who's endlessseal
 
@AnttiHaapala hi ?
did it do somethign wrong? im sorry if i did
 
@MooingRawr you haven't done day 1 part2
 
-runs away-
 
Seals do not moo. Or do they?
 
@AnttiHaapala i refuse to do it with the standard record where you've been coords, been working on another solution, which is driving me insane slowly.....
@Kevin they rawr........ and maybe they moo who knows who are we to judge what a seal does?
 
7:11 PM
@MooingRawr line intersection?
 
@MooingRawr they do deals
that's why you seal the deal
 
Well, I am an accredited judge in the Land of Seals... Long story.
 
@AndrasDeak lol.... xD i dont know why that funnier than it should be but my god... xD
 
uuuuuuuugh. I really don't feel like doing day 7
it looks boring....
and by boring, I mean I have to think a bit for it...and I don't want to
 
@AnttiHaapala maybe? but how do you calculate line intersection of a line that turns all the time, without recording coords
@idjaw you can do it! it's actually quite easy, if you feel like brute forcing it....
 
7:14 PM
 
Ok, cool, the bug still occurs with magick 7.0.3-9...
 
@MooingRawr What are you trying to do / avoid exactly?
 
wim
@Kevin python provides this context manager
>>> with tempfile.TemporaryDirectory() as tmpdirname:
...        # stuff
 
@wim Ooh, neat, thanks.
 
@MarcusS you know day 1 right>? i made my part 1 answer without the needs of coords, i just calculated distances going one way from another basically...
but now part 2 needs to know when you hit your path again right? so i was hoping i can think of a math solution to it instead of keeping the coords of my past pathing....
 
7:17 PM
When you say "avoid keeping the coords" do you mean "avoid keeping track of every single integer coordinate pair (x,y) visited along the way, even between instructions"?
 
my initial thoughts were to set flags if i've moved in every direction at least once, then calculate if the distance between one direction to the another would yield a result but then i realize there were holes to that logic.... and i've been spiraling into nothingness
@MarcusS yeah more or less i dont wanna save where i've been
 
A few of us brainstormed approaches that don't explicitly store every point you've been to, but you still need to store the endpoints of the line segments you traverse.
You're not going to be able to do it with O(1) memory
 
can't have an intersection with no endpoints
 
yeah i saw that kevin but i didnt want the idea of storing anything, and just coming up with a solution that rely on flags at most......
 
You have to store something
 
7:18 PM
maybe andras? maybe the answer lies with the kitty in the box... ><
 
Hard move: prove that you have to store something.
 
im just being stubborn, i made the solution with storing the path, but i dont want to hand that in...
 
Intuitively this seems to be the case, but I don't think I can prove it from basic axioms
 
the question is not Markovian (don't overanalyze this statement)
 
@Kevin Sure you can - you just have to make it a very large value of 1
 
7:19 PM
"distance" only depends on your present position, and you need only the previous state. "intersection" needs memory of your path
 
of course you start where you start from that's the base, cant get rid of that ...
 
@AndrasDeak well, technically you need the start xy and end xy of each position you were at
 
but is that the case andras? maybe it is , maybe there's a magical solution out there
 
yes, hence memory of your path
@MooingRawr It is the case.
you are at coordinate (3,4), and need to go to (7,4). How do you determine whether you've been somewhere along that line?
you don't, unless you know your path history
 
Groot Programming Language
 
7:22 PM
eh....i wanna reject that but i cant atm...
maybe i should go read more into quantum theory and hope my solution lies there.... i doubt it though.
 
Quantum random walks are fun. Photosynthesis and stuff. *waves hands*
 
Anybody with ImageMagick installed want to try to replicate my bug? All you have to do is download the two .pngs from imgur.com/a/X8loQ, rename them to img_000 and img_001, and run magick convert -delay 50 img_*.png -layers optimize output.gif in that directory.
 
Version: ImageMagick 6.9.6-2 Q16 x86_64 20161010 imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
can't reproduce in debian
there it's simply called convert, but it should be the same thing
nice and purty
wow, version from October
didn't know that I've been living on the edge
 
rebel without a clue
 
@MooingRawr One approach: Collect all the endpoints, and then generate the intermediate segments (which are also defined by their endpoints), making sure to keep track of the endpoints encountered twice. For example if you go from (0,0) to (10,0) in the input data, store endpoints (0,0) and (10,0) separately, and also store the points (1,0) and (9,0) to represent the intermediate segment.
 
wim
7:31 PM
 
Now you can do a sweep-line algorithm en.wikipedia.org/wiki/Line_segment_intersection on the intermediate segments to find any points of intersection. Now you have two sets of intersection points: Those defined by arrival at endpoints, and those defined by segment-segment intersection not at a standard endpoint.
 
@wim we're synced <3
 
Finally the question is "which of these points is encountered first" which can be done by re-traversing the list (or, if you gave the intermediate segments sequence IDs, you can look these up -- and these can be referenced during the sweep line algorithm).
 
wim
no reproduction on
Version: ImageMagick 6.7.8-9 2014-04-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
RHEL 7.2 here
 
I just realized that my "objects" are mostly just data structures
 
7:33 PM
@MarcusS while this solution is really good, you are still storing coords. i think what i want doesnt exist, or can't exist, not yet... not with out magical powder dust... the solution that i initially wanted was just to store coord 0,0 the base and that's it.... which i dont think it's possible. but thanks for your solution, it's still a really good one
 
You can't do it without storing coords. No matter how crazy the pathway gets, if there hasn't been an intersection yet, you can always construct a path (from your current position along the path) that intersects a previous segment at an arbitrary point. There's no way to know where/if this takes place unless you know a segment exists there, and a segment is defined by its endpoints. (well actually this is not fully true due to the restrictions over integers)
 
@MarcusS and that was what i was trying to figure out if there is a solution so far it's a big no...
 
I hate programming
my class design is horrible
 
@khajvah ?
 
I did something bruteforceish for day one part 2. If you want a hint on what I did @MooingRawr let me know
or you can cheat and just look
 
7:37 PM
-1
A: Error when passing two parameters

edilioPython doesn't have pointers so you don't need * there

No >:(
 
ops
 
@idjaw i already did a solution in part 2, i just dont like it and im trying to figure out a better one if it exist. so far everyone ive talk to told me it's not possible lol
 
what exactly are people talking about when they say "annotations" in programming?
 
you should just push your solution and move on
 
DSM
@corvid: in Python in particular?
 
7:39 PM
hi all, i have doubt
https://docs.python.org/2/library/asyncore.html vs python3 asyncio
what is internal implementation difference ?
 
@idjaw my day 1 part 2 will never get a solution until im happy with it. the rest of my days are like i just have to clean up a little bit of here and there lol
 
@corvid Well in Python it's def myfun(thing: int, foo: str, fun: Any): or whatever
In Java it looks like decorators but acts like docstrings
 
@DSM I think it's considered relatively generic
@WayneWerner Oh really? That's super useful then
Can you leave an annotation in python for which type is returned?
 
yeah
 
DSM
-> return_type
 
7:40 PM
I just forgot the syntax
and didn't feel like typing ^Tpython annotations<C-m>
 
What if the return type is a function?
 
-> function maybe?
 
DSM
Annotations be can any object whatsoever.
 
probably -> Callable
Look at that:
def partial(func: Callable[..., str], *args) -> Callable[..., str]:
    # Body
 
DSM
In [4]: def f(x: object, y: [1,2,3]) -> dir: pass

In [5]: f.__annotations__
Out[5]: {'return': <function dir>, 'x': object, 'y': [1, 2, 3]}
 
7:42 PM
yeah but it wouldn't be like def blah(i: int) -> def, would it?
 
DSM
Pretty close, if you use Callable, ISTM.
 
wim
why do people from India call questions "doubts" ?
(serious doubt)
 
worng copypaste :D
was trying to paste ^that link
 
DSM
@wim: I've noticed that before on SO, questions starting like "I have a doubt", etc.
 
joe... the reposter ;3
 
holy crap
If you never mentioned it, I never would have noticed
haha
 
wim
wow, nice gallery here! github.com/kms70847/Animation
 
Now I'm curious if "do the needful" is of similar origin — Wayne Werner 39 secs ago
This one is breaking my brain
I understand that the squares are staying in the same place
but it really doesn't look like it
 
7:57 PM
That's pretty gorgeous
 
@Ffisegydd that creeps me out for some reason
 
man... that tower of... hamurabi?
I do like seeing fractals grow. Those ones are fun
 
this is my favourite one
 
@WayneWerner Check out Mandelbrot sets
 
7:58 PM
@MooingRawr Koch jazz-hands?
 
yeah.. i guess...
im also creeped out about many little holes in something
 
trypophobia
 
yeah im not googling that again
 
note to self. Send @MooingRawr pictures of tripe
 
8:00 PM
@idjaw i have tripe in pho all the time
 
bahahahahahahahaha
 
@AnttiHaapala and now im out cya around
 
Antti the always helpful
 
 
8:00 PM
look at all those holes
 
Nov 30 at 20:04, by Andras Deak
such as these, minor trypophobia warning
 
^^ yes
 
pretty trypopics ------^
 
@khajvah yeah...I give up...eff it all
 
@AndrasDeak that's lotus... the same flower as in
 
8:01 PM
@AnttiHaapala I know
 
I guess buddha didn't suffer from trypophobia then :d
 
 
JESUS WHY DID I GOOGLE THAT WORD
5
AHHH
 
@AnttiHaapala he didn't lean close enough
@MarcusS eyes see what you did there
 
@MarcusS I guess we found another :D
 
8:04 PM
@MarcusS cute
 
I went to Google image search and eeeeeeeeee
Are those things Photoshop or a real condition or what
I had to click off
 
just creepypasta usually
mostly lotus seed-like stuff shopped over human flesh to make it as icky as possible
btw, google "trypophobia creepypasta" next time
 
internet is amazing
I found a youtube video but I am not sure if I should watch
goddamn I watched it
 
what word?
trypophobia?
 
Phew, bug reported. My obligation is thus discharged.
 
8:11 PM
@idjaw yes, watch youtube videos
 
Now expecting reply, "silly newbie, don't you know that layers -optimize is supposed to mess up your gif? It's right [here], seven links deep in the documentation"
 
@MarcusS Just in general? Or something specific? Cause I do love me some mandelbrot
> /discourse-server/
Are they really running discourse? It doesn't look much like it ~_^
 
@Kevin If it makes you feel any better, I was going to comment way earlier that I still saved the code I used to make my gif, and it didn't have any streak issues: convert -delay 40 *.png output.gif
 
x=13
for i in range ():
print i
if x ==9:
x=8
 
Disclaimer: That may or may not actually help
 
8:17 PM
In this code why numbers after 9 are printed ?
 
@johnsmith click the "fixed width font" button when you're editing it --->
 
@WayneWerner Just in general
 
@MarcusS Ah, yeah. I <3 mandelbrots. Have you seen skytopia.com/project/fractal/mandelbulb.html ?
 
@johnsmith Doesn't print anything on my machine except TypeError: range expected at least 1 arguments, got 0 after I fix the indentation
 
Wow, this is trippy -- hadn't seen this
Reminds me of those electron microscope pictures a bit
 
8:21 PM
@Kevin I was typing this on my phone so made the typo. The argument in range() is x
 
@MarcusS Yeah I think it only streaks when you supply the layers -optimize option
 
What is it optimizing exactly? Memory footprint?
 
@johnsmith Ok. I'm guessing you also meant to do if i == 9: i=8 instead of x?
@MarcusS Basically yeah. the gif file format can get away with storing only partial image data if two adjacent frames are sufficiently similar to one another. -optimize searches for similarities and takes advantage of the space savings. IIRC.
 
Huh -- I assumed it did that by default by virtue of the format, but perhaps not
 
@johnsmith it's because assignments you make to the iterating name don't have any effect on the iterator's value once that iteration ends. Consider the simpler example:
for i in range(10):
    print(i)
    i = 0
 
8:24 PM
@Kevin oh. Yes if i==9: x=8
 
If reassigning i caused the iterator to actually reset back to zero, then this code would run forever. But it actually only runs ten times.
i only looks at one thing when deciding what its next value will be, and that's the object returned by range. Nothing you do in the loop modifies the object returned by range, so you have no control over what i's value will be in the next iteration.
Now, if you did something like:
seq = [1]
for i in seq:
    print(i)
    seq.append(i+1)
Then you could change the next value of i, and cause an infinite loop even though seq initially only has a length of one
 
it's safe to come back i guess?
 
@Kevin Is that the same case , if we change the argument of range ?
 
Try doing something like "print range(10)" and you'll see what range() is doing
 
@johnsmith Depends on your version. In 2.7, you can do
seq = range(4)
for i in seq:
    print(i)
    seq.append(i+1)
 
8:30 PM
so something like "for i in range(10):" is the same as "for i in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]:"
 
And it will loop infinitely, but in 3.X, you can't append to the range object returned by range.
 
@MarcusS not exactly but
 
I'm pretty sure 3.X ranges are completely immutable.
>>> x = range(10)
>>> print(x)
range(0, 10)
>>> x.start = 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: readonly attribute
Yep, looks like it
 
"The range type represents an immutable sequence..." yep, there you go
 
8:33 PM
can't you like... reset or send to range though? Or am I thinking of something else?
 
If by "change the argument of range" you mean "what if we mutate the value that we passed in as an argument to the range() call?", I don't know if you can even do that.
Most number types are also immutable.
 
x=13
for i in range (x):
print i
if i ==9:
x=8
 
>>> import decimal
>>> range(decimal.Decimal(10))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'decimal.Decimal' object cannot be interpreted as an integer
>>> import fractions
>>> range(fractions.Fraction(10,1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'Fraction' object cannot be interpreted as an integer
 
why are you trying to change the range in the first place? what problem are you trying to solve ?
 
@johnsmith changing the value of x will definitely have no effect.
You might have a chance with mutation (if by some horrible dark magic you figure out how to mutate an int), but simple reassignment is a definite no-go
 
8:37 PM
if i ==9:
    break
 
@Kevin Ok thank
You
 
@BhargavRao That's cheating :-P
 
probably vastly easier to just do your own generator that wraps range
then you can send into it
 
solutions in order of practicality/difficulty:
- `break` (simple, sufficient for most needs)
- make your own generator (power users only)
- hack the value of integer literals (Jesus wept)
 
8:47 PM
reminds me of this (matlab evilness)
 
wim
>>> class Kevin:
...     def __index__(self):
...         return 5
...
>>> for i in range(Kevin()):
...     print(i)
...
0
1
2
3
4
 
@AndrasDeak dehell
 
9:08 PM
Rhubarb, Sleeping early \o
 
@BhargavRao GOOD!! 😀 You have a lot of sleep to catch up on
get out of here!!!
 
:D
Cya
 
9:22 PM
that "sleep" sounds great, I should have some one day
 
cbg everyone
 
cbg, heather:)
 
asdlgkjasdlgkjasdg all my tests pass for freakin' day 7
but it's not passing the real thingie
 
wait, I had something similar
aren't you overcounting?
you need to consider each address once
 
DSM
I just spent five minutes trying to figure out what today's part 2 was asking. :-P
 
9:37 PM
Heh. I actually was printing today's already for debugging
 
@AndrasDeak yeah. Once I find a match I just return. If I find a breaking <thing> I return False
 
if somebody says "bugger it", do you later need a debugger?
 
rofl
cbg @heather
 
DSM
A friend of mine texted "Bigger!!" to me the other day and then complained bitterly that autocomplete wouldn't let her curse like she wanted to.
 
I guess now I know what a segfault really is
 
9:38 PM
shot duck duck shot
duck shot
 
:D
@idjaw and if you don't find a match, nor a breaking <thing>?
 
Wayne the Wonderous pulls out semantic errors from his magical hat. Is this your problem?
 
To be fair, there's really only a few errors you're going to get in there
 
you underestimate our power
 
9:45 PM
@WayneWerner I'm going to spoiler post my test cases. They all pass, and the final solution is not good
 
anyone here used pymongo?
 
I even used a co-workers data (there seems to be a few different sets in cycle) and I got the exact same wrong answer
 
@idjaw On day 7 you're returning when there's a breaking thing? I'm pretty sure you shouldn't be doing that... ~_^
 
@WayneWerner day 7 pebkac
ugh message too long
 
:P
gist it
 
9:46 PM
let me guess: missing characters from real input?:P
just like with the hash?
 
heh.
 
@WayneWerner view spoiler
I'm going to accept the mockery...because it's well deserved. I'm definitely doing something really stupid
 
did you strip?
 
oh I definitely stripped ;)
 
I get 2 for part 1 with your input and my code
why does your test data have one address twice?
 
9:50 PM
mistake
doesn't change anything
 
yup
does your code work for multiple [] blocks as Wayne hinted?
all the tests have a single [] block
 
the last two tests in the first test class have multiple [] blocks
 
oh shite there's a lot of tests there
I only looked at the top block, sorry
 
wim
damnit
is there an api for stackoverflow's imgur thing
 
dunno
what do you need specifically?
 
9:54 PM
@wim I'm actually slowly working on a "non-API API" for SO.
Just started working on it again, going through the 10k tools.
 
wim
@AndrasDeak A way to use i.stack.imgur.com without needing to make a fake post to get the UI
 
@wim "upload" link in chat?
 
DSM
Are we debugging idjaw's code?
 
I assume I'm misunderstanding
@DSM not yet
 
wim
It uploads and posts the chat immediately
 
9:57 PM
@DSM we're clairevoying his possible errors:P
@wim ah, yes, it does
 
that posts to /upload/image. @wim so why isn't uploading the image acceptable?
 
Yeah, was just about to ask, when else should it upload?
 
@DSM I'm determined to get this one....It's just irritating that my test cases are passing...and based on the test cases I have, it looks like I have decent coverage. But Obviously not...
 
that's some spoiler
 
9:59 PM
FWIW you can edit an existing post then discard the edit
 
wim
^ For example. I want to upload, but not post the image directly.
 

« first day (2245 days earlier)      last day (2707 days later) »