Re: [Jprogramming] Export system

2022-08-08 Thread Alex Shroyer
Maybe overkill, but interpreted language-based applications are often distributed these days via linux containers. Docker is the one I'm most familiar with. You can ship an opaque binary blob which bundles the interpreter and your script files, and expose only the ports and interfaces needed by

Re: [Jprogramming] A new episode of the ArrayCast podcast is available

2022-06-15 Thread Alex Shroyer
I use NumPy a lot for work, and something I realized when listening to this podcast was that I use NumPy's equivalent to dyadic transpose _all the time_ for machine learning tasks. Recently I had to transpose an array of N 64x64 RGB images (shape: N, 3, 64, 64) into something like (shape: N, 64,

Re: [Jprogramming] Dictionaries WAS: Report on the J wiki meeting of January 27, 2022

2022-02-01 Thread Alex Shroyer
In the past, I have implemented 2-column "pseudo-dictionaries" in J. It works, but feels very awkward compared to working with arrays: ]d=: (;:'a b c'),.1 2 3;'foo bar';(<;:'x y z') ┌─┬───┐ │a│1 2 3 │ ├─┼───┤ │b│foo bar│ ├─┼───┤ │c│┌─┬─┬─┐│ │ ││x│y│z││ │ │└─┴─┴─┘│ └─┴───┘

Re: [Jprogramming] Report on the J wiki meeting of January 27, 2022

2022-01-31 Thread Alex Shroyer
I agree with Raoul that competing with Python is not a good idea. But J can learn from Python's decisions (good and bad) to grow and improve. In my opinion, numpy is Python's "killer app" because it brings reasonable performance without much conceptual overhead. The feature of Python that enabled

Re: [Jprogramming] Feedback on beginner's code

2016-03-21 Thread Alex Shroyer
Fellow newbie here. If you're not already, I recommend using Voc and NuVoc at the same time. NuVoc provides a nice overview or reminder, while Voc has more depth. I find it useful to acquire a few new

Re: [Jprogramming] Am I understanding m/y ?

2016-02-24 Thread Alex Shroyer
d items, > > > > > > foldl =: 1 : 'm/`((|.m)/)' > > > > > > *`+ foldl\. >: i.7 > > 209 209 207 69 65 13 7 > > > > > > - Original Message - > > From: Alex Shroyer <ashro...@gmail.com> > > To: programm...@jsoftware.com > >

Re: [Jprogramming] Am I understanding m/y ?

2016-02-24 Thread Alex Shroyer
For Skip's example, a completely literal version: ((*`+)/)`((+`*)/)\. >:i.7 On Wed, Feb 24, 2016 at 9:25 AM, Brian Schott wrote: > Pascal, > > I think your <: is too limiting. But I love your approach. > > fn =: <@|.@[ (|.each@:|.@:($~ each 1 >. <:) 4 : 'x/ y' every

Re: [Jprogramming] Speed of prefix and suffix

2016-02-02 Thread Alex Shroyer
Good to know! I didn't appreciate this before. On Mon, Feb 1, 2016 at 7:38 AM, Henry Rich wrote: > See > > http://code.jsoftware.com/wiki/Vocabulary/bslash#More_Information > > Henry Rich > > > On 2/1/2016 5:51 AM, Ben Gorte - CITG wrote: > >> Good morning, >> >> I

Re: [Jprogramming] stopping a runaway process

2015-12-31 Thread Alex Shroyer
M, programming-requ...@forums.jsoftware.com wrote: > > > >> Date: Tue, 29 Dec 2015 21:19:00 -0500 > >> From: Alex Shroyer<ashro...@gmail.com> > >> To:programm...@jsoftware.com > >> Subject: [Jprogramming] stopping a runaway process > >> Message-ID: > >>

[Jprogramming] stopping a runaway process

2015-12-29 Thread Alex Shroyer
Is there a way to make it so Ctrl+C always interrupts the interpreter and/or stops the currently running J sentence? Sometimes I will be working on a sentence interactively, do something dumb, which results in having to kill the process, losing any unsaved state. It'd be nice if there was a way

Re: [Jprogramming] advent of code day 12

2015-12-14 Thread Alex Shroyer
Part 1 was simple with regex: +/".> '-?[[:digit:]]+' rxall d Part 2 stumped me, but I've been learning a lot from the solutions posted here. On Sun, Dec 13, 2015 at 11:54 AM, Henry Rich wrote: > Thank you. My code addresses the question "Given a point in a >

Re: [Jprogramming] regex confusion

2015-12-10 Thread Alex Shroyer
If you just want the *first* match, use *rxmatch*. Use *rxmatches* in when you want to keep doing *rxmatch* on the rest of the string after finding a match, until the end of the string. On Thu, Dec 10, 2015 at 6:33 AM, bill lam wrote: > I think this is the way that

Re: [Jprogramming] essay: toy byte code interpreter

2015-12-07 Thread Alex Shroyer
I also really enjoy this *func* verb. I've never seen a combination of documentation, unit tests, and implementation that was so free of extraneous nonsense. On Sun, Dec 6, 2015 at 1:12 PM, Brian Schott wrote: > Yes, now I see that func is executed when it is read in.

[Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Alex Shroyer
As Steve Yegge has pointed out , accessibility and marketing are what separate ideas that survive from ones that pass into obscurity. One thing I think J could be doing better is

Re: [Jprogramming] Addons should be easier for users to discover

2015-12-04 Thread Alex Shroyer
ugh > > > > > On Fri, Dec 4, 2015 at 3:43 PM, 'Pascal Jasmin' via Programming > <programm...@jsoftware.com> wrote: > > the md5 addon may be 20x-100x slower than gethash or my direct openssl > link. The challenge might have taken over 5 minutes to run with it. >

Re: [Jprogramming] adventofcode day 4

2015-12-04 Thread Alex Shroyer
Thanks for posting that. I've wondered several times how to do an "increment argument until condition" using the power conjunction and your example clarified it for me. I think it's the parentheses making the difference here: *(u^:(v))^:_ y* versus *(u)^:(v)^:_ y* On Fri, Dec 4, 2015 at

Re: [Jprogramming] advent of code - day 3

2015-12-03 Thread Alex Shroyer
I was stuck at '^v<>'i.s , but came up with these after I peeked at someone else's solution: part1=:#~.,+/\0,0j1 0j_1 _1 1{~'^v<>'i.s part2=:#~.,+/\0,0j1 0j_1 _1 1{~'^v<>'i._2]\s On Thu, Dec 3, 2015 at 8:59 AM, Joe Bogner wrote: > Mine: > > data=:fread

Re: [Jprogramming] HTML'izing J Code

2015-11-03 Thread Alex Shroyer
Vim has :TOhtml which exports an HTML version of the current buffer and renders any syntax highlighting with CSS. Emacs and the WebKit-based editors (Atom, Sublime Text) probably have something similar. On Tue, Nov 3, 2015 at 10:00 AM, chris burke wrote: > The J6 export

Re: [Jprogramming] auto completion

2015-11-02 Thread Alex Shroyer
The trailing space is a compiled-in feature of the readline library. It's annoying. Some python folks found a solution by recompiling readline from source after changing the default "rl_completion_append_character" from ' ' (space) to

Re: [Jprogramming] USB port communication?

2015-10-10 Thread Alex Shroyer
library that I use is available as a J addon; or you can write your own. Henry Rich On 10/9/2015 11:07 PM, Alex Shroyer wrote: > I build USB devices, including keyboards, mice, HID, and Serial. I'd like > to interface them with J, but so far haven't found a clear path toward that

[Jprogramming] USB port communication?

2015-10-09 Thread Alex Shroyer
I build USB devices, including keyboards, mice, HID, and Serial. I'd like to interface them with J, but so far haven't found a clear path toward that goal. Looking at node-serialport and pyserial, it seems other interpreted languages' approach is to make a wrapper for the various platform DLLs

Re: [Jprogramming] Dissect verb font WAS: Generate Complete Graphs

2015-09-27 Thread Alex Shroyer
Input looks interesting: http://input.fontbureau.com/info/ -Original Message- From: "bill lam" Sent: ‎9/‎27/‎2015 4:36 AM To: "Programming forum" Subject: Re: [Jprogramming] Dissect verb font WAS: Generate Complete Graphs I don't think

Re: [Jprogramming] Dissect verb font WAS: Generate Complete Graphs

2015-09-27 Thread Alex Shroyer
-Original Message- From: "bill lam" Sent: ‎9/‎27/‎2015 4:36 AM To: "Programming forum" Subject: Re: [Jprogramming] Dissect verb font WAS: Generate Complete Graphs I don't think so. Ubuntu is not linux, it is just one distro of linux,

Re: [Jprogramming] explanation?

2015-09-23 Thread Alex Shroyer
On Wed, Sep 23, 2015 at 11:14 AM, R.E. Boss wrote: > _2 1 E. 1 2 _1 _2 1 Really strange. The presence of a _1 before the target seems to make it ignore everything after the _1. 9 E. _1 9 NB. fine when _1 is first item of y 0 1 9 E. 2 _1 9 NB. but not if there

Re: [Jprogramming] video: Ulam's Spiral

2015-09-08 Thread Alex Shroyer
es. > > On Tue, Sep 8, 2015 at 10:17 AM, Alex Shroyer <ashro...@gmail.com> wrote: > > > Thanks for sharing! I found the presentation very accessible as a J > newbie. > > > > Question - what are you using for syntax highlighting in your terminal? > > > >

Re: [Jprogramming] video: Ulam's Spiral

2015-09-08 Thread Alex Shroyer
Thanks for sharing! I found the presentation very accessible as a J newbie. Question - what are you using for syntax highlighting in your terminal? On Tue, Sep 8, 2015 at 11:04 AM, Michal Wallace wrote: > Awesome! Feel free. :) > > I recorded it with a program called