« first day (2072 days earlier)      last day (582 days later) » 

12:08 AM
@Adám Thank you for adding me to the chat! Chatting with Aaron recently, your name came up, so it's nice to actually put a face to a name.
 
1:01 AM
How do you output a number with "-" instead of the high minus?
Couldn't find it in aplcart
Atm I'm just doing {0>s:'-',⍕|s⋄s} which is pretty bad.
 
1:26 AM
@user1179319 welcome
@Steffan I'd do '¯'⎕R'-'⍕
 
1:43 AM
nice, thanks!
 
Aw, using system functions is kind of cheating, no?
What about something like this? ('-',1↓r)⌷⍨⊂s⍳⍨r←∪'¯',s←⍕¯101
 
this is code golf lol
 
@ootaulaith I'd still rather do '-'@('¯'∘=)⍕ (basically just using @ instead of ⎕R)
 
Ah! That's much more direct!
 
there are also things with dyadic ⎕FMT... but that's complicated and confusing
 
1:56 AM
that's fine lol. is it shorter?
 
no
 
i didn't find anything in the fmt spec about negative numbers.
 
⋄ 'M⍞-⍞I5' ⎕FMT 1 ¯2 3 4 ¯5
 
@rak1507
    1
   -2
    3
    4
   -5
 
2:18 AM
interesting
i don't want any indentation though. is there a way to use fmt without it padding the numbers?
 
 
1 hour later…
3:45 AM
is ¯1+a+⍳1+b-a the shortest way to get an inclusive range?
 
4:03 AM
depends, can a or b be negative? and can you change ⎕io?
for example if they're positive, you could do a,a↓⍳b or with ⎕io←0, a↓⍳b+1
also with ⎕io←0 you don't need the ¯1+
 
4:49 AM
@Steffan You could use ⎕←⎕JSON ¯101
 
@Adám -101
 
 
4 hours later…
9:06 AM
@Nissa Hi there. Interested in APL?
 
 
6 hours later…
2:58 PM
0
Q: Read column of CSV file as array

M4X_I am trying to read a column from a CSV file into an array. So far I have successfully read the file with the code below. load 'csv' data =: readcsv '/Users/max/Desktop/prices.csv' Typing data in the interpreter brings the following table (which in what I expect) ┌────────────┬────────┬───────...

 
3:50 PM
trying to implement the law of sines in APL. for example I've got a formula I'm solving for B that is 340(sine60)/sine45 where everything is in degrees. I convert to radians and I get 1○÷4÷340×1○÷3 not sure where I am making the error.
the correct result is 416
 
@Jeremygee Isn't it ⎕←340×(1○÷3)÷1○÷4
 
@Adám 449.6540688
 
sorry I have to run. will look in a sec. suppsed to reduce to 170 times the square root of 6
thank you so much for responding.
 
Oh, you're missing a couple of circles: ⎕←340×(1○○÷3)÷1○○÷4 ⋄ ⎕←170×6*÷2
 
@Adám
416.4132563
416.4132563
 
4:02 PM
ahhhh ok thank you!
 
Neater: 340×÷/1○○÷3 4
 
Apparently "anime characters holding programming books" is a thing: github.com/cat-milk/Anime-Girls-Holding-Programming-Books/blob/…
 
340×÷/1○○÷3 4 this version is interesting will investigate.
@xpqz hahhaha
 
5:14 PM
@Jeremygee Even more fun is this quite unusual inner product: 340×1÷.○○÷3 4
 
5:30 PM
340×3÷⍥(1○∘○÷)4 is cute
 
@awagga Or 340×3÷⍥(1○○)⍥÷4
 
Heh
  340×3÷⍥(1∘○)⍥○⍥÷4
 
6:10 PM
@awagga Should APL Wiki's list of a "few blogs with APL as main subject" really include J-only blogs?
 
6:38 PM
Sure, why not?
 
I thought the scope was like APL Wiki.
 
Well, it is the aplwiki :)
 
7:37 PM
I suppose it is out of place. But it feels like a mistake to remove it
 
8:14 PM
@awagga Oh well, now you have an excuse to.
 
Yep
 
 
2 hours later…
10:13 PM
Yes :)
At this point, just exploring. Thank you for inquiring!
 

« first day (2072 days earlier)      last day (582 days later) »