#development

1 messages Β· Page 73 of 1

clear thistle
#

damn i should use that

unique folio
#

show me how should it look like

clear thistle
#

im so sick of using my school onedrive

#

i mean

unique folio
#

because i have link to it

clear thistle
#

its free

unique folio
#

this

#

one

nocturne galleon
#

https://cdn.discordapp.com/attachments/826435127789748246/826435184953262140/bajamaliknindza.jpg

midnight wind
#

although

unique folio
#

ight

midnight wind
#

idk if CORS will interfere

unique folio
#

lets see

midnight wind
#

if it does

nocturne galleon
midnight wind
midnight wind
unique folio
#

yeah it works now

midnight wind
#

if it doesn't work try this

#

ah ok

unique folio
#

let me see

#

if it works on teams

nocturne galleon
#

Keep the image on a server u own in case mods purge here, and the media.discordapp.net link also doesn't work

unique folio
#

HAHA

#

fuck yeah it works

#

hvala za to

#

means thank you for that if something troll_cat

nocturne galleon
peak acorn
#

thats cool

#

ftp file system with discord

nocturne galleon
#

Whats the best language

#

I prefer python

midnight wind
#

just like there is no best road vehicle

#

best in what?

#

speed?

nocturne galleon
#

True ok well what is your prefered

midnight wind
#

js, cpp are both nice

#

I want to learn ruby

warm sleet
#

@nocturne galleon there's no best language

#

different languages for different purposes

nocturne galleon
peak acorn
#

Rust o_O

tight charm
#

Why do you think that? πŸ˜‰

midnight wind
tight charm
#

For side projects I still sometimes write vanilla HTML. At work we write jsx though.

midnight wind
#

yeah sometimes I write html, but very rarely

tight charm
#

My favourite templating engine is LinkedIn’s DustJS

midnight wind
#

never heard of that

tight charm
#

The advantages are that it can be used on server and browser, you can JIT load the templates and cache them, loading and rendering is async so it’s very fast

#

And is less opinionated about logic

terse minnow
#

Does anyone know 32-bit intel assembly?

halcyon pond
# nocturne galleon I prefer python

I do prefer python. But, I don’t think it’s the best. It may be the best in some areas. But certainly not in all. I like python to do easy input output stuff like discord bots. But I prefer java(also not the best) and C# when doing more (larger) Object Oriented Programming

halcyon pond
clear thistle
#

random question re: languages

#

what languages has the fastest run time

#

like

#

least latency/response time

#

C?

warm sleet
#

@clear thistle that's a nonsensical question

#

latency and response times are not a property of the language, rather that of the system itself

clear thistle
#

k sorry yeah that was badly worded

#

what i mean is

#

whats the most efficient

#

least overhead

warm sleet
#

that ^ only makes sense if you are arguing over native execution and interpreted

#

the same program in C would be just as fast as if it were written in Rust or another natively compiled language

#

since its to be expected that they emit the same machine code

#

VM languages like Java and C# (all of .NET framework) have an intermediate language that is near machine language

#

those sit inbetween native and interpreted

#

@clear thistle if latency and response times are of high priority, the OS itself might be completely different

#

like an RT Linux, Realtime kernel can act on external stimuli with less latency than a regular kernel

#

but thats only due to interrupts

deft sigil
#

is there a way to start powershell from cmd without it opening a separate window (so not cmd>start powershell.exe) , so in the same way typing cmd (ps>cmd ) in powershell works?

ashen sky
#

Just typing powershell should do the trick.

deft sigil
#

apparently its not in the default path, or something screwed up my PATH variable pretty bad , als what you say seems to be true , and running it in the powershell folder does work so :

#

thnx

warm sleet
#

wat

deft sigil
#

so indeed it works butt only when i run it form the folder where powershell originates, so the PATH variable (the place where the os looks for executables (the ones you can run without appending.exe or .bat) is in that variable and since it cant find my powershell something messed up that variable i assuem

warm sleet
deft sigil
#

orlly?

warm sleet
#

Linux DESKTOP-E49ULUK 4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux

#

wait which is it?

#

MINGW64_NT-10.0-18363 DESKTOP-E49ULUK 3.0.7-338.x86_64 2019-04-30 21:52 UTC x86_64 Msys

#

WSL 🀒

deft sigil
#

in a vm atm but it also boots from bare metal but im not gonna reboot for a screenshot :p

#

or : (proud i got this one working with secure boot enabled πŸ˜„ )

#

the bash i got in windows is just the one that is accompanied by GIT for windows , or the one that is accompanied by Cmder , so its a version running on windows (MINGW64) not in WSL

#

last one i promise πŸ™‚ and worth checking out : laserfast and less vulnerable to shellshocks : ion (written in rust)

warm sleet
#

@deft sigil I'm a zsh fan myself

deft sigil
#

@warm sleet i found ion intresting because its not written in C and therefore should not come with all the hazards that C brings with it , also it comes from a different os https://github.com/redox-os/ion, was easy enough to install and give it a try so , otherwise im just a regular old bash user πŸ™‚ as i tend to break out python anyway if a script gets more complicated as a sequence of comandline statements anyway but i might give zsh a try when i got the time to get in to it as its basicly bash improved 2.0 for what ive heard about it

warm sleet
#

@deft sigil ZSH on its own is just that

#

but I prefer using it with a community addon

#

providing many autocomplete features

#
GitHub

πŸ™ƒ A delightful community-driven (with 1800+ contributors) framework for managing your zsh configuration. Includes nearly 300 optional plugins (rails, git, OSX, hub, docker, homebrew, node, php, p...

#

it doesnt make you a hacker

#

but makes you look like one

#

cd as a command is overrated

#

can just type bare words and it will figure it out

#

if you feel adventurous https://qntm.org/suicide

deft sigil
#

mm nice , but since my systems always end up being just that little different in a way that totally breaks everything πŸ˜› dunno why even with gentoo half the tools for managing portage dont work because of my stubornness πŸ˜„ ps also got the shell prompt form the titus guy? πŸ˜„ anyway not the way i wanted it to work entirely but i seem to have ran out of talent on this one but it works so : downloads all vcredist files (includiung the pythonone) to a folder and then installs them one by one in the background (as much as possible) if you ever have to setup a new windows install (or for in a vm to get tem all at once instead of having to search for them every little app or tool you install that doesnt come with them) https://pastebin.com/g9d0AwQN

warm sleet
#

uff

#

@deft sigil if you want a single config to work for you the next 20 years or more

#

try NixOS

#

@deft sigil if you want a single config to work for you the next 20 years or more

#

entire system installation is declarative

deft sigil
#

for instance if want to use flaggie (tool for managing useflags) on my system it wont work because i decideed to make my make.conf a directory of files instead of a config file :

warm sleet
#

I never quite understood what that is supposed to be

#

xorg uses similar way of storing config files

#

01-something.conf

#

is that execution order?

deft sigil
#

if you compile a program you can give it parameters as to how you want to compile it , first for the system its suposed to run on (cpu and other hardware so the c compiler can optimize the program for the things that cpu supports) and also what else is on the system lets say you want to run only on kde and dont ever gonna install gnome you kan add +kde +qt and -gnome - gtk to the make files so every program that has support for both gnome and kde can throw all the code that is in the program for gome and gtk support away and only leave the code for kde support , making a leaner binary in the end. and imagine as the regular distros compile there binaries for the widest possible range of compatibility , these are the flags i have atm so everything with radeon / nouveau / intel graphics support support can trow it a way any suport for openrc aswell but if it can be compiled with support for jack audio kit it wil , a good example to try out is to run IDLE on a distro as many distros choose to compile python without TK suport and idle runs with tk so it wont run

#

na its just the order in what way the config file make.conf would be put togheter but as it doesnt matter for that config file its just for my personal ease of tab use πŸ˜„ ow useflags 9[tab] ow , but im still converting it as i named all of the 00 to begin with πŸ˜„ but as long as emerge doesnt care its for after the current emerge -e @world (recompiles the whole system) πŸ˜„

warm sleet
#

@deft sigil confusing.

#

I've been using menuconfig for kernel configuration

#

but beyond that, not much

deft sigil
#

@warm sleet srry my isp doesnt like me verry much

#

as you can see in my gentoo screenshot im running my own kernel too (without an initramfs and only 4 modules (the binarydrivers form nvidia) since its not that big and i have a bit of ram so makes for a verry quick boot and the whole kernel is in ram that way πŸ˜„

#

here is a nice one on screeny just made (had to reboot to yet another isntall on my pc :

deft sigil
#

how? what

#

how i did it πŸ˜„ ?

warm sleet
#

@deft sigil I hacked the ubuntu distro kernel to bits lol

#

to keep my old ubuntu 16 install going

#

kernel preempt makes even the shittiest of duo-cores enough for a low latency experience

deft sigil
#

if your gonna install gentoo you might aswell do the whole kernel as a custom job aswell i figured , a day or 2 extra to go over every option in the kernel is nothing in the total scope of installing gentoo πŸ˜„ as i decided to go for systemd (gentoo users and there for manuals dont like systemd verry much) while im at it and , since i was feeling adventures i also chose to only run wayland + kde on the proprietary nvidiadriver πŸ˜› its not running yet have some issues with gpsd (wich i dont need but something pulls it in when emerging plasma-meta and im still figuring out what, because i was there on my previous attemt (that i blew because i decided to format my /boot and swap partition and move everything to fat32 for boot and the swap on a file instead and i entered the wrong of= in dd effectively formatting the first gb of my /root 😦

warm sleet
#

@deft sigil nah. let me stop you right there

#

I got better things to do than recompile libreoffice during a lunchbreak

midnight wind
#

I don't have time to do this type of low level stuff

warm sleet
#

I do

#

but only if it is worth it

#

@deft sigil ahh, so you are part of the anti gang

#

I have mixed feelings about systemd

#

Debian fork without systemd

deft sigil
#

@nocturne galleon as how yo do it for the two screens : just do these: (for your system adapted ofcourse)
#mount the root of the linx distro to a folder in my case /mnt/gentoo
mount -o rw,acl,active_logs=6,background_gc=on,user_xattr -t f2fs /dev/disk/by-label/GENTOO /mnt/gentoo
#mount all required system folders and rbinds(for systemd)

mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev ```
#chroot to the partition with the shell of the distro
```chroot /mnt/gentoo /bin/bash
source /etc/profile```
#rename the prompt to remind you on what system your working
```export PS1="(chroot) ${PS1}"```
nocturne galleon
#

Ah okay, thanks

warm sleet
#

tricks

deft sigil
#

a bit mor clear this way i hope , chrooting can come in handy if you have a broken kernel or otherwise system incapable of booting and you want to fix it , by using a live usb or a differnt install that does work , only recuirement for it is that it must allow chrooting (most live distro's will have that option but just saying)

#

the options behind -o are also only if you use the F2FS (the filesystem for nandflash drives like nvme,or satassds , emmc, sdcards , usbsticks,...)

violet cipher
#

Hey guys, as recently (Thanks to the whole Certified Gamers Program), the pressure to get to a newly uploaded video as quickly as possible got higher than ever.

Combined with the fact that the existing notification systems (Including the notification bell and this server's notification channels) are surprisingly unreliable, and can result in tens of precious minutes of latency between video upload and notification, I was inspired to make a little program to notify me as soon as a video was uploaded.

Less than a day later, I am done and have a script that sends me a ping on Discord within half a minute of a new video getting uploaded to the LTT channel (But works for any channel really).

In the spirit of the program however, I felt that I should share the little advantage / Fix around, so that at least other people that have as little as a Raspberry Pi at home could use it as well.

The code + a brief documentation can be found at https://github.com/Aldenar/YoutubeWatcher

If you have any questions to the setup process, feel free to ask. The project's description doesn't go into every little detail of setting up a python environment and keeping the script running etc.

That said, I'm primarily a Linux user and may not be able to provide all the answers to Windows-related setup.

#

For example, today, a new video came out around 7:20. Already at 7:20, this program sent me a notification.

In comparison, this server's notification channel only sent a notification at 7:37 - 17 minutes later, when it comes to the Verified Actual Gamers program is a lot (Practically guaranteed to be out by the time one gets to it)

vast mulch
#

did i miss smth?

frozen elk
#

that is vm version supported by Microsoft

vast mulch
#

fml

#

gonna check if this has some gpu drivers support

#

so it does not run on openGL

frozen elk
#

Open source insensitive

vast mulch
#

if it works like i think i can erase my dualboot

vast mulch
frozen elk
#

I think, AMD works fine, Nvidia still need voodoo magic

vast mulch
#

i think not

frozen elk
#

it's still VM

midnight wind
#

it's not a VM

#

it's weird

#

it kinda it

vast mulch
#

it is a translation layer

midnight wind
#

but at the same time

vast mulch
#

but it is not.

midnight wind
#

it's not

vast mulch
#

exactly xD

frozen elk
#

yea, something like that

midnight wind
#

WSL2 is more of a VM whan WSL

frozen elk
#

It's doesn't use latest build of Ubuntu

vast mulch
#

it is that.

frozen elk
#

yea

midnight wind
#

I rather stability

vast mulch
#

i just want my vsc and a simple terminal

#

vsc on windows works weird.

frozen elk
#

I am about that Nvidia driver

vast mulch
#

preview drivers though.

frozen elk
#

maybe it not arrived yet

#

no, it not there

rancid nimbus
#

Does vsc mean visual studio code?

vast mulch
#

yeah

violet cipher
#

WSL2 is a VM running atop the Hyper-V hypervisor, side by side with Windows.

#

WSL1 was a translation layer, translating Linux kernel system calls into Windows system calls

#

Meaning there were things that just weren't possible to implement. WSL2 gets around this and most stuff works.

rancid nimbus
#

I liked it before l. I have not used it recently. Someone "required" me to use visual studio code. They did not realize I did not use it. I used vim and tmux.

vast mulch
#

i have to use vsc cause i am forced by my employer ;D

midnight wind
#

I use vscode because I like it

rancid nimbus
#

Does wsl allow you to mount an ext4 partition in windows? I seen some where that windows has ext4 support, but have not figured out how it is done natively like was claimed.

vast mulch
#

gui works

#

so i am a happy man already.

#

over xrdp but good enough

rancid nimbus
#

Programmer calculator?

vast mulch
#

x11 tools

rancid nimbus
#

What is xrdp?

vast mulch
#

just to test it out

midnight wind
vast mulch
#

x11

midnight wind
#

ah

vast mulch
#

but they done a lot of work already lol

#

for microsoft it's a lot

#

ignoring that azure does not work after all these years like it should.

#

first actual ARM macbook

#

now Windows with WINE-like tool but in reversal.

#

2021 will be a fun year.

violet cipher
#

I use a vcxserver X11 implementation for Windows then connect to it through a local network to use GUI apps

#

Works fine

vast mulch
#

that is also a way πŸ˜„

#

did you manage to install KDE or gnome on it?

midnight wind
#

I've been using linux nativly for more than 3 months now

violet cipher
#

I installed xfce but never launched a whole UI, just individual apps.

vast mulch
midnight wind
# vast mulch how's the experience?

pretty good, some apps don't work but that's expected for course. For webex I just join from browser. We use zoom at school. Main thing that's the most annoying are the X11 visual bugs and the latency

violet cipher
#

It led me do funny stuff like this

vast mulch
#

i am thinking about Linux on Windows on Linux VM inside of Windows

violet cipher
#

I... Am not sure if you can run a VM inside a VM. Would the virtualized CPU support virtualization instructions?

#

And that is, of course, ignoring the question of "why would you do that" πŸ˜„

vast mulch
#

i mean that is what you used to get gpu-support on native linux running windows

#

gpu-passthrough

#

so nested virtualization should work

midnight wind
#

doesn't amazon do that?

vast mulch
violet cipher
#

Yea, you can pass some HW through, but without some rather complicated configuration, all you get is a KVM CPU or something inside your VM, not the actual CPU

#

Well, I mean, Amazon sure does have the time and resources to make their own custom solution to just about any problem πŸ˜„

peak acorn
#

huh I remember doing that a long time ago to run a program

#

ran some XServer or something

olive stump
#

Any rusteceans around?

fickle kite
#

can someone please help me its about java

warm sleet
#

blueJ ew

#

use maven

#

@fickle kite the error in that stackoverflow example, is the lack of properly passing libraries to the virtual machine

#

but idk shit about BlueJ, all I know is that its a horrible IDE to work in

winter thorn
# rancid nimbus Does wsl allow you to mount an ext4 partition in windows? I seen some where that...

It does not, unfortunately. There exist some installable file system drivers to do it for Windows: https://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/

How-To Geek

If you’re dual booting Windows and Linux, you’ll probably want to access files on your Linux system from Windows at some point. Linux has built-in support for Windows NTFS partitions, but Windows can’t read Linux partitions without third-party software.

warm sleet
#

There's no native drivers for ext4

#

there used to be one for ext2

#

And the modern variant of ext2fsd

winter thorn
#

Yep, it's a helper program that needs to run in order for it to work. Sadly.

warm sleet
#

can only read ext4, not write.

#

@winter thorn thanks to windows' shitty filesystem and driver layout yeah

fickle kite
#

@warm sleet
Unfortunatly I have to work with it since this is school and I have to use it, can you help me though with this problem

warm sleet
#

in this case cp stands for Class Path, which is another location java will search to find the class files as they are needed by the program.

#

from the stack overflow error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path

#

you have to pass -cp /path/to/gluegen-rt.jar to the program

#

and if you are using JNI, like in that example

fickle kite
#

should i write this in my main class or what?

warm sleet
#

you may have to load the native libraries with System.loadLibrary()

#

@fickle kite no

#

-cp is a parameter for the java vm

fickle kite
#

im a newb where do i exactly write it

warm sleet
#

when you launch a java program

#

you have to pass the library path

#

usually this would look something like:

#

java -cp /path/to/libraries com.example.Main

#

this runs the main function in com.example.Main and has the library path you passed with -cp

fickle kite
#

i use launch4j to wrap the jar into an exe should i write that in the command line args place?

warm sleet
#

idk what launch4j is, but probably yeah

#

@fickle kite don't you have a teacher??

#

I mean, blueJ is horrible enough as it is

#

I expect a teacher to help you out

fickle kite
#

yeah but this is not part of the class i just want to make into a standalone

warm sleet
#

@fickle kite you can make standalone executeable .jar files

#

all you need to do is provide a manifest

#

this manifest has the class name of your main class

#

when you then execute the jar file

#

the java vm will read the manifest and start executing the main function you point at

#

not sure what you need launch4j for

fickle kite
#

i just used it so i can see the error messages bc when i open the jar nothing happens

peak acorn
#

Woah

#

you can just drag txt files and stuff into discord now and u can actually see it

#

like so

midnight wind
#

yep

peak acorn
#

i just learned about that oday

#

when did they add it

midnight wind
#

like 2 days ago

warm sleet
#

this is microsoft

#

suggesting features

#

for eventual merger

#

@midnight wind I wonder how it would handle markdown files

#

boo.

#

where's my syntax highlighting

midnight wind
#

just text

warm sleet
midnight wind
#

oh like that

warm sleet
#

it only does like

#

the basic stuff

midnight wind
#

yep

warm sleet
#

so

#

Booo

#

@midnight wind that guide basically set up a bridge network

#

and has you install influxdb

warm sleet
#

sensor system

#

for in a car

#

realtime readouts of the onboard computer

#

@midnight wind most cars have one of these ports:

midnight wind
#

ah

warm sleet
#

its usually on driver's side under the steering wheel, next to the fusebox

#

That's called OBD2

#

and it runs up to two CANbus data lines

#

This is for example what the cruise control stick uses to signal the engine to speed up

#

but you can read all kinds of diagnostics from this

#

we were only interested in speed

#

we had installed accelerometers in the car

#

and the idea was to calibrate the system

#

so you could detect if the car's suspension was worn out

#

from how rough it drives

#

but its basically this:

#

one guy driving, the other on his laptop with a raspberry pi xD

#

that was during development

fleet geyser
#

anyone knows SQL here?

peak acorn
#

I hate doing anything that isnt just the most basic possible queries

dim lava
#

pop quiz:
VHDL is a language that uses end X; to end blocks. If blocks are ended with end if;, case blocks are ended with end case;, process blocks are ended with end process;, architecture blocks are ended with end architecture;

Guess what for blocks end with?

peak acorn
#

im gonna guess end loop; cos its obviously not end for;

dim lava
#

it's so frustrating though

#

VHDL is so awfully inconsistent in little things like that and big things

#

it's worse than JS

#

the left shift sign extends the LSB

#

like WHAT

peak acorn
#

it kind of makes sense I guess because (hopefully) there is also while loop, and possible others

wheat cobalt
#

rate pls. Btw I'm noob so factor than in when you rate. Ping me when you got an answer, I tend to to forget messages :P

storm plume
#

ok boys i need some big brain people in webdev to help me

#

so basically im trying to get the data from material ui's textfield without using onchange or oninput because sometimes i have data filled in from querystrngs

#

and if the user doesnt tap on the prefilled data, then the data isnt stored in react's state

#

i need help someone ping me if they can help, thanks

warm sleet
#

@wheat cobalt what element is that? webkit or the buit in IE browser?

#

I know .NET has a "Webpage" UI element

violet cipher
warm sleet
#

@fleet geyser sup

#

OracleDB, MSSQL and MySQL

hollow basalt
#

people still ask to ask

fleet geyser
warm sleet
#

F

hollow basalt
#

F

violet cipher
#

Huh, I always wondered - How different is Oracle from the "mainstream" of MySQL / MariaDB?

pliant siren
#

Completely. Syntax is at times barely compatible once you go past very basic statements.

warm sleet
#

ANSI queries are fine in Oracle

#

but the schema definition Oracle is far more complicated

#

@violet cipher MySQL sucks

#

It barely supports ANSI Sql

#

MySQL lacks CHECK constraints, (Maria does add them)
The trigger and event mechanism was designed by morons. You can only have a single trigger on an event type

#

and the PL-SQL language extension is serviceable at best.

violet cipher
#

Okay, let me clarify, I still consider MariaDB to be MySQL. I mostly deal with that, and seeing how Maria is supposed to be fully compatible with the original MySQL server, only adding stuff atop, it feels like an almost the same thing.

warm sleet
#

Its not.

#

Most mundane things work. MySQL can accept CHECK constraints ,but doesnt enforce them

#

Maria does. but is incompatible with workbench tools.
And with every version of maria DB they move further away from MySQL

violet cipher
#

Its exactly why it exists - To fix stuff that MySQL did bad. To make it better. A sort of "I'll make my own RDBMS, with blackjack and hookers!"

warm sleet
#

Just ditch MySQL.

#

And use postgres or something

violet cipher
#

I'm not a programmer really, rather, a sysadmin. And man, there are still a ton of people that run on MySQL 5.6 and PHP 5

warm sleet
#

@violet cipher fire those people

#

if you are still running PHP 5.

violet cipher
#

It is slowly getting better. But still, many a people do.

#

Content development is more important than platform upgrade for them.

warm sleet
#

@violet cipher some of the more interesting things in Oracle is customized sequences

#

so instead of a PK that iterates from 1, 2, 3, etc

#

you can create your own sequence generator

violet cipher
#

Huh. Okay, I can imagine that being nifty.

#

What table engine does Oracle use? Something custom, or does it also use like... InnoDB?

warm sleet
#

I also know that Oracle has some powerful tools when it comes to scaling

violet cipher
#

Maria does too. Not so sure about MySQL.

warm sleet
#

maria uses a modified version of InnoDB

#

InnoDB is fast, can enforce PK and FK's and UNIQUE's

#

but cannot enforce CHECKs

#

if you want a blazing fast full text engine

#

you can use MyISAM

#

old engine of mysql

#

its supa fast

#

for binary search

#

but doesnt enforce any constraints.

violet cipher
#

Shh, we don't say that word out loud. Anytime we do, one huge table in that engine crashes and takes ages to check.

#

Its another thing that angers me - Customers who have their whole databases in myisam, then get angry when the main log table crashes and takes the next hour to become available, meaning their app cannot insert into it, and comes to a halt.

warm sleet
#

I only use MyISAM for logging purposes

#

where you dont really care about the data

violet cipher
#

And although innodb doesn't crash nearly as easily... When it does crash, it crashes hard. And is a total pain to restore πŸ˜„

warm sleet
#

just that its stored.

violet cipher
#

Yeah, that's what I'd use it for, too

warm sleet
#

@violet cipher I started using redis more and more xD

#

even more fine grained control over your data

#

and unrivalled by speed

#

duo core craptop can do 100k queries/second

#

its a hash database, completely in memory

violet cipher
#

Redis is amazing for key-value storage. And is blazing fast, that is true. But can easily eat up a ton of memory, and isn't too fit for huge datasets as it keeps all the values in memory.

#

traditional rdbms have no issue with loading data off disk.

warm sleet
#

@violet cipher you know what is even faster? :D

violet cipher
#

Hmm...

#

Huh, okay, didn't hear about this one.

warm sleet
#

Compatible with redis

#

they made some of the routines multithreaded

#

simple lookups are orders of magnitude faster

#

@violet cipher who needs caching amirite? :D

violet cipher
#

Yeah, like, who cares about a CDN with a complicated 3-level caching. My origin server can handle the whole of global traffic lol

warm sleet
#

You can always do clustering

violet cipher
#

Or loadbalancing. A single IP can lead to a lot of different machines.

#

BGP is your friend.

warm sleet
#

mhm

#

@violet cipher honestly though, I need strong data integrity and quality in my DB

#

I would probably be using MS-SQL

#

Oracle requires me to sell one of my kidneys

#

and MS-SQL Server for linux runs on docker just fine

violet cipher
#

MS-SQL is something I never really dealt with. As it's a predominantly Windows thing.

warm sleet
#

Yeah, but it is actually a very nice database

#

Queries are sane

#

and you can easily write complicated constructs

#

there's no "Gotchas"

naive terrace
#

is there a way I can detect my phones proximity to my bed?

#

and if my phone is at home as a whole?

#

(iphone). I'm thinking I can use bluetooth to detect if home, since wifi pings are iffy when the screen is locked. Don't know how to do proximity to my bed though

naive terrace
warm sleet
#

@naive terrace Mongo kek

#

That's the database in my nightmares

naive terrace
warm sleet
#

Document storage the slowest of its kind

#

lol 'impotence mismatch'

#

I recently looked into graph db's

naive terrace
#

I haven't really had issues with it. But I still try to avoid MS-SQL and would go for something like postgres over it

warm sleet
#

Graph DBs are pretty cool

#

they are ACID compliant

#

and non relational

naive terrace
#

I tried neo4j once

#

it's.... very different

warm sleet
#

yep

#

but it is transactional, atomic and consistent

#

and scales by sharding

#

doesnt really matter what node is on what cluster

naive terrace
#

influxdb is pretty cool too to work with stuff like grafana

warm sleet
#

Ah yes

#

if your primary key is time

#

influx is your friend

naive terrace
#

yep

warm sleet
#

@naive terrace I've used influx as a frontend for data analysis before lol

#

I worked for a company that did telemetry

#

and these devs wrote a nice little graph module for the frontend

#

but they did all their calculations such as "average"

#

on the browser (frontend)

naive terrace
warm sleet
#

So I argued with them, that downloading 1.5million measurepoints is stupid

naive terrace
#

oof yeah

warm sleet
#

@naive terrace BLE

#

@naive terrace yeah not only

#

1080p screens

#

can at most display 1080 points.

#

1920

naive terrace
#

well I figured they did client-side calcs and averages, did they not?

warm sleet
#

if you want to be technical

#

@naive terrace yeah.... because they just did a SELECT from the measurements table in SQL

#

which returned a whole series for 1 measurepoint

#

the objects we had telemetry for

#

often had, 20 or even 30 measurepoints

#

with 15 minute intervals

naive terrace
#

also I can get bluetooth strength? I figured that, but that'll only detect distance from the rpi I've got, can't really position the phone in a specific region

warm sleet
#

@naive terrace BLE can estimate distance

#

you can also use wifi signal strength

naive terrace
#

that's still a radius though isn't it?

warm sleet
#

if you sniff for MACs

naive terrace
#

no I can't use wifi because iphones suck πŸ˜†

warm sleet
#

@naive terrace walls would make your measurements inaccurate

#

@naive terrace my solution btw for their problem.

naive terrace
#

if my iphone isn't unlocked it will only sometimes (like 5% of the time) respond

warm sleet
#

When the user opens the graph viewer

#

the backend pushes the entire dataset into influx

#

and exposes a backend URL to the frontend can use to query directly from influx (through a proxy)

naive terrace
#

that's still a lot of data to be pushed somewhere

warm sleet
#

Mh not really

naive terrace
#

or is influx constantly updated as the backend gets more data?

warm sleet
#

data ingest is once/day

#

on a schedule

#

no, they didnt want to move away from SQL

naive terrace
#

ok so influx is updated w/ that ingest

warm sleet
#

so instead, I use influx as a cache

naive terrace
#

I see ok

warm sleet
#

and let influx do the average calculations

#

the result was, 5-10kb response blocks, instead of 150MB of json

#

the graph viewer would use around 2GB ram

#

xD

naive terrace
#

geez

warm sleet
#

yeppers

naive terrace
#

no thanks

warm sleet
#

Influx is fast in that regard

#

ever try to do rolling average calculations in SQL?

#

with scalable resolution?

naive terrace
#

nope

warm sleet
#

have fun with timestamps

#

in influx, you can just say: I want a 5 minute average from X to Y

#

and a step size of 30 minutes

#

so you get measurements every 30 minutes, of a 5 minute rolling average

#

this way you can look at year's worth of data to analyze, without blowing up your PC

#

@naive terrace they had other issues, such as data ingest with synchronous SQL queries.

#

If the DB timed out or locked up, data ingest would loose data.

#

I got rid of that. replaced it with AMQP.
The ingest creates batches and sends them to the exchange

#

then, another worker process takes these batches and processes them

#

only when it is confirmed that the insert succeeded, does it remove the batch

#

if an error occurred, the system pushes the message to another queue, for the developer to look at

#

the developer fixes the issues, and moves the messages back to the main queue to be processed again

naive terrace
#

Yep makes sense

violet cipher
fleet geyser
#

anyone here knows how to setup calamares installer on ubuntu 20.04 lts?

#

i tried but i can't seem to find any kind of guide on setting it up, the offical docs has guides on deployment, compiling and end-user guide

warm sleet
#

@naive terrace nice buzzwords

#

whats next? we all have to use blockchain? xD

fleet geyser
warm sleet
naive terrace
#

hope you saw the video otherwise i'll look stupid xD. uhhh yes. blockchain on web scale sharded nosql database using machine learning AI deepfake uhhh i'm out of words

warm sleet
#

Apache is still garbage.

#

There's no reason to run apache

fleet geyser
#

yee

warm sleet
#

use nginx ffs

fleet geyser
#

nginx is better than apache

naive terrace
#

nginx ❀️

fleet geyser
#

its a fact

warm sleet
#

its web scale

fleet geyser
#

tho more websites still use apache

#

boomer time

warm sleet
#

most people that run apache

naive terrace
#

WeLL i UsE iis!!

warm sleet
#

just want a LAMPP stack

#

to run wordpress

naive terrace
#

I hate wordpress, but yes that sounds accurate

fleet geyser
#

i use Microsoft Web Server

#

🀣

#

2003

#

πŸ˜‚

naive terrace
#

isn't iis microsoft web server?

warm sleet
#

IIS yes

#

Internet information server

fleet geyser
#

idk i'm just kidding xddd

warm sleet
#

IIS' config is a mess

naive terrace
#

xD I've never touched it, never wanted to touch it

warm sleet
#

its pseudogarbage GUI crap + web.xml

#

if you are using .NET use kestrel.

#

big application servers to host your apps in are a bit old fashioned

naive terrace
#

with .NET... .never used it never want to touch it. However I have had the pleasure of working with it by building pipelines for clients 😦

warm sleet
#

@naive terrace C# is actually a very fine language

#

its just the standard library and the package ecosystem that stinks imo

naive terrace
#

yeah C# itself is fine

#

I just strongly dislike the ecosystem

warm sleet
#

I just got used to maven

#

and nothing beats maven

naive terrace
#

yes! thank you!

#

java stinks but i'll take java / maven over C# for this reason

warm sleet
#

reactor projects, automatic dependency tree building

#

fucking love it

#

I tried hosting a nuget server

#

literally impossible

naive terrace
#

I've heard you can use maven w/ C# but never looked into it

warm sleet
#

either artifacts work, and you dont get debug symbols

naive terrace
#

I don't know how mature those plugins etc are either

warm sleet
#

or artifacts work + debug symbols work

#

but now debug symbols for stdlib are missing

naive terrace
#

I haven't dived into nuget enough to know, but it looks a mess

warm sleet
#

@naive terrace Plexus compiler in maven supports like 10+ languages lol

#

There are C++ projects built with maven

naive terrace
#

i'll have to look into it. I've only used maven w/ java

#

My main language though is python

#

I only use java when doing minecraft plugins

warm sleet
#

hehe

#

@naive terrace I actually started at young age, doing C#

#

implemented RSA encryption

#

crude implementation

#

and then I stumbled on minecraft modding

#

and went hardcore into java

naive terrace
#

heh

warm sleet
#

the C# stuff was just to play around

#

Thats a full suite to run a synchronized multiserver instance with bungee & spigot

#

synchronized profiles and chat across

#

with backend API and user lookup features xD

naive terrace
#

nice, I've started on one myself, not super mature yet

warm sleet
#

:D

naive terrace
#

I mean sure but then it's not me building it πŸ™‚

warm sleet
#

@naive terrace inventory saving is relatively easy.

#

you can use the BukkitObjectOutputStream to turn things like ItemStack[] (inventory) into a byte[]

#

Chat was implemented with redis

naive terrace
#

mine is geared towards minigames / adventure games so inv saving isn't as big of a thing for me

warm sleet
#

Ahh yes

#

so thats why I wrote this project

naive terrace
#

menu's however πŸ˜„

warm sleet
#

so other devs can use the roleplay data from our database

#

without knowing how 2 sql

naive terrace
#

haha yep. I plan on having a web console too

warm sleet
#

if you let noobs write sql

#

noobs that have no idea about asynchronous code

#

you end up with people doing queries in the event loop

#

crashing a server

naive terrace
#

neither does minecraft πŸ˜†

warm sleet
#

Quite proud of the amount of APIs that we have now ^

naive terrace
#

if you do allow them to do anything of that sort you thread it and return a future or something

warm sleet
#

@naive terrace all the profile data is loaded from SQL, and saved on logout

#

anything they need to push to DB immediately, they HAVE to do asynchronously

#

the SQL connection pool does a thread check before it hands out a connection

#

if the thread = main thread

#

it raises exception

naive terrace
#

for loading data I stole an idea from hypixel where I use limbo πŸ™‚

warm sleet
#

limbo

#

?

naive terrace
#

player connects, proxy puts them in a limbo, does all the connection details / profile async

#

then redirects to final destination

warm sleet
#

That's what I do too

#

I call it the voidworld

#

if you move between two servers

#

it sticks you in void, until the server has saved

#

it gives a go-ahead to the proxy

#

and then it moves the player to their destination

naive terrace
#

yep. Limbo also doubles if a connection fails or a fallback etc... many uses

#

so I load up a small map there too

warm sleet
#

lol

#

its just a bedrock box in our case

naive terrace
#

you should never be connected long enough to see it

#

but if you do you get a nice msg telling you to do /lobby

warm sleet
#

oh

#

it disconnects you if you are in there longer than 5 seconds lol

naive terrace
#

oh. I hold onto the connection lol

#

usually if a backend service dies or a server isn't loaded up and there's no alternative

warm sleet
#

we have a hub server as fallback

#

the void worlds are a nessesary evil, because the profiles used to be single-server

naive terrace
#

if there's an infraction or the profile can't load on first join thenyes it kicks

warm sleet
#

and only saved on logout, so I needed a placeholder server

naive terrace
#

I've thought about building a git-like structure for saving profile data so it can have saves from different games / states at the "same time" which eh... but what I really want are the branches / be able to see a profile history

warm sleet
#

@naive terrace there are specialized event databases for this

#

where you can have a data aggregate through time

naive terrace
#

that'd be cool, i'll have to look into it

#

if you really hate yourself player.yml and use actual git πŸ˜†

warm sleet
#

Such as this ^

naive terrace
#

oooh i'll have to look into this

warm sleet
#

@naive terrace this is the kind of DB you'd use for things like parcel tracking

naive terrace
#

I do like event-driven processes

warm sleet
#

@naive terrace if you like java and event driven

#

you should have a look at scala, with Akka

naive terrace
#

no no I like python and tolerate java πŸ˜„

warm sleet
#

Akka for python ^

#

Its an actor model

#

for event driven programming

naive terrace
#

ooh

#

and I assume I can interrupt events and have the events react to interrupts?

warm sleet
#

The idea is that you pass a message to an actor

#

and the actor then acts on it

#

it can either emit another message

naive terrace
#

ok yep

warm sleet
#

or terminate

#

Its a pretty useful construct

#

Its a spin on functional event driven programming.

naive terrace
#

I will look into this as well, for some iot stuff i've sort of built my own with threading & interrupts

#

this is less event driven though and more task-based

warm sleet
#

@naive terrace the cool thing about actors

#

is that you can tell them to do something

#

in two ways

#

Either: Call and forget

#

or Call, and wait for callback

#

in Pykka

#

they call this tell and ask

naive terrace
#

can I call, and if another event is triggered interrupt a named event?

warm sleet
#

Asking, will return a future

#

telling will return nothing

naive terrace
#

e.g. i've got a event that's a loop that's cycling a neopixel for example, and if a config updates, I want to interrupt it so the event will die or refresh the config

warm sleet
#

you're using python to control a neopixel?

#

KEKW shouldnt that be some MCU code?

naive terrace
#

lol yeah. I've also got some phillips hue bulbs

#

so I can do both from the same application πŸ˜›

warm sleet
#

@naive terrace event loops should only really be on your control station

#

it takes incoming requests

#

and fires off some actor to deal with it

#

done.

#

so you can then soley focus on the actor implementation

naive terrace
#

yes this makes sense for the mc network code stuff

#

not sure if event driven is what I want for the lights

#

although if I can schedule events I might move to that model

warm sleet
#

event driven in terms of lights

naive terrace
#

and figure out the loop based tasks

warm sleet
#

would be

#

someone presses a button

#

thats an event.

#

some actor handles this

naive terrace
#

yep or hour before sunset

warm sleet
#

that's a timer

#

another event

naive terrace
#

but a task or an actor might be blink the light bulb forever

#

dumb example, but same idea

#

forever or until interrupted

warm sleet
#

yeah, so you'd have an actor that first decodes the instruction, like you press a button

#

and it looks at what that has to do

#

then signals another actor, this other actor then sends idk, a network message to your bulb?

#

So you have an actor that is specialized in switching hue bulbs

#

and another that can drive your neo pixels

naive terrace
#

so each actor is sort of like a function

warm sleet
#

Yeah, its a functional paradigm

#

you only pass messages

#

so for example Event<Button1 was pressed> goes to some UserActor

naive terrace
#

yep makes sense I get that part

warm sleet
#

okok

#

:)

naive terrace
#

curious how I'd do infinite loops

warm sleet
#

You don't :)

naive terrace
#

where one loop might take 2-3 minutes

warm sleet
#

the actors themselves are part of a threadpool

#

and they halt execution if no job is available

#

the idea is that its concurrent and completely in paralel

#

so if some kiddo decides to spam the remote

#

it will not block until the hue bulb changed color

naive terrace
#

I mean the bulb will be freaking out a bit

warm sleet
#

Yeah, but think of it this way

#

the round-trip time

naive terrace
#

could I do cooldowns on the button press?

#

say 1 second

warm sleet
#

from button press, to decision, to signalling the Hue, and done.

#

if you do that sequentially

#

you're blocking the button input

#

because it is still waiting for the hue

#

this is why you'd have an interrupt loop on the button

#

and the actor that acts for the button press, is asynchronous

naive terrace
#

yeah what youre describing is basically concurrency lol

#

that part isn't hard even with just python threading

warm sleet
#

That's the whole premise of the actor model :)

#

yeah, but actors help if you have a large scale system

naive terrace
#

but yes I do like the actor model overall and I want to use it πŸ™‚

warm sleet
#

If anything, it is good practice.

naive terrace
#

going to look a pykka for sure

warm sleet
#

in scala you can use akka, and it has specialized syntax :D

naive terrace
#

I just don't know how i'm going to fit in 1 or 2 things into this model

#

everything else would work so much better with this

warm sleet
#

so you can do actor!someFunction()

#

or actor?someFunction()

#

tell/ask

#

@naive terrace if you want to take this actor and message construct to the next level:

#

this is what is often used for realtime communication systems and such

#

that have to be incredibly reliable and high throughput

#

erlang's own philosophy when dealing with errors: let it crash

#

which took me about 2 weeks of practice to understand. And then I threw erlang in the trash. Because my brain does not understand the functional paradigm

naive terrace
#

lol

#

I think i'll start with pykka

vast mulch
#

uhm

#

do you guys think sql injection testing a random website may be illegal?

#

whitehat style to inform them their site is not secure.

dreamy herald
#

Yes, absolutely

#

Actual whitehats get permission first.

#

You could get in serious trouble in the US doing that to an organization that doesn't have a sense of humor.

#

And many other nations too, I'm sure.

violet cipher
#

Absolutely, but people still do that. Or rather, bots do.

#

Its like asking if it'd be illegal to pick random people's locks to let them know afterward that their locks are weak.

#

Unless a company has a bug bounty program

rancid nimbus
#

There was a story where this hacker decided to hack the US president. He successfully gained access to his Twitter and proved it to authorities and he didn't get in trouble. He did not get in trouble because his intentions were "good". https://darknetdiaries.com/episode/88/

dreamy herald
#

Oh, people definitely do it. I just want to make sure anyone thinking of it knows the risks first.

#

Just because some people get off doesn't mean you definitely will.

rancid nimbus
#

I am with you that just because it can be done and not get in trouble doesn't mean it is good. At the same time if you run into a suspected security vulnerability doing nothing is not the right thing either. At that point it is like if you see a building burning down should you report it.

violet cipher
#

It's one thing to just stumble upon a bug, and something entirely different to go out of your way and attack an app to see if it breaks

#

I work in a server hosting and management company. We were once actually contacted by a freelance hacker asking if we had any bug bounty programs. We did, in the end, offer to cooperate, but before he began working, he did ask us. That was nice of him.

rancid nimbus
#

I am not saying that trying to find exploit is good, but showing what the court of law thought since legal stuff can end up being case based. It might not work that way in the UK where he in the story was from. What you described with asking the company if you can try attacking and only attack with properly authorized permission, is the best solution.

warm sleet
#

@rancid nimbus Yeah 2nd dutch person to break into that lol

#

the first one got in by accident

#

he was also dutch

#

yourefired isnt exactly a good pw

nocturne galleon
#

how do you optimize a python program to spend less time?

dire carbon
#

anyone know a library for C to accept the "∩" character?

warm sleet
#

isnt that just unicode?

#

you can do those literals

#

UTF-8 equivalent is: 0xE2 0x88 0xA9

#

Its just character encoding

#

The C programming language has a set of functions implementing operations on strings (character strings and byte strings) in its standard library. Various operations, such as copying, concatenation, tokenization and searching are supported. For character strings, the standard library uses the convention that strings are null-terminated: a string...

dire carbon
#

the thing I was trying was to print this in conosle, but how I can do what you are talking?

warm sleet
#

@dire carbon what is the output of that program then?

dire carbon
#

the stadistic formula with the 3 char

warm sleet
#

char *mbs = "Β£100 Ο€";

#

You have to make sure that your locale is set to LC_ALL

#

setlocale(LC_ALL, "");

#

printf prints bytes

#

so what you can do instead

#

is a literal char array: wprintf(L"ΞΏ Δικαιοπολις Ρν αγρω Ρστιν\n");

#

note the capital L in front of the string

dire carbon
warm sleet
#

setLocale just configures the character encoding

#

and characters like the one you are trying

#

are multibyte characters

#

normal ASCII characters are 1 byte (original ansi was actually 7 bits)

#

if the 8th bit is high, then you can attach some more bytes at the end

#

to extend your character encoding

#

this is what UTF-8 is.

#

its backwards compatible with ASCII.

#

@dire carbon it is up to the program that interprets the data, on how to display it. in this case your shell. which is configured by the locale

#

and wprintf can interpret multibyte characters

#

@dire carbon explained on a napkin: https://www.youtube.com/watch?v=MijmeoH9LT4

Audible free book: http://www.audible.com/computerphile
Representing symbols, characters and letters that are used worldwide is no mean feat, but unicode managed it - how? Tom Scott explains how the web has settled on a standard.

More from Tom Scott: http://www.youtube.com/user/enyay and https://twitter.com/tomscott

EXTRA BITS: http://youtu.be...

β–Ά Play video
#

This pretty much takes you through the history of how it all works

violet cipher
#

Guys? A little shot in the dark, but are any android experts here? I could use a few pointers - I'm trying to dump the complete ROM image of my phone, but as Android went to a dynamic partition scheme from 10 onwards, I'm kinda stuck.

I managed to dump the super image, but no idea how to extract it now...

dire carbon
#

I understand the theoretical part that you are explaining, and I think I understand what you are trying to tell me, but I do not know how, sry if I sound so noob in this

warm sleet
#

@dire carbon have you never programmed before?

#

Because C might not be the best language to start with

#

Its very near the hardware and doesnt really do anything for you

#

You really need to know what you are doing

violet cipher
#

I'd just recommend avoiding special characters and sticking with just ascii chars. Doesn't much matter what language one uses, unicode is just extra hassle in every language.

warm sleet
#

yeah but if you want to print a math expression

#

you kinda want UTF-8

dire carbon
violet cipher
#

Oh... Yeah.

warm sleet
#

@dire carbon basically, printf just interprets that was single byte characters

#

but wprintf prints wide characters too

#

like the couple thousands of characters that exist

#

in languages like C#

#

all strings are UTF-16 by default

#

aka Unicode

#

That even does emoji's

#

^ 🀣

dire carbon
#

well, so I think I'll research a bit, thanks for the help

violet cipher
#

...I'd take brainfuck anyday over... that

warm sleet
#

I like how the line ending of a statement is MKAY

dire carbon
warm sleet
#

@dire carbon did you include locale.h ?

dire carbon
#

nope

#

now yes and I have 2 new erros

warm sleet
#

cool

#

and they are ?

dire carbon
warm sleet
#

wat

#

im booting my laptop

#

inb4 this is some windows bullshit

dire carbon
#

so if I do it in Linux that's it? (I have it also)

warm sleet
#

Yeah, well I dont know how C on windows handles this lol

#

I've only ever done C on linux

dire carbon
#

a wise man

warm sleet
#

Like, windows to me is consumer shit that you cannot develop on sanely.

#

I write enterprise stuff, not games

dire carbon
#

well

#

I have it right now

#

now it works well, thanks a lot men

warm sleet
#
/home/crystal/Projects/untitled/cmake-build-debug/untitled
magic character: ∩
Process finished with exit code 0
#
#include <locale.h>
#include <wchar.h>

int main(int argc, char *argv[]) {

    setlocale(LC_ALL, "");
    wprintf(L"magic character: ∩");
}
#

@dire carbon for reference ^

dire carbon
#

thanks

#

now I have another problem, the βˆͺ character does not appear

warm sleet
#

What's with the %c ?

#

are you interpolating strings?

dire carbon
#

the 3 chars

#

yes, the idea when I get this funtioning is making a funtion that with the imput of 3 chars, prints the formula

warm sleet
#
/home/crystal/Projects/untitled/cmake-build-debug/untitled
magic character: A∩
Process finished with exit code 0
#
#include <locale.h>
#include <wchar.h>

int main(int argc, char *argv[]) {
    setlocale(LC_ALL, "");
    
    char a = 'A';

    wprintf(L"magic character: %s∩", &a);
}
#

pointerssss

#

this is why I dont use C most of the time xD

#

once you start building data structures, your brain just crashes

dire carbon
#

but the & is not necesary in a print right? only when is a scan

warm sleet
#

if you just do a its a value

#

but if you look at the method signature

#

it expects a pointer ^

#

so you can grab the pointer of a by prefixing it with &

dire carbon
#

well, so I think I have to change that

warm sleet
#

you can add your own behavior with a function, but this is how printf works

#

you just tell it where in memory the interpolated string is

#

with a pointer

#

otherwise, it would copy it to the stack

#

this is because of strings.

dire carbon
#

so bizarre because the program prints it well without &

warm sleet
#

you can give it a pointer to a char[]

#

and it happily substitutes strings too

#

char* is just the universal string pointer

#

usually NULL terminated

#

wchar_t is for wide characters

dire carbon
#

okey

warm sleet
#

@dire carbon I think..

#

you are using %c

#

and I was using %s

#

char and string

dire carbon
#

could be

blazing agate
#

Anyone have any experience with serialization? There is a javascript library that can turn a serialized array like this:

[246,11,105,96,7,39,8,53,119,89,0,0,0,0,1,0,0,0,0,0,234,48,85,0,0,63,42,27,166,162,74,1,0,0,0,0,72,195,1,2,0,0,0,0,168,237,50,50,49,0,0,0,0,72,195,1,2,0,0,0,0,72,195,1,2,0,0,0,0,0,0,0,0,8,87,65,88,0,0,0,0,0,225,245,5,0,0,0,0,8,87,65,88,0,0,0,0,0,0]

Into this:

{
    "expiration": "2021-04-04T00:44:38.000",
    "ref_block_num": 9991,
    "ref_block_prefix": 1500984584,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    ...

And I have no idea how it does it, I'm trying to make a equivalent in PHP but I can't get the same results.
I think someone out there has already done it, but they are selling the code for Β£50 on a Chinese site and I cant buy it lol

rancid nimbus
#

You could write your own code to do that.

#

What format is that?

blazing agate
#

I've gone through the original js code in the eosjs library and the deserializeTransactionWithActions() function that does this, but I haven't been able to figure out exactly what is going on to be able to rewrite it in PHP.

dim lava
#

AES Galois-Counter Mode works in the very first test case I had 😎

#

This was the test case. C and T were the final answers

blazing agate
#

Hopefully I'll figure it all out given enough weekends πŸ˜†

hollow basalt
#

yea

#

better to understand the protocol than someone else's code

blazing agate
#

All of the docs for EOSIO for deserialization reference and point to eosjs

#

I'm sure I'll figure it out eventually or find a way to buy the code from that Chinese site, price isn't the issue its I don't have AliPay or WeChat

blazing agate
#

omg I'm getting it.
So the first attribute is type time_point_sec which uses getUint32() and passes it to a function to convert seconds since epoch to a date.
getUint32 uses the first 4 elements from the array and does left shifting. this.get() gets the next in the array each time.

    public getUint32() {
        let v = 0;
        v |= this.get() << 0;
        v |= this.get() << 8;
        v |= this.get() << 16;
        v |= this.get() << 24;
        return v >>> 0;
    }

246, 11, 105, 96
= 1617497078

export const timePointSecToDate = (sec: number) => {
    const s = (new Date(sec * 1000)).toISOString();
    return s.substr(0, s.length - 1);
};

= 2021-04-04T00:44:38.000

#

Now that I've figured out the what and the how, this makes so much more sense now.

arctic tusk
arctic tusk
dim lava
#

Although i also use a lot of VHDL in other contexts

arctic tusk
#

@dim lava What dev board are you usin?

dim lava
#

DE-10 and also i have another MAX10 @arctic tusk

dim lava
#

the second one is made by a local company so you'll almost certainly have never heard of it lol

nocturne galleon
#

hey can someone help me make a button in html/css clickable? ive tried like 4 things but the button isnt clickable i want it to redirect to a link

violet cipher
#

<input type="button" value="Button text" onclick="window.location.href='url'">

wide cave
#

You can also just wrap the button in an anchor tag.

last lance
#

Python has a super powerful system for sorting through strings, so you could take text like this 2/4/2020 and turn it into

Today is day 4 of February in 2020

#

Discord style rank card made using python with variables and system to aromatically prevent it breaking

#

I used pygame to generate it and used the image.save() function

clear thistle
rancid nimbus
warm sleet
#

standard library for handling datetime/timezones/timespans, including the most common variant: ISO 8601

hollow basalt
#

i still use datetime

arctic tusk
last lance
last lance
#

`#modcolocko's PNG Generator
import pygame

#File Settings
filename = "Filename"

#Color Settings
background = (35, 39, 42)

#Image Settings
width = 100
height = 100

#Draw Window
win = pygame.display.set_mode((width, height))
win.fill(background)
pygame.init()

#Draw Objects

filename = f"{filename}.png"
pygame.image.save(win, filename)
print(f"file {filename} has been saved")
pygame.quit()`

#

Dm me if you need any help

languid minnow
nocturne galleon
warm sleet
#

@languid minnow Scalper's tools ?

last lance
languid minnow
hollow basalt
peak acorn
#

imo its better that the tools scalpers use are open source and available

#

if automated scalping is going to happen no matter what, its better that everyone has access to safe copies of the code.

stray jacinth
#

@languid minnow they're in stock here, but hella expensive! I guess one way to combat scalpers is to just raise the retail price to scalper levels πŸ€·β€β™‚οΈ

#

I could get a 3090 right now, but it'd cost 2700 euros, 1000 more than what the same model went for at launch. Not paying that.

ebon viper
#

I built something that I like using Python, is there anyway I can put it on an app or website?

#

given that apps are in swift or java, and websites are in javascript

warm sleet
#

@ebon viper depends

#

You can create web applications with python justfine

#

but in this context, your python process would be running on a server, exposing HTTP

midnight wind
#

Flask I think

#

Django

native helm
#

hey, I'm pretty new to docker, but am messing around a bit with it and is wondering, in a docker-compose I plan to setup 2 mariadb services and 1 phpmyadmin to manage both, but which of the two MYSQL_ROOT_PASSWORDs will it use in something like this:

db_private:
  image: mariadb:latest
  environment:
    MYSQL_ROOT_PASSWORD: somepassword

db_public:
  image: mariadb:latest
  environment:
    MYSQL_ROOT_PASSWORD: someotherpassword

pma:
  image: phpmyadmin:latest
  environment:
    PMA_HOSTS: db_private, db_public

Or have I misunderstood the docs? To me it sounds like phpMyAdmin needs the root credentials on this page (Credentials section): https://hub.docker.com/_/phpmyadmin

warm sleet
#

@native helm my question to you is, why are you using phpmyadmin KEKW

native helm
#

testing purposes. quicker to troubleshoot wordpress development with phpmyadmin than console. but I rarely use it anyway, but just for testing stuff rn

warm sleet
#

@native helm are you sure it even supports multiple servers?

native helm
#

it does

warm sleet
#

@native helm oddly enough

#

their documentation specify multiple hosts and ports

#

but only a single user and pass combination

native helm
#

yeah

rare dagger
#

r

warm sleet
#

@rare dagger let me quickly whip up something

rare dagger
#

I want it to stay at 1-3 files

warm sleet
#

I can just create a .NET executable

#

powershell is really just that

#

its a small scripting language to run bits of .NET code

rare dagger
#

dude

#

like what?

#
for /f "tokens=1,2,3,4 delims=/ " %%a in ('sc queryex ServiceName ^|FIND "PID"') do set PID=%%c
taskkill /pid %PID% /t /f

This is 1 bit of code from internet

warm sleet
#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;

namespace FindProcess {
class Program {
    public static IEnumerable<Process> GetChildProcesses(Process process) {
        var children = new List<Process>();
        var mos = new ManagementObjectSearcher(
            $"Select * From Win32_Process Where ParentProcessID={process.Id}");

        foreach (var mo in mos.Get()) {
            children.Add(Process.GetProcessById(Convert.ToInt32(mo["ProcessID"])));
        }

        return children;
    }

    static void Main(string[] args) {
        var children = GetChildProcesses(Process.GetProcessById(int.Parse(args[0])));
        foreach (var child in children) {
            Console.WriteLine(child);
        }
    }
}
}

🀣

rare dagger
#

aaa

#

wut

warm sleet
#

C# program

#

you pass it an ID, and prints all children

rare dagger
#

Hm. And can i use powershell for it

warm sleet
#

lemme see if it works

#

@rare dagger no, this API is a stupid mess

#

its written by idiots for idiots

rare dagger
#

ok wtf. i wanna feel how death feels like

#

(jk)

#

I didnt know that it would use different pid

#

each time

#

but ok

warm sleet
#

hold on

#

testing xD

rare dagger
#

What will happen after 1 minute i wonder

warm sleet
#

@rare dagger works..

#

sort of

#
E:\FindProcess\FindProcess\bin\Debug>FindProcess 4
System.Diagnostics.Process (Registry)
System.Diagnostics.Process (smss)
System.Diagnostics.Process (Memory Compression)
rare dagger
#

ehm

warm sleet
#

just need it to print only the ID

#

4 = system

#

has three children

rare dagger
#

idk what to do with thaat code

warm sleet
#

@rare dagger I can just compile it and give you an .exe if that's ok ? I can also provide you with the C# code

#

ngh is this waht you want?

rare dagger
#

I want it to get 1 PID and save it like %pidx%

#

so i can use it in cmd like idk kill

warm sleet
#

does it accept a list PIDs?

#

cus I can make it return a single line with commas

rare dagger
#

I need only 1 pid

warm sleet
#

yeah the code will return multiple

#

because its a list