« first day (1807 days earlier)      last day (1144 days later) » 
07:00 - 18:0018:00 - 00:00

18:00
@Adám 12 bytes, 1 ¯2 ¯3 ¯4 ¯5 ¯6 7
I can do it in 8.
@Adám what? show me
⋄ -@1 7-⍳7
@Adám 1 ¯2 ¯3 ¯4 ¯5 ¯6 7
-@1 7-⍳7
-@1 7-1 2 3 4 5 6 7
18:04
-@1 7 applies - to the elements at indices 1 and 7.
{a lot}¯1 ¯2 ¯3 ¯4 ¯5 ¯6 ¯7
1 ¯2 ¯3 ¯4 ¯5 ¯6 7
@Adám CMC: interpret brainfuck, but
"#" means move the pointer left or right randomly
When you ping me with a CMC, does that mean you want only me to answer?
No, means you have to solve this
others can solve.
I don't think you're entitled to dictate what I have to do.
18:08
@xpqz Fails on the "but".
@xpqz i said but
"*" means increment or decrement
"(" ")" is "[" and "]"
Not Mini any more.
and lastly "-" is abosulte value
@Adám why? this is probably shorter than the other.
I don't know what "other" you're talking about.
Can you solve?
18:10
It is just a matter of adding more lines to the top of what xpqz linked.
'#'≡t:((?2)⊃(lft ⍺)(rgt ⍺))∇ rgt ⍵
'*'≡t:((?2)⊃(inc ⍺)(dec ⍺))∇ rgt ⍵
@Adám ignore "+-[><]"
In that case, just remove the corresponding lines while replacing [ and ] with ( and )
Full code?
Give me a couple of mins.
This was inspired by this
18:21
@Adám in case it hasn't been done yet, done
@Fmbalbuena Try it online! (put your "bf" code in the Input field)
@hyper-neutrino Thanks. (WW did it.)
@Adám WW?
Wheat Wizard
ok
@Adám input?
18:24
@Adám I mean input in bf?
, I think. I'm not a BF expert.
, is for input, . is for output.
Brainfuck doesn't have the concept of signed integers.
absolute value is a no-operation.
@Fmbalbuena Oh, I forgot to add that.
@KamilaSzewczyk But this implementation actually does have them.
perhaps, but they're useless.
since multiplication and division algorithms will break
18:27
What are you trying to say?
@Adám Clever. Who needs macros, eh?
LENGTH ERROR
bf[37] get←{_ m _←⍵ ⋄ m}                       ⍝ fetch current value.
@xpqz I actually use such a technique in production systems. TryAPL for instance.
@Fmbalbuena Did you put any code into the Input field?
@Adám Newline, error
@Adám According to Python 3, A newline in Python means empty string, without raising EOF
18:32
That's smart, Adám
@Fmbalbuena Example run
Yeah, I see that. So it fails on the empty string. Bye!
18:45
Who came up with trains?
> and the invention of function trains by Iverson and Eugene McDonnell in 1988.
Nevermind, found it.
19:09
@Adám This seems to return 1 but not, Why? Try it online!
this thing in JSON is prefixes of iota 3, not iota of iota 3
@KamilaSzewczyk Try it online!
domain error.
what you're describing is
⎕←,\⍳3
@KamilaSzewczyk
┌─┬───┬─────┐
│1│1 2│1 2 3│
└─┴───┴─────┘
@KamilaSzewczyk iota?
19:18
@Fmbalbuena You want ⍳¨⍳3
@Adám but why this does?
Because you want to apply to each of the numbers in ⍳3
I don't understand
Why this (without each) do?
avx
avx
hi, just a test post.
new to APL within last month.
Have tried pyNapl; and working my way through S. Kruger's Learning APL
Awesome! Happy to have you here :)
19:28
@Adám Can you explain every lambda function of sudoku solver in APL (only commands that I understand)?
No.
> (only commands that I understand)
@Fmbalbuena ⍳Y generates the indices of an array of shape Y so ⍳⍳3 is ⍳1 2 3 which are the indices of an array with 1 layer, two rows, and 3 columns. Not what you wanted.
@Fmbalbuena I'm not sure what you want me to explain.
Adám and, I'm sure, the rest of us are all very busy. You'd most likely learn more by dissecting it yourself, anyway
I'm trying to play with my children at the same time :-)
19:31
@Adám teach to click the letter "f"?
No, they know how to do that. They are 8 and 10.
ok
@Adám single question: both know a bit of APL?
@Adám will 18.2 have Depth?
@Adám Can you explain dfn of sudoku solver in APL video (only commands that I understand)?
@KamilaSzewczyk No. Maybe 19.0
@Fmbalbuena "a bit"?
@Fmbalbuena I don't understand what you mean by "(only commands that I understand)".
19:45
@Adám Can you explain dfn of sudoku solver in APL video (only dfns with commands that I understand)?
So you want me to explain only the inner dfns that consist entirely of functions and operators you've learned?
@Adám yes
@Adám explain rcb dfn
works:
0=+\¨⌽{⍵,⍺}\2-'JXN'⍳'JJJJJNNJJNNJJJJJ'
works:
1⍳⍨(0 0 0 1 1)
but this does not work:
1⍳⍨0=+\¨⌽{⍵,⍺}\2-'JXN'⍳'JJJJJNNJJNNJJJJJ'
20:11
it think i solved it.
 
1 hour later…
21:26
Is '' an empty character vector?
Yes I think so.
⍬ is an empty numeral vector, just like 0↑1
And using ]boxing on '' is displayed as an empty square without ~ on the bottom
@Fmbalbuena, you will learn much faster by trying to understand on your own. By asking @Adám to help you all the time, you might be giving up the opportunity to push the envelope of your own understanding.
2
@FawnLocke It is indeed.
Thanks guys, just wanted to make sure
tryinig, yes indeed...
21:34
@Richard Did you forget to add backticks around your code (`⋄ code`)? You can edit your message and I will edit my reply.
My markdown transpiler is working decently :)
@Richard Only with -s=max but ]display does it, as you are trying to do.
'⋄ ]display '' '
@Richard Did you forget to add backticks around your code (`⋄ code`)? You can edit your message and I will edit my reply.
⋄ ]display ''
21:38
@Richard
┌⊖┐
│ │
└─┘
⋄ ]display ⍬
@Richard
┌⊖┐
│0│
└~┘
I just got an idea: A user command ]describe which describes what you give it in human terms. E.g. 'abc' 'def' would say A vector of 2 character vectors
That'd be nice
21:46
For 19.0 maybe, as a noodle.
that would be nice. I use ⍴ and ]boxing all the time to understand the output of functions. That's what you meant to do with ]describe? For input and output?
sounds like cdecl.org for apl
There was a comment yesterday or so about your style guide, and whether or not there was advice for formatting multi-line dfns. I'm also curious about this, and if there's any interest in an auto-formatter for APL code (if it doesn't already exist)
@FawnLocke dyalog ide sorta auto formats
RIDE also has its own formatter.
21:48
also has an align comments hotkey
Oh, cool. Time to open up ride
I almost always use the auto-formatting. It barely ever does something I dislike.
@FawnLocke I might have asked that. But just out of curiousity
@Richard Input and output are both arrays, so yeah. It could also work on functions and some operators, and on names.
@rak1507 wait, it has what now?
21:51
not set by default but you can set it
@xpqz It is numpad / by default, which you probably don't have on your keyboard.
How would I start RIDE (from ride) in the browser? tried RIDE_INIT=http:*:4502 -p 4502:4502
Start RIDE from RIDE‽
]explain ⍤2 would say Derived monadic operator
Yeah, how else would I serve ride to the browser?
@FawnLocke this is I think a parameter when starting Dyalog. I use it to be able to connect to RIDE
21:53
Yeah you start the interpreter separately with that config, and then point your browser at localhost:4502
Ah, okay, gotcha
Woohoo! It works :)
The whole point is running RIDE without Electron.
Oh, I meant from the cli or something
./ride RIDE_INIT=http:*:4502 -p 4502:4502
Using the dyalog interpreter to do that makes more sense, though
I start Dyalog with "C:\Program Files\Dyalog\Dyalog APL-64 18.0 Unicode\dyalog.exe" RIDE_INIT=SERVE:*:4502
I often struggle to debug expressions because I can’t see the intermediate results. If I break down the expression in chunks, sometimes the behavior changes because the context is different. Can anyone suggest how to inspect intermediate results of a long expression?
21:55
@user8544778 Sorry, I was a bit too busy to welcome you before. Welcome! Since you're new to Stack Exchange chat, I highly recommend having a look at apl.wiki/APL_Orchard#Features
⎕← will output the result of any expression (Or from anywhere within an expression)
@FawnLocke Did you forget to add backticks around your code (`⎕←code`)? You can edit your message and I will edit my reply.
@AlexB sometimes I manage to insert {⎕←⍵}
@AlexB 'tc'⎕CY'dfns' and then insert tc to the right of any function you want to inspect.
21:56
Ooo
@Adám thanks
Try it online! Notice how this also shows the order in which the train is evaluated.
That's cool
I'd like to have a way to automatically insert tc everywhere, but it is non-trivial.
@Adám like 2 + tc 2? instead of 2 + 2
21:59
Yeah.
o wow
Can you explaion why and how this works? I just found that ⎕CY is copy workspace. But then I am lost
tc is a monadic operator. It simply applies its operand as it'd normally be applies, but as a side effect prints that message.
Read about it at dfns.dyalog.com/n_tc.htm
Ideally, one should be able to single-step through an expression without altering the code. As cool as the ‘tc’ trick is, it feels like debugging with printf()…
Aww no, multi-line dfns don't work with dyalog -script
@AlexB Agreed. That is a feature of APL*PLUS that I miss by Dyalog.
@FawnLocke They should if you enable multi-line input.
22:04
Perhaps a feature for a future release? (hint hint)
That makes sense
Yup, thanks
@AlexB Yes, but my understanding is that it requires quite a lot of surgery on the interpreter. It actually executes token code, not source code.
yes this is really helpfull. Could be mentioned at dyalog.com/getting-started/tips.htm
Understood. Maybe disabling optimizations and translating source symbols into tokens one at the time…? But definitely not trivial.
@Richard Yes, I just thought of that too. Do you want to email [email protected] with that?
22:07
Sure
Ah yes, that's another thing. Some sequences of glyphs become a single token.
@AlexB something like ]debug on -style=max :)
@Adám just did
APL*PLUS had a nice tracing interface where it'd highlight each primitive in turn, with separate (optional) windows displaying the (left and) right arguments of that primitive,
22:57
tc is nice but I generally just stick with ⎕←
having to put tc everywhere is more of a pain
if there was an automatic way of doing it, that would be great
It would be quite easy to stick it after each primitive function, but often, that's not what you want. E.g. you want +⌿tc not +tc⌿
yeah, good point...
really some tracing debugger like j's dissect is more like what you want
I wonder how dissect actually works.
Then again, maybe it is possible to do enough syntax analysis to automate insertion of tc.
It could know which glyphs are functions and operators, and insert itself only after the operator in such derived functions.
well like you say, it depends on context, maybe sometimes you do want f tc/ and others you want f/tc
23:03
Instead of altering source code, I'd want something in the IDE like the toggleable stop/trace/monitor bits, but between characters, allowing me to toggle insertion of tc on and off at that interval between two adjacent characters.
I wish there was a "100 projects to do in APL" list
Maybe you'd want to be an intern at Dyalog?
Dyalog still does internships?
Of course.
Yeah, I'd be interested
23:12
I'd be interested too I think
Email [email protected] with your CV, and telling about yourself.
Cool, will do! Thanks :)
Don't forget to mention what you've already contributed to the community.
If it was this summer, would it mean I couldn't enter the problem solving contest too? (Also, I'll probably be going to uni next year but if I don't would I still count as a student seeing as this is my last year of school?)
I'm pretty sure that it is fine if you submit before your internship begins were a student when the competition began. I can double-check if you want.
23:18
Alright cool thanks
23:36
@Adám Can I write a challenge for you?
How the tables turn!
@FawnLocke ?
Just a phrase we say in English, a joke :)
@Fmbalbuena Yes, but no guarantee I'll solve it. If you post CMCs (without pinging me) I might too.
Implement This in APL
23:39
Why not wait for the main post?
@Adám Because i want to look the sequence and add to my Sandbox post.
Ah, I see.
@Fmbalbuena Try it online!
Join with ", " please
Btw, next time you want me to do work for me, say "Hi @Adám can I ask you to do [insert description of work] for me?" instead of pretending it is a challenge for me.
23:49
@Fmbalbuena Try it online!
@Fmbalbuena I'm pretty good at handling it, but you should now that the way you write to people often comes across as trying to exploit them.
⋄⍸1 2 4 8
@Fmbalbuena 1 2 2 3 3 3 3 4 4 4 4 4 4 4 4
I understand what does do
Great!
07:00 - 18:0018:00 - 00:00

« first day (1807 days earlier)      last day (1144 days later) »