« first day (2424 days earlier)      last day (2419 days later) » 

5:00 AM
ooooooooooh >_< I thought you said your parents bought u a house when you were 8
 
@Downgoat no lol my parents would never buy me a house
 
@ATaco I feel like the opposite would be more useful, ?! to interrobang.
It would almost be useful as a chat command but it usually doesn't have a leading space.
 
@ASCII-only 2008 was not a good year to make real-estate investments ):
 
@ZachGates no. no it wasn't
@Pavel WinCompose
 
I dunno if australia's housing market also went kaboom or if it was just US
 
5:04 AM
@Downgoat I think just US?
 
@ASCII-only will check it out
 
Question: is it acceptable to add link in English paper to your organization's website
 
uh
depends
 
@Pavel or FreeCompose (Deusovi uses this)
 
@Downgoat For-profit organization?
 
5:07 AM
> "this is a really cool website check it out: link" X
bad
 
@ZachGates non-proft tackling environmental issues
 
but citations are obviously acceptable
 
no citations this is narrative
 
@Downgoat My advice would be to not ever link to a for-profit, and to be careful of your wording if linking to a non-profit
 
so would ... named XXX (see linktosite.org) be OK
 
5:10 AM
@Downgoat you have organization?
 
@Downgoat Can you come up with a sample sentence? I'm not really understanding that wording
 
@ASCII-only well not just me, with a team
> We presented our app DoGoodThing as a solution to empower people to do good things
like the entire essay is on DoGoodThing so I would it be fine to slip a link in
 
You said it's a narrative, right? I don't see a reason why you shouldn't link it
 
Anonymous
@Pavel Seattle, NYC, LA, Hollywood (specifically Beverly Hills), SF, DC are all expensive
 
Yep
 
5:14 AM
@Mego No I didn't
 
Anonymous
@ASCII-only You saw nothing
 
@DJMcMayhem D: How could you have TeamSpirit
 
It's fun
Although it's been broken recently
 
@Pavel I have a specific distaste for Interrobangs, to the point where I'd rather not see them.
@ASCII-only Even I don't have teamspirit anymore :P
 
@ATaco like the character itself or ?!s in general
 
5:17 AM
@ATaco Exactly my point :P
 
@Downgoat The character itself.
 
@ASCII-only what was the TeamSpiri even for originally?
 
What‽ How can you not like interrobangs‽‽‽‽
 
oh god
 
TeamSpirit was one of those things I made because I liked the concept.
 
5:19 AM
concept of what?
 
Of starting a civil war obviously >_>
 
:P
Blood spilled for the giggles.
 
100% effective to start civil war here is to say something bad Python
 
quartata is leading the red team to victory :c
@Downgoat the new dict feature in Python 3.7 is stupid
 
@LeakyNun Which one
 
5:21 AM
@LeakyNun What feature
 
@LeakyNun I don't know what you're talking about but agreeing with it fits my narrative so yes I agree
 
@ASCII-only @Pavel new_dict = {**dict1, **dict2}
 
@LeakyNun How is that bad though
 
Oh, dictionary splats?
I could have sworn those already existed
 
5:22 AM
@LeakyNun what's the difference with new_list = [*list1, *list2]
 
@ASCII-only wait, it's also 3.7?
 
How does {**{"foo":0}, **{"foo":1}} work?
 
@LeakyNun No, that has been in Python for ages (IIRC)
 
why don't u list1+list2 though
@Pavel only one way to find out :P
 
@LeakyNun But TIO doesn't have 3.7
 
5:24 AM
@Pavel then download it :P
 
I guess they should have overloaded dict.__add__ in 3.7 too though
 
@LeakyNun Fortunatly it worked on TIO anyway, so clearly this isn't a Python 3.7 feature
The result was {"foo":1}
This also happens with {"foo":0, "foo":1}
I think dictionary splatting has existed as long as **kwargs has.
 
Question: why is it called kwargs and not like just args
 
@Downgoat keyword-args
 
Because args is a different thign
 
5:27 AM
wait so name in *<foo> matters?
 
args is a list, kwargs is a dicrionary of named parameters.
 
def f(a,b,c,start=0)
 
@Downgoat nope, it's just convention
 
0/10 redundant convention
 
f(start=1,1,2,3)
 
5:27 AM
@Downgoat No, because for kwargs you use **kwargs
 
this should work right
 
@LeakyNun Nope
 
So you might have def foo(*args, **kwargs) to define a function that can take any named and unnammed parameters.
 
then wth is it for
 
@LeakyNun if you want to turn your args into a list
or a dict in the case of **kwargs
 
5:29 AM
@Pavel :| why not just directly pass a dictionary
 
for e.g. commandline flags although that probably isn't a good example
It's very useful for decorators though
 
@Downgoat it's used for @
and I'm sniped
and I don't even know it's called decorator
 
@Downgoat Well you want to support varargs right? But then you have to support varargs for named args.
 
@ASCII-only btw are we converting func foo(*f: T) into func foo(f: T[])
 
def truerandom(f, *args, **kwargs):
    return lambda:4

@truerandom
def random():
    return random.randrange(6)
 
5:31 AM
is there a term used to refer to the charitable part of the 'private sector'? e.g. non-profits, organizations, charities, etc.
 
@ASCII-only Uhh is that a bad thing?
I guess I just forgot to turn it off idk
 
@DJMcMayhem Not really :P I just think it's unusual I guess?
@Downgoat IDK, how will other collection type work? Do we do implicit cast? or do we require func foo(*f: T[])
 
C#'s varargs are one of the places where I like it less than java. void f(params string[] foo) instead of void f(String... foo)
 
@ASCII-only why don't we just maybe convert func foo(*args: T) to like func foo(argStart: Pointer<T>, count: UInt)
 
5:33 AM
@Pavel Yes. :|
 
to avoid overhead
 
@LeakyNun >_> It was always in Python
 
@ASCII-only sorry, I got confused with Cheddar
 
@LeakyNun oh haha (althought I don't exactly understand you'd get fuel mixed up with food :P)
 
lol
 
5:35 AM
@LeakyNun BTW keyword arguments always at the end is a convention in almost all languages, I guess it's usually clearer? Because if you have keyword arguments at the start the non-keyword-argument order may seem messed up
 
5:54 AM
@Downgoat oh also: possible bad idea: allow keyword arguments not at the end (oh wait >_> I think I already allow that oops?)
 
@ASCII-only what do you mean
 
I am almost the sole user of RProgN, besides the occasional person abusing 1\n0
 
Anonymous
@ATaco I know that feeling
 
CMC: Write a non-trivial C preproccessor quine
 
I'm not sure what a trivial one is, so I'm gonna try and write one in general.
 
6:06 AM
I missed the word quine and was confused as to how a C preprocessor could be trivial
 
Well any program without any # directives is a C preprocessor quine
(Assume -P flag)
@ATaco The preprocessor can be tried at tio.run/#preproc
 
I have no idea how to output with the preprocessor.
 
?
TIO's Preproc takes the code, runs cpp on it, and writes the output to /dev/stdout.
@ATaco Normally the preprocessor is meant for writing to a file, not stdout
 
Alright, I have no idea how to do any kind of text output.
Oh, wait, Hello World example.
 
It's really not rocket science
Text goes in, text is tweaked, text goes output again.
 
6:24 AM
How dare this be Turing Complete, its ruining my quine attempts.
 
so you can quine any turing-complete language?
I mean, theoretically you can, but can you?
 
@ATaco No it isn't
 
Anonymous
@ATaco C preprocessor isn't TC I think. I remember there being a big discussion in here a few months ago, and I might be wrong.
 
I have no idea if a Preprocessor quine is possible
 
Let me write a primacy tester...
 
6:25 AM
@Mego right, coz it can't loop
 
That's were you're mistaken.
 
It's TC if you can feed it into itself multiple times, in the same way that regex becomes TC if you apply it repeatedly, such as in ReRegex or Retina.
26
A: Is the C99 preprocessor Turing complete?

btaHere is an example of abusing the preprocessor to implement a Turing machine. Note that an external build script is needed to feed the preprocessor's output back into its input, so the preprocessor in and of itself isn't Turing complete. Still, it's an interesting project. From the description...

Although another answer (kinda) suggests otherwise:
115
A: Is the C99 preprocessor Turing complete?

Paul Fultz IIWell macros don't directly expand recursively, but there are ways we can work around this. The easiest way of doing recursion in the preprocessor is to use a deferred expression. A deferred expression is an expression that requires more scans to fully expand: #define EMPTY() #define DEFER(id) i...

Basically it's confusing af
 
oh, it only runs each definition once.
That makes my quine more possible.
 
You can't define preprocessor macros
#define foo define
# foo bar baz
Doesn't work
 
Nomatter what I do, it refuses to accept having a # at the start of a line.
Thus, a non-trivial preprocessor quine is impossible due to IO restriction.
 
6:35 AM
Hmm
It almost does
 
I mean you could put a space in front of the #
 
And we're in business again.
 
I wonder if this would be easier if #including the source file is allowed.
 
Anonymous
@Pavel Does #include "__FILE__" work?
 
6:47 AM
@Pavel well of course, macros are handled before processing
 
@Mego No, but #include __FILE__ does.
 
The complete inability to create newlines is getting to me.
 
So it's nice how #if can accept e.g. FOO > 2, but you can't actually decrement a symbol, 4 - 1 is not considered > 2. So you can't really have for loops, which you otherwise could with recursion
@ATaco You can if the newline is in a comment and you supply the -CC flag: tio.run/##KyhKLSjKT/7/X1@Li0tL/////24@ju5Wus7OAA
This annoyingly also adds a giant block of copyright information at the top of the file.
 
But that only allows newlines in said comments, which won't work.
Because */#define isn't a valid macro.
(I think)
Yep, it isn't.
Death by inability to newline.
 
7:09 AM
@ATaco It is if there's a /* on the preceding line
 
Newline was a red herring.
All that does is remove the nl
 
Mm
Well, I guess it lets you make empty lines
 
8:05 AM
Planning on challenge
idea:
keyboard
korean keyboard
 
Anonymous
Please don't take up valuable vertical screen space with disjointed messages
 
9:10 AM
weird, I just got the yearling badge, despite joining ppcg in april
 
@Mego it wastes the E-Ink
 
9:32 AM
Quick question, is there any way to shorten this C# code? ()=>System.Math.Acos(-1)
 
9:46 AM
@IanH. Use a constant? Depends on how many digits you need.
 
@mınxomaτ Using a constant would not shorten the actual length of the code, right? Atleast not for golfing
 
?
> Depends on how many digits you need.
For all I know, 3.1 might be enough. I don't know the challenge.
 
@mınxomaτ 14-16 digits, but how would you shorten a number in C#? 3.1 isn't enough sadly.
 
@Mayube I got mine a few weeks ago too which, although being a year since actually joining the site, was just over 4 months after my first post.
 
10:43 AM
@IanH. ()=>3.14159265358979 is shorter by a few bytes
Of course, ()=>System.Math.PI is even shorter
 
@Emigna I'm guessing it's for this challenge so that wouldn't be permitted.
 
hmm, seems like BrainFlump is near impossible to use for conventional uses
 
True, if it's that challenge built-in constants aren't allowed
 
a bf program as simple as ++++++[>++++++++<-]>. seems pretty much impossible to recreate in BrainFlump
 
11:08 AM
CMC: "If" – given a list and a Boolean, return the list unmodified if TRUEy and an empty list ([]) if FALSEy.
 
@Adám lambda a,b:return a if b else []
 
@Mayube What language is that? And why do people post answer with the assumption that readers can correctly can identify languages? :-P
 
Python3
in the case of a language having strictly typed arrays, does the type of the returned empty array matter?
 
@Mayube Are you sure that's the shortest solution? Couldn't you change the shape/chop/sub a, avoiding if?
 
might be able to omit return altogether
and just have lambda a,b:a if b else[]
oh yeah the space after else was unnecessary too
 
11:20 AM
@Mayube Good point. I was thinking of that for APL too. Really it should be the type of the given list, but I didn't want to complicate the matter.
@Mayube Now we're golfing!
 
@Adám C#, returns empty int array (a,b)=>return b?a:new int[0];
probably works in java too
@Adám JavaScript: (a,b)=>b?a:[];
 
@Adám 05AB1E, 4 bytes: i,ë)
 
@Adám Braingolf: ?:&_|=;
 
APL, 1 byte: / (equivalent J: #)
 
CMC: Output 0 in BrainFlump in under 49 bytes
For reference, Here is the 49 byte solution
 
11:31 AM
@Mayube not sure if really possible
 
Agree with Erik. If the only ways to modify the cell is to take input, pop from dump, increment and decrement it seems impossible
 
and you can't actually "store" anything in the dump since retrieving it will overwrite the cell
 
If the pop from the dump added to the current value, the loop could be used to make something
 
also if you instead store the old cell value so that you can retrieve it later then you can't really know what you'll retrieve
 
I'm actually considering removing the cell altogether, and treating the Dump more like a brainfuck tape, but in a random order
@EriktheOutgolfer to be fair if the dump only contains one value then you can retrieve it fine, provided you don't need to keep the cell as well :P
 
11:38 AM
multiplication needs two values
and brainflump seems incapable of doing multiplication at all
 
@Mayube -1 for language specific.
 
Could be 13 bytes if popping added to the cell.
 
how? I get to 19 bytes with that approach
++++++++:::::;;;;;.
 
@EriktheOutgolfer ++++++:;:;:;.
 
...dual approach mmm
 
11:51 AM
could do less starting at 3 evn
 
or 12: +++:;:;:;:;.
 
Yeah, that's what I meant by starting at 3
 
@Mayube :/ whoops i used up all the redstone
 
CMC: Enclose if simple – [1,2,3][[1,2,3]], [[1,2,3]][[1,2,3]], [1,2,[3]][1,2,[3]], [1][[1]] (other explanation: put into list if no child is a list)
 
@Adám simple meaning all children are not lists?
 
11:54 AM
you mean that it hasn't been already enclosed?
 
@ASCII-only dammit, go get more
 
testcase: [[1],[2],[3]]
 
@ASCII-only Yes.
@EriktheOutgolfer no change.
 
@Mayube we may need more chests
 
husk, neim, maybe others too: impossible :/
 
11:55 AM
@EriktheOutgolfer Wat‽
 
husk can't have a list of varying types
neim can't have a list in a list
 
Oh.
 
C++: Okay I'll try but I cant guarantee success
 
@Adám JS: a=>a.every(e=>(l=e.length)!=+l)?[a]:a
 
JS: YAS
 
11:57 AM
@Nobody ?
 
Its just the challenge for JS
Theres JSON
all good
 
@Adám test case: []
[[]] or []?
 
@EriktheOutgolfer No child is a list, so [[]]
 
so it counts that all childs are lists, even though there are none, right?
 
@ASCII-only e=>e/e==1 ?
 
12:00 PM
@Riker no cats but 11/10 /r/dogswithjobs/
 
@ASCII-only get started on refined storage
 
@Nobody Doesn't work for length 0, but - probably does?
 
Hmm
 
@EriktheOutgolfer Nope, if the given list does not contain any lists, then it gets enlisted.
 
wait 0 doesnt work darnit
 
12:01 PM
@Nobody ???
 
@Adám Uhh no not you but ascii
 
@Adám jelly, 7 bytes: ŒḊ€ȦȧȯW
 
@Nobody I know, but I'm trying to understand your code.
 
@Adám wait will all children be numbers?
 
@EriktheOutgolfer Just for reference; APL,
@ASCII-only I never said that.
 
12:03 PM
@Adám D:
 
@Adám division wouldnt work on lists
 
@Adám Was just wondering :P If they were, it would be golfable
 
@Adám weird builtin for non golfing language
 
@EriktheOutgolfer I asked for it to be included in the latest version. Immensely useful for applications programming. Barely used in golfing.
 
12:05 PM
but...why?
 
o..kay?
practical applications with apl?
 
@Nobody what do you think APL was used for >_>
 
golfing -_-
 
@Nobody you what
2 mins ago, by Erik the Outgolfer
@Adám weird builtin for non golfing language
Erik literally just said it wasn't a golflang lol
 
because it's not
 
12:07 PM
@EriktheOutgolfer @Nobody Because often the argument or constructor can be a single simple array or multiple arrays. In order to easily handle such varying input, we can now "enclose if simple" and then process each; {process}¨⊆
 
it belongs to the same class as j iirc
@Adám sorry can't reply to two :p
 
@EriktheOutgolfer Exactly :P
 
@Adám so it can be of different types?
 
@Adám well I normally say that's dangerously inconsistent behavior >_>
 
like, wouldn't it be already enclosed if it needs to be?
 
12:08 PM
huh
 
unless code is insane or something???
 
ic
 
@EriktheOutgolfer APL is even more "practical" as it is used for major production systems whereas J is more of an exploratory research oriented language.
 
well apl has less builtins
 
@EriktheOutgolfer APL only has one data type; the array.
 
12:09 PM
it doesn't have integers?
or strings?
or numbers?
 
@EriktheOutgolfer Less primitive functions with symbols, but a lot more built-in utilities.
@EriktheOutgolfer Nope (well, yes, but only under the covers); a number is a number.
 
well, I think it has "exec as bf" or something
 
@EriktheOutgolfer No, only arrays of characters.
 
oh it has a char datatype?
 
@EriktheOutgolfer … but both characters and numbers are just scalars in bigger arrays. They can be mixed at will.
@EriktheOutgolfer No. Just arrays.
That's a function which comes with a standard install of Dyalog APL.
 
12:12 PM
if you have an array of chars like 'abcde' can you retrieve the e as an individual char?
 
@ASCII-only We like to be flexible when it comes to input format.
@EriktheOutgolfer Yes, ⊃⌽'abcde' gives the first of the reversed array, i.e. a scalar char.
 
@Adám I guess that's true, but you need to make sure the users are very aware of this
 
@Adám what about simple indexing?
 
Why? If they enclose the argument, no harm is done, as will not enclose it again.
 
or ⊃'e'
 
12:14 PM
@EriktheOutgolfer array[] or i⊃array or i⌷array
@EriktheOutgolfer No need, 'e' is already a scalar.
 
there aren't 1-element arrays? like, you have to enclose 'e' with a function to get a single-char array?
 
Hi all. Wow, how big is your chatroom, it is a larger as a mature site.
 
@peterh the size is about 13-14
 
Yeah.
There is a deleted answer here: codegolf.stackexchange.com/a/143046/67961
 
@EriktheOutgolfer There's only one datatype in APL; the array. All arrays have a rank which is the number of dimensions. All arrays have a shape which is a list of the lengths of each dimension. Scalars have rank 0 and thus shape [].
 
12:17 PM
It was deleted, because it couldn't be determined if it fulfills the win criteria of the question.
 
@EriktheOutgolfer In fact, in memory, arrays are stored as rank,shape,data.
 
However, the poster declared, that (s)he wants to post it as non-competing.
2
I think, it could be a reason to undelete the answer, how about it?
 
@Adám what about an array like [[1],[1,2],[1,2,3,4],[1,2,3],[500,-6,'c']] with multiple lengths?
or [1,2,[3,4],5,'c','ce'] with multiple dimensions?
 
@EriktheOutgolfer In APL, that is rank=1, shape=5.
 
(Sorry I won't go with it to the meta before some preliminary consultation)
 
12:19 PM
@Adám oh so it's not considered as a 2-d array?
 
@EriktheOutgolfer JSON cannot describe all APL arrays. APL has both rank and depth.
You could represent an APL array as a JSON object: {"shape":[2,3],data:[1,2,3,4,5,6]}
(You don't need to specify rank if you specify shape, as the rank is just the shape of the shape.)
 
star spammer
 
chill with the stars
@peterh Mathematica is simply not a valid language for , in the same sense that a language with a non-deterministic bytecount is not a valid language for
 
@cairdcoinheringaahing sure ಠ_ಠ ;-)
 
@Mayube Ok, but the poster declared it as non-competing, and his/her solution seems to me quite interesting, because it looks as a declarative program.
 
@Mayube I knew nothing from Mathematica until now, except that it exists. Now I think I could learn it a little bit.
 
@peterh nah, learn braingolf instead :^)
 
I wish I could down-star.
 
I still suck at 05AB1E
 
I really need a char print function on my language but it would be awkward since its a mathlang but if I dont I cant make Hello world
What should I do
Add or not
 
12:40 PM
Add
 
Okay then
 
@Mayube Wow, it seems a perfect way to solve many codegolf questions quickly :-)
 
it's the javascript of golflangs :D
 
@Mayube However, maybe the flow control commands could be hard.
I've always tought on a full, c++-like OOP language, but without a single reserved word. Instead, all the reserved words should be non-ascii characters.
 
Interesting, if you just adblock the "your trial expired" modal in Microsoft Flow, it keeps working for free...
14
 
12:47 PM
heck, it's legal too!
 
My another idea was a programming language, which doesn't have source code.
 
@peterh Piet
 
it has source code although it's an image
 
`
 
Hi everyone
 
12:48 PM
just discovered what that does in 05AB1E
 
@mınxomaτ do you spend your time trying to break things lol
 
@Neil yeah pushes all items of an array into the stack
 
@mınxomaτ But then you have to use Microsoft Flow >_>
 
I know... I just discovered...
 
It basically collapses the elements onto the stack IIRC :)
 
12:49 PM
@Neil it's misdocumented as "flatten"
actual flatten is what is documented as "deep flatten"
 
@Geobits If it would work, it would be a pretty good tool.
 
yes... a lot of 05AB1E appears to be badly documented
 
or "1-9 char compressed string" when in fact it means "compressed number"
 
@ASCII-only More or less my job, yeah.
 
@mınxomaτ You're a terrible salesman :P
 
12:51 PM
maybe that's not his job though? ;p
 
does 05AB1E have a grade function?
 
like, sort indices by values?
 
given an array of values, I need an array of indicies in which the values would be in order if permuted by those indicies
actually there are only two values so the result is always going to be [1, 0] or [0, 1] but it's currently taking me 6 bytes to compute
 
@Neil Can you give us a an example?
 
[2, 1] -> [1, 0]
[1, 2] -> [0, 1]
[1, 1] -> either [1, 0] or [0, 1] (don't care)
 
12:59 PM
Ah So sort the indices depending on the values.
 
how about [1, 1] for the last case?
 
no that would be wrong
 
there goes ZQ...
 

« first day (2424 days earlier)      last day (2419 days later) »