« first day (2581 days earlier)      last day (2277 days later) » 

6:14 PM
3
Q: Continued Fraction of Digit-wise Sum of Square Roots

Weijun ZhouIntroduction Your task is to generate the first 1000 terms in the continued fraction representation of digit-wise sum of square root of 2 and square root of 3. In other words, produce exactly the following list (but the output format is flexible) [2, 6, 1, 5, 7, 2, 4, 4, 1, 11, 68, 17, 1, 19, ...

 
I've been looking at different languages and this is often really different: what would be better? function, func or what?
 
Funky allows both. Funky is also not a great language.
@labela--gotoa For defining functions, I like def
 
make everything lambdas
 
I think def is ambiguous, it can mean anything, define variable, function, class... and I would prefer to avoid it. :/
Nonononono
@HyperNeutrino Lambdas is one of the things my language target is to avoid ಠ_ಠ
 
a = (arg1, arg2) => arg1 + arg2 instead of function a(arg1, arg2) { return arg1 + arg2; }
 
6:22 PM
It's OOP
 
@labela--gotoa 0/10 ಠ_ಠ :P /s
 
@HyperNeutrino But seriously, I it has a nice workaround for lambdas, and I'd prefer to keep it as it is, not like in js:
function(){
 call(function(){
   otherfunction(function(){})
 })
}
@HyperNeutrino and it's OOP, defining methods with lambdas could be... painful
 
func > function
 
hm ok
but like even java has lambdas :P
although they're dumb and you can't call them
 
but you don't define methods with lamdas, still :P
there are lamdas, but they are... hidden, like ninjas
 
6:25 PM
Java lambdas are extraordinarily dumb, and they stand for anonymous objects implementing an interface, not a function.
 
ohohkay
 
I like func
 
Well, I was thinking a lot about what would be better, function or func, but I think you have got me into using func :P
long function definitions look bad and function makes it easier to make them long :P
 
Swift also uses func, for reference.
If you want to be golfy, then fun also works :P
ಠ_ಠ SML uses fun
 
haha, fun is fun :P
but about "golfiness" of the language - it's so bad in this case that it won't win even a single challenge :P
Not that you need long statements to do something basic, function names are short, but a simple script requires at least 2 files to work :/
 
6:29 PM
@labela--gotoa If you want it to be practical, that's a good sign
 
Unless if anyone suggested a simplified scoring system for it
wtf
SE, what are you doing
 
Wild laggy Internet appeared!
 
hey, anybody in here know how consoles work?
 
@Mr.Xcoder I'm not sure, maybe I could improve it, but script-attaching system is inspired by Godot Engine, and you need at least one layout element with the script attached to it, so it can run
 
6:33 PM
@NathanMerrill define work
and define consoles
 
lol
I'm running cmd
 
define know /s
 
oh THAT console
 
So I just enabled the userscript for the first time in a long time. Forgot how different everything looks.
 
at work, I run this command called "init". I have no idea what it does
 
6:34 PM
I thought you meant like an xbox
 
but it puts me in a different console
 
@NathanMerrill init is not a standard command in cmd.exe
 
I know
 
@PhiNotPi Which one, may I ask? :P
 
@NathanMerrill where init
 
6:34 PM
that's not my question
 
no, but it helps to answer your question
 
ah, this one
 
basically, it creates a "sub-console".
what's the term for a sub-console
 
child shell
but where is init located?
 
6:36 PM
pretty how long it would take the "userscript" to be official :/
The site should already have design, and it doesn't.
 
@orlp its specific to my work. It's an internal program
 
alright, is it then a batch file?
have you tried opening it up?
 
yeah, I believe so
 
@labela--gotoa you're not the first to complain about it :P
 
0
Q: We do Tower Hopping

0x45Task You will be given a Collection (array, list ...) and have to check if you can jump outside of the Collection with a minimum of jumps! Jump outside of the array...? Ya' dumb? Jumping outside means if our index >= Array.size Initial you will always begin from index 0 Each of these val...

 
6:36 PM
@EriktheOutgolfer I know it, I know it :P
 
@NathanMerrill generally people have some sort of 'environment'
 
it is a batch file
 
which sets environment variables
 
such as PATH
also, are you sure it creates a child shell
or does it just set a bunch of environment variables?
 
6:37 PM
it does create some sort of sub-shell. My prompt is different
 
does not necessarily mean sub shell
try init and then typing exit
does that exit the command prompt?
 
exit closes everything
yeah
 
then you're not in a child shell
it just sets up some environment variables
 
how does that change my prompt then?
is that just one of the variables?
 
echo %PROMPT%
then init
and echo %PROMPT% again
 
6:39 PM
yeah, its different
 
by the way I use clink, which is basically a hack for cmd.exe
my %PROMPT% is empty
but my prompt looks like this
5 c > programming > python > snakeviz | echo %PROMPT%
clink allows you to write a lua script to give the prompt
clink in general is amazing
 
is it a terminal or a console? Because I really like conemu
 
it's neither
it's a monkeypatch of cmd.exe
 
oooh, it has auto-completion of git
 
basically it injects itself into the cmd.exe process
 
6:42 PM
yeah, that looks like what I want
 
@NathanMerrill my shell on windows consists of a global floating terminal that pops up when I press Win + `
where ctrl+1 through 9 give 9 different shells
fully customized, spent a while on it :P
 
where do I go to modify it
 
"it"?
 
nvm, I found the documentation
thanks :)
this is already better
Tab automatically adds the / or shows all of the available options
 
Is it just me or the new challenge's page loads extremely slow, but the rest of SE works just fine?
 
6:55 PM
@Mr.Xcoder PPCG doesn't seem to work for me
oh, it loaded
 
It does work for me.
 
but it's slow
maybe it's just my internet
 
But We do Tower Hopping is just extremely slow
 
not for me
 
@EriktheOutgolfer Your comment on my sandbox post is somewhat true. Do you have any ideas on how to fix that? I guess I wouldn't say that it's trivialized by doing one column each, but it's certainly easier.
 
6:58 PM
@Giuseppe Yeah because they: 1) Don't know how to properly format their posts 2) Don't know how to clearly define the tasks 3) Don't master English too well either, so they tend to misunderstand the comments as far as I can see. 4) They don't want to use the Sandbox :(
But I like the idea :(
 
7:09 PM
@AdmBorkBork well, maybe leave it upon the solver to choose either left-to-right or right-to-left for each pen, but require that there are 10 sheep in the last row before making a new one
 
I think I should write a script that will limit my access to PPCG, I sit too much there
 
of all of the trends to come to PPCG, "snake programming" outside of "python" was not very high on my list
 
heh, at least it's a lot better than burning private property :P
 
or alphabets
 
7:12 PM
@EriktheOutgolfer arson is fun /s
 
eh, I assume we do not want to encourage criminal activities
 
Anonymous
@labela--gotoa I have a button that will do that :P Granted, we generally aren't allowed to use it for user requests of helping them manage their time
 
when you guys write "/s", always the first thing I think about is a regex flag .-.
 
Anonymous
Regex flags use backslashes though
 
7:14 PM
@Mego what?
 
@labela--gotoa I'm like "what command flag is that"
 
no, that's usually not true
 
in Perl, you write /regex/flags
similarly in JavaScript
 
@Οurous It's single-line, that \n is also matched by a dot
 
(also Ruby, PHP and probably more languages i don't rembember)
 
Anonymous
7:15 PM
Ohhh, I was thinking about matching groups
 
Anonymous
Like \s for whitespace
 
@Mego how did you manage to learn a lot of such rules mods must follow in a so short time? o_o
 
@Mego I feel like that's happened before, I think downgoat (?) was kicked for a week by request for exams?
 
haha, that are not what's called flags :P
 
Anonymous
@EriktheOutgolfer Have you ever read/seen A Clockwork Orange?
 
7:16 PM
...old people stuff again? absolutely no clue
 
Anonymous
@ConorO'Brien From my understanding, we can do it, but it's generally suggested not to
 
@labela--gotoa Yeah, I know, I meant more that it looks like a windows shell built-in flag
 
@Οurous This too :P
 
1
Q: Turn Your Program into a Snake!

Steadybox...or "snakes but not too long". Inspired by this challenge and this comment. Task Write a program or a function that takes no input and outputs its own source code formatted as a snake according to the rules below: If your code has any whitespace, it will not be output; it will just be skip...

 
Anonymous
@EriktheOutgolfer Oh good grief. It's a classic novel/film.
 
7:16 PM
But I prefer dashes
another snake
 
Anonymous
In the book (and film), the main character is subjected to the "Ludovico Technique" of behavioral modification, which includes, amongst other things, being forced to watch films by holding his eyes open and his head in place
 
Anonymous
It's referenced/alluded to a lot in other places
 
honestly, I've never heard of such a thing before...yeah, the generation gap is evident :/
 
Anonymous
I'm not even that old yet >_>
 
@EriktheOutgolfer That's a good idea and a nice compromise. Thanks!
@Mego But you're a mod, now. That automatically adds like 10 years to your actual age.
 
Anonymous
7:24 PM
@AdmBorkBork So Doorknob can drink and vote?
 
Anonymous
I should tell him. He'll be ecstatic
 
On PPCG, yes. Hopefully mod powers don't translate to the real world.
 
Anonymous
Too late, I already sent him a voter ID card and a cask of whiskey
 
@Mego I can't even drink yet
 
Anonymous
@DJMcMayhem I thought you were older than me o_O
 
7:27 PM
Wait really? That's actually really funny
 
Anonymous
Seriously
 
Actually?
:P
 
Anonymous
And of course, you come around right as I have to get back to work :P
 
@Mego on an unrelated note, how much do you regret your language's names?
 
@AdmBorkBork like, drinking and driving? oh god
 
Anonymous
7:29 PM
@MartinEnder Yes
 
I need a 2 key macro that prompts me a number and then writes ಠ_ಠ with that many underscores
 
Anonymous
@dzaima Let's not
 
Anonymous
Oct 15 '16 at 20:33, by Martin Ender
New rule proposal: the number of _ in ಠ_ಠ represent the number of minutes of suspension you are asking for.
 
@Mego what's that key in your "about me"
? :p
just curious
 
Anonymous
7:33 PM
@labela--gotoa It's one of my RSA public keys
 
whatever
 
@Mego ಠಠ
9
 
yeah that's kind of a loophole
 
I want to see a part 2 of this :(
 
me too :/
 
7:50 PM
10 messages moved to Trash
 
@Mr.Xcoder Then you should write it! :)
 
@DJMcMayhem I'd write it for you or Mego if I would
Because it's a good moment :)
 
lol, I just had a ticket come through where a printer wouldn't scan-to-email. After a lot of investigation, I found that the clock on the printer was set to 1989, so it thought the TLS certificate in use was out of date.
 
@Mr.Xcoder I'd love that.
 
7:54 PM
oh and I already expected that sentence to end with "so the printer thought scan-to-email wasn't invented yet"
 
Well I must find something interesting about your usernames / ids.
 
@MartinEnder Just about.
 
I kinda already did, but it's not worth posting to main.
... And ask Hyper first
 
@DJMcMayhem pssst, what if it's about Mego instead?
 
@EriktheOutgolfer He can still love it, no?
 
7:55 PM
my first kick. ... no, I'm not inserting this smile again.
I should go away from here anyway
 
CMC: When "DJMcMayhem" is converted to ASCII numerals, it has a palindromic sublist of palindromes -- 77 99 77. Given a string, return a truthy value if there exists such a palindromic sublist, and a falsey value otherwise.
 
@Mr.Xcoder Does it have to be decreasing by one?
 
@DJMcMayhem Yes. I did say consecutive.
 
@AdmBorkBork Jelly, 5 bytes: ẆŒḂ€Ẹ
 
Shoot
V, 19 bytes, but doesn't check for consecutiveness: Try it online!
 
8:07 PM
If any of you use github (lul) you might want to be aware of githubengineering.com/crypto-removal-notice
 
V really sucks at anything not related to strings, right?
 
Yup
 
I think that's a direct consequence of Vim ¯\_(ツ)_/¯
 
@EriktheOutgolfer I get 0 for any input I give it, including truthy values, like DJMcMayhem.
 
@AdmBorkBork the input is given through the command-line arguments, although there's a 1-byte equivalent to it too: 1
 
8:10 PM
I had one vid on channel, it got +7 votes and resulted in 10 subs on channel. I uploaded a new one, and it has +6 rn, but what's weird, two people already gave -1 and then changed to +1 [illegal smile here]
 
@EriktheOutgolfer OK, using command-line arguments, it now gives a 1 for everything.
 
sure, shouldn't it?
 
Why would every string be truthy?
 
> there's a 1-byte equivalent to it too: 1
because length-1 sublists are always palindromic :P
 
No, you can't concatenate the ASCII numerals together
 
8:13 PM
a more correct version would be OŒḂ€Ẹ
...concatenate?
 
@Mr.Xcoder Really really ugly and convoluted, but here ya go. V, 29 bytes: ò󈁓±òæ_Äé¬lldv$0D@"Ø^¨©î±$
 
So something like Test is 84, 101, 115, 116, which doesn't have a palindromic sublist of palindromes
 
@AdmBorkBork Sure it does: [101]
 
lol I dun goofed
OK, how about task -- 116, 97, 115, 107. That should be falsey.
 
@DJMcMayhem me too!
 
8:17 PM
@Mego how old are you?
 
@orlp 23.
 
@Mr.Xcoder I asked mego though :P
 
ಠ_ಠ
 
@Mr.Xcoder You used the "illegal" smile! ಠ_ಠ (jk)
 
@EriktheOutgolfer Not quite. It just has to have one character that's a palindrome
 
8:18 PM
5 mins ago, by Erik the Outgolfer
a more correct version would be OŒḂ€Ẹ
 
Nope, the input just has to be non-empty.
In which case a correct answer is L
 
@Mr.Xcoder No. What about this:
2 mins ago, by AdmBorkBork
OK, how about task -- 116, 97, 115, 107. That should be falsey.
 
Ah, sublist of palindromes.
 
There are plenty of palindromic sublists, but there are no sublists of palindromes
 
Feb 6 at 16:52, by Mego
@Mr.Xcoder Nailed it
 
8:21 PM
I successfully made TPT crash before it could even load it's own GUI
RIP
 
See, this is why it's a CMC rather than a full challenge.
 
CMP: Is it just me or functional languages are harder to learn than golfing languages?
 
how are "functional languages" and "golfing languages" even two comparable categories?
 
Functional golfing language.
 
They are comparable when it comes to how hard they are to learn :P
 
8:24 PM
@MartinEnder especially because there's an overlap
 
@Mr.Xcoder imperative languages are confusing.
 
@Mr.Xcoder just you
@Οurous They really aren't. You say what thing to do and the thing gets done.
 
@Mr.Xcoder I can't seem to grok Jelly
 
Declarative languages are confusing
 
8:25 PM
Who designed Clip?
 
Ypnypn
 
@DJMcMayhem whenever I use prolog
 
I mean, there's also Husk...
 
Oh for a moment I thought you made a couple of typos :)
 
I just feel like I'm not giving it enough information to be efficient
 
8:26 PM
@DJMcMayhem Agreed
 
which makes it feel weird
 
@Pavel disclaimer: I went from Batch to Cobra / Clean. My view on imperative languages may be reversed from normal.
 
but SQL doesn't feel that weird
 
True, SQL is fine.
 
@Οurous I like an imperative style for functions
and composing functions in a functional style
I don't think solely using one or the other is wise
 
8:28 PM
@orlp thats how I write Clean for the most part.
 
Are there any purely imperative languages?
 
SQL is a pain. It isn't confusing, it's just annoying.
 
@DJMcMayhem assembly
 
ANSI C, maybe.
 
@Pavel C has functions and function pointers
it's not very pretty
 
8:31 PM
@orlp Assembly has subroutines
 
So where is the line between Has functions, and Is functional?
 
@Pavel no it doesn't?
@DJMcMayhem at the I'd say something like en.wikipedia.org/wiki/First-class_function
@Pavel it has a jump (goto) instruction
 
There are sub and ret instructions.
 
@Pavel sub? what instruction set are you talking about here
 
Huh. TIL that PowerShell has functional programming elements in it.
 
8:33 PM
ret is just a shorthand for jumping back to the last address on the stack
(that you manually put there)
 
@orlp sorry, CALL. SUB is subtraction
In x86
 
@Pavel yeah call doesn't do what you think it does probably
 
@orlp In that case, C is a somewhat functional language (though mostly imperative)
 
@orlp it calls a procedure
 
@Pavel yeah no
call is just a shorthand for push ip and jump
it doesn't pass parameters
save your registers
or basically anything that you could reasonably constitute as a 'procedure'
 
8:35 PM
That's still calling a procedure
 
except it's not? a procedure has to be self contained
 
No it doesn't.
 
@orlp so Python is functional?
 
@EriktheOutgolfer definitely
 
@EriktheOutgolfer Somewhat, yes
 
8:36 PM
among other things
Python is multi-paradigm
 
Global state is a thing in any language
 
@orlp IE: a snake
 
there's a different between supporting the functional paradigm and being a pure functional language
 
Most languages nowadays are mult-paradigm.
 
but Python has first-class functions too
 
8:37 PM
@Pavel and I argue that in order for you to have procedures there must be some concept of local state
which assembly does not have
 
There's a frame stack
 
no there isn't
that's not an assembly thing
that's a C thing
or a particular assembly programmer's choice to adhere to
 
Logic gates. Logic gates aren't functional.
 
but most certainly not a thing that just exists in assembly
 
But an assembly programmer can adhere to it
 
8:39 PM
Brainfuck isn't functional.
 
And thus have local state
 
@Pavel except anyone can modify that local state
so it's not really local
and just because I can adhere to something in a language doesn't mean that it contains that
I can write (theoretically) a Python interpreter in brainfuck
that doesn't mean that brainfuck suddenly has the features of Python
 
Most 2D languages aren't functional.
 
by your logic anything has anything
because you could make it and adhere to it
 
Ever heard of turing equivalence? :P
 
8:41 PM
@Οurous eh, I can represent them in point-free :P
 
@DJMcMayhem was just about to say something along these lines
 
choosing to have a call stack or stack frames in assembly is as much as a choice as using a certain pattern in brainfuck
 
;)
 
I can't choose to not have a call stack in Python
it's always there
 
Speaking of which, I'm probably going to end up writing a paper on Turing for my history class
 
8:41 PM
@EriktheOutgolfer almost every higher level language can represent them in point-free
 
Lol I played a 5 min card game and saw The Nineteenth Byte (35)....
 
language architecture != language features, though
 
It's all syntax sugar for Assembly anyway
 
hey, the sidebar was finally updated. yay!
 
@Pavel except that compilers can enforce local state
 
8:49 PM
Is there such thing as a comprehensive NetHack instruction manual or is just all somewhere in various forum posts and such that accumulated over the years
 
@AdmBorkBork the way you chose to prevent vertical lines is a bit clunky imho...
 
@Pavel there's a kind of charm to that style of documentation. Makes it very satisfying when you master a language.
As i realise it's a game.
And not a language.
 
@Οurous It's very likely in your distro's repos, so I recommend trying it out. It's basically the most nerd game ever, like dwarf fortress.
 
@Pavel tied for nerdyness or somehow more nerdy?
 
It doesn't have the aspect of managing your dwarf society but it's more of a classic.
The game itself is like Rogue, except that they forgot to stop adding new complications since the game was released in the 80s.
 
8:57 PM
Well I liked dwarf after I played rimworld, I'll probably like nethack since I like ToME
Thanks, I'll give it a shot.
 
And it has vim-like controls by default, for movement and such.
 
@EriktheOutgolfer Yeah. I'm going to sleep on it and come back tomorrow with a fresh set of eyes and see if I can reword it to be better.
 
Interestingly, It's the only game I've seen with a Unix man page, but I'm sure there are others.
 
@AdmBorkBork especially the fact that I can do vertical lines for maximum 10 sheep
 
@Pavel maybe it'll make vim tolerable for me.
 
8:59 PM
@Οurous There's also an emacs mode iirc
 
@Pavel There is, it's called the guidebook
 
no https >_<
:P
 
direct any other questions to the wiki which is obsessively comprehensive: nethackwiki.com/wiki/Main_Page
 
@EriktheOutgolfer there is https but i guess no 301
 
that's how I noticed...
 
9:02 PM
@EriktheOutgolfer my browser crashes on sandbox because of your messages ಠ_ಠ
 
sorry, there's nowhere else those messages should go :)
 
you've poured 3 tons of sand in a 2 square metres of a sandbox
 
9:17 PM
0
Q: 1D Hopping Array Maze

Weijun ZhouInspired by We do tower hopping and related to 2D Maze Minus 1D Introduction Your task is to find the shortest path to get out of an array maze following specified rules. Challenge A 1D array a with n elements can be regarded as a maze composed of n points, where point with index k is connect...

 
Wow ಠ_ಠ npm...
 
9:50 PM
at least it's a pre-release
so hopefully it isn't crippling production systems
 
Even sudo npm --help breaks everything... o_O
 
you can cool down now, as you can read in the article Poke linked to :)
 
I guess coupled with github.com/npm/npm/issues/19888
some people updated to the Wanted version even though it's pre-release
 
CMP: What should a "length" built-in do when given a float?
 

« first day (2581 days earlier)      last day (2277 days later) »