« first day (2734 days earlier)      last day (2123 days later) » 
00:00 - 19:0019:00 - 00:00

7:02 PM
@ngn: All I have left to do now is implement a lot more atoms (Atoms like ≡≢⍴⍳/\∘¨?∊⌽⍳ are still unimplemented), then RAD is ready for TIO.
 
0
Q: Einstein's Sorter

Beta DecayChallenge Given a list of integers and a velocity, \$v\$, implement a sorting algorithm which simulates a program sorting the list from smallest to biggest at the given velocity. Einstein's Theory of Special Relativity What do I mean? Well assume your program takes a time, \$T\$, to sort a par...

 
Why isn't TeaScript on TIO
 
ngn
@Zacharý sounds great! you've made a lot of progress very quickly
 
7:41 PM
Thanks1
 
@quartata That cracked me up :)
 
you know how that 0 is the sum of 0 numbers, 1 is the product of 0 numbers and Infinity is the minimum of 0 numbers? is there a name of the term for the number that has that property for a given function?
 
Zero?
Zero-like maybe
 
@Neil Identity
 
Seems like there should be a term for it but I have no idea what it would be. Natural or default value don't seem to quite fit
 
7:49 PM
@Pavel yeah, I thought it might be that, but I wasn't sure, thanks for confirming
 
@Neil The technical term is Multiplicative Identity, even when not applied to multiplication.
 
is now implemented.
 
> authentification
From an article I'm reading on security.
The author uses it throughout the article.
 
@Pavel Isn't the identity the single value that leaves any other value unchanged? I took the current question to be what is the term for the result of passing the empty set to the function
@AdmBorkBork I had to look at that for several seconds before I could see why it's wrong...
 
7:53 PM
@AdmBorkBork And it's supposed to be "Authentication, " right?
 
@trichoplax If you interpret it like that, the question becomes nonsensical.
 
@Neil APL calls it identity
 
@Zacharý I'm pretty sure, yes.
 
@Zacharý ohhh
 
You can't reduce an empty list by a function
 
7:54 PM
Is Mathematica any use for General Relativity calculations?
 
@BetaDecay Yes
 
> Is Mathematica any use for ...
 
I have no idea what general relativity calculations look like, but I know the answer is yes.
 
yes
exactly :)
 
I've lookes but it doesn't look like it has any differential geometry built ins. I was wondering if they were hidden or you could install a library (or whatever the Mathematica equivalent is)
 
7:57 PM
@Pavel In (Dyalog) APL you definitely can (at least for some functions): it gives the element that when appended to a list will leave its reduction unchanged. +/⍬ is 0 because 0+n = n; ×/⍬ is 1 because 1×n = n; ⌊/⍬ is the maximum representable number, because everything else is going to be less than it; etc...
 
@BetaDecay What you want is the Atlas library iirc
 
@Pavel Many languages define an output for min, max, and sum of zero arguments. It might not apply more generally but it seems that was what the original question was about
 
@Pavel I see. Can you install those onto the cloud?
 
=/⍬ is a thing though, which is somewhat surprising.
 
Mm, Atlas seems to have been abandoned...
 
7:59 PM
@Zacharý So it works for any function that has an identity?
 
@trichoplax =/⍬ works, so I don't know
 
@BetaDecay You can try taking a look at xact.es and see if it's what you're looking for
 
@H.PWiz Wow that's an exhaustive answer
 
@BetaDecay For using packages, see Needs.
 
8:43 PM
Thanks
 
I just discovered an F# source file in the Q# compiler's code that has 1, 2, and 4 space indentation
In the same file
 
Does anyone here know Lua? I'm looking for something similar to python's help command for a library I'm writing
 
@Zacharý it's for the xnor
 
@FrownyFrog Oh
 
@DJMcMayhem I know Lua but not python. What's the function of help? Or more generally, what are you trying to do?
 
8:58 PM
@mınxomaτ It returns documentation for the given object
 
@mınxomaτ So in python, if you do import os, you can then call help(os) and it will print the docstring of the module. I want to recreate that in the most lua-idiomatic way
I know very little lua
 
>>> help(print)
Help on built-in function print in module builtins:

print(...)
    print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments:
    file:  a file-like object (stream); defaults to the current sys.stdout.
    sep:   string inserted between values, default a space.
    end:   string appended after the last value, default a newline.
    flush: whether to forcibly flush the stream.
 
But it looks like lua doesn't have anything along those lines.
 
There's no equivalent.
 
Alright, thanks
It seems Lua is a lot more barebones than Python (by design)
 
9:00 PM
It would also highly depend on the execution environment (JIT, PUC) and what libraries you consider "standard". There's also not really any LuaDoc mandated by the language.
 
Well I just wanted to recreate it for my library.
 
I guess you should look into LuaDoc
 
> It parses the declarations and documentation comments in a set of Lua source files
My library is in C++
 
Why are you even writing a Lua library
I'm curious
 
Because my boss asked me to :P
 
9:04 PM
feelsbadman
 
Do we have a challenge for "create a basis for \$\mathbb{R}^n\$ where the matrix representing a blackbox linear operator over \$\mathbb{R}^n\$ is diagonal"? I can't find one but I don't want to draft an entire sandbox post if someone remebers seeing one.
Just pretend that the mathjax worked.
 
We have mathjax in chat??
SINCE WHEN
STOP THE PRESSES
 
No we don't
 
yes we do look
 
@Pavel You need to see it in your head :P
 
9:12 PM
@FrownyFrog No, we don't.
 
@FrownyFrog Do you have a userscript perhaps?
 
I was merely pretending to be perplexed
 
Oh, @Adám, after I implement a lot of atoms (⍴/\∘?≡≢∊⍸¨ are all still unimplemented >_<) RAD will be ready for TIO.
 
@Zacharý Only those are missing? And do those refer to monadic, dyadic, or both? Slash operators or functions or both? All forms of compose?
 
Some more: ∊↑↓○⌈⌊∇∘⊂⊃∩∪⊥⊤⍱⍲⍒⍋⍉⌽⊖. The only forms that I actually know what a case will do that is unimplemented is ⍺~⍵
 
9:19 PM
@Zacharý Wait, you don't know what ⍺⍲⍵ does?
 
If you want to see which atoms are unimplemented: you can look here, the ones without text below them are either unimplemented.
@Adám No, the ones on the left are all completely unimplemented (and there's more), only ~ has partial implementation (from the functionality I know it will have). So, yes I know what ⍺⍲⍵ will do, it will be exactly equivalent to ~⍺∧⍵ (~ is extended past booleans)
 
how is it extended?
 
@FrownyFrog 1-⍵ I guess. Just like in J.
 
so would be 1 - GCD
 
@FrownyFrog Uh, 1- LCM, I think.
 
9:24 PM
yeah
 
@Adám Nope. (0=⊢)∨(("0)=⊢). (" is short for ⎕UCS)
 
0
Q: Shared Birthday Party

ngmAn office (let's call it "The Office") is going to cut down on wasted time in 2019 by consolidating office birthday parties. Any two people with a birthday between Monday and Friday (inclusive) of the same week will be celebrated with a Shared Birthday Party some time that week. People whose birt...

 
@Zacharý So ∊∘(0,"0). Wouldn't ∊∘0' ' make more sense, or are you using ⎕UCS 0 as fill for text?
 
@Adám Space will still be fill. I have a problem with prototypes right now: the way I implemented character vectors: ''≡⍬ (if was implemented).
 
@Zacharý Like ngn/apl. However, even in other APLs, ''∧.=⍬.
 
9:33 PM
Yeah, because [] == []. It originally was a bug, but I could find no way around it without rewriting the entire code; so, it became a feature.
 
@Adám What does ''=⍬ mean in Dyalog? I tried, and instead of printing 0 or 1 it just didn't print anything.
 
@Pavel It's . Because = will result in booleans, and both '' and have 0≡≢, so the result will also have 0 length (numeric prototype because = results in 0s and 1s)
 
@Pavel In all APLs, = is a "scalar" function just like +, so it penetrates its arguments all the way to the leaf nodes and compares corresponding elements of the left and right arguments. So due to both arguments being empty vectors, the result is an empty (Boolean) vector.
 
@Adám Just to be sure, empty boolean is the same as empty numeric, right?
 
Ah
 
9:37 PM
@Zacharý Other than internally, yes.
 
@Adám Is there a vector equality?
 
@Pavel
 
@Pavel Try ]display ''=⍬
 
@Adám So like -0 and 0 are different internally in RAD (thank god 0==-0 still works)
 
9:38 PM
@Pavel is "Match" which asks if its arguments are complete matches of each other, including prototypes.
@Pavel TIO by default runs a completely clean session without user commands. Try it online!
 
@Adám The box seems to appear wrong for a length-1 character vector. tio.run/##SyzI0U2pTMzJT/@v8ahvql/… vs tio.run/##SyzI0U2pTMzJT/@v8ahvql/…
 
@Pavel That first one is a character scalar. Try it online!
 
I didn't know Dyalog had character literals
 
it's just like numeric stuff
there are single numbers and there are single-item arrays
 
Realized my tokenizer couldn't handle multiple statements in a dfn. That resulted in this: ArrayList<Pair<ArrayList<ArrayList<Token>>,Character>> everything = new ArrayList<Pair<ArrayList<ArrayList<Token>>,Character>>();
 
9:48 PM
@dzaima Is that Java?
 
@Pavel yep. More precisely, Processing
 
@dzaima You know you can use a diamond, right? ArrayList<Pair<ArrayList<ArrayList<Token>>,Character>> everything = new ArrayList<>();
 
@Pavel yeah, but I like it that way better :p
 
ಠ_ಠ
 
@Pavel Right, so ]display uses - or to indicate character arrays and ` ` or ~ to indicate numeric arrays. And no frame to indicate scalars, and to indicate the last axis, and to indicate preceding axes. Try it online!
 
9:54 PM
@Pavel I at first thought you meant this diamond: ⋄
 
Also, the C# way: var everything = new List<(List<List<Token>>, char)>()
 
That'd take way too long to type. Here's how RAD's code looks like when initializing any RAD value: Value x = ... (sometimes Value x = Value(...) as well)
 
Yeah, something has clearly gone wrong with whatever @dzaima is doing
 
@Pavel well in java this also works but Processing is still stuck in java 1.5-1.7
 
I know
 
9:58 PM
<sarcasm> JAVASCRIPT HAS TAKEN OVER </sarcasm>
 
@dzaima Why are you even using Processing
Like
Java is bad
But Processing is worse
 
@Pavel why
 
Becuase it's stuck in Java 1.5-1.7?
 
@dzaima That is why I use D: Tuple!(Token[][], char)[] everything; (nothing like that appears in RAD's code, but that's just a port of what your type).
 
@Zacharý Ok, that's different.
 
10:00 PM
@Zacharý are those variable length arrays?
 
@dzaima Yep!
 
@Zacharý (Token[][], char)[] everything;
 
@Pavel oh right. I did think of moving out of processing to regular java but I'm too lazy :p
@Zacharý sadly I don't like a bunch of other things about D to use it
 
Come to the .NET side
 
@dzaima Like what (other than the lack of macros)?
@Pavel I remember D.NET being a somewhat-existent-but-not-really-thing.
@Pavel <sarcasm> I think he's been traumatized enough by any Dyalog attempt at .NET </sarcasm>
 
10:04 PM
What's wrong with Dyalog's .NET implementation?
Other than lack of Mono support
 
@Pavel "<sarcasm>"
 
@Zacharý I haven't touched Dyalogs .net
 
@dzaima Me neither.
 
It integrates pretty well, in my experience
 
@Pavel Still though ... APL and .NET.
 
10:06 PM
@Zacharý Yeah, I'm not sure what you're on about there
 
@Pavel When you think of .NET, usually you think of languages like C#.
 
It's called the Common Language Runtime for a reason
It's not built for any one language
It works just as fine for F# as for C#
 
@Zacharý ok actually looking a bit more at the docs (which are annoyingly structured) maybe most of what I thought bad of D (well except the strange "foo".writeln;) is just your usage of it :p
 
+points for having good list syntax, -points for Tuple!
 
@Pavel Well, better than C and C++.
 
10:10 PM
^^ yeah, the whole ! thing feels strange for me
 
@Zacharý No argument there
 
@dzaima That's why I tend to use template functions more so than templates. T identity(T)(T arg) { return arg; } is very nice. And it's just called like identity(argument)
 
@Zacharý what's the point of (T) there?
 
Indicates the generic
So like
T identity<T>(T arg) => arg
 
@dzaima Don't base ANY language on my coding style/usage. I program so many languages, that my style tends to suffer in some of them.
 
10:13 PM
() instead of <> for generics is what VB does and it's dumb
Although VB also uses () for list indexing
Which is super dumb
 
@Pavel I don't know why they did () instead of <>, but it doesn't really matter to me. At least it's better than having to write out typename or something.
@Pavel Agreed.
 
I hate solving a challenge while it's still in the sandbox... The wait for it to be posted is agony
 
@BetaDecay Aren't you NOT supposed to do that?
 
I think the equivalent C++ is template <class T> T identity(T arg) {return arg;}
 
@Zacharý I like to have everything strictly typed everywhere though
 
10:15 PM
@Zacharý Yeah, but this challenge looked so good, I couldn't help myself
 
@Pavel Would that work for identity<int>(2)? And, you typed return T instead of return arg
 
I don't actually know tbh, never used C++ templates much. C++ does do template inference though.
@dzaima Generic typing is strict, static typing.
It's a lot safer than using Object everywhere
 
@Pavel i have some bad news for you
 
@quartata Please don't I don't want to hear about how I get the terminology of type systems wrong agin
 
no actually
 
10:17 PM
@Pavel the only places I use Object in my APL project is for debug prints
 
Java generics may be "checked" (poorly) at compile time but it's actually a dynamic cast
 
Well, Java generics are dumb so I'm not counting them
 
ok
 
I feel like you people despise me for how often I use Value in my RAD code.
 
that's valid
@Zacharý why, it's a dynamically typed language
I wonder what a static type linter would look like for APL.
It might be pretty cool.
 
10:18 PM
@Zacharý Is Value like Object or like dynamic?
 
@Zacharý your whole Value thing is what made me think D sucks :p
 
@dzaima Well, what the heck else am I going to have the type of something in RAD be?
@Pavel I'll pull up the definition I have.
alias Value_ = Algebraic!(Number, dchar, Function, Semicolon, This[])
 
@Zacharý in my APL thing I have a Value class that's extended by types, each managing it's functions (and requiring casting to use)
 
@Zacharý Ah, so it's a discriminated union you defined? That makes sense.
A little confused what Semicolon is doing there but
 
Value is actually a wrapper around Value_ that overloads operators. Number is aliased as Complex!double, Semicolon is for ;-indexing, Function is a wrapper around a Value delegate(Value[]) (which is the type for all functions, monadic operators, and dyadic operators in RAD), and This refers back to Value_.
That allows for some neat tricks I have planned: like boxing a function by just changing its group property to "N"d (nilad)
@Pavel Originally I was using Variant (which is pretty much Object or dynamic), but I ran into problems that I still can't find the cause of.
@dzaima Nah, it's just a wrapper around a discriminated union.
@Pavel I implemented A[1;2] weirdly. 1;2 results in new Semicolon(Value(1), Value(2))
 
10:28 PM
Is that range indexing?
C# implements A[1..2] as A[new Range(1, 2)]
 
No. It's based upon APL's A[1;2], which is like A[1][2]. I think we've had this conversation before.
 
Ah
Yeah that's weird
@Zacharý Maybe with someone else
 
@Pavel APL only uses it for higher-rank arrays. That isn't possible in RAD: RANKLESS APL Derivative
 
So what does A[1;2] do in RAD?
 
@Pavel A[1][2]
 
10:31 PM
You just said that's not possible
 
Rank doesn't exist in RAD, so how APL does it would be impossible. What RAD does is basically the same thing, except using depth. A[B;C] is {⍵[C]}¨A[B]
 
Ah
 
carmack just pissed off every Rust person on the planet
You might be marked down for it on an exam, but not explicitly cleaning up many classes of resources and just exiting the process to let the OS do it is often completely reasonable, and the high performance thing to do. Apps that don't exit instantly get a glare.
 
@quartata ELI5 to people who don't Rust?
 
carmack doesn't even have 1m followers
who cares
 
10:35 PM
It was a joke referring to Rust's lifetime hell
 
Ah
 
@FrownyFrog lmao
 
> hell
 
yes
deal
 
@Adám, that reminds me. The concept of "shape" that you came up with a while back (when I was asking how ⍴⍵ should work in RAD) seems to be pretty much the same as depth, except shape might have boxing of arrays into scalars.
 
10:38 PM
@Zacharý Well, depth doesn't support non-trailing length-0 axes.
 
The one thing that pisses me off about the .NET standard library is that Process.Start(name, args) takes args as a space-delimited string and not a string array
 
@Adám That as well (and prototypes as well).
 
@Pavel what
 
@quartata Yep. It has it's own rules for quoting, even.
Said quoting rules are extremely dumb
They also vary between framework, .NET Core on Unix, and Mono
 
Made new challenge on sandbox
 
10:42 PM
@Pavel and humans use this language
 
@dzaima Do you have a repository for this APL project?
 
I'm trying out the new definition of a "list." Feedback would be much appreciated.
 
@quartata Part of the reason is that argument handling on Windows is incredibly dumb
Argument quoting is actually a thing baked into win32
 
@Zacharý no, and as I'm currently rewriting the tokenizer, can't make it now
 
At least on Windows, Process.Start basically does the equivalent of pasting the args into run.exe
 
10:47 PM
@dzaima How bad was the tokenizer?
 
1
A: Sandbox for Proposed Challenges

JungHwan MinMake the super number hyper-pyramid code-golf array-manipulation Related Challenge Given \$n\$, output the \$n\$-dimensional pyramidal list. Example \$n = 1\$: Blocks arranged in a 1D pyramid with side length 1 is just a block. So, the output is {1}. \$n = 2\$: Blocks arranged in a ...

 
@Zacharý it worked pretty well, except dfns couldn't have multiple lines
 
@quartata .NET argument quoting rules: foo bar is two arguments. "foo bar" is also two arguments. ""foo bar"" is one argument. """foo bar""" is one argument, and includes one set of quotes.
 
@dzaima I had a similar problem, and still have another one: I had to move step #7 to be step #1.5. To elaborate on it: the code that handled was moved from the very end to just after parentheses and dfns/dops are handled: otherwise somethings would be activate'd that shouldn't be activate'd.
My biggest fear of RAD's development is side-effects being activated multiple times, in the incorrect order, not at all, ...
@dzaima So ... like GNU then?
 
@Zacharý GNU?
 
10:57 PM
@dzaima GNU APL.
 
@Zacharý ah. No idea, haven't used it
 
@dzaima Don't.
 
a side-effect of the rewrite is that parentheses could have multiple statements. Not sure whether that should be a feature or be disallowed
 
@dzaima Wow, that's also a side effect of the 7 => 1.5 change for RAD: I have a feeling we had the same problem/bug and fixed in the same way.
 
11:12 PM
Does shape in APL work for creating N-dimensional arrays?
 
@BetaDecay Yeah, but depth isn't the same as rank: (1 2)(3 4)≢2 2⍴1 2 3 4. In other words, an N-dimensional array (N>=2) is not the same thing as nested 1-dimensional arrays/vectors.
 
I see. So shape creates a tensor with N indices?
 
I finally got my code to be in a runnable state, and that beautiful line of mine is giving a Maybe too many > characters? error. What?!?
 
Remove all of the > characters and see what it does
Then add them back one by one
 
@BetaDecay removing <Token> seems to work but really, a maximum of 3 layers?
 
11:19 PM
If you have too many layers, the code under the extras get crushed and stop working
Which language are you using btw?
 
@BetaDecay Processing (≈ java)
it's definitely processings custom preprocessor
 
Huh, Processing looks like a modern Logo
 
oh I needed to add a space between >> :|
 
00:00 - 19:0019:00 - 00:00

« first day (2734 days earlier)      last day (2123 days later) »