« first day (516 days earlier)      last day (2128 days later) » 

3:55 AM
@Adám perhaps magic bit boards aren't going to be the fastest thing I can write in APL. I'll try something else after I get this working
 
 
2 hours later…
6:16 AM
⎕←¯25{⌊÷|}168
 
@Sherlock9
SYNTAX ERROR
 
⎕←¯25(⌊÷|)168
 
@Sherlock9
3.571428571
 
⎕←¯25{⌊÷|,}168
 
@Sherlock9
SYNTAX ERROR
 
6:18 AM
@Sherlock9 what are you trying to get?
 
floor(abs(-25) / abs(168))
I'm trying to get the integer part correct
Maybe -95/14 is a better example
⎕←95÷¯14
 
@Sherlock9
¯6.785714286
 
A large part of the reason being that this challenge I'm work on deals heavily with the fractional part of an improper fraction, but keeping the integer part for the end.
 
@Sherlock9 Do they need to be a left and right argument, or can you just give a 2 element vector?
⎕←((⌊÷/)|) 95 ¯14
 
I'm not entirely sure yet, which is why I was trying it with a left and right argument
 
6:25 AM
@Probie
6
 
⎕←¯25{⌊÷/|,}168
 
@Sherlock9
SYNTAX ERROR
 
⎕←¯95(⌊∘|÷)14
⎕←¯95(⌊∘|÷)14
 
@Bubbler
6
 
6:28 AM
@Bubbler I feel stupid, because I actually had to stop and think about why division and magnitude can be swapped without changing the result
 
Well in that case, I must still be stupid
No wait I get it
And also this makes some of my code simpler
See, with -95/14, you get ¯6.7[857142] with the numbers in the brackets repeating, and I want to return ¯6.857142[7]
I can't keep the sign in ¯6 because that will mess it up when I try to add it back in. But I could just divide, floor, abs and then put the sign back on later
Next thing to figure out: Get base-10 digits of fractional part of fraction until the digits repeat
 
6:45 AM
How about this:
⎕←14{(N R D)←⍵⋄(⍺|N×10)(R,N)(D,⌊(N×10)÷⍺)}⍣{1⊃⍺∊2⊃⍵}11⍬⍬
 
@Bubbler
┌──┬────────────────┬─────────────┐
│12│11 12 8 10 2 6 4│7 8 5 7 1 4 2│
└──┴────────────────┴─────────────┘
 
Boom, you have both non-repeating and repeating parts
 
@Bubbler You can drop the parens around N R D can't you?
⎕←14{N R D←⍵⋄(⍺|N×10)(R,N)(D,⌊⍺÷⍨N×10)}⍣{1⊃⍺∊2⊃⍵}11⍬⍬
 
@Probie
┌──┬────────────────┬─────────────┐
│12│11 12 8 10 2 6 4│7 8 5 7 1 4 2│
└──┴────────────────┴─────────────┘
 
7:35 AM
@Bubbler Oh that's clever
It may also take me a while to parse :P
 
8:12 AM
@Bubbler You can prefix four spaces to get monospace which the bot will still understand.
 
@Adám Thanks :)
 
8:43 AM
Has anyone formalised the semantics of APL in something like Coq, HOL or Lean?
 
@Probie I doubt that.
 
Oh that's another thing I've been meaning to ask
Why are there so many dialects of APL?
 
Ven
Languages, as times go by, tend to branch out, when several communities speak them.
 
I've only noticed this sort of thing happening to a few programming languages though, that is, Lisp and APL
 
8:59 AM
@Sherlock9 There is a core APL which is common to all implementations. Each vendor added their own extensions to be better than the competition. That being said, most are highly compatible. APL2, APLX, APL+, NARS, GNU APL, and Dyalog have a very large common subset (provided ⎕ML is appropriately set).
 
So the broader question is, when is there is branching out and why does it happen in those cases? And vice versa
Ahh
 
Ven
@Sherlock9 Not true, see C++/CLI, Java.Net, Pascal/Delphi, etc.
 
Javascript, Python, and Ruby, too?
Okay wait. JS is full of dialects. They're called frameworks :P
 
@Sherlock9 And browsers… Same goes for HTML and CSS.
 
Ven
No. Most more recent languages have an open source impl. with a huge support, and internet helps spreading.
 
9:01 AM
@Sherlock9 JS is an interesting example (and this happens in it - that's why tools like babel exist). Python and Ruby are defined by a reference implementation, but even then what's valid in pypy may not be valid cpython, especially if they're __ prefixed functions
 
Ven
@Probie same for PHP, was a huge hassle for HHVM(another impl) because they didn't want to do refcounting (like the ref. impl does)
 
@Ven Do Facebook still use HHVM?
 
Ven
@Probie I think they still use HHVM for Hack
> HHVM is intended for Hack projects, and also supports a large subset of PHP 7 that is required by common tools and libraries. We no longer recommend using HHVM for purely PHP projects.
 
Alright I stand very corrected. Every language has dialects
Starting from different implementations up to different extensions up to completely incompatible features
 
@Sherlock9 Most modern Haskell code won't work on anything that's not GHC. I think it's just that when you think of modern languages, you only think of a single implementation. Since MicroAPL is dead, and pretty much no-one uses GNU APL, in 5-10 years when people think of APL, they'll think only of Dyalog. If someone wants to make a new open source APL, I'd be willing to bet that they'll try and make it Dyalog compatible (apart from perhaps not supporting )
 
9:19 AM
@Sherlock9 But importantly, APL dialects tend to be backwards compatible. At some point I'll publish my blog post about how I made a computer game from the 70's run with minimal changes.
@Probie They'll probably include for ISO adherence. (And because it is useful sometimes.)
 
@Adám I noticed that game when looking it your github
@Adám Maybe? As a return it's probably useful, but as a goto I think it's an artefact of an era that has passed
 
@Probie How would you write the following?
 f vals;val
 :For val :In vals
     →DONE/⍨0=val
     ⎕←÷val
 :EndFor
 ⎕←'success'
DONE:
 ⎕←'done'
@Probie Well, with :GoTo, :Leave, and :Continue the nice glyph could be better spent.
 
@Adám what's wrong with setting a flag and :Leave? That said, if that's the way you'd prefer to write it, I'll retract my statement about
 
9:36 AM
@Probie I prefer to avoid such spaghetti, but sometimes utility trumps elegance. I wouldn't mind losing to keywords though, since as long as is available, I have a hard time making myself write :GoTo
 
10:29 AM
CMQ: Anybody has any (small) tacit function that includes at least two ⎕IO-dependent primitives?
 
ngn
11:18 AM
@Adám isn't the answer trivial (⍳⍸) or have i misunderstood the question?
 
11:29 AM
@ngn I need a function that is both (somewhat) meaningful/useful, and uses two primitives in a certain ⎕IO. I.e. it isn't enough that they are ⎕IO-dependent but the effects "cancel" each other out.
(I need this as an example of how to use proposed syntax that lets you evaluate a function under as specific temporary ⎕IO, without setting the global state.
 
ngn
@Adám I've encountered something like that when golfing a permuations implementation: ... ⍳⌽⍳N
the first iota is io-dependent, the second only makes sense in io 1
this is not a short, complete, and clear-cut example, though
 
@ngn Nice. Thanks. The best I came up with was Is x a permutation? ⍳∘≢≡⍋⊃¨⊂
@ngn Ah, right, you'd want the second to be in 1, but not the first. :-(
 
ngn
@Adám yes, the first could be in either io 0 or io 1
 
@ngn Not only could — it should, in whatever context it is being called.
 
@Adám Are you proposing a f_0 sort of thing where _n means "with ⎕IO set to n"
 
ngn
11:40 AM
@Adám so, we can hope for something like this in future versions? ⍳⌽⍳⍠1⊢N
 
@ngn That specific suggestion comes up every once in a while. Iverson proposed it too (as ⍳:1), but I think mine is more versatile.
@Probie Yes, but allows setting any state, not just ⎕IO.
Iverson suggested that (the equivalent of) ⍋⍠0 means ⎕IO←0 but =⍠0 means ⎕CT←0. Which of the two should it be for ⍳⍠0 (which depends both on ⎕IO and ⎕CT)? Same goes for ?⍠0 (which depends both on ⎕RL and ⎕IO).
 
ngn
@Adám he shouldn't have introduced ⎕IO and ⎕CT in the first place...
 
@ngn Irrelevant, but apparently a lot of people like ⎕IO, and ⎕CT is a pretty necessary evil.
 
ngn
@Adám only 2 (or 3) from the poll are pro-choice and a surprising (for me) number of people actually prefer io 1 - mostly APL and Jelly fans.
 
11:57 AM
@ngn Note however, that I didn't realise choosing a choice was a choice.
 
ngn
@Adám right, I guess most people didn't either
 
@ngn So that kind of invalidates any conclusion about choice.
 
ngn
@Adám we need a new poll :)
 
@ngn Or just settle on a fixed value of ⎕IO←0.5 once and for all.
 
ngn
@Adám a Solomonian solution :)
 
12:01 PM
⎕IO←2 because the first version is always buggy
 
@ngn Only if one side would give in, an which case he'd set it to the other value.
 
ngn
@Probie let's make that ⎕ML-dependent
 
⎕IO←⊃⍳1 solves it in an elegant ⎕IO-independent manner.
Whereas ⎕IO←-⍬⍸1 makes everyone equally unhappy.
 
@ngn ⎕IO←2 starts indexing at 2 except when ⎕ML>1 in which case it starts at ¯1
 
ngn
@Probie perfect :)
 
12:05 PM
Wait, why not kill two birds with one stone: make ⎕IO←⎕ML at all times!
That'll teach them ⎕ML≥2ers…
 
ngn
@Adám another suggestion for ⎕IO: make 0 the default and rename it to ⎕OI
 
@ngn Oi.
 
@Adám But make it so that when dyadic ⊆ is used, both arguments are evaluated as if ⎕ML←2just to keep people on their toes
 
@ngn Ah, or (for backwards compatibility) keep default ⎕IO←1 but add ⎕OI←0: Both sides are content.
Or maybe we should just split ⎕IO into ⎕I←1 and ⎕O←0?
 
ngn
this is all due to the curse of backwards compatibility
 
 
2 hours later…
1:54 PM
RAD'll be able to do this weird stuff with []IO, ([]IO<-0.5 and []IO<-2), but it should NEVER be used.
 
@Zacharý Wait, what‽ RAD will allow ⎕IO to dynamically change with ⎕ML? (Will you even have ⎕ML?)
 
@Adám, can you give me a link to your APL keyboard on your github? I got a new computer, now I have to go and set everything up again
@Adám I modified the post, only []IO. I might just add a nonfunctional []ML to troll people
 
@Zacharý Which one? JS in-browser, or Windows KLC-style?
@Zacharý Will you allow assigning to primitives?
 
@Adám JS in browser.
@Adám Not intentionally, but it might actually be possible.
 
@Zacharý abrudz.github.io/lb then.
 
1:59 PM
I already got it, thanks!
I email sales@dyalog.com to renew the license, right?
 
@Zacharý Yes.
 
Thanks. Now I have to get a lot of stuff installed again.
 
 
1 hour later…
3:33 PM
I have cloned the ride repository and built it to get a standalone application, once I started ride, I edited the default configuration to "Start" a v16 session and saved it, however every time I open ride it opens the configuration page instead of starting a session, so how do I make it automatically do that?
(the ride that came with the dyalog v16 download works normally though)
 
 
2 hours later…
5:06 PM
@Cowsquack I'm not a RIDE expert, but I should be able to have an answer for you sometime tomorrow.
 
ngn
@Cowsquack "export RIDE_CONF=nameOfConfig" in your ~/.bashrc
 
@Cowsquack See ^.
 
ngn
"nameOfConfig" is one of those you have on the left-hand side of the connect screen
 
ngn
5:22 PM
@Adám hm, it doesn't remember my configs. bug?
 
@ngn Did you press save?
 
ngn
@Adám oh...
it works :)
 
5:40 PM
@ngn that works if I start ride from the command-line, but apparently not otherwise
but how does the ride that comes with the v16 download work without setting environment variables?
wait, it's empty?
 
ngn
actually that was silly... you need to check ride's env vars, not the interpreter's
press f12 and type: process.env.RIDE_CONF
 
undefined
maybe I should build again?
 
ngn
@Cowsquack how did you start it if not from the cmd line?
desktop icon?
 
once I have started it from the command line, the icon for it pops over my dock (macos) and I kept it in dock, now to start it I simply click the icon from the dock
 
ngn
770
Q: Setting environment variables in OS X?

Paul WicksWhat is the proper way to modify environment variables like PATH in OSX? I've looked on Google a little bit and found 3 different files to edit: /etc/paths ~/.profile ~/.tcshrc I don't even have some of these files, and I'm pretty sure that .tcshrc is wrong, since OSX uses bash now. Anybody ...

 
5:58 PM
@ngn thanks I will look into that
but do you know how the prebuilt ride installation does that?
 
ngn
@Cowsquack i'm not sure, there used to be $RIDE_CONNECT and $RIDE_SPAWN before $RIDE_CONF appeared
and those could be cmd line args with "-c" and "-s": github.com/Dyalog/ride/blob/…
 
6:37 PM
@ngn it looks like $RIDE_SPAWN is being used (judging by process.env from the older ride)
 

« first day (516 days earlier)      last day (2128 days later) »