« first day (3756 days earlier)      last day (1079 days later) » 

1:00 PM
@StackMeter nah that's probably me
 
@lyxal java.util.Arrays.stream(arr)
 
I'll probably end up switching to some sort of for loop anyway because empty objects
 
you can use Stream::filter to get rid of them
 
@lyxal Arrays.stream(doctors).map(Doctor::getName).toArray(String[]::new) may be nicer
 
idk that's still Java.
 
1:02 PM
lol
 
oh yeah i forgot about that
 
doctors.map(_.name) if you're using Scala
 
Funny thing is that it's way too late to be javaing right now
 
Yeah, like a decade too late :P
 
Try telling that to my university
Making first year students do Java because oop
 
1:05 PM
I hate that everyone hates OOP because it's so overdone :(
 
I don't really hate OOP. It's just noone really does OOP, they do this sort of half remembered OOP which is awful.
 
tacit > everything else
 
I do hate Java though.
 
:( It's really not a bad language, just really boilerplatey
 
@hyper-neutrino stack based > tacit ⌍p
 
1:07 PM
No Java really is a bad language.
 
i don't really have an opinion on oop but ^^^^ (have to use it though lol)
 
You can use ^ instead, golfing your message by 3 bytes
 
@lyxal i like tacit better i just made yuno stack based to minimize the chance of me messing up the implementation and also because it's easier
 
null is a commonly cited issue, which is big. But also Java's almost strong typing is an absolute mess.
 
one thing i hate is how Arrays.asList turns a String[] into a List<String> but int[] into List<int[]>
 
1:10 PM
...
 
0
A: Sandbox for Proposed Challenges

Wheat WizardImplement a function \$f\$ (as a function or complete program), such that \$ \displaystyle\lim_{n\rightarrow \infty} f(n) \$ Is not a computable number. Answers will be scored in bytes with fewer bytes being better. IO formats Your answer may be in any of the following formats A program or funct...

 
what does it even do to produce a List<int[]>
does it wrap the array in a one-element list
 
o/
 
or does it wrap each element of the list as a one-element array
 
@hyper-neutrino Yeah, Java's varargs are weird
 
1:11 PM
@WheatWizard are you ever going to make a challenge that doesn't require 400 IQ and a phd to understand? :D
 
just a bit late today for redwolf's leaving :)
 
@hyper-neutrino The thing is that asList takes ...T, and String[] can be turned into ...String, but int[] can't be turned into ...int because int isn't a subclass of Object. Since int[] is an Object, it interprets that as ...int[]
 
@rak1507 Legend has it I already have.
 
Not convinced
 
@user so if you had boxed Integers instead, it would work as intended
 
1:14 PM
Yeah
 
or is it just Int
totally forgot
 
I don't like that a T[] can be used as varargs directly instead of using something like * or ... to explicitly indicate that it's not a single argument
@UnrelatedString No you were right before
 
how did people decide to teach java in schools instead of something sensible like uhhh
 
Scala
ducks
 
1:16 PM
Well, lots of people teach using Python, but Java is considered an enterprise language and so is useful to learn, i guess
 
@user mhm. i know why it works that way but why can't generics use primitives or why can't it autocast lol
 
Java had an enormous brand name back in the day.
 
it's hard to think of a truly sensible language that's also oop-pilled enough for that crowd
 
@hyper-neutrino Project Valhalla is working on that
 
especially since you can't cast arrays
 
1:16 PM
@hyper-neutrino Yeah, that sucks too
 
just teach haskell in math classes
 
@UnrelatedString there is ruby
 
@UnrelatedString Or APL
 
Or some heavenly mix of Haskell and APL
 
1:17 PM
to apl not ruby
 
haskell would be a great language to teach
 
pushes a load of other languages into the mix
 
@UnrelatedString *cough*
 
@Wezl woah i thought this was archived
 
1:18 PM
@Wezl That looks really interesting
 
I think Kotlin is a viable alternative to Java. It is not nearly as awful and pretty flexible as a language.
 
i do not know much about ruby but i don't think it places extreme enough emphasis on inheritance and encapsulation and whatever the other words are that computer science education thinks are of some profound importance
 
^ (To WheatWizard)
 
yeah kotlin seems nice
 
I also like that Kotlin discourages overuse of inheritance by making stuff final by default
 
1:20 PM
ooh
 
But I also think that the functional approach of Haskell is intuitive making it a good entry point into computer programming.
 
Makes it easy to avoid mutability while still staying close to Java
@WheatWizard "intuitive" :P
 
the only thing people find confusing about haskell is IO which is just because it's different and taught badly
 
first class functions and the point of monads are not that intuitive
 
I've been trying to learn Haskell for a couple months and still haven't the faintest idea how monads or even functors work
 
1:21 PM
I think Haskell is confusing mostly to people who already have an idea of what programming is. Haskell rebuffs that assumption.
 
@Wezl Yeah, a beginner programmer might be better off with, say, Python
 
@Wezl first class functions are perfectly intuitive, a function takes another function! easy
 
there's a certain extent to which the more imperative something is the more intuitive it is to someone with no experience whatsoever but the more things you're doing imperatively the harder it is to actually reason about them
 
I would say imperative things aren't necessarily intuitive to people with no experience
 
@user groans aggressively
 
1:22 PM
everyone just thinks they are because that's the assumption everyone has made
 
@rak1507 I'd say most non-programmers and non-mathematicians don't really have a great understanding of functions (at least, I didn't)
 
functional would be more intuitive to someone with experience in mathematics and nothing else
 
^
@Wezl grins sadistically
 
Most people have very little memory of how hard it was to learn programming, so when they have to learn everything a new way in Haskell, without being able to rely on their existing knowledge it seems really hard, when it really is no harder than any thing they have been working with.
 
you don't need maths experience:
a function is a thing that takes inputs and outputs something as a result
you can feed functions into other functions
ez
 
1:23 PM
and you would certainly hope that students in schools are comfortable with mathematical ideas
 
Yeah, and a monad is a monoid on the category of endofunctors.
 
python probably the safest language to teach tbh
 
ez pz
 
nothing esoteric about that no sir
 
lol
 
1:24 PM
@rak1507 Lol I didn't even understand normal functions (i.e., functions taking values as input) at first, teaching me higher-order functions would've driven me crazy
 
I really disaggree that python is a good idea to teach.
 
oh yeah aren't haskell monads not quite actual category theoretical monads because of bottom being bottom
 
@user you were probably taught it badly
 
befunge is a very intuitive language
 
@rak1507 You dare disrespect Khan Academy? :P
@Wezl ...
 
1:24 PM
yeah as pseudocodey as python is it's super involved if you look past that
 
@UnrelatedString Nothing in Haskell is really Category theoretic pure, since Hask is not a category.
Program in Agda instead.
 
that too
 
I have some vague recollection of function-esque flow diagrams in early on maths, that translates to (pure) functions easily
 
All programs must halt!
 
Wait what
I thought Agda was Turing complete (or can you be TC while also always halting?)
 
1:25 PM
Agda is not TC.
 
you could teach a total beginner how to do some things in python
but it's a lot harder to actually teach them python
 
Oh
 
@Wezl and whlplash will be a (successful) attempt to make it modern enough to be taught in schools everywhere!
 
and if you give them that surface level knowledge then everything else is just deep magic instead of something they can reason about
 
@UnrelatedString Right, but Python should only be a tool for teaching the very basics. It's pretty easy to teach - I made a small tutorial with no difficulty
 
1:26 PM
@Wezl GH not codeberg?
 
For intermediate-level stuff, a different language would be better
 
in the end nothing shall beat basic
 
BURN THE WITCH!
 
i wonder if there's any BASIC that has regex
 
@rak1507 only for collaboration purposes
 
1:27 PM
Having been a CS tutor for classes taught in Python, and Haskell. I can say that I did not see a significant difference in the difficulty students had with either language. Learning to program is hard.
 
@Wezl fair enough
 
interesting
 
@WheatWizard Were they already experienced in programming, or were they new to it?
 
BASIC is the best no cap
 
Someone kick Razetime :P
 
1:28 PM
Morning everyone!
 
o/
 
logically, everyone should start with prolog
 
prolog's not that unintuitive
 
@UnrelatedString true
 
@user Mostly new to it. Different students had different levels of experience, but mostly new to it.
 
1:28 PM
prolog's ok but there are a few things that would be confusing
 
Prolog's types are awful.
 
@WheatWizard That's interesting
 
@Wezl SQL is more intuitive than prolog imo
but prolog is indeed very cool
 
I went into prolog wondering how you use anything that's not a boolean, but that was just a bad assumption from prior experience with other languages
 
i feel like sql has a hell of a lot more weird shit to worry about than prolog
where prolog at its core is just
predicates
 
1:30 PM
One weird thing about Prolog is how there's predicates that have effects (write and friends)
 
Cuts are also pretty hard to get.
 
I've had mixed success showing prolog to non-programmers (better than other languages, though maybe I just tried harder)
 
They require understanding how Prolog resolves predicates.
 
i still don't know what soft cuts do
 
1:30 PM
@WheatWizard but they're not necessary
 
I feel like prolog requires more understanding of the underlying implementation than other high level languages
which is bad for new programmers
 
@rak1507 <
 
@UnrelatedString sepaking of predicates I am a bit confused on how to approach the abecedarian question in brachylog
 
<?
 
^, but for your message, so sideways
 
1:31 PM
oh
 
@Razetime i'd say let's take this to the brachylog room if it wasn't frozen
uhh
 
@rak1507 My genius scares me sometimes
 
i already forgot what that challenge's spec is
 
@UnrelatedString lool
 
You want me to unfreeze the room?
 
1:32 PM
Nothing is more bad than SQL, we can take comfort in that fact
 
it's filter a list to words that contain only alphabetical characters and are sorted case insensitive right
nah
 
Have you heard of Javascript?
 
@RedwolfPrograms s/SQL/python/# ftfy :)
 
@WheatWizard nah we'll use prolog room
 
it would not remain unfrozen for long lmao
 
1:33 PM
@Wezl You know you're being irrational when you despise Python more than SQL
:P
 
I haven't tried SQL
 
s/SQL/SQL sucks
 
Python is bad but at least it's somewhat similar to other languages so you can sort of understand pretty much any Python code
 
@Wezl Good, stay pure
@RedwolfPrograms What's so bad about Python (aside from signifcant whitespace)
 
Ehh, it's just weird
 
1:34 PM
SQL is a beautiful language. The lack of case sensitivity has to be my favorite part about it - you can truly express how you're feeling with the language. If I'm angry, I can shout. If I'm calm, I can talk normally or even whisper. It's almost like a form of art.
6
 
run that regex
and enjoy recursion
 
@hyper-neutrino sElEcT
 
that too
 
This may not be the most rational opinion since I am currently writing python code for work. But I prefer SQL over Python. Python is an abomination on this earth.
 
@user no TCO, horrible inconsistency, tuples, bloated, hype, slow
 
1:36 PM
I like everything about Python except the Python part
 
@WheatWizard SQL is much more of an abomination
 
Python is crisp, clean, and versatile
 
INNER JOIN is directly wired into my brain's pain receptors
 
@Wezl It's not used for stuff where performance is important anyway, and I don't see the problem with tuples
 
@user TYPES! It's type system is extremely poor. It makes undebuggable messes almost guarenteed.
 
1:37 PM
duck typing ftw
 
Then you have SQL which can do no more than edit arrays
 
@user they're useless but still included, which is grounds enough for evisceration
 
@WheatWizard Meh, way better than JS :P
 
It's hardly even a programming language
 
@Wezl I don't see how they're useless. You could use lists, but those are mutable
 
1:38 PM
python is only bearable if you enforce good type standards on yourself
 
SQL is turing complete I think but nobody will ever understand enough to prove it
 
@Wezl how are they useless tho
 
I have nightmares that there is an easily avoidable type error hiding on some yet unexecuted line of python code that will cause a severe outage when encountered.
 
@RedwolfPrograms u C
It's not even TC
 
you can easily go 'oooh what if I made this function take a list and an int?' and once you go down that path there's no return
 
1:38 PM
that's too much for me
 
@hyper-neutrino you can use lists
 
@user Yes, but that's not a very high bar to cross.
 
yeah but those are mutable
 
@rak1507 There's a union type
 
@rak1507 it's easy
just use a for loop
and then you can do what you like with the list, int or lint
 
1:39 PM
the point is it's very easy to end up in a situation where you have lots of different types floating around
 
I don't understand why some of python's stuff like "".join is like a method and some like len are like a function
 
Fair enough, but that's a problem with any dynamically typed language
 
Go full JS or go home
 
@rak1507 The problem is that nothing is checked at compile time. So a silly mistake can make it all the way to production. Simple errors at the level of types should not make it past compilation.
 
I think I'll go homr
 
1:40 PM
@user yes, which is why they're all bad
 
@rak1507 this is a problem in every language
 
@RedwolfPrograms <
 
@rak1507 You're a traitor to APL :P
@StackMeter Not really, no
 
@StackMeter no it isn't
 
every language have stupid types that are confusing
 
1:40 PM
no, they don't
 
Some languages can be quite safe if they compile
@StackMeter Nah, just look at brainf*ck
 
Python's just a scapegoat here
 
Python's not a scapegoat it's pure evil I tell you
 
@user every mainstream language
 
@RedwolfPrograms Says the JS worshipper
2
 
1:41 PM
@user ikr
 
Python is like the most popular programing language in the world. I think it is fine to pick on its flaws.
 
@StackMeter Nah, just look at brainf*ck :P
 
@user bf is not mainstream
 
i like python's simplicity but pretty much everything else about it is at best strange
 
@StackMeter But really, there's Haskell, Scala, Rust, and loads of great languages
 
1:41 PM
JS is good in some ways and bad in others, but mostly good once you use it long enough you forget how to feel pain
 
@StackMeter I was kidding
 
python < ruby <= js < smalltalk < lisp < scheme < what I'm about to make next week
 
@RedwolfPrograms lol
@Wezl s/</>
 
@Wezl excuse me why is ruby there
 
@RedwolfPrograms Yeah, you also forget how to feel happiness
@Razetime Dynamic, and whitespace
 
1:42 PM
@user we don't do that here
 
JS pain is different from SQL pain...JS pain is sharp but quickly subsides, SQL pain is like a boulder on your arm and you have to either keep feeling pain or cut off the affected part and ask someone for help
 
@user whitespace?
 
@StackMeter sed: -e expression #1, char 5: unterminated `s' command
 
@hyper-neutrino Do what, feel happiness?
@Razetime It can use newlines instead of semicolons, right? Wezl thinks that's a bad thing
 
@RedwolfPrograms python is like having a genetic disease that is fine now but 5 years later randomly kills you because you accidentally passed the wrong type into something except because of duck typing it was never noticed
 
1:43 PM
oh ok
 
@user yes
 
@hyper-neutrino You really need a therapist
 
yeah semicolons are optional so on and so forth
 
Walks like an int, quacks like an int, must be a duck
 
@Wezl oops gotta make it s/</>/#
though SQL does like nothing
 
1:44 PM
If it walks like a duck, quacks like a duck, and looks like a duck, it's either a duck or a Proxy pretending to be a duck
 
Python ain't perfect, but it's sure better than SQL, that "programming language"
 
Doesn't walk or quack, must be an object
 
@StackMeter Not very high standards :P (although this is comparing apples to oranges)
 
The problem with python is that if you program in it long enough its flaws just sink in the the background and you start think Python is good. But if you program in a language that is actually good each little flaw sticks out like a sore thumb and you keep wishing for something better, something with more power and elegance. Then one day you snap back to realize you are using a theorem prover to grep for files.
10
 
@user It's not, but my languages gotta be TC
 
1:47 PM
@ROs want to make a different room to shove this stuff?
 
If SQL were TC that's one step closer to self aware and if SQL is released upon the world we have no hope
 
@WheatWizard yes, but if you program in C++ or Java (or even Javascript), have fun forgetting keywords like your keys when you go to work
 
@Wezl It's relevant enough to CGCC IMO
More on topic than peanut butter
That's the bar we've set :p
 
@StackMeter I know, just saying that it's an unfair comparison (although I dislike SQL myself)
 
@Razetime because it's a dynamically typed inferior version of lisp too
 
1:48 PM
I used python to make a game
 
me too
 
SELECT (1 + 2)
Why is that the correct syntax
 
lol, the first concrete example
 
@Wezl huh
 
@RedwolfPrograms becuase brackets
 
1:49 PM
The parentheses are optional
Not sure what you mean
 
@RedwolfPrograms Why is t h a t the co rrect s yntax? Because miracles still happen :P
 
SELECT Cast(1 As cHaR)
Don't worry though, if you aren't absolutely sure you've selected something...SELECT (SELECT 1 + 2)
SELECT(SELECT(SELECT(SELECT(SELECT(SELECT(SELECT(SELECT (SELECT 1 + 2))))))))
 
lol
 
Every time I see a +10 I'm excited because I'm one upvote away from 12k, but it's always on meta :/
 
suffering from success (not really)
 
1:58 PM
@RedwolfPrograms my array is [0, 0, 0, 4, 5, 6, 7, 8, 9, 10, 11], and you just got trolled
 
i don't think that's how select works
 
@hyper-neutrino it selects the item at the index, does it not
 
Not at all lol
That's just plain old 1 + 2
 
i'm not sure exactly what select does but i'm certain that's not how it works here
do arrays even exist in sql
 

« first day (3756 days earlier)      last day (1079 days later) »