#dev-general
1 messages ยท Page 277 of 1
Oh, likely not
uhhhhh
the answers are arithmetic/comparison/logical arithmetic/comparision logical arithmetic :))
Probably just logical
yea
O.o
what is hs
@old wyvern https://bit.ly/2NzUwOV
im so glad you asked
uh
haskell is a purely functional programming language
with a modern pragmatic syntax and support for advanced functional features such as Monads, Monoids, Functors, Type classes, and more
um what?
loud
lol
Mate
what is a monad, a monoid, a functor, and type classes?

i know a monad is like a holder
I think Java Optional is technically a monad
but
ยฏ_(ใ)_/ยฏ
i wont even ask what a holder and optional is
There are some great recursive definitions for those terms
or that
๐
But I honestly don't remember them either
aww
Head empty
A functor is a design pattern inspired by the definition from category theory, that allows for a generic type to apply a function inside without changing the structure of the generic type.
Category theory monkaW
what is the category theory
scary
Scary mathematics
Category theory formalizes mathematical structure and its concepts in terms of a labeled directed graph called a category, whose nodes are called objects, and whose labelled directed edges are called arrows
Oh god
Is it connected to algebra? I honestly had no idea what category theory actually is to this day
idk
i think so
kind of
i read a blog about it ages ago and didnt understand anything
Unfortunately like none of the german names for algebraic objects match the english ones
That really triggers me
๐ฅฒ
Ah yeah it's part of algebra
Now to find out what "group", "ring" and "body" actually are in english

ok group and ring are called the same
"body" is "field"
why
hopefully in a few weeks I'll know more about category theory
bought a book a few days ago
oh nice
academic books are stupid expensive though
I found a used copy fortunately with a decent price
"Types and Programming Languages"
jesus ยฃ52 for a digital edition
regular price is like 125โฌ PepeLaugh
๐ณ
โฌ what currency is that?
euro
o
lol
i need to get that UML Diagram
Did you apply?
what is uml?
yeah
lol
they were like
"We will reply anywhere between 1 hour and the next 29 days"
ohhh that
OS license 
๐คฃ
๐ฎ
Unified Modelling Lang
link?
Basically a diagram that shows how classes work with each other
btw if I do Player#sendMessage("a\nb"); will they be newlines?
Do you the OS license matt?
Yeah, all IDEs for free
Damn, nice
am I too java noob to apply?
Which project?
MF
The cmd one?
All of them, i think i linked everything
Should have applied for more contributors, then i could give license to people that help
o.o
For example you helped on the msg lib ;p
my project isn't 3 months old :C
Wait when?
how long does it take usually for them to reply
my 3 month old projects are abandoned or horrible
hmm
oh wait the initial parsing thing right?
Did you apply for the github one?
yea
with documents or email?
When did you apply?
oh rip let me guess email takes ass long
No
like a couple days ago
I got mine the next day
You wont get a mail I think
just check your github profile
It will show the pro badge
xD
Bruh
You already got it
Ooh that's what the PRO thing means
Cool ig lol never knew what it was for and why I have that too lmao
lol
ayy
Hmmm
very weird
Images on github doesnt seem to load for me
unless on a VPN
๐
It's actually not that expensive for all the products
ah
thats eXpEnSivE
yearly tho
python IDLE ftw
Everywhere I go, I miss Rust's enums
So elegant. Lately I've been working Typescript which I think is a great language. But without Rust's enums, I feel clumsy.
Kotlin. C++. Java.
I just miss Rust's enums. Wherever I go.
To get them all individually it would be $1248 a year
Whenever I fall asleep, parentheses start popping in my head. I need parentheses, I long for parentheses
๐คฃ

Oh no, you're suffering from the lisp disease
It's recommended to take around 4 hours of clojure a day to ease the symptoms
Have you tried Haskell?
Haskell isn't something you try. It's a multi-year pilgrimage to the functional programming holy-land.
Once you've chosen Haskell, there's no way back.
wait no I got that wrong
You don't choose Haskell, Haskell chooses you
or something
lmfao I just started checking r/pcj
where else would it be from lmao?
xD
tf do I know, I just didn't realise you got it from there
Also technically haskell's functional calling is lisp without the outermost parenthesis
but the daily visit to that subreddit doesn't disappoint
๐ฅฒ
just... no
It is tho
Wait wdym by "functional calling"
I just mean its style of calling functions
like a lot others, uh f# has a simialr style I think
fun arg1 arg2
well it comes from lambda calculus, doesn't have a lot to do with lisp
Yea, but it becomes more apparent with inner functions
no I meant like when you have functions as arguments
funA arg1 (funB a b)
something like this
Yes
And most lisps don't have native currying
But it pretty much ends up with just how lisps are in there tho?
yea I didnt mean that part john
I just meant that syntax
The parethesis and prefix functions
I havent used lisps enough to compare with anything more than that
over an hour of downloading compiling and installing haskell libraries and it's still not done ๐ฅฒ
๐ฌ
I really want to find that haskell-lisp again
which one?
There is a horrendous language out there trying to combine haskell and lisp
But I have forgotten what it's called
o.o
And I've also forgotten who linked me to it
?
lol
it's got to be one of those 2
Was from there
yea probably
This one actually ^
Haskell Semantics with Lisp Syntax
They have a short description on the wiki link
From the ILC 2007 paper: "Liskell uses an extremely minimalistic parse tree and shifts syntactic classification of parse tree parts to a later compiler stage to give parse tree transformers the opportunity to rewrite the parse trees being compiled. These transformers can be user supplied and loaded dynamically into the compiler to extend the language." Has not received attention for a while, though the author has stated that he continues to think about it and has future plans for it.
you barely need anything
learning rust ๐คค
Isnt the main installation a few GBs?
mhm
cargo build
cargo.toml yeet
oh nothing else at all?
rust's syntax is a nice compromise between python-style readability and C-style coolness

me like
words cannot express how beautiful the lifetime syntax is
lifetime?
like... the tv network?
the sheer emotion i see from <'a> is better than heroin
You've had heroin?
wait that doesnt make sense
Now does it
let me reword that
xD
you had heroin?
nah
Yeah I couldn't live without 300 's and <>s and :: in one line
calls police
C++ is just * and & and ::
I wish
cocaine tho..
the sheer elation i get from seeing the code <'a> and knowing my code is 100% memory safe is greater than any drug
for legal reasons that was a joke 
and when i write C++ i write it like
int main(urmum* sucks)
{
}
C++ is unfortunately so complex you can't even parse it properly (not an exaggeration)
&mut self ๐คค ๐
when i do
public void yeet onYeet(Blah bla) {
}
you can't even parse it properly (not an exaggeration)
Wait what?
would be nice if rust's convention was allman
ew
but i guess nothing is perfect
no
i love go but the lack of an overcomplicated lifetime system is really holding it back
xD
ah fair point, its too simplistic
yes!
allman bad
not enough compiler errors!
me no like allman
ikr!
i like the linux style
Altho the last runtime error that I saw in Go still doesnt make sense ๐
๐
In computer programming, an indentation style is a convention governing the indentation of blocks of code to convey program structure. This article largely addresses the free-form languages, such as C and its descendants, but can be (and often is) applied to most other programming languages (especially those in the curly bracket family), where w...
The syntax is so convoluted you can count the feature complete C++ parsers out there on one hand
Figure on 10 man-years to do a correct C++ parser, and that's if you're an experienced compiler guy.
๐ lmao
hmmm
C++ was originally gonna be called C with classes
you dont even need 1 hand to count the feature complete elara compilers
i wonder why
what does this mean?
ELARA GOAT
it was, wasn't it?
but what i dont get, what does C# have to do with the C family?
hence the extension .cc
mhm
the term c family is very broad, java is typically considered part of it too
it's loosely based on C syntax and has C in the name
Just the syntax, really
yea lol
c# is also closely based on java ๐ฅฒ
why didn't they call it J# then?
Very
not enough Smalltalk family languages imo
Not sure
then kotlin could be called J++
let's not
xD
uniformity my dude
Have you looked at Smalltalk? @prisma wave
briefly
COMPLETELY object oriented ๐
PURE oop
That just means no primitive right?
everything is object
seems like it would be an interesting language to learn
I only have a very basic understanding of the concepts but I've actually never tried it
i think the smalltalk definition of OOP is different to the modern one
The next circlejerk should be COBOL ๐
๐
Someone shoot me in the head before that happens
๐ฅฒ
circlejerking about COBOL probably violates some human rights act
the cpp subreddit is great
(parser discussion)
As others are saying, there's really nothing you can do here that's within an order of magnitude of being a student project's worth of work. My advice?
Google "most vexing parse".
Reread it a few time until you're on the verge of tears.
Realize that the entire language is full of things like this (Partial specialization, Koenig lookup, dependent name lookup, etc., etc., etc...).
Come up with a new project idea.
good morning
Dijkstra has by far the best comments
absolutely
xD
a classic
What's worse?
A COBOL user
A 1.7 user
Nah bro ever since the C update the compiling mechanics suck
Make a discordsrv addon that detects when someone is live on twitch and is playing on the server. Able to announce it in discord / in-game
let me just make an A.I that watches
the pixels on the screen
records everything the streamer say
1.7
to see if he's playing on the server
are you sure
One thing I've realised is that most people cannot differentiate between trivial and essentially impossible programming tasks
and by people I mean non-programmers
"can't you just download an API or SDK to do this impossible task?"
Their mind is blown when you call one function but they don't understand why you can't just make an AI that does their homework
well
why just don't do it right?
This A.I. can answer any question & it's very creepy http://samsayssweetsounds.com
PLEASE SUBSCRIBE FOR MORE SEFD SCIENCE: http://sefdstuff.com/science
Table Of Contents
0:00 - Intro
0:13 - Backstory to Spooky A.I. Website
1:31 - Story resume
1:40 - A.I. definition
2:06 - How can I write impossible A.I. that knows everything?
2:11 - Supe...
I bet that bot can't parse c++
its actually a pretty smart thing and apparently it blew on tik tok xD
@prisma wave can I hire you?
I need someone to print Haskel Sucks in haskel.
with double l
I will do in the morning
please do it with no IO
If you interpret that wording differently, Technically you arent doing any IO tho ๐
?
please do it with no Input or Output
how is printing not IO
(defmacro print-at-source [arg]
(println arg))
(print-at-source "hello, world")```wow, a clojure program without IO at runtime
IO is not being done by the function in haskell, thats their "hack" to being fully pure or something, atleast thats what they said in the course. Its just evalutated to IO objects straight away and IO is somewhat passed in by some native program
๐
idc. As long as what it runs on is impure, the language is also impure
๐ฅฒ
so that means...
hate to break it to you but im a years long haskell expert
The diety
๐ฉ
๐ซ
But... but
the ivory tower has been destroyed ๐
Haskell...
No
Its purity shall remain
I shall not be corrupted by the impure minds
๐ฅฒ
I mean all the functions IN haskell are pure tho
the external factors are doing the impure work
Dear Haskal programmers,
you claim that your language is pure, yet I can print to the console.
Curious.
that only applies inside the functional language right?
๐
P U R ๐ E
๐ซ
๐ฅฒ
๐
how much does it general cost a frontend web dev (no js) for one page?
atleast 1p
I would offer to do it, but only if it was in React and React bootstrap only supports 4.5
I mean I guess bootstrap 4.5 is fine, how much would you charge
Oof i'm not sure
Otherwise where else is a good place to get someone to make this
Do you have the design for phones as well?
no
yeah ive got it all as a psd and theyre all seperate shapesi n that
nah looks fine
is making a REST API better if multiple applications are gonna use the same data, not just a website?
depends
REST APIs are usually useful when you're transferring data over HTTP(S) and only over HTTP(S)
the world if Arrays.asList("elem", otherList); worked
Required type:
List<String>
Provided:
List<Serializable>
no instance(s) of type variable(s) T exist so that T[] conforms to String
๐ฅฒ
get gud
let me guess "kotlin has a 1 liner for this"
something like listOf("elem", *otherList.toTypedArray()) maybe?
no
ridiculous
I mean can't you just transform the list to an array and it'll work?
ew
i guess i will have to suffer with my 4 liner
I mean it can still be a 1 liner
๐คจ
why do u hate urself
Do you want something like a cons or what 
yes
What does cons do
Returns a new seq where x is the first element and seq is
the rest.
(cons x seq)
which would be perfect
(cons "elem" list)
If you don't need it as a lazy sequence you can implement this very easily
oh?
are you in kotlin?
nah
make an own list class that just has head and tail as fields, head being an element and tail being another list
Show the lines BM
ok
hopefully this isnt proprietary
i wrote it so
List<String> schematics = new LinkedList<>();
schematics.add("all");
schematics.addAll(dlSpawn.getSpawnsConfig().getLocations().keySet());
return schematics;
ez
Mfw no data List a = Head a List a | Empty
It would be terrible
so idiomatic!
could it
Yes
ยฏ_(ใ)_/ยฏ
BM, why is that list not final tho!!!!!
๐
Now I gotta test something smh
literally anything would be easier in a language that isnt java
SonarLint: Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed.
SHUT UP
that was a joke
LinkedLists are terrible to implement in Rust
In fact so terrible that an entire book had to be written about it
kek
the ownership system doesn't like recursive data structures
oh great
wait to make a rest api with spring to i just go like
@RestController
@RequestMapping("/api")
public class UserController{
@Autowired userRepo
@GetMapping("/users")
public list (){
return userRepo.findAll()
}
or is there a better way
Where's the Factory!!!, also Aj, please for the love of god, fix that spacing
I typed it in discord....
Excuses!
it literally has public list()
public list (){
There should always be a space infront of {
Wrong
Burn the heretic
I just wanna know how to make rest api ๐ฅฒ
You can start by doing correct formatting !!!
is the above with correct formatting the right way to do it?
Speaking of formatting
:)
cos im looking @ this rn and if i have this for every object I have wont i have alot of duplicate code?
since each object will have more or less the same controller
yes ๐ฅฒ
I mean just have an abstract class?
If that would work even
hm
"forsty" 
because the repository would need to implement something
or do something
What happens if the base class has @RequestMapping and then the implementation has no RequestMapping but a GetMapping
ok i came up with this
public abstract class BaseController<T, S extends JpaRepository<T, Long>> {
private final S repo;
public BaseController(S repo) {
this.repo = repo;
}
@GetMapping
public List<T> getAll() {
return repo.findAll();
}
@GetMapping("/{id}")
public Optional<T> findById(@PathVariable("id") Long id) {
return repo.findById(id);
}
}
this just has the basic methods on it atm, obviously ill expand it....
but it seems to do the job
then I can just implement it like this
@RestController
@RequestMapping("/api/users")
public class UserController extends BaseController<User, UserRepository> {
public UserController(UserRepository repo) {
super(repo);
}
}
idk if theres a better way to do it but this works fine
idk what the fuck primitive means frosty i havent used java in ages
i know its like the lowercase one
idk what it does tho
prevents nullability
@steel heart Boutta smack you
I mean this is all managed by spring so it will never be null will it
such that a variable defined x of the primitive type int cannot be null instead the contract null -> 0 would apply
apparently type args cant be primitive
F
that isn't a type argument though?
idk
It has some similarities to a normal type inform of a class, you'd declare both the same way,
int x
Integer y
Or am I wrong now?
I don't understand what you're saying
what is "it" and what is "a normal type inform of a class"
primitive, and a class type (idk the notion of the right term for that)
reference type
you can't declare a primitive type, but yes, the variable declaration syntax does not change depending on the type
declaration syntax is probably a better name yeah
But isn't one meaning of declaring, to declare (create) a variable?

yes, but there is a difference between declaring a type and declaring a variable of that type
not formally yet, but I do know how it works yeah
I mean there isn't much to learn tbh, the harder thing is to actually fully understand it
hmm yeah I looked it up on wikipedia, seemed interesting but complicated to understand like you said, learning in university?
I will be learning it in uni, but before I get to that lecture I'll probably learn it by myself because my interest in theory has grown recently
In terms of syntax and semantics it's really just function declaration and application
so not hard to understand on a basic level
using it to prove stuff and whatnot is the scary thing
oo nice nice, wait what you study in uni btw?
The basis of almost all functional programming, Professor Graham Hutton explains Lambda Calculus.
http://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: http://bit.ly/nottscomputer
Computerphile is a sister project to Brady Har...
here's a good overview/basic primer
computer science
ah is it hard?
yeah it is
JPARepository<User, long>
I'm usually a quick learner and perform well in school-like settings but I am often at my limit here so I'd say yes
Is there a way to unlink my previous Discord account? I got a new one and want to verify this one.
hmm I consider taking cs in some years, need to finish regular school and stuff first sadly and sweden is very late with teaching stuff
definitely check the curricula of the unis you consider applying to
here in Germany it can vary quite a bit
and it's good to get an impression of what will come at you
I assume the first semesters are also very math-heavy in sweden
oh yeah definitively
In my case school didn't prepare me for this a single bit
almost everything was completely new to me
did your school have a cs subject?
yes
Well Idk if the binomial theorem and similar stuff is preparing for cs but presumably not
That initialised my interest in programming and had some practical topics like databases, networks, OOP (modeling), encryption
but none of the "pure maths"
man I wish my school had cs
same
although I love all the subjects i'm doing
only one I'd be willing to switch out is english but it's required
I guess the one thing that school teaches you is some parts of analysis
Differentiation was last week's topic in my analysis class, but that was the only thing I knew before to some degree so far
Yeah somewhat analysis perhaps
a lot more formalised of course, you know, not just "differentiate that function" anymore
I know barely nothing about differentiation functions or what's called sadly
or derivative
dunno what you call it in sweden but you definitely know it if you're like past grade 8
actually I will learn that next year I think
so it's taught in middle of college
weirdly enough
There is no time to wait! Ask your question @forest pecan!
i need help
There is no time to wait! Ask your question @forest pecan!
No you don't
There is no time to wait! Ask your question @forest pecan!
I do. there is this kid named Frosty which is chilling me ๐ฅถ
wdym how, it was like 10 years old
๐
can someone @ me in dms i got a question about a plugin ๐
Send it here
@half harness can you check under #general-plugins i sent it there ๐
Don't ask people to check your message, be patient
sorry ๐
im on a different device, should I use notepad or intellij to code xD
np
ok
microsoft word*
i dont think i have that installed
nvm i do
actually i just realized that I'd have to handle imports and stuff
so ima install intellij
somewhere in settings
settings > appearance and behaviour > theme
shouldnt be too hard to find lol
hmmm
update toolbox
ok its updating
yayyy
its there ๐
are the only community versions intellij and pycharm?
lol if there wasn't intellij community i'd be using eclipse
๐ซ
yes
do you have a school email address?
yes
u can get ij ultimate for free
along with all other jetbrains products
it's what most of us here use
that or the os edition (you can get an ultimate license if u have a popular os project, i.e. papi)
really?
yes
doesn't even need to be popular
o
gh education also offers a bunch of other stuff
credit on hosting services
free and discounted domains
heyy i can applyy ๐
lol really?
I highly recommend using gitkraken pro from the education pack, it's great
along with termius
definitely two of my favourite tools
yes! it recognizes my school lol
what should I put in "How do you plan to use GitHub" xD
hmmm
i want to put something good
something yummy
lol i just said 'learning'
u got accepted?
yh thats what i put
hm ok
I think acceptation is automatic
keep in mind u'll need to renew it every 2 years
it takes a few days
o
they don't notify you when you receive it mind you
oh?
yea
how do I know then?
yeah idk what the deal with that is
just check it all the time
you'll need to check your github profile page
just keep checking the site dkim
It would show the badge there
okay
oh yeah, if u keep checking ur github profile, the PRO badge will just appear
nah, just actively maintained, non-commercial etc
thats how i found out
ahhh im impatient now lol
that's good to know johnny
It may take a day
so if i wait 2 weeks and nothing happens im denied?
u also get clion for free
clion?
iwanio you get nearly everything for free
It probably wont dki
looks at my current discord activity
what lang?
rust

rust in clion
Clion is C and C++, but intellij has a rust plugin
and clion is apparently better with the rust plugin than intellij
weird
iwanio that can't be right
๐คท i got it for free idc
Both are supposed to be the same
Ultimate and Clion
meh whatever
ij ultimate can do everything all other jetbrains ides can do
mhm
o
wheres that from
Open-source Rust plugin for IntelliJ-based IDEs
well alrighty then
wait no that description slightly differs
here we go https://www.jetbrains.com/rust/
yeah ok that's just the rust plugin
but that doesn't work better in Clion I believe
me neither
yeah I just went through my school emails and found it
although looking at the date
this may be for the renewal
even though it's written like it's the first time
ahhh my cpu is at 93%
fn main() {
println!("Hello, world!");
}
``` very nice
Itโs good style to place the opening curly bracket on the same line as the function declaration, adding one space in between.
mmm yes
lovin' these docs already
lol
and go
mmm ill add that to the list
&mut ๐
ahhh
PepeLa
interesting
Lovely
Damn Matt
damn Matt you were right. its not as easy as I thought xD
I just pushed a commit from IJ and got every file removed except the main class xD
How did you manage to do that? xD
no idea.
the thing is I didn't clone the github I just copied the .git folder xD its weird. I gotta learn to use this first lmao
the project in my pc was very different from what I had before
and for some reason all my classes are marked with red in IJ xD https://i.imgur.com/dK0W8be.png
oh wait I think I know what I did xD
oh yeah
so for some reason they files were split in 2 categories, versioned and unversioned. no idea what that means, this is when you select what changed file to commit. And I've only selected the versioned ones.
and pushed just those
but I forgot to not push .idea .gradle and the build folder fuck
lmfao
whats so bad about pushing .idea and .gradle?
build folder i get
but whats so bad about the others
. files are supposed to be hidden
but theyre also specific to you
so
not necessary to push
thats why I always push those
xD
lmfao
please don't push .idea and .gradle
I swear my eyes will ๐คฎ when i see that
Please don't look in my github repos-
xD
Is there a way to prrmanently remove files?
from git history too.. or not possible? || ๐ฅฒ ||
I push everything, because I frankly don't give two shits 
nt rly
Frosty its okay you are already an abomination || jkjkjkjkjk dont ban pls ||
Delete the branch 
my commits though-
it looks so cool seeing "60 commits" ๐
u could re push the repo
like yeet the current one
then push
tho
u want github contributions probably
Wait you have things on Github? I thought you didn't want people stealing your code kekw
Lmao
I have learned || sorta not really ||
dkim ngl but you're the last person I'll steal the code from
Why would you 
Various Commands for Barry.
โข General Bot/Guild Commands
โข Miscellaneous Commands
โข XP and Level Commands
โข ChatReaction Help
here we go

Dabadee dabadie
Why do you love to spam?
oh damn now I'm going to listen to that song for 2 hours
o?
how
;-;
Just Blitz being Blitz
blitzzzzzzzzzzzzzzzzzzzz
You actually bamboozled me
noo blitz :C
oh wow blitz
here
so funneeh
fixed
hello dkim
how r u
how am I? I am just like that
what r u doing rn?
java pattern matching
We're zeroing in on a feature list for the next iteration of pattern matching, which includes:
- New kinds of patterns
- New place for patterns: switch
more @ https://t.co/VtOijtJ6oB
#OpenJDK #ProjectAmber
๐ฎ
wonder when the new java syntax will be so disconnected from java 8 that you essentially have two different programming languages
I love the dedication to the page design they put on, the css is beautiful
probably like java 23-ish
the pattern matching proposals look very different
and var, lambdas etc are very different to 7
We need extensions!!!!
java doesnt want extensions
apparently thats what default methods are supposed to be used for
??
Fucking idiots if you ask me
Yes
yes
Thats a lot of S's
i should have done that github student thing a while ago
thx @quiet depot
โค๏ธ
i didn't get an email tho
lol
go there
The namecheap one?
yes
Well its kinda weird. its only for github pages
:C
oof
Details 1 free year domain registration, 1 free year Advanced Security (SSL, privacy protection, and more).
The tech one allows any I believe
but yeah dkim go to the jetbrains section
jeez so many things
No idea, go check it out
y ei did
theres a link
I havent gone through all the offers
dkim press apply and then github
it is for confirmation, I guess?
is it bad to share?
YES TERMIUS
what even is termius
I just do ssh
i can get so many premium stuff ๐
mhm
