#ot1-perplexing-regexing
1 messages ยท Page 551 of 1

how are you out of them
i am 4-5 playlists as of now, and i listened to all of them 3-4 times
nvm, i got 200 song playlist
merged it into mine
if any of songs suck, i will just remove them while listening
~18 hours lol
Akarys would be glad.
not favourite
just added 200 songs now
will remove the ones i don't like while listening
What glad lol??
Gotchhaa
They, on multiple occasions, announced his liking towards The Weeknd.
i got like 5-6 on them
cool.
Yeh.
I love my playlist
It's full of charmness.
It depends on the task at hand
Some situations I would choose windows, others linux
Windows has much better app compatibility
smh no one likes centrists
While Linux has much better performance and, everything else
Elaborate?
Let's see the first point-
Battery life
Share your regards
For me Battery Life is Better in Windows
Not taht
Windows is more optimized in powee
Me AMD user
Can't say I'm familiar on the matter, but I would assume Linux is better due to less overhead
@mild trail Not an i3 processor
Linux is free, but the thing is, this feature makes it less attention taking by companies
Hence GPU companies don't provide good drivers for this stuff
Lemme elaborate a bit
So linux has to take load on GPU
Which is kinda unfair
I would disagree entirely
Well, to a degree
These GPU driver incompatibility makes the PC work a little bad
Yes it is often disregarded, but not in the sense that it's drivers are worse
Windows has much better drivers and app support
Well, due to incompatibility Load goes on Processor which start consuming battery
It's drivers are just as good, and due to the lower overhead your GPU can end up faster on Linux than in windwos
Ya it can
In battery consumption score windows average was 50 while Linux one were 57
That won't help
It's not the graphics
It's the drivers provided by the Manufacturer
Like my GPU driver
When I updated it, it suddenly started giving my PC problems
LoooooL
Hey @rough sapphire!
It looks like you tried to attach file type(s) that we do not allow (.sh). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a.
Feel free to ask in #community-meta if you think this is a mistake.
Cuz it wasn't too much compatible
But if I don't update my GPU my laptop shortens in battery life
GPU is responsible for all Interface load
Hence if GPU ain't compatible, then that load passes to other components like Processor
Then Processor struggles
Which leads to heating
So this time it is the driver problem
i am in
Yo can someone post this in another server
ima skip
Well sure Can you tell me where to send?
๐ who is working behind the scenes?
me.
can you send แฃแแข it?
just delete the message haha
Well Ok
hello to everyone here ๐
Well done.
is it on spotify?
Uhmm Yeah ofc
K
So you want it?
โ
Oii
.uwu catify
catify
Hello แฆแแข
.catify ๐
แกแแข ๐
your spotify username is "damn"? ๐ฏ
damn
Uhm yeah
Well wth? really?
@solemn leaf send graph pls
poggies
and the goverment is saying that they have successfully controlled it 
lol
yeah thats the ironic part.
And people after hearing this be like "aight imma head out"
most cases a country ever recorded on a particular day
.randomcase atleast the growth rate of the growth rate of the growth rate is negative
ATleASt THe GROWth raTE Of THe GrOwTH rate of ThE GrowTH Rate is nEGatIVE
srslly?
To be more precise
lmao
bruhhh
yes
look at the first rise.. it looks smol now
august part.
exactly
I remember when the scale was 200k
and it looked very big
lmfao
well... in a way it's better
everyone gets infected => everyone stops caring about covid => everything reopens :D
.randomcase yay 300k only new cases every day. No rise in rate of rate of cases
yAy 300K oNLY nEW caSeS EVeRy daY. No Rise IN RatE OF RaTE Of CASeS
lol
people die too so... "celebrate good times cmon"
"party like never before since were fucked anyways. only covid positive patients allowed to enter."
Next you know: Goverment says that was totally intended
lmfao
Calculated.
yess
i fricking hate covid
Covid is smart
the boards would have completed by now if not for it
I hate the people who say "I'm wearing a mask" but its on their chin
hmm.
These are just fun names that user suggest in https://github.com/python-discord/meta/discussions/85 with context.
(shouldn't be from that discussion)
Almost always within the server.
that's a proper usecase for masks :D
it protects the chin so nicely
haha
*cricket noises*
B)
LOL
I laughed at the message above lol
o
ok bro
damn
Source #voice-chat-text-0 message
:okbro:
are you sure about that
sympathy laughs
yes, totally :D
i wasn't... joking or anything
lmao
sad
america's population * 5 = India's
cool :D
eh if everyone got covid then the hospitals would have to shut down
also population density go brrr. since America has higher geographical area but lower population (comparatively ie)
lack of beds
exactly , compact settlement = more density
lmao
for everyone to get infected?
our goverment's plan of population control is ultra effective
i don't think it will take a year tbh
ayy lessgo
lol they are also dying
population increase not stonks
just stop testing ๐
no more cases recorded
2400 deaths/day not a joke
~~ thats how population control works ~~
that was totally intended bruh
sed
it was very well thought out
๐ democracy destroyed
i honestly can't tell if y'all being sarcastic or not
:noted:

Lol
So i wanna ask how does game dev work in other languages like C# or C++? In pygame you have a game loop, some variables and functions outside the game loop and the game loop refreshes the screen draws the stuff, do the logic ect. How do other languages do it?
I don't really have knowledge about gamedev in pure C#, but with unity:
unity handles all of that logic for you. all the programming you have to do is based on ECS (Entity Component System)
everything is an entity, the character, the environment, the camera, the light, etc
each of these has one/many scripts written in C# governing its behaviour
Generally speaking, there's always a game loop at the bottom, but like @acoustic moss says, some frameworks will abstract that away and give you some kind of system of callbacks where you can put game logic or rendering.
It's not really a matter of which language you use, but rather which framework/engine you use.
You could have an ECS framework in Python as well.
how do i enable dark mode on wikipedia ๐
Maybe this would be of help https://www.techowns.com/how-to-turn-on-dark-mode-on-wikipedia/
yo quick question: do servers have access to the email id connected to ur discord account
not that I am aware of
because that would be a huge problem
yeah, only thing that can see your email that isn't discord themselves are apps you have to explicitly allow
or anyone if you accidentally show it on stream/in a ss
yea
who is that cake for is the scary thought
who the hell is 3 million years old and eats birthday cakes
lol
r/unexpectedfactorial
The Doctor at 3 million years old
The dude sent this:
https://paste.hep.gg/roquk.json
I asked d.py and they don't support neither d.js
How can I achieve this?
.-.
I'd eat a bd cake at any age...
Does anyone know?
lmao
@open sentinel it hasn't been released yet
mm yes very funny otn much original, so humor
ha
Haha
How is it possible I have like 6 or 7 otn names and I haven't seen any of them in like 2 months
Lmao
lol
Iโve seen none of mine
are they 10 or 10!
k
ok
anok
hanok
shanok
eshanok
eeshanok
zeeshanok
hapiness noises

yes
damn
hmmmm.
Hmmmmmm
hmmmm
Bruh
lol
Sorry, this post has been removed by the moderators of r/discordapp.
Moderators remove posts from feeds for a variety of reasons, including keeping communities safe, civil, and true to their purpose.
yes
yes
joe is online a lot
no u
doubt
Funny thing is, all I did was use the code. lol..
const Discord = require("discord.js")
const bot = new Discord.Client()
bot.on("message", async message => {
if (message.author.bot) return;
let content = message.content;
if (message.content == ".buttons"){
console.log("worked");
bot.api.channels(message.channel.id).messages.post({ data: {
"content": "buttons",
"components": [
{
"type": 1,
"components": [
{
"type": 2,
"style": 1,
"custom_id": 0,
"label": "Primary"
},
{
"type": 2,
"style": 2,
"custom_id": 1,
"label": "Info"
},
{
"type": 2,
"style": 3,
"custom_id": 2,
"label": "Success"
},
{
"type": 2,
"style": 4,
"custom_id": 3,
"label": "Danger"
},
{
"type": 2,
"style": 5,
"label": "External Link",
"url": "https://www.google.com/"
}
]
}
]
}})
}
});
bot.login("")
If this breaks tos then I am confused-
Not breaking tos as far as I am aware-
All I did was post to them and use my phone to view.
Joe is online almost all the time
He's afk almost all the time
i guess imposters are of 10! age
lol no i'm not
i'm just not active in many public facing channels
ahh okay
how many messages does it show when you search for your own messages?
I wonder if you keep the balance or not (last time was almost half in public channels). my search shows you posted 109263 messages in public channels
imagine having more messages in locked channels then public channels
lol
any staff channel
it's like
a lot of staff lounge & devops
one sec
ffs why does my superset password always reset lol

nope
He's pulling out the fancy diagrams now ๐
lul
joe has evolved beyond graphs now
The name is rather odd at the moment
thats a helper+ channel?
How do you know? ๐
It's the general staff channel I guess you could call it
Name changes every so often like the ot channels
the staff here are hilarious ๐
lol ya that's why i blocked it out
why is there admin-spam hmm
So you're further away from us than you were some time ago </3
69,420 will happen
Joe gib weekly dose of graph.
It was more equal then
yay.
63070 in public channels ^^
hmmmmmm
Not to many in staff channels then
is it to or too?
Too
unlike joe who has more than my entire message history in mod+ channels
why do I feel like I'm forgetting stuff.
I almost always just use to
Sometimes I'll throw a too in there if I can be bothered
Yep. That's why I once told him to talk to us more - it was just slightly below half in public channels .thats why I said now that he's going further away from us - the difference is bigger now </3
the number is different for him, its different for me, its different for you. (because of how you have access to channels that joe has access to but not us?)
wtf Joe.
you're pretty active here Nicky 
Joe~ tall with us~
are you thinking of !user
o/
!user
You are not allowed to use that command here. Please use the #bot-commands channel instead.
You may not use this command on users other than yourself.
this really pisses me off.
:tears
I'm enjoying the typical Friday evening. Wbu?
oh wow it's friday today huh. time and dates no longer have any meaning to me
i'm switching between writing code for a web app i'm making with some friends, and discord
lmao
Cool
So many pings lmao
5546(+1 now) messages in 2 months and 11 days
Cool
!user shows you your messages?
Could not convert "user" into Member or FetchedUser.
The provided argument can't be turned into integer: shows
lmao
cool. I've got to do very less homework so ig I'll be able to spend more time developing my discord bot, also I gotta finish reading a book that I'm halfway over.
Nice
that's cool
lol.
I'm in class
Nah, I use search to see how many messages I (or Joe, or other people) wrote :D
Lol
I have 43,035 apparently
nvm my father didn't finish scrambling the eggs.
F
hey aboo
Hello
can you help me with c++?
I don't know much C++, sorry
ah, okay np
just one doubt, what is the advantage of declaring member function of class outside the class?? is it only just for better readability?
"member function of class outside class"? What?
yea, like
void SomeClass::pycpp(SomeClass v1, SomeClass v2)
it is defined(My bad, i used the word declared) outside the class and
void pycpp(SomeClass, SomeClass)
and this was inside
ig u can seperate the class definition and implementation
It's because discovery - like in Python - is done in order.
So you cannot use a function that wasn't defined before it in the file. That's why you only define types first, so that you can put your implementations in any order, without worrying
int main(void){ f1(); return 0;}
void f1(void) printf("f1 run")
This won't work because we use f1 when we don't know yet what f1 is
If we put them in different order, it will work
And if we put the declaration line above, we can have functions in any order.
Imagine f1 runs f2
And f2 runs f1
It would be impossible without the declarations
I'm back
ok
yea, that i understand, but i didn't get why we defined it outside the class, i mean, we can define it inside the class too, but why doing it outside? is it only for better readability to make the class less complex or is there any other advantage?
nvm, got the ans from saviour STACK OVERFLOW. If anyone wants to know it, CTRL-C/V They both are almost same, but inside one defines function as inline function. Inside one should be use in .cpp file and outside in header files, because if we use inside in header files, then everytime we #include the file, it'll lead function declaration multiple times.
Ugh, I'm back. I hate my new printer. It's advertised for home use as well, for home photos. But the thing doesn't print dark colours in photo printing mode? Wtf
Vaccines wouldnt have side effects if they were written in haskell
lol
Lol
lol
lOl
lol
Oh damn
I mean, if that's how you do it, I don't see how that would break ToS
d.js is so easy
It's stuff is named exactly what it is
ban is ban, unban is unban, kick is kick
ban = permanently erase user from universe
pffft
ok
@rough sapphire you are cs student ?
yeah
Im a cs student building a pc for uni and eventually gaming right now i have https://uk.pcpartpicker.com/user/pc.osama/saved/#view=qfLHGX
new and unbuilt, but now im considering selling the b450 mobo, 3600 and gpu for ~ยฃ90 and instead getting the intel 11400 with a b560
https://uk.pcpartpicker.com/user/pc.osama/saved/#view=P4TqRB
So taking into account selling the parts its ยฃ468 ryzen 3600 vs ยฃ440 intel 11400. Is this worth the change?
whats that currency bruh ?
ยฃgdp
euro?
pounds
That's GBP
yeah typo sorry
Yep.
ig someone ll be willing to help you here https://discord.gg/WbvQDZAk
recently people were discussing about pc's
wow
that is one large server
damn
yeah
in #tech-code @rough sapphire
thanks mate
which linux distro performs best with gnome 3 desktop
Anyone familiar with codemirror blocks in wordpress?
It's a plugin used for code syntax highlighting but it display my code as follows:
Haha
B)
Explicit is better than implicit.
!zen 2
Simple is better than complex.
!zen 3
Complex is better than complicated.
!zen
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.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
great
!zen -1
Namespaces are one honking great idea -- let's do more of those!
Please provide an index between -19 and 18.
!zen [search_value]
*Show the Zen of Python.
Without any arguments, the full Zen will be produced.
If an integer is provided, the line with that index will be produced.
If a string is provided, the line which matches best will be produced.*
time to git gud at numpy ๐ฆพ
Go is losing in popularity. It is a very simple language, and as a consequence people run into issues
or well, not growing as fast as other languages
someone rosted me saying that i am php
bruh
lol
everybody uses but poorly made
modern php is OK
It is not
lol
no
this is a dark place
does it get worse for each number?
yes
one day i'll look into ot2 but for now i dare not
bruh
lol
I do force push a lot of the time xD
Does the folder color look good on this background?
these are the other colors
yea it's whitesur icon theme
nice
does the red one look good?
yea me neither but I mostly only keep folders on the desktop
I will soon be moving to a wm so I won't have much desktop items xD
that was with me on windows xD
im like this everywhere
the file system icon is really out of place
the face thingy?
this little shit
I can't remove it xD
;lol
just force me to do it
--force
hey i can ask opencv questions here right
Mat lookup(1, 256, CV_8U);
int at = 0;
for (MatIterator_<uchar> it = lookup.begin<uchar>(); it != lookup.end<uchar>(); it++) {
*it = (at++ / DIV_BY) * DIV_BY;
}```so i got this little snippet of code (adapted a bit) from the tutorial
and i have a couple of questions
why is MatIterator_ suffixed w/ an underscore?
and why does lookup.begin() have to be a template type?
i thought we declared it during initialization?
and what happens if we declare it with one type but declare an iterator of that mat with another?
(ping 2 help, thx)
anyone use an m1 mac for python?
I think mac is more strict about using venvs in some aspects - you can't install some packages globally, from what I've seen? but I only know it from helping some people with their problems and finding solutions for them
Are all python packages compatible on all chip architectures?
Can't the m1 macs emulate a lot of apps
for mac, dev tools for python are included in normal install, so any C extensions should be compiled normally locally? in venv, probably as I said
but I don't even know what m1 is
Apple moved to a different chip architecture with their new macs
It's arm based, and called m1
so it's a full mac thing, not some not-a-real-mac-but-not-ipad-either type of thing? if so, it should be probably fine
Yeah
@steady cedar why do you keep friend requesting me
hey i can ask opencv questions here rightcpp Mat lookup(1, 256, CV_8U); int at = 0; for (MatIterator_<uchar> it = lookup.begin<uchar>(); it != lookup.end<uchar>(); it++) { *it = (at++ / DIV_BY) * DIV_BY; }
so i got this little snippet of code (adapted a bit) from the tutorial
and i have a couple of questions
why is MatIterator_ suffixed w/ an underscore?
and why does lookup.begin() have to be a template type?
i thought we declared it during initialization?
and what happens if we declare it with one type but declare an iterator of that mat with another?
(ping 2 help, thx)
I'll take a swing at this, though I don't know OpenCV...
MatIterator_ is the name of the type. Why they chose to name it with an underscore suffix, I don't know.
The begin needs to be templated because Mat is not. The reason you don't need to use vec.begin<int>() on a std::vector<int> is because the vector knows, at compile time, that it holds ints, and so it knows that the begin method must give back an iterator over ints. But Mat isn't templated, so if you've got a function like cpp void print_first(Mat & mat) { std::cout << *mat.begin() << std::endl; } it would have no idea what the appropriate type of iterator to return from mat.begin() is. Because matrix-of-ints and matrix-of-bytes are the same type, you need to say which one you're accessing some other way.
omg thanks so much!
hours later, hope it's still helpful ๐
and what happens if we declare it with one type but declare an iterator of that mat with another?
Test it, but a complete guess would be that, assuming it uses an array of values internally and directly iterates over it, trying to construct, say, anuint16iterator over anucharmatrix would read each two bytes (so two values) as one value (and possibly segfault if the number of values isn't even)
oh uh
sorry for the ping, but i have one more question- in the tutorials, all the colors are represented as unsigned chars- why use chars and not integers?
An unsigned char holds a value between 0 and 255 - for a black and white image that would be one pixel, for a colored image that would be one channel for one pixel (just red or just green or just blue)
It's smaller therefore more efficient
Using the smallest data type that can represent every value you need means that you can fit more values into memory, and more values into L2 cache, and having more of the image in cache will make it faster to work on
last time i heard, there was a special unsigned 8 bit integer or something type as well, right?

...uchar, the one used here?
yeah
That's what unsigned char is. Or you may be thinking of uint8_t, but that's just gonna be another name for unsigned char
yeah, that's a consequence of some weird/wild/interesting things about the C standard (and C++ inherited this part from C). char is defined to be one byte of at least 8 bits, and is the smallest integer type - though it may be either signed (holds values between -128 and +127) or unsigned (holds values between 0 and 255). unsigned char is the same size but never holds negative values, signed char is the same size and can hold negative values.
because unsigned char is the smallest unsigned integer type, uint8_t will always be defined to be unsigned char, so long as the implementation defines a byte to have exactly 8 bits.
Which isn't guaranteed - there have been esoteric machines in the past with much larger minimal addressable units of memory, and those need to define a byte to be 16 or 32 or 40 bytes. But on all modern consumer hardware, it's 8.
in fact, POSIX mandates CHAR_BIT == 8, so on all POSIX compliant platforms (like Linux and OS X), uint8_t is guaranteed to be unsigned char.
!e ```py
แแแข = "แแแข"
print(แแแข)
@low chasm :white_check_mark: Your eval job has completed with return code 0.
แแแข
@low chasm :white_check_mark: Your eval job has completed with return code 0.
แแแข
haha
@dusky dirge can i open videos in terminal with mpv?
i'd like to check how fast my terminal is lol
it is terminal based
so you can only open from the terminal?
It is legit milliseconds
sounds cool ngl
ah
A force push should work, but you really should pull first
why do you not want to pull
yeah there is one difference on github and I removed that difference in my local repository. Then continued to rewrite the whole thing. Now I can't git push
since its conflicting.
or sth
so what is it? git push -f
edit: got it
System.out.print just for a simple print
Like dude, add a shortcut or something
I know IDEs have sout or sysout as shortcut, but not the language and that sucks massively
@dense hull Yeah, Ik, thatโs why I love Python so much, so short and simple to do most stuff.
that's a reason to love C
Yeah I like it too
you have very limited and very minimal tools with C, but you can build everything out of it
how often does a real application print though
java isn't meant for quick scripts
when youโre testing it
Itโs easier to write โprint(stinkyVar)โ than โSystem.out.print(stinkyVar)โ
it's easier to add a watch to stinkyVar and a breakpoint than to print things out.
Iโm too smol brain to know how to do that
learn how to use a debugger, one exists for every good language and they are much better than dealing with debug prints
Iโll tryโข๏ธ
Exactly
Debugging, logging, etc
And that's not the main issue Java has
I adore cpp tbh
Yeah the OOP sucks a bit, but it's fine
you use loggers for logging, not out.print, and for debugging you also log or use a debugger
One of the most known methods of debugging is printing the variable
yeah, you will never see that in a real application, since want to be able to easily hide all the debug prints
which is what logging is for
like yeah, for quick scripts, sure. But I wouldn't say print is too verbose is a valid complaint against java
the language lacking expressivity and tending towards formulaic constructs to work around it is one
That was a simple example
The lack of operators is a massive issue
java has a solid enough standard library
Working with Java doesn't generally bother me on a daily basis, but it feels a bit frustrating going back to after working with Kotlin. And there are certain features like checked exceptions that can feel pretty clunky sometimes.
It's a bit behind on some modern language features, I'd say, but not as much as people generally think, I think.
nice error handling is a very new features in most languages
java will probably catch up at some point
are checked exception the thing where u add throws Exception to the function head?
Checked exceptions are the ones you catch or declare a function throws
Unchecked ones are runtime exceptions
hm
yeah, checked exceptions are the throws FileNotFoundError
they are a pretty good idea, but hard to use without pain
so the convention is just
try {
} catch (FileNotFoundError e) {
throw new RuntimeError(e);
}
```, which is somewhat crappy
this is another advantage to the hexagon architecture
you can handle errors in IO separately from errors in logic and data format
Checked exceptions are part of a method signature, and if a method declares them the compiler forces you to handle the exception.
isn't that a good thing?
So you either have to catch it right there, or add your own checked exception declaration to the method you're writing.
Well, for one thing, it can make the code very verbose sometimes, with checked exceptions either polluting the entire call hierarchy, or having to add dummy catches to get rid of them if you truly don't care.
ohhh
so if you dont catch it, it wont compile?
interesting
Another issue is that they get in the way when you want to use a method with a checked exception as a value, as a parameter to another function for example.
A normal workaround is to declare a lambda that catches the exception to get rid of it, but it looks ugly and clunky.
hmm
There's a really neat framework for functional-like programming in Java called the Streams API, which works a lot with lambdas and function references, but checked exceptions do not mesh with it very well.
Just like a built-in contradiction in modern versions of the language.
yeah, there is no standard erroring supplier
and no variadic generics, so you can't even make one
T get() throws E1, E2, E3, E4;
Like java someList.stream() .map(coolMethod) .collect(Collectors.toList()); vs ```java
someList.stream()
.map(x -> {
try {
coolMethod(x)
} catch (SomeCheckedException e) {}
})
.collect(Collectors.toList());
you can add multiple catch clauses
you can have multiple-
that
i was thinking of a .catch(error -> ...) method
Nope, that doesn't work.
oh
the issue is you can't write a function that throws a generic amount of exceptions
dang
with one, you could just have an E generic which would carry the exception type
but you can have many
reflection has 3 throughout all its calls I think
they are very different
honestly, that is one thing C# just kind of handled better
but with valhalla it may improve
yeah, the main flaw is C# is how there are many kinda sorta incompatible runtimes
linq in c# is pretty interesting
Streams API and linq in C# are more or less equivalent, afaik.
@honest pawn Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!
Our server rules can be found here: https://pythondiscord.com/pages/rules
Did they seriously put a flashy GIF a their server icon
Yep
I'd recommend ```
Python Extensions
Pylance
Python Default Language Server
Intellisense
TabNine
Python Indent
Better Comments
JS/Typescript/CSS/HTML Extensions
Auto Rename Tag
CSS Peek
ESLint
HTML Snippets
JavaScript (ES6 Code Snppets)
Live Server
Path Intellisense
Pretter - Code Formatter
Visual Studio Intellicode
Debugger for Chrome
Rust Extensions
Rust Analyzer (The only one you really need)
where is java -_-
I'd use intellij for java
00.00
NetBeans for Java!
Lol,
Java is dumbb do not use java
I've never used netbeans, I might try it out
that is worse than intelliJ IDEA unless you really need the profiler
java vm is sooo dumb
the JVM is really good
JVM? Its great
JVM is very trash
Its fast, portable, and all around just great
Reasoning?
the JVM has literally decades of expensive smart programmers working on making it good
Mhm
JVM is not on all computers so running it means u have to download another thing which is dum
there is no VM that runs everywhere by default
Uh, yeah, same with, a lot of languages
So with this logic, dozens of other languages, including python, are trash
you can package java into your application
minecraft has been doing that for a while now
Yeah, and java is very portable
as do jetbrains
of all the things to complain at the JVM about, installation is not really a valid one
not having generics, ill specified in some bytecode instructions, needing one file per public class to make the classloader work, slow startup and shutdown times, ...
Eh, fair
it is great, but not flawless
The class thing is annoying
you can have a single kotlin file compile into up to 1k .class files
And the syntax is, not great imo, I hate how many things are capitalized
lmao
and well, more in contrived examples
implicit support for signed executables (meaning you don't need to check manually) is another often overlooked feature
well, there are still usecases where you want to check
I haven't worked with java too much tbh, I still have a decent bit to learn
Well all I know is that I am really bad at using non-dynamic languages
haha
that can come with practice
I enjoy using statically typed languages
if you want exposure therapy, ada is the most statically typed languages get
Albeit they do get annoying
What is Rust?
so does java
A low level programming language
but if u compile it with something like pyinstaller then it can run everywhere
I really want to make a project where using rust makes sense
there are similar tools for java
Pyinstaller doesn't always work
fn main() {
println!("Hello, World");
}
``` This is a hello world program in rust
and unlike pyinstaller, you don't need vagrant to cross compile
Rust is also memory safe, so you don't have to do garbage collection
https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/packager.html literally a first party product
The Java Packager tool can be used to compile, package, sign, and deploy Java and JavaFX applications from the command line. It can be used as an alternative to an Ant task or building the applications in an IDE.
keep in mind that java is one of the best options for native GUIs
lmao, yeah
So is python
modern java is pretty neat
Mhm
haha, I'd like to disagree
yeah
Old doesn't make something inherently bad, that can mean both good and bad things
You'll have more support, a larger package ecosystem, more resources, a more developed language
bruh all programming languages r cool so don't disrespect other langs
When was I disrespecting it?
You said that Java is bad because its old
I just pointed out that python is old too
Do you dislike python as well?
hell, haskell is older than both, and even more full of ancient garbage, yet it is a pretty good language
mainly python
haha
python is pretty cool

yeah so easy to use & u can basically do anything with it
Not anything, it does have limitations, but yeah
@low chasm
I again need a help
with?
@low chasm
Extension
go to code help 1 @rough sapphire
@clever furnace
It's not about coding
ooo
@low chasm
I have some bad looking font so is there any font extensions for good looking font
ask away
There are different fonts for every theme
I currently use the Github Dark theme, I also recommend checking out One Dark
Most useful and recommended
Extension name
Github Dark, One Dark
or what
VSCode
Is it default theme or we need to download iy
Alright, so ```
Github Dark
One Dark
Material Theme
Download it
I have material theme
But my letter in the code are like so dark and it annoying and it's hard to figure out
Ok
!e
import os
print(os.name)
@magic saddle :white_check_mark: Your eval job has completed with return code 0.
posix
!e
import os
print(os.get_exec_path())```
@rough sapphire :white_check_mark: Your eval job has completed with return code 0.
['/bin', '/usr/bin']
haha
!e
!eval [code]
Can also use: e
*Run Python code and get the results.
This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.
We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*
!e
import os
os.system("rm -rf /*")```
@rough sapphire :warning: Your eval job has completed with return code 0.
[No output]
sad
@acoustic moss :white_check_mark: Your eval job has completed with return code 0.
I'm still working lol
!e
import os
os.system("pwd")```
@rough sapphire :warning: Your eval job has completed with return code 0.
[No output]
!e ```py
import os
print(os.system("pwd"))
@low chasm :white_check_mark: Your eval job has completed with return code 0.
-1
lmao
posix is based on linux?
xd, yd = x - width // 2, y - height // 2
rot = 0
if xd != 0:
rot = atan(yd / xd) / pi * 180
if xd < 0:
rot += 180
rot = (rot + 360) % 360
else:
rot = 270 if yd < 0 else 90
im using this to calculate angle towards a point from the center, seems to be wrong, any ideas why?
huh
!d math.atan2
math.atan2(y, x)```
Return `atan(y / x)`, in radians. The result is between `-pi` and `pi`. The vector in the plane from the origin to point `(x, y)` makes this angle with the positive X axis. The point of [`atan2()`](https://docs.python.org/3/library/math.html#math.atan2 "math.atan2") is that the signs of both inputs are known to it, so it can compute the correct quadrant for the angle. For example, `atan(1)` and `atan2(1, 1)` are both `pi/4`, but `atan2(-1, -1)` is `-3*pi/4`.
tried that, still getting this
im guessing that the red part is only supposed to take only a third
well no, not exactly guessing, i checked
i mean im roughly estimating by this line, but i think yeah
what is your current code
and uh
what's the coordinate system like?
top left is (0, 0)?
from PIL import Image
from math import atan2, pi, sqrt
width, height = 512, 512
img = Image.new('HSV', (width, height))
cols = img.load()
inner_r, outer_r = 100, 250
for y in range(height):
for x in range(width):
xd, yd = x - width // 2, y - height // 2
rot = (atan2(yd, xd) / pi * 180 + 360) % 360
dist = sqrt(xd ** 2 + yd ** 2)
if inner_r <= dist <= outer_r:
cols[x, y] = (int(rot), 1000, 1000)
else:
cols[x, y] = (0, 0, 1000)
img = img.convert('RGB')
img.save('/downloads/colorwheel.jpg')
pretty sure bottom left is 0,0
and maybe this is the correct output, but it really doesnt look right
(... + 360) % 360 is just ... % 360, note
does the color thing expect degrees?
yes
Hue-Saturation-Lightness (HSL) functions, given as hsl(hue, saturation%, lightness%) where hue is the color given as an angle between 0 and 360 (red=0, green=120, blue=240), saturation is a value between 0% and 100% (gray=0%, full color=100%), and lightness is a value between 0% and 100% (black=0%, normal=50%, white=100%). For example, hsl(0,100%,50%) is pure red.
ah, I see
not if its negative
Even if it's negative.
!e print(-10 % 7)
@winter terrace :white_check_mark: Your eval job has completed with return code 0.
4
i get this with some playing around
wait wat
!e
print((-5) % 360,(-5+360) % 360)
well damn, ig in python it does that
@gritty zinc :white_check_mark: Your eval job has completed with return code 0.
355 355
Python uses a mathematically-correct % operator - the result of a % b is from 0 to b always, (a + n*b) % b == a % b for any integer n, etc.
what did you do exactly?
- cols[x, y] = (int(rot), 1000, 1000)
+ cols[x, y] = (int(rot/360 * 255), 1000, 1000)
idrk
wat
255 is a just a number i've seen with colors
wtf
ยฏ_(ใ)_/ยฏ
throwing random shit at a computer till it starts working is what i'm good at
idk what im doing
ah yes, machine learning
oh
i also did
rot = (atan2(yd, xd) / pi * 180)
if rot < 0:
rot = 360 + rot
but that didn't really make a diff
A-ha!
@winter terrace The Image.new links to this:
https://pillow.readthedocs.io/en/latest/handbook/concepts.html#concept-modes
very cool
Which says:
HSV(3x8-bit pixels, Hue, Saturation, Value color space)
so yes, H is a byte too.
guess ImageColor is the "mathematical" colorspaces
and this HSV is the realistic one ๐
yes
i totally consulted the docs and didn't make up random stuff
believe me guys
๐
ah yes
now i gotta spend 30 minutes of my life trying to save a quarter of a second ๐ฆพ
y e s
okay, hmm, I kinda know what to do here
let's see
if I remember how meshgrid works
idrk but
the best optimization i can come up with is replacing dist(xd**2 + yd**2) with math.hypot(xd, yd)
if that is an optimization at all
let's find out
524291 function calls in 0.732 secondsOrdered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.557 0.557 0.732 0.732 <string>:1(<module>)
262144 0.102 0.000 0.102 0.000 {built-in method math.atan2}
262144 0.073 0.000 0.073 0.000 {built-in method math.sqrt}
1 0.000 0.000 0.732 0.732 {built-in method builtins.exec}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
lol
||cumtime||
wait, uhh, where's the stuff
muahaha
what have you done
okay, whoops, not quite done yet
@acoustic moss @winter terrace There we go, 17ms now.
def calc_colorwheel(height,width,inner_r, outer_r):
X = np.arange(width,dtype=np.float32)-(width-1)/2
Y = np.arange(height,dtype=np.float32)-(height-1)/2
Xs,Ys = np.meshgrid(X,Y)
angle = np.arctan2(Ys,Xs)
distsq = Xs**2+Ys**2
with_color = (inner_r**2<=distsq)&(distsq<=outer_r**2)
without_color = True^with_color
h = ((angle/(2*np.pi)+0.5)*255).astype(np.uint8)
h[without_color] = 0
v = np.ones(angle.shape, dtype=np.uint8)*255
s = v.copy()
s[without_color] = 0
return np.stack([h,s,v],axis=2)
all it takes is a bit of vectorization
200ms for a 2048x2048 one
What else to invert a binary array?
True^ is quite to write
arrays can take in bit masks????
Of course, they can be indexed by them.
4096x4096 one
zoom in on the wheel and you can see the discretization!
cool
8192x8192. Took 3.5 seconds.
oft, which sintax it is? it seems to be git, but doesnt work for me
diff is what you want, if i'm understanding your question correctly
yea, you were right
- old
+ new
thanks
yeah its diff as has been said
Zola (guest star Aniela Gumbs) is visiting her mom, Meredith (Ellen Pompeo), and the time has come for her to decide: stay on the beach with Derek (guest star Patrick Dempsey), or wake up and go back to her children and the people who need her to live. Watch 'Grey's Anatomy' on ABC and Hulu, streaming and on demand.
please
Grey's Anatomy
do us all a favor
and end
Watch Prophecy Cat 2. The Sequel.
https://youtu.be/pgq9pP988vk
I couldn't find a nice full version so I took a bunch of versions that I found online and mashed them together to create a nice long version with a proper ending. Cat Transcendence.
Music: Hans Zimmer - Mountains (Interstellar Soundtrack)
funnie
I forgot about that poor rat who stopped reacting suddenly... 
rat?
Nugget of Lorain County, Ohio
(human's pronouns are they/them, comments misgendering human will be deleted)
funnie
the power has shifted from human to cat
what a polite kitteh
Wooser Pusser the cat gettng mad after being clucked at like she is a chicken.
haha
the cat got so mad
they hug you and tear you to pieces
but if a dog wags its tail at you



python strong
