UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer. | We can haz pdf
<egg|paris|egg>
:з
<UmbralRaptop>
🐈
<whitequark>
another issue with your plan (which I did think of) is that I still have to convert VA and VB into value<>
<UmbralRaptop>
achievement unlocked: searching for an article and I can't find it on sci-hub
<UmbralRaptop>
Admittedly, the actual journal can't even give me a paywall for it…
<UmbralRaptop>
citation: Erasmus A. . , South Afr. J. Sci. , 2000 , vol. 96 pg. 475
<UmbralRaptop>
Weather/site survey for Sutherland, ZA
<whitequark>
egg|paris|egg: I'm going to spend the crime budget on writing a metaobject protocol for all this :p
<galois>
[WIKIPEDIA] Metaobject | "In computer science, a metaobject is an object that manipulates, creates, describes, or implements objects (including itself). The object that the metaobject pertains to is called the base object. Some information that a metaobject might define includes the base object's type, interface, class, methods..."
<whitequark>
so I have a module, which in this context is just a class with a bunch of value<> members
<whitequark>
to enable it to be consumed by non-C++ code, and also allow pimpl to be used without losing visibility of private values, I need some way for a module to export its list of values for introspection
<whitequark>
unfortunately, values are generic, so I need to somehow erase Bits
<whitequark>
the meta-value should at the most basic level be just `struct { size_t bits; ??? some way to go from value<_> to chunk::type* ??? }`
<egg|paris|egg>
well your value has a plain old array in it, right?
<whitequark>
yes, but also a base class
<egg|paris|egg>
hm
<whitequark>
it's not actually POD according to std::is_pod
<whitequark>
because it inherits from expr_base I assume
<egg|paris|egg>
yeah sure
<egg|paris|egg>
but I mean, you can still extract a pointer to chonk type from a value
<UmbralRaptop>
citations eggsist, but the article does not?
<egg|paris|egg>
UmbralRaptop: um
<egg|paris|egg>
wrong page number/misspelled journal/something like that?
<egg|paris|egg>
but it seems to just not be published here O_o
<egg|paris|egg>
weird
<whitequark>
egg|paris|egg: oh I see
<UmbralRaptop>
does [np] mean not published?
<egg|paris|egg>
maybe
<whitequark>
it's only non-POD because the default constructor zeroes the data member
<egg|paris|egg>
ah yes
<egg|paris|egg>
if you have a user-provided default constructor that's enough
<egg|paris|egg>
whitequark: is pod what you want though
<egg|paris|egg>
often trivially copiable + standard layout is good enough
<whitequark>
oh I see, standard layout enables offsetof()
<whitequark>
which is actually in the standard?? TIL
<whitequark>
can I cast a pointer to member to an integer (ptrdiff_t I assume) and use the result?
<UmbralRaptop>
(Erasmus does not seem to have done anything in ADS in 1999 or 2000, but there's a distantly related 2001 paper)
<egg|paris|egg>
whitequark: depends how you use it
<egg|paris|egg>
I think you can quickly summon aliasing monsters
<whitequark>
cast a pointer to an instance of the exact same class I took the pointer to member for, add the offset to the pointer, dereference the result as something layout-compatible with the member
<whitequark>
er. something like. `struct pod {...}; struct pod2 {/*layout-compatible with pod*/}; class c { pod m; }; c *p; *(pod2*)((uintptr_t)p)+((ptrdiff_t)&c::m)
<whitequark>
actually `pod` would be just trivially copyable + standard layout
<whitequark>
oh
<whitequark>
you just can't cast pointers to members to ptrdiff_t
<egg|paris|egg>
whitequark: yeah also mixing structs like that sounds UB
<egg|paris|egg>
when in doubt it's probably UB
<egg|paris|egg>
if some compiler writer could interpret it as being UB it's UB :-p
<whitequark>
isn't this the whole point of having layout-compatible types?
<whitequark>
ah well, i can just create the metaobject per instance
<whitequark>
then it's trivial
<whitequark>
ohhhhh
<whitequark>
egg|paris|egg: I can't do .as()
<whitequark>
share/include/backends/cxxrtl/cxxrtl.h:327:10: warning: returning reference to local temporary object [-Wreturn-stack-address]
<whitequark>
./uart.cc:237:63: note: in instantiation of function template specialization 'cxxrtl::slice_expr<cxxrtl::value<10>, 9, 9>::as<cxxrtl::value<1>
<galois>
[WIKIPEDIA] Orbita (TV system) | "Orbita (Russian: орбита) is a Soviet-Russian system of broadcasting and delivering TV signals via satellites. It is considered to be the first national network of satellite television.The Orbita system is based on communication satellites in highly elliptical Molniya orbits, as well as on many ground..."
<whitequark>
SilverFox: one reason for whitespace sensitivity in something like python is making nesting of control structures guaranteed to be visible
<whitequark>
it's not really conceptually different than, say, using english keywords rather than some arbitrary symbols to denote control flow
egg|cell|egg has quit [Ping timeout: 190 seconds]
egg|cell|egg has joined #kspacademia
egg|paris|egg has joined #kspacademia
<SilverFox>
wait, can the third argument of an if statement be treated like a ternary?
<SilverFox>
like, can you use a ternary in it
<egg|paris|egg>
mofh: ping
<SilverFox>
the third argument is just value assignment, ternary is value assignment, so me thinks it'll work
<egg|paris|egg>
mofh_: piiing
egg|paris|egg has quit [Remote host closed the connection]
egg|paris|egg has joined #kspacademia
<UmbralRaptop>
"In our continuous effort to improve communication of emergencies to the campus community, we will be transitioning to an “Opt Out” Mason Alert text message registration model from our current “Opt In” process"
<kmath>
<SARA_Obs> Interstellar comet Borisov, 38 minutes' worth of stacked R images, 27 November. 1-meter Jacobus Kapteyn Telescope (… https://t.co/rUBX5Ei8Lv
<SilverFox>
also i was thinking of a "for" statement lmao
<SilverFox>
wait a minute, a ternary in a for statement can be dummy powerful
<SilverFox>
for whenever you have something you want to increment through, but selectively based on conditions and perhaps not linearly
<SilverFox>
as an example
egg|paris|egg has quit [Remote host closed the connection]
SilverFox has quit [Ping timeout: 190 seconds]
egg|paris|egg has joined #kspacademia
SilverFox has joined #kspacademia
<UmbralRaptop>
<@egg> there should be a linter for unused definitions in papers >_>
<UmbralRaptop>
Relatedly, I sort of wish Python warned me when variables are defined but never used
<whitequark>
that one is pretty easy
<UmbralRaptop>
Is there a stock linter that I somehow missed? >_>;;
<UmbralRaptop>
hm 3rd party tools eggsist
egg|paris|egg has quit [Remote host closed the connection]
<e_14159_>
UmbralRaptop: pylint, for example, should warn you
<e_14159_>
As will PyCharm
<SilverFox>
UmbralRaptop, surely a good python compiler/interpreter would tell you if a variable is declared but never used?
<UmbralRaptop>
> python compiler
<whitequark>
pypy is a python compiler
<SilverFox>
IDE?
<whitequark>
i mean, cpython is also a python compiler
<SilverFox>
im high af rn
<whitequark>
frankly there's very little difference between compilers and interpreters in the first place
<whitequark>
Project Graal is a JVM library that turns any interpreter you write inside out to make it a JIT compiler with no additional effort
<SilverFox>
I want to make a korean interpreter for C#
<SilverFox>
so I can have the syntax be korean
<whitequark>
you probably want to make an alternative frontend
<whitequark>
since all you need to change is the keywords
<SilverFox>
no, if and while statements change order
<whitequark>
alright, still frontend
<SilverFox>
in korean it's <Verb> If, rather than If <verb>
<SilverFox>
or condition, rather
<SilverFox>
thats why I cant do a keyword swap
<whitequark>
and probably just the parser
<SilverFox>
I dont do this for a living, not hip with the lingo the kids these days are using
<SilverFox>
talking about parsley and front-end loaders
<whitequark>
that lingo is significantly older than me lol
<whitequark>
but sure
<SilverFox>
lol
<whitequark>
just telling you which specific component you want to alter
<SilverFox>
idk man
<SilverFox>
also tryna put a uhhhhhhhhhhhhhhhhhhhhhhhhhhhh function in a ternary
<SilverFox>
I remember being able to define a function inside a ternary, but I forget how I did it
<SilverFox>
prolly via anonymous functions or something
<whitequark>
if you can turn your korean c# into normal c# using a mechanical find-and-replace process it likely means you only want to change the parser
<SilverFox>
its basically keyword swap + order change
<whitequark>
sure
<SilverFox>
so it'd be ()IF, is the biggest change I can think of