« first day (2475 days earlier)      last day (2351 days later) » 

12:00 AM
@ATaco ? what?
 
I once moved my entire folder structure into a sub folder.
 
I had to re-install a-ta.co when that happened, and I had no source control..
 
please help how to python
 
what is pip3
 
12:03 AM
wait crap wrong chatroom
@DestructibleLemon pip but for python3
 
what's wrong with pip
 
But pip is also for python3.
 
clearly need to install configparser
 
@DestructibleLemon look up like 10 lines
 
@Downgoat slither around, grasp prey with your sharp teeth, and kill them through constriction
duh :P
 
12:09 AM
> Successfully installed ConfigParser-3.5.0
 
install it better
 
@Downgoat at this point you do not deserve linux
 
1:08 AM
(the quote in the question not the question)
 
 
1 hour later…
Anonymous
2:34 AM
@Downgoat The issue, as pointed out in the other chatroom (which I'm saying here for others' benefits), is that the mysql package on PyPI is broken and not well-maintained. I'm looking into the terms of use to see if I can legally upload a working version to PyPI.
 
@Mego The community python connector is licensed under the GPL, so probably.
 
You can now call a function with a splat without parenthesis in Funky, eg. print ...t
 
3:14 AM
cmake pls
So basically
I installed the latest OS X version of CMake or whatever
and of course it sucks
first off the actual tools are hidden inside an application bundle because lul
secondly it doesn't actually work with GCC
>mfw correctly identifies compiler as GCC
>mfw tries to pass in clang options
>mfw The C++ compiler "/usr/local/bin/g++" is not able to compile a simple test program
>mfw refuses to use any other compiler even when I take /usr/local/bin out of the path
>mfw CMake is getting called from emsdk so I can't pass it a -D option to get it to use something else
 
3:28 AM
Huh, today is 100 years since the october revolution
 
OK I managed to make a bash wrapper that makes it work
I'm sure it'll piss me off in six months when I run cmake on something and it starts building it with clang
I'll be back in 8 hours once emscripten builds
which by the way I'm having to build from source because this release has an emar that just flat out doesn't work on OS X
bye
 
@Pavel before I post this challenge and somebody answers it in C#, could you give me the code for a trivial GUI app? ALL the information I found on the net involves designing a window in Visual Studio.. also, zsh: command not found: dotnet
 
@aditsu Have you installed .net core
 
@aditsu you need .net core
ninja'd
 
@Pavel Darn Julian calendar, putting the October Revolution in November
 
3:34 AM
@Pavel not sure how to go about doing that, will search..
 
K
@aditsu Apparantly Core does not support GUI. You could use Mono with GTK#, which has the same APIs as Windows Forms.
 
ok, still need the source code for the program though..
 
@aditsu Remember what I said about no small C# projects? I create this simple app with the form designer and came out of it with 4 .cs files.
 
> form designer
 
Presumably there's a way to do it simply with one file but really when it comes to forms you're not supposed to do it
@quartata The Visual Studio one
 
3:43 AM
problem_spotted.gif
 
right, if you can't minimize it, just zip them up
 
Well IDK any other way to make a gui
 
thanks
btw, in java you can simply do public class X extends javafx.application.Application{public void start(javafx.stage.Stage s){s.show();}} -> bam, window
 
@aditsu I'm sure C# supports that but I have literally never made a GUI application in my life
 
now I have to figure out how to compile your project :p
I'll try msbuild ..maybe
 
3:53 AM
oh wonderful
turns out it's still broken in the incoming version of emscripten
so that was for nothing
 
ooh, I think I managed to compile it just with mcs
 
Nice
The dotnet core compiler is super intelligent, dotnet build (or dotnet run). The tools make the needless complexity bearable. Unfortunatly, you don't get GUIs.
 
Anonymous
I hate that Microsoft only wants VS build tools to be installed on C:. That's utterly stupid for the users that have multiple drives.
 
Just swap your drive order, EZPZ
 
Anonymous
@ATaco Not so EZPZ when Windows is literally hardcoded to expect system files on C:, and for C: to be the boot drive
 
4:05 AM
I know, I was joking.
I prefer the unix / over C:\ anyway :P
 
Anonymous
At this point my solution is to copy my working directory over to my Linux server and compile it there
 
@Pavel well, I don't have "dotnet" but I was able to run your code
I stripped it down to this: using System.Windows.Forms;static class X{static void Main(){Application.Run(new Form());}}
 
Nice
@aditsu The static class can be shortened to class. Main can become static void Main()=>Application.Run(new Form());
@aditsu You don't need main?
 
@Pavel nope, javafx application
 
Ah
 
4:18 AM
you can make it shorter using AWT and including a main method, but it doesn't behave nicely..
@Pavel I don't think "=>" makes it shorter..
 
@aditsu I suppose it doesn't. It only makes it shorter when there's no return statement.
@ATaco Wat the even
 
Anonymous
4:44 AM
1
0/1
0
 
@ATaco You have to explain what's going on there
 
The tokenizer wants to allow either func or function, so it sees func as one part and tion as an optional part, and Funky lets whitespace live between tokens.
 
@ATaco If tokens are regexes, the tion token should be (?<=func)tion
Actually, if tokens are regexes, func/tion should be one token: func(?:tion)?
 
It should be one token, but it isn't.
 
Anonymous
@ATaco How are function definitions supposed to look?
 
Anonymous
4:54 AM
Like say I wanted to write def f(): print("foo") in (readable) Funky
 
function a(){} func a(){} function a() b function a x{} (a, b)=>{} a=>{}
function f(){
	print("foo")
}
 
The second func there is dropped :P
 
@Mego ಠ_ಠ
 
It's written such that anyone trying to write sane code won't ever notice it.
 
Anonymous
4:59 AM
@Pavel Point those at the one who made the language, not me
 
Shhhh, Funky is beautiful.
Look at how pretty this answer is!
 
5:15 AM
@Mego god damnit the first func can be dropped entirely
Tion is enough for function declaration
 
That's not actually defining a function.
 
@ATaco Well what is it doing
 
 
Does nothing with tion, tries to call nothing, then tries to call that result with a table that contains print("foo") which is parsed.
So most of it is ignored.
 
5:22 AM
Seriously tho you should fix function token behavior
I shouldn't be able to define a function with tion
 
You can't, that's not defining a function.
If you remove the final func tion(), then it still prints foo
 
Oh
Shouldn't it error or something
 
Anonymous
@Pavel Errors are overrated
 
There are many parts of this that should logically error, but that's boring.
 
Anonymous
It's like you took the overeager type deduction schemes from JS and PHP and applied them to the whole language's syntax
 
5:29 AM
That's a pretty good description.
 
@Mego I'm trying to think of a language with a similar approach to the idea of NameError and I can't
 
Anonymous
You were so preoccupied with whether or not you could that you didn't stop to think if you should.
 
Funky is by far my best made language, too.
 
Anonymous
That's frightening
 
Well my last few languages are held together with sticky tape.
This is my first attempt at a C-like (Javascript-like) language, and I'd think it's pretty good for what it is.
function gcd (a, b) {
    while (b != 0) {
        c = a % b;
        a = b;
        b = c;
    };
    return a;
}

function A000938 (n) {
    n = n + 2;
    ans = 0;
    for (m = 2; m <= n; ++m) {
        for (k = 2; k <= n; ++k) {
            ans = ans + (((n - k) + 1) * ((n - m) + 1) * gcd(k - 1, m - 1));
        }
    };
    ans = (2 * ans) - ((n*n)*(((n*n) - 1)/6));
    return ans;
}
See? That actually looks like code!
 
5:38 AM
@Mego I invite you to look at the source code for RProgN2
 
(It's also a polyglot of Javascript)
Good luck
 
Anonymous
@ATaco Do integers not decay to booleans for conditionals?
 
What do you mean?
Oh, they do, but that was for the OEIS challenge and bytecount manipulation is important.
 
Anonymous
Ah
 
Anonymous
So while(b) is an acceptable alternative for while(b != 0), but for challenge-specific reasons you chose the latter
 
5:41 AM
function gcd (a, b) {
    while b{
        c = a % b;
        a = b;
        b = c;
    };
    return a;
}
I didn't write that answer
5
A: One OEIS after another

user202729232. Funky, 326 bytes, A000938 function gcd (a, b) { while (b != 0) { c = a % b; a = b; b = c; }; return a; } function A000938 (n) { n = n + 2; ans = 0; for (m = 2; m <= n; ++m) { for (k = 2; k <= n; ++k) { ans = ans + (((n - k...

 
Anonymous
@Pavel I've seen the source, I think. That's the one with the million different classes for things that should be instances, right?
 
@Mego yep
 
RProgN1 is almost entirely 1 file.
Gotta have some contrast.
 
All I want in life is so that the square button on the Android navbar lets you switch between chrome tabs, not just apps.
 
Anonymous
@Pavel Wish granted. You are now unable to ever use Android devices again, including emulated devices.
 
5:46 AM
My least favourite thing about Funky is that operators are RTL.
Including Unary Operators.
 
Anonymous
@ATaco Why not merge two projects together and make them AnyFix?
 
!a+b is equivalent to !(a+b) rather than (!a)+b
 
@Mego what why
 
Anonymous
@Pavel Chaos
 
If I had used prefix rather than infix it would have been infintiely better.
 
5:49 AM
Still, the amount of times I hit square by accident...
Like literally just now ._.
 
Any tips for this one?
print(sum(any(k+k in w for k in map(chr,range(65,91)))for w in input().upper().split()))
Counting number of words that have at least one double-letter (case doesn't matter)
double letter being "aa", "bb", ..., "zz"
shorten / ruby / etc?
 
Anonymous
@MarcusAndrews Are overlaps counted? e.g. is aaa 1 or 2?
 
the word is all that's counted, as long as at least one such double letter exists
e.g. "balloon" is 1
"aaa" is also 1
 
Anonymous
Ah
 
and the letters do have to be adjacent, e.g. aba = 0 but aab = 1
Checked your profile because I dug the penguin avatar -- and ps if you like math + programming, check out Project Euler
 
Anonymous
5:57 AM
import re;print(len(re.findall(r"(\w*(\w)\2\w*)",input(),re.I))) should work
 
indeed it does
 
Anonymous
 
Anonymous
I started trying to solve that problem the hard way, and as I was typing out a regex to match to verify that I understood the problem, I realized I was being dense by not using regex
 
Anonymous
Also -2 bytes by removing the outer parens in the regex string and changing \2 to \1
 
6:00 AM
I had tried a regex too but it was too long
 
Anonymous
import re;print(len(re.findall(r"\w*(\w)\1\w*",input(),re.I)))
 
So this inherently searches words since it's not including whitespace, any letter in any amount, followed by a particular letter group capture, followed by a repeat of that letter, followed by any more chars in any amount
 
Anonymous
Yep
 
Anonymous
re.I is a flag that tells it to do a case-insentitive search
 
Anonymous
It's short for re.IGNORECASE
 
6:03 AM
So even if I had put something like A-Za-z in there it's going to ignore the case anyway?
err, A-Z, let's say
 
and the text was all lower
 
Anonymous
Not quite. It ignores the case of the text, so A-Z is equivalent to A-Za-z
 
import re
print(re.findall("[A-Z]", "lowercase text")) # []
print(re.findall("[A-Z]", "lowercase text", re.I)) # ['l', 'o', 'w', 'e', 'r', 'c', 'a', 's', 'e', 't', 'e', 'x', 't']
seems to work
yea, that is what I meant (I explained myself poorly)
 
6:15 AM
Hello all!
 
oh, heya Qwerp.
 
I think I have a challenge idea
So I have a line of an even number of skittles, which are red and green. Half of the skittles are red and half are green. I can swap two skittles around, but every time I swap the skittles around I have to create a new permutation of skittles. What is the size n of the biggest swap I have to do, where n is the amount of skittles in between the two swapped skittles?
For 4 skittles, the result is 1, since I can go RRGG -> RGRG -> GRRG -> GRGR -> RGGR -> GGRR, with the final swap being the largest, with the two skittles being 1 skittle apart.
 
Oh, that’s kind of interesting
I’d have no idea how to solve it
Wait, I know a bad way
 
Anonymous
@ATaco O((n!)!)?
 
6:35 AM
I’m not sure the complexity
 
Anonymous
Pure brute force would brute force each step (O(n!)). It should come out to O((n!)!) total.
 
what's the end goal? reversing the skittles?
 
@MarcusAndrews Not necessarily, you have to go through all permutations
I didn't make that clear, whoops :P
 
6:59 AM
do you always have to pick the smallest possible swap for a given move?
nvm
 
@Qwerp-Derp Why wouldn't the answer for 4 be 2? e.g. ['RRGG', 'GRGR', 'RGGR', 'RGRG', 'GRRG', 'GGRR'], the first move counted as 2 if we swap positions 0 and 3? (2 skittles in between)
 
7:29 AM
@MarcusAndrews It should be the minimal maximum, so it's sort of a minimax algorithm
 
or are you asking for min of the max swap dists over all permutation paths? (i.e. no matter which path we take, all paths have at least one max swap of size X somewhere)
aagh ninja'd
 
@MarcusAndrews Bingo
 
 
2 hours later…
9:18 AM
3
Q: Seqindignot sequence

Kevin CruijssenTitle is made up, from 'Sequence Index Digit Not'. Challenge: Given an integer n which is >= 0, output the n'th number of the following sequence. Here are the first 50 items, with it's (0-indexed) index above it: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3...

 
9:33 AM
-2
Q: Find the second largest number in an array

Antonio KovačevićInspired by THIS question I present to you a coding challenge. The Challenge Find the second largest number in an array. Rules You cannot sort the array You cannot use any array specific functions (Like Math.max() in JS) Test Cases [-1, -7, -8, -9, -2] // -2 [-1, -7, 8, 9, -2] // 8 [1, 7...

 
 
1 hour later…
10:33 AM
0
A: Sandbox for Proposed Challenges

Stewie GriffinThe lowest initial numbers in a Fibonacci-like sequence Given a positive integer input N, output the two non-negative numbers, a and b with the lowest possible mean value that will result in the number N being part of the recurring relation sequence: f(0) = a f(1) = b f(n) = f(n-2)+f(n-1) In ...

 
 
2 hours later…
12:23 PM
@Fatalize would you pay me if I say "hey, why not use prolog since it's way easier to and the invocation command will be significantly shorter"? ;-)
@Uriel the key is to not remember the builtins, but use the docs instead
only the syntax is worth remembering imo
although remembering the commonly-used builtins will make golfing significantly faster, you will remember them anyways over time
 
@EriktheOutgolfer Or use a language where the built-ins are mnemonic…
 
@Adám um, that's very, very unlikely for all builtins, if not outright impossible...
although apl does try significantly to do that
but not all are perfectly mnemonic...
 
12:42 PM
@EriktheOutgolfer Not perfect, but pretty good, especially if one is made aware of how they are mnemonic. Do you have an example in mind of an APL symbol for which is neither a standard mathematical symbol, nor has a connection between its shape and what it does?
 
monadic + :p
@Adám it does complex conjugate, for which I don't see any relation to +
or ¨ which is the each operator
 
@EriktheOutgolfer Well, + is obviously a companion to -. So while - negates both the real and the imaginary parts, + only negates the imaginary part. Clearly, there could be a third monadic primitive which only negates the real part, but this is very rarely needed (I think) and can trivially be done with +∘- or -∘+. This is similar to how there is no secondary-diagonal transpose, as it can be trivially done with ⌽∘⍉∘⌽.
@EriktheOutgolfer What? ¨ has one dot for each item (minimum two to be meaningful in normal circumstances).
 
@Adám another example could be (eval) and (str)
or for comments :p
 
@EriktheOutgolfer is a base. It decodes from certain representation to normal numbers. decodes from string representation to normal numbers (or whatever result).
@EriktheOutgolfer and are of course the inverses (as well as they can be inverses).
 
yet another example would be I guess?
(index)
 
12:53 PM
@EriktheOutgolfer That's a lightbulb or a light bulb filament to enlighten you, just like ideas are represented by light bulbs over cartoon characters' heads. (Yeah, the font here is not good, but in a proper APL font it looks much more like that.)
@EriktheOutgolfer That one is just the indexing square brackets smooshed together: []
 
in the apl385 font the light bulb looks just like 0x7f :p
 
@EriktheOutgolfer It really is, btw. If you type [ and then go back to that character in overwrite mode and type ] you will get a real .
@EriktheOutgolfer A house‽
 
huh
oh wait
 
@EriktheOutgolfer I wouldn't pay you either way :p
 
it used to be different o_o
 
12:57 PM
 
@Adám yes that's what 0x7f () looked like in chrome in the past
 
isnt the circle not supposed to fuse with the outer line?
 
@Fatalize What, in a real light bulb or in the APL character?
 
@Fatalize well, life isn't perfect :p
 
If you look at the photo of the real light bulb, you can see that from a certain angle, all the hoops would overlay each other and the total shape would basically be that of the properly rendered APL symbol.
 
1:01 PM
I think it's supposed to show the enlightening, not the bulb construct :p
 
@Adám the APL character
 
@Fatalize No, that is a mistake in many non-APL fonts. The image I posted is from a widely used font made by an APL old-timer.
@Fatalize And this is IBM's official APL font:
 
TIL
Not sure if I like that better than the incorrect symbol though
 
This is APLX's official font:
Not to clutter too much, this last one is from the IBM System/360 typewriter font, which is also used by APL+:
 
my CS class's teaching order: stuff not related to CS -> String output + input -> GUI design -> Numbers
 
1:12 PM
Numbers should come first IMO.
 
The first one looks like a guy bending over
 
I think so too (about the numbers)
 
So what have you learned recently about numbers?
 
Perhaps a Kevin Spacey scene
 
how to do like the most basic things like ++, --, +, -, *, /, etc
And what annoys me is that it doesn't mention that a++ evaluates as a and ++a evaluates as a + 1
 
1:14 PM
The key to write unparenthesized code: Always do -~ and ~- and assign instead of ++ and --.
 
Then again, I don't think the teacher will be expecting us to do anything that makes that matter :P
 
@jaytea I see what you mean, it kind of has a nose.
 
@user202729 +1 that is definitely good idea
 
@HyperNeutrino That is not supposed to cover in "simple" courses.
 
1:15 PM
@HyperNeutrino That's your idea.
 
More like a head-on view of a dude on his hands and knees
Aka just another day in the life of Kevin Spacey
 
@jaytea Maybe the dude is commenting upon your code.
 
@user202729 huh?
 
A further informal APL learning session is taking place this evening at 18:30 UTC - you can join Adam at https://chat.stackexchange.com/rooms/52405/apl Reading along is open to everyone, but 20 StackExchange reputation points are required to contribute messages to the chat.
 
Oct 17 at 14:15, by user202729
@HyperNeutrino And what's with int[length * ~-length * ~-~-length / 6] and combine(nodes, old, (x, y) -> x ^ y)? Are you going to obfuscate the code?
 
1:17 PM
oh lol right
 
He's trying to get a closer look at my code because it's so small and well-golfed!!
haha
 
next OEIS looks interesting
anyway must write history test now lol gtg o/
 
cya, stay in school \o
 
And I, again, get disappointed by the solution to the planar map oeis sequence.
 
1:33 PM
s/test/quiz/
that was a short quiz lol
@user202729 was it a formula copy ._.
 
Google classroom quiz?
 
not for history, it was a paper quiz
 
Basically so.
 
ah ok ._.
 
The next one is basically good, but that's because the oeis definition provide formula.
Except that it does so in the slowest way.
 
1:35 PM
lol
 
(like, Fibonacci with recursion)
 
ew lol
 
I may be wrong though.
idk what is the T function.
No problem, T is probably true.
but I find it weird that it runs in exactly 60.003 seconds on TIO, for both input 9 and 10.
(real time)
 
hm interesting
aren't 9 and 10 both 0?
oh you were talking about [249]
 
Somehow it looks like that the TIO interpreter of picolisp will always run for exactly 60 seconds and then terminate with a trailing :. Weird.
@Dennis have a look?
 
1:41 PM
interestingly enough the user time is quite short lol
 
and that the functions seems to work with larger values, probably with memoization.
> A self-complementary graph is one isomorphic to its complement.
So simple definition.
 
So basically <generate all graph> <deduplicate by isomorphism> <check isomorphism with complement> <count>
There must be a better way.
 
that's pretty much what I'd do and it sounds very slow xD
or use the subtraction formula given but I don't know why it works so I won't
 
> I don't know why it works so I won't
+100. (I don't have that many rep anyway)
 
1:55 PM
:P
 
@EriktheOutgolfer there's still the matter of knowing the general syntax/ structures. I can use 05ab1e even though I don't even remember the prime built in, but won't be able to write something in jelly beyond a 4 byter
 
@Uriel stack-based languages are often very simple
 
@Uriel I don't remember any builtins; I just open the docs and copy-paste :D
oh also you only have to generate all graphs with (n-1)!/2 edges for n nodes but I'm sure you already had that figured out
 
Actually n(n-1)/4.
Because number of vertices of a complete graph with n vertices is n(n-1)/2.
 
oh nvm lol
 
1:59 PM
@EriktheOutgolfer well, my first non-bf esolang was befunge :P
Also my first ppcg answer
 
befunge ಠ_ಠ
 

« first day (2475 days earlier)      last day (2351 days later) »