« first day (2537 days earlier)      last day (2298 days later) » 

12:01 AM
In return, pls gib tnb invite thanks
 
I'm quite pleased with how the Simplex challenge worked out, I didn't think of using an Identity Matrix and then a diagonal.
 
@totallyhuman can you send it in the ppcg server?
nvm
 
oh hai
 
4
Q: Convert a HTML page into a mountain

SolverTask: convert a HTML page into a mountain! When HTML pages are indented, they can look like: <div> <div> <div> </div> <div> <div> </div> </div> </div> </div> But to be honest, a mountain is more representative of this structure. ...

 
@Solver o/
 
12:16 AM
@NewMainPosts haha this right after
 
 
1 hour later…
1:45 AM
10
Q: What is DJ's actual name?

ThePopMachineThis answer points out that DJ's hat bears an emblem that read DON'T JOIN. So clearly, out-of-universe, DJ derives from that expression. But in universe, is Don't Join a backronym from his actual name DJ? Or is DJ a nickname derived from the expression? If it is a nickname, what is his birth ...

I was really confused when I saw that on HNQ
 
2:38 AM
@DJMcMayhem, LOL
 
It seems that TIO Escape function and Ctrl+Enter doesn't work with Luakit... (the former obviously doesn't work, the latter inserts a newline)
 
@user202729, what do you mean?
 
@Zacharý TIO doesn't work right with a luakit-based browser
 
Ah, I see
 
2:53 AM
Why would you use Luakit though
 
Because Lua
 
Lua is bad tho
 
what are you talking about lua is good
 
No it isn't. It's not like PHP or JS levels of bad, but it's still kinda crappy.
 
how
isn't lua like super fast
 
2:55 AM
@ASCII-only Given it's interpreted I don't imagine it is.
 
Lua isn't super fast, but it is lightweight and customizable.
 
> Lua (programming language), a lightweight, extensible programming language
 
Lua has prototype OOP.
That tells you its a lot like JS already
 
@Pavel it has jit. meaning comparable speeds to compiled languages
 
JS is a lot like Lua, not the other way around.
And lua is not really very OOP at all.
 
2:57 AM
@ASCII-only True, but it's also dynamically typed.
 
Has anyone else noticed that PHP = Perl + JS ?
 
Lua has metatables, which means you can make Psudo-classes.
 
It's not the slowest thing in the world by any means, but speed isn't Lua's strongpoint.
 
You can also make Pseudo-classes via functions, kinda like javascript
 
Funky uses a similar method of Classes as Lua does, as Lua is a strong inspiration.
 
3:01 AM
So Funky is a more Javascript-y Lua?
function Point(x,y)
result = {}
result.x = x
result.y = y
return result
end
 
Pretty much.
 
Is that code valid? My Lua is pretty rusty
 
This is my blog post on the topic of making Classes in Funky.
That's valid Lua.
 
That's valid Funky?
 
Thought it was, forgot that end isn't supported. Yet...
function Point(x,y){
	result = {}
	result.x = x
	result.y = y
	return result
}
That's the Funky equivalent.
 
3:05 AM
And ... that's valid Javascript
 
@ATaco 0/10 more js pls: Point = (x, y) => ({x, y})
 
(x,y)=>({x:x,y:y})
 
Point=(x,y)=>{x=x,y=y}
 
@Zacharý doesn't work
 
Does it work now?
 
3:07 AM
Because Chrome and Firefox are slow.
 
*are
 
yep. but i don't see why this is better than ({x,y})...
 
I hate my English grammar... hopefully it will get better soon.
 
Because reasons
 
Because Point.x is better than Point[0], for raisons.
 
3:08 AM
It's already pretty good, @user202729, I'm just a random internet nit-picker
He's talking about my JS code
 
Luakit overrides ESC of SE chat, which is used to discard notification...
 
JS is nice, you can use ({x,y})=>[x,y] to reverse that
 
Disable default, don't get me started
You mean horrible JES6
*ES6
 
Point.new ... I smell Ruby
 
3:13 AM
Does Funky have decorators?
 
Is a question on SO which is of the form "where has I made a typo" off-topic? I think yes.
 
@EsolangingFruit Describe Decorators.
@Zacharý I have absolutely no idea how to write Ruby, that was just the easiest way to make a new function tacted onto a function.
 
Overkill for OOP is accessing everything like an object
 
3:15 AM
System.Math.One.Add(System.Math.Two)
 
Although not normally, you could probably implement them.
 
@user202729 Have you tried scrolling (By manually moving the scroll bar)
 
Luakit doesn't have scroll bar...
 
Hmm...
 
3:19 AM
Use scroll mouse doesn't work.
And selecting text under that region works.
 
That's (Somewhat) intentional.
With credit, I don't support Luakit
Typing a character should update the highlighter.
But I'd recommend just clicking "Hide Syntax" and browsing it that way.
 
It seems that the problem is some lines wrap to the next line...
 
The problem is that I don't support Luakit, so it's undefined behavoir :p
Toggling the Syntax Highlighter off is probably your safest bet, but I'll try to fix the wrapping for you.
 
^ The problem starts at the line which fined wraps to the next line.
^ Is the grammar correct?
 
Can you refresh and tell me if that fixed it?
I can't test myself, as I don't have Luakit installed and I'm running Windows.
 
3:26 AM
Because I pressed the wrong button (Luakit is designed to be very keyboard friendly, so keyboard can do anything) so many times, I might switch to Firefox...
The problem persists.
 
Are you running Linux?
 
Also can you make the background consistent?
Yes.
 
And what do you mean by Consistent?
 
Ok, switched to Firefox.
Sometimes it's purple (the image above), and sometimes it's white.
 
I don't see what you mean by Purple.
 
3:30 AM
Look at the image above...
... for Firefox both the code and the syntax highlighting doesn't wrap.
 
That's intentional.
 
@ATaco Putting a decorator @d before a decoration of the function f essentially adds a line f = d(f) at the end. Describe "implement."
 
Well... I might need to play around, but I could probably do something like that.
@user202729 The only purple I see in that image is the numbers. There's the mouse highlighter, which is used to highlight tokens?
 
I'm talking about the background.
It's certainly not white in the image.
It may not be exactly purple, but... perhaps light purple.
 
I think it's gray? What's your monitor's settings?
 
3:37 AM
Seriously, you don't experience any problem with the background? If I can, I will capture a video of the desktop...
 
I'd highly recommend just turning off the syntax highlighter if you're having problems.
 
@ATaco Would a smaller, easier-to-understand example be possible?
 
The only part that actually uses it is:
function body(){


_curry
_backwards
_accs_strings
function printThings(...a){
	a::map(b=>print(b))
}


printThings(1)(2)(3)()

}
 
Hello, I'm looking to create a machine learning exercise than involves designing a puzzle and having the user to compete against my well-trained bot in it. I hoped there would be some programming puzzles on the site that would be valuable to study before I design it. Are there any recommendations you think are great? I'm asking because I can't seem to search for posts without getting floods of [code-golf].
 
Sounds like King-of-the-hill
 
There are just two players though.
 
4:00 AM
You can do Round-robin KoTH
Oh, this is a user competing against a bot...
HMm...
 
You can wrap tags in brackets to search for tags.
Like, [fastest-code] or [king-of-the-hill]
 
Still, King-of-the-hill might be good to study purely for the design aspect of it.
 
So... atomic code golf.
 
@Pavel This was testing if it's possible, I could try to make it all easier to understand...
 
0
A: Sandbox for Proposed Challenges

jaeyong sungWorst language Ever Let's find out the worst language. Make a program that does anything that is shortest. The worst language would be the longest of all. I'll go with C first. C (gcc), 15 bytes f(){puts("1");} Try it online! It prints 1. It does print something and it is the shortes...

 
4:16 AM
@NewSandboxedPosts Anyone can check if it is too-broad or duplicate?
 
Cool
 
Sounds too broad. Doing nothing is very much so something. Kind of.
 
Anonymous
user image
3
 
@Mego What site is that?
 
Anonymous
4:22 AM
SO 2018 Dev Survey
 
Image-only messages have the disadvantage of being not-understandable when it is on the starboard...
(^ anyone can check my grammar?)
 
@Mego Ooh, link to survey?
 
ty
> Do you contribute to open source projects?
Well I did make a PR to TIO that one time to fix some indentation
 
@Pavel If by "contribute" you mean "forked a repo once and added some code that didn't work", yeah I contribute
And I contribute to my own open-source projects
 
4:29 AM
Oh yeah, good point
Lots of those
 
and I think I added a PR to jelly to make an atom work for strings
 
Haven't finished any yet though
> What version control systems do you use regularly? Please select all that apply.
> Zip file backups
 
@Pavel obviously all sane people use 7z file backups
 
ikr the compression is much better
 
Sticky notes around the office
Duh
 
4:36 AM
@ATaco O_o i never knew it was even possible to use sticky notes as VC
 
When you change something just post it over the old code
That way, you can revert it by just peeling it back off.
 
> What do you think is the most dangerous aspect of increasingly advanced AI technology?
> Skynet
 
@ATaco ah, that is a pretty smart idea. how dense is the memory
 
I wrote that one in
 
@Pavel people letting ai do everything >_> which would make humans basically devolve
 
4:38 AM
@ASCII-only 0.003x3x3in
 
The AI programmers get smarter and the rest are not.
 
@ATaco i mean how many characters/sticky note
 
@user202729 Until the AI programmers are also replaced by AI.
 
Not sure if it's possible...
 
@user202729 *better at what they do
 
4:39 AM
@ASCII-only Clearly adjustable to the user's preferred font size.
But lossy at smaller sizes.
 
because even current AIs learn all they know
@ATaco TIL handwriting has font sizes too
 
Then AI Programmers are replaced with AI-Programmers
 
Then there would be (AI-Programmers) programmers...
 
Which could of course be AI.
 
We need infinite time to go infinitely level deep...
 
4:41 AM
AI-(AI-Programmer)-Programmers
AI(-\((?R)\))?-Programmer
 
@ATaco Well really with AI that's good enough you wouldn't need AI programmers anympre
@user202729 Well, I guess? But it wouldn't take too long for self-modifying (as in self-modifying code) AIs to be created
 
Let's wait for the future and see...
BTW... what does import __future__ in Python do?
 
Times out..?
 
@user202729 nothing at all
 
Anonymous
@user202729 It imports the __future__ module, which contains info about backported features (like minimum version needed to use it via from __future__ import feature, and minimum version where the import isn't needed)
 
4:47 AM
So... features are moved from newer versions to older versions?
Why don't people just update Python? ...
 
Anonymous
@user202729 That's a lot easier said than done
 
from __future__ import * doesn't work, and that bothers me.
 
Anonymous
In system-critical environments, if you have a system that works, you don't change it. The cost of maintaining an older environment is almost often greatly outweighed by the cost of testing and developing for/porting to a newer environment.
 
@Pavel well, future declarations are separate from import declarations
 
4:50 AM
@Mego Also, some people use CentOS, and CentOS still doesn't have a Python3 package.
 
Anonymous
Future feature imports look like imports and smell like imports, but are fundamentally different from "true" imports
 
Anonymous
@Pavel Well that's just insanity :P
 
I just figured out that my max-flow dinitz algorithm implementation run in worst case exponential time.
Yet I still can get full points on OJ. Weak test cases...
 
Can I make future imports using the __import__() function?
I'm not sure how to do from/import with __import__()
 
@Pavel ... can you?
 
Anonymous
4:53 AM
@Pavel No. Future imports must be in the form of from __future__ import feature, and must appear at the beginning of a module (preceded only by comments, whitespace, and other future imports).
 
@user202729 IDK, I've just been doing globals()['foo'] = __import__('bar').foo
 
Anonymous
They are processed entirely differently than other imports by the compiler
 
Oh yes, globals() exists...
 
globals() as a concept bothers me somehow, but it's still useful sometimes.
 
@Pavel IMO all interpreted languages should include methods to abuse DRY :P
 
4:59 AM
And, well, I'm a C# person.
 
Despite Funky having fileI/O, it still lacks an include/require/import method
 
@Pavel remember, C# has reflection. and dynamic. and abunch of other hacky things
@ATaco 10/10
 
@ATaco eval(file.read())?
 
Essentially.
 
@ASCII-only Reflection isn't that hacky compared to what interpreted languages do.
 
5:01 AM
now that you mention it, Charcoal also lacks classes and an import method :P
@Pavel well, of course. but it's still hacky
 
(eval io.open"file.fnk"::read())()
 
Anonymous
@ATaco At least you have file I/O in your esolang :P
 
if you really want you can just modify roslyn to make a really hacky C# derivative
@Mego But can it really be considered an esolang
 
Funky is not an esolang, it's practical.
Just impractically so.
 
Anonymous
@ASCII-only Yes. Funky is one of the more esoteric languages because of its extreme desire to make anything and everything syntactically valid
 
5:03 AM
@ASCII-only I have done exactly this, to make a 100% dynamic version of C#. It was awful.
 
Anonymous
@ATaco Practical and esoteric are not mutually exclusive IMO
 
See also, Perl
 
@Mego Fun fact: You could say that was my goal for VSL
 
@Mego It's a noble goal.
 
Anonymous
Also practical and/or esoteric doesn't describe all languages. PHP isn't really esoteric, but it is not practical in the slightest.
 
5:04 AM
To my knowledge, there is no way to Syntax Error it.
 
print("Syntax Error")
 
Well, error"Syntax Error"
 
Can you crash the interpreter?
(... this reminds me of the seriously bounty ...)
 
I understandably get an error message, but why just that error message?
 
Oh hey, a Syntax Error.
Wait, that's not a syntax error techincally.
 
5:06 AM
Wait, I see. Funky doesn't handle syntax errors ever, and just lets the underlying JS crash.
 
Usually.
Ah, I see. It's complaining because you're essentially doing a-- = b
 
@ASCII-only wat really
is this why command chain
 
And that's the only error, I think.
@Pavel That happens because there is no valid program passed, and I never added a proper case for that
 
So the program passed is invalid.
 
5:08 AM
Essentially it only reads '', which doesn't tokenize.
 
IE a syntax error
 
@Downgoat no, command chain is so it reads more naturally
 
Well, that technically returns false, so It is a syntax error I guess.
 
@ASCII-only oh. btw I got a JS backend working for things like func main() { print("hi") } :D
 
@Downgoat Oh hey, that's valid Funky!
The real main goal for Funky is to create a language that other PPCGs might use (For reasons other than a cheap quine ;-;)
 
5:12 AM
@Downgoat :D
@ATaco what do you mean
 
0
A: A program that outputs itself in reverse order

Arnold PalmerRProgN 2, 3 bytes 1 0 Try it online! Pretty sure this has been submitted before, but here's one in RProgN 2. It outputs 0 1

RProgN2 has so many other great quines...
 
@ATaco *reverse quines
 
7 byte solution that isn't cheating.
 
Any neat Funky quines?
 
6 bytes. «` .i
Nothing neat, but there are quines.
Or just f=@'f='+f if you're allowed to define a function.
 
5:17 AM
@print?
 
@ is essentially equivalent to ()=>
So this defines a function print('f='+f)
 
Ah
 
It does have a couple of other uses besides this, but this is the main use.
 
@ATaco 0/10 no trailing f() in output
 
It can also be used to call a function, eg. print@1+1 which will print out the function '@1+1', and it can also be used to turn operators into functions, eg. @+(1, 2) returns 3. You can combine this to do things like array::reduce@+
and = and and and; is also perfectly valid. For reasons.
And this is the equivalent of doing x = function y(z) z("I am a bad person") x(print)
 
5:26 AM
;-;
 
Funky's syntax is designed to make sense, but also lets you not make sense.
I mean, what would any reasonable programming language do in any of those cases?
 
Error
 
Sounds like a wasted opportunity for function-ality.
What's happening here is that if a keyword cannot work for its intended purpose, it will happily work as a variable instead.
Funky does also do logical things, not to spook anyone with these illogical things it does.
 
like shuffling arrays while sorting
 
Comparisons between types are intentionally undefined behavior.
And quicksort is the best sort method I Know how to implement.
Shuffling is done as Quicksort uses a random pivot, and as comparisons between types are always falsey, the new order is based on where the pivot was placed.
I also recently added with statements, because those are nice.
 
5:39 AM
@ATaco Is there not a builtin sort to JS
 
JS has a built in sort, but it only works for JS arrays.
(Actually, it appears to work for Objects as well)
Hmm..
JS's sort equally doesn't handle these types (as expected), however instead of shuffling it (which quicksort would do) it simply doesn't modify their positions.
(And my objects don't have the length property, so I can't use Array.sort anyway...)
The best solution would probably be to define the behavior of inter-type comparisons.
 
random question: if magic had a machine code what would it be like
 
5:55 AM
I'd imagine the simplest form of Magical Programming would be tacit tbh.
Something like an Enchanted APL.
 
@ATaco huh, i thought it would be better if it was a prefix (?) language
 
@ASCII-only I don't know why but I've been pondering this very question for several days now
And I've had an odd recurring dream involving compiling C to magic assembly.
 
@Pavel O_o
@Pavel i wonder what that looks like
are you reading too much isekai
 
I can just imagine runes like (self man).burn
 
@ASCII-only I blame specifically The Irregular at Magic High School, which isn't actually an isekai.
.oO(Did I say "I don't know why"? I totally know exactly why.)
 
6:01 AM
@Pavel adds to to-read list
 
@ASCII-only Or watch the Anime
 
@Pavel Clearly manga > everything else
 
Oh nice, they just lump Australia in with Asia.
I get enough of that from game servers...
 
@Pavel sounds like Tower of God x Highschool of the Elite (or i guess any magic academy manga/anime/webnovel really)
@ATaco who
 
The Irregular at Magic High School
 
6:04 AM
@ATaco It's set in the future where after a lot of war China essentially took over all of Asia except Japan and plus Australia
 
@Pavel so basically china did what japan tried during WWII?
 
I think this greatly over-estimates the value of Australia.
Ah well, looks like a good read/watch
 
@ATaco well, Australia does have an insanely low population for its size
 
@ASCII-only It really doesn't go into detail about other countries. You basically see a map towards the begginning once and then it stops mattering.
 
Not for it's livable size
A good portion of Australia is, although survivable, pretty bad.
 
6:06 AM
@ATaco well, Australian houses are called McMansions because they are known for being massive
 
Wait really?
 
I imagine someone went, "Well, you know, no one lives there anyway, why not take over Australia while we're at it?"
 
3
Q: Minimum collection from a sequence that constitute a perfect square

prog_SAHILGiven the sequence OEIS A033581 Write the code to find the minimum set of numbers whose sum constitute a perfect square. RULES: You cannot reuse a number already used in the sum. Numbers used can be non-consecutive Code with the least size wins This is my first post here, Kindly let ...

 
@Pavel Probably great for industry out there. Plenty of room.
 
@ATaco well i don't think they're called that very often, at least in australia. but they are certainly massive
 
6:08 AM
I didn't think our houses were great...
 
Anyway, if you need something to watch, go watch Made in Abyss. Best anime all year.
 
not on crunchyroll, too lazy to watch :P
 
@ASCII-only Anime Strike Amazon Prime Video exclusive, i.e. go to Kissanime
 
 
3 hours later…
9:29 AM
1
Q: Write Moby Dick, approximately

NathanielHere is a 1.2Mb text file containing the text of Herman Melville's Moby-Dick; or, The Whale. Your task is to write a program or function (or class, etc. -- see below) which will be given this file one character at a time, and at each step must guess the next character. This is code-challenge. Yo...

 
10:19 AM
0
Q: Determine Tic-Tac-Toe winner (round based)

GrunzwanzlingLet's play some code-golf! The challenge is to find the winner of a game of Tic-Tac-Toe. This has been done many times by giving a board that has one clear winner but here is the twist: The cells are numbered like this: 1|2|3 -+-+- 4|5|6 -+-+- 7|8|9 You get an array of exactly 9 moves like ...

 
10:34 AM
0
Q: Compare two numbers given as strings

CharlieI have a problem at work. I need to compare two numbers that come as strings from two different databases. The numbers may come with leading zeroes and/or leading/trailing spaces. So I may have "0001 " from one database and " 1 " from the other one. I solved the problem in C# with the following...

 
 
1 hour later…
11:56 AM
I was close to a Hexagony solution (or not) for the recent challenge until I realized that it was closed... (not to say that people should reopen it)
 
12:22 PM
@user202729 re your comment, yes but we tend to give new users a chance to fix the answer before we delete it, because having your first answer insta-deleted isn't a very welcoming experience.
 
Moreover, the mod who undeleted it added the indentation because he wasn't sure if it was required. The code has been posted, but not formatted correctly. That's not a reason for deletion, and aside, it wouldn't be too pleasant for a very new user
 
I think we're talking about different answers.
 
I was talking about the PL/SQL one
 
ah yeah, I was talking about an actually invalid Mathematica answer
 
O ok.
Well user202729 did comment on the PL/SQL one too, so it's ok :P
 
1:15 PM
Is the primality testing question "true for composite, false for prime" or vice versa? The specification only says "truthy/falsy value"...
 
I believe by site-wide standards you can swap the outputs for s. I also think you can just define False is truthy and True is falsy though that depends on if it's Two Distinct Values or Language-defined Truthiness.
 
1:52 PM
Do we have main challenge [decision-problem] that detect if a sequence is arithmetic (modulo n)?
What about CMC?
 
@user202729 superset
 
2:38 PM
@user202729 Does it output with true and false switched?
 
@H.PWiz For other values, yes. For 1, it raises division by zero error.
 
2:53 PM
 
Jelly, about 8 bytes.
5 bytes may work.
 
@totallyhuman nth or first n?
 
the former
 

« first day (2537 days earlier)      last day (2298 days later) »