« first day (2393 days earlier)      last day (2451 days later) » 

12:01 AM
hastily closes google search tab
 
Would the equivalent of curl -X GET https://redacted -H "authorization: ApiKey redacted" be the equivalent of var request = (HttpWebRequest)WebRequest.Create($"redacted"); request.Headers["authorization"] = "ApiKey redacted";
I'm a little unsure about how headers work.
 
@Pavel I think so
 
k
 
12:26 AM
:39476654 This isn't contact
 
I typed my message in the wrong room
 
I just understood this: "I'm so meta even this acronym" I thought i got it but over a ~1 year i was still not realizing it and NOW I UNDERSTAND THE ACRONYM IS "IS META" I GOT IT!
 
...
Congrats?
 
0
Q: Mario Kart Scoring w/ Ties

geokavelI ran into this problem while working on another challenge I'm making for this site. In that challenge I utilize "Mario Kart 8 Scoring". The amount of points the player in kth place gets is represented by this 1-indexed array: [15,12,10,9,8,7,6,5,4,3,2,1]. So 1st place gets 15 points, 2nd place g...

 
12:44 AM
@HyperNeutrino that comment was deleted
 
can some mod burn this post?
 
WTF is that post?
@Dennis ^^
 
Thanks
 
12:57 AM
lol
 
uh wat tf even :P
I'm trying to understand what it means and it makes absolutely no sense to me
 
> deleted as spam or offensive 3 mins ago by quartata, nimi, Community
Now as I understand it, when Community deletes something, it means it was actually deleted by a human moderator, and it's hiding the name.
But it does show the two other names.
 
No. Community is the only "person" who can delete something as spam/offensive, since it acts on the cast flags. quartata and nimi cast regular delete votes.
 
what does a mod "burning" a post do?
 
1:02 AM
Set it on fire.
 
So was the post automatically deleted, and you just happened to be around?
 
No, I cast a rude or offensive flag.
 
Ah
 
Which made Community delete the post.
And edit it down to a stub, lock it, and write the poster's IP on SE's naughty list.
 
1:03 AM
So they don't get presents during SE Christmas?
 
@HyperNeutrino They get a lump of coal
 
How about Charcoal? :P
 
He sees you when you're sleeping, he knows when you're awake, he's copied on /var/spool/mail/root, so be good for goodness' sake.
6
 
lol
(tests it out and realizes that I am sudo)
o also pro tip: don't remove the sudo group
 
// Santa.js
var list = [];
for(var i=0; i < 2; i++){
	list.check();
}

var nice = [];
var naughty = [];
list.forEach(child=>child.nice?nice.push(child):naughty.push(child));
 
1:16 AM
@HyperNeutrino or the command
 
yeah that too
 
0
A: Sandbox for Proposed Challenges

Daniel ScheplerWho will win Ghost? code-golf strategy-games word-games (Sorry if these tags are completely off from what actually exists...) The game of Ghost is played between two players who alternate saying a letter on each turn. At each point, the letters so far must start some valid English word. The l...

 
@Dennis so..
Where does it actually go?
 
Repeated offenders get banned.
 
1:23 AM
can someone check my answer to this pls codegolf.stackexchange.com/questions/82938/…
 
@ASCII-only thanks
 
@HusnainRaza :| pls link to answer not question'
 
@HusnainRaza your answer cc @ASCII-only
 
@HusnainRaza :| You don't always have 2 inputs
 
@HusnainRaza I dunno how you're counting blocks
@HusnainRaza you have OR and FALSE as the same thing atm
 
1:30 AM
@StepHen No? In FALSE the switches would have a 1 box gap
 
@ASCII-only but he's counting them both as one block
aka one line of redstone, so how do I tell the difference
 
True
 
wait what happened
do i need 2 inputs for each gate :c
 
@HusnainRaza believe so
 
rip
ill do it again
 
1:37 AM
and how do you tell the difference between OR and FALSE if they are both one block?
 
false has no blocks connected to it?
i thought i could represent false with just an off redstone signal
 
@HusnainRaza that's not a gate though :P
gate is two signals come in and one goes out (as far as I know)
 
deleted answer, will work on it tomorrow
 
@HusnainRaza I could be wrong, just so you know
 
should i undelete my answe
r
 
1:43 AM
numMeta = {}
defaultMeta.number = numMeta
numMeta._add = (a,b)=>a-b
print(5+7)
>> -2
I'm liking the progress of this language.
 
10/10
now make 6*9==42
 
6 = 1 + 5
9 = 8 + 1
6 * 9 = 1 + 5 * 8 + 1 = 1 + 40 + 1 = 42
?
 
@ATaco which language is this?
 
I've not got a name for it yet.
numMeta = {}
defaultMeta.number = numMeta
numMeta._mult = (a,b)=>{if b==9 a*7}
print(6 * 9)
>> 42
Had to fiddle with the meta handling a bit to make it possible.
 
@ATaco ew what is with those language core feature names
 
1:58 AM
Generally speaking playing with how numeric arithmetic works is a bad idea.
@ASCII-only I should probably change to snake_case entirely...
 
yes even snake case is better than that
 
What's wrong with camelCase..?
 
because camel case is for local variables
 
(Technically the global scope is local...)
 
Should be UpperCamelCase anyway
 
@HyperNeutrino hmm?
 
Looks normal
 
I thought it was really weird for some reason :P
 
have you never put strings over multiple lines?
 
@totallyhuman oh that's what it's for?
 
2:06 AM
well not exactly
 
@Pavel it's called PascalCase
 
hang on
 
@ConorO'Brien lol
@totallyhuman o
 
2:07 AM
it's equivalent to concatenating it
anyways bye
 
@HyperNeutrino I'd prefer it do string formating rather than concatenation.
 
what is that
oh
wait how would it work?
 
Like printf
Or Console.WriteLine
 
o huh
maybe sometime
 
2:19 AM
TBH I like C#'s format more than C's
 
@ASCII-only It's called CamelCase as well.
 
@ATaco no wat
 
(Where upper camel case is in reference to CamelCase)
 
@Pavel ಠ_ಠ
 
 
2:26 AM
@Pavel this is not formatting
C# formatting: $"foo is {foo}"
 
@ASCII-only Also C# formatting: Console.WriteLine("foo is {0}", foo);
 
D: where's the end of the string
 
The compiler expands $"foo is {foo}" to string.Format("foo is {0}", foo); anyway.
 
@Pavel yes but who uses the wrong way :P
 
People who have to support C# 5, I guess.
I still like it more than sprintf formatting.
 
2:34 AM
Proton formatting: "1 + 2 = #{1 + 2}"
 
Come to think of it, that's not even formatting, that's just string interpolation.
IMO there are some cases where String.Format makes sense, while $"" supports all the advanced formatters, it makes it far less readable if you actually use them.
 
2:54 AM
@Pavel Really
 
3:28 AM
Hey!
 
@totallyhuman :| this is the new compression breaking, it somehow slipped past the unit tests
@totallyhuman Isn't this the case with every language :P
 
3:47 AM
@ASCII-only write better tests, then :P
but hey at least you found it
 
@totallyhuman Done :P
 
Clearly I should handle concatenation in GenericUnnamedLanguage™ the Byond way and do "[string1][string2]"
 
@totallyhuman btw it's still 108 bytes compressed
 
@ATaco UnnamedLanguage<T>
 
Also: yay looks like zalgo ”{⊞➙⁹⁻&∧⬤38ρ5%υ⁸U⎚Oz≕⎈3xFh↓C4·×¢▷≦oSr“≡μ↥9ψT³[⟦7≧uF‖«{﹪He℅qj±K⎇HL{2N⧴ατⅉ✂KH▷G÷≧‌​#SπQQ⌕≡⎚πZlθ³φtρjXQ_W”
 
3:56 AM
Charcoal?
 
(Is that Charcoal?)
 
Yes
@ATaco Yes it is
 
It seems to output... garbage?
 
It's beautiful, I have no idea what it means, but it's beautiful.
 
&-{-!{-!{0!0{0!0{{0! &00 !0--{-0! &-&!-{0!0{!0 -0 &!{ &&!!&!{0-{--!--{ -&- &!!-{- & -&0! 0&0--{0- -&0{-{0&!&!&0&00!-- !!{ &&{0 { !{- !-!--{ 0 {!- {!{{0--!!&-00-&&!0{&0-{{!{&& 00&!{ 0-!- { 0!-0& 0{!&{& -{ 0&&00-0& !{ &!& &!{-{ {!{0&!!!!0!{{&&&!{!&&0&--!0--0&-0!0{ 0-!- 0&!{-& 0-
 
3:56 AM
Yes, it's broken rn
 
@ASCII-only ah i didn't think that it'd be shorter, especially since bubblegum does 70 something
 
Ah
 
I'd say it's a feature in disguise.
 
@ATaco see the closing quotes at start and end? that indicates a compressed string
@totallyhuman :/ how
 
Oh, neat.
 
3:57 AM
zopfli :P
 
@totallyhuman Wait really?
@ATaco So yeah if you remove the quotes it parse errors out pretty quickly :P it probably only prints {
 
@ASCII-only Nope, prints nothing
> TypeError: 'Whatever' object is not callable
What's Whatever
 
Acts as no-op (identity) for as many things as possible
 
Why isn't it callable as an Identity function?
 
Whatever + 8 = Whatever * 8 = 8
 
4:00 AM
Whatever(stuff) := stuff
 
well I intended it mostly to be used as an operator argument
 
Whatever / 0...
 
Should break
 
Is it definied in the Python stdlib or somewhere else.
 
4:04 AM
Cool
 
I still think it should implement call.
 
Yes
 
Anonymous
So to make it callable, you could do def __call__(self, *args, **kwargs): return dict(enumerate(args), **kwargs))
 
Anonymous
Oh wait update is in-place
 
What's kwargs
 
4:06 AM
0
A: Sandbox for Proposed Challenges

MD XFImplement a basic two-dimensional esolang code-golf There are lots of two-dimensional stack-based esoteric programming languages out there, and lots of them follow a very similar syntax: v redirect instruction pointer down > redirect instruction pointer right ^ redirect instruction pointer up <...

 
KeyWord ARGS
 
How does it behave differently from regular args?
 
well kwargs is a dictionary
 
CMC: implement multiplication so that for any strings a and b and c we have (a+b)*c == a*c + b*c, where + is string concatenation.
 
so you can do function(blah = 3, lol = 4)
 
4:08 AM
tag is because otherwise you would just give me the annihilator
 
Ooooh
I get it now
 
and then kwargs == {'blah': 3, 'lol': 4}
 
Anonymous
@Pavel Like so
 
...also btw it doesn't have to be named kwargs
the only important part is the **
 
Anonymous
Nope, but it's a convention
 
4:10 AM
ye just like self
 
Anonymous
Same with *args - the only important part is the *
 
Wait is ** a splat of a splat
 
Anonymous
@Pavel Different operators, same spelling
 
self still has me puzzled
 
Anonymous
Golfed instance methods can be written like __call__=lambda s,*a,**k:dict(enumerate(a),**k)
 
4:11 AM
i've never seen a convention so strictly followed
it is hard to find code that names self something else
 
@totallyhuman I use this and I refuse to change.
 
@totallyhuman it's kinda like this in other languages, people are used to having no choice I guess
@ATaco so it would be identity?
 
Yeah.
Whatever(...) := ...
 
@ATaco anything but 1 argument should error right
 
@ASCII-only No, if there are 0 arguments return None, if there are multiple return args, kwargs or [args, kwargs].
 
4:20 AM
@ATaco I just forgot
@Pavel I'd go with Mego's implementation for number of args > 1
@Pavel also return whatever for 0 args
 
Yeah, good thought.
 
@LeakyNun: Why did you swap the top two, but not the bottom two? codegolf.stackexchange.com/posts/139507/revisions
 
Anonymous
So def __call__(self, *args, **kwargs): return dict(enumerate(args), **kwargs)) or self
 
@ZachGates the bottom one applied to two; also, the top one was affecting the scoreboard
 
@NewSandboxedPosts I should try to do this in Charcoal, seems pretty easy
 
4:25 AM
Cool, 👍
 
@Mego also identity when called with one non kwarg
 
Anonymous
Yet another request for handwriting samples for an upcoming challenge - I have 7 so far, and I would like to have at least 10 for the challenge.
 
@Mego is it a bad idea to intentionally write badly
 
4:41 AM
@Mego I could submit another with my left hand :P
 
Anonymous
@ASCII-only Well if it's too illegible, I just won't use it.
 
Time to break out a calligraphy set?
 
Throw Consolas in there for the kicks.
 
@Mego yeah but like only semi legible as an edge case? Possibly?
@ATaco you mean... Comic Sans MS :P
 
^ courtesy of Reddit
 
Anonymous
4:55 AM
@PhiNotPi I remember armchair psychologists (aka first-year psych students) were diagnosing that person with sociopathy based on that.
 
I would say... whether or not it's sociopathy depends on whether she did it for kicks a couple times or if she lives her entire life forging other people's handwriting.
I actually think that would be a pretty cool ability to have, to be able to adjust handwriting like that.
But before I do that I suppose I could attempt to get my left hand up to par.
 
251
Q: Dwarf Fortress starting during apt-get upgrade

AdrijanedWhen I run apt-get upgrade on my Ubuntu 17.04 machine, sometimes it starts Dwarf Fortress by itself. It has happened already at least two times, so it was probably not just some sort of one time thing. Also, the execution of the apt-get upgrade seemed to be paused until I manually quit the Dwarf...

6
 
5:12 AM
upstar for dwarf fortress
 
That's excellent.
Whenever a process attempted to see how much free space was left, Dwarf Fortress was called instead.
 
I should just bundle the two dfs together. When you exit dwarf fortress it gives disk usage information.
 
alias df=~/bin/df && /bin/df
 
What does the =~ do?
 
That's = ~/bin/df
It should be alias df="~/bin/df && /bin/df"
 
6:20 AM
a=1
s="hello"
def test():
	print(a)
	print(s)
	s+=" world"
test()
removing s+=" world" causes it to run normally
is this a bug?
 
I'm guessing += looks for locals, whereas print looks for locals then globals
 
@DJMcMayhem and I'm asking whether it is intended
 
>_>
If a variable is defined globally, you shouldn't be able to shadow it locally.
 
@Pavel you can refer to it but you just can't assign
 
You can with global foo, but the point is if you have a global x any reference to any x that isn't explicitly qualified to be a member foo.x should be a reference to the global one.
 
6:31 AM
@Pavel so it's a bug?
 
I don't know about bug or not. I don't really python. I'm stating my opinion on a certain part of language design.
 
@LeakyNun What
@Pavel shadow?
 
Yes.
It just makes reading the code more confusing.
 
@Pavel not necessarily
 
@ASCII-only Shadowing means defining a variable with the same name as a variable with a greater scope.
 
6:35 AM
@Pavel how is that bad >_>
python even requires you to explicitly state you're using a global before you can assign to it in a child scope
 
or else you would be creating a new local variable
that's the thing with python: there's no initialization.
 
It wouldn't be bad if, say, to use globals you always had to qualify it with global.x. But currently if you just see a reference to a varaible x, it isn't clear at a glance wether it's referencing the global or instantiating a new one.
@ASCII-only But not to reference the variable.
 
@Pavel Yeah?
@Pavel How exactly does that make code harder to read
 
The UnnamedLanguage<T> quine is currently s="s=%qprint(s%%s)"print(s%s), which is loosely based off the lua one. print((s="print((s=%q)%%s)")%s) also works, but it's 2 bytes longer.
 
If there's no declaration it's pretty obvious the variable is a global isn't it
 
6:40 AM
That's a dangerous assumption, but a common one.
Global variables are the devil.
 
@ATaco How
 
print([list(locals()['.0']) for _ in [0, 1, 2]])
 
@ASCII-only What if you have a reference followed by a declaration.
It should at the very least require global foo before allowing you to read it.
 
Why
I mean one reason it's not needed is because you'd have global all over the place
 
@ASCII-only If you're only ever working with code you've written, it's fine, otherwise, clogging up the global namespace is a curse.
 
6:47 AM
@ATaco Of course, but this isn't about clogging up the global namespace
Fun fact: Charcoal intentionally clogs up the global namespace to make Python eval golfier
 
I know, I'm just putting in my two cents.
 
Of course, this is coming from a C#/Java dev, where "global variable" means "public field of a class"
 
but now that I think about it I can just pass modified globals to eval/exec directly >_>
@Pavel Well. In C# global = this.something
you can kinda tell it's global
I mean it isn't needed but really if it's confusing then include this.
 
RProgN2 almost always uses its global namespace, even though it's technically possible to define locals.
 
Yeah.
I suppose there is a solution.
Proper naming conventions.
 
6:50 AM
Naaaah.
Interchanging snake_case, camelCase and CamelCase depending on how I feel at the moment.
 
Public are UpperCamelCase, private are _lowerUnderscoreCamelCase, local are lowerCamelCase.
 
@ATaco .............
 
You can tell if you're referencing a global by the first character.
 
@Pavel ew underscore
 
@ASCII-only I didn't like it at first, but then I realized how much better it is to differentiate private from local fields.
 
6:52 AM
I'm using _lowerUnderscoreCamelCase for metamethods, lowerCamelCase for globals, and snake_case for library methods.
 
@Pavel well tbh you shouldn't need to be able to
it's like Hungarian notation all over again
 
I'm really bad with naming things in general though, and I blame CodeGolf.
Best variable names.
 
Crementor?
 
In-crementor and De-crementor are wrapped into one method.
So I called it Crementor.
 
@ATaco ....... why \\+\\+
 
6:55 AM
What did you name UnnamedLanguage<T>'s repo?
 
@ATaco Also ew you parse it every. single. time. it. is. called.
 
Like, the files can't just be floating around somewhere.
 
@ASCII-only Because the 'name' of it is the regex /\+\+/, which can't be matched in strings.
@Pavel Funky, but I think that's taken.
 
@ATaco Why
 
@ATaco TIO search returns 0 matches
 
6:56 AM
I should probably make a push...
It's not on TIO.
 
@ATaco Exactly, it's not taken.
 
@ASCII-only It's just how the Lexer works, you can name tokens, but raw regex is a bit faster.
@Pavel I'm also not a huge fan of the name, I just needed to call it something.
 
also ew your node types are strings
 
Yeah, shoot me.
 
@ATaco O_o RProgN2 has locals?
 
6:58 AM
@ATaco Nope, you've named the repo 'funky' and you're stuck with it now.
You make not like the name but inevitably, you will ask for Dennis to add it to TIO, and not be able to come up with a better one.
 
Eh, Just because I've spent like 12 hours on it so far doesn't mean I like the language.
MaybeLater was atleast Esoteric.
 
Well, either way, you won't come up with a better name.
You know this to be true.
 
I'm liking UnnamedLanguage<T>
 
@ATaco ... Did you use your parser from that other language you were writing
 
@ATaco ¯\_(ツ)_/¯
 
6:59 AM
@ASCII-only Used it as a base, rewrote all of it.
 
@ATaco *Language<T>
 

« first day (2393 days earlier)      last day (2451 days later) »