« first day (2739 days earlier)      last day (2083 days later) » 
00:00 - 23:0023:00 - 00:00

12:14 AM
anyone here familar with swig
I wanted to make a nicer REPL for my APL thing (so I could use arrow keys to move the cursor..). Ended up making a python REPL calling it..
Java was way nicer in Processing. (well, processing didn't have console input at all, but of the two possibilities, I'd say that's the better choice.)
@dzaima Why not just use GNU readline?
@Mego because I don't know what that is
It's the library that makes REPLs fancy with arrow key support and stuff
12:29 AM
eh I'd have to get some library to use that and turns out pythons readline actually probably is that
1 hour later…
1:40 AM
@flawr nah I was at a summer camp
leaving again on sat for the same thing so I'm stockpiling reddit posts
1 hour later…
3:00 AM
@dzaima it is
3 hours later…
5:43 AM
@dzaima you've reinvented rlwrap
6:10 AM
> Could not register user for website identifier web.org.vihan.axtell.development1, received response 204
Apple why are you so stupid
204 is a successful code :|
6:55 AM
@dzaima Wha..? new Scanner(System.in).nextLine() has line editing already.
What were you doing?
@cairdcoinheringaahing I don't think so. It is just to let evaluation happen while the code that uses the result continues as far as possible.
@H.PWiz Yes. I think that won't actually evaluate f ⍬ until 100↑.
Those two statements contradict each other :P
@Pavel What, mine?
Yeah. WHat H.PWiz described is basically how Haskell's infinite lists work.
@Pavel Oh. Well, I don't understand them then.
7:08 AM
@Adám You have a function that builds a list by connecting a value to the result of a lazy recursive call.
Basically, Haskell infinite lists are generator functions. I don't think APL has those though, iirc
2 hours later…
9:29 AM
RISC-V hardware is here (sort of): rise.cse.iitm.ac.in/shakti.html
10:13 AM
Q: How to multiply two matrix using constant memory?

user559150I need to multiply two matrix using constant memory. Note that the result should be stored at one of the matrix after operation. Printing the result without storing is trivial. Storing the result seems to be difficult. Another way of approaching this to find out two 2x2 matrix can be multiplied w...

user image
That's, uh, helpful.
10:45 AM
Q: I need help with C programming assignment. I'm in a self learning institution and I don't know how to start

KayLeeGoals The goal of this project is to introduce you to basic algorithm and to have you manipulate inputs/outputs. Chapter IV General Instructions • You’ll have to submit a file called author containing your username followed by a ’\n’ at the root of your repository. $>cat -e author xlogin$ • The ...

11:10 AM
@ATaco are you sure you didn't accidentally type fancy unicode in there :P
@Zacharý better than Scottish and German at least
(It's actually because I wrote -help, but it assumes it's a 1 character flag with elp as the argument)
@ATaco :| why would you do such a thing
basically it's because gcc doesn't think anyone is insane enough to do that :/
I wanted quick information about command line arguments, and I'm not running linux.
So I can't just man g++
@ATaco well everyone knows it's always -h and/or --help :P
I did try -h afterwards :P
But it has some other functionality on G++
So google to the rescue.
11:19 AM
Programs with one-hyphen long name flags are hardly uncommon.
11:30 AM
Question to native English speakers: Markovianness or Markovianess?
What? How about neither?
…what would you use instead?
What is that supposed to mean?
say a sequence follows the first order Markov property
I want to talk about the "Markovianess" of the sequence
If such a word has to exist it would be the double-n
11:34 AM
if that word doesn't exist I don't see what i would use instead
1 hour later…
12:46 PM
@cairdcoinheringaahing ... the you aren't optimizing enough
@cairdcoinheringaahing is this like a ripoff of Deorst :P
@cairdcoinheringaahing ew, so wasteful (in terms of bytecount of course)
@Zacharý so how exactly does that work
1:51 PM
@ngn yay. As I said I didn't know what readline was (and that I was actually using it already)
@Pavel it doesn't for me (at least not moving the cursor with arrow keys)
@dzaima What's your Java version/terminal?
@ASCII-only Started off like that, then everything but the name changed
2:06 PM
@Pavel Java 10.0.2, gnome Terminal 3.18.3
...weird, works here.
@ASCII-only Yeah, that's the part I understand. Speeding it up is the mystery :P
2:26 PM
@Downgoat dont use 204
when making something external facing using anything other than 200 is asking for trouble
............. while trying to figure out why IDEA wont start I finally found why my .config folder disappeared a long time ago. It was dragged in .IntelliJIdea2018.1. I hate how easy it is to drag a folder into another one by accident
I mean can you honestly expect clients to write if code // 100 == 2 over if code == 200
theyre not going to
If somebody thinks that 200 is the only successful HTTP code, that's their fault.
also 204 has some weird browser semantics
TIO uses 202 and 204 in a couple of places.
2:36 PM
@Dennis yeah but it's internally facing. It fine because you know what it means
@quartata if (code.IsSuccessStatusCode) :3
I just received an email that told me, among other things, to Please delete the space bar.
But if you've ever interacted with an API and you haven't just been lazy and compared to 200 for success then im sorry youre just lying
why not make it easy
@Pavel more keystrokes, few will know it exists if the language even has it, etc
Maybe there's no strong case for 204, but 200 simply doesn't mean the same thing as 202.
What I posted with the division is the "correct" way but no one can read that
2:39 PM
I know that success codes are just 200 - 299, but I always try to use the builtin check for successful status.
And there's no replacement for 206, anyway.
Although you won't get that one unless you ask for it.
@Dennis but is 202 the response that route always returns?
@Dennis client will always be expecting it
@quartata In TIO's case, yes. But 200 vs 202 can be used to distinguish between a request that has be and that will be processed. If the client cannot handle that 202, it's buggy and should be fixed.
If the route by definition doesn't "process" the request then the 202 is superfluous imo
If it's only sometimes then sure
@quartata But if 200 <= code < 300 surely is readable, no?
2:50 PM
Yeah, sure
But again few people will do this if there's no indication the route won't just return OK
in this particular case I would be surprised if Apple's specification doesn't require it to be 200
(It's a webhook as far as I can tell)
HTTP/2 222 Deal with it
3:10 PM
@quartata personally if i'm writing a script to hit an api i'll check for the expected response code. usually it's a 200 but if i'm deleting something 204 is what i'll generall check for. don't just check for "success". check for your expected output
there's a reason that 202 and 204 exist as standard response codes
theoretically you could just use a 400 for bad authentication/authorization too
but that would be stupid
3:34 PM
hello folks
anybody speak APL?
A little.
basically I'd like to confirm whether this is counted correctly, as the TIO link has a lot more code (e.g. in the header)
also, I think this is the only recent answer in a language older than the question, right?
@aditsu Adám is the resident APL expert
Yeah, Adám is definitely the resident APL expert.
I guess so, but I don't know if @Adám is around
3:47 PM
@aditsu Also @ngn. By this point Adám pretty much taught everyone at least some APL by now though.
ngn wrote the answer (not saying he's trying to cheat :p)
I kinda got over the codepage thing (although I still resent it somewhat)
Yes, the portion in the header and footer do nothing. It's a function: you have to store it in something. It's a lot like x=>x in JS, an anonymous function
@ngn The TIO link doesn't actually work, btw
@Pavel huh...
3:52 PM
Is ⎕io←0 the default on any system?
@ngn that's what you get for using dyalog classic
@Pavel It's just to do with the boxing. Turn that of and it works. Alternatively change to dyalog unicode. Then it works
@jslip I know, but I thought ngn should know since it's his answer.
It might have broken with the update to Dyalog 17.
@Zacharý so that means it's all good, right?
3:53 PM
@Dennis no, I recall that not working on 16 too
@aditsu Yeah, pretty much. That only gets in debate when stuff like ⎕+⊢ is used.
I... probably don't want to find out what that is
@aditsu Learn APL, it's fun
join us
Just input pluss argument, but it's not reusable.
3:55 PM
@aditsu I'm almost always around except Friday afternoons–Saturday nights UTC.
I won't give in to the dark side :p
Then learn K for ngn!
@Zacharý one step at a time! lion taming, apl, then k :)
No, that would be APL then J. K is its own beast.
@Adám Being awake consistently from Sunday to Thursday doesn't seem healthy
3:58 PM
@Adám cool, any comments on my original inquiries? (just above where I tagged you)
I wonder if I was drunk when I posted that answer or something has changed on TIO since
@aditsu Well, it was already answered. Yes, the counting is correct — you may almost always count 1 byte/char, and the header does nothing other than enable the nice boxed display and switch to 0-indexing.
@ngn I think I checked it last week and it was working
Hey, it's my thing to criticize other people's spelling and grammar.
4:00 PM
@Adám Is ⎕io←0 default anywhere?
@ngn Things did change, Classic lost its ability to ignore the -script switch, but Dennis made necessary changes, I think.
@Pavel Yes, in ngn/apl.
@Pavel Yes, people who migrated from an APL where there was only ⎕IO←0.
@Zacharý oh im sory four stepink on yor toeses
I think GNU as well, where it's actually classified as a default.
@aditsu >_<
@Pavel Also, it is optionally a system-wide setting, so some people don't have to switch to ⎕IO←0. I.e. it can be part of the install, as opposed to the code.
4:03 PM
@Adám In RAD, people can just change one number in the code to make it ⎕IO←0, or ⎕IO←2 even. I don't know if that counts or not.
thanks Adám; also, nobody commented on my 2nd question, so I guess the answer is yes
@Pavel VisualAPL also has ⎕IO←0 as default or only option (not sure which), and APL# had it so as well.
@Adám Can that be considered a "default" when it's the only option?
I'd say yes
@Zacharý Well, ngn/apl has ⎕IO, you just can't change it!
4:07 PM
@Pavel Oh, SAX (Sharp Apl for *niX) had ⎕io←0 by default too.
How many different APL systems are there ._.
I feel like there aren't even this many C compilers
on a different note, anybody from Paris?
@Pavel How many Python systems are there?
actually a lot
I know at least 8
4:11 PM
I know CPython, IronPython, Jython, Cython, and PyPy
Stackless, RPython.
@Pavel APL has a lot of things people might want out of it. Hence me making my own version so I can add my own features
@Pavel Cython is still CPython
@Dennis Isn't RPython PyPy, or something like that?
not really
4:12 PM
PyPy is written in RPython.
@Pavel There were historically a lot, as they were all commercial time sharing systems (that's what cloud computing was called before the internet), but their APL implementations were mostly compatible. Today, only three commercial systems remain (IBM APL2, Dyalog APL, and APL+), but have lately been joined by the FOSS implementations NARS, GNU APL, ngn/apl, etc.
.oO(Why are there so many Pythons?)
RPython exists so they could write PyPy in it.
RAD isn't really APL, more like (6*DyalogAPL+3*Jelly+K)/10. There exist derivative languages: such as J and K which can't really be classified as APL. They're APLs.
Which Python is the 'normal' one? CPython?
4:15 PM
CPython is the reference implementation.
I know of 3 C#s, 2 Javas, only one Perl 5 (unless you count Strawberry and Active as seperate, but they come from the same source code), 2 Rubys...
@Zacharý Shouldn't it be /9 ;-)
@Adám 6+3+1=10
@Zacharý Sure, but you're gaining overall functionality by combining features from each, so the total is more than the sum of its parts, no?
Yeah, but it loses some functionality as well. The shape v. depth contrast is lost from APL. The minimalization of the atoms is lost from K. And the extreme golfiness and the esoteric classification is lost from Jelly.
Oh, and it loses speed as well. That was a more major factor than it is now, but still: O(n^2)
4:21 PM
Besides, 9 is one byte shorter than 10
It's not meant to be a golf lang... more so it's meant to be used for golfing, which drives some, but definitely not all, of the design choices.
I'm just joking around. :)
The point still stands. It's sort of in-between APL and Jelly in golfiness. It's designed to be golfier than APL, but nothing like Jelly whatsoever.
@Zacharý Just curious, what was your aim when developing RAD? AFAICT it's similar enough to APL to just use APL instead
@cairdcoinheringaahing RAD = Rankless APL derivative
4:27 PM
I don't know what rankless means
Mostly, it was my first attempt at an actual language with syntax.
@cairdcoinheringaahing there are no multidimensional arrays, only nested (ragged) arrays
@Zacharý And the APL derivative because it seems easiest of the practical languages to implement, or that you use APL a lot?
@cairdcoinheringaahing It's probably both. It definitely was easy to implement (barring side-effect disasters I still run into). I also have gotten used to programming in APL.
See, I never know if I should respond to a deleted comment. Like, if I have a follow-up question, is it rude to ask it? The person obviously didn't want the comment there in the first place, so a follow-up may not be appreciated :/
4:39 PM
@cairdcoinheringaahing It's also so I have a slightly-golfier language than APL that I can use for PPCG; it's one that I know every nook and cranny of, since I created it. Some slightly-golfier features are non-needed {}s in some programs.
@Zacharý You say you know every nook and cranny, but there's almost one command that surprises you when you next use it :P Happens with all my languages :P
I mean: a lot more so than I know APL (especially with dfns), JS (weird type-stuff), D (stuff like lazy void), and Python (So many modules, I just learned of readline yesterday. )
@cairdcoinheringaahing APL is actually quite a minimalistic language. It has very few built-ins, and a very simple and regular syntax. Each built-in is just very powerful.
@quartata I don't get it
4:50 PM
look at the middle row of "customers"
I wonder how that selection process works
Maybe it's just channel activity
in which case I guess it's understandable we'd show up
5:14 PM
I realized that I broke nested ()s (they're fixed now, just waiting for a pull). ((1 2)(3 4)) wasn't working >_<
5:37 PM
I just decompiled DDLC and it's bugging me so much that there's like 10-20 lines of whitespace in between screen definitions
why couldn't it be just 2
Why tho
it's not like this in any of the other files
look at this shit:
Are you trying to mod ddlc
no I just wanted to learn Ren'Py because it looked cool
actually I probably shouldn't post a snippet here
but suffice to say we're talking a lot of whitespace
I don't know if the best way to learn Ren'Py is by decompiling DDLC
5:39 PM
@Pavel actually it's taught me a lot
went faster than reading the docs would have I suspect
Good for you I guess
@quartata How do you get whitespace from decompiling? I'd have thought that information would have been lost
@H.PWiz it's not really compiled
more like a funny archive
(not these parts, at least)
Ren'Py is, well, Python based
6:08 PM
@ASCII-only do you have any syntax files for charcoal (codemirror, textmate, highlightjs?). Also idk of on Axtell we'd want to use special verbose-mode byte-counting or we'd want to just use an SBCS
@Riker Just found Djazz (djent + jazz) via rob scallon: reddit.com/r/Djazz
@DJMcMayhem what codepage does V use?
6:27 PM
So I defined an inductive type
inductive nested : Type
| nest : list nested → nested
is there an easy computable bijection with N with computable inverse?
@LeakyNun Is that different from this
yes, because my type doesn't have extensionality
so it surjects to HFS
@H.PWiz [[],[]] is different from [[]] in nested
6:40 PM
@Downgoat Latin-1
@LeakyNun I'm gonna say they are uncountable
I think they are countable
all lists are finite
Ok, maybe countable then
6:58 PM
@LeakyNun does this mean lists that can contain only other lists?
to give an object of type nested is to give a list of objects of type nested, and every object is formed this way
that's the "mantra" that comes with an inductive type
how about: enc([])=0, enc([a,b,c])=100...0100...0100...0 (binary) where the stretches of 0s are of lengths enc(a), enc(b), and enc(c) respectively
I'm not sure if this is injective
7:18 PM
@LeakyNun I read this carefully a couple of times and I still can't figure out if it's a yes or a no. My enc() assumes a yes.
you really like to point to the wrong message lol
20 mins ago, by Leaky Nun
to give an object of type nested is to give a list of objects of type nested, and every object is formed this way
this one ^ ?
I did mean to point to it.
I can't tell if this discussion is about applied programming or pure math
@LeakyNun So, any nested structure of lists has a corresponding natural number (0 included) and every natural number has a corresponding list of lists. Why is it not injective, or even bijective?
I don't know
7:24 PM
@Pavel there's no well-defined boundary between them :)
TIL Type theory is a thing
@Pavel you didn't know? :P
We certainly talk about it enough around here
what with Downgoat trying to make a new type checker every 6 months
Searching "type theory" doesn't bring up a lot of results actually
Type theory wasn't really a CS thing per se originally though
Q: Display percent battery remaining

Jared KDisplay the remaining battery charge, as a percentage of maximum charge Remember if you can't run your code on a phone, calculator, etc, you can probably install your environment on a laptop at least. If you absolutely can't run on a device that has a battery, then unfortunately your language ju...

7:32 PM
@quartata don't forget @NathanMerrill
@ngn I don't understand your encoding, which list is encoded as 1
@H.PWiz 1 is the separator between lists and it also occurs before the first list; the elements themselves are encoded by the number of zeroes in each stretch
in APL: enc a b c ←→ 1(enc a)1(enc b)1(enc c)/1 0 1 0 1 0
Okay, but which nested list is encoded as 1? I thought it was meant to be a bijection
nvm. I understand now
@H.PWiz 1 is a 1 followed by 0 zeroes, so [[]]
7:53 PM
hm... this could make a nice golfing challenge :)
@Downgoat What Pavel said
You can see the code page with Try it online!
8:20 PM
Q: Calculate power series result

Luis felipe De jesus MunozRelated: Calculate Power Series Coefficients Given a number X and an max exponent N calculate the result of a power series. Example: Assume 0 ≤ (X + N) ≤ 100 Test Cases 1 2 => 3 2 3 => 15 3 4 => 121 2 19 => 48568 Standard code-golf rules apply

I'm pretty sure I've been off of this site for so long that my existence has been forgotten :P
I think all of my chat rooms and languages have died a long time ago xD
@ngn I agree. I think going from number to list is harder
I've only done it Haskell though. APL might be the other way around, thinking about it
@HyperNeutrino you were gone?
._. you were only gone for a month
@Downgoat maybe in earth time
we don't know where he has been
@H.PWiz I made a sample solution in python:
def e(x): # encode: nested list -> natural number
    r = 0
    for y in x: r = (2 * r + 1) * 2**e(y)
    return r
def d(n): # decode: natural number -> nested list
    r = []
    while n:
        m = 0
        while n % 2 == 0: n //= 2; m += 1
        n //= 2; r = [d(m)] + r
    return r
8:32 PM
@Downgoat has it actually only been a month
I mean that's Earth time. Neutrinos operate on a separate timeline.
@Poke I don't know any place within a few thousand parsecs that has decrease gravitational influence to the extent that the time dilation would change HyperNeutrino's perceived time by an extent significantly more than a month O_o
@ngn Yeah, that's fairly similar to me. If you are going to make a challenge, will it be to implement that specific bijection, or any bijection
@Downgoat i do
@H.PWiz I was thinking any, with this one as an example
@quartata pls provide coordinate
8:34 PM
@Downgoat what if he didn't travel in space, but in time
@Downgoat it's at Y=246732981042564752094497 at 0/0
@Poke Pretty sure if anyone had a time machine they wouldn't choose to go to 2018
I mean they are so many better years
well that's rather subjective
2035 is quite nice
can't tell you why though, comrade 267 would probably report me for leaking top-secret information
maybe he wanted to see the peace agreement between north and south korea
i don't think my score is on that poll
@Poke they fought a very intense war and now it's east and west korea
@HyperNeutrino classic
though i don't really remember what i got on the sat or act
@Poke if you did it on 2400 scale just multiply by 2/3
pfft american things
i'm probably going to do the sat eventually lmao
8:38 PM
@HyperNeutrino what is canadian equiv of sat
^ nothing i think
we don't have that much of a standardised testing system
ontario has this weird EQAO thing but that's only read/write/math for grade 3/6 and math for grade 9 counting for a whole 20% of your mark
brb moving to canadia
there's also the OSSLT which is basically just "do you know english and do you have enough money to buy enough coffee to stay awake the whole time"
spoiler alert i didn't i just finished it and tried to sleep and then slept for a whole 3 minutes
8:41 PM
@Downgoat why don't you move to switzerland? there's some great cheeses:)
@flawr hey I'm in switzerland right now lmao
@HyperNeutrino you are? where?
yep :P am in mu:rren/lauterbrunnen/jungfrau or whichever one is a city/region thing
oh cool!
how long are you staying there?
@flawr no amazon prime there
8:43 PM
@Downgoat but amazon composite
what is amazon composite?
not prime
@flawr just tonight and tmr night, we'll be in bern in time for the national day celebration thing
@flawr :|
@flawr :/ i thought that was an actual thing
8:44 PM
@Downgoat you have to order froma ll the surrounding countries^^
just live somewhere and then go to literally any other country to buy things
you will become rich
@HyperNeutrino oh nice:)
switzerland things are like 2x cost or something
well I would have loved to meet a fellow golfer, but it is a little bit too far away for my current work schedule:/
@flawr hm yeah. that would've been nice but like i am travelling with family so i doubt they'd like me meeting random internet person anyway xd
8:46 PM
@HyperNeutrino just a friendly slow snek
well anway I hope you enjoy your visit:)
thanks :D
I guess you flew via Zürich?
well we went to germany first
so we were meant to fly toronto -> reykjavik -> munich
but the first flight was delayed by 1/2h so we missed the transfer and got delayed 6h and went reykjavik -> oslo -> munich
and then drove around a lot around germany and austria and then into switzerland
8:55 PM
Can someone fill me in on this conversation? I was trying to comprehend Meredith's single axiom ...
@flawr lol what a weird assumption
It would open up some more possibilities if we could assume that \$ x\neq 1\$, then we could use \$ 1 + x + x^2 + \ldots + x^n = \frac{x^{n+1}-1}{x-1}\$, but it is probably too late for that =) — flawr 21 mins ago
@HyperNeutrino Oh that is quite a nice trip!!! I'm just slightly jealous =P
@EriktheOutgolfer after some amount of a certain kind of math you immediately see this identity and the only thing you're interested in is whether \$ x \neq 1 \$ :)
Never mind, I think I understand what's happening with the conversation.
@Zacharý doesn't seem to have been on topic for quite a while?
@flawr What hasn't been on-topic for quite a while?
9:01 PM
@flawr ah ok i see :P
@Zacharý meredith's single axiom
sorry internet died (mountain wifi is 8/10 for effort)
and then got distracted by stars
@flawr ah ok i see :P
sorry for double-sending things, internet is bad
@Zacharý TNB
@flawr I know, I just got distracted by it.
@HyperNeutrino in case you're a juggly/magic/puzzle/gamey kind of person I recommend this store in Bern.
anyway, need to go, have a nice time!
@flawr oooOo nice, thanks! o/
9:05 PM
@flawr but it's probably less bytes to do it the fair way lol (at least in some languages)
@flawr Wait ... when was Meredith's axiom on topic?
9:24 PM
posted on July 30, 2018 by ngn

Bijection: nested lists - natural numbers A nested list is defined as the empty list or a list containing only nested lists. Natural numbers can either include 0 or not, according to your preference. The task is to create a pair of functions or complete programs f and g (they don't have to be named like this or even named at all) that implement a bijection between nested lists and the n

1 hour later…
10:47 PM
@cairdcoinheringaahing well unless you're messing up really bad it shouldn't be slow. see Charcoal, it's not optimized at all
Q: Make crazy fractals that look like stuff

IkuraOnce, I thought of this. Rules: 1: You must make a fractal that looks like the specified thing. 2: One thing per round. 3: Algorithms are rated by two scores: Resemblance and Compactness. The one that gets the highest scores wins! 4: Only I can tell what thing must be made. PM me when a game ...

00:00 - 23:0023:00 - 00:00

« first day (2739 days earlier)      last day (2083 days later) »