« first day (1829 days earlier)      last day (3014 days later) » 

11:00 PM
$str =~ s/regex/repl/ makes a lot of sense too
 
Yeah, granted.
Makes more sense than Python shudders
 
huh wait I lied, the Discord thing doesn't start for 2 more hours
 
lol
 
i just solved a puzzle in the witness that was giving me a lot of trouble :)
 
Anonymous
11:03 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ The typical order of Python arguments is f(modifier, source). See: map, apply, everything outside of string methods.
 
Anonymous
Which looks better?
 
@Mego and that's ugly and python should be punished
 
@Mego pretty much anything but that.
 
Anonymous
re.sub(lambda x:do_something(x), source_string)
re.sub(source_string, lambda x:do_something(x))
 
11:04 PM
Oh, the latter.
 
second obviously better
 
Anonymous
You two are just saying that to be argumentative >_>
 
No, really, the second looks better.
 
no we are saying that to be righteous
 
It shows you immediately what's being modified.
 
Anonymous
11:06 PM
But the first shows you how it's being modified
 
Anonymous
red apple vs apple red
 
Anonymous
Adjective before noun
 
I like french better.
¯\_(ツ)_/¯
 
Anonymous
Unfortunately there's no cure for that yet
 
Anonymous
But stay strong; one day we will be able to rid you of that horribleness
 
11:07 PM
that's an adjective. functions are more comparable to words.
`red the apple is` vs `the apple is red`
 
Besides, programming is different. You need to know what's being operated on before knowing what will happen to it.
 
Anonymous
The lambda is the adjective. The source string is the noun.
 
You don't rescue a hostage based on what's going to happen to them. You rescue them based on their identity.
Also, I'm using two strings.
 
Anonymous
s/lambda/replacement_string/
 
lambda is clearly a verb. That's why you wrote "do something". "do something" is an action
 
Anonymous
11:09 PM
Why am I arguing with JS fanboys; you'll never understance the elegance of Python
 
I do admit that, for certain functions, it might be better. Example: startswith(regex,string).
 
@CᴏɴᴏʀO'Bʀɪᴇɴ but that's more of a fault with poorly worded function names
 
yeah
yesterday, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
I absolutely hate python
 
besides it should be string.startswith(regex)
 
Jan 27 at 20:02, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
@Mego "elegance"? Python code looks like barf.
My past self defends myself.
And really, I like OOP and functional programming languages. That is not python.
 
11:11 PM
> Quoting yourself is a poor way to make your opinions sound official
-- Cyoce, 2015
 
Anonymous
"really like OOP"
 
Anonymous
Man you need some serious medication
 
> I like OOP
Where'd the really come frum?
:3
 
Anonymous
Oh I misread
 
Anonymous
Oh well, close enough
 
Anonymous
11:12 PM
"really ... like OOP"
 
What else would you suggest?
There's OOP, and then there's brainfuck.
 
Anonymous
Young padawan, you have much to learn
 
THEN FRIGGIN TELL ME
 
Anonymous
There are many programming paradigms
 
Anonymous
And none are silver bullets
 
11:13 PM
I know this. What makes them better than OOP?
 
well, for starters, there's anything but python
My programming course makes us use only python. ugh
 
:(
We get to use C# or something
 
Then next year for AP coding I have to use... shiver... Java
 
Java > Python at least
 
Anonymous
Each paradigm is good at solving certain problems. OOP is unique in that it's one of the few paradigms that is not good at solving any useful problems.
 
11:14 PM
@Mego Trees?
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Now I think you're trying to piss everyone off :P
 
@Mego I just don't like python ._.
 
Python < [everything]
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ "Trees" isn't a problem. Trees are a way of representing a problem.
 
No, Python > JScript (JScript != Javascript)
JScript = VBScript + HTML
@Mego Searching through a tree.
 
Anonymous
11:16 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Functional programming. LISP.
 
@Mego That's the other paradigm I like.
 
@Mego lisp. shudders
 
> And really, I like OOP and functional programming languages
 
@Dennis pull seriously right away unless you like getting hacked by russians
 
Anonymous
One of the most important things you'll take away from a formal CS education is that there is a right tool for every job, and no tool is right for every job.
 
11:23 PM
^
 
^
But not every tool is right for a job.
 
Anonymous
You'll come to find that even those languages you despise have their niches.
 
I know this.
 
Anonymous
Like VB.NET, for example. I loathe it. But it's the only reasonable choice when you need to make GUI apps fast for Windows machines.
 
Anonymous
And you'll learn to put aside the language bashing and deal with the language's supposed shortcomings to get the job done.
 
11:25 PM
why do you think I'm still using python? ._.
Thanks :D
 
Anonymous
Because you're being told to, not because you think it really is the right tool for the job?
 
No. I have no jobs. I bash languages based on how fun they are to program in. I use python because I'm familiar with it.
If I do have a job with programming, I'll use whatever. :P
 
just because a language is the right tool for a job does not mean it isn't awful and in need of reworking
 
Anonymous
Python is exceptionally useful for writing quick'n'dirty scripts. It's also good for larger projects, but it forces you to actually document things well and think hard about what you're doing. A lot of people will say Python is horrible for large projects because of its duck typing (and other language features). The reality is, they just don't want to think that much about what they're doing.
 
duck typing is awesome
it's one of python's redeeming features
 
Anonymous
@Cyoce That makes no sense. If it's the right tool, it does the job right, and doesn't need fixing. The fundamental design of a hammer hasn't changed in the past few millenia - it's still something hard on the end of a stick. It's the right tool for the job when you need to hit something small really hard. It may suck at other jobs, but that doesn't mean it needs reworking - that means you need a screwdriver.
 
unless if everything starts to look like nails, at which point you have the problem.
 
@Mego your example is silly. A hammer's basic features are the same, but it has went through several iterations. I would say that python now it like a rock on a stick -- it can get things done, but still needs refining to become more useful and efficient
 
Anonymous
Exactly. It's not the hammer's fault that it's a hammer. It's the wielder's fault for thinking everything looks like a nail.
 
(For those reading the transcript, ^ refers to ^^^)
 
Anonymous
11:32 PM
@Cyoce Ok, start a list of things that need fixing in Python, and I'll give you the design justifications for them.
 
Anonymous
Unlike many other languages, Python's syntax and features were thoroughly planned before any code was written.
 
argument ordering, their fear of properties
 
@Mego no do-while
 
^
 
Anonymous
@Cyoce What fear of properties?
 
11:33 PM
i love python but i miss do-while
 
@Cyoce You can't argue that a language has a fear of properties. Languages don't have "fear".
 
@Mego lack of switch statements
 
@Mego len(string)
 
versus string.length
 
Anonymous
do-while is a shortcut for using a loop marshal
 
11:33 PM
@Rainbolt precisely, programming languages are taught to repress all emotion from a young age
2
 
Anonymous
@Cyoce That's because strings are iterables, and len is a global operation on all iterables.
 
iirc strings do technically have __len__ but there's no reason to use it, and it's stored inconveniently anyway
 
@Mego I know. It should be an attribute inherited from the iterable class
 
Anonymous
It is
 
then it should be treated as such
 
Anonymous
11:35 PM
str.__len__ is the internal method. The public interface is len(str)
 
but that's the stupid design decision
 
Anonymous
It's a different spelling of the same thing
 
Anonymous
Why is it stupid?
 
@undergroundmonorail I taught Jolf to use emotion. Thus, it cannot unleash its full potential and win.
 
as previously stated in the arguments argument (ha ha), it makes sense to have the object (in this case, the string) first, and then what operation you are performing on it. i.e. string.length
 
Anonymous
11:36 PM
Why?
 
Sounds like how Julia does things. For a composite type, you can reference a field like object.fieldname, but for most composite types there are accessor functions, like fieldname(object), that are preferred.
 
No unary increment :( s++
 
I will not let my child be raised by the likes of you, if you seek to de-emotion them!
 
yes
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ That's because s++ would be ambiguous on basically all objects
 
11:37 PM
Emotionally repressed languages
 
@VoteToClose BUT IT WOULD HELP SO MUCH FOR NUMBERS >:|
 
and += isn't?
 
Anonymous
Nope, because you are specifying exactly what to add to it
 
Anonymous
Explicit is better than implicit
 
Is julia oop?
 
11:38 PM
@VoteToClose Keep xer close, xe will be attacked. Defend xer at all costs!
 
@flawr Multiparadigm
 
@Mego that is how Java was born. shudder
 
this might be because i've used python so much, but in my head if str.len > 5 reads as "if the string has a length of more than 5" while if len(str) > 5 reads as "if the length of the string is more than 5" and the latter is less awkward to me
 
Anonymous
@Cyoce You confuse explicit with verbose
 
@Cyoce Implicit is better than explicit. That is how JavaScript was born. shudder
 
Anonymous
11:39 PM
There is nothing wrong with str.length. There is also nothing wrong with len(str). Neither is better than the other.
 
@flawr Don't change the subject.
 
@Mego explicitly stating something is inherently more verbose
 
@Mego I agree with this.
 
++        Implicit
+=        Explicit
.add()    Verbose
 
Anonymous
^
 
11:40 PM
space_level * " " or " " * space_level?
 
Anonymous
@AlexA. you summed up what I was about to try to type very well
 
@Mego Glad I could help
 
But Explicit is more verbose than implicit, is cyoce's point.
 
Is Vitsy more of a masculine or femenine name?
 
Feminine
For sure
 
11:41 PM
@flawr as i understand it, basically all web development is built on "if the programmer makes a mistake we don't want it to break the whole website, so try to figure out what they meant" which is noble in theory but god awful in practice
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Either tbh, though naturally I lean towards the latter because Python
 
@VoteToClose Feminine, but can go either.
@Mego That's what I thought.
thanks
 
@VoteToClose Neutrum, for sure!
Das Vitsy
 
Anonymous
It should be commutative, because a*b is normally commutative.
 
Anonymous
So really the answer is both
 
11:42 PM
One! The other! Both! Why not!
 
Interestingly, on Mobile, chunks of @Doᴡɴɢᴏᴀᴛname are unloaded. I just see @DoNG.
 
fonts
who needs 'em
 
Anonymous
$ python -c 'print 3*"foo"'
foofoofoo
 
Jan 2 at 10:24, by undergroundmonorail
haha "dong"
 
Anonymous
$ python -c 'print "foo"*3'
foofoofoo
 
11:43 PM
...
 
@AlexA. (new Adder<Integer>()).addingStream.add(i,1);
 
Anonymous
Good language design: a*b is commutative
 
@Mego Yup!
Unless if its a golfing language.
 
@flawr Oh god
 
Anonymous
* is commutative in Seriously also
 
11:43 PM
Also, that can be golfed down one way, not the other.
 
@AlexA. Java is king!
 
King of what?
 
Anonymous
@flawr AdderFactory.createAdder<Integer, Integer, Integer>().add(i,1).result<Integer>();
 
print"foo"*3 vs. print 3*"foo"
 
Anonymous
"foo"3* vs 3"foo"*
 
11:45 PM
Java is the king of tears and sadness
 
I'm the prince. ;c
 
@Mego That is why I like Java so much.
 
vtc = guy confirmed
 
Anonymous
That's not even Java; that's overuse of verbose design patterns
 
Anonymous
Factory pattern is useful when used correctly and causes homocidal tendencies when it's not
 
11:46 PM
Wow. I don't see why you want to know this so dearly.
 
@Mego "overuse of verbose design patterns" is the very definition of Java
 
@VoteToClose curiosity.
 
I never understood what design patterns are. Is there a TL;DR?
 
Anonymous
@Cyoce Weren't you arguing about Python being bad?
 
11:47 PM
Plus, half the people in chat have heard my deep, melodious, crackling voice.
 
Anonymous
@flawr Do code this way, regardless of the language
 
oh lol
+1 for including the last comma tho
 
@Mego python being bad and Java being bad are in no way mutually exclusive
 
@Cyoce That's AppleScript, actually.
 
I learned recently that one cannot convert a string to lowercase in APL without using Dyalog APL to call a Windows system DLL.
 
Anonymous
Factory pattern: you have a bunch of different classes that all do somewhat-similar things, and you need to select one based on parameters. So, you create a shared interface for the classes, and create a class (the factory) that creates the appropriate object based on the parameters and returns it as an instance of the interface for polymorphism fun.
 
Anonymous
@Cyoce You were giving reasons why Python is bad, and I was making you justify your reasons. You went quiet, so I assumed you gave up.
 
the first result when googling "overuse of verbose design patterns" is Java
 
@Mego That sounds really fun.
 
Anonymous
Java is not to blame for overusing verbose design patterns; you just see a lot more Java code that does overuse them
 
Anonymous
11:51 PM
You can abuse the factory pattern in C++, Python, or any language that supports OOP
 
PHP!
 
Anonymous
I said language, not murder weapon :P
 
lol
 
roflgolfer
 
Anonymous
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
 
11:54 PM
I'm working on a comic strip entitled "If Esoteric Languages were a family"
 
Anonymous
How to code gud
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ If Seriously isn't licking the window I'm gonna be sad
 
@Mego Seriously? XD
I haven't drawn much.
Why should it be? :/
 
> Complex is better than Hamiltonian.
 
brainfuck is the popular kid that everyone loves except its siblings
 
Anonymous
11:55 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ Great in theory, terrible in implementation. It often ends up licking the window rather than solving the problem golfily.
 
@flawr Yes.
 
@Mego Ah, nice.
@Cyoce Noted.
Jelly is the 7-year old making a calculator from toe jam.
 
lol
 
I hope you include javagony=)
 
@flawr I'm including just about any I can get ideas for.
Please, pitch in!
 
11:58 PM
Hexagony
 
Anonymous
Hexagony is tying its own shoelaces to the fan
 
Anonymous
Or giving itself a wedgie/swirley
 
Hexagony is an emo, nobody understands it.
 
@Mego with all six hands
 
HQ9+ is the quintessential underachiever
 
11:58 PM
golfscript is the drunk uncle who was a great athlete but got old and now they're bitter about the young blood taking their place
 
Anonymous
in PPCG Code Snippet Chat Bot, 28 secs ago, by Alex A.
You could just make a TNB announcement like, "YO! Wanna eval all the shit? Come on down to PPCG Code Snippet Chat Bot, the coolest damn room in town! We got Data from Staaaaaar Treeeeeeeeek"
 
¯\_(ツ)_/¯
 

« first day (1829 days earlier)      last day (3014 days later) »