Re: [Jgeneral] problem matching single characters in boxed data from file

2023-08-30 Thread Dimitri Georganas
Many thanks, all clear now. The comma did the trick. ] rawdata =: fread'/home/dg/dev/za2.txt' 1,2,3,b,4 1,2,3,c,4 ] data=: >',' cut each cutLF rawdata ┌─┬─┬─┬─┬─┐ │1│2│3│b│4│ ├─┼─┼─┼─┼─┤ │1│2│3│c│4│ └─┴─┴─┴─┴─┘ (<*,*'c') = data 0 0 0 1 0 0 0 0 0 0 (<,'c') = data 0 0 0 0 0 0 0 0 1 0 On

Re: [Jgeneral] problem matching single characters in boxed data from file

2023-08-30 Thread 'Pascal Jasmin' via General
,$ &> ;: 'a b c'  NB. words, or csv create boxed lists 1 1 1 $ 'Q' NB. atom $ ,'Q' NB. list 1 On Wednesday, August 30, 2023 at 02:59:28 p.m. EDT, Raul Miller wrote:   'Q'-:,'Q' 0 -- Raul On Wed, Aug 30, 2023 at 2:19 PM Dimitri Georganas wrote: > > Hi all, > > Small problem or

Re: [Jgeneral] problem matching single characters in boxed data from file

2023-08-30 Thread Raul Miller
'Q'-:,'Q' 0 -- Raul On Wed, Aug 30, 2023 at 2:19 PM Dimitri Georganas wrote: > > Hi all, > > Small problem or newbie trap? After loading a table using 'tables/csv' (or > tables/dsv' - doesn't matter), I noticed that single characters are not > being matched using the below approach. (J

[Jgeneral] problem matching single characters in boxed data from file

2023-08-30 Thread Dimitri Georganas
Hi all, Small problem or newbie trap? After loading a table using 'tables/csv' (or tables/dsv' - doesn't matter), I noticed that single characters are not being matched using the below approach. (J version 9.4) on Ubuntu Linux 22.04. Is there some hidden character that causes the match to fail?

Re: [Jgeneral] Nub on float array

2023-08-30 Thread Raul Miller
The issue of the cost/benefit function to choose between an O(m*n) approach and an O((m+n)*log m) approach is difficult, and probably does not have a perfect solution. Still, designing an approach which has better worse case behavior seems relatively straightforward. For example: minpos=:

Re: [Jgeneral] help on gui

2023-08-30 Thread 'robert therriault' via General
Markus, You have asked a very timely question. I have been updating the Primer over the last month and GUI part 1 is the page that I am currrently working on. Ed's suggestion is an excellent one for the time being. I would appreciate any feedback that you can give as I update the GUI section

Re: [Jgeneral] help on gui

2023-08-30 Thread Ed Gottsman
Markus, When I started, I pulled on the thread that starts at https://code.jsoftware.com/wiki/Guides/Window_Driver I’d be happy to (try to) answer any questions. Ed > On Aug 30, 2023, at 4:36 PM, Schmidt-Gröttrup, Markus > wrote: > > I need help on GUI programming. > The page

[Jgeneral] help on gui

2023-08-30 Thread Schmidt-Gröttrup , Markus
I need help on GUI programming. The page https://code.jsoftware.com/wiki/Help/Primer/100_GUI_part_1 unfortuneatly is not up to date, I miss the menu item Edit|Form Editor. Any tutorial available in the wiki? Thanks for a tip, Markus

Re: [Jgeneral] Nub on float array

2023-08-30 Thread Henry Rich
1. For lists, sort-then-search is more expensive than the hashtable usually.  Also, the order of inputs matters, as tolerant-equals is not transitive. 2. For tables, which we were discussing, sort (always intolerant) doesn't get the job done.  The entire first column might be tolerantly

Re: [Jgeneral] Nub on float array

2023-08-30 Thread Raul Miller
Shouldn't tolerant i.~ use grade, sort and a binary search? Thanks, -- Raul On Tue, Aug 29, 2023 at 10:19 PM Henry Rich wrote: > > See https://code.jsoftware.com/wiki/Vocabulary/IFamily#Performance . > > Tolerant i.-family operations on arrays are tough. They end up doing > sequential

Re: [Jgeneral] Nub on float array

2023-08-30 Thread Ben Gorte
Hello Henry, thanks a lot! I must have read this page once, but hadn't made the connection. Adding !.0 does the trick wonderfully, and I can forget my workaround (what workaround?) Ben On Wed, 30 Aug 2023 at 12:19, Henry Rich wrote: > See