« first day (1545 days earlier)      last day (1093 days later) » 

2:53 AM
@ngn There's one non-SE guy HakerH who posts a NodeJS answer on everything
 
 
4 hours later…
7:01 AM
@k1m190r apl.wiki/Dyalog APL 11.0 but it was originally added to J.
 
7:12 AM
@PaulMansour It may be easiest to "fool the system" by using replacement characters for (if needed), < and > ― followed by a post-processing step that turns those placeholders into their final forms.
 
7:27 AM
@Adám sounds like J is interesting topic to explore deeper.
How much of J not yet in Dyalog APL?
Ideas/ Functions/ Operators...?
I see that many ideas have already been "ported".
 
It isn't really a 1:1 relationship, but of major concepts, I think the only things missing are apl.wiki/Leading_axis_agreement and apl.wiki/Function_rank
And the apl.wiki/Rank_operator can easily be used to achieve an equivalent effect, just slightly more verbosely.
 
7:45 AM
great then I get most of the current interesting ideas by sticking with Dyalog
I like it's strong backward compatibility, so I can read old articles and books, with all the code running.
 
Yeah, me too.
 
8:50 AM
CMC: Given a positive non-integer number of days, convert it to a vector representing whole days, hours, minutes, and (possibly non-integer) seconds. E.g. 2.7592 18 12 57.6
 
RGS
@Adám This was close 24 60 60 60 ⊤ 24 60 60 60 ⊥ 2.759 but I'm off by something :P
      24 60 60 60 ⊤ 24 60 60 60 ⊥ 2.759
2 48 20 44.699
 
@RGS Huh, why three 60s?
 
RGS
@Adám Oh I don't know, I just got carried away.
 
Also 24 60 60 60 ⊥ 2.759 is 24 60 60 60 ⊥ 2.759 2.759 2.759 2.759 which is surely not what you intended.
 
RGS
Don't mind me, I was jumping the gun.
      ToDays ← 0 24 60 60∘⊤86400∘×
      ToDays 2.759
2 18 12 57.6
Now that isn't golfed. But at least my decodings are now proper.
 
8:58 AM
Yup.
 
remove that first , and it's the same length as 0 24 60 60(⊣⊤⊥)4↑⊢
 
⊣⊤⊥ beautiful pattern :)
 
Heh, ⊣⊤⊥
 
expandable to ⊣⊤⊣⊥⊢ :)
 
RGS
@dzaima AH
So I was fairly close, was just being dumb. What I needed was 2.759 0 0 0 in order for the ⊥ to work xD
 
9:01 AM
I've got a 16-byte solution.
 
aw 0 24 60 60⊤13 20⎕dt⊢ is both not shorter and loses the fractional part :/
 
9:17 AM
@Adám definition of goto is the most spaghetti thing ever
I like it
 
@Razetime But do you understand it?
 
if it's spaghetti, are you supposed to understand it or feel it?
 
Taste it!
 
RGS
@Adám Isn't that feeling with the tongue?
 
surely i will attempt to taste it
 
9:20 AM
But really, it isn't that complicated. The doubling of quotes is really the worst thing.
 
never seen ⎕TRAP before
aplcart to the rescue
 
@Adám assuming you understand it, there's precisely one person that does
 
ah yes
 
@dzaima Let's fix that.
 
9:30 AM
@dzaima (ok now i do too. after parsing the quote mess (by removing the outer layer and chaning the inner to "s). Most of it is just restoring state)
(spent way too long trying to figure out where to even begin reading the expression as i just didn't think ⎕TRAP was readable (or an array) for some reason)
 
9:52 AM
@Razetime Here:
GoTo←⍎'-⎕TRAP←0''E'' ''⎕TRAP←⍎''''_''''⍴⍨≢⍉⎕NL 2 ⋄ ⎕EX''''_''''⍴⍨≢⍉⎕NL 2 ⋄ →',⍕,',1+⎕LC''⊣⍎(''_''⍴⍨1+≢⍉⎕NL 2),''←⎕TRAP'''⍨
     │ -⎕TRAP←0 'E'   '⎕TRAP←⍎  ''_''  ⍴⍨≢⍉⎕NL 2 ⋄ ⎕EX  ''_''  ⍴⍨≢⍉⎕NL 2 ⋄ →  │  ,1+⎕LC' ⊣⍎( '_' ⍴⍨1+≢⍉⎕NL 2), '←⎕TRAP'  │
     │ ││           │                          │   │                   │   │  │   │    │  │                           │  └ Return string for ⍎
     │ ││On any     │  │Reset ⎕TRAP to its old │   │Expunge the longest│   │  │   │Next│  │Save old ⎕TRAP as __…      │
You may want to apply an APL font to that:
 
(heh, the in Return string for ⍎ is the only thing that overflowed to next line in that :p)
 
RGS
Is there an idiomatic phrase in English to refer to the idea that I've been going back to the same subject over and over again?
E.g. in Portuguese we say something that translates literally to "hitting the blind man". (Or is it "hitting the old man"? Not sure, now xD)
I know this seems off-topic but the point was that I'd open with that phrase, and then ask this:
The reason why RIDE doesn't allow to set trace and monitor points is because RIDE is disconnected from the interpreter, right?
 
@RGS No it isn't.
 
RGS
Dang. Then is it lack of functionality?
 
Simply so. Since you can set stop points, and the three are very parallel.
Btw, you should be able to set trace and monitor points using APL: lines ⎕TRACE fnname and lines ⎕MONITOR fnname ― of course ⎕STOP works the same way.
The only problem would be that the editor doesn't show yellow and white blobs.
It is simply missing from the RIDE protocol. Clearly, it should support:
["SetLineAttributes",{"win":123,"trace":[2,3,5]}]
["SetLineAttributes",{"win":123,"monitor":[2,3,5]}]
 
RGS
10:03 AM
I'll talk about ⎕TRACE ⎕STOP and ⎕MONITOR then
 
Worth noting that ⎕TRACE and ⎕MONITOR do not work on dfns. Maybe that's why they were left out of the RIDE interface…
 
RGS
@Adám Why not?
 
Not sure. I find it especially irritating that ⎕TRACE doesn't work, as it'd be a nice tool to track how dfns jump around.
 
⎕← is better than any debugger :)
 
RGS
@rak1507 You are absolutely right, what was I thinking?
I'll just replace the MDAPL chapter about debugging with that sentence.
That ought to be enough :P
 
10:14 AM
@rak1507 Not really, because it doesn't show where the output happened. But in combination with ]output.find on -f=on maybe…
 
 
1 hour later…
11:32 AM
I think I found a bug in ]dinput but I assume it doesn't matter seeing as there'll be a new thing in 18.1?
 
@rak1507 Doesn't hurt to report it. What's up?
 
nvm, you have to assign in it
thought it was some specific thing in the dfn but I just wasn't assigning it to anything
 
:-)
 
weird that you have to assign though
 
Assign what, where?
 
11:36 AM
]dinput requires assignment so you can't just do a multiline dfn
 
I'm still not sure what you mean.
 
nvm lol
 
:-)
 
 
3 hours later…
2:44 PM
lol found 1e3 in some J code
 
@Wezl OK…?
 
I'm just laughing at the stereotypical array programmer golfing off one byte
 
@Wezl Where was this? I might write that to point out parallels in code, rather than to golf it.
 
Quick question. What modern array-oriented language has the most in common with APL? (ideally a somewhat popular language)
 
@AndrewOgden Does NumPy count?
 
2:53 PM
some of the irony was that it's accompanied by a detailed comment
 
I guess. I was trying to find a new language to learn after APL, that might benefit from what I am learning doing APL development.
 
@AndrewOgden Probably Julia or Mathematica. Though Mathematica might not qualify as "modern"…
 
I guess by modern I mean created in the last 30 years :)
I keep hearing good things about Julia
 
@AndrewOgden So that just rules out J, but K passes the bar.
 
RGS
@AndrewOgden One of the cool things that learning APL has brought me is this new way of looking at code in not-necessarily-array-oriented languages.
I'll give a practical example, take it with a pinch of salt.
 
3:05 PM
@Adám Do many people program in j or k? I guess my ultimate goal is to learn languages that could turn into jobs down the road.
 
RGS
In the Python code that I write I know find it easier to write elegant and concise (set|dict|list|generator) comprehensions.
And sometimes I structure my data in different ways that are more array-oriented inclined.
And Python is very much a language that could get you a job down the road :P
 
Yeah, I've liked the way it makes me think. Actually APL is my first functional programming language, other than dabbling with F#. So, it's been a real eye opener for me.
Oops, @RGS that last message was in response to you.
 
RGS
Don't worry, I got that :)
 
3:21 PM
@AndrewOgden I think chances of getting an APL or K job are OK.
 
3:34 PM
@Adám but orders of magnitude less than in other languages unless you have the right contacts/speak swedish :P
@AndrewOgden you should try something like Haskell, it'll be wildly different (and fun, maybe!)
 
@rak1507 yeah haskell and elixir are on my list. I just wanted to find a sort of "spiritual" successor, that's reasonably popular.
 
julia's probably your best bet then
 
While I have your attention, what other languages caused you to think differently when solving problems?
 
the very small amount of prolog I did blew my mind too, although I don't think it has influenced any other programming, but that's a fun one to try as well
 
um yeah prolog is great
and befunge is great
 
3:46 PM
lol
 
I'm ideally looking for languages that open my mind without costing my sanity.
I have a personal goal of learning the most pure/representative language from every programming paradigm, as well as several of the most influential early languages. That's how I stumble onto APL :)
This is obvious a long term goal.
 
makes sense
does that mean you'll have to learn COBOL?!
 
My hope is that it changes the way I write code in general.
Yes, unfortunately it does. I met someone on twitter who apparently enjoys cobol. doubt
 
@AndrewOgden logic programming is an underappreciated paradigm
 
Well, I never thought I would gain so much from APL, so I have little doubt that Prolog might change my outlook.
 
4:00 PM
are you doing the dyalog apl problem solving competition btw?
 
4:18 PM
I don't know what that is
But, I'm only a couple of months in, it still takes me quite a while to work out my APL solutions.
 
@AndrewOgden Learning Scheme was a life-affirming experience for me a long time ago, just like APL was, more recently.
 
4:36 PM
@xpqz just as a lesp dialect, or is there something more specific about it? I have racket on my list of languages to learn, since it's one if the more popular lisp variants.
*lisp
 
Racket is great. I prefer Scheme to common lisp-type lisps, because of the preference of recursion to iteration. That opened a lot of doors for me in terms of functional problem solving.
 
smae
 

« first day (1545 days earlier)      last day (1093 days later) »