« first day (2658 days earlier)      last day (2176 days later) » 

8:01 PM
@AdmBorkBork Eh, fake advertising. It is just double with a convenient name. Dyalog APL on the other hand, can unhalve: Try APL!
 
It's just used for notations-sake
 
Yah, I know. I just find it amusing.
 
Dyalog's would be called inverse halving
 
@Zacharý Unzipping is the inverse of zipping, no? Untying, the inverse of tying…
 
We don't call an inverse function an unfunction.
Eh, it's all just a matter of how you say it. And "un-" is golfier than "inverse "
 
8:09 PM
What if I like it ungolfy, though? ;-)
 
<sarcasm> get out. </sarcasm>
@Poke Oh yeah, polynomial curve fitting/abusing!
I finally got the arsonist's lullaby done in Charcoal, still have no idea what was wrong, as I just started over.
 
heck yeah
 
I had that sum/product formula memorized at one point.
Actually, at n>=2 points, but still/
(Both in regards to timeframe and for the sake of a pun, as I memorized it then forgot it at least 2 times)
@ASCII-only, is Direction in the wiki?
 
8:31 PM
i'm making an IRC bot in x86-64 assembly using only syscalls (no libc or other external libraries)
Send help
 
Random OOP question... What would you call 'a' in this example?
>>> class Foo:
...     a = 7
...     def __init__(self, b):
...             self.b = b
...
>>> Foo.a
7
>>> blah = Foo(1)
>>> blah.a
7
>>> blah.b
1
>>>
 
ngn
@moonheart08 in what form? :)
 
If it was C++, I would call it a static variable, but that doesn't seem entirely right since it's a member variable too
 
class variable ?
 
@DJMcMayhem a variable.
 
8:34 PM
@ngn form? It'll at least be able to do a !ping command
that's the absolute minimum i'd aim for
 
ngn
@moonheart08 I mean, what in what form should we send the help?
 
how about some anti-insanity pills sold by that suspicious looking guy in the alleyway?
 
ngn
@moonheart08 :D
 
@Adám I'd assume variable refer to the highest level scope
 
I may or may not be 3 days in already, still fixing bugs in my allocater
 
8:36 PM
A static property ?
 
@Zacharý something something newton something divided differences
idk
 
131
A: Are static class variables possible?

Rick TeacheyStatic and Class Methods As the other answers have noted, static and class methods are easily accomplished using the built-in decorators: class Test(object): # regular instance method: def MyMethod(self): pass # class method: @classmethod def MyClassMethod(klass): ...

So I guess "Class Variable" is fine
 
@DJMcMayhem static variables can be accessed from a non-static context (at least this is true in java). it will almost certainly provide a warning of sorts
 
In C++?
 
Either xi - xj or xj-xi was on the bottom, I think something similar with y's is on top, then there's the product over j of that, and then times yi, then sum over i...
I might be wrong, though.
I don't know how to say that notation correctly.
 
8:40 PM
@DJMcMayhem i don't remember if that works in c++. guess we have tio to check
 
I'm almost positive it doesn't
 
ngn
@DJMcMayhem The python tutorial calls them "class variables". If I didn't have access to the net, I'd call them "class properties".
 
oh neat
i was just writing up basically that same example, haha. hadn't run it yet
 
ngn
@moonheart08 in ngn/k I try to use as few syscalls as possible
 
@Poke I can't seem to make this example work: Try it online!
 
ngn
8:46 PM
and no libraries, of course
 
@DJMcMayhem i guess the compiler doesn't allow you to set static variables in a constructor?
 
But if I don't set it at all, it complains about that too.
I can't figure out any way to make a non-const static variable.
 
needs to be outside of the class
weird
 
Probably because classes generally should be split into an .h and a .cpp file, so they want you to define it in the C++
 
Anyone here good at Charcoal?
 
8:57 PM
 
If it's a class it should be in an .hpp
 
> .hpp
... Ew
Only if you're a boost developer
 
You should use .hpp for header files that don't work with C
 
@Zacharý ArtOfCode
 
$ tree / | grep '.hpp$' | wc --lines
244
I don't have boost installed
 
9:00 PM
@FreezePhoenix not that kind of Charcoal
 
Nor do I have any of my own C++ code
 
oh :p
 
Wait ... what kind of Charcoal are you thinking about, @FreezePhoenix ?
 
@Zacharý Spam catchin
 
9:02 PM
Ah, so there's a Charcoal software that's for detecting spam ... I never knew that
 
hi
 
Hi o/
 
d̟̺͜͝i̘̹̻̻̮̮̞d͍̳̯̪̙ ̤͍̺̺̳̹͈s̴̶̖̤͈̬̼o̸͔̝̰̱m̖̺͖͕̭̣̠͞e̢͉͉̣͜ó̸͈͖̩͍ń̢҉̗e̢҉̛̪̝̹͎͙̪ ͉̘̝̫̀s̸͏҉̬̖̬a̴͏͓̳̬̳̬͔͡y̮͙͕̥̺̪̬͖͝ ̩̩̣͙͓͈͔̕ͅs̠̩͞m͏̧̟̥̣͓̱̲̭̬͍o̶͍̱̙̟ķ̠͕ę̢̘̲̬̞͚̩d̼͓e̴͈̜̤͚̱̕͡t̶͜҉͕̺̮̹̰ḛ̪̬͔̕͜c̶̵̟̮͘t҉‌​҉̳͖̰͓ó̹̰̖̟͔̩͜͠r̩̰̲̯̞͝͡
anyways you can check us out at charcoal-se.org
 
9:04 PM
My screen!
 
best known for the annoying mother meta posts that get featured for 2 weeks and cause bar fights
also home of the original dev-on-prod
 
Is there a word for a function that takes inputs (as opposed to a function that takes no inputs, or niladic function)? Non-niladic sounds awful because of double negation
 
ladic?
 
does "n-ary" imply n > 0, I don't know
 
@FreezePhoenix The prefix of niladic is nil-, so I don't think so
 
ngn
9:09 PM
@LuisMendo if you mean 1 or 2 arguments (inputs), like in apl, sometimes people say "nomadic" instead of "monadic or dyadic"
 
@LuisMendo You could try calling it a "mapping", although it would only work if the function had some kind of output
 
"Polyadic" to me sounds like "more than two"
 
@quartata monoladic, dyadic
 
posadic ?
 
9:14 PM
Technically "poly" means more than one.
Who here likes technicalities?
 
Me.
 
Thanks all for the ideas
 
@LuisMendo You're welcome.
 
@ngn Is nomadic a standard teerm? It suggests a function that likes to wander around :-)
2
 
Non-parameterless / Non-argumentless is what I'd personally call it.
Yeah, it wanders between the integers greater than 0 for its input count.
I don't know if it's standard or not
 
ngn
9:19 PM
@LuisMendo Yeah, it's not quite the same thing as what you need. "Nomadic" is more like a function that's monadic and dyadic at the same time... "Standard" term? I don't know.
 
@Zacharý :-D
 
ngn
@LuisMendo you could call it an "arity 1+ function" or a "1+ arg function"
 
I would prefer a word, if possible...
 
ngn
or: niladic=argless, non-niladic=argful
 
Haha, I like argful
Or argsome?
 
ngn
9:24 PM
@LuisMendo that too :)
 
@LuisMendo an argument-taking function.
 
No single word for that? :-(
 
argumentative ;-)
 
an argument-taking-function.
 
:-D
 
9:25 PM
Just shove hyphens everywhere
 
I'm sure in German that could really be a single word
 
ngn
@Zacharý eine Argumentnehmendfunktion (I've just made it up, not a real word)
 
@ngn I actually think it would still be two words in German: Argumentnehmendige Funktion.
CMQ: Which notations exist to indicate that something is a hexadecimal number (for a character)? E.g. #1234, 0x1234
 
ngn
@Adám 1234h
for a character: U+1234 \u1234
 
wat why does my program make mouse clicks not register upon erroring
 
9:29 PM
disabledefault?
 
@Adám All of them, or the best one?
 
@DJMcMayhem All of them.
 
ngn
@Adám 1234<sub>16</sub>
 
@ngn OK, I'm not worried about that one.
 
Anonymous
9:39 PM
@Adám x1234 too - I've seen the leading 0 be dropped
 
That's a variable!
1234_16 then.
 
@Zacharý Well, why isn't U+1234 a summation?
 
Fair point. Don't forget that "x" can be uppercase.
I've also seen people use no base marker, if it has an A-F in it.
 
@Zacharý Right, and a just a leading zero: 0BADF00D
 
@Adám yikes, that's confusing octal, decimal and hexadecimal all in one
 
9:55 PM
Leading zero tends to be either octal (nothing above 7) decimal (above 7, but no letters) or what you described
 
I was thinking of doing hex~'\U+XH', but maybe I should just do hex∩16↑⎕D,⎕A
 
What is this for?
 
@Zacharý "tends to" = JavaScript‽
@Zacharý My webinar next week; code to convert input hex code to char.
 
ngn
@Adám if you know the input's gonna be hex, you don't need any special markers in it
 
@ngn I know, but I just want to include some handling of various formats.
CMC: Given a printable ASCII string, convert remove all [^0-9A-F] and convert the rest from hex to a number.
 
10:03 PM
@Adám not tested, but should be 9 bytes in Jelly: fØH⁾0x;ŒV
 
Anonymous
@Adám JS, 42 bytes: s=>parseInt(s.replace(/[^0-9A-F]/g,''),16)
 
Dang, does using the SE app not count toward the Fanatic badge? Lost 86 days of progress :(
 
@Adám Vim (not V), 17 bytes: :s/\X//g<CR>C<C-r>=0x<C-r>"<CR>
The first half could simply be ÓØ in V, but unfortunately the rest is still really gross
@Scrooble It should count. I've gotten the fanatic badge purely through the app
 
@Adám Dyalog, 17 bytes: 16⊥h⍳⍞∩h←16↑⎕D,⎕A
 
@EriktheOutgolfer Almost what I had. Mine is 1 byte shorter.
 
10:09 PM
@Adám I think I can shorten it a bit
 
ngn
@EriktheOutgolfer you can take 6 from ⎕a instead of 16 from the concatenation
 
@ngn Yup, exactly.
 
ngn
@Adám I'll try for even shorter
 
@ngn yeah, that
sorry, wrong reply
@Scrooble I lost my Fanatic badge progress for Puzzling.SE too, must be a bug
 
10:12 PM
and yes, I did open the browser, and the tab has been pinned from months ago
 
10:23 PM
@Mego (1*).read.("0x"++).filter isHexDigit
 
Anonymous
@H.PWiz Ooh, clever, but you still need to count import Data.Char;
 
Anonymous
(also I totally forgot about being able to drop the f=)
 
51 without importing: (1*).read.("0x"++).filter(elem``"0123456789ABCDEF")`
 
Anonymous
Very nice
 
Anonymous
10:27 PM
Use backslashes to escape backticks
 
I'm having aproblem that it is rendering as the composotion of m and ` when editing. That isn's even a character I can usually type
 
11:16 PM
@Zacharý Sorry I hadn't noticed your answer, but I would golf your answer something like this: NθEθSMθ↑WKK«MIι✳⊗Lυ⊞υι»J⁰¦⁰UOθθ ⊟υ
 
... I shouldn't have said anything, it wasn't mark so Neil didn't rush to the challenge
But nice job on your submission!
And @ASCII-only: I don't think Direction is in the wiki.
 
@Zacharý >_> it probably isn't. oops
 
@Neil, very nice usage of Pivot! I was wondering how on earth do I use that, when there is no way to just move in the direction of the pivot (at least that I could find)
 
you can change one of the 0s in the JumpTo into a "0" for one byte saved (hackily)
 
Who?
 
11:30 PM
well, in Neil's solution
 
His posted solution, or the one he posted here?\
 
here
so your current solution
@Neil hmm. actually, would clearing variables ever be needed? (and if so, should it be separated into another command)
 
Interactive type solutions maybe
 
@Zacharý interactive type solutions?
 
where the output changes say every second or so.
I didn't know how to describe that
 
11:38 PM
@Zacharý why would that need variable clearing though
@Zacharý relevant
 
Cycling through a constant set of outputs, maybe?
Like a => b => a => ...
But it's probably better to do it without clearing variables
 
@Zacharý while (1) { Print(AtIndex([a, b], i)); MapAssihgn(Incremented, i); }
 
@ASCII-only I can't think of a use case
 
hmm. so it should be fine to make Clear not clear variables?
 
Yeah.
Then, once I understand Neil's code posted on here, I'll use it (and say that it came after the challenge)
 
11:45 PM
:|
ok turns out Clear was never supposed to clear variables
 
Why does it then, careless error?
 
I never implemented the conditional whether to clear variables or not
 
Oh, there was going to be a conditional
 
not exactly. Clear in the interpreter takes a parameter all but I didn't actually use it in the method body
 
What will it do to which inputs have been read?
 
11:49 PM
hang on. crap
nvm. that's fine, they won't be restored
 
I love the feeling when you get far enough along in a major project overhaul that it starts compiling again.
 
@Οurous yesss
in my case it's when <90% of the unit tests fail because Python has no compilation
 
Sometimes, I'm happy to fix syntax errors that I don't know why they are there
 
@Zacharý :| you're probably doing something wrong
 

« first day (2658 days earlier)      last day (2176 days later) »