#serious-discussion
1 messages · Page 118 of 1
So the box is in the circle
As long as the circle is large enough, it could be
Lol, perhaps even lmao
the smallest infinite ordinal
good evening
bad evening
something
bad night
aigr
$bad morning$
$\text{bad morning}$
Yone
$\input{...}$
lol
aigr
,help
A brief description and guide on how to use me was sent to your DMs!
Please use ,list to see a list of all my commands, and ,help cmd to get detailed help on a command!
,list
Use ,ls to obtain a briefer listing, and use ,help <cmd>to view detailed help for a particular command, or ,help to view general help.
If you still have questions, talk to our friendly support team here.
Render LaTeX code and configure rendering options.
tex: Render LaTeX code.
ctan: Searches the ctan
texdoc: Searches the texdoc
autotex: Toggle whether your LaTeX is automatically rendered.
preamble: View or modify your LaTeX preamble.
texconfig: View or modify your personal LaTeX rendering options.
guildpreamble: View or modify the guild's default LaTeX preamble
Guild administration
config: View and set the guild configuration.
rmrole: Deletes the provided role
disable: Disable commands in this guild.
editrole: Create or edit a server role.
autoclean: Automatic deletion of messages in the current channel.
forgetrolesfor: Forget stored persistent roles for one or all members.
Ugh It sucks that nobody in the latex community seems to care about targeting epub/html/mathml
I realized after reading a well typeset epub book that epub is so much superior to pdf.
It's like actually responsive (i.e. works on different screen sizes)
Say more?
he is going insane
what are you gonna do

I too am going insane
High on catnip?
Is there any way to get good at something like induction proofs where I cannot just apply the same way every time ?
feels rather impossible
play more
I mean you get good at induction proofs precisely by using this technique in lots of different contexts
it just comes from practice
Usually its like you find a nice factorization
Or if its in context of textbook problems the hypothesis sets you up for an alley-oop
it feels like the biggest brick wall in terms of mathematics that ive hit
If the induction is not working, a good trick is to assume more stuff
yeah theres no golden ticket here, just practice
Where did people find work post graduation?
I've been to a few career fairs at this point and no one seems to want someone who studied pure math rather than applied and doesn't want to get a PhD in math
how are your programming skills?
what exactly are you looking for?
I finished my math degree last academic year and have not found a job that would only require you to do math besides teaching
without a grad degree it kinda sucks man
Mainly something that'll pay ok. I want to work a few years and then go pursue archeology tbh
I am personally planning to pursue my PhD next academic year
probably data analyst
the entry level jobs aren't glamorous
I can do basic Python and Matlab but that doesn't seem to be enough
try doing some machine learning projects or something
learn sql
apply for data analyst
or really start working on programming skills and get an entry level SE job
Data analyst definitely seems more plausible to me
Competition seems pretty rough though even then
Yeah, I plan on doing a PhD in archeometry at some point
But I'm burned out of school atm
I think this is generally true
But I definitely need a break. A 9-5 is heaven compared to academia hours
my undergrad hours were pretty light until my last year
I did two internships and they felt like a lot more work
mine were pretty different
one was in data science industry and the other was research in mathematical physics
If we count research I guess I did material science research
But that was just straight up academia so I don't think it informs my thinking on traditional jobs
fair enough
hi
Hi @Star,
Nice to meet you. I am planning to learn ML more, Could you recommend learning course for it?
@long matrix
Hi @deep mango , Nice to meet you.
what do i have to do with this
no u
What is Kaguya pfp?
This pfp
Regrettably i do not know any ML courses blackstar
Have you checked out the server linked in #old-network

Which college are you studying at @deep mango ?
NYU
Sort of. I don't officially have one but ive completed everything to get one
I see.
So now im working on a phd, but NYU will give me a masters sooner or later
just buy one

What kind of job are you looking for after graduation?
Maybe professor, maybe working in atmospheric/oceanic modeling
My math is fluid dynamics math
damn i need to make a :rycnerd:
I also have master's degree in construction field.
you work with PDEs?
And much interest in physics and mathematics.
Wow, nice
Thank you.
Yes, mostly
wow you have my utmost respect
Navier Stokes equations 
whats that
Yesterday I had oral exams, which is where a bunch of professors asked me PDE and analysis questions at the chalkboard
I don't even know what about it was so hard
2 one-hour exams
it was just HARD
(chalkboard haha)
I had two oral exams for one of the classes
I actually did decent on those
but man it was so hard
Yeah I agree. I took PDEs in my first year of bachelors because it sais ir only required lin alg and multivariable calculus
Very rude lie
Totally required analysis
It was so hard
I got like 60s on the midterms
And then the final overrode the midterm scores
And I got 100 on the final and have always been super good at PDE stuff since 
chad
Yeah i was surprised at how fun it was when i was actually doing it. But so stressful
just do numerical analysis and say you are experienced in analysis
I wish I understood numerical analysis too tbh. That's cool shit.
Numerical analysis is good
Idk what sort of math you're interested in
I would also like to understand PDEs someday
morning
@deep mangofan
Yesterday at the bar we were talking about how there's no actual algebra in physics
It was pretty funny
Being in such an analysis heavy department really fucks with people's perspective
no fucking way
are they just ignoring
particle physics
They think the rep theory involved is not actually nontrivial algebra
And that the categorical descriptions are superfluous
And that in the end, all the algebraic machinery going on in modern physics is just there as a bandaid while we can't justify the analysis
Or come up with proper analytic descriptions
Hot take: there is no math in science
This is exceedingly false
woah it's almost like it's a joke
its ryc. cant be
I'll pass sorry

Having done 2 years of physics I definitely saw myself noticing algebra concepts being useful in scarce amounts.
When I took a rep theory of finite groups class we had a report where we went and researched a topic in the area and I did an application to quantum system with tetrahedral symmetry
i.e. A tetrahedral lattice
Algebra is useful quite a lot in physics
Fast typer
I only saw two years so only took quantum, EM and CM class
But theres very obvious analysis applications. Hilbert space inserts itself pretty early
so true
7+(-11)=?
Doesn't Urs Schreiber do some physics? And he does categorical stuff 
If categories can find use in physics so can other areas of algebra
yikes
@placid robin -4
"physics"
Nah.
Guys is it normal to be totally clueless when reading math textbook?
I do just fine with learning the stuff from lecture or just through calculating and thinking
but textbooks.. omg... its impossible for me to learn
if you've never read a textbook before, yes
I have so that makes it even worse
tmux is cool
@compact rune try how to ace all algebra or geometry in big fat notebook
are those american books?
Maybe
I am from Denmark and the books from my university are written up last minut eby teacher
wtf i cant post pic
university
Like math 1,2
mhm
complex numbers, gaussian elemination, induction proofs, recursion, eigenvalue something
so base level mathematics for university
will write that down, thanks
its not that im having a trouble solving exercises, its more just that the book feels unreadable
even for topics I understand very well I feel like it is not giving a clear view of the topic
you realized the grading is not always understanding-based
grading is a scam
Not understanding math is fine
You never gonna use it if you're normal
whats the alternative ?
they set u up, my pdes didn't have a ton of analysis until the end
guess it did ya good tho. put some chest hairs on
Mastery.
what ?
if you are studying applied math then yea maybe try to understand it
if you are an engineering student then it doesnt matter

you can always learn on the fly
you will forget everything you've learned soon
at least thats how it is for me
(i am not passionate about engineering or school in general)
basically what they talk about with mastery grading. but not letting you pass unless you get a 100%
Depends on what software you're engineering
I like that idea
so you think people should get a 100 ?

Yeah i had a really smooth time with undergrad analysis courses after that
yes. passing people when they don't understand everything is dumb and counter productive
school should only be base level information. the rest should be gained during internships
especially in math when everything builds on to each other
thats how mechanics, plumbers and other blue collar do here and it works well
somethin similar happened to me. my intro to analysis 2 course tore a whole hole in me. grad analysis was so easy after that, and a handful of other courses
No
and this 100% is calculated through ?
honestly I would not bother going to university to master 100% of a math class when about 2% of the subject matter is something I will work with later in my life
your idea is only relevant for those studying pure math, pure physics, pure whatever
it ain't always about the math itself homie. you're also building critical thinking skills and logic skills too, which is good for any field of academia
math has that kinda power
assuming everyone want to continue in academia
)
subject based tests that you can take at anytime
nah logic and stuff just useful in general
and so is problem solving
anytime and with help from internet or supervised?
Anyways I am probably not the right person to ask. I despise university
are you taking calculus 1 or what?
this does not pertain to math.
you think youll use more than 2% of an Eng lit degree or something?
or a history degree perhaps
no
and no
thats why i dont take an eng lit or history degree
what jay said is very true
its about the thinking skills
gained from mathematical maturity
Living with one of those
rn
and you can argue the same for other "useless" degrees out there
research skills, etc etc
Skills are always obtained through life in whatever you are doing.
she’s like “this argument is bad because the author sounds like they don’t have enough experience”
Let me put it another way - I have almost never heard someone with a math degree say they regret taking it.
Either we're all coping or...
It’s such a weird objection to me
I've never heard anyone with a degree in something say they regret it
A statement’s truth value doesn’t change if someone else says it

Indeed. then.
I am just not a fan of spending the amount of time we currently do at the universities and colleges
I want to say it’s not enough time and things are crammed in there
agreed
“an expected response is pointing out that the author doesn’t look credible here”
because they haven’t spent enough time with the subject
If I tried that as a criticism of something in philosophy or math, I’d get a failing grade
Why is discussion stunlocked with sophomoric navel gazing recently
what does undergrad mean in european terms
Which European country?
I mean idk how chickens feel about their lives… maybe short but meaningful/horrible etc but now I know how one of them feel
Denmark
Oh, that’s easy
what
Left as an exercise to the foreigner
But… longer than a fly? Hah
Undergrads do not have a degree.
Graduates do
They are born, spend about a day and gone!

you can have an undergrad degree, though

but then you aren’t an undergrad
Yes and once you have an undergraduate degree, you are a grad.
✨
I also don’t want eternity spent on discord… if there was a hell
Depends. Usually 4 years, although I understand Cambridge and Oxford have 3 year degrees
Hey guys need some advice.... I took my first karate class and to my suprise, one of the instructors is one of the professors that i have in one of my current courses what should I do?
beat the shit out of him
Hes like third degree black belt while im not even ranked lmao
But the situation feels pretty awkward to me
no
He clearly wouldn’t, he’s a karate instructor
so how long do people need for a graduate degree? 7 years ?
assuming he knows his shit, he won’t care
yes, but this isn't "personal life" this is karate class
True
Depends
It was pretty awkward when I said hello

In the USA, there are PhD’s and Master’s degrees
you'll get used to it
Master’s degrees are generally like 2 years
hey, maybe this is your chance to get all buddy-buddy with the professor and get a grade boost 
and PhD’s are as long as it takes for you to publish a dissertation
Assuming you don’t fail to do so within a reasonable period

shitty joke i do in school:
i ask random people "is there hope in this world in this world or is it all just suffering"
and either go "YEAH HOPE GANG" or "YEAH SUFFERING GANG" depending on their answer

I wanna make software for digital fingerprints and mass surveillance. Hopefully linear alg and discrete mathematics are all i need
along with the required software courses
fed spotted
I need a shit ton of electronics for a piece of software?
yes
all of what ur refering is done through hardware interfaces
just let it into the wild
theres no way around it
malware is done through hardware interfaces ?
yeah that kind of thing + just mass scanning data
good
the future is online, old man
yeah discussy is having its thing right now
Currently getting a degree in AI
@chilly hull my initial approach would have been to show that either U_e or U_o (subspace of even and odd functions on R^R) was inf. dim and since R^R is the direct sum of them but i think that would have been a harder exercise than what axler intended lol
yeah but arent we working with C[0,1]
axler has some fun exercises NGL.
form an inner product on C[0,1] and then generate a polynomial basis
you cant get to higher degree polynomials with just addition
there's another one i did today where it was: Suppose we have polynomials p_0,...,p_m in P(F) and that for each p_j, p_j(2) = 0. Then p_0,...,p_m is not linearly independent.
Fun fun
whats P(F)
polynomials with coefficients in a field F
ah i see
i was on the cusp of calling it trivial but i realize im doing the old math thing where you call things you understand trivial after the fact

i probably cant do this problem off the top of my head bu
do you want a hint
i wpold probably try induction
actually the hint is the whole problem pretty much
nah
i mean, prove the trivial case where p_0 is the constant polynomial and thus for p_0(2) = 0 then p_0 = 0, so obv linearly dependent
but you don't need induction for the whole thing
wait a minute
nevermind 
wait p_0 is always in p_0...p_m
so this is trivially linearly independant
as we can set p_1...p_m's constants to 0 and make the constant for p_0 whatever the hell we want
wait is that not the solution
because p_0 is forced to be the zero constant for p_0(2)=0
i dont see how you jumped to say that p_0...p_m is linearly independent
for whatever p_1...p_m'
for c_0p_0+c_1p_1+c_2p_2...+c_mp_m
we can make c_1...c_n 0
and c_0 whatever real number we want
and this expression would still obviously be 0
oh i see
i might have missed something in the hypothesis
let me check
OH
@chilly hull there's no guarantee that p_0 is the 0 polynomial lol
like p_0 isn't a stand in for a constant polynomial, it's just the 0th member of the list
anyways want to cut to the chase
oh so these are aribtrary polynomials
yes
in that case
oh and i did mistype too. they are polynomials in the space of polynomials over F with degree at most m
this problem is a lot wackier
here's what i did || factour each polynomial into (z-2)q_j, where the degree of q_j is one less than the degree of p_j||
oh SHIT i forgot you can do that
and then obviously each polynomial is in the span of any of the others so LD
it MIGHT be iffy, since technically axler doesn't cover factorization until later in the book

whatever, let's pretend this proof is valid with the knowledge up until this point because its slicker than the alternate proof
Greetings from laptop
There are interesting methods of doing this
but suffice it to say that it's not trivial
yeah i thought it was trivial based on jose's description
Of course, the most straightforward way is just to DIVIDE THE NUMBER FFS
but there are tricks, of course
hmm
For example in base 10 we can very easily determine if a number is divisible by 2 or 5. This is because 2 and 5 are the factors of 10.
could you prove this using FTA 
If you want to figure out whether or not a number is divisible by 9, there's also a trick: sum the digits. This will preserve the equivalence class modulo 9
There's a similar trick mod 11. I leave it to you to think about this.
I was interested in trying to find a general method for any number coprime to 10, for example trying to come up with a method to check divisibility by numbers such as 17 and 19
And there is such a thing, yes
If you're interested ig let me know

🤨
Cat King Breadinark 
why is mol a unit
Because it's very useful for doing chemistry.
`
🐟
Yo anybody got algebra pdf from the fat notebook series.?
fat?
Yeah
C: ty!!! omg me too!! And eevee omg!!! So cute
pro-tip: if you post this in #discussion you get massive discussy cred
👀wait what
Im gonna go study mode soon
The indoctrination oml
gotta get to her before the mods do
what is happening in december
I'm visiting Alex and Kim
The revolution
it won’t let me post pics yet lolol
Yeah you have to have an active role or similar. Hold on
huh is this really kim
Bruh its so sad i was in the area over the summer... didnt get to meet kim ithink mabe u were at work or sth
anywayz
discussion doesnt allow submission of picture hmm )
hi
dani got all her friends on mathcord
I got a few here too but they're too busy in elementary school to talk here
nice try
facts
wait wait
how do u ge this
!nt
!nice
!try
shoot.
@storm sage wake up and tell me how do you do that
nice try
the lol
fr
how
is someone messing iwth the bot
again
@quasi jetty
!factoids
nice try
shiN is not active currently I think
lol wasn't me
hi
helo how's you
god u
hmmm
I'm fine
good
same here
hype
what are my plans for weekend? probably just sleeping and studying 
It just feels like friday's coming too much
Is it only me? 💀
!nt
@neat lintel come here.
@proud olive @sonic field
This like the cutest gif I seen
Gotta shake off all the snow
I forgot that I can't post pics here
yall can help me out with a question ? no one showed up in the help channels 😦
hello everybodyyy
I'd like to help
hi void
!help
To ask for mathematics help on this server, please open your own help channel or help thread. See #❓how-to-get-help for instructions.
🥳
hey friends , i cant seem to solve a problem can u help me out ? it says : proof that v is a solution for the diffrential equation (y'-2y=0) only if v+u is a solution for (y'-2y=xe^x) where u(x) = (ax+b)e^x
@cloud wraith am back now !
!help
To ask for mathematics help on this server, please open your own help channel or help thread. See #❓how-to-get-help for instructions.
Very cute manul
💀 ? 1200 defensive uses of a gun
75,000 non defensive deaths/injuries
which would you get rid of: shiny fidget spinner, notebook, granola bar, or bouncy ball?
shiny fidget spinner
guy guys what does everyone think about this video it is super accurate to the 7 levels of math or? https://www.youtube.com/watch?v=EPe86sveyRY
Discussing the 7 levels of Math.
What was your favorite and least favorite level of math?
00:00 - Intro
00:50 - Counting
01:42 - Mental math
03:02 - Speedy math
03:51 - Adding letters
04:54 - Triangle
06:09 - Calculus
07:25 - Quit or Finish
In all seriousness it's mildly shocking to see a video that refers to calculus as "the final boss of math". I sometimes genuinely forget that laypeople literally don't know what math is after calculus
horribly inaccurate
I was trying to emulate the highschool-discord random-poster writing style in that message. Was I successful?
Oh fuck you're right
But calculus is like, the door knob
the 5 levels of math:
you just find math funny elementary school stuff (stages 1-3)
you lose faith in the american education system middle school-high school stuff (stages 4-6)
you realize that math is cool (early undergrad)
you realize that math is VERY cool (late undergrad)
you contemplate your life (graduate+)
but yeah
this video makes me kind of sad
It is a rather sad video
This book is so hard...
I'm gonna cry
what book
Don't tell me LibreTexts gave you a hard book
Oh, maybe i'm crazy
I saw this problem in the chapter about integers and bitewise operators
and thought they wanted me to do this entirely with bitwise operators
Ehh... I mean calculus is one of the easier parts of uni maths though assuming you're not doing proper analysis.
I finished all of calculus in a week
lol
Spin
try doing $\int \sqrt{\tan(x)},dx$
Exiled existence
are you done?
No human being can finish all of Calculus in their lifetime
zzz
I'm at calculus 11 rn and it took me a long time to get here
this is calculus 12
Yo among us spotted
more like physics
at least I understand math but not physics
when the equation is sus
because it helps with higher level matheamatics
Isn't that the Lagrangian of standard model or something?
nice
another question
what happen if I fail a midterm in college? Idk, I’m confident but at the same time Im not

yep 

cmake 
what happened with cmake pika?
i see
let's say there's a right angle, and you're trying to find the cosine of 90 degrees. What do I do if I'm surrounded by two adjcanet angles?
Idk, all the content was already taught and if I “failed”, maybe I need to take over for 2-3 months i don’t know
But Idk if I passed or not
Wdym
i think he meant 2 sides and both with adjacent
and Idk if that’s possible
I feel is not but idk
I don't understand
hi im joe
Cosine is adjacent over hypotenuse
So, if I’m trying to find the cosine of 90 degrees, where opposite is hypotenuse and both legs are adjacent, which adjacent side do I choose?
I don't think there are ever two legs that are adjacent to the same angle in a triangle

That memorization is only for right triangles
and the angle used must be the acute angle
for other values, draw a unit circle
i love balls (sports)
sOHcAHtOA..
That's not solvable, there is no opposite since in the case the opposite is the hypotenuse. You need to find the other angle
are people pretending to understand the question or maybe im just thick
They're trying to calculate cos(90 degrees) using the adjacent/hypotenuse definition
The issue is you get something that's not really a triangle if two of the angles are 90 degrees
why would both legs be adjacent then
mmmh, the analytic continuation of trigonometric ratio
nah dont do limits
one side has length 0
its 0/hyp for cos
= 0
but u have to accept this degenerate triangle
which tbh is a problem so maybe we use a limits argument...
well cos, sin, tan has domain (0, 90)
or if this is just lost cause
then you extend the definition to the unit circle
and now its [0, 2pi)
this trivially extends to R
hmm yeah the asker should wait for the syllabus tbh
in the end, the original definition wont work for general angles really
or C lol
is discussion 2 people more smart?
you seem to imply #discussion and #serious-discussion have different people; no
just less sample
!help
To ask for mathematics help on this server, please open your own help channel or help thread. See #❓how-to-get-help for instructions.
!da2a
No need to ask “Can I ask…?” or “Does anyone know about…?”—it’s faster for everyone if you just ask your question! See https://dontasktoask.com/
lol
You did this to us, you did it
Ello
can i ask why
I program in C so I always have to ask first to avoid segfaults
Can someone critique my proof 
https://leetcode.com/discuss/topic/4193860/easy-to-read-proof-included/
It literally explains why in the link provided
instructions unclear
programming killed discussy-2

we should petition to rename it to #programming
who needs two #discussions anyway
i didn't know google foobar still existed
what language did you use?
java
what was the question?
set difference between two sets with one having cardinality greater than the other by one
in a array of course
are there constraints like it has to run in linear time or anything?
there are but theres also constraints on libraries/modules/packages that can be used
if you use c++ can you use the standard library?
u cant use cpp
seems like just a few lines if you can
unfortunately
wha??
java or python
that's a nonstarter then lol
and u cant use collections
can you just sort the arrays and walk through them
so
heres the thing
the statement let it be explicit that u have A and B
and its either A contained in B
or the other way around
so you can just check their lengths to know which case?
that should be easy i think
and then u go through the array
if one of the ones in the greater
goes to the end
of the array with a lower cardinality
then thats ur match
i guess you could change the order of the array now that i think about it
so that it matches the elements already searched to the order in the array with the array your going through to find the element
and then you can start from the index in which ur at
is that what u mean @peak tide ?
could be something like this
im gonna make it in js really quick
offhand i think something like this
sort(A);
sort(B);
for idx = 0 to min(len(A), len(B))
if (A[idx] != B[idx])
if (idx + 1 < len(A) && A[idx+1] == B[idx])
// A[idx] is in A but not in B: report and return
else if (idx + 1 < len(B) && B[idx+1] == A[idx])
// B[idx] is in B but not in A: report and return
else
// something wrong
// no mismatch found in loop, so the last element of whichever
// array is longer is the one we want
you can make the logic somewhat easier by swapping the arrays so that A is always the shorter one for example
const someArr1 = ["data goes here, ints"];
const someArr2 = ["data goes here, ints"];
let found = false;
let output = 0;
let currentIndex = 0;
for(let i = 0; !found; i++){
if(i===someArr2.length&&someArr2[i]!==someArr1[currentIndex]){
output = someArr1[currentIndex];
found = true;
}
if(someArr1[currentIndex]===someArr2[i]){
i = currentIndex;
let tempVal = someArr2[currentIndex];
someArr2[currentIndex] = someArr2[i];
someArr2[i] = tempVal;
currentIndex++;
}
}
console.log(output);
assuming someArr1 is greater than the other
also i could not make manipulations to the length of the array
@peak tide
im actually finding more problems with that than i thought
zzz
thats wrong
@jagged forge
so idk if this is a wrapper
to a libc object
or their making this shit run recursively
i mean both are trash cause u should not be doing this stuff in python
but one is better than the other
seems like it's a wrapper
@jagged forge context https://github.com/Xilinx/PYNQ/blob/de6b6fc3a803945d59f8f06523addfe0d9b60a1c/pynq/_3rdparty/xrt.py
im trying to find the original source to wich it maps
meaning the c code
so
this is the xilinx runtime
apparently it is part of the xilinx runtime core library
yes
im trying to find that shit
the header file that generates the so
i think im gonna have to read god forsaken cmake files
welp
i think i found your header file
they use a call to a deprecated api
to make synchronization between buffers?
and this is actually in prod
like
im not crazy
this is bad right? @jagged forge
like no shitting on python
this is just bad SE
apparently the replacement apis are native c++ ones
where are they though?
which is unfortunate for anyone who isn't doing c++
idc
everything in runtime_src/core appears to be c++
i care because i don't want to write c++
but i am not using xilinx for anything so
oops responded to the wrong message
this is actually nice
mm
wait
exceptions
mm
i might have to check with phd guy on this one
like hes the cpp expert
im just making grunt work
im the gun
he shoots
having a c++ expert seems like a good idea
i think this is the xrt_device source
but i need to find the xrtSyncBO thingy
BO stands for buffer object
maybe it's in xrt_bo.h
yeah
was about to say that
this is going to be a fun weekend
this code reminds me of when i was looking at nvidia's smart nics
had to look at their "DOCA" library
lots of low level stuff about buffers and mappings and rdma
RIIR
i did not actually get to run anything with it sadly
Wait no
Direct to memory write 
maybe you'll get your dream of writing c++ and not python 
not having a c api tho.... sadge
now i can't write my rust wrappers 
write c# wrappers using unsafe 
well ideally you still need a c api to do that
c is like, the lingua franca
Name mangling

if you expose a c++ api that makes it way harder for other languages
most languages have a way to talk to c code
If only name mangling was less obscure with C++
Our lives would be much, much easier
well there's that and then how do you interface with templates lol
from other languages
(you don't)
generics are similar to templates in c#
the syntax is identical in terms of passing the runtime argument
thing is
in cpp u cant have anything thats not a integral type
as a type in your template
i am saying you can't have a generic function in another language that can call a template from c++
at least it is very very hard
u can
how
u just have to limit ur generic arguments to integral types
do you have an example of this being done
how does that answer my question... how would you invoke a c++ template from say c#
this is just docs on c++ types
u invoke it through a unsafe
code block
and make it explicit that u can only use the generic types
in ur class
then wrap a exception if the generic class is instantiated with anything but integral types
do you have an example of this being done
Guess MS really thought through with this.
that still doesn't show calling a c++ template from c#
Yeah C# is just C++ with an extra ++
i would be willing to bet there is no way to call c++ templates from c#
yes i see c# code that calls c functions here
ur right it does look like that
let me keep looking at dotnet runtime
so technically
it can be done
i have not found examples though (people do despise cpp for some reason)
im not sure what im supposed to take away from this code
interop services is the class that is used for making the wrapper
they give an example in visual basic
from a c++ dll being called
if it can be called from VB
it can be called from C#
cause its part of the same runtime
i am asking specifically about templates
@jagged forge T_T https://stackoverflow.com/questions/6059838/calling-c-template-function-from-c-sharp
guy looks legit
yeah that is what i thought
why does it have a lil amd logo
oh thats his pfp
If it does, I would call it black magic fckery
i mean its not like it has not been tried
I suspect they are compiled together there, which lets them access the mangled names
Also I guess carbon also has templates
I guess so
i don't think it has anything to with llvm
by the time everything is lowered to llvm ir i assume templates would disappear right
cuz it all gets monomorphized
Yes
But I think you can have some kind of source mapping
Idk how clang works tho
the only thing that i see sus right now with it
is google
since u know their track record is either hit it out of the park
or abandon it completely
well they did a good job with golang
and it's not like their abandoned products, because it is something they will be using internally
isntead of just some idea someone came up with to get promotion
golang had a clear application in mind
which is a plus
@visual breach by name mangling u mean namespace pollution?
Nah, completely different matter
Basically when you compile it to machine code, it is hard to predict the resulted symbol of templated procedure.
So it is hard to call them
suremark could correct me
yeah basically every compiler makes its own table of symbols
and trying to get one compilation that is a one to one map from a different compiler is next to impossible
at least thats what im understanding
yeah llvm doesnt have templates
i think carbon just mangles and stuff similarly to cpp
..huh. How would they do that
@visual breach @jagged forge https://github.com/nodejs/node-addon-examples/blob/main/object-template-demo/napi/proxy-template.h
Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html - nodejs/node-addon-examples
code that Will haunt u at nights
so
i think the case for c# is people rather not do it
that it being imposible
i'll research more
this looks like a handler you register on the c++ side to be invoked by a proxy in node.js
anyway yeah i don’t think it is fundamentally impossible for any language, just impractical for a number of reasons
@jagged forge https://github.com/dotnet/corert/blob/master/src/System.Private.CoreLib/shared/System/Span.cs not quite what i'm looking for
but it's the closest to having c/cpp directly in c#
could not find the implementation in the Main runtime
but i'm sure it has to be there since span is heavily used
check the unsafe methods
it's sort of c combined with generics
and some nicer syntax for handling value types
it looks like low level c# code
i am told video game devs use unsafe c# a lot
also, just to be clear, this does not look like c#/c++ interop
they also have to bind to the graphic rendering API
so there probably is some use of interop to do calls to directx, vulkan and OpenGL
unity must have code like that
c#'s ability to turn off it's runtime by having unsafe contexts makes it appealing
Ive heard rust has something similar
rust has no_std, which disables the parts of the standard library involving things like heap allocation as well as other os-related stuff
As mentioned before using
libstdrequires some sort of system integration, but this is not only becauselibstdis just providing a common way of accessing OS abstractions, it also provides a runtime. This runtime, among other things, takes care of setting up stack overflow protection, processing command line arguments, and spawning the main thread before a program's main function is invoked. This runtime also won't be available in ano_stdenvironment.
but you don't need to use no_std to write unsafe code that does interop with the os, hardware, or ffi
it's basically for embedded programming
or other cases where you lack an os
that is precisely why cpp is so powerful perfomance wise. There is no runtime
but that in itself
is also what contributes to it's complexity
i am pretty sure c++'s "runtime" is very similar to rust's
thats dependent on the tooling
for example msvc (Microsoft cpp compiler) does come with what we would call a runtime
gcc is more barebones
theres no enforcement of a specific build system or linker. Those are the only things i can think of right now due my limited knowledge
but im sure more can be modified
in this regard there is more content and documentation for cpp by the fact of just being longer in the market

