config.cson:
editor:
softWrap: false
softWrapAtPreferredLineLength: false
keymap.cson:
/* If you are getting bombarded with suggestions then I apologise for joining the throng. | |
I really like the direction you are going with Jai, and these ideas came to me | |
unbidden; I thought I should share them: */ | |
// 1. Generalise 'else' so it works on any given code block: it executes if the preceding | |
// block did not. Predominately this would be for 'for' and 'while' loops. | |
// For example: | |
if message { |
config.cson:
editor:
softWrap: false
softWrapAtPreferredLineLength: false
keymap.cson:
The way Jai does compiler options, using the Compiler module instead of command line arguments to the compiler, is good for use inside a project. When you're only compiling individual files, however, it is pretty clunky: you have to include effectively the script presented below in each program you write. To get round this, and speed up learning the language and testing it out, I've set up vscode to compile and run the current script with my chosen build options as one action. This involves a jai script (I say script because it never compiles to an exe) and a batch file. The setup is very basic right now, it could easily be expanded to allow you to pass in the exe name, etc. It works like this:
This is effectively a wrapper jai script which is compiled in order to compile the target program.
/* | |
Original c code; this is a routine from stbsprintf distilled down to the main flow control | |
Lots of lines were omitted; where it looks like there is redundant flow, imagine lines of code exist | |
between the redundant statements. | |
*/ | |
original :: () { | |
for (;;) { | |
if (0 == (bf = buf = callback(buf, user, len))) | |
goto done; |
#include Console/console++ | |
-- GUIDS | |
deck_a_guid = 'b99779' | |
deck_b_guid = '3e5111' | |
deck_c_guid = '29c75c' | |
d4_guid = '2a263c' | |
d6_guid = '6f3619' |
The goal is to provide a more intuitive VR experience; closer to how you would play a board game IRL. This is still in development, consider it an alpha test! To enable the new control scheme type -vr_controls_original
into the system console.
Various commands in the system console govern vr behaviour: type help vr
to see them. For example, turning vr_sticky_grab
on will mean you do not have to hold the trigger to maintain grip on an object; instead you press to grab, then press again to release. If you want these commands to persist then add them to your autoexec (type edit autoexec
and enter them there).
You can quickly switch between old and new controls if you do something like bind right_control !vr_controls_original
(...you can then hit right control to toggle)