bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Something is wrong here (or I may be wrong myself)


From: Christian Robert
Subject: Re: [Bug-apl] Something is wrong here (or I may be wrong myself)
Date: Fri, 24 Apr 2015 23:20:17 -0400
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

while this continue to work as designed:

      D←{24 ⎕cr ⍵}

      D ∆length
┌2────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│┌5────┐ 
┌13─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││meter│ 2┌2─┐    ┌2─┐    ┌2─┐     ┌2─┐    ┌2─┐   ┌5────┐ ┌2─┐     ┌9────────┐  
       ┌6─────┐         ┌4───┐     ┌4───┐     ┌4───┐     ┌4───┐      ││
│└─────┘ ││nm│    │um│    │mm│     │cm│    │dc│   │meter│ │km│     │lightyear│  
       │parsec│         │inch│     │feet│     │yard│     │mile│      ││
│        │└──┘    └──┘    └──┘     └──┘    └──┘   └─────┘ └──┘     └─────────┘  
       └──────┘         └────┘     └────┘     └────┘     └────┘      ││
│        │┌5────┐ ┌5────┐ ┌6─────┐ ┌5────┐ ┌4───┐ ┌→┐     ┌6─────┐ 
┌17───────────────┐ ┌14────────────┐ ┌8───────┐ ┌8───────┐ ┌8───────┐ 
┌10────────┐││
│        ││v÷1E9│ │v÷1E6│ │v÷1000│ │v÷100│ │v÷10│ │v│     │v×1000│ 
│v×9454254955488E3│ │v×3.0856776E16│ │v×0.0254│ │v×0.3048│ │v×0.9144│ 
│v×1609.344│││
│        │└─────┘ └─────┘ └──────┘ └─────┘ └────┘ └─┘     └──────┘ 
└─────────────────┘ └──────────────┘ └────────┘ └────────┘ └────────┘ 
└──────────┘││
│        
└∊──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
└∊∊───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
      2 (2 8)⊃∆length
v×9454254955488E3
      (2 (2 8)⊃∆length) ← 'nothing'
      D ∆length
┌2────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│┌5────┐ 
┌13─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││meter│ 2┌2─┐    ┌2─┐    ┌2─┐     ┌2─┐    ┌2─┐   ┌5────┐ ┌2─┐     ┌9────────┐ 
┌6─────┐         ┌4───┐     ┌4───┐     ┌4───┐     ┌4───┐      ││
│└─────┘ ││nm│    │um│    │mm│     │cm│    │dc│   │meter│ │km│     │lightyear│ 
│parsec│         │inch│     │feet│     │yard│     │mile│      ││
│        │└──┘    └──┘    └──┘     └──┘    └──┘   └─────┘ └──┘     └─────────┘ 
└──────┘         └────┘     └────┘     └────┘     └────┘      ││
│        │┌5────┐ ┌5────┐ ┌6─────┐ ┌5────┐ ┌4───┐ ┌→┐     ┌6─────┐ ┌7──────┐   
┌14────────────┐ ┌8───────┐ ┌8───────┐ ┌8───────┐ ┌10────────┐││
│        ││v÷1E9│ │v÷1E6│ │v÷1000│ │v÷100│ │v÷10│ │v│     │v×1000│ │nothing│   
│v×3.0856776E16│ │v×0.0254│ │v×0.3048│ │v×0.9144│ │v×1609.344│││
│        │└─────┘ └─────┘ └──────┘ └─────┘ └────┘ └─┘     └──────┘ └───────┘   
└──────────────┘ └────────┘ └────────┘ └────────┘ └──────────┘││
│        
└∊──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
└∊∊───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

btw, can I be part/member of this list ?


Xtian.


On 2015-04-24 22:38, Christian Robert wrote:
       D temp
┌32─────────────────────────────────────────────────────────────┐
│1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0│
└───────────────────────────────────────────────────────────────┘
       D bitsidx
┌5─────────────┐
│28 29 30 31 32│
└──────────────┘
       bitsidx⊃temp
DOMAIN ERROR
       bitsidx⊃temp
       ^       ^
       (bitsidx⊃temp)←¯1
DOMAIN ERROR
       (bitsidx⊃temp)←¯1
        ^            ^
       temp[bitsidx]
0 0 0 0 0
ps: cut&paste this after the fact, should really say '0' not 99 below
       1⊃temp
99
       (1⊃temp)←99
       temp
99 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0
       ⎕io
1
       a←1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0
       b← 26 27 28
       a[b]
0 0 0
       b⊃a
DOMAIN ERROR
       b⊃a
       ^ ^





reply via email to

[Prev in Thread] Current Thread [Next in Thread]