« first day (7 days earlier)      last day (54 days later) » 

06:00
room topic changed to Pyth Academy: A room founded by Jim and Mr.Xcoder for golfing Pyth assignments [code-golf] [pyth]
> If anyone is willing to enter this chatroom and practise Pyth with Jim and I, feel free to press the "request access" button.
2
room topic changed to Pyth Training: A room founded by Jim and Mr.Xcoder for golfing Pyth assignments [code-golf] [pyth]
 
7 hours later…
12:49
@Jim I asked Leaky to solve our first N primes CMC. We are extremely dumb. 4 bytes: pyth.herokuapp.com/?code=.fP_&input=5&debug=0
He outgolfed us badly.
.fP_
By 11 bytes, to be exact
 
5 hours later…
Jim
Jim
17:57
That learnt me .f, I didn'y know of it
18:44
@Jim Nor did I
18:56
i here
Hi
@NoahCristino Do you wanna start now?
@NoahCristino ^????
Let's start with the very basics:
let me close some tabs first
I recommend using this interpreter: pyth.herokuapp.com
It has a fancy search bar
18:58
ok
@NoahCristino This is the official docs: pyth.readthedocs.io/en/latest
Now, the first task you ever do in each language: Hello World
Pyth has implicit printing.
it's just
"Hello World"
Just as Jelly
@NoahCristino True
The thing is that you can golf that
19:00
how?
Pyth has automatic closing quotes and brackets at the end of the program
Like: "Hello World
I just got that
This only works with Strings that are at the end of the program.
The same applies for )
19:02
kkkkkkkkkkk
As you call probably tell, Pyth uses prefix notation
That means signs like +, -, /, … are before the things they are operating on
Like 2+2 in Jelly means +2 2. 2*2 in Jelly means *2 2
@NoahCristino It's not werid
Everything is prefix in Pyth
19:04
does it need the space?
@NoahCristino Yes. Otherwise it would interpret it like a single number, 22
You should take note that input is also implicit at the end
but that takes up one more byte
(if it is needed)
@NoahCristino You will never really add to numerical values.
You have a predefined variable for 10, T. Adding T and 2 only requires 3 bytes: +T2
@NoahCristino I'll leave you some time to read the docs now. Ping me when you finish the first few pages
19:07
i already did
give me a challenge
I was reading inbetween messages
Mini-Question: What is input in Pyth?
the equivalent for input() in Python?
one sec
closed interpreter
Don't close that, it's the most helpful resource
In the search bar, you should filter by Any instead of char.
@NoahCristino Q and w are input. z are String input. E is evaluated input.
19:11
oh so Q is all
just like CJam
@NoahCristino Yeah. You can use w too, but Q is preffered
But Q is eval(input())
Note: Q only reads the very first input, no matter how many times it is called
@NoahCristino Play with Q a bit
Note that the ;s are not needed, just added for clarity
@NoahCristino Want an easy challenge?
19:14
ok
CMC: Given a list, output its sum
@NoahCristino Lowercase s.
19:16
that was a joke
jelly
search with that fancy bar
@NoahCristino How are you doing? :D
isn't it just s?
@NoahCristino It is
Good
Now, let's move on to something a bit harder.
@NoahCristino CMC: Output the maximum element in a list.
*you must not handle empty lists)
[1,2,3,4,5] -> 5

[2,4,3] -> 4

[9,4] -> 9

[1] -> 1
ok\
test suite?
The same as above
@NoahCristino Actually, use this one
19:30
nvm no clue what im doing
@NoahCristino Search for sorted
how do I get the biggest element in a list?
S.) should work
@NoahCristino That's the CMC
@NoahCristino S suffices
no it doesn't
I need
[1,2,3,4,5] -> 5
S outputs [1, 2, 3, 4, 5]
@NoahCristino search for end
@NoahCristino S is sorted
19:33
.) gets last element
@NoahCristino e gets the last one too
eS
@NoahCristino BTW well done!
@NoahCristino S.) does not work
@NoahCristino No, .) is not suited here at all
but it errors on []
eS errors on []
@NoahCristino You must not handle it
19:35
oh
> *you must not handle empty lists)
@NoahCristino Wanna take a break until tomorrow? I personally want to chat in TNB now
Jim
Jim
Hey
Just passing

« first day (7 days earlier)      last day (54 days later) »