« first day (1779 days earlier)      last day (878 days later) » 
00:00 - 19:0019:00 - 23:00

7:00 PM
Indeed. I didn't think of parametrizing my shifts with what I put on the boundary. This way it looks better indeed.
 
although, I just realised that 0 would work as a fill element if I switched things round slightly and used negatives and min
might try that later
 
@rak1507 I did exactly that in part 1 :)
 
ah, cool
 
Is there a way to make ⎕IO←0 persistent? So it doesn't revert back with )clear?
 
@klao Set DEFAULT_IO=0
You can do so as an envvar or in the RIDE start screen (where you can save profiles).
 
7:04 PM
@Adám Thanks!
 
 
2 hours later…
9:29 PM
Hi all, how to get Dyalog 18 to print 23514624000 instead of 2.3514624E10?
 
⎕pp←20
 
Or convert to string with 0⍕
 
Thanks!
 
@RudiAngela Do you know about APLcart?
 
can i learn APL?
 
9:40 PM
No offence, but I don't think so.
When I asked you if I could show you a simpler way of doing something, you just answered "no". If you're not open to new ideas, you can't learn.
I'm not dismissing you or anything; I'll be happy to teach you, but you have to be receptive.
 
Is there <Ctrl+C> Stop (KeyboardInterrupt in Python) in APL?
 
Yes there is. Ctrl+Break should do it.
You can also find "Interrupt" in the menu.
 
Then there is a way to fully prevent without moving to Except?
 
I don't understand what you're asking.
 
@Adám ok so...
 
9:51 PM
So if you want my help, you'll have to explain a bit more or find a different way to ask your question.
 
try/except/else in A Programming Language?
 
:Trap error numbers
  code to try
:Else
  code to run if one of those errors were hit
:EndTrap
 
but else?
 
@Fmbalbuena what does else mean here
do you mean finally?
 
@hyper-neutrino i don't need finally
 
9:54 PM
then what does "else" mean?
 
... in Python
 
Aha:
try:
       # Some Code....

except:
       # optional block
       # Handling of exception (if required)

else:
       # execute if no exception

finally:
      # Some code .....(always executed)
That's Python.
 
TIL Python's try statements have an else
 
I've never needed that. I guess I'd set a status.
:Trap error numbers
  code to try
  ok←1
:Else
  ok←0
  code to run if one of those errors were hit
:EndTrap
:If ok
  execute if no exception
:EndIf
 
9:57 PM
wait they do?
interesting
i've always just put the part that should run if no exception after the line that might raise in the try block itself lol
 
granted, if that part raises, then it goes into except, which you might not want
that's cool though. wonder why more languages don't have that
 
We've been thinking of adding :Finally but maybe we could add this too. What would we call it, though?
Maybe :Then?
 
Call it :Catch /s
 
Can someone explain the value of finally? Why not just put the code after then block?
 
10:02 PM
@Adám if you return at any point, you may still want to close your resources
 
@Adám If there is return, break and continue: the finally block is still executed.
^
 
OK, thanks.
 
So, :Then sounds fitting. (imo)
 
also, if the except block errors, finally block is executed.
 
Still, finally sounds kind of messy, like an implicit goto. I'd rather continue and then return when fully done.
 
10:04 PM
if there is no finally and except block errors, errors.
 
@Fmbalbuena Before any error handling kicks in?
So finally is kind of like a lightweight destructor, but for block rather than for an object.
 
@Adám before control flow goes out of your function in any way, shape, or form, finally will have executed
yeah, it's very much a destructor
 
That'd be an "unbound" finally.
You could of course have a finally in any block, and execution would jump there whenever anything would cause execution to leave the block.
 
that's what a catch-less (or except-less in python) try+finally would do
 
What are the differences between APL and J?
 
10:10 PM
On the core language level:
APL uses Unicode symbols, J uses many bi-glyphs.
The array models differ slightly.
The vocabulary differs a bit.
 
@Adám Yes I do. Just didn't expect to find Dyalog settings there.
 
Now you do ;-)
 
Yup.
AAMOF I'm heading there right now.
 
Are you telling me you don't have APLcart open at all times‽ ;-)
 
10:25 PM
Can any C code transpile to APL without exec C code with human effort?
 
unless apl has pointer manipulation you can't exactly but you should be able to transpile the same approximate meaning to any reasonable language
 
@Fmbalbuena I mean, like, anything's possible, but that's, like, not a useful thing to want to do
 
uh oh
 
APL is a high-level language for working with whole arrays at a time, trying to never use written-out loops, whereas C is a low-level language for working with individual operations, with for loops everywhere. That's, like, the polar opposite of APL.
 
00:00 - 19:0019:00 - 23:00

« first day (1779 days earlier)      last day (878 days later) »