#dev-general
1 messages · Page 421 of 1
which function?
function getSchema(request) {
let fields = cc.getFields();
[
'id', 'serverTime', 'hostname', 'online', 'productName', 'patchLevel', 'buildNumber', 'loggedOnUser',
'timezone', 'lastCheckin', 'appVersion', 'cloudProvider', 'instanceID', 'containmentState', 'realTimeStatus',
'intelVersion', 'intelTimestamp', 'ExdPluginStatus', 'exdContentVersion', 'exdEngineVersion', 'malwareGuard',
'malwareGuardQuarantineStatus', 'malwareContentVersion', 'malwareMgContentUpdated', 'malwareMgEngineVersion',
'malwareMgCoreEngineVersion', 'malwareProtectionStatus', 'malwareAVstatus', 'malwareAVQuarantineStatus',
'malwareAvContentVersion', 'malwareAvContentUpdated', 'malwareAvEngineVersion', 'quarantineActions',
'fips', 'proRemSvcStatus', 'kernelServicesStatus', 'machineName', 'uptime', 'regOrg', 'regOwner', 'platform',
'vmGuest', 'virtualization', 'gmtoffset', 'domain', 'primaryIpv4Address', 'primaryIpAddress', 'mac',
'totalphysical', 'availphysical', 'ExdPluginVersion', 'EndpointUIStatus', 'EndpointUIVersion', 'LogonTrackerStatus',
'LogonTrackerVersion', 'ProcessTrackerStatus', 'ProcessTrackerVersion', 'UACProtectStatus', 'UACProtectVersion',
'AmsiStatus', 'AmsiVersion', 'EventStreamerStatus', 'EventStreamerVersion', 'HostRemediationStatus', 'HostRemediationVersion'
].forEach(fieldId => {
fields = _getField(fields, fieldId);
});
fields.setDefaultMetric('online');
fields.setDefaultDimension('id');
return {
'schema': fields.build()
};
}```
oh god
and that went into my first switch
I don't really understand what it's doing, or what fields.build does
You just seem to be setting fields to the last result of _getField(fields, fieldId) in the first few lines
Or wait no
I got it
That should be a fold ig
a what now
Whats cc? @cinder flare
that's the Google Apps Script like thing
Alright
const cc = DataStudioApp.createCommunityConnector();
it seems like its just concatenating the result of every single _getField and then returning it
is it just me or does that look like JS
typescript
ah, the language that fixes JS
from what I've heard, the typing is very very strict in TS
yes, but optional
I gave up trying to type this whole file because it's not worth manually setting types for like the 2 functions I have
i don't even know what they are lol
oh yeah Yugi it did
because that function took it, added the dimension, then returned it
function getSchema(request) {
let fields = Object.values(configuration).map((value) => value.id).reduce((acc, id) => { acc = _getField(acc, id) }, cc.getFields())
fields.setDefaultMetric('online');
fields.setDefaultDimension('id');
return {
'schema': fields.build()
};
}
That should be it
Also
Now that I think of it
why are you ignoring the parameter?
request
seems to not even be touched on in the function
it only tells you the locale in this function
the api is weird I agree
in getData, it tells you what fields it wants
wdym?
it doesn't like it
id also Field?
no
string
oh also
remvoe the acc =
it should sut return the new acc value it seems
My bad
function getSchema(request) {
let fields = Object.values(configuration).map((value) => value.id).reduce((acc, id) => _getField(acc, id), cc.getFields())
fields.setDefaultMetric('online');
fields.setDefaultDimension('id');
return {
'schema': fields.build()
};
}
that we deprecated in favor of the object
What did you change it to?
Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
• HelpChat Paste - Usage
• Hastebin
add in this @cinder flare
function getField(field: Field, id: string) {
const section = definitions.dataDefinitions[id]
return (
section.dim(field)
.setId(section.id)
.setName(section.name)
.setType(section.type)
);
}
@jovial warren I'm on btw
What does the error say?
alright, lemme just grab latest and start it lol
oh wait what
ah reduce requires both to be of the same type of ts
thats annoying
Lemme check for any alternative
one min
👍
I was curious as to how you joined, then realised how
he hacked your network? ⌨️
try specifying the generic as Field star
Also in your original github code it seems to use different types for Field
original
import Fields = GoogleAppsScript.Data_Studio.Fields;
new
import Field = GoogleAppsScript.Data_Studio.Field;
sorry, the generic?
yes star
what would that be
@jovial warren
let fields = Object.values(configuration).map((value) => value.id).reduce<Field>((acc, id) => getField(acc, id), cc.getFields())
fields.setDefaultMetric('online');
fields.setDefaultDimension('id');
return {
'schema': fields.build()
};
}```
Also again
I think you may have an issue on the types you're actually using
Is it Fields
or Field
cc.getFields() returns Fields?
howdy
hi
what ya working on
Does getField also return a Fields?
If so specify the type as Fields
the acc and initial value must be of same type
change getField's argument and name to specify as Fields
The field parameter as well
hes working on some google appscript thing piggy
Im not really sure what its supposed to do
ah rip
okay so also typescript let fields = cc.getFields(); const fieldIds = request.fields.map(field => field.name); fieldIds.forEach(fieldId => { fields = _getField(fields, fieldId); });
how fix that
is this for your mongo/docker adventure
well its that _getField doesn't exist
change it to getField
oh wait can I just copy paste the other code
wait
oh i see
Why do you have the weird forEach thing
wher eis this from?
This is what reduce was supposed to fix
xD
What you're doing with that snippet is a weird version of reduce
no this is for helping my dad's company thing
a horrible mutable one
o
okay so should I copy paste the code from the other method into here
Yes
okay sick
for fields?
what
pretty much the same reason as we use final in java
change let fields = to const fields = ?
yes
oh uh
const rows = data['data'].map(dataPoint => {
return {
values: fieldIds.map(fieldId => _getDataField(dataPoint, fieldId))
};
});```
in getData
wha
What was fieldIds initially?
name of function?
oh no it was const fieldIds = request.fields.map(field => field.name);
that's in getData
alrighty
Can someone explain to me how you draw pixels using opengl lol
please use SFML
if you wanted to die doing perlin noise, you will literally exist'nt trying to use raw opengl
link
Because it's doodoo
oop
It works fine
It doesn't tho
wdym?
What issue are you getting?
its already an abstraction over opengl
You'll once need more work to directly use opengl
Check any of my screenshot and you'll see the issue
Yes lol
Does it have any documentation at all
You'll have the same issue with using just opengl
Will do
Most of the bindings are the same with just the jaylib imports
The bindings do miss some stuff tho I think
dude Yugi you are literally the best man
we're so close, one last function and it's over and like, an actually good codebase lol
xD
Oh also
I forgot
I was right earlier
lambdas dont create a scope
Altho I think in this case that might be in your favour
#827055635052888075 message
good luck having a whole minigame dev for free...
yeah!
I think he already applied lol
:o
in the process
very nice!
oh man
lol
they should just know
i should get accepted by name alone
you should have enough clout that they know you're good
oh dang wait, I think you're the last helpful
what is he going to say :p
nothing
if you become Support, it'll eradicate the species!
who
You don't
new material update, go to your material settings and turn off the new stripe thing
Looks fine to me
i dont think he's very active
wadu hek
ohh okay
I've literally never heard of him
there's 1 other i think maybe
Who
Isn’t like andre also helpful
does andre have it?
dkim for helpful /s
no
hm
Mb sxt was
don't think sx had it
no sx didnt
yea
🥲
Lol
I have it!
Satisfactory, good game
tofpu when 1v1
Wait
actually i gtg for 15 minutes
After a few hours dkim
but when 1v1
The bot was supposed to give agoogle form link?
oh
I haven't even got my dev role yet, I applied ages ago no response
ok
yes yugi
oh yeah tanguy
@half harness ok
the only person I know in that list is my boi girl bridget
@pallid gale something might have gone wrong there
rip
Piggy, when do the role apps for like dev get checked
ive never seen the wolfe guy talk
whenever they feel like harshly judging your code
what
wait piggy if you get to mine, don't
yeah wolfe doesn't seem to be very active
just ignore it
The helpful role is like the most og role of this discord, give me
They judge the code harshly???
oh it fixed it
We were stripped of this role due to this dictatorship led discord
for a second there I was like "woah Frosty, don't wanna ruin your chances"
😟
then I realized you already were Support lol
Bm for helpful
💀
He's barley even active tho
yugi didn't get the form link but he said it's fixed now
boy have i got news for you
#dev-general for off-topic-2
Wtf bm
#development -2
You got it
ive had it for like a year lmao
i presumed #dev-general was where the kinda smart people talked
not necessarily about dev stuff all the time lol
pretty much more off topic than development
yeah!
#spam
smh cube
boris johnson 🥲
Funny, if I ping a stuff in my app does it get denied?
Bm test it pls
I read that wrong
in your app?
no
Do it odin
Pls
cube people were talking about dev stuff before
Can we bring back food channel
star and yugi were talking about javascript for a while
get banned again odin
Please
it will be funny
im waiting on my genius Yugi to come up with a final solution and then the project is officially refactored
Someone anonymously instantiated super intelligence in Yugis brain I swear star
Lol
he singlehandedly refactored this entire project essentially
what final solution star?
haha
final solution? 🤨
he was thinking so hard he forgot what he was thinking about!
to the mutable question, yes
😳
Didnt you get what fieldIds was? I think you sent that right after you asked me about this part
Lemme find the message
yes
So it should still be valid
well neither fieldIds nor _getDataField exist anymore
both were deleted because of the new object system
so I think we need another map and reduce thingy
Is fields Ids just the ids from the config?
Lemme check you field construction snippet one sec
Its the section name instead of the id I think
so go with this
const fieldNames = Object.values(definitions.dataDefinitions).map((value) => value.name)
actually rename that to fieldNames too
There we go
weird, I assume its just an issue with ts not getting the type due to the Object.values
try using access operator
like value['name']
Might also want to specify the type as string
uh fieldNames is an array
Whats data in this?
string[]
what's the differnce
.
@prisma wave now beginning to work on the 8values fork for programming concepts. need help
data['data'].map((dataPoint) => ({
values: fieldNames.map(name => _getDataField(dataPoint, name ))
}));
neither of those functions exist, still lol
o hyea
Yes
is it getField instead of _getDataField
Lemme check your old code
I put it in and it's not complainign
I dont think so
data fields return the result of the data function in your definitions
is that not what we're looking for?
Nope
also in that case
I think there was a mistake in your old source possibly
seems you actually do need the Id
and not the name
Maybe you missed some part
no I definitely copied word for word from the medium article lol
lol
Check your old getDataField function tho
Its checking through the Ids
Im mostly sure you do actually need the Ids instead of the name here
ah yes I do
So ig switch the fieldNames back to fieldIds and in the map function get the id instead of the name
No
use the data function from your config
definitions.dataDefinitions[name](dataPoint)
so
data['data'].map((dataPoint) => ({
values: fieldNames.map(name => definitions.dataDefinitions[name](dataPoint))
}));```
const fieldNames = Object.values(definitions.dataDefinitions).map((value) => value['id'])
this
not dataDefinitions['id']
That refers to something different
use the fieldId
you literally told me to do that
ther
oh
yea I was thinking about something else
Seems like it
xD
okay so uh
fps go brrrr, in the minus probably
the linking ain't doing great
yo this ain't half bad
yeah man Frosty has been putting in the work!
What happened?
ReferenceError: definitions is not defined
at getField(Connector:31:19)
at [unknown function](Connector:40:45)
at getSchema(Connector:40:10)```
var section = definitions.dataDefinitions[id];
the line in question
It is, because I don't know how to make this into meshes lmao
oh wtf I can do that
Probably
okay hang on
depends on what that google compiler thing does
TypeError: Cannot read property 'newDimension' of undefined
at buildDimension(Definitions:4:56)
at getField(Connector:32:21)
at [unknown function](Connector:46:45)
at getSchema(Connector:46:10)```
ugh
it doesn't like your method thingy I don't think
var buildDimension = function (fields) { return fields.newDimension(); };```
this is what it turned your thing into
oh star
You need to pass the field
in getField
function getField(field: Fields, id: string): Fields {
const section = dataDefinitions[id]
return (
section.build(field)
.setId(section.id)
.setName(section.name)
.setType(section.type)
)
}```
my bad
@cinder flare
yugi don't apologize you're my hero okay
😅
TypeError: fields.newDimension is not a function
at buildDimension(Definitions:4:56)
at getField(Connector:32:21)
at [unknown function](Connector:40:45)
at getSchema(Connector:40:10)```
Thats weird
it worked before right?
yes the github version worked
hmm
var buildMetric = function (fields) { return fields.newMetric(); };
var buildDimension = function (fields) { return fields.newDimension(); };```
that's what it did to your bois
if that means anything
No thats fine
I mean, I can just go back and put those functions there manually if I have to
Maybe you need the fields import in that other file as well
How do I create an image from my height map
import A = B?
import B = M?
😮
😮
ussually the functions convert the object to string themselves
Are you using console.log?
yes
Just pass the object
Good answer, thanks
wdym?
sorry didnt notice 🥲
Try printing the section in getField
Now try printing the field from it instead
ok so now, in getSchema, try printing out the result of ``cc.getFields()`
Very weird
star
try changing the getField function to this
function getField(field: Fields, id: string): Fields {
const section = dataDefinitions[id]
section.build(field)
.setId(section.id)
.setName(section.name)
.setType(section.type)
return field
}
@cinder flare
Cant seem to find much of any other difference that may cause this
that fixed it!
Go to any channel and ask cube to move you in pulse
awesome
TypeError: dataDefinitions[fieldId] is not a function
at [unknown function](Connector:91:82)
at [unknown function](Connector:91:26)
at getData(Connector:90:29)```
const rows = data['data'].map((dataPoint) => ({
values: fieldIds.map(fieldId => dataDefinitions[fieldId](dataPoint))
}))```
this part?
Yes
it should be
const rows = data['data'].map((dataPoint) => ({
values: fieldIds.map(fieldId => dataDefinitions[fieldId].data(dataPoint))
}))
TypeError: Cannot read property 'charAt' of undefined
at data(Definitions:43:33)
at [unknown function](Connector:91:83)
at [unknown function](Connector:91:26)
at getData(Connector:90:29)```
'data': function (entity) {
var onlineStatus = entity[_this.id];
return onlineStatus.charAt(0).toUpperCase() + onlineStatus.slice(1);
}```
the function in question
oh probably just add a null check or something?
Does JS have safe call operator now?
whattt
The optional chaining operator (?.)
enables you to read the value of a property located deep within a chain of connected objects
without having to check that each reference in the chain is valid.
hey wait does the ?. operator check for undefined too
yes
is there an elvis operator
ooooooooooohh
The nullish coalescing operator (??) is a logical
operator that returns its right-hand side operand when its left-hand side operand is
null or undefined, and otherwise returns its left-hand side
operand.
if (date !== undefined) {
return date.substring(0, 15)
}
return date```
okay how can I condense that
date?.substring(0, 15)
^
okay just checking im kinda dumb
ok lol
"Rate our plugins below based on how well you know them."
🥲
🥲
"Is there anything else we should know when considering your application?"
i get paid to make configuration files for other people
imagine if someone said that
lol
Yeah make trump do it also
Also I haven’t applied yet
I have lol
Oh you just made the channel then?
Yeah
ah Ic
I was confused for a sec then I remembered that having a channel doesn't mean you have applied xD
I was about to do it but then I got decision anxiety
Again?
they'll probably accept me
Lol
bcz I told them I have 30 instagram followers
Idk r u trolling or what lol
and they'll get a lot of users from that
I actually did apply saying that
also where they asked what I'd do when there's a situation going on I said "I'd tell them to KINDLY FUCK OFF"
I didn't lie tho
xD
they'll tell you if you are nor not
I’d rather figure that part out before applying
I mean do you even want to be a staff member?
Hmm originally yeah but now when I think of it I don’t know, like both yeah and no
I mean if its just to brag about it idk if its worth it
did you mean: global state
bad
@old wyvern send help please https://i.imgur.com/g1FfWOA.png
are we not sending only the requested columns
I only like it if its Nullable NotNull
ah ok. I don't use static and also I'm not allowed to have an opinion
Bad
ok time to delete every java project before applying
/s
is there any legitimate reasons you guys can think of for there to be a mutable static field in a codebase?
ah I think ik what your issue is
You did need the values from the request
¸no Piggy
god damnit
i mean, doing it might be useful but you should be encapsulating it a lot ofc
@cinder flare Change it back to this const fieldIds = request.fields.map(field => field.name);
access level is irrelevant in the question, so we can just assume it's private
hmm
Fields with a static singleton is excluded?
possibly okay then
Like the lazy static singleton design
there's probably a better way of doing it
Only if each of the objects depend on something common
yeah
And I mean only in the case of private
okie
still scuffed
What does it say?
same
Try printing out rows
[ { values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] },
{ values: [ undefined ] } ]```
try printing out fieldIds
I think your values are undefined
Might be the issue with the captured this I assume
I guess just replace the this.id calls with the actual id of that section
dealing with js closures can be mind numbing
that is so weird
Dont forget to change the other one's that use this too
fuuuuu
lol
Whats wrong now?
samet hing
Send ss
no
ur gh is kinda empty
oh wait
i said skip my request
star
im a fool
lol
I mean I guess the one I'm working on rn
js one?
yea
lemmo does the js ones
You could*send piggy any of your projects from your main account in private
lots of people do that ^
well I merged my accounts
so that's like all of them besides one
but it's not active
you see I talk in here a lot more than I code as of right now
ah
also im a shitty dev anyways lmao
@static zealot SHUT UP
NO
YES
i mean of course bro, take as long as you want
Alrighty
you're carrying this project on your shoulders lol
lol
starr who the hell is ethan delany
lmao
oh wait
nvm lmao ik
i saw one of your github repos and it had the name
ur name is ethan delany?
lmao
nice hair tho
oh
epic face
it is ethan
thanks
that's an old pic
poor conclure
lol
wait what
I accidentally accepted him
well I purposely accepted him
check #developer-chat
he saw the gates of heaven and got pulled back to hell
then he proceeded to show me everything I missed that was wrong with his code
🥲 🥲
so I had to remove the role
ooooof
sadge
thats cruel
F
good thing i didnt show you my bad code
(:
see this is why I just retract my application before I get embarrassed
guys
look at this
this was from years ago
lol
Clean ass GitHub 😫
@quiet depot but well that was some months ago I invited you to this https://github.com/NeptunMC/Casino which is something I cooked up more recently
conclure trying to defend his dev role
I'll take a look tomorrow
👍
I said in dev chat I should probably give this a break
lol
Yeah
12 am code reviewing is apparently not a good idea
Lol evidently
nah that's the best time
“Lgtm”
12 am is the best time to get into discord vc and talk with friends
i swear i become 10x higher at 12 am lmao
Oh you removed your application?
my first ploogin
lol nice
yes for good reason
It's isn't a hello world ploogin.
lol
pigCommand
honestly its better than like 80% of the plugins out there
idk >>>>>>
even back then I followed naming conventions 😉
my first plugin: https://github.com/dkim19375/MagicItems
lol
oh
ohh
then you set it to public
Oh god you were the one with the per version everything, i completely forgot about that
per version everything?
wdym
hey my first bukkit plugin was a hello world
Adventure? never heard of it
Idek what it does anymore
yugi when is that from?
mine are from april 2015
back when i used github desktop and eclipse
You tell me
4-6 years ago probably
"onEnable has been enabled"
😂
wat
where?
piggy's screenshot
lol
lol
Lol
Conclure..
Yeah
Frosty
just saw dev chat
Hahah lol yeah
I mean I can really just blame forge and fabric
conlure dead dog
@quiet depot, Done.
Yeah and to be totally transparent it would be nicer to get the role legit
=xpedit add @steel heart 20000
@quiet depot, Done.
Lol why
LMFAO
I mean thanks a lot piggy
Where's my XP for the abuse I suffered earlier
lol
you get ban
a pension for your family after your untimely demise
Still no clue how to make my terrain mapping an image so I can convert it into a mesh
do you have a data structure that stores all the individual blocks?
no, but I can make it
Pog
then add that to the mesh
k, gimme a bit
Eight remarkable stories. Eight unique filmmakers. One Marvel Universe. Start streaming all episodes of 'Marvel's 616' Nov. 20 on Disney+!
► Subscribe to Marvel: http://bit.ly/WeO3YJ
Follow Marvel on Twitter: https://twitter.com/marvel
Like Marvel on Facebook: https://www.facebook.com/marvel
Watch Marvel on Twitch: https://www.twitch.tv/marv...
What even is this
What are they trying to say?
Fans as superheroes?
Someone please nuke this world already
north korea would like to know your location
Slovenia
No wait
Wait a few years
Since Stan died marvel has gone to shit
No lol
yes
Amazing
This is gonna be the most potato code you've ever seen lmao
Look into the marching cubes algorithm
cube marches? Interesting
Marching cubes is a computer graphics algorithm, published in the 1987 SIGGRAPH proceedings by Lorensen and Cline, for extracting a polygonal mesh of an isosurface from a three-dimensional discrete scalar field (the elements of which are sometimes called voxels). The applications of this algorithm are mainly concerned with medical visualizations...
3D animation of marching cubes algorithm.
Reference implementation in C#: https://gist.github.com/ttammear/a3cdc214023f8c92b1f0bf27e7cc08d1
That's cool
I am a fucking genious tho
Worked first fucking try
(Ignore the white spots, not accounting for double height difference yet)
lol
gonna offset the generation tho so you can even see it properly
whats the fps now?
Rust = triple the fps instantly
With* that mesh you should be able to use much higher render distance btw
😌
maybe if they rewrote GHC in Rust it would be not so SLOW
A pragmatic new design for high-level abstractions Monads (and, more generally, constructs known as “higher kinded types”) are a tool for high-level abstraction in programming languages1. Historically, there has been a lot of debate inside (and outside) the Rust community about whether monads would be a useful abstraction to have in the language...
Haskell and Rust are equal
rust 🤢
excuse me
Did you just ew rust
rust and go are the Only good imperative languages
Sir, we only trully ew JavaScript and PHP
what about c#
🥲
C# is fine apart from the conventions
Yeah C# is fine
allman tho
allman 🤢
yikes how can such a genius have such an incorrect opinion on braces
🙄
I mean BM is right, and y'all are idiots
Thank you
me frosty and kali are the smartest people here
the rest of you are stupid
😆
I think I'm losing my dev role if I show this code :kek:
Haskell indentation is the best one
agreed
Agreed
is it bad that indentation style could literally make me cry before I click Code -> Reformat Code in IntelliJ?
i shall apply for dev role to prove u wrong
Looks aight
