« first day (1287 days earlier)      last day (45 days later) » 

12:43 AM
I went looking to see if Dyalog 18 had added support for field attributes in classes, and it doesn't look like it. Then wondered if I could edit the DLL and put one in myself - yes, with ILSpy and the Reflexil plugin.
it's a powershell cmdlet, written in APL which simply evals the text. Using the .Net bridge it can return typed data - that second is a Boolean[] array, not text, and 3 3⍴⍳9 returns an int[,] 2D array.
 
 
1 hour later…
 
3 hours later…
4:51 AM
@TessellatingHeckler This look very interesting. I'll speak with @JohnDaintree about contacting you for more info.
 
 
1 hour later…
6:09 AM
@Adám I finished up the eval/proxy bot; can we figure out hooking it up to the account? I can run it if you give me the credentials; or you can run it (here); either way
 
@Moonchild Oh, it evaluates APL on the server rather than using TIO. How does the bot know what to evaluate?
 
you prefix a message with ⍎ (seemed most appropriate, though it could also reasonably be ⊢) and it evaluates the rest
 
@Moonchild That might be confusing if the expression itself begins with or even contains . How about making it react to messages that begin with "@DyalogAPL"? That would nicely integrate with SE Chat's highlighting.
 
@Adám that could work (though it is a bit verbose). In the j IRC channel, their bot evaluates any message starting with ], and it seems to work alright
(where ] in j in apl)
 
@Moonchild Email me and I'll send you the credentials.
 
6:16 AM
@Adám messages containing ⍎ are ignored; it's only for messages starting with it. Can still set that up, though
 
@Moonchild Then I suggest as a prefix.
 
@Adám I assume your email is the one that can most easily be formed by combination of 'adam' and 'dyalog.com'?
 
Exactly.
 
@Adám ah, clever!
 
6:56 AM
ah, hmmm. Apparently I spoke too soon; it gets confused by multiline messages. Should be up by tomorrow, though
 
7:18 AM
@Adám While using the Jupyter kernel, I found that <code>...</code> in Markdown blocks aren't given APL font.
 
7:32 AM
 
Merged.
@Moonchild Multi-line support isn't critical, but you can either iterate over the lines or merge them with a and execute them together. How does it handle errors?
 
@Adám well, the problem was it was choking on the multiline output. Fixed that (shakes fist at windows newlines). Errors currently generate no output, probably because the error message goes to stderr instead of stdout. That, too, can be remedied
 
@Moonchild I made some small fixes to the executor. You may want re-import it.
 
@Adám done
 
7:47 AM
@Moonchild You'll want to trap the errors and message the user accordingly: Ignore 6s, 10: tell user it took to long, 11: tell user "not allowed", any other error: tell user ⎕EM⎕EN-200
 
hmmm. Do control structures not work in dfns?
 
@Moonchild No.
 
But dfns can trap errors using an error guard {error_code::error_handling_expr ⋄ code}
 
@Moonchild Actually… I just discovered that 18.0 (inadvertently, kind-of) added control structures to dfns.
 
Wat.
 
7:58 AM
      100+42{⍎r←':if ⍵ ⋄ r←⍺ ⋄ :Else ⋄ r←0 ⋄ :End ⋄ r'}1
142
      100+42{⍎r←':if ⍵ ⋄ r←⍺ ⋄ :Else ⋄ r←0 ⋄ :End ⋄ r'}0
100
 
@Adám hmmm. I came up with this, but the ⎕em path seems to actually generate an error, rather than returning the message
ah, no. It generates a domain error
oh, looks like the -200 is redundant
⎕en always has a value of 3, for erroneous code
@Adám possibly different behaviour on unix? Maybe is the culprit?
 
8:30 AM
@Moonchild Wait, my code is all wrong. Let me have a closer look and get back to you.
 
@Adám sounds good. (I might not respond until tomorrow; it's pretty late where I am)
 
And I have stuff to do.
 
8:52 AM
@Moonchild This doesn't look right.
 
@Adám hadn't pushed the change yet, but I updated it locally
it should be up-to-date now
 
@Moonchild Then it should signal the error correctly
 
@Adám it's not. It always signals error 3 (not 203)
it also seems to signal an error for assignments
 
Yes, it should signal 6 on assignments.
 
yes, but it's still signalling 3. (Also for expressions that include assignments, like x←3⋄x-9)
 
9:06 AM
Hm. Let me try it.
@Moonchild Which expression are you testing that gives you an unexpected 3?
 
a (when a isn't defined). Also 5⌷1 2 3 (where index error is to be expected, but there it should be 203, not 3)
 
ngn
@Bubbler nice tests
 
9:23 AM
@Moonchild I don't see that behaviour. Do you want to meet on Zoom?
 
@Adám sure—but I'm about to go to bed now. Are you available tomorrow?
 
@Moonchild I am. When is good?
 
@Adám early afternoon PDT if that's not too late for you; otherwise can do midnightish (PDT)
 
PDT=BST-8? Yeah, then midnight PDT=8am BST is better for me. But which day is that by me? Wednesday or Thursday?
 
9:44 AM
@Adám sounds good. Whichever day is in 21 ¼ hours :)
 
@Moonchild I've booked 8-9am BST. I'll send you an invite.
 
 
1 hour later…
11:05 AM
Hello all, @Bubbler your solutions are so elegant! Mine look so clumsy and verbose in comparison. github.com/rak1507/APL-Competition-2020/blob/master/… These are mine.
3
 
11:27 AM
@rak1507 Yours are actually quite good. Your P10 is better than Bubbler's. Can I ask you about P2, though?
 
Maybe it's because I'm still a complete newbie to APL, but his P10 seems much more concise. And sure, what about it in particular?
 
Bubbler's P10 fails on 'ab'. Did you actually mean {(128 > ⍵ ∨ 191 < ⍵) ⊂ ⍵} or {((128 > ⍵) ∨ 191 < ⍵) ⊂ ⍵}?
 
ngn
@rak1507 i starred this because of the link. i don't think "clumsy and verbose" is true. actually, pretty good for a newbie.
i hope they don't kick me out for star spam :)
 
Thanks! @Adám looking at it again, it seems that is what I meant, but it happens that my solution works to. I think when I wrote it I was still wrapping my head around right to left evaluation haha
I guess it's because here the gcd of 0 and x is x, and the gcd of 1 and anything is 1.
 
@rak1507 It is one happy coincidence that it works, but I gave you a small penalty for it. I also gave you a small penalty for code duplication in P1 and the unnecessarily convoluted P7. On the other hand, your P10 earned you a tiny bonus.
 
11:40 AM
To be honest I still can't think of a better way to do P7, that was my final result after lots of tweaking..
Bubbler's P7 is so short but I have absolutely no idea how it works
 
@rak1507 Have you tried applying one step at a time on some sample data?
 
Yeah, but I'm unsure of how to even take it apart
 
@rak1507 Ah, you don't know about trains. Try to understand {∧/(≤/2(⊥⍣¯1)⍺,⍵)} instead.
 
I'm still very new to APL so haven't fully grasped a lot of it yet, thanks for the alternative version, I'll try picking that apart.
 
I'm (almost) always here to help.
 
11:48 AM
wow, that's really neat, the fact that it just works like that is blowing my mind
 
That's just APL's array capabilities.
 
Yeah
so then less than or equal checks that they share the same bits, and then reduce with and
impressive
(bits×2*⌽¯1+⍳≢bits←2(⊥⍣¯1)⍵)~0 bit better than this monstrosity
the solution of working on the two values simultaneously seems like it is very applicable to other things too
 
ngn
@rak1507 ¯1+ - a clear sign you need ⎕io←0
 
didn't know you can do that, amazing
@Adám You mentioned trains earlier, do you know of any good resources where I can learn about them more?
 
12:05 PM
@rak1507 Look at this article and the tutorials it lists.
 
Great, thanks a lot
 
12:15 PM
new header system seems to work; •COMP interface:
https://dzaima.github.io/paste/#0pVLNSsNAEL7nKT5z6aEr7G7SoDkaWnqwP9h6Eg9pY6RiE2irNLceRAQvXjxKoXhoXkLfJU/gIzibZCMU/AFDsjPfN/PNzu4EQJjdP2Wrjdfr9JGtt/RKwTgTDFKStcja9InC52SQRx0iG0D2eAd8q5AlZ@9WkSUg0snWKVNb16lE9vCmoba1sJat3jl9BGgblV8A8@Pl@dUkXzmpdra5szQZfo6rNTGLYuY0yL11aoDOtNoceQiNcRxcuAZEA5yDCxz3vB44BFFOTlmK6hBlEXWA4hk0h@1KZGkRZSjMVUb/dNDGXt0oy1YMFeZOWaXVlR5VOSzhSXPY/V8nUotkJbK1yP5r@/KrWZpUlWbrNHv3BPHoak5XyF3QcYWrOpYulDYIozIS3kTjxSSOQHcfXvuXcxf7lIdRHCQqPo0jP5iM1WQwX/izhQueg1t/RrlnasoMasT5umVYnms5bRkku2rh/CJnSFQFtCC4IVQvECWgn0XwTw#BQN
(there's still backwards compatibility with the regular 4 item blocks as there are now more dependencies to the bytecode than just dzaima/BQN)
 
ngn
12:39 PM
@dzaima how far is bqn from achieving dyalog-level perfomance?
 
@ngn very much depends on the specific thing tested. Specific builtins are most likely gonna be way worse, but general interpretation (especially with the java bytecode targetting) should be reasonable
trains are still apparently extremely different as it was in dzaima/APL
(plus dzaima/BQN creates the train object at compile-time, so that's just a bunch of very predictable jumps and no allocations anywhere)
 
@TessellatingHeckler OK, I've briefly spoken with John. We're not sure exactly what you're getting at here. Can I bother you to email johnd@ and adam@ explaining this in more detail, including what one might use it for?
 
ngn
12:58 PM
@dzaima hm.. you're still very far. i'll ask again in a couple of months :)
 
@ngn well, it's still java, i can't really control how it uses/doesn't use simd, and i doubt that in those couple of months the vector api will be completed and available on android. (not that my impl is supposed to be very fast either, it's mainly just supposed to be fast enough for it to be usable (which it certainly is), extra performance is just a fun side-task)
 
ngn
@dzaima you're using double[] for the result from ⍳ (sorry i can't type the combined ↑↓ yet)? if that's by design, i think it's a mistake
 
@ngn ↕10 creates and int[] (wrapped in an IntArr - see )class ↕10)
 
ngn
@dzaima where is ↕ implemented? (i was looking at IotaBuiltin.java)
 
@ngn here
 
ngn
1:12 PM
ah. thanks.
 
(the fns folder isn't used, it's just there in case i want to move some more builtins into BQN from dzaima/APL)
most things now do use int[]s ("most" as in Marshall's compiler doesn't create (or didn't at the time i tested it) any double[]s if ÷ is made to floor the result)
 
ngn
ok, that's a simple loop filling the int[], i guess there's no way to make that run faster in java (at least without the vector api you mentioned)
 
@ngn I had to vectorize that loop with intrinsics in Dyalog because none of the C compilers handle it well.
 
ngn
@Marshall huh
i didn't do anything unusual in ngn/k (just a plain c loop, no intrinsics) and it runs faster
 
@ngn What result type? I think the 4-byte code was just slightly slow but the 2-byte wasn't vectorized at all.
 
1:28 PM
huh, that's a lot of instructions. no clue if they're any good; with short
 
ngn
@Marshall i use 8-byte ints if you do \t !1000000 and 4-byte ints if you do \t !1000000i
but you probably want \t:100 .. for "run 100 times" because running it once barely registers in the timing
cmpx output is confusing.. lots of fluctuations too
actually, the best times aren't that different
 
Does ngn/k really require clang-7 to compile? Getting a linker error with clang-10.
 
ngn
@Marshall yes
i think gcc-6 works too but it bloats the binary too much
 
@Marshall it compiles successfully for me if i just replace clang-7 with clang (clang --version says 10)
 
@dzaima I have a bunch of undefined reference to `__stack_chk_fail's.
 
ngn
1:39 PM
@Marshall might need a -fno-stack-protector flag
 
@dzaima +ngn/k
 
ngn
@dzaima yay :)
 
(looks like that whatever i used to compile ngn/k doesn't work anymore. ¯\_(ツ)_/¯)
 
@ngn That works.
 
ngn
\t shows total time in ms
 
1:44 PM
@dzaima ngn/k is skipping overflow checking on the sum though.
 
ngn
@Marshall what do you mean?
 
@ngn It gives the answer 1783293664i, which is not generally considered to be the sum of the first million natural numbers.
 
ngn
@Marshall right. it uses the same type. i'm not really sure, but i think i prefer it this way.
k9 checks for overflows and promotes to a larger int type.
and dyalog, of course, checks for overflows and promotes to floating point..
 
@ngn in a language with properly separated 32-bit/64-bit types that makes sense, but it could still mean an unfair difference in the timings (i doubt the difference between a 32-bit and 64-bit accumulator is significant though)
 
ngn
@dzaima if we were measuring +/ - yes, that would be unfair
 
1:51 PM
@ngn From the user's perspective it only has floats, but optimizes with integers much of the time.
 
ngn
@Marshall right, but most users most of the time want ints
i'm strongly pro separation between ints and floats, btw. i haven't made up my mind about 32 vs 64, but i'm leaning towards keeping those separated too, for performance. checking for overflow is complicated and costs some cycles
 
@ngn But I think they'd rather have 53-bit ints than 32-bit ones.
 
ngn
@Marshall the default int type in ngn/k is still 64-bit (might change). that's the type of int you get when you don't add the i suffix.
 
@ngn That makes some sense. I'd assumed unsuffixed numbers were floats.
 
ngn
@Marshall actually i was considering removing floating point completely :)
 
1:58 PM
@ngn i do agree that it'd be better to separate the two but then there are various problems about keeping them sane, and then there's the question about what to do with division
 
ngn
@dzaima in the original k5-k6 int%int returns a float. integer division is only (-int)!int (yeah, i know, ugly syntax..)
i thought it would be cleaner if int%int is an int, like / in c and python2, but maybe i'm wrong
 
@ngn if there's some non-awful way to convert an int to a float to achieve float div, i'd prefer that too
 
@ngn ah nice find
 
ngn
@dzaima `f$
 
@user41805 Very few managed to get that right.
 
2:09 PM
As a user multiple numeric types are a lot of trouble, and double precision covers every use case I've ever dealt with except for some Project Euler problems. If the implementation is serious about performance, it's going to have to use internal types anyway because 1-byte ints are way faster than 4-byte or 8-byte ones. I just don't see the benefit of separating integer from floating types. Is the ~1.5x gain for arithmetic (which usually isn't the majority of the whole program) worth it?
 
ngn
@Marshall you are right about smaller int types
@Marshall floating point is too messy. sometimes it returns incorrect results by design. often, it violates basic mathematical identities. sometimes i need 64-bit ints, not floats pretending to be 53-bit ints.
 
@Marshall Has anyone managed to make rational numbers perform adequately? They really feel like the right way to do things but it seems to be too steep a tradeoff for most language designers
 
@Marshall i guess 32-bit ints vs floats is mostly just a performance difference, but having the types separate means you can also have 64-bit ints, which can be very useful
 
@ab5tract How would a system based on rational numbers handle irrational numbers?
 
@ngn For what though? 2^53 is a really big number. Cypto is the only practical use case I'm aware of.
 
2:16 PM
@Adám why, irrationally of course! ;)
 
It could of course return NaN or NaR
 
ngn
@Marshall crypto is important ;)
 
@ab5tract No, and with hardware float support it will never happen. Even ignoring that, rationals are just really hard computationally. Would be surprised if you could even get down to a 20x gap between emulated floats and rationals.
 
@ab5tract most operations on rationals involve division, which is still one of the slowest things you can do with ints
 
@dzaima true, but you if you do the division "on demand" then all of your operations in between are only mulitplication
Obviously this doesn't make up for things in the long run :)
 
2:21 PM
@ngn Yes, but it's pretty strange to push explicit int/float separation as a principle based on one use case. I'm inclined to say a better way to handle crypto in an array language is to use bit arrays and have the language support add and subtract operations for those. It's still less intrinsic support than bitwise and/or/xor plus shifts and rotate you'd need to use integers.
 
Couldn't all numbers be expressed as (formulas for the series of) terms in their continued fractions?
 
It's a shame because getting truly accurate responses for fractional math is pretty hard to put down once you have a taste for it
 
@ab5tract adding rationals without simplifying results in the numerators being multiplied, meaning that it'll overflow quite quickly. Detecting overflow and only then simplifying is probably a pretty good approach though
 
@ab5tract Is this just an aesthetic issue, or are there practical things that it makes easier? I don't remember having difficulties with my general rule of thumb that computers represent integers exactly and non-integers inexactly, but maybe I'm just missing opportunities.
 
@dzaima ahh, I see your point. See, this is the kind of handwaving you get from users when you make languages that (mostly) magically overflow in the general case -- you forget all about that class of errors because you only hit it when doing weird golfs that were expecting a bit too much of themselves anyway.
 
2:30 PM
 
@Marshall You don't have to worry about the difference between 3 * 1/3 and 3 * 0.3333333333333333
I've just seen to much uncomfortable weirdness around handling money values in my day to not appreciate just having arbitrary precision at each stage of my math
 
Out of interest how many submissions were there to the competition this year? (if that's public info)
 
@rak1507 Phase I or II?
 
Both
 
@ab5tract when would that really matter though? i'd think displayed floating point should always be somewhat rounded, and never be expected to be anything specific ever
 
2:36 PM
@rak1507 (Btw, consider pinging me when you want a response from me.)
 
Alright I will, wasn't sure who would know so just put it out not directed to anyone
 
@ab5tract and money should just be fixed-point (you probably want proper handling of rounding anyways)
 
@rak1507 Phase I: 73 participants with at least one correct solution. Phase II: 43.
 
Quite an increase from last year then, if Brian Becker's figures were accurate
 
They should be.
 
Ada
2:38 PM
What's the highest number of participants you had before?
 
@dzaima the point is you only handle that rounding question once, when you actually need to interact with / produce a floating point
 
According to him last year there were around 15 entries for Phase 2
 
@Ada Ooh, that I don't know. You can probably gather a few numbers from the user meeting videos.
 
it saves a lot of conceptual space and personally I think it's weird how comfortable programmers are with the semantics of 1/3 == 0.3333333333333333
 
Ada
I'm mostly asking, if this year is the one that had the most participants.
 
2:40 PM
@rak1507 I see about 25 in phase II last year.
 
Oh right
 
@dzaima There are languages that use arbitrary precision rational numbers specifically to not have this be an issue. I expect that if there were zero practical differences in performance and you tried to push those semantics in a language design you would be laughed at
 
2018, phase II: 28
 
I guess in that respect I already had the answer to my question
 
@Ada This year may well be the record then.
 
2:42 PM
Good to hear that it is becoming more popular
 
We can definitely see a growth in the community: Activity here, APL Wiki, webinars, webcasts, various blog posts…
 
Ada
For some reason, I remember a number being in the hundreds one year. I guess I'm just misremebering.
 
@Ada That might have been registrations.
 
@ab5tract arbitrary precision rationals would have an even bigger overhead due to needing dynamic memory (plus you'd still need some format for dealing with trig/roots; approximate rationals would probably be acceptable, but it'd make them not 100%-accurate anymore)
 
Adding the automatic test cases for phase I radically increased the ratio of correct answers and the ratio of 10/10 right answers.
 
Ada
2:47 PM
Oh yeah, I remember that being said.
 
We used to have Sqore run the competition, and we'd get loads of strange registrations and submissions, including garble, problem descriptions, solutions in other programming languages, etc.
 
lol, solutions in other languages
 
Technically, you can write real solutions in other languages for phase I. It runs on TIO, so you can always shell out… Marshall did that.
 
yay, i got an email saying i'm a prize winner for Phase 1!
 
Congrats!
 
2:57 PM
nice!
have you posted your solutions anywhere?
 
@dzaima Right but just a few years ago everyone was telling Aaron Hsu that co-dfns wasn't possible on a GPU. So in my opinion it's always worth asking whether the boundaries that we have inherited from yesterday are worth the cost of carrying them into tomorrow.
 
@rak1507 no, but i'll do it tomorrow (it's getting late here)
 
Alright fair enough! Congrats!
 
@ab5tract dynamic memory allocation won't magically get fast. (fwiw, i didn't think think co-dfns was impossible (as in "everything's possible if you try hard enough"), but it does feel somewhat pointless to me)
(some comparison with small arrays; dzaima/BQN outperforms dyalog on small arrays interestingly enough)
 
@dzaima I never claimed that it would. I also don't pretend to have any clue (or care) to be a computer scientist let alone caught up on the state of the art. I asked because I find it really hard to take seriously the attitude that money is somehow the only float that is worth taking care to actually compute correctly.
 
3:12 PM
@ab5tract i more think that money just isn't a float. the only places i think using floats is acceptable is in graphics, analog I/O and rough calculations
(graphics could really be under the "analog I/O" part, human eyes viewing the screen being the analog part)
 
Well we can definitely agree on the range of acceptable uses of float values :)
 
@dzaima I assume analog I/O includes precisely entered measurements of observed values.
 
@Adám most likely (i don't think one can "observe" a 100%-accurate number that happens to be a base-10 limited size float and isn't an integer anyways)
 
@dzaima No, it'd be limited by the instrumentation used to gather measurements, be it a ruler or a "digital" thermometer.
 
@Adám ah. those still are "analog"ish measurements, even if they're digitally truncated, and there's still the possibility of the thing measured being in the middle of two adjacent possible output values, at which point reasoning about the precise value doesn't make more sense than reasoning about the float representation
 
3:29 PM
@Adám I can't put any business case use for it, but I have it a tiny bit more useful now. New test:
 
@dzaima (comparing some calculation on the truncated float with a constant could still give wrong results though)
 
If you all live in APL as your shell/REPL environment, it's probably no interest at all, but I spend a lot of time in PowerShell half wishing I had some of the APL functions to play with right there
if the bridge is running Dyalog APL in-process, and the PowerShell objects can go into APL without serialization through plain text, be processed, and returned as live objects, I think that's at least fun, if not more
 
@TessellatingHeckler That looks super useful to me (and was pretty much what I expected it to be).
 
@Adám I imagine getting it so used with one parameter evals some code, used with two parameters puts the code in {} and works like {code} Y and used with three parameters becomes X { code } Y.
Several hurdles to pass before that, yet
 
@TessellatingHeckler Yeah, seems like a really cool library thing to have, but now I want a lot of extensions. How about multi-line code and operators?
@TessellatingHeckler I'd personally include the braces, as that'd allow derived functions and trains.
 
3:38 PM
First I really want the member access to work better. It runs for

PS C:\> apl ⍬ "⍵.Year" $dates
2020
2019
2018
that is, ⍵.Property works in that case, but it doesn't work for:
PS C:\> $dirs = get-childitem -directory
PS C:\> apl ⍬ "⍵.Name" $dirs
apl : VALUE ERROR
At line:1 char:1
indent my cooooode
.Year works on the System.DateTime instances, but .Name doesn't work on the System.Io.DirectoryInfo instances
 
@TessellatingHeckler Could it be because is a .NET collection rather than an array? Try (⌷⍵).Name
 
@Adám It very could be that, I can run .GetType() and get some array related details back; ⌷⍵ makes no difference.
 
@ab5tract The BQN spec is agnostic about the number representation, so there could definitely be a "desk calculator" variety like bc for when the computations are small enough that performance doesn't matter.
 
@Adám Operators? It wraps {} around so ⍺⍺ might work? Multiline strings in PowerShell are no problem, quite how ⍎ would handle them I'm not sure.
@Adám The reason I don't want braces is to be able to write apl ⍳5 and have it just work, without having to write apl "{⍳5}" ⍬
the braces probably need quoting otherwise they make a powershell scriptblock
Right now it needs all three parameters, because the test to see how many are passed, and which ones, doesn't work
 :If ⎕THIS.MyInvocation.BoundParameters.ContainsKey 'C'
throws a DOMAIN ERROR, and does with ⊂'C' too. I can only guess it's because BoundParamters is a strongly typed Generic Dictionary, instead of a hashtable.
 
@TessellatingHeckler Sure, ⍺⍺ should work, but you'd have no way to pass in the operand, would you?
@TessellatingHeckler But if you just call it with a single argument, then it shouldn't need braces anyway.
 
3:51 PM
@dzaima To me, this reads like "floats are only important if your program is going to interact with actual things somehow". Easily half of all real-world programming will involve manipulating what you call analog I/O. Sound synthesis, robots, weather forecasts, computer vision, etc. Even Dyalog uses floats once in a while to compute thresholds when deciding what algorithm to use.
 
@TessellatingHeckler Try ⊂,'C'
 
@Marshall right, in my mind "actual things" and "analog" mean approximately the same thing
 
@Adám I'm willing, but the current workflow of closing powershell, removing the .dll, editing in Dyalog, exporting, opening the DLL in ILSpy, adding the attributes I can't add in Dyalog, copying the files, reopening powershell, importing, testing, is a bit cumbersome.
 
Floats can also be useful to get an approximate optimum for a problem like integer programming, which is useful for real-world logistics and probably also things like database query optimization.
 
Ideally I would make ParameterSets so PowerShell handles whether 1, 2 or 3 parameters are passed, but that needs a lot more attributes
 
3:54 PM
@Marshall (also, deciding on the algorithm to use very much depends on the timings of specific things on the processor, and, as far as i care, the speed of a processor is an analog input :p)
 
@TessellatingHeckler I'd really appreciate it you'd explain Dyalog's missing features in an email.
 
@dzaima I agree, just pointing out the tremendous variety of values you are bundling under "analog I/O". However, I do think that analog-ish values can come up in completely pure domains as well. If we ever get a human-level theorem prover, it will probably be using inexact numbers to encode how promising a particular strategy is or even how "beautiful" a particular theorem is.
 
@Adám That works!
 
Mathematicians work with approximations pretty often, but because they don't handle them in bulk it's easier for them to use symbolic rather than binary approximations.
 
@TessellatingHeckler Strings are usually represented as enclosed character vectors in APL. 'C' is a scalar.
 
4:02 PM
@Adám I did ~9 months ago, Vince replied to my email, and logged it as RFE 17757
 
@TessellatingHeckler Ah, I see that. I'll bring the issue to John's attention.
 
@Marshall i guess those estimate numbers (and partly also processor timings) partly fall under the other category i named - "rough calculations"
 
@dzaima "You only ever need inexact numbers if you are doing inexact calculations"...
 
@Adám Now that I have a more working version, I might be able to write a more direct summary of what's needed - in C# equivalent it's simply [Parameter(Position=0)] tacked onto a class level variable. In APL I think it would be a :Field with an :Attribute after it, except putting :Attribute after a field does nothing.
(the internals of what that does behind the scenes might not be simple at all)
@Adám and ⊂'C' is a boxed scalar, not a vector?
 
@TessellatingHeckler The problem is that :Attribute relates to its containing method or class. There's (currently) no way to attach it to a field.
@TessellatingHeckler Well, except 'C' is simple, and Dyalog's array model immediately auto-unboxes enclosed simple scalars. See APL Wiki: Floating arrays.
@TessellatingHeckler Maybe a possible syntax could be :Field myVar :Attribute …`
 
ngn
4:10 PM
@Marshall there's no such thing as an inexact number. an fp number represents an exact point on the real line. fp operations are inexact because they must round to the nearest representable fp, and thus accumulate errors.
 
@ngn IEEE defines a correspondence between FP values and real numbers, which is important for specifying how the operations work, but that doesn't mean I have to interpret them that way.
 
@ngn every floating-point number has an exact value, but it doesn't necessarily need to be by its usage. I doubt (m)any things would break if i could make my processor give slight errors on non-integer floating-point operations
 
@TessellatingHeckler If you email (or paste me a text), I'll add it to the issue tracker.
 
@dzaima (and what i'm trying to say is that floating point numbers should only be used in contexts where they don't need to be precise to be "correct enough")
 
ngn
@dzaima your processor already does that :) many fp operations are approximations, and they don't necessarily return the nearest representable fp to the mathematically correct result
on the other hand, ints are so nice - they represent the ring of integers mod 2^2^n and never make mistakes. why pollute them with fp? :) @Marshall
 
4:19 PM
@ngn there still are reasonable restrictions on them (one probably being that they're consistent between equal calculations, and iirc many operations say that they must have an error less than 1 or 2 of the least significant bit)
 
@Adám I haven't done enough with this to know, but it might be desirable to add more than one attribute. There could end up with more than one in the DLL because a variable attribute seems to be how Dyalog loads a default value into a variable.
 
@ngn fp is easier to work with, easier to interpret and you never need to worry about where to place the fixed point if you need one (especially if you're dealing with numbers of very different magnitudes)
 
@ngn When I feel a burning desire to represent the ring of integers mod 2^2^n and never make mistakes I'll let you know. 'Til then I'm sticking with floats.
 
ngn
@Marshall have you heard the story of how iverson walked past someone's monitor, saw i=i+1 there, and said "that is never true"?
 
@ngn "No it isn't" is the version I remember.
 
ngn
4:24 PM
@Marshall ok. i don't remember the exact words. but i=i+1 can be true!
even with ⎕ct=0
because of stupid floating point (which has its own uses but is usually not needed in everyday programming)
 
@ngn among my thoughts about floating points is that you should pretty much exactly never use = on them, so, as far as i've concerned, that's either always true, it overflows, or it's bad/hacky code
 
or operator overloading if you make + ignore the argument and behave as identity
 
@ngn Is this really worse than i>i+1 being true?
 
@dzaima (another thought of mine being that using hardcoded constants is also pretty bad (especially if you don't know the magnitude), so there's another problem with i=i+1)
 
ngn
@Marshall depends. if you're using a counter to test quickly if something has changed, i≠i+1 is worse.
 
4:29 PM
@ngn But you could also implement such a counter with a single bit that's flipped each time.
 
ngn
@Marshall yeah, true
 
@ngn right, using floats for an integer counter is pretty stupid. at least it'll fail predictably, instead of it breaking once in a lifetime when there were exactly 2^32 changes between checks
 
Floats have failure modes, but they tend to be fairly subtle compared to wrapping integers, which completely violate the model most programmers are using (unlimited range integer) as soon as the range gets large enough.
 
4:51 PM
Hey, the APL Orchard quietly passed a hundred thousand messages and two hundred users about two weeks ago!
 
Ada
5:04 PM
That's amazing!
 
 
5 hours later…
10:03 PM
hey, what did apl's functional quad delta ⍍ do originally?
who can recall its original intent as an ISO APL2 extension?
so far ignorant i found no sample application nor definition nor description nor explanation at all.
or is there maximal considerate Iiberty to extend @ngn/apl.js with an ⍍?
(just in the half-likely case i will need some extension when inspecting a catchable few likely initial zittersteps of the cosmic evolution)
(solving the quaternionic maxwell {D, {D, A}} + [D, [D, A]] = 0 (balancing bosonic accelerating curl with fermionic decelerating inertia) second order partial dif
 
@RomanCzyborra As far as I know, was never used for anything.
 
perfect
 
ngn
@RomanCzyborra i've never heard of it either. ngn/apl is a ball of mud - you can add to it as much mud as you like.
"zittersteps of the cosmic evolution" - i wanna try some of what you've been smoking :)
 
RGS
10:38 PM
@Bubbler I see you published them already, thanks for that!
@ngn thanks for sharing, will definitely have a look!
 
ngn
@RGS my pleasure. bear in mind PastTasks is wrong.
 
I hope next year I am able to take inspiration from these amazing solutions and do ok myself lol
DiveScore was the only problem I did from phase 2 and it was several lines
 
RGS
@user41805 I will definitely write something on my blog about phase 2 because I really enjoyed it so much; while I don't, here's my phase 1
3
 
@Adám Do you have any stats for student/non-student submissions?
 
very neat
P1 ← {(⍺<0) ⌽ (⍺↑⍵) (⍺↓⍵)}
clever
 
RGS
10:49 PM
@rak1507 thanks :P I think some of my phase 1 solutions are subpar but I am available to discuss any of them if you want/need; just ping me ○/
 
Alright, might do!
out of interest, how long have you guys been using APL?
 
RGS
@rak1507 for me, roughly 5.5 months
 
Cool, what resources did you find the most helpful getting into it?
 
@RGS Interesting how mine and yours are so close (and some are identical to the byte level) :D
 
RGS
@Bubbler "great minds think alike" ? :P
 
ngn
10:52 PM
@rak1507 always, but i've known it's called apl since ~10 years ago
 
lol
 
RGS
@rak1507 definitely this chatroom; I learned almost everything here, then I just started coding in APL to do random things and small projects (cf. the 'apl' tag in my blog) and that is what really pushed me forward, I think
 
Wow, your blog looks really interesting @RGS gonna have to give it a read
 
@rak1507 For me, apparently it was 2 years ago, but I moved away and came back around 10 months ago.
Since then I'm known as an APL spammer on CGCC.
 
RGS
@rak1507 knock yourself out ○/
@ngn you mean that in the sense that you've always used an unambiguous mathematical notation..?
 
10:59 PM
@Bubbler is CGCC code golf something something?
 
ah nice, I lurk there occasionally but am always too scared to post
although I should have, because on discovering I needed 20 rep to post here, I had to go on a frantic stackoverflow answering session
 
ngn
@RGS i've always enjoyed writing concise code (i guess my informatics teacher from school would still confirm it), i've liked linear algebra since i first read a book about it, and i've always thought doing bulk operations everywhere would be more efficient.
 
RGS
I see; makes sense :)
 
ngn
not sure if apl notation solves any questions about ambiguity. maybe it does..
 
RGS
11:07 PM
I thought one could look at APL as a mathematical notation that is so unambiguous that it can even be seen as a programming language
 
ngn
mathematics is more powerful, especially set theory with its different orders of infinities. but apl (linear algebra) is more practical.
apl has problems with those variables that completely change the meaning of an expression, like ⎕io, ⎕ct, ⎕ml..
 
@rak1507 If you want to start solving challenges in APL, you can start by reading this and this to get more comfortable with code length scoring.
 
Thanks!
 
@ngn lot of mathematical notation is ambiguous (or, perhaps I should say, overloaded in a context-dependent way). Apl does have ⎕io, as you point out, but in general its syntax is consistent and powerful enough that it's not necessary or sensible to overload things to nearly the same degree as in maths
 
ngn
11:26 PM
@Moonchild in general, i agree
 
@Moonchild to clarify, it's not that APL's notation happens to be fragmented&overloaded less than traditional mathematical notation. (I actually think it's somewhat worse, since ⎕io and ⎕ml change very basic attributes of the language; you have to establish values for both if you want to communicate anything useful.) It's that APL's notation doesn't encourage overloading in the same way that traditional notation does
 
Ada
11:49 PM
The closest to an overload, other than IO and ML, has to be / and stuff, right?
 

« first day (1287 days earlier)      last day (45 days later) »