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

6:00 PM
because in JS you can do dumb things like +[] for 0
 
There's Symbolic Python which doesn't use any alphanumeric characters
 
@HyperNeutrino that is true
@HyperNeutrino so you're allowed ~[]()01 then
implicit printing at the end of course
 
but then it's no longer a subset of Python
 
CMC: shortest snippets that return the positive integers 1-10 (10 snippets), using only ~0-1
those digits
@HyperNeutrino hm true
 
JSFuck is valid JavaScript
@Riker 1, -~1, -~-~1, -~-~-~1, etc
 
6:03 PM
@Riker pretty trivial.
@HyperNeutrino and lastly 10
 
@HyperNeutrino They might not be the shortest.
 
also, cool thing of the day: you can hit opt-number, and then a letter, to repeat that letter in the python REPL <number> times
i.e. opt-1-3 (hit opt-1, then release both and hit 3)
 
1: 1
2: -~1
3: 1-~1
4: -~1-~1
5: 1-~1-~1
6: -~1-~1-~1
etc
 
then a, prints 13 a's
 
anyway gtg o/
 
6:05 PM
o/
 
10: 10, 9: 10-1, 8: ~~10-1-1 (this can be shorter)
CMC: Output 3 only using [><]
 
js? or brainfuck
 
Python, JS, Brainfuck, anything.
 
can I use +?
 
No.
I don't even know if it possible.
 
6:11 PM
don't think so
 
(in python). I can output 2, but 3...
 
how'd you get 2?
 
@Riker Python: [[]<[[]]][[]<[]]<<[[]<[[]]][[]<[]]
 
oh, I frogot about bit shiftnig
 
oh right shifts
LOL
how do you get 3 o_O
 
6:14 PM
Ok, so final rephrase: Output 4 only using [<]
@HyperNeutrino You can't.
 
lol
@Mr.Xcoder [[]<[[]]][[]<[]]<<[[]<[[]]][[]<[]]<<[[]<[[]]][[]<[]]
just yours copied an extra time :D
 
also interesting if we can use ()
makes it possible to get anything I think, in JS at least
 
@Riker No you cannot. You can work that out with [...][[]<[]]. At least in Python (x) is like [x][[]<[]]
 
@Mr.Xcoder I know, but for the sake of getting non-exponents of 2
I'm using JS
 
( ͡° ͜ʖ ͡°) Ok I'll allow it
 
6:16 PM
@Mr.Xcoder actually [x][[]<[]]
 
@Mr.Xcoder wut, why the lenny
 
@Riker Cuz I changed the rules a thousand times
 
lol
 
anyway brb
 
Huh? Why is my trivial solution to the dupes-in-a-list CMC starred?
 
6:18 PM
because people don't know what stars mean ಠ_ಠ /s
 
Announcement: An event is starting in 12 minutes in APL - "APL learning session"
 
@NieDzejkob Because you ninja'd Thomas Ward presumably
 
0
Q: Carve a square from a string

PavelYour challenge today is to take a multiline string, and output the biggest square contained within the string that includes the top left corner. A square string is one where: Each line has the same number of characters The number of characters on each line is equal to the number of lines. C...

 
6:31 PM
@NewMainPosts why is this so hard in jelly ._.
 
@HyperNeutrino Hard?
 
or at least I tried like 50 different things and all of them do absolutely nothing to the input
got it but it's so long
 
@HyperNeutrino he he he
 
why strict IO format ;-;
I mean it only adds 2 bytes but still
Pyth beats Jelly!
(waits for Dennis)
 
I think the I/O is not that cumberstone
 
6:36 PM
I mean it's just <split><newchain> but still
 
Not all solutions will need to do split, so you shouldn't get it for free.
 
i guess
I mean Pyth just reads all STDIN ;-;
 
@HyperNeutrino @Dennis we need your Jelly wizardry
 
;-; I intentionally didn't ping him because if he's busy I don't want to bother him but oh well you pinged him so ¯\_(ツ)_/¯
 
16061 palindrome again :D
 
6:40 PM
eh?
 
@Pavel My reputation
 
@Pavel What should the result be for:
a c
def
ghi
 
@Mr.Xcoder Same as the input
 
pet peeve: sites that have stupid lists, with like 4 paragraphs per page, and then you need to click next (which loads a whole new page, doesn't just unhide a div) to view the next 4, and every third page is actually an advert
 
6:54 PM
@Riker It's almost like loading the page multiple times allows them to to get paid by advertisers more times for one visit.
 
.. I never realized that
 
You're right, annoying af.
 
I mean I have ublock on it's not like I see any of them
 
Proposed compromise to websites: You don't show me ads, but you get to run a script that mines bitcoin or something instead.
 
honestly, I could probably deal with that on something like wikipedia
 
6:56 PM
@Pavel this has been tried before
 
opt-in to use my computer (a set portion, unlimited access is just dumb) to mine bitcoin or smth for it
 
@NieDzejkob I know. I like it.
 
@NieDzejkob where? I'm curious
 
@Riker The Scandenavia and the World webcomic.
Other places too, but that's one example.
 
I feel like finland would do that
they have public hot tubs iirc
 
6:57 PM
 
A few places already do it but they don't tell you, and that's just nasty.
@Riker Saunas
 
@NieDzejkob I did do that
I was wondering if any major site did that
 
TPB tried
 
all I got off of that search was hijacking browsers, I was looking for actually legit ones
 
but they didn't turn off ads, so people got pissed
 
6:59 PM
Idea: Use people's idle computing power to run parallelized computation and make a major website do parallel computing
my hackathon team tried that in my first hackathon (internet one like 2 years ago) but it didn't work very well xD
 
make it optin or mobile device users will H A T E you
 
yes :P
if google did that they could probably get places because of how many people use google
 
Isn't that just SETI at home?
 
BOINC is the term you want
 
@muddyfish SETI? How do you Search for ExtraTerrestrial Intelligence at home?
 
@xnor 10/10 testcase invalidated 3 answers — Pavel 1 min ago
 
@Pavel stare really hard into the sky
 
@muddyfish Cool
 
@Mr.Xcoder Fixed for that test case for 0 byte difference :D
 
Poll: Would the carve a square challenge be more intresting if spaces were considered holes that shouldn't be part of the square?
(Not that I'd change the rules on that)
 
7:09 PM
Python question: Can I redefine an class from an imported namespace?
Something like...
import foo

class foo.Bar(foo.bar):
    ...
 
@DJMcMayhem sortof.
take a look at my imaplibext library
 
λ  python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class foo:
...     pass
...
>>> class bar:
...     pass
...
>>> foo
<class '__main__.foo'>
>>> foo = bar
>>> foo
<class '__main__.bar'>
>>>
@DJMcMayhem ^
 
You can define a class and assign it to the name of the imported class.
 
@DJMcMayhem you'll see that I import imaplib.IMAP4 and redeclare the class as class IMAP4(imaplib.IMAP4): ...
yep
 
7:10 PM
@Pavel That's... Not what I want. foo.bar must specifically be imported from foo
 
@DJMcMayhem you can't redefine foo.bar
 
@DJMcMayhem Sure, foo.bar = new_class
 
classes can't have . in them
 
@ThomasWard Namespace foo, class bar
 
You can't do exactly what you wanted but Pavel offers an equivalent method
 
7:11 PM
@Pavel if foo exists already and he wants to redefine bar he needs to have a new namespace and class
and then import that new namespace as foo
then he'd have foo.bar
 
no?
 
OK, let me be a little more specific
just a sec, typing it out
 
@DJMcMayhem ambiguity is evil :P
 
class bar():
    def __init__(self, a):
        self.a = a


class bar(bar):
    def __init__(self, a, b):
        super(bar, self).__init__(a)
        self.b = b

a = bar(1, 2)
print(a.a, a.b)
This ^ works.
However, in my case, the original definition of bar is in foo.py
 
@DJMcMayhem Sure, it would work.
 
7:14 PM
@DJMcMayhem then...
 
I can do class bar(foo.bar), but that creates a new class in the local namespace, not in foo
 
@DJMcMayhem Right, so you do foo.bar = bar afterwards.
 
I think
 
Well that's surprisingly simple
If it works, just a sec
 
7:15 PM
I haven't tried that but it should work.
 
and if it doesn't then you have a small problem of having to do additional redefinitions.
 
@Pavel That works perfectly
Thanks a bajillion
 
Awesome
Np
@ThomasWard I was more concerned about the possibility of the class suddenly extending itself
 
I just realized that modules are just normal objects
 
@HyperNeutrino Yep.
 
7:16 PM
Actually, it might be even simpler than that because I could do from foo import *
 
@DJMcMayhem That would also work.
 
@Pavel Well, they each handle their own, I can actually do import imaplibext as imaplib and maintain reverse compatibility with imaplib for the most part. While having imaplibext properly reference imaplib so...
 
@Pavel Yeah, I'm amazed that super and inheritance is smart enough to let a class inherit from itself, but keep the original around long enough that you can redefine it's constructor while still referencing the original one
 
caveat emptor
 
CMC: Prove that f:Z->Z is a bijection (the function is a link)
or prove that it isn't
Really you only need to prove that it's surjective because it's obviously injective by definition
oh wait f(1234567890) doesn't exist
 
7:21 PM
ಠ_ಠ Because of PPCG I suffer of the What-does-my-code-do? syndrome.
 
lol
 
@Mr.Xcoder oh I have that and I'd like to blame it on PPCG but really it's just because I write spaghetti code :D
 
@HyperNeutrino have time for a bit of JHT?
 
lol in like 3-4 minutes class is almost over and then I'm going to CS club
 
Hi. Does anyone here know Pyth, I am stuck on something.
 
7:26 PM
@IanGödel Just ask, I might be able to help
 
Ok, I want to rotate an array given as input to the left by 1 place, but I get weird results with .<1
 
.< takes the list first, then the number. You'd need .<Q1.
 
@Mr.Xcoder Thanks!!! But just curious, why did I get [2, 4, 8, 32, 64] with .<1
 
@IanGödel What input did you have? I assume [1, 2, 3, 4, 5, 6]
 
@Mr.Xcoder [1,2,3,5,6] in fact
 
7:31 PM
Oh yeah. Because .< #integer# #integer# is bit shift. And .< #integer# #list# vectorizes bit shift.
 
@Mr.Xcoder Like << in C?
 
Presumably, yeah.
 
Great thank you
 
8:30 PM
is there a quicker way to map a base conversion to new chars?
puts gets.to_i.to_s(4).split("").map{|x|['FE','FI','FO','FUM'][x.to_i]}.join("")
this is as far as I got with Ruby
takes the incoming int, converts it to base 4, replaces the numbers with words
 
8:47 PM
hmm, is *"" the same as .join("")?
 
@MarcusAndrews In Python?
 
@MarcusAndrews yes
 
9:06 PM
TFW you can do something in /// but not Python
 
What is the task?
 
I was working on something that converts a number to base 4 and remaps the numbers to words
 
9:23 PM
@DJMcMayhem Given a flat array and a list of depths, reconstruct the nested array
 
9:36 PM
so, why the nineteenth byte
nvm apparently there's an explanation for it on other pages XD
 
@cairdcoinheringaahing what makes you think you can't do that in Python?
@Mego I didn't know you were married
 
@orlp It took me ages to figure out, before caving and using regex and eval. The aim was to do it with array construction though, and I failed :(
 
9:54 PM
0
Q: Expand a number

Galen IvanovExpand a number Your task is to expand an integer greater than 0 in the following manner: Split the number into decimal digits and for each digit generate a list according to these rules: if the digit is odd, the list starts with the digit and goes down to 1; if the digit is even, the list st...

 
10:22 PM
 
0
Q: Alphabet Staircase

SpookyGengarThe Challenge Your task is to create a program where it outputs the following with no input: a bb ccc dddd eeeee ffffff ggggggg hhhhhhhh iiiiiiiii jjjjjjjjjj kkkkkkkkkkk llllllllllll mmmmmmmmmmmmm nnnnnnnnnnnnnn ooooooooooooooo pppppppppppppppp qqqqqqqqqqqqqqqqq rrrrrrrrrrrrrrrrrr sssssssssssss...

 
@Adám Not yet (hopefully though)
 
@cairdcoinheringaahing :-) It is a straw poll; click to "vote".
 
10:44 PM
0
Q: Should I edit a challenge to make it more intresting, if it makes several existing answers no longer optimal?

PavelSpecifially This one. Dennis pointed out that the rule that input cannot be an array of lines makes the challenge worse, and I agree with him now. However, the challenge already has several answers, and most of them would become sub-optimal since taking input as a string array would likely be sh...

 
CMC: Given y find an x such that tan(x⁻ˣ) = y. E.g. y = 2.1 → x = 0.8725.
 
what's inside tan()
is that meant to be x^x?
 
that is xroot(x) I think
 
tan(x^-x)
 
@Adám shouldn't the arrow be the other way round or something since y is the input?
 
10:52 PM
@DestructibleLemon Yes, thanks. Fixed.
 
Interesting question: When browsing answers, is there a type of answer which (assuming it's correct) you always upvote? Such as answers in a given language, answers of a certain code length etc.
 
@cairdcoinheringaahing anything that mentions the secret word
 
I always upvote answers in a) my languages or b) languages that I'm learning, if they have an explanation
@EricTressler I'm torn between taking the bait or not :P
 
@cairdcoinheringaahing Probably not always, but I tend to upvote answers that use language features in innovative ways, use non-obvious algorithms, or use "languages" for non-intended purposes.
 
@Adám something tells me there is one language you'd always consider innovative ;P
 
11:03 PM
@cairdcoinheringaahing am i missing something?
 

 talk.tryitonline.net

For general discussion and feature requests regarding tryitonl...
 
Dyalog APL solution to my CMC: (3○*∘-⍨)⍣¯1
 
that's almost an emoticon
 
@Adám I just finished typing it in mobile tryapl ⍨
 
@Uriel For some reason that doesn't seem to work on TryAPL. Not sure why.
 
11:07 PM
@Adám oh, I use it for symbols, I run the code on tio
 
@Uriel OS?
 
@Adám huh?
 
@Uriel Which OS does your mobile use?
 
@DestructibleLemon Never mind
 
11:25 PM
@Adám Android. Why?
 
@Uriel APL Keys
 
0
Q: Why do we count some multibyte characters in the esolangs as single bytes?

dylnanFor example, this submission written in APL (Dyalog) claims to be 39 bytes. It is 39 characters, but in the TIO link provided in the post (which happens to be an older version that is two characters longer but that does not matter) it says it is 41 characters and 87 bytes. Why does the score coun...

 
@Adám oh. my phone keyboard already supports more apl keys than my pc's does, and I prefer copying rather than switching kbds. thanks anyways!
 
11:49 PM
@orlp I believe I have requested this feature at least 3 times.
 

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