« first day (2915 days earlier)      last day (1931 days later) » 

1:21 AM
@flawr I believe it's dead as of yesterday/day before
somebody made a github webpaeg with a tree diagram though
 
 
3 hours later…
4:00 AM
0
A: Sandbox for Proposed Challenges

QazHTML-tac-toe Build a one-player tic-tac-toe game with only HTML and CSS. Introduction You can do just about anything with a fully-featured programming language, but how much can you accomplish on a Neopets petpage? Inspired by http://www.neopets.com/~vuh Challenge Build a one-player tic-tac-...

 
@Downgoat for what
 
@ASCII-only in like VSL
How do you know which should be executed first
for example if they are multiple files
 
imo top to bottom
oh well uh
if there are multiple files, is it even possible
 
4:27 AM
@Downgoat oh yeah since you're here:
21 hours ago, by ASCII-only
also @anyone what conditionals/branching/looping should be in the core of the language (as in, the part used to create the standard library)? goto+if? while? for_each? should C-style for loops be in the core (they are no more than sugar for a rearranged while loop)? and should exponentiation be a core feature too?
 
@ASCII-only while is all you need
is this a strict type or dynamic type language?
 
strict
but i'm going for a more complex type system, like haskell
@Downgoat would that be a good idea though
also if you don't mind could you also take a look at #48603188
 
@ASCII-only yeah having gotos in core would make it hard to make sure things that are supposed to return do in fact return
 
0
Q: algorithm to find nearest resturant

jasonI need help with the algorithm to get the shortest distance. On a street there are x customers and y restaurants. Need help to find algorithm to get nearest restaurants among all. Have tried but couldn't find any solution

 
4:52 AM
@Downgoat now, to figure out how to create a lambda/block/closure or something :/
 
@ASCII-only is this compiled language
 
no (well, not yet)
i guess the problem is mostly type deduction
 
5:18 AM
@ASCII-only oh for type deduct i highly recommend algorithm used in vsl 10/10 very fast and flexible
@ASCII-only wait how do you have expressions in a type expression?
shouldn't that just be Array<T: IdentifierNode>
 
@Downgoat it'd be used during overload resolution
@Downgoat no because you don't have the value yet, just the AST node
 
@ASCII-only as in determining which overload to call?
 
@Downgoat yes
 
@ASCII-only yeah still having hard time figuring out how to do lambdas in VSL
the issue is the pass that would detect which scope an identifier belongs to which takes like 3ms per pass which is painfully slow (compare to like 20us for expression type deduction)
 
@Downgoat would they not be similar to functions
@Downgoat why not have the scope as a property on the identifier node
 
5:23 AM
@ASCII-only if you mean nested functions, yes, since those are basically lambdas too, but methods and globals are easy because there is a finite amount of locations identifiers can refer to
@ASCII-only well the Identifier AST node points to a 'ScopeItem' which is associated with a Scope but that isn't a very fast process because in order to work with the memory optimization passes it would need to be able to compare lifetimes of captured identifiers relative to lambda, etc.
 
find what
 
for a class, global variables have unlimited lifetime and instance variables have the lifetime of their parent object
@ASCII-only fixed
I don't know how memory works for the language you are doing
 
why would it be slow to find the Scope though
@Downgoat it's interpreted rn so no issue here
 
@ASCII-only well to find the highest 'scope' that the identifier may escape to requires you to do static escape analysis
which I am trying to speed up but nodejs is inherently slow
 
@Downgoat ????
 
5:28 AM
@ASCII-only e.g.:
 
@Pavel you should be very, very, very sad you're using Python in the first place
 
func makeFarmBuilder(farmName: Farm) {
    return Farm(name: farmName)
}
func addAnimalToFarm(farm: Farm) -> (animal: Animal) -> Animal {
    return { farm.add(animal: $0) }
}

let farmBuilder = makeFarmBuilder("Hello")
print(addAnimalToFarm(farm: Farm())(animal: Animal()).getFarmName())
this is a simpler example but take the string, determining where it would need to be deallocated as it is captured by both lambdas requires much more complex analysis
not that it is impossible in this case
 
you could always take the easy out and go with ARC
oh yeah. also time to figure out how to do generics in the overload table :|
@MilkyWay90 It's not. They're literally the same language, just Python 3 has more generators and fewer specialcased functions (ones with optional parens)
 
@ASCII-only oh gl with that i ended up having a TypeContext class in VSL and after identifying the non-generic overload determining if a new implementation was needed: github.com/vsl-lang/VSL/blob/inheritance/src/vsl/backend/llvm/… but might be harder given dynamic system
 
@Downgoat well. this is interpreted :P so... 99% chance i'll just use a hacky workaround
 
5:51 AM
@ASCII-only we are from ppcg so s/hacky workaround/solution
 
Is it falsy or falsey?
 
falsy
 
57
Q: Is it "falsy" or "falsey"?

太極者無極而生I have seen both spellings of this word, falsy and falsey. It can mean "something that is equivalent to false" in computer science, such as "The only two falsy values in the Ruby Language are false and nil". What is the correct usage of this word?

 
so... inclusive or?
 
6:11 AM
@JoKing yes
 
7:09 AM
CMC: Given a truthy or falsy value, answer "truthy" or "falsey".
 
7:32 AM
@Adám perl -M"feature 'say'", 19 bytes: say<>?truthy:falsey
 
@Pavel That's an odd language name.
 
@Adám Adding flags to a language now makes it be considered a seperate language, so
 
@Pavel Sure, but this flag takes a parameter which effectively contains a lot of the necessary code, no?
 
@Adám You can replace it with a version flag, I just don't remember which version it is
Or rather, how Perl formats versions
It's kinda weird
Like 5.28 makes it think you're asking for 5.280
So I enabled the feature manually instead
@Adám What would it be in APL, anyway? say is longer than ⎕← and <> is longer than but the lack of quotes needed for the Perl makes me think it might have an advantage
 
7:41 AM
Right, it doesn't need console output
 
@Adám APL has 0 for false, 1 for true, nothing else for the notion of truthy or falsey, right?
 
It better, because 'foo' causes a domain error
Hmm, come to think of it I think this is literally the first time Perl quote-less strings have actually helped me in Golf
Every other time I've tried it was like say foo but in that context it interprets foo as a filehandle
 
@Pavel 5.028...
@Pavel @Adám -M5.01
 
(Which is actually subversion 10)
 
yes
 
8:02 AM
@Bubbler Kind of. Dyalog APL allows exactly 16 truthy values and 16 falsey values. The truthies are 1⍴⍨n⍴1 and the falsies are 0⍴⍨n⍴1 where n is an integer in [0,15]. In fact, it turns out that my solution isn't correct, as it doesn't handle all of those :-(
 
@Adám Is that 0 or 1 as the sole element of an nd array
 
@Pavel Yes of an 1×1×1×…×1 array.
 
Would anything like (1 1) be a domain error in an if statement?
 
@Pavel Yes.
@Pavel I get 21 bytes both for the full program ⊃'falsey' 'truthy'[⎕] and for the function {⍵:'truthy'⋄'falsey'}.
 
Modern Perl wins \o/
@Adám Just remembered, 5.10 and everything past that is called Modern Perl
Not quite officially, but
 
8:10 AM
What do they call Perl 6?
 
@Pavel clearly you've never been on code-golf.io
@feersum raku
or Rakudo Perl maybe
 
Lwall said you should call it Raku I think
 
8:30 AM
@Pavel D'oh, original code fixed for just a single byte: 'falsey' 'truthy'⊃⍨⊃
 
9:02 AM
0
A: Sandbox for Proposed Challenges

SokThere's a hole in the bottom of the sea Whilst trying (and failing) have persuade my infant son to eat his dinner, I tried singing to him. Mid way through the song I realised the formulaic structure might lend itself well to code golfing! The task is to write a program or function which accepts...

 
0
Q: Binary self-rotation

AdámGiven a binary 3D array, for each layer, cyclically rotate up each of its columns as many steps as indicated by the binary encoding of the columns of the layer above it, and then cyclically rotate left each of its rows as many steps as indicated by the binary encoding of the rows of the layer bel...

 
9:45 AM
My favorite part of using Windows is the feeling when you sprinkle a bunch of DLLs on something like fairy dust and it magically works.
 
@feersum How often does that happen?
 
I dunno, like once a month maybe?
 
 
4 hours later…
2:17 PM
0
A: Sandbox for Proposed Challenges

Comrade SparklePonyChain round the number! Chain rounding is a kind of rounding where you round each digit of the number based on the previous, from the smallest to the largest. For example: Input: 24472 24472 (2 < 5, so the 7 rounds down) 24470 (7 >= 5, so the 4 rounds up) 24500 (5 >= 5, so the 4 round...

 
 
1 hour later…
3:24 PM
@El'endiaStarman uh... what?
 
@EriktheOutgolfer TIL: Psychopath == No Morals
 
A very-broad-strokes definition I've been using for some time is that psychopaths don't have an innate sense or knowledge of right vs wrong whereas sociopaths do, but they don't care.
@EriktheOutgolfer I didn't think you meant it, but your statement was pretty self-contradictory on the face of it.
 
neither disorder has anything to do with morals
 
@El'endiaStarman I learned that sociopathy was a more politically correct name for psychopathy, though it eventually also became loaded, and was replaced with antisocial personality disorder.
 
Antisocial Personality Disorder is a more general umbrella term
 
3:36 PM
@El'endiaStarman it's actually partly a reference to how somebody totally unfamiliar with code golf might perceive golfed code, except that, in this case, this property is still apparent for me who is definitely familiar ;P this can also indicate much effort put into it so the end result has signs of fatigue in it (like Jonathan's answer in this case)
the meaning is a bit deep
 
@EriktheOutgolfer Oh, I had no doubt the code was messy, to put it lightly. I was just taking issue with implying the author of said code was a psychopath and then saying "no offense" at the end to make it okay. Again, I didn't think you meant it.
@Skidsdev Elaborate, then? Either my super-oversimplified definitions of psychopathy and sociopathy are wrong, or "morals" means something different to you than it does for me.
 
@El'endiaStarman nah, I would judge a lot of my code like that as well :P also, by "psychopath", I don't mean anything related to morals
 
@EriktheOutgolfer Hmm, maybe the colloquial meaning of "psychopath" has drifted since the first times I heard it in context. What does it mean to you then?
 
Anonymous
@El'endiaStarman Psychopathy is a catch-all term for mental disorders. There's no specific diagnosis of psychopathy, but it has been used historically to mean an impairment or absence of empathy and remorse and a lack of inhibitions, fear, and social attachments.
 
@Mego pretty sure that's sociopathy (which is one kind of psychopathy, naturally), at least nowadays.
 
Anonymous
3:44 PM
Sociopathy usually means Antisocial Personality Disorder (APD)
 
I see
 
Psychopathy is associated with a lack empathy, often related to physiological differences in the Amygdala and Prefrontal Cortex
 
I just dropped in here to rant about Delphi's IDE randomly changing my shortcut keys
 
Anonymous
@J.Sallé Using the historical definitions, there is a difference. A psychopath would hurt someone because they want to. A sociopath would hurt someone because it benefitted them.
 
fun fact: you need a third party extension to be able to change delphi's hotkeys
 
3:46 PM
in very broad and general terms, Psychopaths are usually described as organized and calculated, whilst Sociopaths are more disorganized and impulsive. Both struggle with empathy
 
@Mego yeah that's what I heard as well
 
Anonymous
@Skidsdev I think you have those backwards
 
@El'endiaStarman I mean the stereotype, that is, chaotic and weird behavior, although Wikipedia likes to disagree (my native language is Greek, not English, and psychopath, that is, ψυχοπαθής, comes from ψυχή, soul, and πάθος, roughly ailment, so, literally, I would interpret it as somebody who has a psychological disorder, while metaphorically I mean something that looks like it has been authored by such a person, but hasn't necessarily been)
 
I'm finding this whole discussion quite interesting. :)
 
yeah... :P
native language problems...
 
3:52 PM
I feel you
 
@J.Sallé Ergo, you're not one of the discussed.
 
lol, true!
 
@Adám oh god the puns!
I like it.
 
4:17 PM
— Here's a TCP joke.
— What?
— Here's a TCP joke.
— OK, I got your TCP joke.
— OK.

— Here's a UDP joke.
 
That's a good one.
 
i've been having too much fun with that cellular automaton
2
 
@dzaima Woah holy crap that's cool!
 
What are some good integration test frameworks that people have used?
 
CMP: How do you understand the syntax specification [a b|c d]? As 1) [a b]|[c d] or 2) [a {b|c} d] or 3) something else (please say). In other words, what binds stronger, space or pipe?
 
4:31 PM
@dzaima way too optimization and bitwise mess went into optimizing that, but at ~5ns/cell i think i'm finally happy with it and am too lazy to push java any further
 
@Adám 2
 
@Adám The former. Makes me think of mathematical notation and it's more likely that the pipe helps form groups rather than being an operator on the two closest tokens.
 
Anonymous
@Adám I can see it both ways. I think #2 would be how most people see it, but #1 looks like a shortcut in a golflang
 
@Mego It isn't a golflang. I'm only talking command line syntax spec etc.
 
Anonymous
@Poke I know that Selenium is very popular
 
4:34 PM
@Skidsdev @Mego Would [a b | c d] be different?
 
Anonymous
@Adám No
 
@Adám imo spaces should be the last thing bound in general (i.e. I), so 2
 
@Adám No
 
Anonymous
@Adám Then I think #2 would be what most people expect
 
Thanks.
 
4:37 PM
@Adám well... #2, since the spaces would separate the objects, how in the world can two separate objects be an argument?
 
2
Q: Who will win the election?

Comrade SparklePonyThis is a challenge in which two people, 1 and 2, are running for office. People deterministically vote in certain ways in the world of 1 and 2, which can allow for the candidates to figure out the results before the election. NOTE: this is not meant to refer to any outside elections or other po...

 
@Mego Looking less for UI testing in this case
Looking for things more in the Cucumber department
 
D'oh, my options were bad: Is [a b | c d] the same as [{a b}|{c d}] or as [a {b|c} d]?
 
4:52 PM
@Adám i just kinda assumed that's what you meant, my opinion stays
 
Likewise.
 
@Adám depends on what the space means...
 
@El'endiaStarman So you also stay, i.e. with 1?
@EriktheOutgolfer It means space. At least all guides say so.
 
@Adám heh, but... syntactically, what would it represent?
 
@Adám Yeah.
 
4:55 PM
… which is why I thought #1. Only []{}| (and sometimes () and/or <>) are special.
 
5:13 PM
@Adám it does matter what the expression means - in regex, (a b|c d) should obviously not parenthesize b|c, but, though it'd probably be very strange, i think an APL that parses 1 2|3 4 as 1 (2|3) 4 would be interesting
 
@dzaima the syntax specification
 
@MilkyWay90 I don't have an upper bound yet, my current guess is that the true value is in the 5 to 12 range
@ASCII-only It depends on the language's evaluation order. If functions are capable of not evaluating their arguments, then all the control flow commands are best written as functions (meaning that the core language can be simpler); the core control flow feature in terms of which everything else is written is normally match / switch (which can easily be used to implement if, then you get while via tail-recursion).
 
@Adám unless there's some universal syntax specifying syntax that i don't know about, that doesn't give me that much information..
 
@dzaima Like used on man pages, DOS help, etc.
 
If function arguments are always evaluated once before the function is called (i.e. call-by-value), you can't write control flow constructs as functions so you need special cases for all of them, and thus need quite a large selection of them; probably the most general would be some sort of for that takes an iterator (which would let you implement everything else, e.g. the iterator of a boolean would iterate once if true and zero times if false and thus produce an if statement)
but you'd want sugar for common cases like if and while as you couldn't write it any other way
 
5:25 PM
@Mego @Skidsdev @dzaima @EriktheOutgolfer How about [-a | -b <spec>]? Do you then understand that as [{-a | -b} <spec>]?
 
@Adám is <spec> supposed to be replaced with something? if so, can that something start with -?
 
I'd love it if there were a standard for expressing command line option syntax that everyone used
but I don't think there is
 
@dzaima Things in <> (or in italics in media that support that) are to be filled in by the user. Having a value begin with - is probably a bad idea; one should use quotes then.
 
I think an ideal syntax for it would be kind-of regex-like; perhaps we could just use regex directly because lots of people know it already
 
Anonymous
@Adám With that, it makes me think [{-a}|{-b spec}] because of command line arg parsing
 
5:29 PM
@ais523 There definitely isn't, although there are attempts.
 
@Adám quoting values starting with - isn't very useful because quotes are normally interpreted by the shell; normal ways to protect values starting with - involve prefixes like -- or ./
 
@Mego OK, my actual syntax has:
[{-using=<path> [-permanent]}|{[-window=<w>] [-trim] [-symbols=<d><i>]}]
 
but those are awkward in their own right; typical usage seems to be to use -- as a general protection for "everything after this point" for anonymous arguments at the end of the command line, ./ to protect filenames anywhere, and anything that isn't a filename and isn't at the end of the command line is constrained to not start with a hyphen
 
Question is if it is safe to remove the {}s
 
you need to define the relative precedence of | and space if you don't have the {}s
having space at a higher precedence is intuitive, but the {}s remove the ambiguity entirely
 
5:38 PM
@Adám With this concrete example, I too would prefer to keep the {}s in there.
 
Anonymous
5:51 PM
Explicit is better than implicit
 
6:05 PM
I'm contemplating another insane language concept, someone please stop me.
The flowgraph for a fibonacci program is just.. weird. To the point i have no idea how to describe it
 
@moonheart08 TIO needs more languages…
 
i mean, it IS pretty short, 8-9 bytes (guessed, didn't count), but..

1 1R+^|i

Both ones are fed into the `R`, which is a "gathering stack feed".
The + (add) takes two values from the R, and attempts to find a output, starting by moving to the right, which causes it to encounter the `^`, "Tee". The ^ copies the output, moving one copy to the left, and one to the right. Remember the ^, we'll come back to it in a sec. The | takes in an output, and condenses it over time, and attempts to send the resulting list to the right, where it is captured by the `i`. The `i` indexes a list based on it
 
0
A: Sandbox for Proposed Challenges

BMOPointer jumping Tags: code-golf, array-manipulation, graph-theory Related: Jump the array Suppose we have an array \$\texttt{ps}\$ of length \$n\$ with pointers pointing to some location in the array: The process of "pointer jumping" will set every pointer to the location the pointer it poin...

 
i probably mucked up the explanation, there's so many connections made just for that
oh, probably could make it shorter by replacing the 1 1 with 1^
and that doesn't take into account concepts like flow stealing
For flow stealing, a good example would be `^PP^P`
The second P seems like it'd take the second output of the first ^, however that would leave the second ^ and third P unconnected. So the second ^ can attempt to steal the flow from the second P, and then it can provide it's own outputs to the second and third Ps
from 1 to 10, how convoluted is this.
is there even a language that explores a similar design to mine?
 
 
1 hour later…
7:59 PM
@BMO regarding your latest sandbox post, the "Example" looks a bit botched...
 
BMO
@EriktheOutgolfer You mean the [3,1,0,3,3,0] one?
 
yeah, where the input is seemingly [4,1,2,1,3,5] and it manages to become [3,1,3,0,3,2] after only one step
 
BMO
I see, forgot to update that (I fixed the last line, already but overlooked that)..
I'll fix it, thanks for noticing!
 
> i = 0:the element at position ps[0] = 4
still a problem over there :P
 
0
Q: Choose 3 - 0 through 3

user85089Implement a function that returns (a choose 3) in fewest operations. Input will always be 0-3. -∞ through -1 -> don't care 0 -> 0 1 -> 0 2 -> 1 3 -> 3 4 though ∞ -> don't care

 
BMO
8:10 PM
@EriktheOutgolfer Yeah I messed things up again, just did a new example.. This time it should be correct, did it with Python..
I trust my programming skills better than my brain ^^
 
looks correct now
 
BMO
Thanks, that's a relief :D
 
 
3 hours later…
11:02 PM
@NewMainPosts V, 6 bytes: Try it online!
Probably the only time v could compete when it comes to
 
@NewMainPosts Is a string of two binary bits valid io
 
@DJMcMayhem Any idea what (a choose 3) means?
 
You know, at first I assumed it was n choose k, but the outputs are all wrong
 
@DJMcMayhem At first, I thought we had to implement at least 3 out of the total domain, but then I also thought, ah, n out of a bag of 3, but then yeah, it is all wrong indeed.
Wouldn't it be nice if users with rep≤101 needed review to post, much like low-rep-user edits do?
 
If it was indeed n choose k, then it would be two bytes in V: ø3 (which looks an awful lot like a binomial coefficient built-in, but is definitely not)
 
11:11 PM
@DJMcMayhem What is ø? (other than a Danish island)
 
count (the number of regex matches on the current line)
 
CMC: ( ₖᷠ )
 
@Adám Mathematica, Binomial
 
Hmm, lights keep occasionally flickering a bit. Which is a bit concerning in a data center
 

« first day (2915 days earlier)      last day (1931 days later) »