#development

1 messages · Page 72 of 1

fleet geyser
#

oh yeah, GPL shit

warm sleet
#

You can lock it down however you want

fleet geyser
#

well then i'll make it open source

#

without my programs

#

xd

warm sleet
#

and then have a management app in chromeOS

#

you can install debian packages on that

fleet geyser
#

i planned already everything out

#

i know what i'm doing hahaha

spring pond
#

i dont mean to call you out, but your timeline is very unrealistic

fleet geyser
#

i'm not planning on creating full fledged custom distro, just a freaking ubuntu with Plasma KDE and custom theme and my programs

#

thats all

spring pond
#

why do you need a custom theme tho

fleet geyser
#

nah that will be the last

spring pond
#

i understand security tweaks

fleet geyser
#

i want to make it more intutive

#

or i might just take

#

existing theme

#

and put my logo on start

#

😂

#

probably

spring pond
#

yeah you could do that

fleet geyser
#

xd

spring pond
#

it would be a lot easier

fleet geyser
#

true

#

but i have a designer

#

in team

#

so

#

thats covered

#

i'll probably

#

just take existing theme

#

and put my logo

spring pond
#

for right now just focus on your infrastructure

fleet geyser
#

yeah i know

#

fuck the theme

#

🤣

#

i'll also probably be able to test it in school enviroment

#

AKA in my school

#

for beta testing

#

i imagine there will be a lot of bugs

#

lol

#

the thing is i don't have a real deadline

#

and i'm working on few other projects

#

so its not TOP TOP priority

#

basiclly what i'll do is take Ubuntu Desktop, put Plasma KDE take some theme put my logo, install my programs and be done

#

i think thats reasonable

warm sleet
#

I think visual flare is less important during this phase

fleet geyser
#

i'll do the theme at the end

warm sleet
#

then why are you talking about it now? xD

fleet geyser
#

because.....

#

my hands are going too fast

#

the same with HDDs

#

their capacity is increasing

#

but their speed is same

#

lol

warm sleet
#

I see. Good Coffee™️

fleet geyser
#

:rofk:

#

🤣

#

Soon TM

#

🤣

#

which OS is better in terms of how its built and made? Windows or Linux?

#

i heard EXT4 is better than NTFS

spring pond
#

personally i like linux's system more

warm sleet
#

linux is better objectively.

#

stable release cycles, runs on anything, works with anything, and its highly modular

#

windows has a lot of settings as software code

#

linux has these configurations and tuning/tweaks baked right into the machine code

#

all of these settings are done before compilation

spring pond
#

^ all of this, plus linux doesnt treat c as a second-class citizen

#

and in general programming low-level on windows is painful

warm sleet
#

@spring pond yeah couple lines of C yields a runnable program

#

and the everything is a file principle works out really well

fleet geyser
#

plus its free and you can easily modify it to suit your needs

warm sleet
#

free to modify and such yes

peak acorn
#

dare I do the funny

#

free only if you value your time.

peak acorn
#

Wsl on the other hand, perfect as soon as you install it

warm sleet
#

Wsl is a mess

zinc rain
#

So here we can talk about code?

hollow basalt
#

no, we talk about cats

naive terrace
#

but what if the cats can do code? 🤔

peak acorn
#

ive never had an actual problem with wsl for what I do

#

which tbf is pretty much just building java python and c stuff

naive terrace
#

I saw somewhere there's no write caching

#

or some sort of cache anyway and disk I/O is slooooow

peak acorn
#

For me that isnt really a problem for the reasons above

#

Even if i read and write to disk its not large enough to matter

dim lava
#

2 I've never had any issues with, because it's just a virtual machine basically.

warm sleet
#

I tried both

#

and gave up

#

last time I tried it was a year ago

#

it works sort of

#

but I just use my linux laptop, much easier.

#

feels wrong to run a linux vm on windows

peak acorn
#

idk if i have always used wsl2 or if i switched at some point

#

but ive never had a problem

proper saddle
#

I've only used it to ssh into my home server. So really can't comment on it.

eager grail
#

has anyone used treehouse to learn anything?

midnight wind
#

no

peak acorn
#

whats th at haha

dim lava
#

I am a firm believer in learning-by-doing, and more importantly, leaning by trial by fire.

#

Coding "bootcamps" imo just throw three thousand different things about a language "oh look this is cool!" without ever showing you how to use it, or how to think for yourself how to connect things together.

#

I think it's far more valuable to just run through a few quick tutorials on how to use the basics of a language, then try to make something in that language. You will invariably immediately run into problems and things you don't know, so that's when you start using Google to search for how you might solve X issue

#

Now, I KNOW that you can learn a lot of bad practices in this way, especially with older languages like C++ with LOTS of footguns in which you can shoot yourself in. But IMO, building the skills of how to have an idea, design a solution, translate problems into Google queries, and piece all the parts together is FAR more important and useful than knowing the syntax and best practices of a language. Best practices can always be learned later.

#

ok, rant over from such a simple question lol.

warm sleet
#

@last ingot performance issues.
I also had issues with some of the block device tools

#

low level kernel functions do not work, or are not fully implemented

#

disk partitioning tools on WSL? forget it.

hollow basalt
#

now I'm thinking if WSL implemented the random

#

do they?

hollow basalt
#

ok

warm sleet
#

@last ingot If I need a linux environment, I just use my laptop

#

even when working on my desktop, I can just use ssh

#

installing a VM just to be able to use linux tools on windows is so backwards

rapid sable
#

Hey guys

#

Supp

#

I'm here to ask
Is there anyone can explain what is compiler and the relation between the compiler and the assembly and the complicated programming language ( i already know something but I'm making sure that it's clear for me
I google'd it but I'm kinda out of mana)

spring pond
#

the compiler turns source code into assembly code which is then assembled and linked with any other libraries into an executable

#

im describing the c++ compiler but other low-level languages work similarly

rapid sable
#

thx .
but
i meant the full process

#

and ik that every high level language has it own compiler but what is the full process that happening to the high level language to make it assembly then machine language

warm sleet
#

@rapid sable compiler theory is a lot more complicated

#

@rapid sable the first compilers were written in assembly

#

back then they would be called macro assemblers

#

C compilers these days are self hosting. Meaning the compiler for C, is written in C.

#

@rapid sable the compiler outputs an ELF format. Which can then be used by a linker to link memory addresses of system calls to the program

#

functions like malloc() that are provided by the operating system may not always be in the same memory location

#

a simple statement like x + 1 is relatively simple in machine code

#

x is loaded from memory into a special purpose register

#

1 is then loaded into another special purpose register

#

and the add opcode is used to add these two registers together

#

the output is then read from the register and written to memory somewhere

#

the opcodes, registers and such are different between different processor architectures

#

thats why compilers were invented in the first place.

#

A program written in C, can be compiled for a wide range of architectures

warm sleet
#

Certain languages like Java and .NET use an intermediate language

#

Other languages like python and javascript are interpreted. but people have written compilers for these as well

#

Compilers themselves usually follow a similair architecture

#

Compilers build an abstract syntax tree

#

the compiler then generates assembly for each block

#

There's various steps involved in this

#

I've only ever written a compiler for a custom language extension to CSS

#

but its similar

#

ANTLR is a parser generator

#

You provide it with the grammar of your language, and it generates a parser and classes that represent your AST

dim lava
#

That's a nice website

warm sleet
#

@dim lava quite a few modern query languages have been built with ANTLR

#

you can just get the grammar file for ANSI SQL

#

and start modifying it

dim lava
#

love it

warm sleet
#

@dim lava lemme see if I can find some example code I had

prisma mesa
#

Hey im need to make some homework for school. Im currently working on a project in processing and are only allowed to use methodes. Is there someone who can help me 😄

#

DMs are open if you can help me

warm sleet
#

@prisma mesa paste your code

#

put this before and after: ```

urban flint
nocturne galleon
#

hello, i have used wix for 8 months, still got no idea what im doing, and have restarted projects like 30 times - im slowly figuring it out

my main question is tho, i have lots of people saying "eww, wix, why not <insert_name_here> instead?!!"

so today decided to google trends some heavy hitters and uh, should i actually NOT be using Wix?

my use case is : store, forum, downloads, chat, support, blog posts

my biggest issue is that wix doesn't offer "automatic key delivery" on products, for example if i was selling digital copies of something and needed to give a customer a product code, wix doesn't seem to allow this delivery method, unless you make it a file, but then that's a single file for all orders, instead of unique

which has me actually looking at alternatives

I have used "shoppy.gg" as my method of automatic key delivery, and ill be honest with you, its a free platform that does everything i need, and some things i want

but im looking for that ultimate soluotion of automatic delivery, drag and drop editor, RESPONSIVE (wix is ungodly unresponsive) and seemingly lowcost

#

would anyone know if squarespace allows automatic delivery, or shopify? maybe there's another site

warm sleet
#

there exist a whole myriad of these solutions

#

a turnkey solution for them, is often more difficult. and will require either some integration or programming to deploy

#

Another often overlooked webstore platform is Magento

placid flare
#

This falls under Development right?

So this exists hidden within the latest "Alpha Skip Ahead" Xbox Insider OS Build.

https://twitter.com/PH96_Official/status/1372963232911142918?s=19

(1 of 4)

It appears that @Microsoft is preparing to replace the traditional #edge browser on #XboxOne with the new #Chromium based version.

However when attempting to force boot into it on a Base Xbox One it freezes (on the screen seen in the photo below)

hazy salmon
#

Hey y'all, is anyone familiar with spark?
What would be the fastest way to get adjacent cells to do a reduce on?

So for example I have data like this:
((coordx, coordy), Key: Value)
The data is in a grid and I want to get the sum of values of a key from all surrounding coords of coordx and coordy.

naive terrace
#

not sure I quite understand that data layout.. is that a tuple or something?

#

or is there a key/value for each coord?

sharp thicket
real shell
#

should i use compound views in android instead of one big xml file ? i currently building a product listing details page

silent eagle
#

Any minecraft modder who would like to team up on new modpack for modern minecraft version ? after the caves update ?

#

dm me

ruby aurora
#

Hello, 👋 Does anybody how do I check if an instance, from a specific class in C++?

spring pond
ruby aurora
spring pond
#

can you give me a code snippet of what you're trying to do

ruby aurora
#

template<typename Dog, typename T>
inline bool instanceof(const T*) {
return std::is_base_of<Dog, T>::value;
}

int main(){
Dog viv;
Chiguagua tom;
Chiguagua lun;
Rodwaller nek;

viv.setDogName("Viviana");
tom.setDogName("Luna");
lun.setDogName("Tom");
nek.setDogName("Neko");

std::list<Dog> allAnimals;

allAnimals.push_front(viv);
allAnimals.push_front(tom);
allAnimals.push_front(lun);
allAnimals.push_front(nek);

std::list<Dog>::iterator it;

for (it = allAnimals.begin(); it != allAnimals.end(); it++)
{
    if (instanceof(it))
    {
        /* code */
    }
    
}

}

#

Is a assignment about polymorphism, so I'm trying to check if the instance in the list is from a specific class.

spring pond
#

formatting

template<typename Dog, typename T>
inline bool instanceof(const T) {
    return std::is_base_of<Dog, T>::value;
}

int main(){
    Dog viv;
    Chiguagua tom;
    Chiguagua lun;
    Rodwaller nek;

    viv.setDogName("Viviana");
    tom.setDogName("Luna");
    lun.setDogName("Tom");
    nek.setDogName("Neko");

    std::list<Dog> allAnimals;

    allAnimals.push_front(viv);
    allAnimals.push_front(tom);
    allAnimals.push_front(lun);
    allAnimals.push_front(nek);

    std::list<Dog>::iterator it;

    for (it = allAnimals.begin(); it != allAnimals.end(); it++)
    {
        if (instanceof(it))
        {
            / code */
        }

    }
}
#

@ruby aurora if you're allowed to use pointers im dumb you can use regular objects too you could try dynamic casting all of the objects to dog and checking its success

#

that would work for both members and derivations of the class

#

actually it looks like you can use regular objects too

ruby aurora
#

Ok, Thanks! I will try it out

junior path
#

hello

#

try:
main2 = WebDriverWait(driver, 120).until(
EC.presence_of_element_located((By.XPATH, ".//body[@id='tinymce']")))
print(main2.text)
desc = driver.find_element_by_xpath(".//body[@id='tinymice']")

#

some1 knows why this give me a stale element error ?

#

this is right after opening a new tab

fleet geyser
#

Somebody knows why this isn't working?

function findOne(queryObject) {
    let l;
    MongoClient.connect(url, function (err, db) {
        if(err) throw err;
        const appStoreDB = db.db(appStoreDBName);
        appStoreDB.collection('applications').findOne(queryObject, function (err, result) {
            if(err) throw err;
            //debug.log(result);
            this.l = result;
            db.close();
        });
    });
    return l;
}
#

It doesn't return result value, it returns undefined

warm sleet
#

that's not how callbacks work

fleet geyser
#

wdym?

warm sleet
#

findOne returns before the code you called has even executed

#

its asynchronous

#

welcome to javascript.

fleet geyser
#

oh

#

i never knew exactly what async means aghahgagag

midnight wind
fleet geyser
#

welp, then how can i make it work?

midnight wind
#

I like to use async

warm sleet
#

@midnight wind he's passing functions into the client

#

they are called once the result has been fetched from the db

#

but it doesnt block the method

#

your current execution context will just go to the next line, and do return l;

#

which is still undefined at that point

fleet geyser
#

i see

midnight wind
#

callback functions are passed in the function defenition whatever it's called

warm sleet
#

that's what promises are for

#

you return a promise

fleet geyser
#

oh

#

so

warm sleet
#

I prefer coding in typescript

midnight wind
#

like

    callback;
}```?
warm sleet
#

@midnight wind yeah, usually

midnight wind
#

yeah that's my understanding

warm sleet
#

you can do await though I dont know so much about the javascript specifics

#

I prefer using typescript

#

because it takes care of most of the nuisances when it comes to writing async code

#

await someFunctionCall()

#

will block execution until a promise is resolveable

midnight wind
warm sleet
#
function resolveAfter2Seconds(x) {
  return new Promise(resolve => {
    setTimeout(() => {
      resolve(x);
    }, 2000);
  });
}

async function f1() {
  var x = await resolveAfter2Seconds(10);
  console.log(x); // 10
}

f1();
#

your database call can return a promise

#

which you should, because the nature of the library expects this

midnight wind
#

global await has been proposed but not implemented

fleet geyser
#
async function findOne(queryObject) {
    let l;
    MongoClient.connect(url, function (err, db) {
        if(err) throw err;
        const appStoreDB = db.db(appStoreDBName);
        appStoreDB.collection('applications').findOne(queryObject, function (err, result) {
            if(err) throw err;
            //debug.log(result);
            this.l = result;
            db.close();
        });
    });
    return l;
}
#

this?

warm sleet
#

not quite

midnight wind
fleet geyser
#

i know

#

but where

midnight wind
#

await, waits for it to do things

fleet geyser
#

should i put it?

#

wherever is do

#

it throws an error

midnight wind
#

instead of a promise

#

you also need try, catch blocks

warm sleet
#

no he doesnt

#

same function will be called

#

@fleet geyser remove the l variable

#

@fleet geyser and inside your inner function you return a promise

#

mark your function as async

fleet geyser
#

okay i already did that

warm sleet
#

might actually not be the right way to do it in js

#

Im so used to TS

#

functional programming breaks my brain ;-;

midnight wind
#
async function findOne(queryObject) {
    var l;
    try{
       client = MongoClient.connect(url);
       db = client.db(appStoreDBName);
       l = await db.collection('applications').findOne(queryObject);          
    }
    catch(e){
       throw e;
    }
    finally{
      db.close();
      return l;
    }
}```
#

shouldn't this work?

warm sleet
#

this isnt java

midnight wind
#

?

fleet geyser
#

no it doesn't work

warm sleet
#
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/";

MongoClient.connect(url, function(err, db) {
  if (err) throw err;
  var dbo = db.db("mydb");
  var myquery = { address: /^O/ };
  dbo.collection("customers").deleteMany(myquery, function(err, obj) {
    if (err) throw err;
    console.log(obj.result.n + " document(s) deleted");
    db.close();
  });
});
#

you just check if err is set or not

#

no try catch

fleet geyser
#

yeah

#

if its null then there's no error

#

if it isn't null then therei s

#

if experienced dev can't solve this then idk how i should LOL

warm sleet
#

@fleet geyser the idea is instead of returning a value, you pass a function which you call once it has resolved the database information

#

promises do it the other way around

#

my js knowledge is serviceable at best

#

typescript is just easier

fleet geyser
#

i could always switch to it LOL

warm sleet
#
const myAsynFunction = async (url: string): Promise<T> => {
    const { data } = await fetch(url)
    return data
}

const immediatelyResolvedPromise = (url: string) => {
    const resultPromise = new Promise((resolve, reject) => {
        resolve(fetch(url))
    })
    return  resultPromise
}
#

typescript promises ^

#

@fleet geyser might be a good idea to try and learn js async before you do this

#

@fleet geyser what you need to get your head around is that javascript doesnt have a threading model you can influence

#

everything is asynchronous

#

if a function you call, does something asynchronously, your code that calls it can either, also be asynchronous

#

or

#

await a function call

#

it will halt, and continue execution once the other callbacks have returned

fleet geyser
#
async function findOne(queryObject) {
    MongoClient.connect(url, function (err, db) {
        if(err) throw err;
        const appStoreDB = db.db(appStoreDBName);
        appStoreDB.collection('applications').findOne(queryObject, function (err, result) {
            if(err) throw err;
            //debug.log(result);
            db.close();
            return result;
        });
    });
}

where here should i put await?

#

i'm making an app store for SchoolOS using Electron

#

Xd

#

can't i just put an await

#

?

warm sleet
#

ok so

#

from what I gather here

fleet geyser
#

whereever i put it, it says: await can only be used in an async function

#

but that function is async

#

so why it throws that error?

midnight wind
#

you created a callback function inside Monoclient.connect

#

that's not async

fleet geyser
#

oh yeah

warm sleet
#
const db = await MongoClient.connect(url);
const collection = db.collection("MyCollection");
const result = await collection.find(query).toArray();
return result;
#

something like this might do

#

if you put this inside a method

#

make sure you mark it as async

midnight wind
#

yeah

fleet geyser
#

yeah i figured it out

midnight wind
#

but I always thought you should have try, catch

warm sleet
#

this is just happy flow rn

fleet geyser
#
async function findOne(queryObject) {
    await MongoClient.connect(url, async function (err, db) {
        if(err) throw err;
        const appStoreDB = await db.db(appStoreDBName);
        await appStoreDB.collection('applications').findOne(queryObject, function (err, result) {
            if(err) throw err;
            //debug.log(result);
            db.close();
            return result;
        });
    });
}
#

so something like this?

warm sleet
#

stop nesting.

#

you dont need nesting

#

you are using await

#

it resolves the result if you do await

#

you don't need to pass a function like that

midnight wind
#

yeah the whole point is so you don't need callbacks

fleet geyser
#

ah alright

#

i started learning JS like 4 days ago

warm sleet
#

javascript is pure cancer

#

sorry to say

#

the entire ecosystem and language is a bit of a mess

#

its just a bunch of hippie web developers pushing it very hard

#

and its being used everywhere now

fleet geyser
#

dang

#

xd

warm sleet
#

@fleet geyser if it is just for fun

#

try typescript

fleet geyser
#

well kinda

warm sleet
#

it works with anything that runs with javascript

fleet geyser
#

it isn't just for fun

warm sleet
#

the language is kinda smoother to use

fleet geyser
#

so if i just change file name from .js to .ts

warm sleet
#

you can create objects more easily

fleet geyser
#

it will work?

warm sleet
#

typescript syntax is a bit different

#

but its better documented

midnight wind
#

doesn't it compile to js?

warm sleet
#

yes it does

#

it transpiles to javascript

#

@midnight wind I didnt know jack about javascript

#

but my final project to graduate was at this one ecommerce company I got an internship at

#

just before the pandemic

#

and in 2 weeks I learned typescript, and set up a complicated project with it, using various language tools and concepts

#

typescript has types

#

which means, you get compiler awareness and enhanced error detection

#

@fleet geyser what program are you using to write ?

#

I assume visual studio code?

#

typescript works brilliantly with it

#

all you need is the ts-node and a ts-config.json

#

one is the compiler and the other is the settings for the compiler

#

I can give you some template files

#

hold on

#

I use webstorm personally

fleet geyser
#

No

#

I use WebStorm too

#

🤣

warm sleet
#

but thats cus I am a slave to jetbrains, I just love their IDE's

fleet geyser
#

Yeah me too, I have everything in Toolbox

#

So its just easier agagaghahaa

#

And I prefer WebStorm over VSC, cuz it has better Tab Space suggestions agaghaghahg

warm sleet
#

done stuff like this in typescript

#
import m from "mithril"
import render from "mithril-node-render"
import { UmbracoClient } from "umb-template-common/dist/heartcore"
import { defaultPath } from "umb-template-common/dist/default"

export const renderComponent = async <T>(component, content: T, client: UmbracoClient) =>
  ({
    rendered: await render({ view: v => m(component, { content }) }),
    content: {...content, culture: client.getCulture(), project: client.getProject(), root: defaultPath }
  })
#

I used mithril, a single page application framework

fleet geyser
#

I'm using Electron

warm sleet
#

but I wired my own tools around it

fleet geyser
#

which is installed using Node JS and NPM

warm sleet
#

to work with a headless CMS called Umbraco Heartcore

#

with built in webserver

#

and schema synchronization

fleet geyser
#

So shouldn't I use:
const electron = require('something);

warm sleet
#

url routing

fleet geyser
#

instead of import?

warm sleet
#

@fleet geyser yeah modules in typescript are slightly different

#

you have namespaces

fleet geyser
#

u

#

h

#

i mean, this isn't just for fun so i don't have that much time to learn new things every time

warm sleet
#

just run

#

npm install -g typescript

#

language is almost identical

#

oh well

fleet geyser
#

i think you were the one who critized me when i talked here about creating eschool solution

warm sleet
#

app.ts:

#
//Prepare webserver
const app = express()
const port = 3000
app.use(session({
  cookie: {maxAge: 86400000},
  store: new (MemoryStore(session))({ checkPeriod: 86400000 }),
  saveUninitialized: true,
  resave: false,
  secret: "super secret",
  genid: req => v4(),
}))

//Prepare router
const router = new UmbracoRouter(app, getClient, "/home")
globalThis.sessions = Map

//Create template engine context
const hbs = exphbs.create({ extname: "hbs", helpers: { json: x => new hbs.handlebars.SafeString(JSON.stringify(x)) } })
app.set("view engine", "handlebars")
app.set("views", path.join(__dirname, "/../src/view"))
app.engine("handlebars", hbs.engine)

//Expose static application files
app.use(express.static("src/public/"))
app.use("/dist", express.static("dist/"))

//Begin application code for umbraco routed types
registerRoutes(router)

app.listen(port, () => console.log(`server is listening on ${port}`))
#

app.ts is equivalent to your index.js

fleet geyser
#

when i did npm init

#

i put the main file to be main.js

warm sleet
#

yeah

fleet geyser
#

not index.js default

warm sleet
#

yeah you can choose that

#

I just have

#
{
  "name": "umb-template-client",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "ts-node src/app.ts",
    "build:webpack": "webpack --mode=production",
    "watch:webpack": "webpack --mode=development --watch"
  },
...
#

in my package json

fleet geyser
#

right now i have a problem with the fix you suggested up there:

async function findOne(queryObject) {
    const appStoreDB = await MongoClient.connect(url);
    return await appStoreDB.collection('applications').findOne(queryObject).toArray();
}

when i put await before MongoClient.... it says .collection method doesn't exist

midnight wind
#

that's what I do

fleet geyser
#

wdym?

midnight wind
#

and set a breakpoint

#

so you can inspect the value of appStoreDB

fleet geyser
#

i know .collection method is in that variable/class

warm sleet
#

object.

#

these are all objects

fleet geyser
#

ah alright

#

or not

warm sleet
#

yeah then its undefined

fleet geyser
warm sleet
#

no you're doing it wrong

#

@fleet geyser collection doesnt return a promise

#

do you do that on a seperate line

gray flume
warm sleet
#

collection isnt async

#

@gray flume that document isnt helpful

#

I read that one already

#

it just uses callbacks

fleet geyser
#
async function findOne(queryObject) {
    const appStoreDB = await MongoClient.connect(url);
    const applicationsCollection = appStoreDB.collection('applications');
    const result = applicationsCollection.findOne(queryObject);
    return result;
}

it still says .collection doesn't exist

warm sleet
#

put a breakpoint on the 2nd line in the method

#

see what appstoredb holds

#

this right here, this is why I hate javascript

#

because every single library has their own way of doing things

#

and its always a mess

fleet geyser
#

something like this?

warm sleet
#

yes

gray flume
#

Yeah, then run it so you can inspect the appStoreDB variable's contents

#

@warm sleet Lol, the problem with JS is it's low barrier of entry & rapid growth of the Node ecosystem that lead to tons of scattering and low-quality OSS.

warm sleet
#

@gray flume at least java is hard enough to keep the skids out the door

#

🤣

fleet geyser
#

agaghaahgahga

warm sleet
#

people complain about its verbosity

fleet geyser
#

lol

warm sleet
#

but its nice

#

and boilerplate is just poor design.

fleet geyser
warm sleet
#

@fleet geyser click on the green bug next to the run button

#

program will halt at that point

gray flume
#

Types are great and everyone that disagrees is masochistic IMO lol

fleet geyser
#

I use terminal to run the program

hollow basalt
#

Inb4 assembly types

fleet geyser
#

npm start

warm sleet
#

@gray flume you can always store them in Object[] where all is equal

gray flume
#

Oh god please no ;_;

warm sleet
#

@fleet geyser click on the run configurations button at the top

#

add a new run configuration

#

select NodeJS

fleet geyser
#

i already have run configuration

warm sleet
fleet geyser
#

yeah i created it a while ago

#

but i just deafulted to npm start xd

gray flume
#

Yeah, so use that to run your application

warm sleet
#

run it with debugging enabled

#

it will break at that point

#

@gray flume ever tried debugging php?

#

their methods have side effects :D

gray flume
#

Haha, as a Java dev, you're probably going to hate this, but: I'm primarily a PHP dev 😛

fleet geyser
#

lol

warm sleet
#

@gray flume I've done my share of PHP

gray flume
#

What do you mean with side-effects? 😆

fleet geyser
warm sleet
#

just, json_decode

fleet geyser
warm sleet
#

the get last error

#

like, there's so many things in the language that are flaky

gray flume
#

Ahh, right.. yeah, those methods are ugh

fleet geyser
#

i don't like PHP

#

their methods are ugh

#

xd

#

like you said

gray flume
#

I 10000% avoid using those directly, and instead use wrappers for it that 'normalize' the behaviour.. throw an exception if it's invalid like a proper language, lol.

warm sleet
gray flume
#

That said, a lot's been improving over the last 2-3 years, though.

warm sleet
#

7 years ago

#

I started coding seriously in java

#

wrote a multi server project for a roleplay server

#

provides synchronization across 7 minecraft servers, provides chat, discord integration as well as a whole bunch of custom stuff

#

supports code reloads while the game is running :3

#

classloader magic

#

oh, its minecraft btw

#

if it wasnt obvious yet

gray flume
#

Haha, yeah, Java's pretty nice in a lot of aspects

fleet geyser
#

i think i'll scrape this whole thing and make it in java

#

lol

gray flume
#

I still really really passionately hate Maven though

warm sleet
#

pffff

#

maven is great, you just lack the experience to use it

fleet geyser
#

maven is great xd

gray flume
#

It's weird in it's behaviour

#

You should just have a single package file with constraints like it has, and that should be sufficient for it to instantly gather all dependencies

warm sleet
#

its the ONLY package manager I've come across that perfectly handles modular builds

#

across a repository

gray flume
#

I don't know, maybe I've just been doing it wrong, but that's the only thing that I've really really disliked about it

warm sleet
#

@gray flume we have like 120 projects on our minecraft git server

#

and they all integrate with one another

gray flume
#

Go / Python / C / ObjectiveC / C++ etc. all do it just fine, but Maven? ugh.

warm sleet
#

dependency management is just so nice

fleet geyser
#

Java and Maven = and they lived happyly forever

warm sleet
#

maven is just poorly documented

#

and people build C++ with maven

fleet geyser
#

ugh tell me about it

warm sleet
#

maven isnt build to any one language

fleet geyser
#

Apache's docs about any of their prodcuts = sucks

hollow basalt
#

Gradle made it easier

#

Maven is steep

warm sleet
#

Gradle has one major problem

gray flume
#

Yeah, I know, but it's the only I had to use with Java 😛

warm sleet
#

its SLOW. SLOW af.

hollow basalt
warm sleet
#

@gray flume I just have a master POM

#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.knockturnmc</groupId>
    <artifactId>knockturn</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Knockturn</name>
    <description>Core plugins of KnockturnMC</description>

    <modules>
        <module>core-api</module>
        <module>knockturn-chat</module>
        <module>knockturn-core</module>
        <module>knockturn-proxy</module>
        <module>service-api</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
gray flume
#

Yeahs, that should definitely be sufficient

warm sleet
#

and your individual modules then have two choices

#

they can either inherit the pom from their parent

#

or use their own

gray flume
#

but for some reason, whenever I tell VS or whatever to install modules, it sometimes installs them but still doesn't compile due to missing references or some garbage

#

and then sometimes when you remove them, your IDE just goes "ya now i got them" and you basically go WTF

#

and then as you manually install/link it because 'fuck it just compile already' it just corrupts the everything and I'm just done with it all lol

warm sleet
#

@gray flume you run mvn clean package -U

#

-U forces a refresh of the dependency cache

gray flume
#

Yeah, I mean, like I said, I'm probably just doing it wrong
Either that or everyone else is doing it wrong

warm sleet
#

I had this odd issue before

#

where the IDE was using a different directory for the maven modules

gray flume
#

and the odds of that being true is like, non-existent 😛

warm sleet
#

and then you run into all kinds of strange behaviors

#

where it compiles

#

but IDE be like: cant find library

gray flume
#

Hehe, well, next time I need to compile a Java project and can't get it running, I'll let you know

warm sleet
#

oh. seems the other guys who help me maintain it now, went for java 1.14

#

interesting

#

I dont have that compiler

gray flume
#

Until that time, I'm fine maintaining my own OSS projects, as that's already eating up enough of my time 🙂

warm sleet
#

@gray flume if you ever need some help with maven xD

#

you have but to ask

#

I've been using it for a long time now

gray flume
# fleet geyser hm

Seems to me like your runtime can't locate your requirements/dependencies for some reason? Or does your app do this when running it normally too?

warm sleet
#

deploying binaries with maven is also very easy, you just do mvn deploy

fleet geyser
gray flume
#

With PHP it's even easier: you just tag the release and packagist.org picks it up 😎

warm sleet
#

ew

#

cloud

#

I dont do much OSS

#

I use a lot of OSS

#

and create issues

#

xD

gray flume
# fleet geyser when i use `npm start` it works just fine

Yeah, so, what if you try to instead return a custom object so you can see what's in the appStoreDB object? Or something like console.log(typeof appStoreDB, appStoreDB) and see what you get? My bet's your get object and null or undefined twice.

gray flume
warm sleet
#

most asked question on stackoverflow:
guys I have some problem
<insert long convoluted explanation and a snippet of code
*> undefined

#

same with the java section on SO

gray flume
#

OSS Q&A is terrible haha

warm sleet
#

bunch of people trying to sell their NullPointerExceptions

#

@gray flume sometimes its useful because people include examples

#

so I try to derive some understanding from it

gray flume
#

Yeah, I mean, it's not all bad

warm sleet
#

just copy pasting from SO and expecting it to work, is not the way

gray flume
#

it's still people investing their time into answering random questions

#

but, some to most of the questions are just stupid

warm sleet
#

that's what filters are for

#

you weed out the bad

#

if its a question many have had

#

there's usually an upvoted thread

gray flume
#

Yeah, I know 😛

#

Again, OSS is my job 😆

warm sleet
#

if it shows results: 0

#

you have some digging to do

#

@gray flume I recently wrote a software generator for this one company

#

it built a stub application for a mithril project that used Umbraco as headless CMS

#

its interesting what is possible with node. I could do pre-rendering on the server

gray flume
#

Yeah, SSR is pretty cool

warm sleet
#

and then return a document, mount it on the client. And you have near-instant load times

#

any further pageclick you do

#

is directly from the Azure CDN

#

it only loads snippets of js from the application server

#

never used webpack before, but its neat

gray flume
#

Yeah, it's a decent way to pack up your application

warm sleet
#

@gray flume the entire page structure of umbraco was based on urls

gray flume
#

same thing with 'code splitting'.. it's a bit more difficult, but it really allows for creating load-as-you-need js files automatically

warm sleet
#

so I customized the router from mithril to work with the CDN directly

#

the CDN returns a document for a given URL

#

I then look at the type, and select the right controller/view to render

#

including all the fancy multilingual support that you need on the web

gray flume
#

Lol, why not just generate it as a static site?

#

Way easier than all that hacking

warm sleet
#

because the company builds webstores

#

with dynamic configurators

gray flume
#

Ah, I see..

#

Yeah okay, that kind of beats the point

warm sleet
#

they use mithril as their framework for building the pages

#

their current stack is MVC (ASP.NET)

#

with mithril bolted onto it

#

they have a microservice to do the prendering, its a mess

#

this just builds it into a single instance, that can be scaled up easily

gray flume
#

Yeah, I don't really like Mithril 😛

warm sleet
#

with typescript

#

its pure magic

#

because you can write TSX

#

hyperscript

gray flume
#

Yeah, I get it, but, like, you still have to write an API to feed your page data

#

Sure, you can use SSR to pre-render it, but for all other calls you still need your API

warm sleet
#

@gray flume you dont :D

#

this was in a corporate setting

#

using this ^

#

Its a CMS

#

with a rest and graphql api

#

the client was built into the page routing

#

and view logic

#

so in the local scope you always have the right language settings

#

and can immediately start fetching data

gray flume
#

I don't think I'm following

#

in your client-side Mithril.js app, you still need to fetch data from an API, right?

warm sleet
#

@gray flume I built an MVC structure with this, using umbraco for routing

#

@gray flume ye, it uses the umbraco api

gray flume
#

Yeah, exactly

warm sleet
#

yeah but that is built into the page routing itself

gray flume
#

Well, okay, so, maybe you don't need to maintain the api then because they do it for you

warm sleet
#

so when you load /home/about

gray flume
#

but you still need an API which is ugh

warm sleet
#

that url returns a document

#

which you can then use to dress your html

gray flume
#

Ah, right.. it recognizes teh request is not a regular visit and returns JSON/whatever?

warm sleet
#

yeah its json

#

I use typescript, and the graphql's schema ability to have a type reference

gray flume
#

Yeah, that's very similar to what we do in Inertia

#

pretty neat stuff

warm sleet
#

so when you write the code, you have compiler hints

#

this was pretty cool

gray flume
#

Yeah, gotcha.. that's pretty neat, yup

warm sleet
#

wrote this whole thing in 6 months

#

with 0 js experience

#

I built a Yeoman generator

gray flume
#

Inertia's pretty different.. we render a JS-app based on server-side variables, and use the server side's routing 100% of the way

warm sleet
#

so you can enter your CMS configuration

#

and it generates an entire project

#

server, spa (webpack) and a CMS client module

gray flume
#

Meaning, no state management on the client.. no need to handle sessions/redirects client-sided if you're logged out for some reason etc.

#

Anyway, time for dinner, gotta run.

warm sleet
#

@gray flume yeah I handled routing through the API from the CDN

#

I just had to do a route match to the type of the returned document

gray flume
#

Yeah, for Inertia that's not necessary 🙂 The only thing that the client-side does is rendering of state provided by the server

warm sleet
#

yeah... mithril is tiny

#

like 4KB, after it loads

#

it doesnt hit the app server at all

#

it just hits azure

#

hold on, lemme grab a pic

#

the whole reason it had to use SSR had to do with SEO

gray flume
#

Yeah, that's primarily the reason to use SSR to be honest

#

Culture = white-labelled application / house style?

warm sleet
#

@gray flume language

#

We're in europe here, so you often need a couple languages on your site

#

most basic of examples

#

@gray flume initially they wanted me to write a proof of concept application with this

#

^ this is from the research doc I wrote

#

this sparked the idea: oh I can build a framework with this.

gaunt finch
#

huge diffrerence on my improved code 😂

nocturne oyster
pliant siren
#

it's just putting the repeated code in to functions, though I would debate the wisdom of using the .table selector to assume all elements are what he's looking for.

solid plover
#

huge diffrerence on my improved code 😂
@gaunt finch we all love boilerplate code ❤️

gaunt finch
#

yet the old mess was written in a hurry and lazy way

pliant siren
#

old code is always written in a hurry, on the basis of "I'll come back and fix it later"
This never occurs.

urban flint
#

vim or emacs

rancid nimbus
#

The One that works for you.

pliant siren
velvet cedar
pliant siren
#

what's the base image, or how have you built/installed python in to it? is it FROM python:3.8 ?

#

This seems to be something that's happened before affecting nearly everyone with a broken SSL certificate. I've had the same thing with node/npm in the past too.

#

The general theme of people seeing that problem seems to be solutions such as:
`It works if I add the --no-use-pep517 option:

python3 -m pip download --no-binary=:all: --no-use-pep517 scipy==1.4.1`

#

Your productivity will take a nosedive moving to an OS you're not familiar with.

#

WSL and Docker have been a huge part of my workflow since they became commonplace. No more do I need another linux VM always there to do certain tasks, it means I can just always have a linux container available running whatever specific CLI tools I want.

#

So try it under a VM

#

If you don't have a specific reason to use one particular distro, just use Ubuntu or Ubuntu LTS.

velvet cedar
velvet cedar
#

ummmmmmmm... ubuntu and fedora are gnu/linux distributions. here is a good explanation https://www.pcmag.com/news/what-is-gnulinux

PCMAG

Open-source GNU/Linux operating systems, for all their complications and confusing nomenclature, span a universe of alternatives to Windows and macOS worth exploring.

#

saying you think Ubuntu is better than gnu/linux is like saying a 3080 is better than a graphics card

midnight wind
#

Ubuntu and fedora are Gnu/Linux

ivory bear
#

that seemed like it's "for" with the f dropped though, maybe just misspelling

rancid nimbus
#

I need a weekend project. Would anyone recommend building a Linux From Scratch system?

pliant siren
#

it's not just as simple as ./configure; make install; make bzImage anymore?

next ember
#

heyo robots

#

I'm looking for some text processing tools. My goal is to identify whenever one or more terms is present in a string (e.g. identifying if a message has the word "omelette" in it).
The basic thing to do is to check if message contains term, each of those brought to the same case (lower or upper)

I am looking for a library with more fuzzy logic, where, for example: if I'm looking for "omelette" I also get "omelete"

#

I've found apache lucene for java that sort of does this kind of thing, but it's a bit steep, still trying to understand it's documentation

warm sleet
#

most of these fuzzy algorithms use some form of levenstein distance calculation

#

phonetics are nice because they allow for things to be misspelled.

#

regular expressions also allow some level of fuzzyness, depending on what flags you use

rancid nimbus
# pliant siren it's not just as simple as ./configure; make install; make bzImage anymore?

I was talking About trying to build a complete system. Including everything. Building the Linux kernel is a bit different than how you described it now. You use make mrproper to make sensible defaults if you are on the target machine, make menu-config to configure the kernel, and make to build the kernel. Different kernels have different file names because of how that are compressed or not.

warm sleet
#

on debian you can use make-kpkg

#

that creates a kernel package

#

make-kpkg --rootcmd fakeroot -j 4 --initrd linux_image linux_headers

rancid nimbus
#

I don't know what make-kpkg is, but you can make a deb package by doing a make deb-pkg to make debian packages and there is something similar for rpm.

warm sleet
#

You can use this to build the distro kernel for debian and ubuntu systems

#

@pliant siren if you need an entirely custom linux environment. Take a look at buildroot https://buildroot.org/

#

Its ment for embedded linux, where you can tailor the kernel to exactly your requirements

peak acorn
#

I wonder if there is actually a typing/editing speed difference on emacs/vim/GUI editors with experienced users of the softwares

#

I have a suspicion it might actually just be super similar once you get used to it

warm sleet
#

at the end of the day its just a text editor

#

I much prefer my IDE over any other text editor

ornate kite
#

not directly related to development but does anyone know how to bypass user access control on windows

hollow basalt
midnight wind
#

wut

warm sleet
#

@rancid nimbus wat?

#

hacking isnt illegal

empty sentinel
#

It is in the United States. Additionally, this server is partnered and must uphold the Discord ToS.

midnight wind
#

it's accessing systems unauthorized that is illegal

#

tbh hacking is a very broad term

empty sentinel
#

Hacking in the traditional computer sense is coding. Hacking used today, falls under unauthorized access.

midnight wind
#

or penetration testers

#

they get permission from the company

empty sentinel
#

That’s authorized access.

midnight wind
#

yeah but it's still hacking

empty sentinel
#

So we’ve come to the conclusion that hacking can be legal or illegal, correct?

midnight wind
#

yeah

warm sleet
#

@empty sentinel when I modify electronics I've bought to do something that was never intended with it

#

that's defined as hacking.

#

same term lends itself to digital electronics: computers

#

Hacking something means doing something with it that the manufacturer never intended it to do

#

Breaking into systems that you do not have authorization for is called cracking.

#

cracking IS illegal.

empty sentinel
#

I mean, if we really want to go into the muddy details, no, hacking doesn't necessarily lend itself to computers. I can hack something together (cobble something together), or I can hack away at a log.

warm sleet
#

before we called it hacking

#

they called it Phreaking

empty sentinel
#

cyber security can invent all kinds of words to detail the exact specifics of a type of access. But to the general populace, there's no need to go in to that much specific detail.

warm sleet
#

@empty sentinel no, this is historical.

#

Free phone calls were done by the technology freaks

#

calling it Phreaking, the ph for phone.

#

Hacking as a word lends itself as a derivation on phone hacking

empty sentinel
#

https://en.wikipedia.org/wiki/Jargon "Jargon is normally employed in a particular communicative context and may not be well understood outside that context."

Jargon is the specialized terminology associated with a particular field or area of activity. Jargon is normally employed in a particular communicative context and may not be well understood outside that context. The context is usually a particular occupation (that is, a certain trade, profession, vernacular or academic field), but any ingroup c...

warm sleet
#

Hacking isnt jargon anymore.

#

Its a formal word. though I wouldnt use that when you ever go to testify

#

I would call myself an offensive security researcher.

empty sentinel
#

It's the word known to the general populace for "unauthorized access". I agree that using the term in a courtroom, where specific meaning and details are very important.

warm sleet
#

@empty sentinel congress doesnt understand the word "Backdoor"

empty sentinel
#

lol. No they do not. It's hilarious how badly they don't understand that word.

warm sleet
#

This is worth a watch ^

#

Linus Torvalds' dad is testifying there

#

and he educated the room on software models.

#

@empty sentinel I like how shady the NSA is. Because they all try to find out if IF the NSA did anything at all 🤣

#

This user summed it up pretty well

What would happen if the linus allowed backdoors in Linux:
1. Someone would find it
2. They would fix it and push it back to the official repository
3. If Linus refuses, then someone would just fork linux and fix the bug and then we would have the Linux kernel and some other forked kernel like LibreLinux of SafeLinux, or some other stupid shit.

Basically it's in nobody's interest except the NSA's.
empty sentinel
#

That's the way it should be. To be honest, I consider the NSA's back door access to be "unauthorized" and find no authorization for it in the constitution of the United States. But I think I'm getting in to politics here, so that's all I'll say on the matter.

warm sleet
#

@empty sentinel I think it has more to do with the people asking the questions

#

when this lady asks what the difference is between "direct unfetted access" and "indirected fetted access"

#

just shows how clueless she really is.

#

digital incompetence runs strong with politicians

empty sentinel
#

I love how Microsoft representative lied under oath to congress.

#

(It's not a backdoor if it's put there on purpose) - Microsoft

#

Fascinating video. Thanks for sharing. 🙂

warm sleet
#

@empty sentinel its pretty old

#

but I always love watching these hearings on tech

#

because it shows the disconnect between the tech world and everyday life

#

to them, phones are just magic. you put facebook and whatsapp on it and it just works

#

they haven't the slightest understanding of how these systems are designed

#

I wish there would only be IT professionals instead of these lawyers

empty sentinel
#

Just install an additional door in the congressional hall, put up a movie theater line-divider thing, and tell people to not use it. Then for demonstration purposes, have any random person, at any time, walk right through it.

somber dome
#

Hey guys, nowadays I'm a bit bored. I don't have any projects going.
I was wondering if you guys had any idea on something interesting to do. Be it purely software related or with some hardware too

I have done a fully custom layout keyboard (designed the PCB myself etc), I have worked on machine learning (computer vision) and the math behind it, I have done a bit of docker/kubernetes etc, a probe that can measure ghosting on a screen etc....
If I put the time and effort into it I believe I can do some fun things, but I don't have ideas :/

#

I don't know where to ask that beside there

#

I didn't see any DIY channel

spring pond
#

try making a game engine with a low-level library like opengl

empty sentinel
#

Multicast video on your network so that if a video is streamed on your network, it is streamed only to clients that want to watch it.

#

Bonus if you can stream over the air TV like this 24/7.

#

Create a text message alert for when the dryer and/or washer is done. Bonus if you can make it very low power and you can calculate the yearly cost of running it.

#

Very difficult: Create a proximity location service so that you can locate any Bluetooth device in your home (I.e. CorewyynCell is in Living room). Engineer-tier bonus if you can do this purely through voice. (Computer! Locate wife phone! “It is in the dining room”)

hollow basalt
#
  1. Create a tracking system that monitors movement and actions of an individual
    Bonus: Change their credit score based on this
empty sentinel
#

Llloll

urban flint
#

any regex admirers here? Pretty excited about one of my most recent ones;

^(\w{3} \d{1,} \d{1,}:\d{1,}:\d{1,}) (.*?) sshd.*?: (Invalid|Connection closed|Accepted|Disconnected).*?(?:user|for) (.*?) (?:from| )? ?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) port (.*?)[ |\n](?:\[(.*?)\])?

It's for monitoring /var/log/auth.log and extracting the useful data for ssh login events

somber dome
warm sleet
#

@somber dome build something with artnet.

#

Network protocol ment for stage lighting and smart home fixtures

#

basically ^

#

This is a personal favorite of mine, I've been wanting to do something with this for some time now.. just lack of time in general

#

I've done stuff with DMX512 before, built my own controllers

#

but artnet is DMX512 over ethernet.

#

Artnet is simple enough, that you could implement a client for it yourself. Its just UDP packets

#

Like on a microcontroller with a $3 ethernet interface

somber dome
#

I'm not an artistic person, I'm more of practical one
I build my keyboard because I wanted a mechanical keyboard with the numpad on the left and I didn't find one
Same for the ghosting-probe etc

Still I'll take a look into it since my gf doesn't think like me haha

rancid nimbus
warm sleet
#

@rancid nimbus as a matter of fact, I know this quine

#

its quite cool

peak acorn
#

Quine's output their own source code right?

#

Is code like that hand written or do people write software to write quines

#

Ive been toying around in java trying to implement this data structure that in theory would be faster with insertions than arraylist, but for some reason its not. I have a feeling its due to weird deeper-level optimization stuff with memory access and whatnot. Assuming you say LinkedList's insert is worst-case linear, and usually constant. Then mine should be log(n), mine works by using arrays linked together by an arraylist, and the arrays added double the total capacity

#

Does anyone know in simple explanation why this isn't faster?

bright pilot
#

how would I connect my nodeJS backend to my solidity smart contract?

sharp bear
#

is python on higher level too or its close to c/c++

warm sleet
#

@sharp bear backend or backdoor?

#

Backend is just jargon for software that runs on servers (in the back office), as opposed to the frontoffice (perhaps a portal or website)

sharp bear
#

i dont understand. can python access memory

warm sleet
#

not natively no. But you can still create variables and read/write bytes

#

python being interpreted, means it does not have native access

sharp bear
#

one more question

warm sleet
#

@peak acorn arraylist resizes are done with System.arraycopy()

sharp bear
#

can u make apps for android,ios writen in python

warm sleet
#

nah

#

python isnt ideal for those purposes.

sharp bear
#

only java

warm sleet
#

not quite

#

Android studio uses java,
But iOS development expects you to use swift or Objective-C

#

Android can also be written in C/C++

But if you want to do easy app development on both android and iOS, might want to look into Ionic or Cordova

sharp bear
#

oo nice

#

ty

warm sleet
#

I think those use javascript, html and css

#

to build "web" apps for mobile phones

#

its similar to how discord does it

sharp bear
#

omg

warm sleet
#

This is what discord uses ^

sharp bear
#

that is what i wanted

#

make apps like facebook

warm sleet
#

facebook is trash

sharp bear
#

but app for android

#

more like twitter

warm sleet
#

@sharp bear electron is quite heavy though

sharp bear
#

i make website exp twitter and make twitter app

warm sleet
#

it basically runs an embedded version of chrome

#

with the program as a webpage inside

warm sleet
#

thats why if you press CTRL SHIFT + I in discord, you get that browser inspector as on chrome

sharp bear
#

oh yes

warm sleet
#

styling and layouts in electron is just html & CSS

sharp bear
warm sleet
#

there's more than just electron

sharp bear
#

crystal

#

i use linux

#

can i install it?

warm sleet
#

read documentation lol

#

idunno how to do this crap. I don't do app development xD

#

I do backend dev primarily

#

electron seems to be just npm

#

so you need to install nodejs

sharp bear
#

right

sweet sluice
warm sleet
#

yep

#

@sweet sluice and its also projected the future of power demand

#

if everyone starts using electron

#

by the year 2050, we'll need double the amount of power plants

#

because its the most inefficient trash that has ever to come out of the webdev ecosystem

#

if you scroll through discord chat history, your CPU will be pinned.

sweet sluice
pulsar jungle
#

Hey people, anyone have some knowledge for SAP training?
I'm considering take a training to get some job, but I wonder which training should I got, anyone can advice me?
ah yeah I am not really programmer so I don't think I am looking for programming one 🙂

peak acorn
#

Sorry i went to sleep immediately after asking my question. By memory access i meant like hardware optimization like memory caching and stuff. Since in an arraylist the data is supposed to be in a single chunk you can fit into cache but when you have a linkedList, or possibly in my case when you have an arraylist of obj[] references you dont get the benefits of caching and prefetching and whatever your entire dataset

#

That's my theory

peak acorn
warm sleet
#

@peak acorn yeah its a low level operation, takes two array pointers and copies it from A to B

#

its fastest way in java to copy array data

peak acorn
#

Is it like super super fast? Because im my mind i still think my code should be fast but its definitely slower

warm sleet
#

@peak acorn its faster than a[0] = b[0] in a loop

#

but you dont really need arraycopy that much

#

its used by ArrayList internally

#

and perhaps in some other highly optimized data structure

balmy jackal
#

Ummm so I wanted to run a cmd prompt command from a python script and was planning to run a .bat file but is there a better way to do it in the python script itself?

warm sleet
#

@balmy jackal on windows, no

#

on linux you can just a shebang #!/usr/bin/env python

last lance
#

`import discord

#Read Token
with open("token.txt","r") as text:
token = (text.read(-1))

#Client
client = discord.Client()

#Events
@client.event
async def on_ready():
general = client.get_channel(825161121149222956)
await general.send("Wassup Idiots")

@client.event
async def on_message(message):
content = message.content
if content[0] == '!':
if content == "!mango":
general = client.get_channel(825161121149222956)
await general.send("Mango")
else:
general = client.get_channel(825161121149222956)
await general.send("Invalid Command")

    `

I'm probably doing the general = client.get_channel(825161121149222956) thing wrong is there a better way to handling this without having to copy it whenever i wanna send a command

#

its a python discord api code btw

midnight wind
#

object oriented programming

last lance
#

that does not help the noob python programmer

midnight wind
#

it's hard to explain and I don't really have time rn to explain

#

maybe someone else can

hollow basalt
#

Agreed

pliant siren
peak acorn
#

what

#

oh ok escape sequences color text

hollow basalt
#

Oh ok

peak acorn
#

I didnt know what they were

#

Googled

slate flume
#

Hi I need an advice. I'm developing a c++ password manager and I want to generate TOTP for 2FA; I searched online and I found lots of libraries. Do you suggest one in particular?

honest sleet
#

Here's the last updates on the game I'm developing 😃 https://youtu.be/452Ut5P47TU

By making the main musical theme for my game (even if it's still a draft) I feel like Octahedrone's idea is shaping up and it feels more an more like an actual game. I'm not that far from being able to add the characters and story element, so I'm pretty excited about the coming steps.

Previous episodes: https://www.youtube.com/playlist?list=P...

▶ Play video
shell cliff
#

does anyone have an m1 mac and uses android studio on it? if so, what's your experience with it?

clear thistle
#

anyone here know any good forums/discord servers/resources for developing with Flutter/Dart?

shell cliff
clear thistle
#

dont take my word for it, i havent tried android studio on M1 (i dont have an M1)
but all im saying is, dont be suprised if you find out that its terrible

shell cliff
#

i think there's a precompiled binary but that doesn't mean much

clear thistle
#

from what i can gather, it mostly works, with some occasional crashes

#

however, the Android VM does not function at all, due to the lack of virtualisation supoort from apple
(ARM is also not very good for Virtualization either)

#

@shell cliff

shell cliff
#

android said they're working on virtualization

warm sleet
#

@clear thistle forget it.

#

not gonna work

#

android virtualization on PC relies on Intel HAXM

#

@shell cliff most likely not gonna work

shell cliff
warm sleet
#

So they have a new emulator

#

yeah

#

HAXM wasnt gonna cut it on arm

shell cliff
#

yea i had a feeling they weren't going to be using HAXM

warm sleet
#

@shell cliff emulating arm on arm

shell cliff
#

recursion

clear thistle
real kelp
hollow basalt
#

Anything is bad if you don't know how to stop it

topaz idol
#

hello

#

anyone can help me with running a java bot or python

rancid nimbus
#

Running one or making one? What kind of bot?

last lance
#

Am I weird for finding pythons parsing system fun

rancid nimbus
#

Have you tried building your own programming language or custom parsing system? I remember learning how programming parsing works. It it cool.

rancid nimbus
#

I made a simple CLI calculator that can parse basic math formulas. I am going to redo the parsing system some. It wasn't that hard.

pliant siren
#

That's the kind of project we give students in the first semester of University, so they learn Reverse Polish Notation.

#

It's a good way to teach queues and stacks.

clear thistle
clear thistle
ivory bear
#
BleepingComputer

In the latest software supply chain attack, the official PHP Git repository was hacked and tampered with. Yesterday, two malicious commits were pushed to the php-src Git repository maintained by the PHP team on their git.php.net server. The threat actors had signed off on these commits as if they were made by known PHP developers.

peak acorn
#

I wonder who found the security issue

warm sleet
#

probably the first person who went to push to the repository

#

and realized the hashes didnt match up

#

git is pretty secure

#

you can't just go back in history and change some commit in the past, without nobody noticing it

#

because the entire commit tree is using a hashchain/blockchain

#

In cryptography and computer science, a hash tree or Merkle tree is a tree in which every leaf node is labelled with the cryptographic hash of a data block, and every non-leaf node is labelled with the cryptographic hash of the labels of its child nodes. Hash trees allow efficient and secure verification of the contents of large data structures....

#

that top hash would be your initial commit

#

thats the only commit in your entire structure with no parent commit

peak acorn
#

Well yeah I mean changes are visible by everyone im p sure

#

but was in a php employee or some open source contributor i wonder

warm sleet
#

this kinda stuff never works

#

people will always find out

pliant siren
#

A lot of people would just go '"huh? why isn't it working? I guess I'll just --force?" :/

#

I mean, experienced developers shouldn't ... but a lot would.

jolly relic
#

Self organizing maps are neat. 👀

arctic tusk
#

is there a good speech to text or text to speech machine learning paper to implement?

warm sleet
#

@arctic tusk text to speech is science of its own

#

there's a whole myriad of papers and algorithms

#

natural language processing and such

#

usually some kind of neutral network or Markov chain logic

arctic tusk
#

Looking for using neural networks. RNN, LST, Conv, etc...

#

@warm sleet I was playing with Gans and implemented dcgan, wgan, cyclegan. I was looking for something that uses gan for text to speech.

#

But these are all visions stuff.

#

This is one of the interesting text to speech gan network. GAN-TTS

unique folio
#

yo i need help with something

#

i have a homework where i have to make a site

#

everything works perfectly except my photo that i wanted to insert

clear thistle
#

just use dreamweaver lol

#

makes ur life so much easier

nocturne galleon
#

File://

#

Instead of c:/

#

Well tbh I think u still need the c:/

#

But it should be like file:// if u have files locally, itll probably give u warning in browser u need to accept before image displays

#

@unique folio

unique folio
#

Ight

#

Nope

nocturne galleon
#

Either put file:// before c:/ or better yet put image in same folder as html and then do file://imagefilename.jpg

unique folio
#

ight

#

let me try

nocturne galleon
#

I think u don't even need the file:// if it's in the same folder

#

U just need to put filename

clear thistle
#

if its in same directory, it doesnt need full path, just file name

midnight wind
#

dreamweaver is bad for learning

#

and it kinda sucks

#

there are better tools for actual developers

clear thistle
midnight wind
#

except for school

clear thistle
#

exactly

#

this guys doin it for school

#

(im doin php for school and we use dreamweaver to sort out the html for us)

clear thistle
#

what bad?

#

php?

midnight wind
#

using dreamweaver for school

#

and php as well

clear thistle
#

right

#

why

nocturne galleon
#

also, adobe, no linux support 😢

clear thistle
midnight wind
#

bad language design, and insecure code

clear thistle
clear thistle
midnight wind
#

why I argue that IDE's are bad for learning

clear thistle
#

well we're using it to get the html out of the way
we are learning php, not html

#

we write the php 'manualy'

nocturne galleon
#

@unique folio if doing it just by filename doesn't work, create a private discord server, upload the image there and just copy the link in

nocturne galleon
clear thistle
#

lol
taking advantage of discord cdn

nocturne galleon
clear thistle
#

ye

#

for sure

unique folio
#

shit aint working

clear thistle
#

surely someone makes a personal cloud storage client that stores all ur files in discord lol

#

lemme see if that exists

midnight wind
clear thistle
#

lol
yup