#development

1 messages ยท Page 54 of 1

vestal glen
#

depends.

#

(or to slightly expand, both exist for a reason)

untold badge
#

@vestal glen What's the purpose of a Dockerfile? Is it just there for automation?

nocturne crypt
#

you use dockerfiles to automate it over and over again

#

they're self-documentating ways of deploying applications

#

conistently doing docker run is an imperative approach

#

while using dockerfiles is a declarative approach

#

using docker run to deploy multiple applications (eg a service) is very cumbersome

#

let's say you want to deploy nextcloud, mariadb, and redis

#

you now have to type docker run 3 times and in the command line you have to specify the relation of each service to each other

#

(you get very long docker run commands)

#

or you can create a docker-compose file

#

and do docker-compose up -d

#

which is the equiavlient

midnight wind
#

you can't save docker runs, docker-compose is just an all round better imo

#

documentation, less cumbersome, etc.

untold badge
#

That makes sense

vestal glen
#

Dockerfiles are to describe the environment that should run in your container.

#

and a dockerfile is used to actually build a specific container

untold badge
#

Thanks for the explanation

#

I also had a question about Ghost: is it viable for sites other than blogs? From first glance (haven't dug too deep yet) it seems that it's centered heavily around posts

vestal glen
#

it is centered around content that can be represented by posts, similar to wordpress, yes. But I believe it also supports entries without a date, so "pages". Not sure how well, though.

nocturne galleon
#

also, how does visual studio let me make microsoft sql databases for free, I thought it cost money?

#

like it lets me create a .MDF to connect to, isnt microsoft's sql premium tho?

hollow basalt
midnight wind
#

local databases are free???

hollow basalt
#

Iirc MDF are not actual database

#

Visual studio ofc allows you to connect to SQL server

#

But Im not sure if Vs has built in SQL server

#

Doubt that

#

Cause even oracle express edition is MB in size

#

Tldr: not lightweight enough to be included in the ide

untold badge
#

@vestal glen It seems that Ghost doesn't have form builders outside of manually implementing third party plugins, so should we learn HTML/CSS/JS and Node.js and stick with Ghost, or is it better to build a site from scratch

nocturne crypt
#

ghost is a giant self-buliding website

#

you can use templates and their built in content management system

#

you can integrate HTML/CSS inline if you want something unique though

untold badge
#

@nocturne crypt Are there templates than can be used without a CMS?

#

And is forgoing a CMS cumbersome?

nocturne crypt
#

with ghost you can enable js and html5 directly into the pages if you want

#

you don't need something like ghost to write a website

#

it's just less annoying

nocturne galleon
#

well im not sure what it did

#

did it just create a database for me?

untold badge
#

Thanks for the info Phoenix! I guess I'll just keep playing around with Ghost and start learning HTML and CSS in the meantime

nocturne crypt
#

it's always cool to integrate both

hollow basalt
#

did it just create a database for me?
where

#

database is not a random file (looking at you sql lite)

#

it requires special drivers or another software (sql servers)

solid fjord
hasty tusk
round dome
#

since when does CPP let you have multiple strings as a single variable thingo
@nocturne galleon since forever

#

and it's not multiple strings it's one string concatenated

hollow basalt
nocturne galleon
#

Oooh

obtuse night
#

Just starting to use Blazor Web Assembly and am not sure how i should structure the project. Should the Blazor app talk directly to a database or make calls to an external API?

vital blaze
#

and it's not multiple strings it's one string concatenated
@round dome Would'nt the null characters break up the strings?

round dome
#

No the compiler doesn't concat the strings' null bytes wtf

hollow basalt
vital blaze
#

I was thinking that the string literals would have the null character added to each one. But it turns out that the compiler concatenates the string literals that are seperated by only white space before adding the null character.

nocturne crypt
#

i'm going to instantly regret asking this question in this discord

#

but does anyone know the way of using tensor cores in Cuda?

#

anyone?

proper gale
#

@nocturne galleon its concatinating them at compile time, which is nice for multi-line strings

copper falcon
#

I've been stuck with it for ages

light prism
nocturne crypt
#

i found that

#

if only it wasn't so hyper-specific

light prism
#

You using tensorflow for mixed precision?

#

Tensor API is very poorly documented

#

This PDF has "some" information, whether it can be counted as useful is up for debate

#

@nocturne crypt

nocturne crypt
#

i finally got the dockers to use my 2060

#

i wanna figure out what the fuss is over these tensor cores

light prism
#

The API docs are so sparse they might as well have not bothered

nocturne crypt
#

okay

#

so i figured it out

#

tensor cores are microcode optimizations for the GPU

#

there's nothing to program against, just setup the code to take advantage

#

oh boy

light prism
#

LOL

pliant siren
#

Didn't realise this channel was here - anyone know their way around CSS that can look at a page and tell me while a style isn't being found even though it's defined in a .scss ?

warm sleet
#

have you looked at the compiled CSS ?

pliant siren
#

That was, in fact, what the problem was. I thought it was auto-compiling it - it was not.

warm sleet
#

you need a CSS Preprocessor to process SCSS

#

not sure what your application context is

#

but pretty sure in node, webpack takes care of this

pliant siren
#

yeah, i thougth bootstrap was handling it - it wasn't.

#

needed to be generated manually.

tulip oracle
#

That or transpile it manually

warm sleet
#

Thanks @tulip oracle

#

I'm new to nodejs, using it at work since 2 weeks

#

typescript shiver

#

<-- die hard java guy

tulip oracle
#

lol, my knowledge is literally based on me making one single website using React, babel....plus a shit ton of other webpack shit

warm sleet
#

Mostly JavaEE based applications

tulip oracle
#

I'm more of a backend guy anyways haha

warm sleet
#

APIs, Databases

#

ye me too

tulip oracle
#

Yep lol

warm sleet
#

User level is meh

#

I preffer working with data

tulip oracle
#

<-- C/C++/Java/C#

#

I like low level optimization fun

warm sleet
#

I started with C#

#

then moved onto Java

#

I use C for embedded applications, or when Java doesn't cut it

#

I've written applications that use JNI before

#
  1. Create java interface, declare methods with native keyword
#
  1. use $ javah to generate headers for said interface
#
  1. Implement header in C
#
  1. Compile
#
  1. Load .so file with System.loadLibrary()
tulip oracle
#

Hahaha good ol JNI

#

I use that for my crossplatform game engine I'm writing

warm sleet
#

Was to do an OpenCV implementation

#

for a java service

tulip oracle
#

OpenCV mmmm

warm sleet
#

yeeee

#

ultimately, I scrapped that project module

#

and went with OpenALPR

#

because it did exactly what we needed

tulip oracle
#

Yeaa

#

Whatever library that makes it easier

#

and suits your needs of course

warm sleet
#

@tulip oracle 1 business customer, two groups of students, competing for the best solution to the problem

#

we won.

#

xD

tulip oracle
#

nice

warm sleet
#

It was supposed to be an app for a bank, so you could enter license plate of a used car, the app would calculate the monthly fees if you took out a loan

#

using your financials on the phone, (not in the cloud)

#

only thing the cloud service did was take images and return car information from a centralized DB

#

the competing group, implemented a wearable (smartwatch) with a microphone you could talk to for the license plate

#

but our solution: snap a pic and get result within 1 second...

#

was superior

tulip oracle
#

Yea ease of use

warm sleet
#

@tulip oracle we also made a concept to expand upon this with BLE

#

so a dealership with used cars, can have a bluetooth beacon in the little informational sign

#

and if you walk up to the car, all you have to do is look at your watch (we had a smartwatch too)

#

and it automatically senses the nearest beacon, and pulls car data from a database

tulip oracle
#

Man that sounds hard to implement

warm sleet
#

though we ran out of time to fully realize this

#

it was possible

#

we did research and had proof of concepts

#

BLE has an accuracy of 1-2 meters

#

that was a fun project.

tulip oracle
#

Were you guys using arduino?

warm sleet
#

android

tulip oracle
#

Or had a proper guy who knew electronics/hardware and was planning on designing the pcb as well

warm sleet
#

and java service application on the backend

#

no embedded hardware needed

tulip oracle
#

Oh I was referring to the BLE beacon type

warm sleet
#

Bluetooth beacons can be bought straight up

#

they look like a big coin

#

send out their ID every second

#

for 3-4 years

#

until battery is dead

tulip oracle
#

Oh yea no need to make your own BLE beacon hah

#

They're pretty much like longer range RFID cards

warm sleet
#

clear line of sight

#

you can do 30-50 meters

#

first time I use BLE

#

was to develop a navigation system for a planet without GPS

#

drop beacons in a pattern across the plane

#

you can triangulate your position

tulip oracle
#

You would need heaps of those BLE coins to make it worthwhile hah

warm sleet
#

@tulip oracle if you were to actually deploy this

#

BLE isnt sufficient

#

doesnt have enough transmit power

#

or even the right antenna

tulip oracle
#

Well yea its low energy afterall

#

That energy doesn't come for free

warm sleet
#

trying to find that old project with alpr

#

found it

#

@tulip oracle lel

#
    @POST
    @Produces({MediaType.APPLICATION_JSON})
    @Consumes({MediaType.APPLICATION_JSON})
    @Path("image")
    public CarInformation getCar(@Valid CarImageRequest model) {
        byte[] bytes = model.getBytes();
        log.debug("Image Size: " + bytes.length);
        String vrn;
        try {
            vrn = vrnProvider.getVRN(bytes);
        } catch (IOException e) {
            throw new InternalServerErrorException(e);
        }

        log.debug("VRN: " + vrn);

        AutoTelexData data = telex.getDetails(vrn);

        CarInformation information = new CarInformation();
        information.setTelexData(data);
        information.setVrn(vrn);

        return information;
    }
#

that VrnProvider is where the magic happens

tulip oracle
#

Yeaa

warm sleet
#

/**
 * Provides VRNs from an image
 */
public interface VrnProvider {

    /**
     * Gets the VRN from an image
     * @param image the image
     * @return the vrn
     */
    String getVRN(byte[] image) throws IOException;
}
#

magical interface

#
    @Override
    public String getVRN(byte[] image) throws IOException {
        File file = writeFile(image);
        file.deleteOnExit();
        return getVRNFromFile(file);
    }
#

_>

tulip oracle
#

lol?

#

So you take the image, load as a file and then use the file to get the vrn

warm sleet
#
    @Override
    public AlprData process(String file) throws IOException {
        Runtime runtime = Runtime.getRuntime();
        Process proc = runtime.exec(exec + " -j -n 5 -c " + region + " " + file);
        try {
            int exit;
            if ((exit = proc.waitFor()) != 0) {
                throw new AlprException(exit);
            }
        } catch (InterruptedException e) {
            throw new IOException("Failed to load alpr", e);
        }

        BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
        return gson.fromJson(reader.readLine(), AlprData.class);
    }
#

yes because its a bodge

#

_>

#

it just calls shell to do it

#

exec is the executeable of ALPR

#

and -j makes it dump json data in terminal :D

tulip oracle
#

ALPR didn't have a straight API that you could use?

warm sleet
#

it does

#

but we were working on windows, macs and linux machiens to develop this

#

getting this to work with maven & native libs

#

was too much effort.

#

so we just installed it as a package and used the binaries instead of JNI bindings

tulip oracle
#

Ah fair enough lol

warm sleet
#

write image to file, call ALPR to give it some estimates

#

it has a % of how sure it is

#

it just sorts through those, using legal license plate patterns in that country

#

for the netherlands we had

#
{
  "patterns": [
    "^[A-Z]{2}[0-9]{2}[0-9]{2}$",
    "^[0-9]{2}[0-9]{2}[A-Z]{2}$",
    "^[0-9]{2}[A-Z]{2}[0-9]{2}$",
    "^[A-Z]{2}[0-9]{2}[A-Z]{2}$",
    "^[A-Z]{2}[A-Z]{2}[0-9]{2}$",
    "^[0-9]{2}[A-Z]{2}[A-Z]{2}$",
    "^[0-9]{2}[A-Z]{3}[0-9]$",
    "^[0-9][A-Z]{3}[0-9]{2}$",
    "^[A-Z]{2}[0-9]{3}[A-Z]$",
    "^[A-Z][0-9]{3}[A-Z]{2}$",
    "^[A-Z]{3}[0-9]{2}[A-Z]$",
    "^[A-Z][0-9]{2}[A-Z]{3}$",
    "^[0-9][A-Z]{2}[0-9]{3}$",
    "^[0-9]{3}[A-Z]{2}[0-9]$"
  ]
}
#

this was a config file, because every few years government adds more

#

@tulip oracle omg. lmao. I just checked some of the older sources

#

it has to prepare an email as well

#

I used JSP for this O.o

#

haha, say what you will, but it looks clean.

tulip oracle
#

Lol

warm sleet
#

I remember writing my own taglib

#

for this

tulip oracle
#

taglib?

warm sleet
#

Tags are keywords in JSP to call upon functions

#

things like profile:gender()

#

are JSP tags

tulip oracle
#

JSP? I don't even JSP lol

warm sleet
#

java server pages

#

yeah

#

server side html rendering

tulip oracle
#

Oh so a template

warm sleet
#

yes

#

its biggest sack of shit

#

xD

tulip oracle
#

But hey it works right? thats all that matters

warm sleet
#

yuh

#

nowadays, I use handebars for this

tulip oracle
#

Yea I've heard of handlebars

#

Barely touched frontend development tbh

#

Gotta get around to messing around with it

#

Wanted to check out vue.js

warm sleet
tulip oracle
#

This mithriljs doesn't need to compile to like a bundle.js?

warm sleet
#

its just like any other library

#

will be part of your bundle

tulip oracle
#

Oh its the view part of it

#

Well rendering views

warm sleet
#

yep

tulip oracle
#

So why your work picked this particular library and not the other stuff?

#

like vue, react or even angular

warm sleet
#

leightweight

#

and you can reuse components you make with mithril, in other applications

vestal glen
#

that powershell doesn't know about node

sly moat
#

wdym

vestal glen
#

well, you presumably installed node

#

and you're trying to use that node in a power shell that does not know where that node is installed.

sly moat
#

so u r saying either I have installed it in the wrong path or it is an old version of node.js software?

warm sleet
#

@sly moat powershell, pretty sure commands have to be prefixed with ./node

bitter notch
#

Need to add node to the PATH most likely in windows, and then close any powershell/cmd/apps that use it like VSCODE

warm sleet
#

@bitter notch yes but calling executeables from PATH still needs a prefix

#

it thinks its a PS command otherwise

sly moat
#

oh I see

bitter notch
#

node in powershell just opens the node prompt

warm sleet
#

@bitter notch its same shit with the JDK on windows

#

and maven too

#

on linux that stuff works out of the box

#

no need for a path, if you can use /bin

bitter notch
#

Yeah, I cheated and added a C:_PATH to my path where I install anything i want in my path lol

sly moat
#

huh

warm sleet
#

@bitter notch switching versions also very easy with update-alternatives

#

JDK 8 or JDK 14

worn relic
#

Hi. Iโ€™m wanting to learn swift. Is there any good free service or tutorials to start. Btw I already html and Iโ€™m proficient in python.

spring pond
#

To learn Swift I ended up using the Apple SwiftUI tutorials and learning the rest of the language based on need

worn relic
#

Like from the playgrounds app

#

@spring pond

spring pond
#

no i used xcode

#

however if you have no interest in UI design or dont have a mac then you can use the new swift for windows

#

but xcode was purpose built for swift so i strongly recommend it if you have access to a mac/hackintosh

nocturne galleon
#

I've been trying to compile this https://github.com/MJoergen/mchess but I'm getting collect2.exe: error: ld returned 1 exit status every time I do so. Anyone that could help

#

I tried doing it through command prompt and a few times with visual studio code

#

what quora

#

wdym

#

I used the mingw g++ compiler and tried the gcc but didnt work and then VScode

#

Im pretty sure vscode also used the mingw g++ compiler

#

lol idk whats wrong

#

idk wtf is wrong

#

I do g++ main.cc and this is what comes up

#

I tried but it was too long and I couldnt bother to take a pic

#

'i686-w64-mingw32-g++' is not recognized as an internal or external command,
operable program or batch file.

#

how do I do that

warm sleet
#

@nocturne galleon from what you posted in that textfile

#

Seems you haven't included your library path

#

undefined reference to operator<<(std::ostream&, CBoard const&)

#

ld is the linker

#

it links your compiled code to the libraries it uses

#

I'm not the guru for C++

#

Only C/C++ I've done was on linux, and that works out of the box with no fuss

hollow basalt
#

Basically he only compiles the main.cc

warm sleet
#

But that project you linked

#

There's a makefile

hollow basalt
#

which depends on the other sources, which he didn't compiled (and linked)

warm sleet
#

You should use that.

#

@hollow basalt he's not using make

hollow basalt
#

he's using g++

#

in the cmd

warm sleet
#

That has all the things you need for compilation

hollow basalt
#

time to install make on windows

#

or time to switch to linux

warm sleet
#

The makefile actually uses mingw

#

on windows, that is

#

Compiles just fine btw

#
git clone https://github.com/MJoergen/mchess.git
cd mchess
make
nocturne galleon
#

yeah it works with the make command

#

on linux just fine

#

@warm sleet

#

How do I do that on windows

warm sleet
#

@nocturne galleon you need make

#

I'm not so sure which one

#

cmake for windows most likely

#

I've only ever compiled C on windows once

#

saw how horrid it is

#

and went to linux xD

nocturne galleon
#

Yeah I have a linux virtual machine now that I have a better computer but I used to dual boot

warm sleet
nocturne galleon
#

yeah I am currently reading that

warm sleet
#

the lengths one has to take to get compilation/development environments going on windows, is why I use it strictly for gaming

#

I just feel like all my development skills go down the drain if I try to do this on a windows box

nocturne galleon
#

Yeah I am kinda new to programming but even I noticed how much smoother linux was when I was trying to get tensorflow to work on windows for about 10h and then go it working on linux after about 1h

warm sleet
#

@nocturne galleon windows is consumer platform, thats what sets linux appart

#

prosumer software, but requires a bit of know-how to fully utilize

#

I've been using linux on my daily driver for about 6 years now

nocturne galleon
#

yeah I would use linux if all my games would run there

warm sleet
#

I never want to go back.

#

It has never crashed in those 6 years

#

If I turn it on, I am always confident that it will boot

#

when I shut down my gaming desktop and it says "Windows is installing updates"... I always get nervous

nocturne galleon
#

Well I guess the ubuntu distro is pretty user friendly. Only thing that could be a problem is downloading drivers but they've made this command to auto download all the necessary drivers so its still pretty smooth

#

xd

warm sleet
#

What

#

you dont need to install drivers on linux

#

thats what linux is.

#

its 80% drivers ;)

nocturne galleon
#

wifi drivers, graphics drivers

warm sleet
#

propietary

#

oh yea

nocturne galleon
#

lol

warm sleet
#

"Fuck you nvidia"

nocturne galleon
#

I hate one thing about the ubuntu distro right now and that is that every time I update it, like for example the kernel. After I update all the drivers are gone and I have to download them again

warm sleet
#

DKMS

#

can solve that

#

thats how I have nvidia drivers for my hybrid graphics setup on laptop

#

even with that, you still need to restart to switch GPU.

#

because PRIME sucks.

#

DKMS links the binary driver to the kernel headers, when you install a new kernel

#

DKMS then loads them as a kernel module when you load it up

nocturne galleon
#

I dual boot on my laptop but I run it on virtual machine on my desktop since I dont really do any heavy work that requires all my pc power

warm sleet
nocturne galleon
#

Ill look into that

warm sleet
#

I forget how I installed it

#

but ubuntu has guides on how to install it properly

#

or maybe debian guides

#

@nocturne galleon linux doesnt have "configuration" in the sense that windows has it

#

if you want to "configure" linux, you have to configure it with make, and then recompile it

#

its bit more advanced, but even that. is less than 2-3 commands

#

with make menuconfig

#

you get this ^

#

There's literally 1000s of configuration fields

nocturne galleon
#

cool

warm sleet
#

settings are hardcoded into the binary

nocturne galleon
#

yeah Im not that advanced as a linux user. Just started out couple months ago

vestal glen
#

eh, you barely need to re-compile your kernel yourself if you're just an average power-ish user.

warm sleet
#

@vestal glen I tossed out bunch of drivers I do not need, everything else is provided as a module

#

and also made the kernel preemptible

#

because its only a 2 core system. desktop tends to freeze/lag when system is under load

#

kernel preemption reduces performance, but makes userspace take priority over kernel code

proper gale
#

@warm sleet "Nvidia, fuck you"*

warm sleet
#

GNU+Linux

nocturne galleon
#

if I am creating an updater for my program, it has to grab the new files off the internet, how should I go about it? an SFTP connection? or stream the data through TLS or something?

nocturne crypt
#

that's a super generic question

#

do you mean live patches for an application you're writing?

nocturne galleon
#

basically the way discord does it, when the user opens it, it checks for updates, if there are some, it will install them

#

I currently have implemented the ability for the program to run the update software, which will then reopen the program after faking to update it, since I don't know how to go about that yet

limpid reef
nocturne crypt
#

discord is an electron app

#

so discord's version of updating is downloading new javascript files

nocturne galleon
#

what protocol would they use to go about that?>

#

sftp?

nocturne crypt
#

they just download it over http(s)

#

and have servers running 24/7

nocturne galleon
#

really?

nocturne crypt
#

really

nocturne galleon
#

you can download a file on http/s?

#

damn

nocturne crypt
#

you can

#

all your web browser does is download HTML/HTML5 documents

#

and then loads them

nocturne galleon
#

huh

nocturne crypt
#

sometimes it downloads a ton of javascript files

nocturne galleon
#

I thought it just downloaded the content of the html page and left it in memory

nocturne crypt
#

if the end developer is cool it downloads a WASM file

#

it only does that if it's a static web page

nocturne galleon
#

hmm

#

well mine consists of 2 executables

#

the program itself, and an updater.exe

#

when the user clicks on the program, it realises there are no arguments passed and so it opens the updater and closes itself, the updater, after updating the program, will open it with the argument "UpdateSuccess", when the program sees it got this exact argument, it will run as normal

nocturne crypt
#

honestly this is why web applications are so popular

#

you basically want to add hot-fixes to your application

#

so the application that basically is just a health check, that would have to do a curl request to a web server

#

and download your new updated executable

hollow basalt
#

you can download a file on http/s?
uhh

nocturne crypt
#

don't question it

nocturne galleon
#

hey, it says Hyper TEXT transfer protocol, how am I meant to know it can do files?

warm sleet
#

by providing a Content-Disposition

#

HTTP can do binary and text

#

Content-Type and Content-Disposition help in the client context to resolve

#

Content-Type just holds information on what kind of file you are requesting

#

and Content-Disposition is used for things like file-downloads in a browser, so it doesn't open a 2nd tab

#

@nocturne galleon in essence, its a text based protocol.

#
GET / HTTP/1.1
Host: google.com
hollow basalt
nocturne galleon
#

Bruh the only thing Iโ€™ve done with web is create <body>hi</body> I donโ€™t know shit about it

hollow basalt
#

that's html

#

not HTTP

nocturne crypt
#

fun fax

#

text can mean whatever you want it to with computers

#

if unicode is defined as text (which it is)

#

it literally means anything

warm sleet
#

just cat a binary file

#

there's bound to be some actual characters in that

#

the rest is mostly gibberish, control keys and whatnot

cinder kraken
#

or misaligned literals

simple harness
gaunt sparrow
#

nice

#

tbh i would use that

simple harness
glass canyon
#

Nice spaghetti

raven roost
#
grid = [["O", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"]]

'''
print(grid[0])
print(grid[0][0])

['O', 'X', 'X', 'X']
O
'''

# Define grid, starting position etc ---
# Check new positions are valid ---
# Move "O" to new position
# Replace old "O" with "X" ---

current_pos = [0, 0]

new_pos_x = int(input("Enter X co-ordinates: ")) + 1
new_pos_y = int(input("Enter Y co-ordinates: ")) + 1

pos_valid = False

while pos_valid == False:
    if new_pos_x != current_pos[0] and 4 >= new_pos_x and new_pos_x >= 1:
        print("Nice")
        if new_pos_y != current_pos[1] and 4 >= new_pos_y and new_pos_y >= 1:
            print("Cool")
            pos_valid = True
    new_pos_x = int(input("Enter X co-ordinates: ")) + 1
    new_pos_y = int(input("Enter Y co-ordinates: ")) + 1
                                
new_pos_x -= 1
new_pos_y -= 1

grid[current_pos[0]][current_pos[1]] = "X"

grid[new_pos_x][new_pos_y] = "O"

for i in range(0, 5):
    print(grid[i])

I have this problem for my Computer Science A-Level, the while loop isn't breaking when both of my debug print() statements are tripping, therefore updating the while loop condition. But the loop doesn't seem to be breaking

nocturne crypt
#

okay

#

instead of just using your code which has weird control flow

#

use a finite state machine diagram

raven roost
#

use a finite state machine diagram
Never heard of it

nocturne crypt
#

it's a way of expressing logical connections between code segments without using code

#

so people can communicate about programs in a language agnostic way

#

everyone understands pictures

#

here is an example of a while loop as a finite state machine

raven roost
#

It's the fact that Python won't break the loop even though I'm telling it to break that I'm struggling with

nocturne crypt
#

the fact is python has unbelievably weird formatting rules

hollow basalt
#

Just use automata machines

#

Much easier

nocturne crypt
#

in C,C++,Golang, and Rust we have curly braces for control flow

#

to eliminate syntax

#

your logic makes no sense to me

raven roost
#

Yep, I prefer braces

nocturne crypt
#

and probably a ton of people on this server

hollow basalt
#

But I like python

nocturne crypt
#

use a FSM would make it easier for us to help you

#

@hollow basalt you're wrong

hollow basalt
#

Yea diagrams easily

#

@hollow basalt you're wrong
@nocturne crypt how am I wrong for my preference

raven roost
#

This isn't a proper program, it's some tiny thing my teacher wants us to write

hollow basalt
raven roost
#

I like Python too

#

But I prefer braces

#

Python with braces would be so nice

nocturne crypt
#

@hollow basalt only program with yaml

hollow basalt
#

Then create an interpreter for python with braces

raven roost
#

from __future__ import braces

nocturne crypt
#

no one wants to do that

hollow basalt
#

I'll take one for the team

nocturne crypt
#

so seriously if you want help make a FSM

#

for example

#

because i don't think it's possible for someone who isn't you to determine if it's a logic error or not

raven roost
#

It's not the logic I'm struggling with, an FSM would help with logic.

nocturne crypt
#

then you formatted it wrong

#

if it's not being caught by the control flow

hollow basalt
#

Dunno, FSM might give you a better perspective

nocturne crypt
#

it's always a formatting error

#

naw, it can't be a logic error

hollow basalt
#

Start small

#

Let's go with

print("hello world")
nocturne crypt
#

and people call me a troll

#

i am nothing compared to my stand

hollow basalt
#

Bruh why are you trolling

nocturne crypt
#

my stand speaks!

raven roost
#

I fixed it by replacing pos_valid = True with break

#

No idea what was causing it but oh well

nocturne crypt
#

Dah

hollow basalt
#

Dah

proper gale
#

@raven roost your origional code works correctly, including the way you break out of the loop, its just ordered incorrectly

#

this is probably more what you wanted, ```py
grid = [["O", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"], ["X", "X", "X", "X"],
["X", "X", "X", "X"]]

'''
print(grid[0])
print(grid[0][0])

['O', 'X', 'X', 'X']
O
'''

Define grid, starting position etc ---

Check new positions are valid ---

Move "O" to new position

Replace old "O" with "X" ---

current_pos = [0, 0]

new_pos_x = -1
new_pos_y = -1

pos_valid = False

while pos_valid == False:
new_pos_x = int(input("Enter X co-ordinates: ")) + 1
new_pos_y = int(input("Enter Y co-ordinates: ")) + 1
if new_pos_x != current_pos[0] and 4 >= new_pos_x and new_pos_x >= 1:
print("Nice")
if new_pos_y != current_pos[1] and 4 >= new_pos_y and new_pos_y >= 1:
print("Cool")
pos_valid = True

new_pos_x -= 1
new_pos_y -= 1

grid[current_pos[0]][current_pos[1]] = "X"

grid[new_pos_x][new_pos_y] = "O"

for i in range(0, 5):
print(grid[i])```

#

with that said, you do a + 1 and -= 1 in there, should probably remove those and use a [0, 4) check

#

you can also break an infinite while loop here as you dont check pos_valid anywhere, and its always true after that while loop, so, you are basically doing exactly that

warm sleet
#

while true do

hollow basalt
warm sleet
#

end

slender seal
#

hey! does anyone know how to send emails with python?, ive had a few attempts at it but it doesnt ever seem to work.

hollow basalt
#

what have you tried so far

slender seal
#

one sec

#

import smtplib, ssl

port = 465

email here, password here = read_creds()

recieve = sender

message = """
Subject: Python Email Tutorial

This is from python

Romy
"""
context = ssl.create_default_context()

print("Sending")
with smtplib.SMTP_SSL("smtp.gmail.com", port, context=context) as server:
server.login(sender, passw)
server.sendmail(sender, recieve, message)

print("Email sent")

hollow basalt
#

if only people use codeblocks

#

what's the error

#

based on my knowledge, google requires specific configuration to work with SMTP

#

because SMTP is "less secure" method

warm sleet
#

EHLO instead of HELO

#

@hollow basalt you ask the SMTP server to upgrade to SSL

#

initial conversation is unencrypted

hollow basalt
#

SMTP used to work, now it's disabled by default

tulip oracle
#

@nocturne galleon Got it compiled on mingw, I tried using mingw version of make, I think you have to install this through the mingw installer if I recall correctly - this is located under MINGW_INSTALL_PATH/mingw64/bin folder . Didn't work for me either as that I don't have this other program called "sed" installed.

Then again you don't need to use make or the included Makefile. Just observing the Makefile, its barely got any source files that need to be compiled so you can just simply make a shell/batch script and compile it in one line. Just create a batch script with the following:

g++ -Wall -Werror -static-libgcc -static-libstdc++ -O2 -o mchess main.cc CBoard.cc CMove.cc ai.cc CMoveList.cc

Note: You may need to add #include <ctime> at the top of main.cc as I had to do that as well (I think #include <stdlib.h> on linux includes it by default)

#

@warm sleet cmake is actually a Makefile generator, it reads from CMakeLists.txt and automatically detects the build environment - compilers, library locations, etc and encompasses it into the Makefile. It helps avoid issues where in the Makefile I tried to run had this CC = i686-w64-mingw32-g++ <--- If you didn't have this exact compiler, it wouldn't even compile and would require modification on your part

warm sleet
#

@tulip oracle ahh, I wasn't aware of that

#

Any C I've done previously, was either with make, or CMake (but generated with CLion IDE)

tulip oracle
#

Yeaa, its why I like CLion IDE a lot, it integrates sooooo well with mingw and cmake. It does make programming on windows easier.

warm sleet
#

@tulip oracle I primarily do my work in java

#

and IntelliJ just offers a level of integration, I've not seen on any other IDE

#

Couple years ago, they had their own build system

#

but its fully maven integrated now, which is amazing.

#

Previously only Netbeans offered this

#

JavaEE, Webservices, Databases, and plugins for any other language/markup you are using

#

All in one place

tulip oracle
#

Yeah most of the Jetbrains IDEs are really well thought out

#

Really impressed with Android Studio too, which they made as well

warm sleet
#

I never used android studio

#

Its just the android plugin for IDEA

#

that works too

tulip oracle
#

If you used IDEA, then you've used Android Studio

#

With minor differences

warm sleet
#

WebStorm is the only seperate IDE I have next to CLion and IntelliJ

#

mostly because, WebStorm Debugger integration, somehow not able to get it to work the same way in intelliJ

#

The filewatching stuff with transpiled code, somehow a big iffy with IntelliJ + NodeJS plugin

tulip oracle
#

mmm work in progress I guess?

warm sleet
#

Or I am missing some plugins

#

meh

#

I got complete jetbrains pack anyways

#

@tulip oracle ahh yes, and the git integration :D

#

I used to only need a client for git, to get the little brand-graph visualization

#

everything else I do with terminal

#

but IDEA has that built in

#

submodules, in conjunction with maven modules, works like a charm

tulip oracle
#

haha yea

#

I ceebs using git on terminal

#

So I use sourcetree

warm sleet
#

CTRL + K

#

in IDEA for "new commits"

#

SourceTree I ditched completely

#

slow ass piece of junk

tulip oracle
#

Its actually that slow huh?

warm sleet
#

Yes

tulip oracle
#

I had no problems with it tbh

warm sleet
#

on projects > 1000 commits

#

with over 500 tracked files

#

sourcetree just dies

tulip oracle
#

Ohh

#

Yeah I guess if you put it that way then yea

#

Just lags you hard

warm sleet
#

yeah

#

git is fast, sourcetree is not

#

if you really need a 'gitflow' workflow

#

you can archieve the same thing, with a handful of shell scripts

#

or. even better.

#

use git hooks.

tulip oracle
#

Or in my case, a bunch of batch scripts lol

#

No shell here

warm sleet
#

batch, shell

#

w/e

tulip oracle
#

Unless i decided to use WSL for windows 10

warm sleet
#

any scripting I do on windows, I just have a .sh and .bat file

#

the bat file, calls bash -c

#

so I dont have to fuck around with windows command

#

@tulip oracle WSL is the biggest piece of shit I've ever used

#

It lasted a whole week on my system

tulip oracle
#

Whats wrong with it?

warm sleet
#

then a windows update came, and the entire WSL instance I have is broken

#

packages unable to be fetched

#

WSL2... now that was even worse

#

WSL2 I got filesystem reads of about ~45MB/s

#

on an SSD that can push 500MB/s

#

Just, putting linux in a subsystem of windows, is just.. wrong on so many levels

tulip oracle
#

ewww what

warm sleet
#

its WINE, but worse

tulip oracle
#

Thats hella broken then

warm sleet
#

WSL is not a compelling argument to use windows for development

#

any developer who needs a linux environment, will either run a VM, or a dedicated system

tulip oracle
#

yea was a bit confused you saying compelling argument haha

warm sleet
#

its just microsoft's lame attempt to keep developers on the platform

#

because once developers leave your platform, the platform is dead.

#

Linux users will never use Azure

tulip oracle
#

My friend got like paid training for Azure and was offered like a shit ton of credit to mess around it too

warm sleet
#

yeah

#

but you are stuck with it then too

#

because your apps only run on Azure

tulip oracle
#

I guess they're trying to peddle it to devs

#

A lot of platform dependencies huh?

#

What would you recommend, linux in VM or dual boot?

warm sleet
#

Linux host

#

Just ditch windows

#

or put it in a VM

#

That's what I did for my development machine

tulip oracle
#

But but mah gaemz lol

warm sleet
#

Windows desktop for games

#

my laptop would be illsuited for windows anyways

#

its dual-core i7 5500U with 8GB ram

tulip oracle
#

Especially if its an old laptop

#

Yeaa

warm sleet
#

I got all kinds of kernel patches on my system, to make it useable

#

like kernel preemption, some compiler optimizations

#

it idles <1% cpu

#

and only if you start up a big program, does it spike 100%

tulip oracle
#

Battery life must be improved alot

warm sleet
#

weeeellll

tulip oracle
#

No lol?

warm sleet
#

its old 45Wh battery

#

30 minutes is a lot

tulip oracle
#

lmao

warm sleet
#

yeah..

tulip oracle
#

Lost its capacity

warm sleet
#

yup

#

@tulip oracle lol worst thing about this laptop though: the GPU

tulip oracle
#

To be expected, thats normal with any battery technology

#

Yea?

warm sleet
#

Its got hybrid graphics with a GeForce 940M

#

First of all: hybrid graphics suck complete ass

#

and second: ASUS cannot design laptops.

#

The GPU and CPU shared the same heatsink/pipes

#

With GPU enabled, Idle temps @ 61C

#

with onboard: idles @ 31C

tulip oracle
#

Whoa thats a huge diff

warm sleet
#

max load cannot even be archieved with GPU enabled, because it throttles itself to death

#

@ 104C

#

with onboard, max load @ 80C

#

which is fine

tulip oracle
#

Thats pretty insane...wow

warm sleet
#

@tulip oracle lol and its useable, after some tweaking

#

imagine what it was like, out of the box with windows

#

it had two storage devices: 500GB HDD, and a 24GB SSD

#

the SSD was ment to "speed up" the HDD

#

but it was a crappy Kingston SSD that did maybe 250MB/s

#

and the caching solution, was a software service running in windows

#

often consuming >50% cpu

tulip oracle
#

Wtf lol

warm sleet
#

Yeah

#

like

#

why bother with caching

tulip oracle
#

Its one of those SSHD?, like you can't access the SSD directly but its used as a cache right?

warm sleet
#

if its draining battery, and being unuseable

#

no no

#

two seperate sata devices

#

no chipset level magic, pure software

tulip oracle
#

Oh okay

warm sleet
#

not having a caching service, would have been more performant

tulip oracle
#

yea gotta disable that shiet

warm sleet
#

I use the 24GB ssd it has, as a 'vault' now

#

luks volume with a tiny distro on it

#

thats where I do things that aren't 100% kosher

tulip oracle
#

luks?

warm sleet
#

LUKS acts as a partition, that when decryped, holds one or more partitions

#

so you have 1 partition on your disk, and all your regular filesystems inside that LUKS partition

#

idk, this stuff is alien technology on windows

tulip oracle
#

Is the encryption necessary?

warm sleet
#

linux just uses the device mapper for this

#

@tulip oracle its like bitlocker on windows

#

except it doesnt suck

tulip oracle
#

Ah fair enough lol

warm sleet
#

If you want full disk encryption, then you can use luks

tulip oracle
#

Never really bothered with any encryption tbh

warm sleet
#

If you boot a luks system

#

you get a black screen, with a password prompt

#

you enter password, then it can boot linux

tulip oracle
#

So does that mean theres two separate logins you need to do:?

warm sleet
#

yeah, one is disk encryption

tulip oracle
#

One for decryption and one for the actual distro?

warm sleet
#

and the other is regular useraccount

tulip oracle
#

I see

warm sleet
#

But I also encrypt all my external storage devices

#

HDDs and USB sticks are all encrypted

#

on big external HDDs, I sometimes make two partitions

#

one NTFS (for windows) and one LUKS (with encryption)

#

windows cannot read LUKS

tulip oracle
#

Pretty much isolated yea

warm sleet
#

if you plug in a LUKS encrypted drive to windows

#

first thing it suggests: Do you want to format?

tulip oracle
#

Lol

#

To a user, unaware would be like I can't read this HDD

#

Time to format this shit

warm sleet
#

yea

#

so you put an NTFS partition at the start of the drive

#

windows detects it

#

and doesnt ask further questions

#

it shows up under partition manager as "RAW"

#

@tulip oracle cryptsetup luksSuspend

#

thats the panic command, if the feds knock on your door

tulip oracle
#

lmao

warm sleet
#

it pauses the volume

#

and flushes the key from memory

#

so you cannot 'deep freeze' the ram with computer forensics

tulip oracle
#

Do you have alot of stuff to protect/hide?

warm sleet
#

Not really lol

tulip oracle
#

I know I don't, people could go through my files for all I care

warm sleet
#

and at gunpoint, I'd probably give up the details

tulip oracle
#

Its just games and tv shows, movies, etc

#

lol

warm sleet
#

see

#

all that encrypted stuff

#

is pirated movies

tulip oracle
#

lmao

warm sleet
#

don't want that all over the place

tulip oracle
#

Hey we call those "backups"

warm sleet
#

well

#

its not a backup

#

if it has the name of a known redistributor in the filename

#

like so many torrents do

#

most of the movies I have pirated though, are pretty old

#

some of em, even in monochrome color (black/white)

tulip oracle
#

lol

warm sleet
#

Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb, more commonly known simply as Dr. Strangelove, is a 1964 black comedy film that satirizes the Cold War fears of a nuclear conflict between the Soviet Union and the United States. The film was directed, produ...

#

Probably still one of my old time favorites

tulip oracle
#

Tis beyond my time

warm sleet
#

Its satire about the whole 'commie conspiracy' and mutually assured destruction

#

its worth watching

#

its quite amusing :D

#

Its beyond my time too

tulip oracle
#

Mmm so this is what is in your encrypted drive

warm sleet
#

that, with another 300GB music

#

_>

#

@tulip oracle on my server, I also use luks

#

there's customer files on that, so reasons

#

but that is raid1 with luks

#

using btrfs

tulip oracle
#

Yea that is totally understandable

#

A bit of redundancy and speed aye

warm sleet
#

two disks, both with luks, using the same key

#

and both have btrfs

tulip oracle
#

two disks, both with luks, using the same key
@warm sleet
Good, now tell me the key ๐Ÿ˜„

warm sleet
#

Its an RSA key

#

quite long ;)

#

4096 bits

tulip oracle
#

Just need access to a super computer to bruteforce that

warm sleet
#

cannot brute force it either

tulip oracle
#

Lol

warm sleet
#

youd need a supercomputer the size of the galaxy, and then some

tulip oracle
#

Yea like with a search space of 2^4096

warm sleet
#

^ to give you some idea

tulip oracle
#

Yeaa I've seen his vids

warm sleet
#

you need a gazillion kilogoogles

tulip oracle
#

If only we could harness all that crypto mining power

#

It still wouldn't be enough

warm sleet
#

crypto mining is biggest idiocy I have ever seen

#

blockchain is a cool concept, but the implementation calls for wasting power.

#

and with global warming and all, its a shame

tulip oracle
#

Yea consumes so much power

#

Very wasteful

vast echo
#

There are blockchains designed to not use much power

warm sleet
#

@vast echo tell that to bitcoin

vast echo
#

Bitcoin is not one of them

warm sleet
#

yet its the one that everyone wants

#

and for the foreseeable future, we're stuck with it

foggy ginkgo
#

Check out Lightning Network?

warm sleet
#

yeah, that addresses the scaling issues

#

to get around the limit of amount of transactions/block

#

bitcoin has a long block timer too

#

10 minutes

#

litecoin scales better, with 2 minutes

#

but still has same issues

#

afk ,dinner

nocturne galleon
honest sleet
#

Anyone using GodotEngine here?

cursive laurel
#

No but always been tempted to have a look at it. I currently only use UE4.

nocturne galleon
#

How would you code something like this? Basically a Welcome Message, it autoroles you, and then when you do a .agree command it takes the old role, and gives you another one.

honest sleet
#

@cursive laurel it's really nice, I'm currently working on multiple project with it and I like it a lot ๐Ÿ˜ƒ

nocturne galleon
#

nevermind, found a method for converting it

warm sleet
#

IPaddress is not a string no xD

#

isnt that a struct?

hollow basalt
cinder kraken
#

in c# it's its own class

#

for going to/from string, you need to use the parse/tryparse methods

warm sleet
#

@cinder kraken some datatypes in C# are structs

#

but would make sense that IP is a class, because their spec says it does both v4 and v6

cinder kraken
#

until dotnet 2 it was a struct

upper perch
#

does anyone know much SQL can't get this statement to work "CREATE TABLE Suppliers(SupplierIdNo INT,SupplierName VARCHAR(30),SupplierEmail VARCHAR(120),SupplierAddress VARCHAR(300),SupplierPhone INT(11),SupplierWebsite VARCHAR(100),PRIMARY KEY(SupplierIdNo))"

warm sleet
#
CREATE TABLE foo (
  bar VARCHAR(100) NOT NULL,
  CONSTRAINT pk_foo PRIMARY KEY (bar)
)
upper perch
#

i'll try that

warm sleet
#

depending on what sql engine you are using ,you may also put PRIMARY KEY directly by the field

#

but that is bad practice

#

usually, make a named constraint pk_tablename

#

foreign keys same way: CONSTRAINT fk_name FOREIGN KEY (keys) REFERENCES othertable(field)

upper perch
#

ok i'll try running this

#

still hasn't worked

warm sleet
#

error?

upper perch
#

well it's through visual studio and it's for my A-Level coursework so i can't use any packages so i have a pre defined executeSql() method

#

so it won't give me error codes

#

or informstionb

warm sleet
#

do you not have an sql console?

upper perch
#

my method in c# works like this

warm sleet
#

do you even know what kind of sql engine you are using?

upper perch
warm sleet
#

you don't typically execute DDL in code

upper perch
#

No however i have already created a table that works

warm sleet
#

you do that with a database script, and only use DQL or DML in code

#

I hope you know what DQL and DML are

upper perch
#

no not really i don't know much other than the basics for SQL

warm sleet
#

yeah, but do you know what server your program connects to?

#

If you can just use an sql workbench, and run queries on the fly

#

thats how you test and write your queries

#

once they work, you put them in your code

upper perch
#

is this it Provider=Microsoft Jet 4.0 OLE DB Provider

warm sleet
#

ok, and the connection string?

#

because that looks like OBDC

upper perch
#

the whole connection string is ""private const string CONNECTION_STRING = @"Provider=Microsoft Jet 4.0 OLE DB Provider;Data Source = " +
EXAMPLEDB + ";";

#

exampledb is StockDatabase.mdb

warm sleet
#

I thought people no longer used ADO.NET

#

whatever your course is teaching you

#

that's pre 2010 bullshit

upper perch
#

honestly we were learning delphi last year so that's no suprise to me

warm sleet
#

Delphi??

#

wtf

#

Thats a dead language

upper perch
#

yep

#

we have moved over to C# over lockdown

warm sleet
#

@upper perch honestly, if you want to get a good feel for SQL

#

just download SQL Server Express

#

it comes with management panel

#

can even be made to work with your code

#

takes minor adjustments to the CONNECTION_STRING

upper perch
#

ok thanks will have a look

warm sleet
upper perch
#

ccheers

#

other than that do u know why my code my be bugged?

warm sleet
#

I had to use MS Access during my courses on databases

#

@upper perch kinda need to get some output from the sql server xD

upper perch
#

ah fair lol

warm sleet
#

and ADO.NET is a bit of an iffy system

upper perch
#

Alright will keep in ming

warm sleet
#

ADO expects you to configure the data source in the operating system

#

and that connection string, uses ADO to get the actual datasource through the OS

#

windows is convoluted in this area. its beyond stupid how microsoft does this stuff

#

typically

#

@upper perch this is the string you'd use for SQL server 2019 Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

#

IP, database, username & password

#

in your .NET project. may have to add a nuget package or reference to the Microsoft.Data.SqlClient

upper perch
#

alright cheers mate

warm sleet
#

This is what you want

#
    class Program {
        private const string ConnectionString = "";
        static void Main(string[] args) {
            SqlConnection connection = new SqlConnection(ConnectionString);
            connection.Open();
            

            SqlCommand command = new SqlCommand("query", connection);

            command.ExecuteReader()
        }
    }
#

minimal amount of code ^

#

"query" is where your sql goes

#

ExecuteReader() returns a table reader which you can use to retrieve rows from the query result

upper perch
#

Yeah i had that as its own method to execute the SQL statements

#

anyways i have fixed the statement know turns out it was because VARCHAR can only hold up to 255 characters (I had 300) and i was trying to limit the integer through INT(11) which doesn't work so i switched to VARCHAR instead. Thanks for your help anyways tho @warm sleet

warm sleet
#

@upper perch usually INT for 32 bit, and BIGINT for 64 bit

#

you can also do unsigned numbers, with UNSIGNED INT

#

VARCHAR has a limit of 8000

#

beyond 8000 characters, you just do VARCHAR(max) for maximum of ~2GB

nocturne galleon
#

im working on a copying program, and im having trouble with glob patterns, how do i get a pattern that matches everything that is not in a node_modules directory?

#

my current pattern is !**/node_modules/**/*.*, but it only seems to work on some glob pattern testers

vestal glen
#

! usually only makes an exception for already excluded things

nocturne galleon
#

hm

#

how should i invert it then

astral garnet
#

any linux mint users? i'm trying to install a game via steam on a second ssd but for w/e reason it keeps saying the disk isnt writeable :c

#

OMG nevermind after the 15th time I got it to work โค๏ธ

#

idk what I did differently

hollow basalt
#

You did it for the 15th time

#

Looks like 15th time's the charm

astral garnet
#

yeah idk

nocturne galleon
#

is gitlab free?

limpid reef
nocturne galleon
#

cause it said the self-hosted is fully featured and free but there is a pricing guide for the self hosted, which has me confused

#

but the site says this, implying there is a payment structure for self hosted

#

wait nvm yeah I see now, you can get more features self hosted for a subscription

#

so reading what they say, I dont actually need any more than the free version for a solo kid

dusty ermine
#

Hey any remmendations for free web hosting?

hollow basalt
#

your own pc

tawny kiln
nocturne crypt
#

your own pc though

#

also you can self-host gitlab on your own hardware

#

and just deploy it that way

hollow basalt
#

your own pc gitlab then copy paste the files when you're deploying

warm sleet
#

@nocturne crypt I wouldn't recommend gitlab to smalltime users.

#

gitea is much faster and less resource heavy

#

gitlab ships with a lot of bulk and middleware

#

@nocturne galleon derivative?

nocturne crypt
#

i like gitea

warm sleet
#

You'll have to do this calculation yourself

#

scipy has a misc module, this should have a derivative() operation

warm sleet
#

@nocturne galleon not really no

#

a graph is a type of presentation

#

which assumes you have the raw data ;)

#

doesnt matplotlib just take an array of values ?

#

I don't understand your question

#

you want to change the scaling on the y-axis?

#

your lowest value, which is at x=0, is 780

#

wat.

#

computer presents that graph

#

it doesnt see shit

#

what is it you are trying to archieve lol

#

because I am confused

#

cannot be done

#

well yes

#

the reason its not been done

#

is because nobody ever needs this

#

extracting data from a generated graph, sounds wrong on so many level

#

because of inaccuracy

#

wat.

#

machine learning is a buzzword

#

it carries no meaning

#

10% profit in 12, wtf are you talking about lol

tulip oracle
#

why does this sound like a get rich scheme

warm sleet
#

bruh

#

if you want to interact with stock exchange data

#

use their API

#

not try to machine-learn-render their graphs

tulip oracle
#

How did you even get that graph anyways?

#

^Use their API as @warm sleet mentioned

warm sleet
#

APIs are for programs to talk to other programs

#

you want your program, to retrieve data from the stock exchange

#

Ahh yes

#

obviously

tulip oracle
#

uhhh

warm sleet
#

their services cost money too ;)

tulip oracle
#

Why not spend money...to make money lol?

warm sleet
#

@tulip oracle yeah but we're trying to crack the secrets of the universe here

#

how to make millions using nothing but a wallet full of flies

#

Nah

tulip oracle
#

no lol

warm sleet
#

Have you paid any attention in the last 5 minutes?

#

Then I cannot help you further

#

You use an API for this kind of stuff.

#

Some of them, yeah... require paying for it

hollow basalt
#

Then I cannot help you further

warm sleet
hollow basalt
#

not try to machine-learn-render their graphs
@warm sleet did someone actually wants to get the data from the graphs?

warm sleet
#

@nocturne galleon what you described, sounds like Scraping

#

Its a crude form of reading data from a page

#

without an API

#

scraping of images.... IMPOSSIBRUUU

hollow basalt
#

check beautiful soup

#

python with their weird naming combinations

dusty ermine
#

ya

tulip oracle
#

but he said machine learning ๐Ÿ™ƒ

hollow basalt
#

next library would be tasty woman

#

oh wait that's not weird

warm sleet
#

@tulip oracle yes. There are efforts using machine learning and computer vision that attempt to identify and extract information from web pages by interpreting pages visually as a human being might.[4]

#

but trying to scrap stock exchange data off a rendered graph

#

what if its about millions of dollars

#

1 pixel difference, rip 100k

hollow basalt
#

Possible but might require tons of effort

#

1 pixel difference, rip 100k
this tbh

#

any margin of error is money burned

#

๐Ÿ’ธ

warm sleet
#

Yes, so you NEED accurate data

tulip oracle
#

A slight deviation in output from a neural network. gg your savings

warm sleet
#

kk

hollow basalt
#

oh it got yeeted

#

@warm sleet looks like the guy is kicked?

warm sleet
#

@hollow basalt cavalry was notified for cleanup

hollow basalt
warm sleet
#

since the original messages were still there, and not deleted

hollow basalt
#

cavalry has arrived

#

the guy is gone

#

lels

warm sleet
#

better trade some more stocks

#

hrhrhr

hollow basalt
warm sleet
#

@hollow basalt any luck on the ac3 yet?

hollow basalt
#

not yet available

#

probably gonna go newegg now

prime bough
reef tangle
#

Anyone know python that can help me?

spring pond
#

what do you need help with?

reef tangle
#

Ill dm you

round dome
#

yikes

hollow basalt
#

Smooth

dusty moss
#

I know a little bit of python, but I'm not super well versed

exotic python
#

@reef tangle i will help to the best of my ability

reef tangle
#

@exotic python

nocturne crypt
#

i love tab errors