« first day (100 days earlier)      last day (1349 days later) » 

12:00 AM
I thought we were?
 
11x11 was simply the smallest we could use, but until now it was arbitrary.
 
ah
so no smaller size is possible?
 
no, because of the size of our gates
 
ah
what would you want to see on the tile?
 
12:17 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ oh, one more thing, I'm concerned that your VGoL sim might not be able to handle the serial adder (above), since, even though the whole thing is a rectangle that fits on the grid, the inside of it isn't entirely grid-based.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Something to indicate which sides are inputs/outputs, and a name.
 
cool, thanks
@PhiNotPi maybe I could allow "custom" tiles where you could directly input vgol
 
Maybe special cases for wires/corners/crossings/splitters and stuff, like actually show the lines instead of labeling it "corner" and stuff, since they aren't gates.
Like, see the hand-drawn schematics I made above? How about that?
@CᴏɴᴏʀO'Bʀɪᴇɴ That sounds complicated.
 
sorry, was afk
@PhiNotPi so, an attribute to a tile that would add a corner thing?
@PhiNotPi I don't quite understand the diagram
 
12:29 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ the boxes are gates, the lines with arrows are wires.
 
alright, so what about it?
 
Just an idea of what to make wires and stuff look like.
 
okay
so if I implement it as such, the sim would be able to handle the adder?
 
Being able to handle the adder would require either larger tiles (like the 4x5 adder) that have custom programming, or for you to have customizable VoL tiles.
I think the first option is better.
 
so, in addition to all the gates, have a tile called "adder"
that's doable
a question about the wires: we'd need wire tiles for all possible configurations, right?
 
12:38 AM
That's two distinct configurations if you allow rotation and mirroring.
Well, if you have two wires.
One or two wires is four altogether.
 
so, there's a corner, a straight. can wires not be combined into threes/fours?
 
Oh right, wire splitters.
Corner, straight, two corners, two straights, one in/two out, one in/three out, three-way, four-way...
 
a drawing would be useful :p
or paste the corresponding block building chars
 
1:12 AM
Sorry, I had to leave.
 
 
12 hours later…
12:56 PM
@El'endiaStarman New serial adder, more compact: goo.gl/bt6kCk. The inputs and output wires are little all over the place (crossing over each other) so that I could test larger numbers. In 176 gens, it computes 101 + 10111 = 010001
The nice thing, though, is that the output is directly across from one of the inputs (the signal travels directly through it with no additional lag).
It's also cool to watch it in pure black and white: goo.gl/17IJfj
3
room topic changed to The Quest for Tetris: For discussing this: meta.codegolf.stackexchange.com/a/8016/12914 | link to VarLife: goo.gl/wg7m7J (no tags)
 
1:27 PM
@PhiNotPi Stylish link to VarLife for the quest: bit.ly/volqft
 
I should work on delay wire.
room topic changed to The Quest for Tetris: For discussing this: meta.codegolf.stackexchange.com/a/8016/12914 | link to VarLife: bit.ly/volqft (no tags)
@zyabin101 I don't know how much you've missed (we've been pretty busy), but we now have (after repeated failures) a serial adder working, so next we are going to work on memory. Also, Conor is working on a circuit simulator, which is the next level of abstraction above VoL.
 
Stars galore! retracts his last star
^ circuit failure
 
yep
 
A toroidal plane for an even wide wire is bad.
At Generation One, the electron duplicates to the left and far right.
The insulation follows along, and at Generation Ten, the electrons collide.
 
To make it work, you have to remember to draw the tails of the electron.
 
1:40 PM
And circuit failure. The insulation goes in an infinite loop.
@PhiNotPi Yep.
On the other hand, an odd wide wire as wide as the toroidal plane it stands on is okay, and follows to the right.
And dies out.
 
2:24 PM
@PhiNotPi Awesome.
 
I'm trying to find a delay wire right now, to cover 11 blocks in 22 ticks.
 
@PhiNotPi 11 : 22 = 1 : 2
So, you want to find a delay wire that covers half a block per tick.
I don't know how to help with that. -._(._.)_.-
 
woo! found one
 
@PhiNotPi \o/
Link? :D
 
delay wire: goo.gl/apNCXT
 
2:35 PM
Welcome @NinjaBearMonkey!
You have just joined the quest for Tetris!
 
o/
 
@PhiNotPi Sweet. Pretty compact too, which is nice.
 
@El'endiaStarman The hardest part was the checkerboard parity problem.
 
Ooh, so you had delays that were one less or one more than you wanted?
 
2:37 PM
As in, I wanted to move 11 blocks. It's easy to do 13, 15, etc. but getting an even 22 requires a diagonal move somewhere.
 
oh right
 
@CᴏɴᴏʀO'Bʀɪᴇɴ If you don't mind me asking, how long to you expect to take programming the circuit simulator?
What's the best way to do subtraction?
 
3:06 PM
It's typically implemented as addition + twos complement.
Speaking of which, we're gonna need an 11-clock.
 
 
2 hours later…
5:14 PM
@El'endiaStarman There's two ways to do that: convert numbers to 2's complement and use the adder we have now, or convert numbers to 1's complement and modify the adder so that carry-in can be optionally set to 1.
Both involve inverting a number, adding 1, and then adding the other number.
The difference is whether or not we want to combine the last 2 steps.
 
Huh, I see.
 
@Phi I'm aiming on having it done today (its 1317 for me), but if not today, then probably tomorrow
 
@CᴏɴᴏʀO'Bʀɪᴇɴ That's actually faster than I thought it would take.
For reference, I have ~0 javascript experience.
 
@phi :3 I'm a teen with little to do
 
How's progress so far?
 
5:20 PM
A general layout in my head.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ We're both eastern time?
 
Oh, cool! I didn't know that.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ :mv a-general-layout-in-my-head chat
Show it to us. (-_-)b
 
@zyabin101 It's basically already in chat.
 
5:26 PM
Oh, wow, I did more than I remember
some html and css >_>
 
haha, good!
 
Best thing ever.
That's a prophecy, by the way. ;)
 
I was being facetious then decided to make it more encouraging. :P
 
5:29 PM
haha :)
 
Allo!
 
the hardest part will be implementing variable-size tiles
 
I think we should have a dedicated 2's compliment converter (basically a combination of an inverter and an adder that only has to add 1).
 
5:36 PM
@El'endiaStarman do you have a suggestion for a relevant d3 doc/tutorial?
 
@PhiNotPi Mmm, that 2 is very nice looking today. ;) (s/compliment/complement)
@CᴏɴᴏʀO'Bʀɪᴇɴ Hmm, now I'm trying to remember which one gave me the crucial insights I needed. Lemme go find a couple sources.
 
okay, thanks :)
 
This is one of them: bost.ocks.org/mike/circles
I remember one of the big problems I had initially was that I thought D3 was more magical than it actually was. I thought that you just select elements and set their positions/etc. based on data, then when the data changed the elements would update too. No, you have to set the positions/etc. again in response to new data, after selecting the elements again. It's still pretty simple and easy though.
 
Ah, good to know
 
You can look at the source code of this and this to see how I implemented click-and-drag.
The graphical elements of my Spacewar! KotH were also implemented using SVG+D3.
 
5:44 PM
thanks, I wasn't particularly looking forward to click-and-drag
@El'endiaStarman Oh! I do have a little experience with d3, then
oh hey it's just a simple drag method of d3
 
Yeah, D3 handles the "oh, you're dragging this thing" part, and you handle what that does.
 
cool! it's a tad confusing that the event data is stored in the d3 object itself, but not passed to the on drag function
 
Design decision: Harvard or Von Neumann architecture?
 
What is the difference?
 
Well, I know nothing about either. :P
 
5:49 PM
me third
 
@PhiNotPi Straw poll.
 
Do we transfer data and execute actions at the same time (with different legs/snippets of the program/pattern) or do one at a time?
^ is the gist
 
ohey @EᴀsᴛᴇʀʟʏIʀᴋ
 
And also, should we have two separate memory banks (one that's ROM for the program and RAM for the data) or should we have one (RAM for everything).
 
5:50 PM
@zyabin101 hey
@PhiNotPi 2
 
You have just joined the q--- Wait, you already did without me looking.
 
@PhiNotPi I'm leaning towards two.
 
@El'endiaStarman quick d3 question
var circle = svg.selectAll("circle")
    .data([32, 57, 293], function(d) { return d; });

circle.enter().append("circle")
    .attr("cy", 60)
    .attr("cx", function(d, i) { return i * 100 + 30; })
    .attr("r", function(d) { return Math.sqrt(d); });

circle.exit().remove();
doesn't this add a circle in a circle?
or am I misunderstanding .enter?
 
@PhiNotPi I don't really feel strongly about either. I guess we'll have to wait a bit and see where the circuitry goes.
@zyabin101 I think this is somewhat pointless. It's very easy to tally up votes in chat. So far, it's one "we'll see". :P
 
5:57 PM
@El'endiaStarman D:
Then think I part the quest... ;_;
 
wow he actually left
 
the drama in GoL tetris
 
@CᴏɴᴏʀO'Bʀɪᴇɴ circle is, in this case, the set of of <circle> SVG elements (which is actually empty at the moment). Then the .enter() works on any data that hasn't been consumed yet, so for each datum, a <circle> is created with the appropriate attributes. The .exit() is for when the set of data shrinks, and in this case <circle>s are simply removed.
 
6:02 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes, three. But in that section, there are four pieces of data. Need to add one more circle.
 
oh
so, for each unbound data, a circle was added?
 
Incidentally, if you wanted to update elements, you do something like svg.selectAll("circle").attr("cx", function(d){return d;}). That is, just set the attributes on the list of circles.
@CᴏɴᴏʀO'Bʀɪᴇɴ Correct.
 
okay, I see.
 
Opposing-inputs and-not gate: goo.gl/TdjqN0
 
Nice!
It seems like you've gotten much better at developing circuitry.
 
6:17 PM
@El'endiaStarman I've also noticed this.
Remember the last time we tried to make delay wire and how much we were struggling?
 
I'm compiling a list of known components
We're actually missing a couple "wire" ones.
like a 3-way split or double-corner piece (like a wirecrossing but without the crossing)
 
Yeah, but I expect those will be fairly easy.
 
Then someone should make them.
 
6:34 PM
Well, I'm working on Pytek at the moment, so... :P
 
I'm doing circuitry!
 
hype!
@El'endiaStarman I see where your true priorities lie.
I'll probably make them after I make this list.
 
tile size: yay or nay
 
seems okay
Actually, maybe make them smaller.
 
6:40 PM
okay
that size is 50px, would 30px work? or 20px
 
It's a balance of big enough to see, small enough to fit a lot on a screen.
 
I could just make it customizable
like a slider or something
 
that'd be good
 
My attempt at making a 3-way splitter: goo.gl/uh5f4y
The bottom out wire is one step behind though.
 
@El'endiaStarman I think it's actually the other two outputs that are 1 step ahead
 
6:47 PM
is there a simple way of clearing an svg, or am I doing it wrong?
nvm, I'm doing it wrong
how do I update data?
 
If you want to delete all circles at once, svg.selectAll("circle").remove(). To update, svg.selectAll("circle").attr("cx", function(d, i){return 5*i;}).attr("cy", function(d, i){return 5*i;}), that sort of thing.
Basically, the things you can do with individual objects, you can do to selections (which apply the action to each object behind the scenes).
 
this.tiles.forEach(tile =>
	svg.append("rect")
		.attr("x", tile.x + 1.2 * this.cellWidth * this.tiles.filter(e => e.x < tile.x && e.y == tile.y).length)
		.attr("y", tile.y + 1.2 * this.cellWidth * this.tiles.filter(e => e.y < tile.y && e.x == tile.x).length)
		.attr("width", this.cellWidth * tile.width)
		.attr("height", this.cellWidth * tile.height)
		.attr("fill", "grey")
);
that's the code I'm using to construct it
this is a grid
when this.cellWidth is updated, I am running a function that would update all the cells
 
I think you should be able to just take out .append("rect") and have that work for updating.
 
oh
lemme check
 
no no no
wait
 
6:54 PM
okay?
 
You need svg.selectAll("rect").
 
okay, but then the associated tile object is not there
I am using tile classes to store the information
 
....uh? Wait, what does foo => bar() do? bar(foo)?
 
x => ... is the same as function(x){ return ... }
 
okay, gotcha
 
6:55 PM
it's a lambda, basically
 
What's tiles? Is it a D3 selection?
 
no, it's an array
 
An array of tile objects?
 
yeah
// PART 1: The UI
class Tile {
    constructor(x, y, width, height){
        width = width || 1;
        height = height || 1;
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
}

class Grid {
    /*
     * width and height are given in number of tiles
     * cellWidth is the display size of a cell
     */
    constructor(width, height, cellWidth){
        /* let board = [];
        for(let i = 0; i < height; i++){
            board[i] = [];
I hope you're not on mobile :p
the update func is at the bottom, this solution currently works
 
Haha, nope. I don't have a smartphone (yet). :P
 
6:59 PM
phew
 
List of components
=
A (+) indicates found, a (-) indicates missing
Everything is strictly directional and 11x11 unless specifed otherwise
 + wire
  + bidirectional straight
  + 4-long modular bendy
  + diagonal
  + corner
  + splits
   + 2-way, both configs
   - 3-way
  + wire-crossing
  - double corners (both configs)
  + 22:11 delay
 + AND/OR/XOR gates
  + opposing in, one out
  - opposing in, two out
  + adjacent in, one/two out
 + "A-AND-NOT-B" gates
  + opposing in, one out
  + adjacent in, input-A opposite to output
let me know what errors you see
 
are these things I'd have to implement BTW?
 
As tiles, yes.
 
gotcha
Should I add the ones that have -?
 
We'll probably figure those out before you need to worry about them. But yes.
 
7:09 PM
alright.
so I can use d3 to listen for events?
 
update(){
    var rects = svg.selectAll("rect.tile");
    rects.data(this.tiles)
      .enter().append("rect")
        .attr("fill", "gray")
        .attr("class", "tile");
    rects.exit().remove();
    rects.attr("x", function(tile){return tile.x + 1.2 * this.cellWidth * this.tiles.filter(e => e.x < tile.x && e.y == tile.y).length})
      .attr("y", function(tile){return tile.y + 1.2 * this.cellWidth * this.tiles.filter(e => e.y < tile.y && e.x == tile.x).length})
      .attr("width", function(tile){return this.cellWidth * tile.width})
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeah. IIRC you have to attach listeners, as usual, but that's easy. Again, you've got my code samples. :P
 
oh, right!
oo nice
 
You understand what I did there, right?
 
yeah
you added missing shapes, then updated the attributes using a tile as data, right?
 
Yep. tiles was already an array of data, so that was easy.
What's with the this.tiles.filter(...) functions?
 
7:17 PM
okay! fyi, you're code wouldn't work because the this reference changes inside the function. You'd have to rebind it (using function(tile){...}.bind(this)) or use an anonymous function
@El'endiaStarman that's a bug, it's different now
 
it used to only increase the y and x factor when there was a shape behind it >_>
I was overthinking the problem
 
ahh, okay
 
Now, it's just tile => tile.y + 1.2 * this.cellWidth * tile.y)
 
7:18 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ one thing you don't need to implement: the "4-long modular bendy wire"
 
okay, good to know
 
Yeah, it'd be just the same as a regular bidirectional wire.
 
okay, slight problem. I just finished typing up the code, and it says that rects.exit() is not a function
 
Except for its diode property, but the gates handle that anyway.
@CᴏɴᴏʀO'Bʀɪᴇɴ oh, um, one moment
 
take your time ^_^
 
7:21 PM
Change var rects = svg.selectAll("rect.tile"); to var rects = svg.selectAll("rect.tile").data(this.tiles); and take that .data out before the .enter on the next line.
 
\o/ it works now!
 
@CᴏɴᴏʀO'Bʀɪᴇɴ That black dot right under the button made me try to wipe it off.
 
7:25 PM
But anyway, awesome!
 
I was going to add a hover thing and that was the coors, but I failed on doing that
thanks!
 
ahh, lol
 
alright, now to implement rotation et al
do svg elements have a rotation attribute?
 
well that makes things easier
 
7:26 PM
Be careful about the order of translation and rotation. As a rule of thumb, rotate first, then translate.
 
So the way to rotate it is using transform?
 
ahh. should I use a translate property, or actually update the x and y?
 
I think there was a technicality that transforms are applied from last to first.
@CᴏɴᴏʀO'Bʀɪᴇɴ Probably better to use translate.
 
can I chain a .on statement after a .attr statement?
 
7:37 PM
Yyyes, maybe?
Probably would be clearer to just attach it to the selection directly.
 
svg.append("rect")
	.attr("x", tile.x + padFactor * this.cellWidth * tile.x)
	.attr("y", tile.y + padFactor * this.cellWidth * tile.y)
	.attr("width", this.cellWidth * tile.width)
	.attr("height", this.cellWidth * tile.height)
	.attr("fill", "grey")
	.attr("class", "tile")
	.on("drag", function(){
		console.log("dragging");
		let t = d3.select(this);
		t.attr("x", d3.event.x).attr("y", d3.event.y);
	})
this is part of the initial statement
 
Yeah, I'm fairly sure I've done that kind of thing myself.
 
okay, so I must be doing it wrong. no messages in the console
wait
I forgot d3.behavior.drag()
at least, that's how it is in your code
 
And my code definitely works. :P
 
so your code seems to have a generic drag behaviour defined for all elements?
and only does certain things for element s filtered within the function
 
7:41 PM
Hmm, no, it looks like I only applied my drag function to the things I wanted to be draggable.
 
oops, I missed the last line >_>
 
8:13 PM
I'm gonna be moderately busy tonight.
 
@PhiNotPi there might be a delay. my keyboard is borked
 
rip keyboard
 
not good for coding
 
What's wrong with it?
 
water splled on a few keys
,.lkonih6789 and the arrow keys
 
8:18 PM
Just don't use those characters. It's just like a PPCG challenge.
 
dont use . in javascript?? :/
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Copy-paste . when you need it?
This is, incidentally, precisely how one of my friends dealt with a broken a key.
 
8:30 PM
huh
alright I m getting the hang of it
 
im using an onscreen keyboard for my right hand and te actual keyboard for me left
 
Haha, nice.
 
this a test using both input devices but I keep forgettig I can use the keyboard :P
well ill depart for the moment
 
alright
 
9:08 PM
@Lynn hello!
 
Hiii~
 
@Lynn I just checked your user profile, you have more rep than me, and you've been a member for 4 years, but I somehow don't remember your name?
 
This is... interesting!
 
It's... complicated. We're very deep down the rabbit hole at this point.
 
it was mauris iirc
 
9:11 PM
So the plan is to make Game of Life Tetris?
(I was Mauris way back, yeah!)
(Though for a year or three I did a lot of nothing.)
 
okay, I figured you probably changed your username
@Lynn yes, that.
 
(Good curve, me.)
 
I don't know how much of the meta answer you've read, but our plan is pretty simple:
When in doubt, abstract it out.
 
So, GoL cells can be used to build metapixels, metapixels can be used to build logic gates, and logic gates can be used to build circuits.
 
9:30 PM
finally a good wire splitter: goo.gl/PN2dJq can be used for any number/direction of outputs, even as a corner.
 

« first day (100 days earlier)      last day (1349 days later) »