11 Oct 2024 |
discodoug | CMC: Implement the [Klotski puzzle](https://en.wikipedia.org/wiki/Klotski). | 05:50:08 |
ktye_67449 | if you don't have avx512 you can run it with intel's emulator. you need some flags like -mavx512f to compile it. look at the error message and add the flags one by one. | 06:17:26 |
miku.rb | Good deal | 06:33:00 |
anaseto | In reply to @_discord_385956474146258944:t2bot.io it makes sense, thanks Thinking about it, I finally made exp and log accept an optional base left argument, like J and BQN do. So exp can now be used for power. I originally just based math functions off AWK's, because of minimalism, but dyadic extension is actually nice in an array language (and power is probably used more often with bases other than e). It does also offer somewhat better precision in some edge-cases than the user-defined power function did. | 08:36:11 |
| @sjjssk:matrix.org joined the room. | 11:35:49 |
| @sjjssk:matrix.org joined the room. | 11:57:56 |
| @sjjssk:matrix.org left the room. | 11:58:29 |
| olabaz | 15:48:40 |
12 Oct 2024 |
discodoug | 43! | 21:47:06 |
13 Oct 2024 |
| @saucerr:matrix.org joined the room. | 01:10:01 |
@saucerr:matrix.org | Redacted or Malformed Event | 19:34:27 |
| Marshall banned @saucerr:matrix.org. | 19:35:18 |
vendethiel | @Admin | 19:36:57 |
_elcaro_ | re: "quick turns", whenever I implement snake, the key-presses get appended to a list, and each tick the top move is popped off and processed (and is discarded if it is opposite to the current direction) that way no input gets dropped. | 23:39:57 |
_elcaro_ | My J Raylib snake is [here](https://github.com/0racle/j-raylib/blob/main/examples/snake.ijs). dbuf is the direction buffer (list). | 23:43:49 |
_elcaro_ | In my version, hitting the wall also == death, but converting this to a toroidal snake wouldn't be too hard | 23:44:24 |
14 Oct 2024 |
discodoug | Yeah, that's an option too, though I find when I play and it gets tight my fingers fumble a bit and so making up for that before the tick feels like it may be a plus. | 00:28:14 |
discodoug | In my version I used a circular buffer for the "worm" (not sure why I thought of it as a worm...) mostly because it felt like less shuffling of memory though it hardly matters. | 00:31:11 |
discodoug | _elcaro_ Is there a playable version of yours online? | 00:33:52 |
_elcaro_ | No, unfortunately not. | 00:47:43 |
_elcaro_ | The only web-playable snake I have was written using [p5.js](https://p5js.org/), but otherwise is implemented in a similar way... but it's on an old hdd that I can't access right now. | 00:49:20 |
discodoug | Rats. @ktye started working on some [raylib bindings for k](https://github.com/ktye/i/blob/master/%2B/ray/ray.c). I wonder what it would take to integrate some ffi bindings into the online WASM. | 00:52:42 |
discodoug | I actually kind of like the lofi aesthetic of the games in the the online section, but having better control over the graphics would be a whole new avenue to explore. My other idea was exposing underlying K arrays to the JS side so that you could use a K array as the canvas buffer rather than using canvas methods to draw. | 00:57:30 |
discodoug | I think this shouldn't be too hard. I poked around a bit but never polished it off. | 00:57:56 |
_elcaro_ | Yeah, I recall tangentstorm looked a little into getting raylib bindings working in the wasm J, but I don't think he got very far. | 01:04:42 |
_elcaro_ | Hrm, ok there was a version saved in the p5.js web editor. [Link](https://editor.p5js.org/0rac1e/full/SKwMBvfbU)
Obviously, JS is not an arrraylang... but this version plays almost identically to my J version.
Moves are pushed onto an array called keys , and the top one popped of and processed in the draw function.
You'll notice you can rapidly hammer - for example - Up Left Up Left Up Left Up Left... and the snake will zig-zag up the screen. Rapid U-turns are also easy to do | 01:13:51 |
discodoug | 53!! | 08:09:31 |
15 Oct 2024 |
| tortus_ changed their profile picture. | 04:44:04 |
| alveb changed their profile picture. | 10:04:41 |
anaseto | I've improved run and open a bit for advanced usages: they now accept a dict as left argument too, which can be used to more finely configure the stdin, stdout, and stderr of the command, as well as environment and working directory. I summarized usage in a table in the FAQ. | 17:00:39 |