works fine for me.
>
> Henry Rich
>
>
>
>
> On 6/8/2017 10:07 AM, Michael Rice wrote:
>
>> @ Raul Miller
>>
>> Back in Win 10 jqt now. Here's what I get for inputting the first four
>> functions:
>>
>> move_table=:
ndow, then
> go back to the yellow window to try it out).
>
> Meanwhile:
>
>solitaire 0 10 14
> No solution
>timespacex 'solitaire 0 10 14'
> 6.53433 41600
>
> Thanks,
>
> --
> Raul
>
>
> On Thu, Jun 8, 2017 at 8:37 AM, Michael Rice
ing wrong with this approach, let me know
> and I'll see if I can wrap my head around those issues.
>
> Thanks,
>
> --
> Raul
>
>
> On Wed, Jun 7, 2017 at 11:21 PM, Michael Rice wrote:
> > @ Raul Miller
> >
> > "I guess I disagree with the mode
; so f empty is a verb (a hook)
> > >
> > > f=: 1&,
> > > (f empty) 3
> > >
> > >
> > >
> > > $(f empty) 3
> > > 3 0
> > > $(f empty) 5
> > > 5 0
> > >
> > > The reasons for
(f empty) 3
> >
> >
> >
> > $(f empty) 3
> > 3 0
> > $(f empty) 5
> > 5 0
> >
> > The reasons for this are documented at
> > http://www.jsoftware.com/help/dictionary/dictf.htm (hooks) and
> > http://www.jsoftware.com/h
sive parameters.
>
> And for the peg problem, I only see three significant arrays: the
> board, the moves to reach that board and the list of legal moves.
> Recursive contexts give you a stack, allowing you to backtrack with
> these arrays. I'm not seeing why you need more than
giving up on. Usually, though, "academic exercises" - which
> typically focus more on how the goal is reached than on reaching the
> goal - tend to feel forced in J.)
>
> Thanks,
>
> --
> Raul
>
>
> On Wed, Jun 7, 2017 at 1:03 PM, Michael Rice wrote:
> > @rober
onary/dictf.htm (hooks) and
> > http://www.jsoftware.com/help/dictionary/d630n.htm (x m&v y).
> >
> > That said, verbs take arguments and empty is a verb - it always
> > produces an empty result, but only when it gets an argument.
> >
> > I hope this helps,
&
1:39 AM, Michael Rice wrote:
> Oops! Guess I creamed empty. Will close and regen Jqt before proceeding.
>
> Done!
>
>f =: (1&,)
>f 2
> 1 2
>f empty
> f empty
>
> Shouldn't it have returned
>
> 1
>
> ?
>
> On Wed, Jun 7,
; > I may be wrong in doing this, but I usually write
> > empty=: ''
> > to signify an empty list, array, matrix etc.
> >
> >
> > On Jun 7, 2017, 23:59, at 23:59, Michael Rice
> wrote:
> >> Is there a special "noun" for an empty
Is there a special "noun" for an empty list?
Creating one seems enigmatic.
empty =: 1 2
empty
1 2
empty =: }. empty
empty
2
empty =: }. empty
empty
empty1 =:
|syntax error
| empty1=:
--
For information abo
For a 0,1,2,3 4,...n representation of the board, I take it?
Thanks.
Michael
On Tue, Jun 6, 2017 at 10:18 AM, Henry Rich wrote:
> I use
>
> setintersect =: e. # [
>
> Henry Rich
>
>
> On 6/6/2017 6:11 AM, 'Mike Day' via Programming wrote:
>
>> My poi
> If you're not getting this, it might be worth looking at where your
> intermediate results start conflicting with the ones I've shown here?
>
> Thanks,
>
> --
> Raul
>
>
> On Tue, Jun 6, 2017 at 8:53 AM, Michael Rice wrote:
> > For a starting state of posit
;Mike Day' via Programming <
programm...@jsoftware.com> wrote:
> My point being, if Michael Rice is exploring how to solve peg solitaire,
> it's often useful to work on small(er) problems, before perhaps getting
> stuck in a long loop, or seeing the memory climb and o
actorial=: !
>
> factorial=: (* $:@<:)`1:@.(1>])"0
>
> Or, if you prefer:
>
> factorial=: (* factorial@<:)`1:@.(1>])"0
>
> Note that (* $:@<:)`1:@.(1>])"0 is far less efficient than ! but at
> least it's less genera
Keep it simple, please.
---
From "Learning J":
*To compute the sum of a list of numbers, we have seen the verb +/ but let
us look at another way of defining a summing verb.*
*The sum of an empty list of numbers is zero, and otherwise the sum is the
first item plus the su
1
> 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1
>0 2 5 f 5 f 15$1
> 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1
>3 1 0 f 0 2 5 f 5 f 15$1
> 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1
>
> Пн, 05 июн 2017, Michael Rice написал(а):
> > The gap between J and most computer languages is pretty wide.
> >
ves for the current
> board) and 3 (a path list for the solution, initially empty) in this
> description?
>
> Thanks,
>
> --
> Raul
>
>
> On Mon, Jun 5, 2017 at 12:39 AM, Michael Rice wrote:
> > The gap between J and most computer languages is pretty wide.
&g
>
> This sort of rephrasing might get a more involved if we started to get
> into variable width values for z, but it's not yet clear to me if that
> becomes necessary, nor what the patterns would be like if we went
> there.
>
> Hopefully that makes sense?
>
> Thanks,
>
ill lam wrote:
> I have difficulty in reading your code, perhaps you want to
> make everything looks functional. To that end, you may
> replace the if/then with @. (agenda)
> (+./ @: ({ & id))`({ & id)@.((< & 2) @: #)
>
> (untested and not sure if this is a simplicat
0
move_table legal_moves board
On Sun, Jun 4, 2017 at 10:03 AM, Raul Miller wrote:
> Like this?
>
>(#~ 5=2#.@:|])z
> 3 4 5
>
> --
> Raul
>
>
> On Sun, Jun 4, 2017 at 9:43 AM, Michael Rice wrote:
> > How about
> >1 0 1 0 1 0 (#~ ((-: &
Because 1=#$0 1 0:
> ] #~ (0 1 0 -:"1 ])@:(z { [)
> Trains:
> ] #~ (0 1 0 -:"1 ]@:(z { [))
> ] #~ 0 1 0 -:"1 ]@:(z { ])
> ] #~ 0 1 0 -:"1 z { [
>
> Can't get it any simpler.
>
> Cheers,
> Louis
>
>
z =: 2 3 $ i.6
z
0 1 2
3 4 5
z { 1 0 1 0 1 0
1 0 1
0 1 0
(-: & 0 1 0) z { 1 0 1 0 1 0
0
(-: & 0 1 0)"1 z { 1 0 1 0 1 0
0 1
((-: & 0 1 0)"1 z { 1 0 1 0 1 0) # z
3 4 5
z #~ ((-: & 0 1 0)"1 z { 1 0 1 0 1 0)
3 4 5
z #~ ((-: & 0 1 0)"1 (1 0 1 0 1 0 {~ z))
3 4 5
z #~ ((-: & 0 1
nding webkit for Qt. I had googled, some
> said they used command
> rpm -qa | grep qt5
> to list all qt5 packages.
>
> In any case, linux jqt binaries is consist of only 2 files:
> jqt and libjqt.so and it will never mess up distro' Qt binaries.
>
> Вт, 30 май 2017, Mich
like windows and Mac, jqt does not
> bundle Qt libs under linux. Users are expected to get them from their linux
> distro.
>
>
>
>
> On 30 May, 2017 9:55 am, "Michael Rice" wrote:
>
> My memory tells me I've done this before, got this result, and moved on to
code.jsoftware.com/wiki/System/Installation
> <http://code.jsoftware.com/wiki/System/Installation/Linux>
>
>
> On 30 May, 2017 8:37 am, "Michael Rice" wrote:
>
> Only three .deb versions are listed here for Linux download:
> http://code.jsoftware.com/wiki/Syst
Only three .deb versions are listed here for Linux download:
http://code.jsoftware.com/wiki/System/Installation/Linux
On Mon, May 29, 2017 at 8:25 PM, bill lam wrote:
> If you can't install the deb, try the tgz version.
>
> On 30 May, 2017 7:54 am, "Michael Rice" wrote
:
>id&{~ k
>k id&{ k
>
> ... but you probably do not want to go there right now...
>
> --
>
> Finally, for installation problems (getting J to run on fedora), if
> you have time, maybe post the errors you were getting (along with what
> you did to get them) to
ting J to run on fedora), if
> you have time, maybe post the errors you were getting (along with what
> you did to get them) to the general@jsoftware list?
>
> Thanks,
>
> --
> Raul
>
>
> On Mon, May 29, 2017 at 11:15 AM, Michael Rice
> wrote:
> > (id {~ ])?
>
gt; (except for arguments outside the domain).
>
> I hope this helps,
>
> --
> Raul
>
>
> On Mon, May 29, 2017 at 9:22 AM, Michael Rice wrote:
> > Thanks.
> >
> > I found that after I couldn't find it and wrote my own, but it seemed to
> be
>
0 0 0 0 0 0 0 0 0
>
> This might obviate the need for id in the first place and simplify your
> overall solution.
>
> HTH, Regards Rob
>
>
> > On 29 May 2017, at 9:22 am, Michael Rice wrote:
> >
> > Thanks.
> >
> > I found that after I couldn't fin
>
> or bitwise 2b10110 b.
>
>
>
> On 05/28/2017 08:00 AM, programming-requ...@forums.jsoftware.com wrote:
>
>> Message: 5
>> Date: Sat, 27 May 2017 23:51:29 -0400
>> From: Michael Rice
>> To: programming
>> Subject: Re: [Jprogram
definition.
>
> I hope this helps,
>
> --
> Raul
>
>
> On Sat, May 27, 2017 at 10:28 PM, Michael Rice
> wrote:
> > NB. 15 position peg solitaire
> > NB. The board (position 5 initially vacant)
> >
> > NB. 0
> > NB. 1 2
> &
NB. 15 position peg solitaire
NB. The board (position 5 initially vacant)
NB. 0
NB. 1 2
NB. 3 4 5
NB.6 7 8 9
NB. 10 11 12 13 14
xor =: ((+.)*.(-.@:*.))
board =: 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 NB. 0s for vacant, 1s occupied
board
1 1 1 1 1 0 1 1 1 1 1 1
r
>
> On May 25, 2017 10:41 PM, "Michael Rice" wrote:
>
> > From the documentation:
> >
> >|.!._ i.6 NB. Monad: |.!._ y (shift right 1) is same as Dyad: x
> > |.!._ y with x=_1
> > _ 0 1 2 3 4
> >
> > When I try it===
> &
From the documentation:
|.!._ i.6 NB. Monad: |.!._ y (shift right 1) is same as Dyad: x
|.!._ y with x=_1
_ 0 1 2 3 4
When I try it===
|.!._ i.6
_ 0 1 2 3 4
|.!.0 i.6
0 0 1 2 3 4
_1 |.!._ i.6
_ 0 1 2 3 4
_1 |.!.0 i.6
0 0 1 2 3 4
_2 |.!.0 i.6
0 0 0 1 2 3
So far, so good.
36 matches
Mail list logo