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 the

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, 6

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││ │ │└─┴─┴─┘│ └─┴───┘ get

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 n

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 J

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

2016-02-24 Thread Alex Shroyer
1.7 0.33 9 _5 _1 7 > > Nice! I think the foldl definition can be classified "simple" as well! > > Skip > > > On Wed, Feb 24, 2016 at 11:02 AM, Pascal Jasmin > wrote: > > with just 2 gerund items, > > > > > > foldl =: 1 : 'm/`

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 <\.@]) ] > fn =: <@|.@[

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 stumbled into something I fou

Re: [Jprogramming] stopping a runaway process

2015-12-31 Thread Alex Shroyer
gt; > Once the page faulting starts there's no hope for finding jbreak. I can > > interrupt explicit code without losing the j console session, not so > with a > > tacit sentence. > > > > On 12/29/2015 09:23 PM, programming-requ...@forums.jsoftware.com wrot

[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 to

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 > parenthesized string, what is the s

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 rxmatches works, it iterates

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. For some reason in > this c

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 12:46

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

2015-12-04 Thread Alex Shroyer
k. I'd rather have a few places than not enough places though > > > > > On Fri, Dec 4, 2015 at 3:43 PM, 'Pascal Jasmin' via Programming > wrote: > > the md5 addon may be 20x-100x slower than gethash or my direct openssl > link. The challenge mig

[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 m

Re: [Jprogramming] advent of code - day 3

2015-12-03 Thread Alex Shroyer
or pairs should probably always be done? It makes > your part 2 especially elegant. > > > > > - Original Message - > From: Alex Shroyer > To: programm...@jsoftware.com > Sent: Thursday, December 3, 2015 11:25 AM > Subject: Re: [Jprogramming] advent of code -

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 'advent2015/day3.txt' > getMoves=: ((0,1)

Re: [Jprogramming] 'Tis the Season...

2015-12-02 Thread Alex Shroyer
Wow, mine is almost identical to Joe's second one: +/<:') ('i. S On Tue, Dec 1, 2015 at 5:17 PM, Joe Bogner wrote: > +/ (1,_1) {~ '()' i. S > > or > > +/ _1 + ') (' i. S > > On Tue, Dec 1, 2015 at 5:09 PM, 'Pascal Jasmin' via Programming < > programm...@jsoftware.com> wrote: > > > -/ #/.~ S > >

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 script should work fine

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 '\0

Re: [Jprogramming] USB port communication?

2015-10-10 Thread Alex Shroyer
n 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 > goal. > > Looking at node-serialport an

[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

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 so. Ubuntu is not linux, it is just one distro of

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, there are several hundreds of linux distro. msfont i

Re: [Jprogramming] Arrayfire bindings

2015-09-26 Thread Alex Shroyer
Very cool. I did an audio processing thing in J a while back which I think would have benefited from something like this. Perhaps now I'll re-implement it using Jfire. Thanks for sharing! Alex -Original Message- From: "'Pascal Jasmin' via Programming" Sent: ‎9/‎26/‎2015 7:03 PM To: "P

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 is anything prior to the

Re: [Jprogramming] video: Ulam's Spiral

2015-09-08 Thread Alex Shroyer
Cool, thanks! On Tue, Sep 8, 2015 at 11:42 AM, Michal Wallace wrote: > You can enable syntax highlighting in the terminal under Edit/Configure/Qt > Ide. > Just set TermSyntaxHighlight=true > > You can change the colors under Edit/Configure/Styles. > > On Tue, Sep 8, 2

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 FFSplit ( http://www.ffspl