#development

1 messages · Page 31 of 1

verbal otter
#

its closer

#

1

#

@soft umbra put in printf("\n\t\t");

#

before the beginning of the second loop

nocturne galleon
#

how do I link two fonts in the <head> tags and then use one font for some text and another font for more text.

nocturne galleon
#

or like how do I set the font for a specific text tag

#

using like a google font link

#

.

nocturne galleon
#

Sorry so vague

#

basically got main text I need in opensans 600 then sub text in opensans 300 then subsub text in opensans 300i

karmic nexus
#
<html>
    <head> 
        <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
        <style>
            body {
                font-family: 'Roboto', sans-serif;
        }
        </style>
    </head>

    <body>

    </body>
</html>```
#

<div style="font-family: 'Roboto', sans-serif;"> Roboto text </div>

#
<html>
    <head> 
        <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
        <style>
            .font {
                font-family: 'Roboto', sans-serif;
              }
        </style>
    </head>

    <body>
    <div class="font">
        Roboto text
    </div>
    </body>
</html>```
#

.class {}

#

<div class="class"> </div>

#

.font {}

#

class="font"

#

.class1

#

.class1 > .font {}

#
.class {
    background: red;
}

<div class="class"></div> = affected
nocturne galleon
karmic nexus
#

https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400

#

https://fonts.googleapis.com/css?family=Roboto:100

#

background:red;

#

replace onloadstart="this.volume=0.4" with volume="0.4"

nocturne galleon
#

volume="0.4"

#

volume="0.4"

karmic nexus
tropic grail
#

Oh shi--, I just ran banana.play() and it did the same thing xD

karmic nexus
tropic grail
#

It's still in my console history.

#

Whuu--!? Bananas!

nocturne galleon
tropic grail
#

"Did someone say banana!?"

karmic nexus
nocturne galleon
#

ill be on tmrw I got to go thanks for help though

karmic nexus
#

font-style: italic;

ebon light
#

hi devs hows it going

ember torrent
#

jiffy

scenic pagoda
#

I make websites

ionic hull
#

I make databases linusKappa

raven hatch
#

I make errors linusKappa

ionic hull
#

I test my code linusKappa

#

Just shipped untested code to production

#

Tmr my email will blow up

nocturne galleon
#

is anyone good in godot

fallow cave
#

i make low quality apps in VB linusKappa

graceful silo
#

same

upbeat folio
#

It's been so long since I did front-end code that I forgot basic jQuery syntax.

vestal glen
#

time to use proper JS then

scenic pagoda
#

pft vb

#

I like to program in the best language ever linusKappa its called Cobol meowsmilehappyeyes

#

Im just a front-end web developer so thats a lie

upbeat folio
#

@vestal glen I've been working with Node.js for over a year since someone else took over the front-end. Went to troubleshoot and found myself facing jQuery, and had to take a few minutes to re-acquaint myself. :p

gray hazel
#

Is source a good engine to use with games? i think it is

nocturne galleon
#

anyone want to teach me how too make a sound play onhover

main wyvern
#

Google will

#

xD

whole quail
#

@gray hazel not unless you want specific source engine features

#

It's a really outdated and old engine that's been patched a bunch and mutilated to work in a modern world

#

Unless you pay the money for access to the most updated version

#

That they've overhauled a lot of it in

smoky saffron
proper gale
#

jesus what?

modest orchid
vestal glen
#

all kinds of things...

modest orchid
#

Hehe, yea xD

vestal glen
#

one thing it doesn't do is apply that java update though

modest orchid
#

True xD

#

Any idea, on how I change the date output, so it says it like DD. MM - YYYY? 🤔

vestal glen
modest orchid
#

Oh xD

#

Now I just have to do, so it takes it from the database xD

gray hazel
#

@whole quail well I most likely will use the 2007 build. Same one that the black Mesa sourcemod uses

whole quail
#

Just use cryengine, unreal engine or unity

#

It'll make everything so much easier

gray hazel
#

But they need more work

#

I’ve tried it

#

A sourcemod works from the moment you make it

whole quail
#

If you can't get unreal or unity to work you're gonna have a massive problem getting source to work

gray hazel
#

Source is easy

whole quail
#

There's so much that needs to be changed with the engine to make it useful

gray hazel
#

It can see files from other games

whole quail
#

That's the one thing it does well

gray hazel
#

And has too many meme garbage mods...

#

TOO MANY

whole quail
#

Just use unreal

#

If you can't get it working in unreal you're not gonna have a chance working with source

gray hazel
#

LEMME think about it

#

Sorry caps

whole quail
#

Unreal is nice

#

It's a good balance of modern and powerful while also being easy to develop for

gray hazel
#

ok

#

i will tri it again

#

but also sticking with source at the same time

#

cus i am very used to it

#

and i have always been a fan of it

#

if you want to see it's full potential, just watch a ganeplay of the Black mesa december 2017 update

whole quail
#

Read Garry Newman's views on it

gray hazel
whole quail
#

They aren't using the version you are

#

That's source 2

#

And modified most likely

#

If you can't modify it and you don't have access to the modern version it'll only end badly

gray hazel
#

Source 2 isn't out yet

#

the mod was based with source 2007

whole quail
#

?!?!?!?!

gray hazel
#

the latest is source 2013

whole quail
#

Source 2 has been out for quite a while lol

gray hazel
#

Source 2 is still a myth

whole quail
#

It's been used for dota 2 for quite a while now

#

And parts of it have been used in csgo

gray hazel
#

yes

#

but not black mesa

#

going from source 2007

#

to source 2

#

is a huge pain

#

because everything has been re-done

#

XEN levels wouldn't be here

whole quail
#

Source 2 is literally just post source 2013 lol

gray hazel
#

lol

whole quail
#

It's just another set of incremental updates except they removed some legacy stuff

gray hazel
#

they also added full VR support

#

it was used with the robot vr game that valve made

whole quail
#

It's modified to hell

#

Source out of the box isn't like that at all

#

A lot of people who have actually created games in it have talked a lot about how they needed to modify it

gray hazel
#

yeah

whole quail
#

Garry Newman and Facepunch being the most prominent

gray hazel
#

it can be tough

whole quail
#

They ditched source almost completely now lol

gray hazel
#

but if you don't fuck it up, the game can come out really good

whole quail
#

And they have access to the latest versions

#

You're not going to be able to pull it off

#

If you could you would already know exactly what you were doing

gray hazel
#

i am a begginer to source modifications

#

but i know enough to not fuck it up

#

and i have already created a few things

whole quail
#

What have you modified in the engine so far>

gray hazel
#

not much

whole quail
#

Also for a good example of how to use the source engine look at titanfall

gray hazel
#

i started yesterday

#

i am making a benchmarking utility

#

a proper one

#

although i am using one of the original copies of source

#

source 2004

#

but it's still really good

thorny galleon
#

@whole quail titanfall used the latest revision of the Source tree

#

the one you've gotta, yaknow

#

pay for

#

most of it is just the physics licensing, but it's like $10k

gray hazel
#

You only pay if you want to use source commercially, otherwise it’s free

#

The SDK is free on steam

#

And the license is exactly $25,000

#

For commercial use

nocturne galleon
#

@main wyvern I tried eveything is too vague 🤔

main wyvern
proper gale
#

@gray hazel reeeee, 2004 engine in 2018

#

new APIs are soo much more efficient both CPU and GPU side.

whole quail
#

^

#

Also the engine just flatout is missing crucial components especially around lighting

#

And support can be terrible

#

Especially with windows 10

thorny galleon
#

@gray hazel no dude, that's not how it works

#

the old branches are free.

#

to get full code access to the new, actually good branch of Source you need to pay the license fee

#

Source 2013 is the best you get, and even that has a lot of missing improvements that games like Portal 2 had

vestal glen
#

not to mention source 2 then^^

thorny galleon
#

yup

#

the SDK may be open source, but the actual engine is

#

super not.

#

source 2 and the actual, updated versions of the mainline source engine is ❤

#

well, relatively speaking.

#

the public SDKs are public for a reason, and that's because they aren't really worth a whole lot.

#

if a company can afford to spend all that time and money bringing Source 2013 and prior up to modern standards (which they would still need to pay for, by the way), they'd rather just pay the money upfront to get an actually decent engine like Source 2

whole quail
#

Also it's not $25k btw

#

The price is super confidential and can get well into the hundreds of thousands

#

Maybe $25k as a starting point but that'd be it

#

When building a game for millions of dollars spending a few hundred thousand on an engine is nothing compared to the cost of the developers, lawyers, etc...

proper gale
#

@thorny galleon does source 2 have OpenGL support?

#

i mean, i know valve has their OpenGL layer, but more is it a primary API in that engine?

vestal glen
#

vulkan is a primary api there, even afaik

proper gale
#

even better.

#

tests by valve have sown OpenGL to be faster than DX11-, and Vulkan is know to be faster than DX12

#

besides that they run on linux ofc.

whole quail
#

I'd like a world where DX didn't exist tbh

#

A single cross platform standard would be nice

proper gale
#

how would one recommend i go about a common shader ingest for both OpenGL 3.3 core (GLSL only) and Vulkan (SPIR-V only).

#

and if possible, OpenCL 1.2 ingest aswell.

#

@whole quail know of a cross compiler that can do that?

whole quail
#

Nope my experience with that sort of stuff is rather limited

#

50% because of time, 50% because of hating myself each time I learn the maths behind 3d rendering

#

Although right now I think I'm hating web development more than 3D rendering

proper gale
#

the math is eazy

whole quail
#

It's not hard, I just hate doing it

proper gale
#

4D mathematics is ezpz

whole quail
#

And it takes time to actually learn

proper gale
#

try 128D of 128D math.

whole quail
#

Right now I'm enjoying learning about kernel mode drivers work more in depth and working out how windows works at that level too

#

Actually specifically now I'm making a fucking website

#

And if I wasn't doing this I'd be solving stupid problems trying to sync trello with google sheets while dodging rate limits using napkin maths

proper gale
#

rate limits usually give you a timeout period to wait for.

whole quail
#

LUL

#

Maybe with a good api

proper gale
#

discord does that

whole quail
#

Also that wouldn't help here anyway

#

Since it's instance based and each instance doesn't keep data about the last instance

#

Trello api fucking sucks though

#

If you want to retrieve all cards

#

You have to retrieve all cards and all their information

#

Instead of just id's

#

Which multiplies the bandwidth by like 14x

#

And hits a rate limit for me quickly

proper gale
#

slow claps

whole quail
#

If the client wasn't who it is I'd 100% not be doing this lol

#

I'm also doing it for real cheap but I honestly don't mind

#

I just checked to make sure and I can say who it is

#

I'll pm you

buoyant venture
#

Hey any of u guys familiar with bios editing stuff? I can't save the. CAP file after tweaking it. Any suggestions?

tropic grail
#

Don't do it.

#

@buoyant venture

#

You're 99% likely to brick your board.

buoyant venture
#

It has dual bios. So I could learn something

#

Incase of brick, it kicks back to its original bios

tropic grail
#

In that case, I have no clue as to why the file wouldn't save.

#

Unless it's got an md5 check in it or something.

#

hmm...

#

What software are you using to mod it?

buoyant venture
#

Aight. I use the phoniex tool. You know anyother tool to edit?

tropic grail
#

What kind of bios is it?

#

American Megatrends or Phoenix or ???

buoyant venture
#

Ami

tropic grail
#

Try this AMI Firmware Update (AFU)

buoyant venture
#

I tried ami editor at first, but it didn't even extracted it.

tropic grail
#

Ensure none of it'll kill your stuff though

#

VERY IMPORTANT: Check that modified rom size match with the backup created in step 4, if mismatch don't continue you may be doing something wrong.

buoyant venture
#

Okay I'll try those Thx

tropic grail
#

I'm off, so tag me and let me know how it goes.

#

I want details

buoyant venture
#

Sure

native wave
#

Well i got a week to learn to code and to learn a language and make a simple program

#

Not enough time im guessing

proper gale
#

Nope

native wave
#

Well im fucked

ionic hull
#

@native wave any specific language?

swift niche
#

If I have a mobo that doesn't have any error code indicators and only makes 4 beeping sounds to indicate that an error occurred (but this beeping also ins't indicative of the error), what troubleshooting steps do I take? Right now I didn't use a boot device or storage drive, I've tried trying a single stick of RAM in either of the available slots for both slots and both RAM sticks. The system doesn't output to any display, but it does stay on indefinitely after the 4 beeps occur until I turn it off

#

And the OEM doesn't have anything to explain the possible errors besides saying that it will make the 4 beeps if an error has occurred, whether or not the error was "fatal" or not

proper gale
swift niche
#

Whoops my bad

native wave
#

@ionic hull heres how little i know, what languages are there

ionic hull
#

@native wave what kind of simple program you need? A simple console output? A program that has a GUI? Some kind of website maybe? Could you specify more?

native wave
#

Literally it has to take an input, and do ‘something’ no gui required

ionic hull
#

c++ would be easy

native wave
#

Ok ill start doing research

native wave
#

Ok thanks

ionic hull
#

until you understand the variables and console output part

verbal otter
#

C is pretty basic tho

#

pretty easy to learn basics

winter sleet
winter sleet
buoyant venture
#

@tropic grail there is a problem with gigabyte bios . amibcp crashes while saving it .i tried msi bios .its fine . then i searched a lot and found a guy with same problem only in gigabyte bios for same mobo. today ill try thro dos

undone notch
#

C# is good / easy, you don't have to deal with pointers so its easy to pick up. And has lots of useful support and library's and using visual studio basic GUI apps are piss easy. But this does mostly assume its desktop apps and you care mainly for windows

tropic grail
#

@swift niche bad CPU seating?

#

@buoyant venture I look forward to your progress.

restive sundial
#

well getting ue4 is going to be slow

#

oh steam is downloading a game

thorny galleon
#

you cloning the UE4 source?

proper saddle
tropic grail
#

@devout lava

proper saddle
#

TBH. he was the main reason why I made it. :V

rotund bramble
#

JavaScript people.

How come when I reference this property in an object, it returns null?

function setColor(object){
    console.log(object.element.offsetHeight);
    console.log(object.element.offsetHeight);
    const bottom = object.element.offsetHeight + object.element.offsetTop;
    const top = object.element.offsetTop;
/*
*/
  }

The first two console logs print the offestHeight value, then it says the element is null when it tries to set bottom.

If I swap top and bottom, it says offsetTop's element is null.

Edit:

It is now telling me that it is still null, but when I do this, it logs the value correctly O.o

function setColor(object){
    const offsetHeight = object.element.offsetHeight; // null
    console.log(offsetHeight); // 1138

Am I just missing something?

tropic grail
#

Where's the object's variable height being set?

vestal glen
#

fwhat is it telling you is null, the element prop?

devout lava
#

@tropic grail @proper saddle Mines built with PHP

#
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                          <match url="^([_0-9a-z-A-Z]+)" />
                        <action type="Rewrite" url="?r={R:1}" />
                </rule>
devout lava
#

Should I have analytics on my URL shortner site?

hasty pewter
#

Google analytics or your own?

#

@devout lava

devout lava
#

My own

nocturne galleon
#

Ive just got source files of a Discord bot. I know that i need Visual Studio to compile them, but how do i exactly do it ? Ive never used Visual.

proper gale
#

@devout lava i see no reason why not.

#

@nocturne galleon what language is the bot written in?

nocturne galleon
#

Hmm

#

Well, those are Visual c# sources

#

so im guessing c#

proper gale
#

C#, hmm.

#

if it was C++, i would tell you to ditch the source, and use Java (better APIs, languages aside)

#

but C# im not sure, only used MSVS for C++

devout lava
#

ok @proper gale

#

and make the analytics public if you know the ID?

proper gale
#

again, i see no reason why not.

#

they are anonymous analytics.

#

i assume

devout lava
#

Yeah

#

Webserver already logs IP addresses

hasty pewter
#

Lol java for a bot? :-p

#

Be prepared to get a decent server for that

proper gale
#

i have a good server for my bot

hasty pewter
#

Discord.js is a solid lightweight option as well

devout lava
#

Along with all of the requests and the method

proper gale
#

JS, be prepared to get an even better server for that.....

hasty pewter
#

Why?

proper gale
#

Java is faster and lighter weight than JS.

hasty pewter
#

Nodejs doesnt use mich

#

Haha

#

No

proper gale
#

i can bullshit

#

its an interpreted language

hasty pewter
#

Yes you can

civic mountain
#

😆

proper gale
#

i want to see an interpreted garbage collected language beat even a bytecode language.

hasty pewter
#

Java is higher performance, that’s correct, but nodejs has A LOT less memory overhead on object allocation

devout lava
#

2018-02-27 21:44:26 GET / i=cc08bbda8v.png Mozilla/5.0+(Macintosh;+Intel+Mac+OS+X+10.10;+rv:38.0)+Gecko/20100101+Firefox/38.0 - 33522 367 765 3f3e528769039f11-ORD omitted IP CA https image/png - - heres an example

hasty pewter
#

Java is also garbage collected

proper gale
#

i know

hasty pewter
#

Nice access log @devout lava 😛 what webserver is that ?

proper gale
#

i know how the JVM works quite well.

devout lava
#

IIS

hasty pewter
#

Then why did you completely ignore the fact that Java has an even worse GC

proper gale
#

its GC is fine.

hasty pewter
#

But if you want good performance out of node you need to write c++ addons

#

For computations

proper gale
#

and i did not, i just specified that you cant interpret C++ and say its better.

hasty pewter
#

But in I/O it crushes anything

proper gale
#

because C++ just works that way.

hasty pewter
#

You can interpret c++

proper gale
#

yes

hasty pewter
#

You can interpret any language

#

Just use a JIT

proper gale
#

i mean, C++ memory management.

#

no, fully interpreted live code changes C++

#

there is an interpreter that will do it.

hasty pewter
#

dude go google some more lol

devout lava
#

Crap. Left laptop on this channel

hasty pewter
#

Do you even know how V8 works?

#

It recognises patterns in JS code and replaces it with assembly

#

Look it up

#

It’s amazing

proper gale
#

JVM JIT does that too

hasty pewter
#

JS could have never been this fast without it

proper gale
#

then it optimizes it up to 8 times aswell.

#

code faster than GCC can make with -O3

hasty pewter
#

Yea some JITs are crazy good

proper gale
#

does the V8 JIT do that too? (im not familiar with JS runtimes)

hasty pewter
#

Yea up to a degree

#

V8 is in chrome and google made a lot of hardcoded fast paths as i believe they call them

proper gale
#

the Java JIT can also do cross class linking to inline functions, and even objects.

#

thats like a native method in java, its got those too

hasty pewter
#

Every *compiler should do that my friend 😉

proper gale
#

@hasty pewter GCC cannot do it cross file.

hasty pewter
#

then don't use gcc

#

LLVM

proper gale
#

LLVM is not a compiler

#

CLang cant.

#

MSVC cant

#

no C++ compiler can, not if you want fast compile times.

hasty pewter
#

why would you care about that if you write C anyway? you probably are using C for a reason

#

why would you want fast compile times? computing power is cheap

#

stop bringing up stuff nobody cares about

#

I certainly don't

#

only if it was bottlenecking my program

proper gale
#

or rather, linking times.

#

well, both

#

with C++ compile/link takes quite a while.

#

especially with MinGW

#

and im not even sure they can at all

#

i know for a fact that GCC cant.

#

the way the the JVMJIT compiles everything breaks soo many rules of a standard compiler.

#

@hasty pewter i want to see a benchmark where JS outperforms Java (given time for JIT warmup, so not startup time/performance)

hasty pewter
#

it won't!

#

i said that already

#

it only will in memory consumption

#

unless you're working with massive strings

#

because JS uses UCS2

proper gale
#

so memory is the only thing JS is better at?

hasty pewter
#

no I/O

#

is the main thing

proper gale
#

java doesnt seem that bad at IO to me.

hasty pewter
#

it isnt bad

#

but it has a larger footprint

proper gale
#

because thats not its main design concern?

hasty pewter
#

correct

proper gale
#

when given a memory constrained environment, will Java or JS perform better?

hasty pewter
#

JS

proper gale
#

like, needs 1GB, has 512MB to work with, and 512MB on disk.

hasty pewter
#

but if you got enough memory Java will do better in computing intensive tasks

proper gale
#

soo, my 32GB server, use Java.

hasty pewter
#

yep, usually

proper gale
#

now, what if i wanted to use an RPI?

hasty pewter
#

unless you want to do a lot of connections that only proxy for example

#

Then probably Nodejs

#

but the newer RPis will run java fine as well

proper gale
#

because 1GB of ram is enough?

hasty pewter
#

yes granted you don't load a lot of data into memory permanently

proper gale
#

so the conditions that JS needs to actually be better, basically dont exist?

hasty pewter
#

yes they do, JS is single threaded and very efficient, especially in I/O, so if you do a lot of connections without significant computing JS will outperform anything else

#

Cloudflare runs on nginx + Nodejs

#

Paypal runs on nodejs

proper gale
#

also, have you actually looked at the ram usage of a JVM, its much much lower than what TM shows.

hasty pewter
#

It's gotten a lot better yeah

proper gale
#

memory wise, not IO wise

hasty pewter
#

and the more data you handle the more efficient java gets

proper gale
#

the IO shit is just optimized C++

hasty pewter
#

for java or nodejs?

proper gale
#

JS

hasty pewter
#

yes thats true

proper gale
#

Java its at least partially written in Java.

hasty pewter
#

its just libuv, which indeed is highly optimized C++ I/O, accessible to noob programmers

#

through JS

#

and better than noob ones as well of course...

proper gale
#

also, just pulled up VisualVM with CLion, its using 1/1.2GB of ram

hasty pewter
#

nginx uses libuv as well

proper gale
#

thats a significant amount just sitting there, unused.

hasty pewter
#

yeah, stupid if you think about it

#

but if you think about the economics its not that bad

proper gale
#

actually had the GC run, full sweep, down to 433MB/1.2GB

#

soooo, its not that bad with ram usage, its juts not bothering when it doesn't need to.

hasty pewter
#

at the end of the day your software stack / usable libraries are almost always more important than its performance

#

because really, what has too terrible performance to not even consider?

proper gale
#

like D4J

hasty pewter
#

current lua implementations?

#

no wait

#

those were actually quite well optimized IIRC

#

so nvm

proper gale
#

IMO, Python, unless using it as a scripting language for libs like Tensorflow.

hasty pewter
#

hmmm, i havent used python a lot but I faired quite well as interpreted language IIRC

proper gale
#

im super performance critical, to the extent of not using LWJGL because its slower than raw C calls to OpenGL

hasty pewter
#

and there's cython unless you consider that cheating

proper gale
#

its performance is not bad at all, not for a fully interpreted language.

#

but its still not as fast as a bytecode language, which is (usually) not as fast as a well optimized compiled language, like GCC++

hasty pewter
#

but wait!

#

doesn't python allow bytecode compilation?

vestal glen
#

there are compilers to different kinds of runtimes for python.

proper gale
#

thats runtime compilation, and it does that automatically

#

im talking about the official intpreter.

hasty pewter
#

huh

#

there's no such thing as runtime bytecode compilation

proper gale
#

there are interpreters for C++, nobody cares to talk about the performance of those.

#

yes there is

hasty pewter
#

no because bytecode is cross platform compiled code

proper gale
#

it goes from python -> bytecode -> interpreter.

#

helps with interpreter speed, while being lower load than a full compiler at startup

#

and prevents self changing code

hasty pewter
#

you're talking about AOT right?

proper gale
#

Attack On Titan?

#

sure

hasty pewter
#

.l..

#

Ahead Of Time..?

proper gale
#

yes, AOT compilation.

hasty pewter
#

lol

#

imagine if this randomly turned into a gaming conversation

#

"OMG u play that game as well, it's sooooo cool"

proper gale
#

can i complain about minecraft and its optimization?

hasty pewter
#

YES

proper gale
#

or rather, lack there of.

hasty pewter
#

You certainly can

proper gale
#

it uses,

#

OpenGL

hasty pewter
#

because it's a really bad example of how to use java in a game

proper gale
#

2.1...

#

its an example of you can

#

its also an example of for the love of god dont do it this way

hasty pewter
#

yup

#

well, you know, it would have been ok if it was only like that during the beta

proper gale
#

yea

hasty pewter
#

but people just accepted its a total resource sucker and just went with it

#

instead of fixing it

proper gale
#

its not so much that

#

its more its use of OpenGL 2.1

hasty pewter
#

really? does that have so much impact?

#

As you can tell I never investigated what's minecraft performance culprits

proper gale
#

so its a nice stack like this cpp glBegin(GL_TRIANGLES) glPushMatrix(); glTranslate(1, 1, 1); glVertex(...); //... more glVertex(...); // glPushMatrix/glPopMatrix(); glEnd();

#

vs cpp glBindVertexarray(VAO); glDrawElementsInstancedBaseInstance(...); glBindVertexarray(0);

#

second one can draw thousands of polys with three calls

#

first can draw same thousands of polys with, three times the calls.

#

@hasty pewter ^

hasty pewter
#

hmm

proper gale
#

three times the thousands, not 9

hasty pewter
#

didnt they use LWJGL though?

proper gale
#

yes

hasty pewter
#

why doesnt LWJGL optimize some btis?

#

*bits

proper gale
#

LWJGL supports OpenGL 1.1 -> 4.6

#

its a mapping, not a layer.

#

Light Weight Java Game Library

#

its a very thin layer.

hasty pewter
#

yeah but the idea of such a library is (usually) that you can quite easily go to a newer Opengl version without changing too much code

proper gale
#

no no no no no

hasty pewter
#

or is that not the case for LWJGL? i havent used it since before opengl 4 came out

proper gale
#

as i said, its an OpenGL mapping, not a layer.

#

glVertex(1, 1, 1); calls glVertex(1, 1, 1); in C++

#

well, glVertex3f(float, float, float);, but same diff

#

LibGDX is the one you are thinking of

#

its implemented on top of LWJGL

#

and is well optimized

#

aswell as JMonkeyEngine

hasty pewter
#

Ah

#

I used JME a few times back in the day

#

but I'm not very good in 3D

proper gale
#

3D ezpz

#

have you used newer OpenGL versions much?

hasty pewter
#

nope not at all

proper gale
#

you familiar with highly parallel programming?

hasty pewter
#

ive done a lot of multithreading work

proper gale
#

not standard multithreaded

hasty pewter
#

but not in the category

#

of highly parallel

proper gale
#

i mean like, thousands of cores.

hasty pewter
#

yeah like OpenCL

proper gale
#

mhmm

#

the good shit

#

none of that proprietary bullshit

hasty pewter
#

is CUDA actually proprietary?

proper gale
#

yes

#

Nvidia GPUs only

hasty pewter
#

but the SDK?

proper gale
#

runs on linux and windows

#

still Nvidia only

#

having an AMD GPU, i dont really like that

#

my laptop is intel and Ngreedia

#

but my desktop will soon be full AMD

#

transition from fully green team

#

just need to swap my 970 for my RX480 sitting on top, waiting to be installed in the loop.

hasty pewter
#

hehe

#

purist 😛

proper gale
#

Open standards and open source FTW!

hasty pewter
#

yes please

#

but don't pull an android

#

"IT's open source! you just can't change anything when you use it and the drivers are vague NDA'd binary blobs"

proper gale
#

yea, thats not what i mean.

#

i mean stuff like AMD's open source Linux drivers, OpenCL/GL/Vulkan, Linux in the first place.

#

sooo, not Nvidia, or Microsoft.

hasty pewter
#

(:

proper gale
#

@hasty pewter dont get my wrong, Nvidia makes a great product.

#

but for the price, you cant beat AMD on raw compute for GPUs

#

and Ryzen was a much better choice for me over Coffeelake

#

mostly because of price.

hasty pewter
#

yeah glad there's an actual choice again

proper gale
#

still kicks my 3770k's ass, and was only $350

#

for a board and CPU

#

1700X + Crosshair VI Hero mind you

#

soo, not a cheap board.

nocturne galleon
#

I need assistance with my html and JavaScript. I have a script so on hover i plays sound using sound id but i already have another mp3 playing how can I make it pause the other. if u think you can help ill send code in morning.

devout lava
hasty pewter
#

@nocturne galleon i can help if you want

devout lava
#

@nocturne galleon ```php
if( isset($_GET['r']) ){
$id = $_GET['r'];
if( file_exists("txt-db/$id.txt") ){
$get_long_link = file_get_contents("txt-db/$id.txt");
$ip = $_SERVER["HTTP_CF_CONNECTING_IP"];
$country = $_SERVER["HTTP_CF_IPCOUNTRY"];
$user = md5(uniqid(rand(), true));
$time = date("Y-m-d h:i:sa");
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "urlanalytics";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
}
$sql = "INSERT INTO IDs (ID, Country, User, IP, time)
VALUES ('$id', '$country', '$user', '$ip', '$time')";
if ($conn->query($sql) === TRUE) {
} else {
}
$conn->close();
header("location: $get_long_link");
}else{
}
}

hasty pewter
#

@devout lava you need to sanitize $_GET['r'] before you use it like that

devout lava
#

?

hasty pewter
#

you need to make sure I can't just do ?r=../somefile

#

but more importantly that I can't exploit your SQL

devout lava
#

yeah

hasty pewter
#

is it a number or a string?

devout lava
#

0-9 a-Z

hasty pewter
#

I think you can do this then:

#

$id = preg_replace('/[^a-zA-Z0-9]*/', '', $_GET['r']);

#

that will remove any non alphanumeric characters

devout lava
#

oh ok

#
if( isset($_GET['r']) ){
        $id = preg_replace('/[^a-z0-9]*/', '', $_GET['r']);
. . . 
hasty pewter
#

i edited it, add A-Z to support uppercase characters

devout lava
#

ok

hasty pewter
#

using PDO with emulated statements is better but it's fine because you control all the other variables that are in your query

#

or just use mysqli_real_escape_string($conn, 'example string')

devout lava
#

Yeah I'm just gonna use object oriented

hasty pewter
#

if you want to try an ORM you should check out Eloquent

#

it's made by Laravel but can be used standalone and only requires like 3 lines of code and a class to work

devout lava
#

I'll stick with this 😄

#

@hasty pewter do you know of any good chart libraries that I can insert data with JSON?

devout lava
nocturne galleon
#
<!doctype html>
<html>
   <head>
      <title>luc.hz</title>
      <meta charset="utf-8">
      <meta name="viewport" content="initial-scale=0.9,maximum-scale=0.9" />
      <link rel="stylesheet" href="style.css">
     <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,600" rel="stylesheet">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   </head>
   <body>
      <audio autoplay="true" loop="true" volume="0.1";>
         <source src="tbr.mp3" type="audio/mp3">
      </audio>
      <div class="container">
         <h1 class="intro-text">luc.hz</h1>
         <span class="sep"></span><br>
         <span class="links">
            <a href="httg">INSTAGRAM</a><span class="sep"> | </span>
            <a href="httpll">STEAM</a><span class="sep"> | </span>
            <a href="https://mn">FLICKR</a>
         </span>
         <br><br>

         
         <script>
   function PlaySound(mySound) {
    var thissound=document.getElementById(mySound);
    thissound.play();
}

function StopSound(mySound) {
    var thissound=document.getElementById(mySound);
    thissound.pause();
    thissound.currentTime = 0;
}
      </script>
         <div class="font, playlist"> 
         
            <a onmouseover="PlaySound('mySound')" 
    onmouseout="StopSound('mySound')"
   style="text-decoration: none;" href="https://www.youtube.com/embed/videoseries?list=PLwGSEkTLkQ0O0BDcAwEehMb1f2ed1mh3t&amp;autoplay=1">PLAYLIST</a>
         
         </div>
      </div>
      <audio id='mySound' >
   <source src="tbr2.mp3" type="audio/mp3">
   </audio>
             <video src="DJI_0047.mp4" type="video/mp4" autoplay=true loop=true>
             </video>
      <div id="particles">
         <script src="particles.min.js"></script>
         <script src="app.js"></script>
      </div>
   </body>
</html>
#

@hasty pewter

hasty pewter
#

@devout lava no sorry but i think most of them take json

devout lava
#

Ok

hasty pewter
#

@nocturne galleon you need the YT JS api

#

you need to add enablejsapi=1 to the youtube url

devout lava
#
<a onmouseover="PlaySound('mySound')" 
    onmouseout="StopSound('mySound')"
   style="text-decoration: none;" href="https://www.youtube.com/embed/videoseries?list=PLwGSEkTLkQ0O0BDcAwEehMb1f2ed1mh3t&amp;autoplay=1&amp;enablejsapi=1">PLAYLIST</a>
hasty pewter
#

^ yep

#

when you load the API you can call .pauseVideo() on the element

devout lava
#

@proper gale I added tracking, now I need to add a way to see them with out using phpmyadmin 😄

proper gale
#

add a www.my.url/tracking.html?

devout lava
proper gale
#

that works too

devout lava
#

lol

proper gale
#

same idea

devout lava
#

Now I need to figure out how I want to show the data

proper gale
#

somwhere i have php source that shows how to do it in a simple grid

#

no idea how it works, why, or if it would be helpful.

#

i didnt write it.

nocturne galleon
#

@hasty pewter the playlsit is a different thing. I want to play a mp3 when I hover on the playlist text. It does that but I need to change the js to stop the old mp3 i think

devout lava
#

Yeah I know how to make it display in a HTML table but I sorta want to show charts.

proper gale
#

nor do i plan on figuring out how the fuck it does work

devout lava
#

lol

proper gale
#

oh, i would jump striaght to webgl but i know thats wayyyy overkill.

devout lava
proper gale
#

i figured it would just be the urls, and how much they were used.

hasty pewter
#

@nocturne galleon Then just use onmouseover="StopSound('mySound'); PlaySound('mySound')"

proper gale
#

total uses, use/min, hot new ones, etc.

hasty pewter
#

If i understand you correctly

devout lava
#

Would it make sense to have a graph showing the number of people that have clicked or typed in the url on a line graph or something?

#

So like enter a ID and it shows usage over time?

proper gale
#

i mean, i think it would be cool if it was behind the number

#

where the highest is 100%, and its relative to that one.

#

that could also be cool.

#

lot more DB space though

devout lava
#

This is my project for the week 😄

proper gale
#

tracking just the total number of uses is tiny, tracking over time takes linear sotrage space.

hasty pewter
#

lot more db space?

devout lava
#

I have 30GB of disk space on this VM. I have used 8% so far.

#

rip

proper gale
#

depending on use, it could add up

hasty pewter
#

god damnit it removed my all caps query

devout lava
#

There shouldn't be a cap bot in this chat

proper gale
#

yup, get ready add some BOTCASE!!!!!!

hasty pewter
#

I figured if this is what you want you can just do:

SELECT URL, COUNT(*)
FROM ....
ORDER BY COUNT(*) DESC
GROUP BY URL
devout lava
#

Would this be good?
Have a PHP script that echos JSON data?
The client sends the data it wants and it sends JSON?

hasty pewter
#

then devide the count by the first one

#

yeah

#

that's a good use case to send JSON

devout lava
#

I use it for my online checking system

nocturne galleon
#

devdude where are you saying to put that

#

oh shit

#

nvm

hasty pewter
#

😃

nocturne galleon
#

wouldnt I need to make the first mp3 id like 'mysound' or smthn??

devout lava
#

How would I count how many entries have the same ID?

nocturne galleon
#

nvm @hasty pewter thanks for help it works

devout lava
#

SELECT COUNT(*) FROM data WHERE ID = 'UWA' ok. this works in mysql console, now I need to make it run in PHP

#
$conn  = 'SELECT COUNT(*) FROM data WHERE ID = \'UWA\'';
#

would that work?

hasty pewter
#

Yes

#

Why didnt you just try haha?

devout lava
#

ok

#

I am

#

its not working though . . .

hasty pewter
#

Try quote data

#

Using bAckticks

devout lava
#
$count  = "SELECT COUNT(*) FROM 'data' WHERE ID = $ID";
$result = mysqli_query($conn, $count);
echo $result;

see anything wrong with this?

#

wait

#

idk

hasty pewter
#

yes

#

make it data

#

not 'data'

devout lava
#

ok

hasty pewter
#

uhm

#

I meant `

#

but discord thinks those are meant to quote code

devout lava
#

still not working

hasty pewter
#

what's the error?

devout lava
hasty pewter
#

var_dump(mysqli_error($conn));

#

add that

devout lava
#

string(38) "Unknown column 'UWA' in 'where clause'" hmm

hasty pewter
#

oh right

#

you forgot to quote $ID

devout lava
#

oh

#

single or double?

hasty pewter
#

single

devout lava
#
$count  = "SELECT COUNT(*) FROM data WHERE ID = '$id'";
#

?

hasty pewter
#

yea

devout lava
#

string(0) ""

hasty pewter
#

is that the var_dump of the error?

#

because thats good 😛

devout lava
#

oh 500 error

hasty pewter
#

you wrote $ID before

devout lava
#

I changed it

hasty pewter
#

probably undefined variable $id

#

oh ok

devout lava
#
<?php
if( isset($_GET['id']) ){
    $id = $_GET['id'];
    $servername = "10.0.0.33";
    $username = "root";
    $password = "omitted";
    $dbname = "analytics";
    $conn = new mysqli($servername, $username, $password, $dbname);
    if ($conn->connect_error) {
        $errorJSON->error = $conn->connect_error;
        $error = json_encode($errorJSON);
        die($error);
    } 
    $count  = "SELECT COUNT(*) FROM data WHERE ID = '$id'";
    $result = mysqli_query($conn, $count);
    var_dump(mysqli_error($conn));
    echo $result;
} else {
    
}
?>
hasty pewter
#

you can't echo a query result

#

var_dump($result);

devout lava
#

oh

#

lol

#

object(mysqli_result)#2 (5) { ["current_field"]=> int(0) ["field_count"]=> int(1) ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> int(0) }

hasty pewter
#

this is where eloquent would have been pretty nice for you 😛

devout lava
#

lol

hasty pewter
#

use this:

#

$row = mysqli_fetch_row($result);

#

then

#

var_dump($row);

devout lava
#

{"error":"No connection could be made because the target machine actively refused it.\r\n"}
ok tested to see what shows when the MySQL server is down

#

array(1) { [0]=> string(1) "1" }

#

that "1" ?

hasty pewter
#

that's the count!

#

it works! 😄

devout lava
#
    $successJSON->error = var_dump($row);
    $success = json_encode($successJSON);
    echo $success;

would that work?

#

nope

hasty pewter
#

what is the error supposed to do?

#

and var_dump is for showing it to you

devout lava
#

oh wait

hasty pewter
#

$ouput = [];
$output['count'] = $row[0];
echo json_encode($output);

devout lava
#

I want to make it JSON

#

thats better

hasty pewter
#

yep

#

you could make it a fraction better if you replaced

#

echo json_encode($output);

#

with

#

header('Content-Type: application/json');

#

echo json_encode($output);

devout lava
#

oh yeah, I forgot to add the json header

#
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: application/json');
hasty pewter
#

good addition 👍

devout lava
#

yeah

#
<?php
$id = md5(uniqid(rand(), true));
$user = $_COOKIE['user'];
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: application/json');
$myObj->user = $user;
$myObj->ip = $_SERVER["HTTP_CF_CONNECTING_IP"];;
$myObj->id = $id;
$myJSON = json_encode($myObj);
echo $myJSON
?>

I use it a lot

hasty pewter
#

does that piece of code work?

devout lava
#

yeah

hasty pewter
#

figured you need $myObj = new stdClass;

#

but looks like you don't

devout lava
#

{"user":"4ef28353371a9fd2c0e867ebdffb4f05","ip":"omitted","id":"9a6dc0e8f284a1ad3f88c2584061f465"}

hasty pewter
#

ok nice

devout lava
#

POST or GET for retrieving data from the database?

restive sundial
#

my cmake file looks like cancer

devout lava
#

@hasty pewter should the User be stored in cookies instead of being random each time?

#

Its a random md5 right now

hasty pewter
#

Yes

#

Store it in session to not allow people changing it

devout lava
#

Ok

#

done

#

hmm

#

@hasty pewter I need help again 😄

hasty pewter
#

whats up?

devout lava
#

I need to select based on time

#

2018-03-24 13:42:38 heres the time format
Y-m-d h:m:s

hasty pewter
#

what do you want to do though?

#

the time format isn't relevant if you used datetime (or god forbid timestamp)

devout lava
#

So I want to get the number of requests past 30 min, 1hr, 1day, week, month, and year.

#

wait nvm I'm not going to do that yet

swift niche
#

anybody with experience in windows batch scripts knows how to use a variable that stores a file name, which contains a ! that I need included when that variable is used?

devout lava
#

use quotations?

swift niche
#

That doesn't work, since apparently you can use !varname! like you would %varname%, so having a single ! inside the expansion of the variable doesn't work even with quotes

devout lava
#
set "test3=Test3^!"
#

?

#
echo !test3!
swift niche
#

now what if the variable is from a for loop, like this:
for %%a in (*.txt) do (
rem do some stuff with %%a here
)

nocturne galleon
#

System.out.println("<o/");

tropic grail
#
var banana = document.createElement("audio"); banana.src="https://opl.io/test/twitchchat/banana/banana"+Math.floor(Math.random()*10+1)+".mp3"; banana.play();
nocturne galleon
#

^java? no

devout lava
#

JavaScript

nocturne galleon
#

oh

devout lava
#
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: application/json');
$memfree = shell_exec('wmic os get freephysicalmemory');
$memtotal = shell_exec('wmic os get TotalVisibleMemorySize');
$memfree_formatted_s1 = str_replace(PHP_EOL, '', $memfree);
$memfree_formatted_s2 = str_replace(FreePhysicalMemory , '', $memfree_formatted_s1);
$memfree_formatted_s3 = str_replace(' ', '', $memfree_formatted_s2);
$memtotal_formatted_s1 = str_replace(PHP_EOL, '', $memtotal);
$memtotal_formatted_s2 = str_replace(TotalVisibleMemorySize, '', $memtotal_formatted_s1);
$memtotal_formatted_s3 = str_replace(' ', '', $memtotal_formatted_s2);
$mem->free = $memfree_formatted_s3;
$mem->total = $memtotal_formatted_s3;
$json = json_encode($mem);
echo $json;
?>
#

I need to make it better but it works

#

and this only works on Windows

#
{"free":"2287872","total":"8303548"}
#

example output

lost creek
#

Why are you using PHP? Try out something called EJS, it's pretty good and simple.

devout lava
#

Idk I just wen with PHP 😄

vestal glen
#

wonders how one would compare ejs to PHP and not PHP to node... EJS is more like twig...

karmic sinew
#

anyone know anything about c++ here

vestal glen
#

I know something about C++ >_>

proper gale
#

@karmic sinew I do, was just using it, before disassembling my desktop.

#

What about the little bitch of a language would you like to know?

karmic sinew
#

getting an md5 hash using a mac in c++

tropic grail
#

When you realize macs can run unix commands...

#

Isn't there a command called like md5sum or something.

devout lava
#

└──╼ $md5sum README.md 5fd454d284e3888d2e37336d485b69c8 README.md

#

@tropic grail thats md5sum

proper gale
#

Google, it's your friend.

devout lava
#

^

karmic sinew
#

./findhash.h:13:10: fatal error: 'openssl/md5.h' file not found

proper gale
#

Install openssl

karmic sinew
#

brew says it is

#

i may have fixed it

#

yeah i have no idea how to simply get an md5 of a string using the openssl lib

proper gale
#

Why md5?

karmic sinew
#

i decided to use it for a program for almost no reason

proper gale
#

Okey, get a raw memory c/c++ md5 function (they exist, Google it) and pass the raw string to it.

graceful silo
#

Best place on the Discord server that you'll find most likely.

ebon light
#

found the solution to my problem 0

graceful silo
#

👍

ionic hull
#

🤔

devout lava
hasty pewter
#

@tropic grail do you know about brew?

tropic grail
#

Yep

hasty pewter
#

Nvm

raven jolt
#

Hi

pulsar bough
#

What is more common place in html <br> or </br>

devout lava
#

<br>

#

There's no </br>

vestal glen
#

there is optionally <br/> though

#

but it doesn't matter. either <br> and <br/> are ok.

devout lava
#

I usually see <br>

vestal glen
#

well yeah, shorter forms are usually more popular 😉

devout lava
#

Lol

vestal glen
#

but some people really like xml and make sure stuff is closed properly.

pulsar bough
#

Where does anyone here host a site?

#

@vestal glen there also is xhtml

vestal glen
#

that's just xml with a specific namespace 😉

hasty pewter
#

not exactly

#

it was a huge failure anyway

#

and puts formality over functionality

karmic sinew
#

so umm what can i do when i have 2 cpp files, one of them being compiled standalone with some arguments when running works, but when i compile the other one (which uses the one that worked to do the actual math), the system is never able to compute a correct calulation

#

i know i am passing the right function args

proper gale
#

@karmic sinew did you pass them both to a linker or just the compiler?

#

if you are doing anything multi-file i would recommend using a build system to make your life with C++ that much less painful (its still going to be painful)

#

i personally use CLion, which uses CMake, and then CodeBlocks NMake makefiles.

regal nest
#

@pulsar bough mine's just a static site hosted on Github

#

and with a domain record pointing to it

tropic grail
#

@pulsar bough <br/>

pulsar bough
#

Yea remembered hearing that but wasn't sure

lost schooner
tender trail
#

can we share a repo in this ch or somewhere else?

proper gale
#

@tender trail promote or ask for help?

tender trail
#

promote i guess

proper gale
#

i dont see a better channel, but im not sure how the rules about that works, soooooooo.

tender trail
#

well its not that big of a deal. pretty simple project really. if anyone wants, check me out on github with the same user name, its my first pinned repository

proper gale
#

you making a torrent searcher?

tender trail
#

for that website yeah

proper gale
#

huh

tender trail
#

its a library not an app

proper gale
#

i realize that, it still does the searching

tender trail
#

i was actually developing an app for my personal use, then i thought i could put it -as a library- on github since i basically dont have any

proper gale
#

oh

#

huh

#

im making a giant ass library for me personal use

#

currently working on the backed of the backed of backed of the library, which will be used as a backed for the backed of the final app i want to make.

tender trail
#

huh

proper gale
#

yay preprocessors and compilers!

#

well, transpiler is more accurate.

tender trail
#

i dont get exactly what you're coding

proper gale
#

right now its a limited version of the c preprocessor

tender trail
#

you doing that just out of self interest or are you planning on developing something new maybe

proper gale
#

mostly self interest

#

the library im wroking on is a render layer so the same source can use OpenGL 3.3->4.6 and Vulkan, with complex compte shaders handled by OpenCL.

#

thing is, GLSL changed a lot inbetween GL33 and VK10

#

and OpenCL C is very very different

#

but i need a common input language for them all.

#

yay overcomplicated bullshit.

tender trail
#

ok you are losing me lol im not really equipped to understand opengl&vukan stuff 😄

#

good luck with it though

proper gale
#

GLSL is the shading language used to program the GPU, in OpenGL

#

Vulkan uses SPIR-v, which can be generated from specific GLSL code.

#

OpenCL uses OpenCL C.

#

i want to be able to use all three, with a single input language.

tender trail
#

ohh

proper gale
#

SPIR-V is actualy a bytecode language

tender trail
#

so there is no lang like what youre working on?

#

isnt that a big deal

proper gale
#

so i need to transpile between said input language to GLSL330, GLSL460, GLSLVK10, and OpenCL C 120, 200, 210, 220.

#

no, there is not.

#

im 100% going to use compiler/layer magic to make it work.

#

shit like doing vertex processing with OpenCL right after you do a particle system update, then pipe that to OpenGL for rendering.

tender trail
#

i feel silly cause i dont understand half of what you say 😄 so does it have a performance setback or something?

proper gale
#

yes

#

but i believe i can make up for that with automatic optimization

tender trail
#

so back to it being a big deal, it seems like it is to me

#

dont you consider making money off of it?

proper gale
#

nope

#

not directly at least

tender trail
#

hdym

proper gale
#

hm?

tender trail
#

what do you mean by "not directly"

proper gale
#

if it helps me get a job, great, i dont plan to sell it.

tender trail
#

apparently hdym doesnt stand for "how do you mean" i thought it did

proper gale
#

wdym is what do you mean

tender trail
#

i guess that could look good on your resume

#

yeah i know, isnt "how do you mean" a phrase also?

proper gale
#

not that i know.

tender trail
#

good luck on your transpiler

proper gale
#

include is working, YEET ```c
ifndef CECIL_HEADER

#ifndef CECIL

struct vec2{

float x, y;

};

struct vec3{

float x, y, z;

};

struct vec4{

float x, y, z, w;

};

struct mat4{

float x11, y12, z13, w14;

float x21, y22, z23, w24;

float x31, y32, z33, w34;

float x41, y42, z43, w44;

};

vec4 operator*(mat4, vec4);

mat4 operator*(mat4, mat4);

#endif

#endif

vec3 vertex;
vec3 vertNormal;
vec2 texturePosition;

const char* s = ("E") ("B") ("C")

mat4 transformMatrix;

vec3 normal;

vec4 color;

void vert() {

}

void frag() {

}```

proper gale
#

@devout lava you were typing something.

devout lava
#

wot

nocturne galleon
#

@proper gale Hey buddy

#

I know i'm a bit late on this

#

But can you use Hastebin / Pastebin for that please

#

The newline spam is a bit much.

proper gale
#

jakkuah, y u so delete messages!?!

#

jakk already said that

#

i have and do use pastebin

#

but i dont expect to get muted if something like that fits into a message.

#

there are a few newlines, but i would personally not call it spam.

devout lava
#

Thats from when I sent code

proper gale
#

yea, code can be many short lines.

#

stuff like this is few characters per line ```c
#ifndef CECIL_HEADER
#define CECIL_HEADER

#ifndef CECIL

#define shader void

#define in
#define out
#define internal
#define uniform

#define location(location)
#define component(location)

#define interpolation_mode(mode)
#define INTERPOLATION_FLAT
#define INTERPOLATION_LINEAR

#define stage(stage)
#define VERTEX
#define FRAGMENT
#define COMPUTE

#define layer(layer)

struct vec2{
float x, y;
};

struct vec3{
float x, y, z;
};

struct vec4{
float x, y, z, w;
};

struct mat4{
float x11, y12, z13, w14;
float x21, y22, z23, w24;
float x31, y32, z33, w34;
float x41, y42, z43, w44;
};

vec4 operator*(mat4, vec4);
mat4 operator*(mat4, mat4);

#endif

#endif```

#

but i cant just remove the newlines

devout lava
proper gale
#

wut?

#

that got a mute?

devout lava
#

yeah

proper gale
#

what a joke

devout lava
#

ikr

proper gale
#

my using spaces and not tabs usually trips discords character limit first.

devout lava
#

yeah

proper gale
#

because lines like this are mostly spaces ```cpp
std::ifstream ifstream(includePath.string());
std::stringstream stringstream;
stringstream << ifstream.rdbuf();
auto inStr = stringstream.str();
const char* includeString = inStr.c_str();

                                char* includePtr = new char[inStr.length() + 1];
                                strcpy(includePtr, includeString);
                                stackPush(includePtr, 0);```
devout lava
proper gale
#

then there is this vpp nameAndArgs.find('(') == -1 ?

devout lava
#

even longer

proper gale
#

yea, you cant just shorten that to have less newlines.

devout lava
#

yeah

#

and why use pastebin when Discord is faster?

proper gale
#

^

#

hastebin is nice for speed, but its syntax highlighting is not as good as a good ol ```cpp

devout lava
#

yeah

#
net use T: "\\ADSERVER\homedir$\%username%"
net use Z: "\\ADSERVER\data"
net use X: "\\ADSERVER\pictures"
#

vs

proper gale
#

even pastebin is not as good

devout lava
#

^

proper gale
#

and IDEs just go and crush discords highlighting

devout lava
#

plus I don't have to open something else

mellow hound
devout lava
#

nice

civic mountain
#

I want to see a full wet code discord bot

devout lava
#
import asyncio
import discord
import time
from discord.ext import commands
from discord.ext.commands import Bot
TOKEN = ''
description = '''PiBot'''
client = discord.Client()
bot = commands.Bot(command_prefix='^', description=description)
@bot.event
async def on_ready():
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('------')
    await bot.change_presence(game=discord.Game(name='with Electricity'))
@bot.command()
async def add(left : int, right : int):
    """Adds two numbers together."""
    await bot.say(left + right)
@bot.command()
async def multiply(left : int, right : int):
    """Multiplies two numbers together."""
    await bot.say(left * right)
@bot.command()
async def divide(left : int, right : int):
    """Divides two numbers together."""
    await bot.say(left / right)
@bot.command()
async def subtract(left : int, right : int):
    """Subtracts two numbers together."""
    await bot.say(left - right)
@bot.command(pass_context = True)
async def clear(ctx, number):
    mgs = []
    number = int(number)
    async for x in bot.logs_from(ctx.message.channel, limit = number):
        mgs.append(x)
    await bot.delete_messages(mgs)
    await bot.say("Deleted messages.")
    time.sleep(5)
    number = 1
    async for x in bot.logs_from(ctx.message.channel, limit = number):
        mgs.append(x)
    await bot.delete_messages(mgs)
@bot.command()
async def info():
    await bot.say("Feature Coming Soon!")
    time.sleep(5)
    number = 1
    async for x in bot.logs_from(ctx.message.channel, limit = number):
        mgs.append(x)
    await bot.delete_messages(mgs)
bot.run (TOKEN)
#

a small bot I made

mellow hound
#

@civic mountain what do you mean by wet?

#

like requests to api and that

#

no pre-made libs?

civic mountain
#

yeah

nocturne galleon
#

Why would anyone do that?

#

It wouldn't be versatile

#

In the end your bot would be a library

north knoll
north knoll
#

@devout lava

devout lava
#

lol

nocturne galleon
#

CS homework

#

isn't that C

little knoll
#

C, C++ and C# have a lot in common.

nocturne galleon
#

How so?

#

C# and C++

#

C++ is an extension of C so obviously

vestal glen
#

(isn't CS C# 😉 )

tired rampart
#

C# has more in common with Java than C/C++ imo... but they are all fairly similar 😛

#

syntax and keyword wise anyways, feature wise they are all quite different

nocturne galleon
#

Yeah I was talking about Mike replied with a C program

proper gale
#

@tired rampart they are all C-like lanuages, but you are correct, C# is almost copy paste Java, C/C++ is not, not at all.

tired rampart
#

indeed

#

with the "fairly similar" I really just meant that they share some basic syntax rules

proper gale
#

@nocturne galleon C or C++, the use of printf makes it look more like C than C++

tired rampart
#

like, they arent as different as lets say Java and Python

proper gale
#

even Python has some roots in C

#

and as for how you actually write code, Python is more similar to Java than C is to Java.

tired rampart
#

you can find similarities with C in a lot of langs though 😛

#

yeah

proper gale
#

drop the brackets and semicolons, Python and Java are very similar.

tired rampart
#

I was mostly talking about the visual aspect of it though, not really code "style"

proper gale
#

C and Java, C be like the fuck is an object

tired rampart
#

so little things like def, etc

#

lolyep

proper gale
#

thats static typing vs dynamic typing

#

which Java is significantly more dynamic than C++ is.

tired rampart
#

I know the differences between them dont worry 😛

#

was just clarifying my point a bit more

proper gale
#

okey

tired rampart
#

you can have objects in C if you believe hard enough

proper gale
#

i mean

tired rampart
#

might need some help from special[tm] substances

proper gale
#

i know that

tired rampart
#

but I mean errr...

proper gale
#

lets not go down that path.

#

i like my function overloads.

tired rampart
#

yeah

#

I "like" my function pointer structs

#

(dont go down the path of doing that... save yourself the pain)

proper gale
#

you mean calling a void* (*func)(void*)?

tired rampart
#

yeah

proper gale
#

ive already done that

tired rampart
#

and just having a big struct of them and use that sortof like an object

proper gale
#

but its all wrapped up in itself.

#

i have 17k lines of that.

tired rampart
#

xD

#

well how else would you do device driver interfaces in a kernel?

#

given you wanted to stay with purely C

proper gale
tired rampart
#

OGL, lovely

proper gale
#

its actually for grouping an mass of OpenGL calls

tired rampart
#

makes sense

proper gale
#

so i can make the same calls easier.

tired rampart
#

the driver groups them somewhat, but its always better to group them by yourself