« first day (1961 days earlier)      last day (2885 days later) » 

10:00 PM
I updated my site with 4 more javascript "demos": mcdorli.github.io
And yes, that's the simplest UI I could create
 
-1
A: Sandbox for Proposed Challenges

Anirudh BalajiCalculate Hello World! popularity-contest hello-world underhanded Your goal is to calculate the simple string "hello world" or any other variant. Rules You may not use the characters in this set (inside your code): hHeElLoOwW rRdD!, in any form (character codes, hex codes, etc. not allowed) ...

 
results are in.. rank 157
 
@Bálint I don't get the quadtree one, and also there are at least two typos.
 
@El'endiaStarman I made this whole thing in like 30 minutes, I go, correct the typos
Also, a quadtree is a 2d version of octree
An octree is a tree data structure in which each internal node has exactly eight children. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants. Octrees are the three-dimensional analog of quadtrees. The name is formed from oct + tree, but note that it is normally written "octree" with only one "t". Octrees are often used in 3D graphics and 3D game engines. == For spatial representation == Each node in an octree subdivides the space it represents into eight octants. In a point region (PR) octree, the node stores an explicit 3-...
 
I know what a quadtree is. I don't know what the image represents.
 
10:04 PM
@Upgoat I'd really rather not bother having to build everytime
 
The image is just a random bitmap
Almost
There's a bias to the upper areas
 
I like the binary fractal tree demo the most.
 
@Bálint Yeah, I don't get that. To me, a bitmap is just an image, and a quadtree sections a 2D area into four smaller areas, recursively, and is used for various (spatial) optimization purposes. The obvious and huge gradient from top to bottom makes no sense, then.
 
@El'endiaStarman Try setting angle to 2/3, and angle offset to 1/2 and you get another fractal
@El'endiaStarman The gradient is there, to make bigger clusters instead of just 1 or 2 2 * 2 ones
 
10:08 PM
Yeah, but where does the quadtree bit come in?
 
@El'endiaStarman After I have a random bitmap, I can optimize it by generating a quadtree around it
 
Optimize a bitmap? Huh? I thought that was basically just an array of color values.
 
@El'endiaStarman Imagine it for a 10000 by 10000 image
Instead of literally just storing 1000000000 values (wich can be stored in around about 125000000 bytes), it can be stored in ~10000bytes
 
@Bálint Cool stuff!
 
10:12 PM
Because a quad-tree only needs 5 values, an x, a y position, a width, a height and a color
 
Ah, I think I get what you're doing. The remaining problem is the heavy bias from top to bottom. I would expect the big(ger) squares to be evenly distributed, since that's what I think when I hear "random".
 
@El'endiaStarman Again, it's just there for presentation, with a simply Math.random(), it wouldn't be as visible as it is right now
So, for example the top 64*16 pixels are almost always clustered together
With 4 squares, it's only 20 bytes to store it, without optimization, it's 128 bytes
 
What about placing a white square anywhere with probability 0.05? That'd be much more interesting.
 
@El'endiaStarman You know what, I make it to use user input
So, where you click, it becomes a white square
 
That'd work too.
 
@EᴀsᴛᴇʀʟʏIʀᴋ I never saw a cat, wich wasn't immedialitely scared, when he/she saw another cat.
 
...
You haven't met nice cats.
and @Upgoat have you been teaching @Bálint how to spell?
 
@EᴀsᴛᴇʀʟʏIʀᴋ Spell what?
 
@EᴀsᴛᴇʀʟʏIʀᴋ it's probably just because @Bálint doesn't even have hands. It must be difficult to type as a loading sign
 
@Bálint That's more like it! Click-and-drag to flip multiple pixels. Click on white pixels to flip to black.
 
10:28 PM
@El'endiaStarman I agree, flipping back would be cool=)
 
@aditsu Are they on a treadmill or what???
 
nah, the camera is just following them
 
@Bálint I think you should also enable flipping to different sizes
 
@El'endiaStarman @flawr mcdorli.github.io/quad_tree/index.html <- I added dragging and flipping
2
 
10:34 PM
@Bálint Awesome!
 
@flawr square brush or circle brush?
 
I would think square.
 
@Bálint that is cool
 
@Bálint Square! Thats really cool!
 
@Bálint It'd be cool if you could right-click and reset the corresponding lowest quad square (I guess double clicking does this so nvm)
 
10:38 PM
@flawr Ok
 
You know, when you have a bigger square that consists of smaller squares of different colour, it would be cool if you could reset that back to black or white (my suggestion: left or right click, or some toggle switch)
OOOhh, dragging also works with black, if you already begin with a white square=)
 
"white square" and "region" counters would be nifty
 
@Bálint very cool! are you recalculating the quad tree at each step or updating for each change?
 
Funny how one simple change in demoing a quadtree suddenly has people going "OMG SO COOL!". :P
 
@xnor For each change, it's actually pretty heavy on the CPU
@El'endiaStarman :P
 
10:43 PM
@El'endiaStarman I'm waiting for the 4D hexadec tree :D
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Your comment on my answer is obsolete now! :D
But, I’m not sure what you meant
 
I was feeling artsy.
user image
3
 
I meant, "why use chars with code X instead of numbers with value X"
 
I think it’s parse(Int,"12345"[t]) versus Int("#####"[t])
And the latter is shorter. But maybe there’s Julia things I don’t know about
 
10:50 PM
oh :P
I missed that
 
Now I encode [4,5,2,3,3,1,5,4,1] as a base 6 number!
Let’s see if it can be shifted base 5.
Nope, doesn’t look like it
 
anyone familiar w/ cpp?
Why can't I do this:
class Coin {
	public:
		int value;
		void setValue();
};

void Coin::setValue() {
	this.value = 3;
}
this.value is the problem, won't let me use this
 
What error do you get?
Intuitively I'd use this->value because I think this is a pointer to the current object.
 
That sounds right
 
But if you do not use value as a new variable within setValue you should also be able to type just value instead of this->value
 
10:59 PM
FWIW, I get a perfectly readable compiler message about this from gcc O_o
prog.cpp: In member function 'void Coin::setValue()':
prog.cpp:10:7: error: request for member 'value' in '(Coin*)this', which is of pointer type 'Coin*' (maybe you meant to use '->' ?)
  this.value = 3;
 
Yay, I still remember the stuff, even though I had an exam on this like 3 days ago =D
 
I like the accuracy of "even though".
 
Fact: 3 is actually an odd number of days.
 
@Lynn Depends on what ring you consider 3 an element of XD
Sorry, every now and then I just have to give in to the urge to show that I'm not a CS guy :D
 
@flawr Done, you can change brush size: mcdorli.github.io/quad_tree/index.html
2
 
11:05 PM
I can’t think of a ring in which anything you’d call 3 is anything you’d call even
 
Z/nZ where n is an odd integer
 
But do “odd”/“even” make sense, then?
 
even just means divisible by two
 
Wikipedia gives a pretty cool generalization: en.wikipedia.org/wiki/…
 
but true, odd might be not very well defined
 
11:09 PM
> Let R be a commutative ring and let I be an ideal of R whose index is 2. Elements of the coset 0+I maybe called even, while elements of the coset 1+I maybe called odd.
(Huh, how do you know 1 is even a thing)
 
You usually consider rings with ones in ring theory.
 
(I guess it’s abuse of notation and they mean R\I?)
Ohh. Yeah
Otherwise they’re rngs, which is the best term
 
@Lynn Random Number Generator? But how do you even pronounce rng?
Never heard that before, but I love the idea=)
rng might be dothraki language
 
The article says it’s like, rung
But it’s fun to just say /ɹŋ̩/
 
more words without vowels
=P
@Bálint This is soooo coool, can you now make a scroll-wheel-listener (if such a thing exists?) for changing the size?
 
11:15 PM
@Bálint Super!
 
@Bálint This reminds me of the adaptive grid methods we had to use for fluid dynamics simulations=)
pigeonhole principle: If you have 4 pigeons and 5 holes, you shot one of the pigeons at least twice
 
11:32 PM
This is good
 
Very nice white square
 
yes
almost as nice as @LegionMammal978's
 
@flawr Oh that's so cool! I can't get dizzy either since my semi-circular canals are malformed, so I don't have a functioning vestibular system.
 
Y'know those "spin around a baseball bat with your head on it and then try to run straight" games? Never posed a problem for me.
 
11:40 PM
"I can't get dizzy because my body is messed up"
 
@El'endiaStarman what? are you able to walk?
 
@aditsu Yep, because I also have vision and proprioception!
 
how can you keep your balance without a functioning vestibular system?
 
Apparently there's a theory of balance that says you need at least two of the following three balance systems: vestibular, visual, proprioception.
 
can you stand on the toes of one foot?
 
11:42 PM
I think it's especially my proprioception, since I often do stuff like stand on one leg and use the other for counterbalance as I reach out to put down or pick up something.
@aditsu Just tried that and yes I can.
 
but only with your eyes open?
 
...lemme try that.
 
maybe try the whole foot first
 
I could barely stand on one foot, period.
 
huh, fascinating
 
11:50 PM
Oh, Wikipedia has this:
> Somatosensory system: senses of proprioception and kinesthesia of joints; information from skin and joints (pressure and vibratory senses); spatial position and movement relative to the support surface; movement and position of different body parts relative to each other
As one of the three components of one's ability to balance.
Oh, also, I have successfully stood on a slackline for more than three seconds in the past. :P
 
I guess when one sensor is failing, the body learns to make use of alternatives with great accuracy
 
Good ol' brain plasticity!
 
also, is the vestibular system issue related to the hearing problems or a separate thing?
my colleague who had a cochlear implant is able to ride a unicycle, and learned to ride a caster board in no time
 

« first day (1961 days earlier)      last day (2885 days later) »