#ot1-perplexing-regexing
1 messages · Page 138 of 1
We'll end it here, you seem like it's very urgent.
how the fuck
.uwu
how the fuck
.uwu you're a disgrace
you'we a-a disgwace
woah thats so cool
ty
Pygame or Godot?
pygame
someone know any alternative to flowrun? i have no time and big code to make…
Who's that user who has a dog as their pfp and introduced me to Microsoft Graph API?
dog that shills microsoft products sounds like @vale raven
Ping
pong
It’s not “shilling” if they’re the best
What’s up Keezy?
so microsoft is shilling, then. thx for confirm
Am I able to make a POST request to create a SharePoint site with Microsoft Graph API?
I can’t find the POST section in their documentation
Uh….
Probably
Do you want a group with it or do you just want the communication site?
Group
https://learn.microsoft.com/en-us/graph/api/site-get
See example 3 for getting the site for a group
I just see all GET
Not POST
See the link above that
First link is group creation
Second link is querying the group to get the generated SharePoint site URL
I see. Awesome. Thanks a lot man
Do I need to be admin to further research SharePoint?
Research?
No, https://learn.microsoft.com/ is public
To actually use?

There's a permissions section on each docs page telling you what permissions you need
Group creation is enabled for all users by default, so if your admins haven't disabled it, you shouldn't need to be admin for this
Wow
I mean research on the actual app
I want to use it
And create sites from the front end
Btw you can ping me by replying. It’s not an issue
What app?
Oh heh there's even a code sample for this in the SDK repo
https://github.com/microsoftgraph/msgraph-sdk-python/blob/main/docs/groups_samples.md#4-list-a-group-team-sharepoint-sites-get-groupsidsites
SharePoint
You're losing me, I don't understand what you want
But just give it a try
What admin perms you need depend on how your org has things configured, so I can't tell you for sure what you need
what about after 2003? so for all time?
Only in public channels
theres more??
lots
Excuse?
Dog yapper
TF
🗣️🗣️🗣️🗣️
44, almost 45, with staff channels
And that's not including all the mod channels with logs and alerts for deleted messages

I love it when everyone's deleted messages get stored
@quasi blaze did you figure out the docker thing you were asking about?
arch linux config started
what the...
id definitely get bored at like 3 million
These messages are from tons of different people
!eval
message_count = 45_000_000
user_count = 400_000
average_messages_per_user = message_count / user_count
print(f"{average_messages_per_user=}")
:white_check_mark: Your 3.12 eval job has completed with return code 0.
average_messages_per_user=112.5
And that's a conservative estimate on users
Who knows how many more users than that have joined and left over time
@round pendant yo!!! it's like fifth time i ping you for no reason, but check this out 😎
huh
pretty cool
wouldnt use it for a language though, but yeah, if you have some simple rules to parse with this is a nice abstraction on regex ig
thanks ❤️
also my idea with comments as tokens turned out to work
kinda random but what about Indent and Dedent tokens? How could you do that?
hmm... one second
Like
if True:
pass
```to```If Bool Colon Indent Pass Dedent EOF```
yeah with the way i did it that wouldnt work
and not like i want to make a language with indentations anyway...
Sad.
Indent and dedent tokens let you make things like
enum Result T E
Ok T
Err E
:3
or u just use { } 😎
True but
Indentations are "fun"
imagine using languages with indentation
fn add(int a, int b) -> int
a + b
I dunno why but I like that
as fun as 35000 lines of code in parser.c in cpython's source code go 😅
though, that's a parser. not a lexer...
You just have to keep track of the number of whitespace characters at the beginning of a line and emit Indent tokens when it increases and Dedent tokens when it decreases
you could solve mixing tabs with spaces by making it assume that a tab is the width of the first space indent you see
couldn't be me 🔥
it's autogenerated, it's fine
what on earth
oh
// @generated by pegen from python.gram
💀
comments are there for a reason
lexer is also partly autogenerated, but that's only for non-whitespace tokens of length 2+
i see
though generating those files also seems kinda complicated
If Bool Colon BlockStart Pass BlockEnd EOF
different names for the same token /shrug
not necessarily blocks, though
some_fn(
a,
b
)
depends on how you meant indent to work
although ideally you'd just ignore ident and dedent tokens within expressions
I initially thought you intended this to have one indent per line
if blah
foo
bar
but I guess not
haskell.
you guys literally always think about how cool a language it could be and it's literally haskell code
yet nobody wants to use it 😂
biggest haskell haters ong
Oh, I love Haskell.
nice
I just refuse to use a language without namespaces.
bruh
-# STOP PUTTING THE DARN TYPE CONSTRUCTORS IN THE GLOBAL NAMESPACE
import qualified Data.Map.Strict as S or what was it
data Result a b
= Ok a
| Err b
I don't want Ok to be the type constructor
it should be Result.Ok or Result::Ok
instance Show Result where
show (Ok a) = show a
show (Err _) = "Err"
or something
or you can just
data Result a b
= Ok a
| Err b
deriving Show
or something
i dk
im going to be pedantic and say that Ok is a data constructor
the type constructor is Result (it makes a type, so its a type constructor)
lean4 better
I don't use Haskell
I like it
but I don't use it
ok so actually
funny problem with this
that id actually like modern languages to solve
what is it?
it can't do that
cant do what
doesn't know the type of a and b
no its fine it will generate
instance (Show a, Show b) => Show (Result a b)
(a constrained instance)
so that's te problem
just tell me bro i've been trying to find out for the last 5 mins or so i am a bit frustrated
a problem with curried type arguments is that the order starts to matter a lot
with Result a b, you get to * -> * after applying a (the Ok value)
so if you wanted to make a functor instance for this type, it'd be functorial over.. b (the error value.. which is stupid, you obviously want to fmap over Ok a)
so what you'd have to do is Result b a = Ok a | Err b
ok
bruh just putting paranthesis around it fixed it
🦍
ok why does this work for me but it doesn't work on a discord code ocmpiler
i swear i'm losing more and more braincells
when did i get so udmb
now that is the ideal coding syntax
put parens on everything 😈
everything becomes lisp eventually
@slate cobalt I know you were looking for a distro to use 👀 I've had enough of NixOS at this point, it's started actively blocking my productivity, and so I've decided to switch out as well. I came across https://projectbluefin.io, which looks fantastic, and has more or less a no frills ready-to-go setup.
it's based off of Fedora Atomic, so it's an immutable system.
software is all installed isolated and separate from the base system (which itself is immutable), exclusively via flatpacks and with homebrew for CLI tools.
and all development is done through devcontainers (or your choice of tooling like distrobox)
I was? I think you may have mixed me up with someone else
oh you're right, it's not you
wait only flatpak?
mhm
yikes
i just find the sandbox fucks shit up sometimes
OH right it was @uneven pine
i fought demons on flatpak steam
I guess you could just like, use a normal appimage (are those also sandboxed?)
the big idea behind this is avoiding apt and any similar package manager
e.g no changes to the base system, it's read-only
you can layer packages on top of it if you wanted to, but that's considered an antipattern
I see I see
interesting
it's kind of like a chromebook
oh lord
but supercharged for like, actualy usage.
if I go back to Linux it'll probably be back to Nobara tbh
I am not huge on the atomic thing
It is a great idea and absolutely has its place
just not for me
fair enough
I've been playing with it on a virtual machine for a bit now
it's been incredibly straightforward, and the stability is a nice bonus.
which it turns out, is actually way easier to diagnose on Windows because the bluescreen dumps are actually helpful CakeW
2 minutes into memtest86 and it was failed
apparently drivers are practically painless as well
the computer I use shipped with some sort of funky audio card which clashed with my nvidia one
so for the past like, two years, I've had random blue screens
like, twice every day
no predicting them 😩
just figured out what the issue was like, this week, after actually sitting down and troubleshooting it
I am going to be pulling out the spare motherboard and CPU from boxes next week
had to turn off some weird driver
5800x and a X570 board
just need to buy RAM, a new CPU cooler, couple of case fans, and a GPU
maybe a new PSU too honestly. Actually, for sure
that thing is pretty old and it's time to retire it
I should be getting my roomate's Arc A770 since they're planning on upgrading to the B770
oh neat, is that a capable GPU?
right now it has a GTX 1070 laying in a box because all the linux errors were pointing to nvidia driver failures and I never put it back in
It's like 3060 Ti level. @low chasm
it's going to be a streaming rig, running my VTuber software and all of my bots
I see
so it needs some oomph
have fun 👀
https://x.com/fawfulfan/status/1881732562042982817 bruh the us abolished men
let's fucking gooooooooooo
Based
weird
hype
AFAEO
Assigned Female At Executive Order?
💀
yah
Next goal ban current existing men
but the men don't exist anymore apparently?
Is everyone grandfathered into this
they're grandmothered
come on mar pay attention grandfathers don't exist anymore
According to the language it seems so yes
there was a film about women-only world… sadly not in english…
Movie from 80s and they already thought about forcing people trans then!
yup…
matrix 1 was gonna have a trans character (switch) but people probably would've been hella confused
https://en.m.wikipedia.org/wiki/Sexmission at least there's wiki article
With very detailed plot section
Sexmission (Polish: Seksmisja) is a 1984 Polish politically satirical cult comedy science fiction action film. It was directed by Juliusz Machulski based on a screenplay he co-wrote with Jolanta Hartwig and Pavel Hajný. Sexmission has earned the title of a cult film over time, although due to the film's association of women's emancipation with t...
yup
(also look at date ;p )
executive orders dont mean shit to tldr it
dont go on reddit and you will convince yourself everyone is dying in 4 years
reddit fights tooth and nail against trump supporters but they will lose their shit if you criticise dems
because a better world isn't possible ig
because if you disagree with me, fuck you and fuck you personally and i refuse to act like an adult and have a discussion to realize we both want the world to be a better place, just with different perspectives
the state of US politics
trump probably wearing this shit rn
men don't exist any more so they thus cannot be killed
true
they really just thanos snapped half the population
kill all men was a crazy moment in history ngl
I agree but think there's lots more that can be said here
what no nuance does to people
trump is a girl…
I used to yell it as a joke and 2 of my friends legit got mad at me

i mean i cant say im shocked
like bruh im a dude let me say deranged shjt
it's not even in the top 10 worst things I've said
💀
yooo
about time
↑↑↑
tbh some arguments are made in bad faith and you might get assumed to be talking in bad faith
which would lead to this
like it's not right, it's an assumption, but I think a lot of us are guilty of this
ive noticed people debate to "win" not to understand
oh, that
because no matter how you slice it, if half the population is conservative then there has to be some sort of truth to them
and vice versa
in the same way i think im right, everyone who disagrees with me thinks they are right
so its hard for me to just say "fuck all {policital party}" becuase who am i to say who is objectively correct
https://youtube.com/@harperoc?si= plugging in a tuber I like because he talks about this
he has a bunch of vids criticising this "winning and not understanding" shit
Man fuck discord mobile ihope this company goes broke
yeah? i use desktop browser (wild browser possibly based of old safari) discord version on my phone cause there is no discord for the OS i have… and i need to switch to landscape twice cause it bugs and zooms to unusable level… each time for 5 secs… (aka - 20 secs to just open discord where chat is visible) PLUS i don't see what i type cause keyboard overlays input… so well… app isn't that bad tbh…
ooooo
i fw this
https://www.youtube.com/watch?v=1mLsHLZkvSw&t=93 u can watch from here skip the cringe intro
Ready to start your political education journey? Click here:
https://democracylover.gumroad.com/l/fpjkwn
this is pretty surface level but I personally find it worth watching because sometimes u get so carried away that u forget how to talk normal
damn, mobile app still scheiß tho
what os ru on?
ubuntu touch…
Yeah I like this guy
he talks a lot about self Improvement which I also like
e.g lifting farming
yeah. and today this crap even logged me out…
yep. even in browser…
Yup, and these glitches
And smol kbord
Yeah. App better i think...
That's for all horizontal big screens, sadly. I couldn't play some games with quite dynamic chat on my phone because I couldn't read anything with keyboard open in horizontal mode
glitches above better
there is sometimes even a glitch that screen zooms nth times if i rotate phone too quickly
Discord glitches for me even in their official android app, so 🤷 just discord being discord.
...Who even chooses a name that means chaos for an app and want it stable?
¯_(ツ)_/¯
literally i feel like discord is done whole on canvas like a game…
That's how the app looks in horizontal, btw.
not too different tbh…
That was my point, keyboard in any horizontal app looks awkward 😄
well then… mine even looks better if to look closer as it doesn't cover bottom of input xD
but maybe it's that buttons on kbord smol…
I don't see the problem
no
write 1234
charge yer battery
See mine, lol
also why do you have 2 cell tower connections
Dual sim probably
don't get me wrong, I'm not actually using that in landscape
yeah, dual sim
personal and work
I think you've missed some messages
Where? /j
are they separate carriers or does it just show the same signal twice
separate
Here you are, checked some
crunchy jpeg
Idk why someone thought saving phone screenshots as jpg is a good idea...
But those artifacts are discord's fault, it's a small image and displays correctly even when zoomed in in my gallery, but discord messed it up with some additional compression and weird zooming
In gallery zoom
Vs opening the pic above in discord zoom
my phone saves screenshots as png 
hello 
anything i should change with this list? 1 is the most common and 5 is the most rare
I thought those were png before today as well, because they're always crisp in gallery/before sharing to discord... But I checked and they're all jpg.
eww
1% charging 
screenshots are png on my phone
Not charging, it's + icon, meaning power saving
if nicky disappears we'll know why
I just plugged it in
it's an android so she'll be here a while
I have a fast charger
She who?
ah, because I probably set it up this way. it's a choice in advanced settings, and quite possibly the default was JPG
My settings don't have this option :c
3 minutes, already 10%
I love me some fast charging
where?
THEY will be here a while
i have samsung & i don't have… no android there ;p
OnePlus here, android in their OxygenOS flavour, but the default is jpg
But idk defaults on previous versions of Oxygen - they broke some defaults in android 10 or 11
seems "advanced features" is a oneUI thing, so samsung only, probably
⭐Diamond Product Expert
🌠 Diamond Product Expert
10 minutes, 25% fyi
HUH
Ultra-fast charging ftw
nicki, can you review my fish list 
damn - what phone?
OnePlus
Super vooc or whatever their fast charging tech is called
Newer have even more powerful chargers, I believe
fox…

yipp!
cinematic ahh fox
woah, 80W or 100W wired
I think I got this photo off r/foxes ages ago
my samsung does 25W wired and that's already a bit scary
airplane ears
yyipppp!!!

yeah, mine does 100W
oneplus 12/13 has 50W wireless charging, too
any ideas?
50 minutes, 98%
If anyone's still curious.
I think around 80% it slows down a bit
ios does that too
I’m going to have a 30 mins meeting tomorrow with my manager on how to grant API Permissions for Microsoft SharePoint 🙈
(I said it’s okay to ping me also)
Here's a free ping
Sounds like you're getting what you need.
I sent him a screenshot on how to do it
30 minute meeting is not needed
There’s video tutorials too
But w/e. he’s my manager
"this could've been an email" moment
Heh
My boss FINALLY put in a ticket with a decent description instead of calling me into his office to ramble about it the other day
But when I asked him to prioritize that project he said "IDK what you're talking about, show me where wer discussed this"
So I linked him the ticket to which he said "IDK what was going on with that ticket"
it's YOUR ticket
business major gameplay
Damn. Your story is archetypal to mine
Archetypal to my personal experiences i mean
Omg your boss seems to be an angry person @vale raven
Does he always get aggressive
Rambling sounds unfair
I fucking hate azure jesus fucking christ. The record I want to edit is behind the goddamn "Scroll Back To Top" button.
guess you have no choice but to scroll back to the top
This is exactly why I give the container thingy some bottom margin.
Or scroll up a little bit just to be able to click the edit button through the small window
There is no small window. The button completely overlaps the entry
That style that button has looks weirdly out of place as well
I don't think i've ever seen one in azure
try zooming out
Yeah I’ve never gotten that in Azure either
epitome of UX design
ux so good you have to open dev tools and delete shjt to make it usable
who did this LOL
import os
from azure.identity import ClientSecretCredential
from msgraph.core import GraphClient
def build_graph_client() -> GraphClient:
"""Build authenticated GraphClient."""
client_secret_credential = ClientSecretCredential(
tenant_id=os.getenv('ms_tenant_id'),
client_id=os.getenv('ms_client_id'),
client_secret=os.getenv('ms_secret_value'),
)
return GraphClient(credential=client_secret_credential)
from pl.gh_resources.microsoft_graph_api import microsoft_graph_client
graph_client = microsoft_graph_client.build_graph_client()
MICROSOFT_SHAREPOINT_SITE_URL = 'https://graph.microsoft.com/v1.0/sites/myexample'
response = graph_client.get(MICROSOFT_SHAREPOINT_SITE_URL)
print(response)
The value assigned to MICROSOFT_SHAREPOINT_SITE_URL is the correct way to send a get request to a SharePoint site right? Because I am getting 403 as a response code and I don't know what's going wrong
What permissions does the application have?
I have these
ChatGPT is saying
From your screenshot, the configured permissions include the following:
Mail.Send (Delegated and Application)
SharePointTenantSettings.Read (Application)
SharePointTenantSettings.ReadWrite (Application)
User.Read (Delegated)
Observations:
While you have SharePointTenantSettings.Read and SharePointTenantSettings.ReadWrite, these are related to tenant-level SharePoint settings and not for accessing site content.
To interact with SharePoint sites and retrieve content, you need one of the following permissions:
Sites.Read.All (Application or Delegated)
Sites.ReadWrite.All (Application or Delegated)
Sites.Manage.All (if managing permissions or settings at the site level)
Since it's ChatGPT their suggestions are not always correct so I am posting it's response here to confirm if they are correct
Yeah that's not right
Damn
I think ChatGPT is right
Ohh
Thanks a lot man
The docs will [should] always tell you what permissions you need
Your code right now, just looking at the site, should only need Read
But if you want to start changing the site, you'll need ReadWrite

impossible
Damn
I get a 400 bad request response
There’s progress
Progress is good
oh wait I just remembered azure is a Microsoft product, I missed a chance to complain about it
wheres microsoft defender
bro is Microsoft offender
my discord nick name was "GNU Windows Offenderd" for like 2 months 🗿
interps nick name is part of the bit, he's just more committed than I am
Absolutely based opinion
Microsoft only has great products
Like teams
Or that weird xbox game overlay
bro is being held hostage by microsoft
I love edge's vertical tabs
real
Thanks
just edit the HTML and remove that element 
i'm 18 hours late but who cares
Mr Anigans to you
do you guys think its weird if i have nothing else to talk about other than programming?
idk too…
my family have enough of me cause i can't talk about other things that computer-related for example…
but i feel like in these times i just should…
who said vertical tabs?
I fuck with edge vertical tabs and tab groups
tab containers even better cuz blocking cookiez…
dumb
jpeg artifacts
do you really have to ask
side note:
Eduardo Ordax, Generative AI Lead @ AWS
Don’t you?
don't i what
how old r u
20
I think just in general it's healthy to have more than one thing you're into
conversations also don't inherently need to have like, a structured topic.
it's kinda real
and it's funny to watxh them struggle
hi
wer
hi :|
was*
fuck m$ 🖕
this is a great meme because it sounds like a shitpost but stuff like that actually does work as a prompt (which I suspect the mememaker knows)
(in particular, I've seen some recent research that modern models can tell when they're hallucinating and telling them to not hallucinate improves quality)
damn

the joy of life has left the eyes of yet another youth
how many more must lose their spark to Microsoft
I don't think windows installer asked me to set my computer name, so today I got spooked "wtf is this weird 'DESKTOP-8K...' connected to the network"
anyways, the computer's name used to be Samuel before the ssd broke... should the resurrected Samuel keep the same name? maybe it's time to switch themes... 🤔
Samuel II
or Samuel Jr.
but that suggests a child 
as for the theme... masc names starting with S for computers was an accidental theme from high school dorms - two people already had laptops with such names and some other people including me joined in. I've used Stuart for a few years of uni as well, until I bought Samuel
but at the time I haven't realised yet that I'm nonbinary, so now that I stopped to think, it kinda feels weird using clearly gendered names
a junior does not really suggest a child
well, it's the offspring of a senior
but might not be a child
I meant child of the previous Samuel, not child as in age
it would make sense if I used some parts of the old one... but it's only disk swapped and new system install
"Sam" -> like a more modern version of Samuel, also pretty gender-neutral
arguing Samanthics
computer hostnames are fun
my chain of hostnames between computer migrations went
nemesis → phoenix → firebird
I also have my nas/server qb now
I used to have fancy computer names (pretty much changed the naming scheme for every new computer), but now retconned everything to just be called I, II, III, ...
(That's for my main personal machine, I do have a "classic" naming scheme for servers)
that's... pretty clever, lol
although it feels weird being that short, I'll go with it for now
nemesis sounds like a name for a printer
otn a nemesis the printer
I have a friend who does insect names. from what I remember their main machine was butterfly
which is a double pun, it's very cube shaped, and https://en.wiktionary.org/wiki/きゅうび#Japanese
so it's still the... sameuel?
[noun] sudden fire
[noun] intense heat
matches with my desktop name well
I'm loling and my cat looked at me weird. thank you
it was a laptop running arch
pretty good name, then
apt
arch nemesis
and considering how arch is hard/annoying to set up...
Apt? I thought you used arch?
I knew that response was coming 😛
it's not that bad
Polish uncyclopedia had a quite nice take on arch linux
(it helped that one of the admins was cs student at the same time as me, a lot of tech topics were done then, lol)
https://nonsa-pl.translate.goog/wiki/Arch_Linux?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=pl&_x_tr_pto=wapp google translate of the page if anyone's curious
Arch Linux – a Linux distribution designed for people who have memorized all the system configuration files. For more advanced users, Gentoo is recommended – there you have to compile everything yourself, which means that inhuman skills are as necessary as an efficient processor.
It is characterized by the fact that installing any graphical environment is practically impossible. That is why the most popular browser on this system is Lynx , and the IRC client is irssi.
?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=pl&_x_tr_pto=wapp
that's just how google translate codes the translation arguments for some reason. instead of readable stuff, they do this
as I said, Polish uncyclopedia has a lot of stuff on other linux stuff as well. whole posix topics got a lot of such articles during the year with operating systems classes 😄
nemesis is the name of a fictional bird, a phoenix is a fictional bird
a phoenix is a fire bird
I wonder what my next name will be 🥴
maybe it will be a plane
moltres
more like molquatro
moltres has some interesting localizations
German Lavados
French Sulfura
sulfura goes pretty hard
Scrooge McDuck
There's also https://m.bulbapedia.bulbagarden.net/wiki/Fletchinder_(Pokémon) and its evolution Talonflame
DE Dartignis sounds cool.
Charizard is also Fire/Flying types, same as Moltres and those two
Oricorio Baile style is also Fire/Flying https://m.bulbapedia.bulbagarden.net/wiki/Oricorio_(Pokémon)
Oricorio (Japanese: オドリドリ Odoridori) is a Flying-type Pokémon introduced in Generation VII.
While it is not known to evolve into or from any other Pokémon, Oricorio can change forms by sipping the Nectar of certain flowers.
If Red Nectar is used on Oricorio, it will change into Baile Style, where it becomes Fire/Flying-type.
If Yellow Nectar is...
And Ho-Oh is also Fire/Flying
There is also the most creative pokemon to be created in recent memory
https://www.pokemon.com/us/pokedex/flamigo
If you don't mind 'looks like flying but is not Flying type', then Volcarona. Also has paradox Pokemon associated with it, the future version is really cool looking
Not a dragon 🤓
They're still dragons in my heart
Also, anime doesn't really keep the height and weight stuff from pokedex... Especially weight
His arms don't look like they have a lot of muscle.
Also Cosmoem is 999.9kg in pokedex and he lifts it 💀
That's impressive
https://www.reddit.com/r/CharacterRant/comments/cjeezk/lets_look_at_ash_ketchums_physicals_strength/ sadly linked gifs with scenes don't work
If you hit almost any creature at the right spot on their head, you will stop them...
Yeah but it was flying towards them at high speeds I think
That's like stopping a seaplane sized bullet with a frying pan
It's a dragonfruit tree you see, that's why it's dragon type
dragon deez coconuts looking tree
Is this me?
You wish you were that cool
Jesse is built that way
Who plays TCG here?
You do?
what’s that
trading card game
When stream started?
You'll have more luck in #voice-chat-text-0
Do you play Pokémon
cooked
bombed the exam
how do i disapear into the woods forever and never be found again?
brisket?
2 ps
@round pendant this is why you should try TS
its full of 50 line generic expressions like this
in an ideal world this should be something like
ExtractRouteParams(T: str): Type = match T with
| start ":" param "/" rest => {param: str} | ExtractRouteParams(rest)
| start ":" param => {param: str}
| otherwise => {}
hmmmmmmmmmmmm real
there are some TS alternatives that have this btw
whats it calle
civet?
heres one such langauge
it has pipe operators and shit
oh wait this isnt the one
i think it was elm
https://guide.elm-lang.org/types/pattern_matching elm has this:
the main point being not having an entirely separate language for the typing part
type User
= Regular String Int
| Visitor String
oh
i thought u just meant synctatic sugar mb

but i love sugar tbh
well, it is a syntactical decision, just not sugar
all language is synctatic sugar
@ idiots who claim "TS is just a linter" because it does not compile to assembly
yeah theo t3 made a viddeo just to claim this
dude anything that is turing complete and compiles is a proggy langauge to me
no actually
doesnt even have to compile
it just needs the spec
bro fuck theo
this is what happens when you dont take compilers clas
look i like some of his takes but he reeks of didntreadtheory syndrome
i bet hes never written a compiler
ive only ever written a shitty one for a class
what did you compile to? and how (e.g. took the intel x86 64 manual and encoded instructions yourself or used some library)
and what language did you write the compiler in
wrote it in C
langauge was pascal based
it compiled to C
V moment /hj
huh
early V was largely a naive translator to C
thoughts on this notation?
for x in L: L.append(x) vibes
What a delightful lady taking care of her son, I wonder what kind of career he got into since
I can't stop laughing at this shit man 😭
https://www.factcheck.org/2019/12/dubious-quote-attributed-to-trumps-mother/
https://www.snopes.com/fact-check/trumps-mom-call-him-idiot/
nice try
what does it mean
Q is a set of numbers from 1 to some finite cardinal bound
It sort of is but sort of isn’t
It’s not a compiler
I’ve written compilers professionally, I’m here to say that TS is sorta a linter but not exactly, it’s more so an abstraction layer between JS and the programmer
It’s a layer of abstraction that’s then delegated and handed off to JS, TS is transpiled into JS
There’s a distinct difference between compilation and transpilation
Is there tho?
Typically has to do with the level of abstraction difference between the source language and the target language
I mean... Compilation is a form of transpiling
Other way around
But once again, they have drastically different implications and they differ in terms of abstraction translation
Oh right, my bad, just woke up
All good
When you say compilation, you usually assume some sort of lower level code generation, which can reflect on the design of your application
For instance, instruction selection
That can heavily influence IR/IL designs & formats, which can then influence your backend
Simply put, compilation has a heavier emphasis on synthesis and transpilation has a heavier emphasis on analysis
And for the record, these definitions are rather arbitrary and it’s just how I view it from my perspective as someone with a profound interest in compilers
kinda cursed ngl imo
yea, I'll probably do something else
in my mental model transpilation is a form of compilation within the same level of abstraction
high level to high level, or maybe low level to low level
while (traditional) compilers are going from higher to lower abstraction levels
do you want to refer to the cardinality, or is the only important thing that it's finite?
Q = {1, 2, ..., n} seems like a sensible formulation, especially if you care at all about the size of the thing
yea, that's what I went with eventually
there is Z/n, but that's probably not what you're actually after
Yep
That’s generally how people conceive it
Yeah same, to me it just means you still need another full fledged compiler or interpreter to get things done
Unlike for example a VM
It might be a bad definition
I haven't thought much about it
SMH why do you need to fact check the funny
Its not funny if its made up
Mmm, true
Its like finding out your favorite art is AI
But
I dohave the ability to delude my self into finding made up thing funny
looking for someone who is good at mongoose (nodejs) and could answer me some questions and might even help with something
We don't like spamming in this server, you posted this in all 3 offtopic channels AND #python-discussion
excuse me
sorry
but i'm so lost
and i've been looking for someone
to help
for 3 days now
like i can even pay
😭
!rule 9
brother
Try js server maybe?
they are all dead
i've even joined a mongodb server
which is even more dead
try the coding den

Hi all, new to here and to python. Currently trying to wrap my head around classes. Did anyone else take a mental prolapse learning classes? I
are you having a hard time on the conceptual or the syntactical part?
I guess the conceptualisation. Like I know how they're structured and I can essentially build one but I don't know why they work I guess.
could you elaborate on "I don't know why they work"?
So how they communicate and utilise inner functions and when to know a function is better served as a different class. What hierarchy changes and utilisez other class functions.
Is the self.() Stuff attributes? Or parameters?
I've read the python docs tutorial, done zed a shaws book and for the life of me it's like being able to hear a word you can't spell 🤣
self typically refers to the instance of the class the method is being called on
something like self.health refers to an attribute: health is an attribute of the class
Yea and it binds that attribute to itself? Hence self.?
I created a class that had sel.health and self.stamina and had (action) functions that removed stamina. I struggled with being able to change the attributes from outside sources. Such as an NPC class taking away health. It's that getting the 2 to communicate better
class NPC:
def __init__(self):
self.name = "Bob By"
self.health = 100
def take_damage(self, amount):
# ^^^^ This self is a parameter
# It does not bind an attribute to the object
self.health -= amount
# Above is conceptually similar to this:
bob = {"name": "Bob By", "health": 100}
def take_damage(self, amount):
self["health"] -= amount
take_damage(bob, 100)
So if the player_character attacked with a function that said did 10 damage how would that call the take damage function inside the box class
NPC*
# Let's say Bob has 100 health
bob = NPC("Bob By", 100)
# Bob is attacked by a zombie (ouch)
bob.take_damage(10)
# Internally, the above function call does:
self.health -= 10
# ...where self is bob (the instance of NPC), so it's technically:
bob.health -= 10
# Therefore, if we print bob.health:
print(bob.health)
# ...we get 90
Ok I think I understand just gotta get on the comp and do it. Thanks for taking the time man appreciate it
can anyone suggest me a community server like this for web development?
mainly for js and stuff
The knowledge gap of software development and how computers work between my manager and me is a lot and it’s overwhelming sometimes smh
The interesting thing is that: the more senior you get, the wider that gap becomes... not narrower. This is part of being an engineer: learning to communicate with diverse audiences.
Yeah but the challenge for me is that the higher up with the less knowledge has the final say and I have to convince them as much as possible on why their idea is bad
Can you frame it in terms of cost and time?
Or just a simple pros and cons
Also remember the triangle of business:
Fast
Cheap
Quality
Pick two at the detriment of the third
Interesting. I never heard of this.
Also to add what I said previously: I guess this is part of being a specialist. System designers in my company also deals with the similar challenges as me. For example, they speak with consultants of the client and tell them “the measurements out of place” and the consultants respond “just keep them.”
This is challenging because if a client makes a complaint about the installations from the drawings, It falls back on the system designers.
This is always the case.
If the client is providing the drawing and they do not accept the feedback, that usually goes into some meeting minutes with who decided it
Later if they are demanding a fix for free, you can show who made the decision and when
The irony of this is there's a fourth dimension: features. This is usually my fight: they want to talk cost/time/featurss, but forget about 'good' / quality
OneNote's integration with Office meeting minutes is great for this. It usually includes the invited participants as a checklist
That's true. I usually view the scope discussion as separate but usually the most important
One of my first mgmt jobs was literally this: the predecessors had spent all their times arguing features/cost/time.... even tho cost (people) was fixed and time was set by mgmt and the only variable was features.
My predecessors were gone -bc- the quality was terrible.
Mind you: this was a huge engineering organization that should've known better. Everybody four levels above me were far more experienced than me/etc.
Anyway, the conjoined triangle of success is all I believe in now. (before someone looks it up, this is a joke, from the great documentary: Silicon Valley)
I find my self less happy with deepseek and more happy with openai losing their shot over it
Its a cool project, I am trying it out
The problem running local AI models is how much power they need
Even tiny 8b models max out a 3070ti/5800x3d combo
Anyone want a python buddy
Nope, especially not someone spamming the same message across channels
is that quite understandable thingy? just been thinking of a thing and it very lacks scripting… yk…
main(){
in() <- inp;
thing = "abc" + inp + (6 - 0x1 / 2.7*6);
arr = [];
x = 0;
<5>|
arr[x] = x*#;
x++;
|;
<thing>:(
out() <- thing;
)?(
out() <- "error";
);
};
I think I understand it, yeah
so what it does? and what doesn't?
I think it would print "abcyourinput3.77777", after computing (but not printing) something like [0, 1, 4, 9, 16].
wait if our world is an object, that means "world" is a class --which means that the possibility of there being lots of "world" instances is...high
first one - yup
second is a bug, which i fixed
do the locally ran models self-censor when you tell them to output "Xi Jinping"?
Idk man why do people talk about those models like their primary use case is explaining what happened in 1989
22 trillion dollar market just to make an ai that prints photos of tankman
because funny
ask Chinese model about 1989
ask American model about 2001
Billions of training dollars well spent
just like john ai intended
Considering P is a large prime number, would this work as a decent hashing function?
def hash_str(a: str) -> int:
return sum([ord(character) * P ** (i+1) for i, character in enumerate(a)])
what is the purpose of the hash?
Used in a hashmap
too expensive
ooo, is it because of the **?
I'd at least do pow(P, i+1, 2**64)
which will keep you from overcalculating
since you probably don't need hashes over 64 bits
Ah
this is just https://en.wikipedia.org/wiki/Rolling_hash no?
A rolling hash (also known as recursive hashing or rolling checksum) is a hash function where the input is hashed in a window that moves through the input.
A few hash functions allow a rolling hash to be computed very quickly—the new hash value is rapidly calculated given only the old hash value, the old value removed from the window, and the ne...
polynomial rolling hash in particular
Rolling hash is useful when, well, you roll it. Calculate next hash from previous
and from a prefix sum you can compute the hash of any substring in O(1)
i thought this was referring to software licenses
as in you were not allowed to use regexes if your codebase wasn't GPL'd or something
why are all of the incidents twitter links
because blogs are for old people
is there any gtk theme for catppuccin that isn't archived
bruh what?
I absolutely fucking detest the js class names package
my Co worker keeps installing it
dude its only a bit more complex than is-number
what the fuck is wrong with front end devs man
they love verbose code that does nothing
The what package
their implementation is 50 lines
but you can do it in 1
heres my 20 line impl of it
function parseClassNames(...args: (string | (null | undefined | false| string[]) | null | undefined | false)[]) {
let seen: Set<String> = new Set();
args.forEach(arg => {
if (!arg) return;
if (Array.isArray(arg)) {
parseClassNames(...arg).forEach(seen.add.bind(seen));
return;
}
arg.split(' ').forEach(seen.add.bind(seen));
})
return seen;
}
const classNames = (...args: (string | (null | undefined | false| string[]) | null | undefined | false)[]): string => (
Array.from(parseClassNames(...args)).join(' ')
);
console.log(classNames('asdas', 1 === 2 && 'bong', 1 === 1 && 'bing', ['saba', 1 && 'amogus', [], null, undefined, 'sus amogus', 'sus']))
I thought you said it could be done in 1
you can do it in one but its cleaner this way
here is a 1 line impl but it does not deduplicate classes in the same string nor does it recurse
those arent necessary tho tbh
function classNames(...args: (string | false | null | undefined | string[])[]): string { return Array.from(new Set(args.flat().filter(Boolean))).join(" "); }
console.log(classNames("btn", "btn-primary", "btn")); // "btn btn-primary"
console.log(classNames("alert", "", null, "active", "alert")); // "alert active"
console.log(classNames(["header", "bold"], "bold", "fixed")); // "header bold fixed"
Why the fuck would you need a package like that
Js devs make packages out if anything nowadays
Probably a classic case of "I have no idea what the rules are here beyond space separated words, so I'll let a library figure it out"
Maybe there's some sneaky edge case which needs to be handled properly
@vale raven 
What did I do??
🔫

@harsh tundra

it's meant to do whatever this is with react https://github.com/JedWatson/classnames?tab=readme-ov-file#usage-with-reactjs
i would go on a rant about closed platforms right now but that'd make me look like a hypocrite considering the platform i'm using righ tnow
i have not read The Fine Tweets but if it's short enough to fit in a tweet (or thread) surely it could be embedded into the incidents webpage
I was joking
Probably to give the original source more visibility
Shenanigans
I know what it is, I just hate that people import shit that takes 10 mins to implement 
yeah it's also great to keep adding depencies that we absolutely do not need
especially when we ship shit to the client and bundle size matters
same here
dude its so annoying
import tkinter as tk
from pynput import keyboard
class KeyCounterApp:
def init(self, root):
self.root = root
self.root.title("Key Counter")
self.key_count = 0
self.key_count_label = tk.Label(root, text=f"Key Presses: {self.key_count}", font=("Helvetica", 16))
self.key_count_label.pack(pady=20)
self.reset_button = tk.Button(root, text="Reset Counter", command=self.reset_counter, font=("Helvetica", 14))
self.reset_button.pack(pady=10)
self.quit_button = tk.Button(root, text="Quit", command=self.quit_app, font=("Helvetica", 14))
self.quit_button.pack(pady=10)
# Start listening to key presses
self.listener = keyboard.Listener(on_press=self.on_key_press)
self.listener.start()
def on_key_press(self, key):
self.key_count += 1
self.key_count_label.config(text=f"Key Presses: {self.key_count}")
def reset_counter(self):
self.key_count = 0
self.key_count_label.config(text=f"Key Presses: {self.key_count}")
def quit_app(self):
self.listener.stop()
self.root.destroy()
if name == "main":
root = tk.Tk()
app = KeyCounterApp(root)
root.mainloop()
is this keycounter lowkey ok?
wait how do I paste like a copy thing
im a idiot
sorry guys im a begginer
you s so this to make your code neat
def amogus(): ...
oh
this prevents discord from messing up markdown
silly me i am deeply sorry
npnp
im stupid
im stupid x2
import tkinter as tk
from pynput import keyboard
class KeyCounterApp:
def __init__(self, root):
self.root = root
self.root.title("Key Counter")
self.key_count = 0
self.key_count_label = tk.Label(root, text=f"Key Presses: {self.key_count}", font=("Helvetica", 16))
self.key_count_label.pack(pady=20)
self.reset_button = tk.Button(root, text="Reset Counter", command=self.reset_counter, font=("Helvetica", 14))
self.reset_button.pack(pady=10)
self.quit_button = tk.Button(root, text="Quit", command=self.quit_app, font=("Helvetica", 14))
self.quit_button.pack(pady=10)
# Start listening to key presses
self.listener = keyboard.Listener(on_press=self.on_key_press)
self.listener.start()
def on_key_press(self, key):
self.key_count += 1
self.key_count_label.config(text=f"Key Presses: {self.key_count}")
def reset_counter(self):
self.key_count = 0
self.key_count_label.config(text=f"Key Presses: {self.key_count}")
def quit_app(self):
self.listener.stop()
self.root.destroy()
if __name__ == "__main__":
root = tk.Tk()
app = KeyCounterApp(root)
root.mainloop()
is this keycounter lowkey ok?
yay
i figured it out
im finnaly not stupid anymore
well kinda
bruh im still stupid
im giving up
i dont give up coding i gave upl in the that idea :)
#1334584046759444554 if you are free
Has anybody use DAKBOARD? How can I use Python to send API requests to a service to display the data on the DAKBOARD?
I don’t know that name
But I see https://documenter.getpostman.com/view/8098574/SVSGNAGs
You can click change the code samples from curl to Python
Ah yes! I was reading that an hour ago. I forgot to post an update
👍
You can use a Raspberry PI as a device for this
One of my co-workers uses DAKBoard for it but I have a hard understanding how the Raspberry Pi gets incoroporated into the whole thing
Yeah that’s not super clear to me either just looking at this
My co-worker wants to have a visualization of the remaining projects that project managers have left to complete on his DAKBoard from ConnectWise. This sounds like a cool project to me
shut
@elfin holly how would you feel about a merger between romania and moldova?
We jost got in Shengen, with Moldova's corruptions, we would be out of it too soon
Interesting.
I was just visiting family in Ireland, and for the people there who want to unify the island, it seems to be a matter of principle more than anything else.
Well yeah, we had problems getting in Shengen because of illegal ciggarate traffic at our borders
people would just go to Moldova or Hungary and buy ciggarates at a much lower cost and import them in the country. And the authority at the borders would just get a share and let others pass
they would end up making 4000 euros a month, where the minimum salary in my country is around 500 euros
Wdym by principle?
they want ireland to be unified because they disagree with the reasons it wasn't unified initially. not because (for example) they think it would be better economically, or some other reason like that.
Nowadays, a great part of my country just seeks it's better and own interest
Ah
Seems the whole world is going into isolationist mode kinda
Wait we talking about politics?
Or just me?
Or am I being dumb?
I know politics isn't for everyone and it doesn't help fuelling the fire and all
Oh well you could argue it's psychology because Stelercus was interested in the motives of people from my country to merge with Moldova
but usually people around this server are quite wise and could actually hold a real debate in politics without getting offended much
Romania
Ah
I know only my local, state and national politics, maybe UK politics and Canada's politics
America seems to be in the news alot around the world
Well cause of the 47th president
oh, where do you live?
how can I start my coding career?
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
wait I should type this in career discussion
oh probably yeah
yeah :P
oh that's interesting, quite cold around there
Yeah
So is Alaska a good place to live? How are the people there?
Kinda alright kinda not really living up here depends on how you want to see it, we are friendly and help our neighbors the best we can to an extent
Depends how crazy you are
If you born here in Alaska +10 crazy, +20 if you remain here all your life
and which type of crazy are you?
im the type for crazy that when he types print(smth) forgots to put the "
Born here, raised here so +20 crazy
You either like it here or you can withstand the coldness
and what's stopping you from moving out to another country?
can someone give me a side project ideea?
!projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
heh now you do
ya
maybe there cheaper countries, you do not need to go to US
should I do my english homework?
Also being an American barley knows how to speak another language
My german isn't the best
you will catch latin languages easily
depends
je parle francais
well its kinda boring
idk if I will do it
i mean i kinda hate english in general but yeah I gotta do an exam on it so i gotta study
A couple types of English Speaking American English, British English, Irish English and Australian English
that's some real mix of english
well I speak british english but I dont have the pronountiation
oh well, its the one taught in schools
so you do not have much a choice
but I know it pretty well
well its a second language for me
my base language is Romanian
do you have any certifications for it?
cambridge B2
good
wait sorry B1 I HAD 159 POINTS
dayum
how unlucky
and im still mad
maybe you can get the C1 next time
heh yeah
I would also like a degree in fench
well Kinda
if you spend a few of months in a foreign country you will learn common words easily
An old saying "practice makes it perfect"
indeed
yeah, but you would need a job in order to keep practicing what you like
otherwise dying of hunger isn't that pleasent
Yeah
yeah you need the financial support
eh I've been through worse
do you have any passions you could make a living from?
coding
do you have a portofolio?
I'm more of a car guy
2 or 3 discord bots made in javascript and many many side projects
So working on vehicles is good
btw I like to cook
Was a computer geek back in school now I'm a car guy geek
:)))
Lost my touch of coding
I'm more of a hands on learner now than a book worm
So working on vehicles is a better learning outcome than reading a book
idk about that dude
less physical work and more money better then more physical work and less money
I mean you do whatever you wanna do
setting up emacs language servers with eglot is the most tedious yet satisfying task ever
peep the wip
You might find the :hook keyword useful https://www.gnu.org/software/emacs/manual/html_node/use-package/Hooks.html
Hooks (use-package User Manual)
and rather than starting clangd you can just use eglot-ensure
here is mine
(use-package eglot
:hook ((haskell-mode . eglot-ensure)
(c-mode . eglot-ensure)
(racket-mode . eglot-ensure)
(python-mode . eglot-ensure)
(rust-mode . eglot-ensure)
(java-mode . eglot-ensure)
(clojure-mode . eglot-ensure))
:config
(setq completion-category-defaults nil))
There is almost certainly a better way to write this but I never became proficient enough in elisp to know how to reduce the eglot-ensure's and map them to all of my different modes
ty
idk but this is really bad text
Open a help thread and show how you created. May not be a font issue: look at how the circle is pixelated





