#development

1 messages ยท Page 32 of 1

proper gale
#

its actually for a lot more than just grouping

#

im implementing a whole layer on top of that so i can make calls in more Vulkan like manner.

#

from any thread, and in parallel.

tired rampart
#

sounds fancy

proper gale
#

ofc, implemented on both OpenGL (seen there) and Vulkan.

tired rampart
#

you will still have the OGL driver overhead though, why not move to vulkan completely

#

I was typing that as you sent that

#

you made it irrelevant now ๐Ÿ˜›

proper gale
#

because not every GPU supports Vulkan, and im going to 1.1 not 1.0

tired rampart
#

yeah fair enough

proper gale
#

i plan on having the exact same application code be supported on OpenGL 3.3 core no newer extensions (8800 GTX) to OpenGL 4.6 and all ARB extensions not yet in the core spec. Then for Vulkan im looking at 1.1 minimum.

#

but not just supported, run faster on 4.6 ofc

tired rampart
#

3.3 core is a good base

proper gale
#

because DSA and stuff.

#

among other things.

tired rampart
#

afaik its what LLVMpipe can emulate reliably on linux without a proper gfx driver

proper gale
#

it is

#

not 100% sure how im going to handle compute though.

tired rampart
#

uff yeah

#

when were compute shaders added in GL?

proper gale
#

because on Linux OpenCL is a pain, but i really want to use OpenCL.

#

yes

tired rampart
#

thats like 4.x crap isnt it?

proper gale
#

4.3

tired rampart
#

yea thought so :/

proper gale
#

ill have to add in a internal CPU compute implementation so it works

#

i never said 3.3 would always be fast

#

just that it would work

tired rampart
#

I would be surprised if you cant find an OpenCL all-in-one CPU package somewhere

proper gale
#

they exist

#

but im already writing a transpiler for the shading language though, sooo, not that big a deal to add a back end to output OpenCL C vs anything else.

tired rampart
#

yeah, if youre already onto that, yh... xD

#

just a fair warning

#

OpenCL drivers are really fucky even on windows

proper gale
#

oh i know

tired rampart
#

not in terms of stability, but performance consistency

proper gale
#

the AMD ones on Linux are good.

#

which is what i use, mostly.

#

ofc, it wont have to use OpenCL

#

i just want to, beacuse it would make more complex computations easier to handle.

tired rampart
#

I coded a benchmark that measured how long it took to render a portion of the mandelbrot set

#

and calculated scores based on that

proper gale
#

Vulkan has a very good compute API in it.

tired rampart
#

my Radeon R7 360 got like 10k points, which I thought was fine

#

then I ran the CPU version (just switched it to use CPU instead of GPU device)

#

Ryzen 7 1700 with the AMD OpenCL driver did around 3.5k

#

which I thought was about in line with what to expect CPU vs GPU wise

#

then I installed the Intel OpenCL CPU runtime tho

#

and it got 13k points

#

no idea why the two drivers behaved so differently on the CPU

#

and to me its weird that it would beat the GPU...

proper gale
#

what CPU do you have?

#

and what benchmark?

tired rampart
#

Ryzen 7 1700
I coded a benchmark that measured how long it took to render a portion of the mandelbrot set

#

I mentioned both ๐Ÿ˜›

proper gale
#

i didnt know that you had a 1700, just that you had that benchmark

tired rampart
#

๐Ÿ˜›

proper gale
#

...

#

ill see what my 1700x will do.

#

and my Vega and RX 480

tired rampart
#

not sure how optimal it will be for Vega

#

dont remember what iteration count I used lol

#

so the shaders might actually exit too quickly and be limited by how fast it can dispatch compute work

proper gale
#

its 64SP/64CU

tired rampart
#

yeah but its the difference of looping 10 times inside of the shader on the GPU or looping over the shader compute dispatch 10 times

proper gale
#

only 10 times?

tired rampart
#

nah its like 1k or something

#

idk exactly

proper gale
#

was the GPU fully utilized?

tired rampart
#

yeah

#

bumping it up didnt do anything in terms of scores for me

proper gale
#

you know how to make good use of the GPUs SIMDs right?

#

or did you not program it?

#

at all.

tired rampart
#

I did and I mostly know

#

pretty old project though, probably not the greatest GPU optimized code xD

proper gale
#

okey, so the GPU was pinned without much instruction divergence and multiple work groups per CU that are not in total overfilling the registers and/or local memory?

tired rampart
#

not sure about reg utilisation but yeah

#

there isnt much branching in the shader code

proper gale
#

does it use local at all?

#

correct sync points to bring the instructions back together after the branches?

tired rampart
#

biggest mistake was probably letting OpenCL to schedule it on its own without explicitly telling it workgroups

proper gale
#

oh, yea, that will do it.

#

the CPU can handle that much much better.

tired rampart
#

still doesnt answer the huge difference between Intel's OpenCL and AMD's OpenCL driver

proper gale
#

Intel was the one running on your Ryzen CPU?

tired rampart
#

I ran both

#

Intel one was 3 or 4 times faster

proper gale
#

both on the CPU?

tired rampart
#

yes

proper gale
#

probably a more mature CPU driver

#

what about GPU?

#

the 360 is not fast card, but it should stomp on the 1700

tired rampart
#

yeah it should

#

and if I fix the workgroup sizes, it probably will xD

proper gale
#

if it doesn't, then ill try it on my newer card which are running the latest driver version.

#

well, almost.

#

i may download it from GIT and use that instead.

nocturne galleon
#

Is haskell worth learning?

ionic hull
#
Professionally? No if it is old and no one uses
As a hobby? Yes```
copper ravine
#

@nocturne galleon if you've never used a functional programming language before, it is worth having a look at it.

nocturne galleon
#

I've used PHP and Python

copper ravine
#

My comment still stands then ๐Ÿ˜ƒ

nocturne galleon
#

I'm also very familiar with Java 8 lambdas and such

copper ravine
#

lambdas are useful, but not the same as organizing an entire program around a functional model

nocturne galleon
#

Ah

#

I wasn't really sure what a functional programming language is compared to an imperative

#

So functional languages rely more on functions that are already defined for you?

proper gale
#

if i am correct, function languages are slow?

copper ravine
#

@proper gale that depends... since functional languages require a problem be defined as a sequence of immutable steps, and this typically leads to a very parallel solution, while the compiled code for a single "thread" might be slow, you can almost always scale out the solution to get back that lost performance (See: Google) ๐Ÿ˜ƒ

ebon light
#

F# is the greatest

#

the best lang ive learned through my years of undergrad

#

not one day i have been asked to use it

rare latch
#

hey guys: i'm looking for some people to help me with a GTA V FiveM framework. payout is 200 USD. must be familiar with C# or Lua. DM me if interested

proper gale
#

@rare latch does Java count?

rare latch
#

Not really

#

java is only client side

north knoll
#

can one of you devs do the world a favor and reverse engineer the google play books api from googles android app and make a windows app for google play books?

main wyvern
#

Go to the library, get a bloody book out. Simple as that

north knoll
#

@main wyvern they dont allow you to download them now that the chrome app is depreciated

ionic hull
#

Roses are red
Violets are blue
Unexpected "{"
On line 32

devout lava
#

another domain to add to my block list

#

lol

ionic hull
#

Mineralt is using some other domains

#

No point of doing that

devout lava
#

adds all

ionic hull
#

Xmr is dropping soo much

#

Wrong channel, but yeah

#

Feels bad man

devout lava
#

Oh lol

#

I already block it

ionic hull
#

Why do you have your domain

#

With that image thingy

devout lava
#

because I like it

ionic hull
#

Did you make your own screenshot program?

devout lava
#

No I use ShareX

ionic hull
#

:)

#

:/

ionic hull
real marten
#

oof feelsbadman

copper ravine
#

Python does have it's quirks

#

But it is certainly reasonably easy to learn

blazing python
#

js is pretty easy to learn

drifting sigil
#

should I declare my objects before a try/catch block?

#

and I am not using them outside the scope of the try/catch

copper ravine
#

you can't use them in the catch if they are declared in the try

#

hence (I am assuming that's Java) use automatic resource cleanup (introduced in Java 7 or 8 I believe) or declare them outside the try block

drifting sigil
#

@copper ravine yes, it is java. (Android specifically but that doesn't matter). I was not aware the catch would not be able to use them, thank you.

#

@copper ravine would you agree that for the sake of caution, it is normally better to declare objects before the try/catch ?

copper ravine
#

it really depends

#

the auto resource cleanup in java 8 is really nice since it simplifies the code

#

I generally try and keep declaration to the smallest scope that is required

drifting sigil
#

i really want to do a lot of research into java's garbage collection once I graduate and have the time

copper ravine
#

it's pretty neat, and to really design systems that are high performance or high scaling, you need to understand how it all works to a pretty deep level

drifting sigil
#

yeah, its nice because it gives you the best of both worlds, it will do it automatically, but if you want you can take manual control. kinda like having an automatic car with a manual mode

proper gale
#

@drifting sigil if the point of moving them out of the try block is to allow you to close them, i would recommend using the try-with-resources syntax.

#

and if you for some reason dont, you are going to want their entire syntax wrapped in a try-finally block (can be same try-catch) aswell so that in the event of an exception being thrown in internal code it still works as expected.

#

jesus christ C++ makes you think about resources differently

copper ravine
#

indeed it does

proper gale
#

like, i would not have put that much thought into it prior to using C++.

scenic pagoda
eager kayak
#

@scenic pagoda are you planning this to be responsive? Would need to know how it looks in mobile and tablet

scenic pagoda
#

It's planned to be responsive yeah, it would basically be the box with the text - and the navigation pushed into the box

#

And the text adjusted as needed

#

Will most likely change it to have a slide out menu

scenic pagoda
#

Most people would recommend Microsoft Visual Studio I would assume

copper ravine
#

@nocturne galleon what OS? Personal fun? School?

#

Then I'd say Visual Studio is not a bad choice

#

You can also have a look at CodeLite if you want a Free choice, but it is a steeper learning curve

nocturne galleon
#

Has anyone used AWS elastic beanstalk?

raven osprey
#

I am currently studying C++ in college, we use Visual Studios, but I like to use a text editor, (my choice is either Notepad ++ or Nano in terminal) and g++ as the compiler under linux.

hasty sail
#

CLion would be my goto

#

it is based on intellij so it is extremely smart

#

text editors are fine for really small things

#

but a proper IDE provides way more features and help you out way more than a text editor

copper ravine
#

Yes, I have only used CLion a bit (although I bought it, I should use it more!) but it is well laid out

#

Unfortunately CLion doesn't support microcontroller development very well :/

hasty sail
#

hmm okay, it should do fine with them as far as you find a sdk for them

#

but not exactly sure, don't really deal with microcontrollers

little knoll
#

Because you can now get Visual Studio for free (VS Community Ed.), I think it's the best choice for C++ (included debugger, Intelisense, quite good built in project manager...)

hasty sail
#

students get a free licence for JetBrains products

little knoll
#

Only if you have a student international id or email. My school done everything needed to give student licences by themselves.

#

We just had to give to our school our email address to get the licence.

proper gale
#

@manic kayak or you can send in a special request and get it even if in high school like i am.

#

@hasty sail CLion FTW

#

@nocturne galleon are you a currently enrolled student?

#

@raven osprey apparently clang gives better debug codes than g++, may want to try it.

#

it is worth noting that Clion (and the IDEA platform in general) is a keyboard centric IDE platform, sooooo, get used to the keybinds.

raven osprey
#

Mmmm Keybinds.

proper gale
#

i like that feature of the platform personally.

#

then get a free Clion student license, IMO its the best C++ IDE.

nocturne galleon
#

What is the best way to write a DPI/resolution-independent GUI for a game?

#

I'd like the game's UI to look the same and take up the same amount of space to the eye regardless of the DPI and resolution.

#

Right now, the game's UI is written to work best in 1080p, but some players with 4K monitors have readability issues with text being too small and blurry. I'd like to avoid making them use system-wide DPI scaling.

#

This same issue also causes lower-resolution displays to not be able to fit as much on screen as my 1080p display.

#

I'd like to do it similar to how Saints Row 4 does it. I can run it in pretty much any 16:9 resolution and the text etc will all be in the same spot and take up the same amount of space. I just lose detail on lower resolutions and gain on higher.

elfin onyx
#

scale it based on relative resolution?

nocturne galleon
#

w-what's that mean

elfin onyx
#

rather than scaling on DPI, measure the curren resolution, math it using whatever SDK/API your using to draw it and math it so its 60% or w/e

#

text gets a bit... difficult

#

so no matter the resolution, the menu takes up 60% of the screen or w/e

nocturne galleon
#

thing is my ENTIRE GAME is UI-based

#

not just the menu

#

It takes place in a Unix-like operating system with a full desktop environment

#

and...

#

I'm not sure how to scale all that properly

#

(I'm using MonoGame btw)

elfin onyx
#

depends on what toolset your using, but that sounds like a pain

nocturne galleon
#

I'm writing my own in-engine UI framework.

#

(writing my own game engine ontop of MonoGame since it's just a unified API over DirectX and OpenGL and other stuff for keyboard/mouse/audio/etc)

#

I'd like to have this scaling stuff done at a level BELOW the UI framework

#

so I don't have to do much porting

proper gale
#

@nocturne galleon what is the screen cordinate space you have to use?

#

in OpenGL it is -1 -> 1, Pos X right, Pos Y up, and Pos Z back

#

so you can use a matrix that accounts for aspect ratio to create it, then if its in normal scales regardless of resolution, it scales with window size.

nocturne galleon
#

I'm not dealing with 3D

#

this is 2D

#

and the coordinate space is 0-<screen width in pixels> X

#

and 0-(screen height in pixels) Y

#

0,0 = top-left corner

proper gale
#

I know, I'm talking about the 2d part of opengl.

#

You should be about to create a matrix that can do coordinate transforms to that based on a standard coordinate space.

#

The z depth has to do with draw order in 2d.

#

Its used for layers.

nocturne galleon
#

ahh. In MonoGame, or at least, the way I use it

#

things render in the order you tell them to

#

in the code

#

so if I say "draw texture a", then "draw texture b"

#

texture b will ALWAYS be ontop of texture a because that's just when I called the draw function in the code

#

I don't use any z coordinates for layering

#

anyway I haven't a clue how to use matrices in MonoGame with the SpriteBatch class

proper gale
#

that is correct of OpenGL as well, if you do note specify depth (it assumes 0)

#

at the same Z-depth or wiht the depth test off, it will draw in drawcall order.

#

but if you wanted to draw the background last, enabling the depth test and moving it to a higher z (further back) it will then be rendered behind everything else despite being draw last, applies to everything without transparency (its still a good idea to try to draw back to front)

small escarp
#

don't you mean front to back?

#

back to front will draw useless details on top of each other

#

front to back will use culling to skip the occluded components

#

and for dpi independence you would probably want some classes which know how to render based on DPI and window size, e.g. button and label

#

but text is complicated since line-breaks and things like that are going to be very different at different resolutions and at some point it's just impossible to fit it in the screen at all

#

naturally, most of these issues are typically solved (in other GUI toolkits) through sizers and/or css-like styling, instead of absolute positioning

proper gale
#

@small escarp no, you want to draw back to front.

nocturne galleon
#

A lot of my game's UI is actually anchored based on the size and location of sibling UI elements

#

For example, the in-game OS's "Appearance Settings" window

#

the window itself is a fixed width and height. And this is what it looks like.

#

you got your heading text and description text at the top

#

15px from the left and top of the window

#

wordwrapped at 15px to the right of the window

#

the description text (I think) 5 px from the bottom of the heading text

#

then the wallpaper selection box (which is a scroller), 15px from left edge of window, 30px from bottom of description text, width is equal to window width - 30 px

#

so nothing will ever overlap anything, that's good

#

I can increase the font size of stuff and it'll scale just fine

#

the problem then becomes though

#

although UI elements INSIDE windows can be positioned and sized relative to their siblings

#

they still can't scale based on the DPI or resolution

#

so what happens is

#

if I pop into the engine settings and switch to 800x600 quickly

#

first of all, the Appearance Settings is still positioned in the center as if it were still in a 1080p desktop environment - that's a bug, easily fixed.

#

But...

#

if I re-open the program after closing it

#

well first the in-game app launcher doesn't fit on screen - user info gets cut off at the bottom

#

secondly, now the Appearance Settings window is too tall to fit on screen!

#

The title bar isn't even showing so you can't drag it down

#

and you can't access the other two UI accent color options because they're cut off by the bottom desktop panel

#

and...if I quickly write some code at the low level to emulate a 4K display

#

(hang on, doing that rn)

#

look how tiny the text is! (Ignoring the fact that it is 4K downscaled to 1080p because I don't have a 4K monitor.)

#

Ideally, I'd want the UI to scale up and down to look as close to the native 1080p environment it's designed in as possible

devout lava
#

Lol

nocturne galleon
#

not too sure what's going on in that picture (I hate being blind)

devout lava
#

http return codes

#

1*** hold on

#

2*** here you go

#

3*** go away

#

@nocturne galleon

nocturne galleon
#

heh

#

anyway I'm still trying to figure out the best way to handle my GUI issue without a total rewrite

proper saddle
obsidian bluff
#

riolu. You realise that even Microsoft hasn't been able to sort that issue out?

graceful silo
#

Microsoft sucks though @obsidian bluff

nocturne galleon
#

@obsidian bluff do you know that Volition has sorted the issue out in the UI of Saints Row IV?

#

no matter what resolution you run at, the game's UI elements are all in the same relative positions and take up the same amount of space onscreen

#

that's the case with many games

#

it's just a matter of "how are they doing it, and how can I do it in my game using MonoGame"

proper gale
#

@nocturne galleon make the scaling correct for 1080p, then scale by a factor of actualHeight/1080

#

That is what I was telling you to do, and it will scale it, I was just using a different coordinate system, it's still possible though.

nocturne galleon
#

Now, what do I do about font sizes? In MonoGame, fonts are rasterized at compile time. I'd have to create versions of the game's fonts for each scale. What would be the best way to handle that?

proper gale
#

Use 4k fonts, downscaling works much better than upscaling.

#

4k font textures, then map to the 1080p using downscaling.

nocturne galleon
#

I don't have direct access to the font texture..

proper gale
#

I'm not exactly sure what to do there because I'm used to being able to runtime rebuild the font textures of nessacary.

nocturne galleon
#

in MonoGame, you create what's called a Sprite Font Description file

proper gale
#

I can look at monogame, but with OpenGL directly there is nothing stopping you from mapping any size texture to anything you want.

nocturne galleon
#

this is an XML file, and it contains data such as the TTF file to use, the size (in pt) of each character, the text spacing, style (bold, italic, etc), and the range(s) of Unicode characters to import

#

then when you compile it creates its own sprite font file out of that and you're not supposed to touch the resulting font file

#

and the MonoGame SpriteFont API (iirc) doesn't let you manually grab the texture for each character

proper gale
#

Hmm.

nocturne galleon
#

you just load the font file in as a SpriteFont object, you get a list of the chars supported by the font, and a function that takes a string and spits out a pixel measurement as a Vector2

proper gale
#

This is why I don't touch premade engines.

#

There is always sone random bullshit that sucks balls to deal with.

nocturne galleon
#

then if you want to render text using that font, you call SpriteBatch.DrawString() passing the text, the font object, the location in pixels, the color, and I THINK there's an option for scale? Not sure.

#

MonoGame isn't a game engine. It's a managed abstraction layer over SDL and OpenGL

#

(and OpenAL and other stuff)

#

...I chose it for my game because I want to write my own game engine but I quite frankly don't want to write multiple rendering backends

proper gale
#

I'm working on a vulkan abstraction so it's got less bullshit require but still gives the main benefits of the API, that can also run on OpenGL.

#

Thing about OpenGL, if you target 3.3 core, almost everything can run it.

#

HD 2000 series, GTX 8000 series, ivy or newer on windows, and sandy or newer on Linux.

#

Which is most computers today.

#

I've done some research on GL version support

#

if MonoGame is an abstraction, you may want to do your own text rendering.

#

it should allow you to render with a custom texture that you can switch at runtime just fine.

nocturne galleon
#

only thing is what exactly do you mean by "4K font texture"

#

do you mean each CHARACTER is a 4K texture

#

or are all the characters stored collectively in one 4K texture

proper gale
#

Font texture size that would be used on a 4k monitor.

nocturne galleon
#

ahh so setting the size (in pt) to something high enough that it's readable in 4K

#

that makes a LOT more sense

#

thank god I've got 4K emulation in the engine (since I don't have a true 4K display, I just force the engine to render the game to a 4K buffer and downscale to 1080p. I lose out on 4x the quality, but I can still see the game's UI as if it were on a 4K display)

proper gale
#

it's just rendering to a 4k texture, then rendering that to the window.

#

It's very simple to do.

nocturne galleon
#

yeah, that's what I'm doing

#

probably not the best way to test but for development and since my eyes can't make out that much detail anyway, I should be fine

proper gale
#

That's what's going on in the background anyway, soooo.

nocturne galleon
#

so...if...I write the font descriptors for 4K...then..

#

would I not want to write the REST of the game for 4K?

#

and have the scale factor be actualheight/2160?

proper gale
#

Thats probably less nessacary than the textm

nocturne galleon
#

it just seems easier mathematically to compute one scale value and use it for everything

proper gale
#

Scaling yes, I meant doing the rest for 4k

signal juniper
#

anyone know if its possible to store notification data using an app

nocturne galleon
#

@proper gale I got your scaling tactic mostly implemented.

#

I'm designing the game to run in 4K

#

haven't gotten to increasing font sizes or anything yet

#

but... so far

#

this is how it looks in 1080p

#

Rectangles, textures, etc are scaled just fine

#

Positioning of UI elements is not done so well though...

#

because during layout, the UI doesn't know the scaled size of each element

#

not sure how to fix that without tons of porting

nocturne galleon
#

screw it, in the latest build I'll just lock the game at 1080p highest resolution

#

force the bugs into their hidey holes until I can come up with a suitable stable solution

thorny galleon
#

anyone here develop for VR?

#

SteamVR keeps launching every time i open Unreal

little knoll
#

I think it does this only on a VR project (based on their VR template), I'm not sure tho

thorny galleon
#

nah, i was trying out the plain FPS template

#

(i went back to using Unity for prototyping anyway hue)

upbeat folio
#

Iโ€™ve been a professional web developer for five years now and I only wrote my first cookie script yesterday. Clearly I am a winner.

vestal glen
#

it's amazing how well you can live without cookies for most things, yes

reef tangle
#

Written entirely in assembly

#

That sounds like hell

nocturne galleon
#

too bad the left monitor is not a monitor, but rather a shitty TV

#

...with overscan issues

#

and I...don't know how well Surround will handle overscan compensation...

#

I would use bezel correction but I don't know how to measure the size of my bezels, and the two monitors have different-sized bezels

proper gale
#

it should handle it fine.

#

you dont measure the bezels for bezel correction, you line up stuff on the screen.

nocturne galleon
#

@proper gale thing is I need to do the overscan compensation on the GPU. The TV is too shit to do it on its own.

proper gale
#

i know

nocturne galleon
#

so that means running the desktop at a slightly lower resolution

proper gale
#

yes

#

i have dealt with TVs before.

nocturne galleon
#

also how would I accurately line things up on screen if the two screens aren't the same size (in inches)?

#

my primary monitor is 22 inches and the shitty TV is 26 inches

#

ahh well

#

I'll be getting a new monitor to replace the TV eventually

#

and I shouldn't need to test the game in surround more since it already works fine and the gui scaler is tested and working

#

just need to port things over to the new coordinate system

#

so I can live with overscan

#

I barely even do multimonitor as it is, I only do it when livestreaming

#

or when I want to run a game and watch Discord at the same time

#

Still pretty neat to see the game running in Surround.

#

That's genuinely cool to me lol

proper gale
#

i can show it with AMD eyefinity if thats still a thing.

#

i have three monitors that can run stuff like that.

scenic pagoda
#

Btw - I would recommend checking out a plugin called Emmet

#

Its so bloody handy lmao

#

theres a demo on the docs of how it works

nocturne galleon
#

what's it do

#

(I don't know if you're talking to me or someone else)

mild basin
#

pls help me

#

TY!

proper gale
#

@mild basin HELPING!!!!!!!!!!!!

mild basin
#

Lel!

proper gale
#

@mild basin what do you need help with?

mild basin
#

Oh yeah, I had an issue on CodeAccademy, but itโ€™s cool...... I mean I still canโ€™t figure out my error in the python code but, eh....... not like my grades depend on it....

fresh jacinth
#

I need to generate traffic data on this website that we are working part of a school project please click on this and have a look it would be a great help thanks - Feedback welcome - http://monaghaneats.com

#

Working progress

slate beacon
#

I think maybe google maps have an api for traffic data. Or is it wrong traffic im thinking off?

#

Oh wait @fresh jacinth did you mean Traffic data from the website. If so Firebase is a great tool for that

#

(Bad english im from norway)

fresh jacinth
#

Yeah I use Google analytics @slate beacon but tganks

#

Thanks

ionic hull
#

@fresh jacinth use some css

#

Search for pre made templates

late stratus
#

im making a minecraft mod for my AP CompSci Project

#

should I post it?

main wyvern
#

We don't care about that block game in this channel.

late stratus
#

:(

proper saddle
restive sundial
#

weird

#

oh well i was dumb

swift niche
#

database question: if you were storing two tables, one with containing the name of companies alongside their stock market ticker name, with separate tables made with for each company to store their stock market data, would you use relational db's or document based db's like MongoDB?

little knoll
#

Relational DB with a view linking tickets with their companies I'd say. Because with document based DB, you'd still have separate table/endpoints but without relation support, so you would have to "Bring Your Own" relational view system. IMO

#

IMO : Document based DB are more for API/Services which have a lot of entries but don't need to create links between them constantly.

#

And so, relational DB would make sense if you need to have links between your tables/entries at nearly every requests to the DB.

copper ravine
#

I would also offer this: look at how the data is read/written. If numerous pieces of related data are written/updated/read together, a document-oriented DB might make more sense. If you don't use historical data and only the more recent, I would also move towards a document DB, but you need to be aware of how and what you accessing in your DB.

hallow siren
#

Do you search for records using other data than the primary key? Relational tables all the way. Do you want to use the key and get very impressive full record reads? DocumentDB or whatever nosql floats your boat.

#

WHY would you create separate tables for the companies though?

boreal dove
#

Had a brain melting internship day today
Even after a while doing something, or getting explaination, i found it hard
its using AJAX
passing data into things

supple marten
#

not sure where to ask this..but guys that do programming in python, what is best IDE for a beginner?

grand hornet
#

@supple marten I use Sublime Text lol

#

Here comes the hate ๐Ÿคฆ

supple marten
#

i downloaded visual code from microsoft but it's hella confusing for me

#

i'm gonna hold you accountable for my trials and tribulation ๐Ÿ˜„

#

also...python 2 or 3? am self-learning on codeacademy and they are doing python 2

#

@grand hornet

#

oh sublime text is not free..

proper gale
#

IMO pycharm

grand hornet
#

@supple marten I started with PY3 since I was barely learning and everybody suggested the newest codebase

#

PY2 doesn't hurt I would assume but PY3 is better

brave bane
#

python 2 is a bit weird

#

stick to 3

supple marten
#

i mean, all the training i've done was on 2

brave bane
#

you dont need parentheses for printing and stuff

#

to edgy for me ๐Ÿ˜‚

supple marten
#

i like that ๐Ÿ˜„

brave bane
#

i guess it depends on which you learnt

supple marten
#

which is why i ditched c# which is what we learned one semester in my college

brave bane
#

ok

supple marten
#

mfer wants me to write convert.toint32(); almost every line

#

ffs

proper gale
#

what were you trying to do?

supple marten
#

iirc input from user was string and i needed integer

#

and had to convert every input to integer

proper gale
#

okey?

#

thats standard

#

they are different formats.

supple marten
#

erm..not for python

#

python recognizes immediately

proper gale
#

no, it does at runtime...

#

python is great language if all you care about is ease of writing and/or writing speed

#

but if you want speed, you tell it i want an int not a string.

#

because there is a distinction made in the first place...

grand hornet
#

Just use PHP lol

#

jk

proper gale
#

Programmers Hate PHP

supple marten
#

yeah but if you write in python
a = 5
it knows it's integer

#

whilst in c# you have to tell it it's integer

proper gale
#

mhmm, its called dynamic typing.

#

its very slow

supple marten
#

it's faster for me to write

proper gale
#

mostly because not compiled language implements its

#

"python is great language if all you care about is ease of writing and/or WRITING SPEED"

supple marten
#

yeah

proper gale
#

i pointed out that python is fast to write.

#

but its slow to run.

#

i can run an entire computation before python even starts to read the script.

#

but i, ofc, have to use std::strtoi which is much more cryptic than you covert.toint32

#

which, BTW, you just wrap that in a readInt function and call it a day letting it handle the conversion for you.

supple marten
#

yeah, no one taught us that

proper gale
#

did that need to be taught?

grand hornet
#

I use readInt all the time

#

But no need to be salty

#

That's why I just teardown code to understand vs learning from classes or webinars

supple marten
#

yes, it did need to be taught because when one is faced first time with programming it knows nothing

#

so yea, it should've been thought

#

no need to come off all high and mighty

whole quail
#

They should be teaching you how to figure it out yourself

#

If you're relying on them to teach you how to do it you either have a bad teacher or haven't learnt anything

#

There's no way someone is going to tell you exactly how to do every little thing you need to do

#

They're the one programming in that situation not you

#

And you're not going to learn to program without programming

supple marten
#

so in college in a course called 'basic programming' i should NOT be taught in c# that input from user returns string and should be converted by ourselves to integer?

#

because my teacher did teach me that

#

i was not taught 'which, BTW, you just wrap that in a readInt function and call it a day letting it handle the conversion for you.'

#

so yeah, i think that i should be relying on my teacher to tell me that input form user returns string otherwise i would be pretty frustrated writing any program where user inputs numbers and i do math afterwards

whole quail
#

You're relying on them teaching you to read the documentation

#

Not to know that x thing does y

#

If they're not teaching you to figure it out yourself, they might as well train monkeys

#

Basic programming means you should understand basic terminology and concepts enough to find out more information on your own

#

It doesn't mean you can make x program or learn x technology or implement x feature

#

Either they're teaching wrong or you have the wrong expectations

#

And think you can just go through just doing x instead of learning how to do x

proper gale
#

i mean, readInt() should already be defined for you in a C# library class, and it would be basically just cpp int readInt(){ return convert.toint32(reader.readLine()); }

#

its nothing complex, and going yea, that seems like a good idea to do is not something that should need to be taught.
knowing why you would want to split stuff into a separate function and how to do so, should be taught.

whole quail
#

^

#

That should be one of the first things you learn when learning an object oriented language

#

If not the first thing

#

You should be taught why to do things, not just to use x

#

Because most of programming isn't in the code, it's the decision making, knowledge and understanding behind the code

#

It's not about use x function in x way to do this

proper gale
#

which is why if you ask a proficient programmer to use language X, Y, or Z that they have not used before, they can do so almost immediately.

#

maybe not well, but they can.

whole quail
#

With a few exceptions*

proper gale
#

exceptions mostly being functional vs imperative languages.

whole quail
#

There are some things that require you to learn more but it's not that big overall

proper gale
#

C++ memory management

#

C++ standard library

whole quail
#

I mean the second one isn't that bad if you've used more than a couple languages

proper gale
#

ik, thats a joke

whole quail
#

There are some things that require you to learn more but it's not that big overall

proper gale
#

its not standard across compilers.

whole quail
#

Yeah it's more of an implementation thing

proper gale
#

thats why i just use boost

whole quail
#

Memory management is just a comp sci subject really

#

And is only difficult because people say it's difficult

#

Especially pointers

proper gale
#

yes, but it means i cant just pick up C++ from a garbage collected language

whole quail
#

They can be annoying but that doesn't make them difficult

proper gale
#

the memory system is significantly different.

whole quail
#

But that doesn't matter unless you never really understoood the other language you're coming from

#

If you don't know what python is doing, moving from that to c++ will be painful

#

But if you understand how it works internally you already know a lot of the concepts needed

proper gale
#

GC acts differently enough from MMM that you do need to learn it

whole quail
#

It's not difficult though

proper gale
#

its not

whole quail
#

It's just different

proper gale
#

but its very different

#

and requires a different style of coding.

whole quail
#

Yeah but that's the case with almost everything else in programming

proper gale
#

yes, but java can be picked up from python easily because they are both GC

whole quail
#

And the reason knowledge is needed, alongside decision making and understanding to program

proper gale
#

but C++ from Java or python is not as easy in no small part because of the memory management.

whole quail
#

Only because it takes time though

#

Which is going to be the case when learning anything

proper gale
#

i had a very good understanding of the JVM GC before i started messing with C++, that did not really help me with memory in C++

#

both how to optimize for it, and how the fuck it works.

whole quail
#

I never had issues with memory in C++ despite not dealing with anything like it before, I just spent a week learning about what and why

proper gale
#

i mean, i picked it up and was like pointers, i got this

#

i have not typed delete sense then.

whole quail
#

I still don't get why people are scared of pointers

#

They fucking point to a thing, how hard is it to understand

proper gale
#

they are simple

#

how they fuck up, is not.

whole quail
#

That's an implementation issue though

#

Not a pointers issue

proper gale
#

void* (*func)(void* args)

#

best pointer.

whole quail
#

lmao

proper gale
#

i use those

whole quail
#

Where lol

proper gale
#

those pointers, are scary.

#

stacking gl function calls in an array.

whole quail
#

ahh

#

Okay yeah that makes sense

#

Do you cast them or just store the mess using whatever the compiler does

proper gale
#

Casted to/from structs.

#

i end up with a few different functions

#
void* createglBindBufferArgs(GLuint buffer);
void deleteglBindBufferArgs(void* args);
void* glBindBuffer(void* args);
void glBindBuffer(GLuint buffer);```
#

though it is worth noting there is will be an additional deletion layer on top of that so i dont get leeks.

#

I don't do it the dumb way.

#

I did consider it though.

whole quail
#

lol that's such a mess to deal with

#

Still seems better than wrangling vs to work

#

Honestly any windows c++ should be renamed to wrangling vs

#

Since that seems to be the cause of most issues

#

It's also got a really helpful "feature" where it hides the majority of log information when building so you never see a subset of build errors or warnings

#

Which leads to weird bugs that take hundreds of hours to find

#

And once you've realised that vs is the issue, you have to manually build the project that can take a very long time

#

I've abandoned a project before rather than manually building it lol

proper gale
#

Msvs or msvc?

whole quail
#

tbh it could be an issue with both

#

It's just an error where tools will have a warning or error and output that to the console, but because they're run automatically it never finds the developer

#

And there's a bunch of obscure issues where that can happen

#

And you get a perfectly good build with no errors in the code but encountered an issue when building that you never get notified of

#

And you run the build and it just crashes or doesn't run something or some other weird issue

proper gale
#

And that is why, I use mingw

whole quail
#

Sometimes only sections of code are broken

#

So everything will work

#

Except one feature

#

Or one class

#

You can imagine how bad those errors are to debug

#

And that I'm not exagerating at all when I say it takes hundreds of hours to debug

#

Luckily they're rare or unluckily because it makes them harder to find

#

I can count on one hand how many times it's happened to me

proper gale
#

yea

#

i believe it.

whole quail
#

It always surprises me how little 100 hours is

proper gale
#

basically nothing

#

yet its 12.5 normal working days.

whole quail
#

So 11 normal working days and the time you spend working on the problem outside of work hours

proper gale
#

not even 11

#

its like 7 at ubisoft

whole quail
#

lol

proper gale
#

am i wrong?

whole quail
#

ubisoft have issues

#

But then again most game studios have a lot of crunch time

proper gale
#

yes, there is crunch time

#

but ubisoft decided to hard code crunch time to on

whole quail
#

Hard coded? They soldered crunch time to the board

proper gale
#

no, it was in the tape out

whole quail
#

hahaha

#

I don't deal with hardware design much so I forgot what tape out meant

proper gale
#

ofc you didnt get it immediately.

whole quail
#

Hardware is annoying and expensive

#

I can't muck around with it

swift niche
#

@copper ravine @little knoll @hallow siren the DB I'm making is supposed to have one table containing company names and their stock market ticker codes, then have a tbale of each company in that list containing the price of their stock with a date attached to it, as well as one more table per company that collects articles from ars Technica and other places, where my program will match changes in a company's stock prices to articles that explain/provide insight into the price change that occurred around that time

copper ravine
#

that doesn't seem to be the most optimal way of organizing it, but... what are you trying to do?

#

ah, nvm, I just caught the end of that

#

well, so you need a table of companies (giving you some sort of primary key you can use to index other tables)

#

A table of stock values keyed by company id (this one is tricky, more on that in a sec)

#

And a table of articles

#

I assume that the table of stock values will be updated as the stock values themselves change, so you will need a timestamp per stock value record

#

So you see, you don't want a table per company, in fact that makes life much more complicated , since you have to start managing adding/removing tables based on what companies are added/removed from the system.

#

The stock values table is a "bit" tricky since it is not bounded, and could potentially grow very fast and very large. If this is anything more than a simple fun experiment or some code for school, you will want a way of consolidating stock values by day/week as you get more data

little knoll
#

The question was about choosing between a document db or a relationnal db

#

If I recall correctly

copper ravine
#

And I'm not doing someone's homework or their paid-for work for them ๐Ÿ˜›

#

I think my response gives insight without giving away which they should choose

#

@swift niche If indeed you are required to have a table per company, then I hope you can see the answer to your original question.

little knoll
copper ravine
#

I know; I was one of the original repsonders ๐Ÿ˜›

swift niche
#

For the stock prices, I figure I'd have a daily update rather than an hourly price update, since the tables would be HUGE

copper ravine
#

Heh. Well, I think you have to have a closer look at what you are doing, think about the problem a bit more.

swift niche
#

I guess I can just have one table containing the company names + tickers, and another containing all companies' stock prices with a timestamp and just do a join on those tables where "company name" = x

copper ravine
#

Also, a small hint: look at your sampling frequency of the stock values with an eye as to /what/ type of change you want to detect

#

Yes, that is certainly one way to solve that problem, probably the most "classical"

#

Re: sampling, if this is for fun/work, you should really have a look at some data sampling theory

swift niche
#

This is for my computer science capstone course ๐Ÿ˜… I have until October to have it done, but I want to figure out the DB structure first so I can worry about the actual coding of the program

copper ravine
#

Isn't a capstone project the final project before you graduate or something?

swift niche
#

Yep

#

Thing is I'm currently taking a DB course and have had some experience with dbms in the past, but I'm not sure what dbms I should choose for this endeavor: I can work with whatever one I choose, the decision is the hard part

ionic hull
#

Does anyone have an idea for a browser extension? I need something useful that people will use so that I can implement some script that mines crypto currency

vestal glen
#

nope, because that's just shitty.

ionic hull
#

Idc

thin cobalt
#

@ionic hull that's a new level of low

ionic hull
#

@thin cobalt as I said, I don't really care

copper ravine
#

@ionic hull if you want to steal compute cycles from people, I can't stop you, but you sure as hell will get no help from me from now on.

ionic hull
left quarry
#

anyone in here care about userscripts?

little knoll
#

I've done some for random stuff why ?

left quarry
#

I am trying to write a tool for it

#

I'd like to find a community for this sort of stuff

devout lava
#

make this the init.php

#

in the root dir

modest pendant
#

i didnt even know this channel was here

#

thanks

devout lava
#

click download and run the sxcu file

modest pendant
#

ok

#

how do i run the sxcu?

#

dont worry worked it out

main wyvern
#

That thing says Donwload

devout lava
#

lol

fallow zephyr
#

this is melting my brain, going to bed :d

deep solstice
#

anyone here know vb?

proper saddle
#

Why vb? GWfroggyBlobThonk

dreamy finch
#

Can I get someone's second opinion on a program I have to write for my college class?

We're basically writing a chat program that heavily takes use of the concepts from AIM and a little bit of Discord.

Well... In this program we have to be able to handle errors that the user may cause.

For example what if the user tries to add themselves as a buddy? How would you handle that? It's things like that, I have to deal with.

My professor doesn't mind if we put easter eggs in our programs, but do you guys think these error messages may come off as offensive?(edited)

If the user tries to add themselves as a friend, the server will return "CANTBUDDYSELF" which causes a JDialog to pop up saying: "Server returned response that you tried to add yourself as a buddy! I know times are tough, but you're better than this..."

If the user tries to remove themselves as a friend, the server will return "CANTUNBUDDYSELF" which causes a JDialog to pop up saying: "Server returned response that you tried to remove yourself as a buddy! If you hate yourself this much, then you need help..."

If the user tries to send a buddy request to someone they're already buddies with it will say:
"Server returned response that you are already buddies with "+buddy+"! I can't believe that you'd forget who your own friends are..."

If the user tries to remove a buddy that they were never buddies with it will say:
"Server returned response that you are trying to remove a buddy: "+buddy+" that you were never buddies with! Are you so angry at the world, that you're removing people who you don't even know? Again... Seek help."

If the user tries to send a buddy request to a user that doesn't exist it will say:
"Server returned response that you are trying to add a buddy that does not exist! Are you now resorting to trying to add imaginary friends? Dude... Seriously... This is starting to get old. Get some help."

nocturne galleon
#

I think this one might be a bit too far.

Most of the other ones are great, but I'd remove the "Seek help" parts. Imo they're funnier without.

copper ravine
#

I'd actually worry about how to implement what you want to do as a base first, then add funny msgs in later. You will find out quickly that a online multi-person chat service is a rather complex piece of software to write without going crazy about the "funny" things ๐Ÿ˜‰

ionic hull
#

And why would a user be able to add himself or any of his current friends? That is just bad ux

fallow zephyr
#

this is the first time i've seen someone refer to an exclamation mark as a "bang." interdasting

#

i don't know js i was just looking through random so questions :p

timber violet
#

ive heard that before

fallow zephyr
#

I've heard interrobang ( โ‰ ) but not bang on its own

copper ravine
#

bang is what it is called

misty roost
#
>If the user tries to send a buddy request to a user that doesn't exist it will say:
"Server returned response that you are trying to add a buddy that does not exist! Are you now resorting to trying to add imaginary friends? Dude... Seriously... This is starting to get old. Get some help."

At that point you're assuming, that user already tried other things. It might that it's his first try to break something

swift niche
#

I've heard # be referred to as shebang and ! be called bang

tropic grail
#

That's normal

swift niche
#

For people who developed both the backend and frontend of an app, would you make the GUI as it's own class or would you make the "main" function of the program be the GUI itself?

vestal glen
#

always separate view and model.

copper ravine
#

I second the separate the application logic from the GUI logic; they very often have two different approaches dev-wise, and usually have different functionality and responsibilities. Also, it's a lot easier to merge two things that were split initially than to split a single blob of code later

swift niche
#

In my case, I have all the backend in their own classes, but the GUI is the part I'm trying to figure out how to connect

#

I know how to do MVC in Java and C#, but Python is proving challenging

fallow zephyr
#

i'm writing a program in c# that works with .obj model files, does this look acceptable from a formatting standpoint? I just wrote it and thought it looked just a bit weird.

#

this bit of code uses the stream writer to write something like this -> "f 1 2 3 2" (depending on what is actually in indicesToWrite)

proper gale
#

@vestal glen @swift niche do you actually subscribe to the MVC paradigm?

#

do separate the logic so it can run independently, no problems there.

#

but the MVC way of OOP is generally, horrid to program.

swift niche
#

@proper gale I learned MVC for my Organization of Programming Languages course where we coded a game in different languages, and used MVC to do so, but because we were doing it with OOP it indeed was horrid

#

Where C and C++ make you set up MVC stuff manually, while Java and C# have built-in stuff for the View, Python is more akin to C and C++ in terms making it conform to MVC

proper gale
#

Java has built in stuff for view?

#

also, C straight up does not have objects.

swift niche
#

I've seen it done in C, it's awful

#

and at least when I did it, we made an Android app, which worked out well enough for MVC

#

and normal Java does have GUI libraries, no?

proper gale
#

it does

#

two of them

gray hazel
vestal glen
#

@proper gale I don't think you should do complete MVC-stuff. But separating model and view is still a good idea. And usually you'd have a router in a web application, which you could call the controller...

mighty fossil
#

import json, requests, sys
ImportError: No module named requests

#

what the fuck does that mean?

north hare
#

I need some help with something HTML and CSS related. Anyone up?

north hare
#

@deep solstice I'm late I know but I know some VB (6.0 though) I might be able to help you

restive sundial
#

oh fuck i just noticed one thing and its making me want to die

nocturne galleon
#

wow

#

this discord has over 4000 members

pulsar current
#

Has anyone else looked into the new nvenc codec supports

#

Nvidia supports up to h265 lossless on most pascal cards from what i've read

#

And i've been looking into when this support is coming to geforce

nocturne galleon
#

I dont sorry

swift niche
#

@pulsar current are you asking when h265 or other codecs will come to Shadowplay?

#

Because you can use OBS Studio and choose the encoder as you please

pulsar current
#

I know that OBS lets your choose which codec and how many tracks but it lacks in other areas. Shadow play is very simple to deal with and I know it's always gonna work.

sonic salmon
#

what would i need to do if i want like a testimonial quote on a webpage, where it would change to a different random other one on each refresh, so that it wouldnt just be the same testimonial quote each time

proper gale
#

use the servertime to index the list of them.

swift niche
#

@pulsar current They'll do it if h265 ever becomes more feasible to use in real-time than h264, which probably won't happen. H264 is good for real-time use, h265 is for saving storage space at the cost of CPU power and time. A group of big time devs and companies are teaming up right now to develop the AV1 standard, which is supposed to have lower CPU and GPU usage for both playback and recording, and supposed to have file sizes just as small if not smaller than h265, but that has a few years until it'll be out and become mainstream

shrewd siren
#

Hi all

#

Anyone up for a quick challenge

#

Nothing more than about 60 seconds of coding for most people

proper gale
#

@shrewd siren sure, what is it?

shrewd siren
#
  1. Pull all Window Handles
  2. Grab the title for each of those Handles (if you don't have any called "Default IME" you haven't grabbed all handles)
  3. Count how many are titled just "G"
swift niche
#

This sounds like a homework assignment ๐Ÿ‘€

lone monolith
#

Lol

ionic hull
#

๐Ÿ‘€ ๐Ÿค”

slate beacon
#

Does someone have experience with ModSecurity for apache?

tropic grail
#

Depends. What's up?

slate beacon
#

@tropic grail i want an easy script that redirects me to another page after 5 refreshes. Like an secret site after 5 refreshes

#

And it counts down every refresh every 10th secound

#

If you know what i mean๐Ÿ˜…

tropic grail
#

You'd have to set a variable that increments per refresh, then upon that 5th refresh initiates a meta redirect.

#

Easiest way to prevent the variable from disappearing would be to set it in a cookie.

slate beacon
#

@tropic grail do you have a website with info or could you make an example that i could use

proper gale
#

@slate beacon you would have to use cookies, HTTP remembers nothing.

slate beacon
#

@proper gale i need something in modsecurity that counts refreshes

proper gale
#

oh, idfk.

slate beacon
#

๐Ÿ˜‚๐Ÿ˜‚

proper saddle
little knoll
#

Hey developers friends! Here is a new Humble Bundle for us, mainly oriented for python developers, there is also some resources for web developpers ! (Digital Ocean credit and Postman REST API tester)
But also for all kind of developers, even for beginners ! (egghead.io training courses, GitKraken git client licence...)
https://www.humblebundle.com/software/python-dev-kit-bundle

Humble Bundle

Pay what you want for a bundle of Python resources and support charity!

#

Remember to set where you money goes to help caritative foundations and their actions!

upbeat folio
#

Just gotta rant, I HATE SOQL.

#

exhale

devout lava
#

Lol

swift niche
#

@little knoll sucks that most of those are either subscriptions or PyCharm stuff, AKA not very useful

little knoll
#

Yeah... But the egghead.io sub is really cool and worth it IMO

#

And 20$ that I mostly given to charity (18$, 16$ to the Wikimedia foundation) isn't that pricey imo

proper saddle
#

Found out you can get a $100 digital Ocean credit for free.

#

And I don't think they stack

nocturne galleon
#

@deep solstice I know VB what do you need help with

#

Anyone know swift 4.0 and how to use the CMMotionActivity function with automotive initialiser

hasty sail
#

PyCharm licence for that price is pretty nice tho

#

as far as you don't need to use other stuff from Intellij

copper ravine
#

it's only for a 2-month subscription

#

which means you can't use it after that

#

IntelliJ's licensing works that if you sub for a year, you get to "keep" that version without re-subscribing for subsequent years (but no updates, obviously)

swift niche
#

IMO you don't need an IDE for Python, considering IDLE is pretty decent, and if you want to run the program from within your editor you can use Atom with the Script addon

proper gale
#

@swift niche depending on project size, and IDE is nice regardless of language.

hasty sail
#

oh okay, didn't know about that subscription thingy

#

as long as you just write little scripts in python, you can use pretty much anything

vestal glen
#

Yeah. You don't need an IDE for anything. You only need a text editor. But an IDE can make whatever you are doing a lot less brain or lookup heavy.

#

Or alt+tabbing heavy.

hasty sail
#

but for developing a application that is a bit larger an IDE is basically a must if you want to remain productive

#

but that is just my opinion

wheat orbit
#

is there anyone here who can help me with some sql?

proper saddle
#

The way this API's data is sorted is giving me a headache. ablobsweats

swift niche
#

@wheat orbit whatcha need

#

@proper gale I'd still argue that you don't NEED the pro version of PyCharm considering there is a free version, but the extra features are nice

proper gale
#

If you want to do Django, you do.

#

For straight python, no, you don't.

#

@swift niche

wheat orbit
#

@swift niche if you could look over some queries and tell me why they dont work that would be great

swift niche
#

@wheat orbit no problem, message em to me. I actually jus got out of a database course final exam lol

wheat orbit
#

lol ok thanks

swift niche
#

@proper gale I've used Flask and Django in Atom and IDLE, although IDLE did make it difficult, but Atom was still super easy to work with

proper gale
#

For pycharm, you need pro for Django.

#

But for the most part, free is fine

#

But then there is clion, the best c++ IDE

swift niche
#

I'm going to try PyCharm free edition before I make any more assumptions

#

Because I was surprised how much easier it is to code in java with the Intellij IDE than it is to code C++ in Visual Studio

swift niche
#

Nope, already hate it

proper gale
#

why?

swift niche
#

Backspace isn't even doing what it's intended for lol

#

Apparently it's Shift + Backspace

#

and the delete key doesn't lead into the next line

proper gale
#

they work fine for me.

swift niche
#

Seems that installing the Vim addon defaults to having Vim used automatically, AKA delete and backspace are doing what they do in VIM

#

back to testing

raven needle
#

hey anyone know a good tool to check automatically if a website is snooping on a paypal iframe?

mint coral
#

hey can anyone help me with an issue in sql

#

with entering data into a table which doesnt work for some reason

ionic hull
#

@raven needle from what I understood, you can't manipulate an iframe

#

You cannot get data from it

restive sundial
fallow zephyr
#

basically im setting out a datagridview, the stuff on the left is the left hand column, the stuff on the right the right column

north knoll
swift niche
#

Anyone know how I can measure the time it takes for a process to start and finish in Python

#

Right I know I have this:

  proc = []
  for fn in fns:
    p = Process(target=fn, args=(arg1, arg2,))
    p.start()
    proc.append(p)
  for p in proc:
    p.join()```
#

Each thread is executing a different function in their own process asynchronously

proper gale
#

@swift niche import time

#

then time.time() will give you the current time in microseconds.

swift niche
#

I know of that, I'm asking to measure the time of each process individually

proper gale
#

know that starting a thread is not exactly a fast process, so it may not be much or any faster

swift niche
#

In a synchronous program, I can just do:

#
...do commands here...
end = time.time()

total = end - start```
proper gale
#

mhmm

swift niche
#

but this is running three processes separately, and I don't know how to measure each one separately

proper gale
#

do that, inside them.

#

you can use a wrapping function to call the desired function that will record the time.

#

just be careful of print synchronization.

swift niche
#

These are printing to separate log files (one for each process), so that shouldn't be an issue.

#

What you're saying to do something like this?

  start = time.time()
  someProc.start()
  someProc.join()
  end = time.time()
  total = end - start

def runInParallel(*fns):
  proc = []
  for fn in fns:
    p = Process(target=fn, args=(arg1, arg2,))
    myTimer(p)
    proc.append(p)
  for p in proc:
    p.join()```
proper gale
#

no

#
def timeFunction(func):
    start = time.time();
    func()
    end = time.time();
    pass

def runInParallel(fns):
    proc  = []
    for fn in fns:
        p = Process(target=func, args=fn)
        proc.append(p)
        p.start()
        pass
    for p in proc:
        p.join();
        pass
    pass```
#

@swift niche ^

proper saddle
#

Python bothers me for some reason. blobthonkang

tropic grail
#

hiss

little knoll
#

Maybe because that's a venomous little noodle ๐Ÿค”

#

If a thing like that was running on my PC, I'd be bothered too... (Even if a venomous noodle would suck at running...)

proper gale
#

@little knoll maybe beacuse its syntax is cancer?

little knoll
#

Not cancer, just different

proper gale
#

cancer

#

no explicit scope, cancer.

#

im fine if its not needed, but let me if i want to.

little knoll
#

Would you hate someone because he have cancer ? No, you would just be awkward because he is different

#

(I can't believe that I just done this link)

proper gale
#

different == have cancer (in this context)

little knoll
#

"Don't judge a book by its cover" ?

grand hornet
#

Cancer != coding prefrence

#

or rather, syntax

little knoll
#
true
#

I've just though of something, what if we just all speak using code in this channel ? (Yeah, I definitely need to sleep a bit ^^')

proper gale
#

no

#

just no

little knoll
#
const ShouldWeSpeakWithCode = () => {
    return "probably no"
}
grand hornet
#

Why would you return a string

#

Now you have to create a common function to parse it

#

into a boolean

#

ffs

little knoll
#

Because it's a question, so it returns a response...

#

I think ?

grand hornet
#

return false

little knoll
#

SyntaxError: Parse error

#

ยฏ_(ใƒ„)_/ยฏ

swift niche
#

IMO I like Python a lot over every other language I learned at Uni, like C, C++, Java, or Javascript

#

Only ones I can I say I like after extended use of a bunch of languages is AngularJS, Scala, and Python

proper gale
#

@swift niche AngularJS is an API, not a language...

#

also, when you start getting into complex shit, you start to like static typing.

#

besides python's abysmal speed.

#

@little knoll cpp auto const* isThisABadIdea = [&](){ return difficulty > -1; }

nocturne galleon
#

I have absolutly no experience in any of this, but I loved this game

#

its the source code to a flash based game i used to love.

#

and then it shut down

#

Forever

#

;-;

upbeat folio
#

Step 1: Research using Discord as an Identity Provider.
Step 2: Discover that Discord uses OAuth 2.0.
Step 3: Try not to cry.
Step 4: Learn more about OAuth 2.0 than you ever thought you'd need to know.
Step 5: Follow a tutorial to the letter.
Step 6: Discord now throws a 500 error at you for your attempts.
Step 7: Give up, grab a drink, and do something else for a bit.

main wyvern
#

discord's OAuth2 is simple

north knoll
#

the sims 3 patchnotes are my absolute favorite thing in the world

#

to be a fly on the wall while that dev team works on fixing some of these issues like holy crap

ebon light
#

does anyone recognise an .net technology that sounds similar to "dundercode", "thundercore", thunercode" that's easily learnt if you're familiar with MVC?

#

i was talking to a colleague but there's a bit of accent when they talk so I couldn't exactly identify which technology they were speaking of

swift niche
#

Are you sure you weren't thinking of ElectronNet? that's the only electricity-sounding thing I know for .net

proper saddle
swift niche
#

Huh, you'd think blockchain would be higher considering how everyone and their mother throw that buzzword around in the projects

ebon light
#

apparently it was just a cms called Thunder

#

pluralsight is so good

#

thanks for that

#

the tech index

swift niche
#

I'm trying to make nested progress bars in a Python console program, I've tried tqdm and progressbar2, but neither of them work well with nested loops

#

Anyone know what I can try doing?

#

I've also tried Progressive, but it only runs on Posix systems and I need this to be transferable between OS's
Figured out how to fix my issues using tqdm

winged zodiac
#

Is anyone here a black hat, grey hat, or white hat? (Or coder interested in hacking?)

nocturne galleon
#

The only way to watch linus

whole quail
#

@winged zodiac also known as just a hacker...

#

And unless you're asking about something trivial you will want to be more specific

nocturne galleon
#

look in the back ground and what vedio is it you might get it

winged zodiac
#

@whole quail Iโ€™m seeing if anyone is interested in joking a ctf

whole quail
#

Depending on the skill level it is you probably won't have much luck finding someone here

small kelp
#

I need some help setting up LUA and LUA Sockets in the eclipse IDE... could osmone assist me getting everything working

ionic hull
#

@winged zodiac what kind of ctf? Web based technologies, embedded systems?

winged zodiac
#

@ionic hull itโ€™s the defcon quals@whole quail

whole quail
#

yeah you're gonna need to look somewhere else for that

winged zodiac
#

Oh we are just doing it for fun Iโ€™ll send you a telegram invite related@whole quail

whole quail
#

Ahh makes more sense

#

Because I highly doubt anyone here capable of doing well in the defcon ctf would both have the time and not have a team already

#

But yeah depending on when you need it if it's just a fun go I can join

winged zodiac
#

We just have a team of random coders

whole quail
#

Anyone with hacking/security oriented backgrounds or experience? xd

#

But yeah that sounds like something fun I'd enjoy

#

I definitely couldn't help you get a good place but I have the knowledge to have some fun breaking shit

winged zodiac
#

@whole quail um me and one other are hacking, we have a webdev, an os dev, a super computer engineer and a couple Linux nerds

whole quail
#

When will you need me?

winged zodiac
#

Whenever Iโ€™ll send an invite in a bit

whole quail
#

But yeah I have a hacking/theory background and some reversing and windows stuff alongside basic web server and services pen testing

#

I can run tools, make a few of them and understand things basically

winged zodiac
#

Ok

whole quail
#

@winged zodiac how many points do you guys have?

ionic hull
#

@winged zodiac i do mostly web "hacking", sql injection and soo on, and you already have a guy. Good luck

ebon light
#

you aren't from hackerone are you

prisma obsidian
#

anyone else dislike rails and its undocumented assumptions ?

vestal glen
#

I like rails because it has lead to some great github wars. But I don't even know it apart from that.

thin hull
#

I get to put all this into a list because microsoft thought that making a property an integer was better than keeping it as a string array.... YAAAAAAY! IM SO HAPPY! /s

storm plume
#

Anyone familiar with HTML, CSS, Flask(Python) please @ping me

#

trying to get a footer to stick to the bottom of the page and work with CSS but it refuses!!

thin hull
storm plume
#

tried

#

it refuses to work...

thin hull
#

and theres nothing below it...?

storm plume
#

right now im using the <footer> tag

#

wait ill show u the code

thin hull
#

that would help...

storm plume
#

<footer> <div class="footer"> <ul> <li>ยฉ Copyright 2018 Bored Corner</li> <li><a href="DISCORD LINK" target="_blank" title="Discord Server">Discord</a></li> </ul> </div> </footer>

#

the footer is lined up

#

btw

thin hull
#

use ```

storm plume
#

k

#
        <footer>
            <div class="footer">
                <ul>
                    <li>ยฉ Copyright 2018 Bored Corner</li>
                    <li><a href=MY DISCORD LINK target="_blank" title="Discord Server">Discord</a></li>
                </ul>
            </div>
        </footer>
#

its a website for my community

#

(discord lol)

#
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 20px;
background-color: red;
color: white;
text-align: center;
}
.footer li {
display: inline;
}

I tried that CSS and a lot more

dawn wadi
#

It could be the div tag, but I haven't worked with HTML in a bit so hard to say

storm plume
#

ill show you screenshot of what it looks line

#

like

thin hull
#

my guess would be that div tag is fucking things up

dawn wadi
#

Yea, smae ^

storm plume
#

i also tried without the div, but still doesnt work

#

all it shows is the same thing

#

ill show you the layout code

devout lava
#

That works for me

thin hull
#

again, I dont do website stuff... so last time I worked with html was Grade 11 in a coding class I got my school to start that ended after i finished...

storm plume
#
<!DOCTYPE html>
<html>
    <head>
        <title>Bored Corner Page Layout</title>
        <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
    </head>
    <body>
        <header>
            <div class="container">
                <h1 class="logo"><a href="{{ url_for('home') }}"><b>Bored Corner</b></a></h1>
                <strong><nav>
                <ul class="menu">
                    <li><a href="{{ url_for('home') }}">Home</a></li>
                    <li><a href="{{ url_for('about') }}">About</a></li>
                    <li><a href="adada" target="_blank" title="Discord Server">Discord</a></li>
                    <li><a href="https://www.reddit.com/r/boredcorner" target="_blank" title="Reddit Subreddit">Reddit</a></li>
                </ul>
                <nav><strong>
            </div>
        </header>
        <div class="container">
            {% block content %}
            {% endblock %}
        </div>
        <footer>
            <div class="footer">
                <ul>
                    <li>ยฉ Copyright 2018 Bored Corner</li>
                    <li><a href="d" target="_blank" title="Discord Server">Discord</a></li>
                </ul>
            </div>
        </footer>
    </body>
</html>
thin hull
#

that looks fine, you just dont have any content to fill the page so that IS the bottom of the page....

#

add html next to the ```

storm plume
#

i removed the discord invite links if you are wondering what the random dadad were

dawn wadi
#

Might be true, try putting random filler images maybe

storm plume
#

but also, the css code isnt doing anything to the footer

thin hull
#

probably cause its looking for the footer class and not the footer tag....

storm plume
#

heres the css that goes with it

body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #444;
margin: 0;
padding: 0;
padding-bottom: 20px;
}

header {
background-color: #6ba3ff;
height: 35px;
width: 100%;
opacity: 0.9;
margin-bottom: 10px;
}

header h1.logo {
font-size: 1.7em;
color: #fff;
text-transform: uppercase;
float: left;
margin: 0;
text-decoration: none;
}

header h1.logo:hover {
color: #fff;
text-decoration: none;
}

.container {
width: 1200px;
margin: 0 auto;
}

h2 {
font-size: 3em;
margin-top: 40px;
text-align: center;
letter-spacing: -2px;
}

h3 {
font-size: 1.7em;
font-weight: 100;
margin-top: 30px;
text-align: center;
letter-spacing: -1px;
color: #999;
}

.menu {
float: right;
margin-top: 8px;
}

.menu li {
display: inline;
}

.menu li + li {
margin-left: 35px;
}

.menu li a {
color: #444;
text-decoration: none;
}

div.home,div.about {
background-color: #E6E6FA;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 10px;
padding: 10px 0 30px;
}

.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 20px;
background-color: red;
color: white;
text-align: center;
}
.footer li {
display: inline;
}
devout lava
thin hull
#

please add highlighting.... please

devout lava
#
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #444;
margin: 0;
padding: 0;
padding-bottom: 20px;
}

header {
background-color: #6ba3ff;
height: 35px;
width: 100%;
opacity: 0.9;
margin-bottom: 10px;
}

header h1.logo {
font-size: 1.7em;
color: #fff;
text-transform: uppercase;
float: left;
margin: 0;
text-decoration: none;
}

header h1.logo:hover {
color: #fff;
text-decoration: none;
}

.container {
width: 1200px;
margin: 0 auto;
}

h2 {
font-size: 3em;
margin-top: 40px;
text-align: center;
letter-spacing: -2px;
}

h3 {
font-size: 1.7em;
font-weight: 100;
margin-top: 30px;
text-align: center;
letter-spacing: -1px;
color: #999;
}

.menu {
float: right;
margin-top: 8px;
}

.menu li {
display: inline;
}

.menu li + li {
margin-left: 35px;
}

.menu li a {
color: #444;
text-decoration: none;
}

div.home,div.about {
background-color: #E6E6FA;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 10px;
padding: 10px 0 30px;
}

.footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 20px;
background-color: red;
color: white;
text-align: center;
}
.footer li {
display: inline;
}
thin hull
#

yay

dawn wadi
#

Maybe its what you're using to create the css?

thin hull
#

dude got muted... rip

narrow kestrel
#

Rips

dawn wadi
#

I can't get the CSS to work period

thin hull
dawn wadi
#

The class shouldn't be causing problems, i think

thin hull
#

it is when he isnt using the tag and never uses a class named "footer"

storm plume
#

@somber tangle yay im unmuted

thin hull
#

wrong person lol

storm plume
#

oh lol

#

so what do you think is the issue

#

that css is on the layout.html

thin hull
#

not enough content on the page, also dont use classes in the footer css, just use the tag

devout lava
#

Wow that wasn't long

storm plume
#

oh ok so remove the footer div

devout lava
#

I've gotten muted before because of this chat

storm plume
#

or should i keep the div

thin hull
#

doesnt matter

storm plume
#

@devout lava did you get muted too?

devout lava
#

Yes xD

thin hull
#

lol

storm plume
#

lol

devout lava
#

The bot doesn't like a lot of new lines

storm plume
#

@thin hull should i remove the div?

thin hull
#

doesnt matter

storm plume
#

from the footer tag

#

or just the class

thin hull
#

just remove the '.' from the footer css

#

its unnecessary

storm plume
#

ok so i can keep the <div class="footer"> or remove that too

thin hull
#

remove the class

storm plume
#

k

#

ima check it now

#

still not syncing with css

#

any idea why? or do I need a seperate html for footer?

thin hull
#

no... just a tag and the css for the tag

storm plume
#

hmm

#

@thin hull should i try to use it on the main page and see if it works?

thin hull
#

yes?

storm plume
#

ok

#

@thin hull still doesnt work

#

heres the main page code

#
<!DOCTYPE html>
<html>
    <head>
        <title>Bored Corner</title>
        <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
    </head>
    <body>
        {% extends "layout.html" %}
        {% block content%}
        <div class="home">
            <h2>
                <b>The Place To Kill Your Boredom!</b>
            </h2>
        </div>
        {% endblock %}
        <footer>
            <div>
                <ul>
                    <li>ยฉ Copyright 2018 Bored Corner</li>
                    <li><a href="https:/" target="_blank" title="Discord Server">Discord</a></li>
                </ul>
            </div>
        </footer>
    </body>
</html>```
#

and i linked the css to that

thin hull
#

yeah, theres no content above it... thats why, add a bunch of garbage pictures and stuff above it

storm plume
#

yeah but the stupid footer wont get styled by css

#

it seems the page doesnt even want to work with me updating css

#

because i added a link to the header