Windows username with a space in it

35 views
Skip to first unread message

John-Philip Butler

unread,
Jun 3, 2025, 5:51:12 AM6/3/25
to forum
I am delivering a tool written in J to a Windows user with a space in her username, and this seems to break up everything.

I have tried adding a symlink alongside the home directory, without the space in it. This only helps start J. I then tried patching jpath (by patching SystemFolders_j_ and UserFolders_j_), but load_z_ does not seem to like the idea of following the symlink.

Any other ideas?


bill lam

unread,
Jun 3, 2025, 6:16:26 AM6/3/25
to fo...@jsoftware.com
Space in user path should work otherwise it is a bug. Please give details and error messages.

To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.

John-Philip Butler

unread,
Jun 3, 2025, 7:08:49 AM6/3/25
to forum, bill lam
thanks, i will doiuble check

Devon McCormick

unread,
Jun 3, 2025, 12:37:02 PM6/3/25
to fo...@jsoftware.com, bill lam
It would be helpful to see an example of the failing code.
--

Devon McCormick

Flâneur


John-Philip Butler

unread,
Jun 6, 2025, 4:11:54 AM6/6/25
to forum, Devon McCormick, bill lam, de...@acm.org
The error is on my side. I have my own version of load, sitting on top of load_z_, which loads *.ijl or *.ijs files depending on my build settings (a flag indicating whether i want to use locked scripts, and a list indicating which scripts should be locked).  The idea is not having to modify the source code in order to export a version that uses *.ijl. My code simply uses cut to separate the module names; my verb or getscripts probably gets called twice in some cases (i do not have any spaces in the original calls, just raw addon names or tilde expansions).  To some extent the same applies to require, but my usage differs: I usually require addons, but load my own modules because they are constantly changing.

There are actually quite a few cases to cover:
* addon defaults
* tilde expansions
* absolute pathnames
* relative pathnames
This makes it difficult to find module names in the argument in an efficient way.

Bootstrapping is an issue because the modified load and dependencies have to be accessible in an *.ijs file at startup.

Finally, my code is naive because the *.ijl files are currently expected to be in the same location as their *.ijs equivalents. This is a bad idea in case I have to deliver multiple products that use different versions of the same libraries. I guess it would be better to have all the files for one project in the same directory for delivery.  This differs from development needs, where it is best to share the latest version of *.ijs files between all ongoing projects.

Maybe the whole plan is a bad idea and I should simply use a 3 : 0 declaration to explicitely state whether i want *.ijs or *.ijl.

bill lam

unread,
Jun 6, 2025, 8:48:56 AM6/6/25
to John-Philip Butler, forum, Devon McCormick, de...@acm.org
The file extension is irrelevant. You can rename ijl to ijs

John-Philip Butler

unread,
Jun 6, 2025, 9:17:37 AM6/6/25
to forum, bill lam, forum, Devon McCormick, de...@acm.org, John-Philip Butler
Oh great! that certainly makes life easier.

John-Philip Butler

unread,
Jun 6, 2025, 12:36:14 PM6/6/25
to forum, John-Philip Butler, bill lam, forum, Devon McCormick, de...@acm.org
I guess i should start working with multiple user directories for different uses: direct use & development, testing, staging for delivery
Reply all
Reply to author
Forward
0 new messages