418 karma · joined Dec 16, 2018 (7y ago) · 68 submissions
comment 1y ago · link · parent
comment 1y ago · link · parent
'0 stays as "null"-like (e.g INVALID), and '1 (which would be 0xFF in an 8 bit byte for instance) becomes "something, but I'm not sure what" (e.g. UNKNOWN).
Definitely has the same issues as referenced when needing to grow the variable, and the times where it's useful aren't super common, but I do feel like the general concept of an unknown-but-not-invalid value can help with tracking down errors in processing chains Definitely do run into the need to "beware" though with enums for sure.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
I'm not really sure what types of solutions currently exist in these spaces, and I'm sure that this would be a very expensive solution for this topic, but future thinking possibilities of this type of thing seem like they could have applications outside of just VR.
comment 2y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
I put the following prompt into ChatGPT (no GPT-4 access for me yet):
*A problem statement is given as follows:
An agent needs to find the best path on a 10x10 tile grid from their current location to a target location. They have a limited movement range of 5 points. Regular tiles cost 1 point to move through, water tiles cost 2 points to move through. Fire tiles cost 1 point to move through, but they should avoid pathing through them even if it means taking a longer path to their destination (provided the path is still within their limited movement range)
Please point out any parts of the problem statement that require clarification.*
Which returned the following response:
Based on the given problem statement, some potential areas that may require clarification are:
Current location and target location: It is not clear if the current location and the target location are fixed or if they change with each problem instance. If they are fixed, it should be mentioned explicitly. If they are not fixed, it should be specified how they are generated for each problem instance.
Movement range: It is not specified whether the agent's movement range is circular or square. If it is circular, it means that the agent can move to any tile that is within a distance of 5 from its current location. If it is square, it means that the agent can move to any tile that is within a range of 5 tiles in both the horizontal and vertical directions. The shape of the movement range needs to be specified.
Fire tiles: The problem statement mentions that the agent should avoid pathing through fire tiles even if it means taking a longer path to their destination, but it is not clear how the agent knows which tiles are fire tiles. It should be specified how the agent perceives and distinguishes fire tiles from regular tiles.
Tile costs: The problem statement mentions that regular tiles cost 1 point and water tiles cost 2 points, but it is not specified what happens if the agent moves diagonally. It should be specified whether diagonal moves are allowed and how much they cost.
Objective function: It is not specified how the "best path" is defined. It should be mentioned whether the objective is to find the shortest path or the path that minimizes some other cost function (e.g., total cost of the path).
comment 3y ago · link · parent
comment 4y ago · link · parent
"High Impedance is the debut album by Canadian musician Colin James, released in 1988."
Not...exactly...what I was expecting.
comment 4y ago · link · parent
comment 4y ago · link · parent
I had tried some initial URL hacking that didn't work, but think I found the set here: https://usda.library.cornell.edu/concern/publications/k35694...
comment 4y ago · link · parent
It even does pretty good with Verilog, which I assumed it would have issues with, admittedly some of this is just "google-able", but even so. It can even create a reasonable attempt at a testbench (even though it doesn't quite get it right), which is crazy to me.
*Explain this code:
module my_module(a,c,y); input a,c; output y; assign y= c ? a : 1'bz; endmodule*
This code is a Verilog module that defines three inputs (a, c, y) and one output (y). The output y is assigned to the value of a if c is true, otherwise it is assigned to 1'bz.
*What is 1'bz ?*
1'bz is a Verilog constant that represents a bit value of 'z', which is used to indicate a high impedance state.
*Why is high impedance used ?*
High impedance is used in digital circuits to allow multiple drivers to share a single bus without contention. When two or more drivers attempt to drive the same bus at the same time, a contention can occur and the bus voltage can become undefined. By using high impedance, drivers can avoid contention and allow the bus to remain stable.
*Give me a testbench for this module*
module testbench; reg a; reg c; wire y;
my_module dut(a, c, y);
initial begin
a = 1'b0;
c = 1'b0;
#1;
a = 1'b1;
c = 1'b1;
#1;
a = 1'bz;
c = 1'b1;
#1;
a = 1'bx;
c = 1'b1;
#1;
$stop;
end
endmodule*Create the same testbench but add validation of the output.*
module testbench; reg a; reg c; wire y;
my_module dut(a, c, y);
initial begin
a = 1'b0;
c = 1'b0;
#1;
a = 1'b1;
c = 1'b1;
#1;
a = 1'bz;
c = 1'b1;
#1;
a = 1'bx;
c = 1'b1;
#1;
$stop;
end
always @(*) begin
if (c == 1'b0)
assert(y == 1'b0);
else if (c == 1'b1)
assert(y == a);
else if (c == 1'bz)
assert(y == 1'bz);
else if (c == 1'bx)
assert(y == 1'bx);
end
endmodulecomment 4y ago · link · parent
comment 4y ago · link · parent
https://physics.aps.org/articles/v15/19 as an example.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
I feel like there's also something in this topic that relates to things like "going to" getting reduced to "gonna".
comment 5y ago · link · parent
x / (x+y+1) :: https://www.wolframalpha.com/input/?i=plot+x+%2F%28x+%2B+y+%...
horrendous formula :: https://www.wolframalpha.com/input/?i=plot+%28%28x%2F%28x%2B...
Much less prone to typos.