#development
1 messages Β· Page 73 of 1
show me how should it look like
because i have link to it
its free
https://cdn.discordapp.com/attachments/826435127789748246/826435184953262140/bajamaliknindza.jpg
just <img src="http://example.com/image">
although
ight
idk if CORS will interfere
lets see
if it does
closing >
Pro tip if u ever delete on discord and still want it, change CDN.discordapp.com to media.discordapp.net
oh yeah right
<img src="http://example.com/image" referrerpolicy="origin-when-cross-origin">
yeah it works now
Keep the image on a server u own in case mods purge here, and the media.discordapp.net link also doesn't work

there is no best
just like there is no best road vehicle
best in what?
speed?
True ok well what is your prefered
@nocturne galleon there's no best language
different languages for different purposes
Yep I corrected myself but yea
Rust o_O
Why do you think that? π
ejs, handlebars, pug, etc. Basically dynamically rendered html
For side projects I still sometimes write vanilla HTML. At work we write jsx though.
yeah sometimes I write html, but very rarely
My favourite templating engine is LinkedInβs DustJS
never heard of that
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
Does anyone know 32-bit intel assembly?
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
Iβm donβt. I am not even sure if I was even born yet or at least old enough to know anything about computers when 32 bit systems were still a thing.
random question re: languages
what languages has the fastest run time
like
least latency/response time
C?
@clear thistle that's a nonsensical question
latency and response times are not a property of the language, rather that of the system itself
k sorry yeah that was badly worded
what i mean is
whats the most efficient
least overhead
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
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?
Just typing powershell should do the trick.
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
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
@deft sigil Ill do you one better: https://i.imgur.com/hPdxe7w.png
orlly?
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 π€’
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)
@deft sigil I'm a zsh fan myself
@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
@deft sigil ZSH on its own is just that
but I prefer using it with a community addon
providing many autocomplete features
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
You know how sometimes if you mistype a filename in Bash, it corrects your spelling and runs the command anyway? Such as when changing directory, or opening a file.
I have an idea: Suicide Linux. Any time - any time - you type any remotely incorrect command, the interpreter cre...
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
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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
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 :
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?
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) π
@deft sigil confusing.
I've been using menuconfig for kernel configuration
but beyond that, not much
@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 :
how-
@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
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 π¦
@deft sigil nah. let me stop you right there
I got better things to do than recompile libreoffice during a lunchbreak
I don't have time to do this type of low level stuff
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
Have you used this before? https://www.devuan.org/
Debian fork without systemd
@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}"```
Ah okay, thanks
tricks
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,...)
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)
that is vm version supported by Microsoft
Open source insensitive
if it works like i think i can erase my dualboot
oof
I think, AMD works fine, Nvidia still need voodoo magic
it's still VM
it is a translation layer
but at the same time
but it is not.
it's not
exactly xD
yea, something like that
WSL2 is more of a VM whan WSL
It's doesn't use latest build of Ubuntu
yea
that's fine tbh
I rather stability
I am about that Nvidia driver
preview drivers though.
Does vsc mean visual studio code?
yeah
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.
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.
i have to use vsc cause i am forced by my employer ;D
I use vscode because I like it
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.
Programmer calculator?
x11 tools
What is xrdp?
how? nativly or though X11?
x11
ah
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.
I use a vcxserver X11 implementation for Windows then connect to it through a local network to use GUI apps
Works fine
I've been using linux nativly for more than 3 months now
I installed xfce but never launched a whole UI, just individual apps.
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
It led me do funny stuff like this
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" π
i mean that is what you used to get gpu-support on native linux running windows
gpu-passthrough
so nested virtualization should work
nested virtualization works, but it depends
doesn't amazon do that?
yep
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 π
huh I remember doing that a long time ago to run a program
ran some XServer or something
Any rusteceans around?
can someone please help me its about java
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
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/
There's no native drivers for ext4
there used to be one for ext2
And the modern variant of ext2fsd
Yep, it's a helper program that needs to run in order for it to work. Sadly.
can only read ext4, not write.
@winter thorn thanks to windows' shitty filesystem and driver layout yeah
@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
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
should i write this in my main class or what?
you may have to load the native libraries with System.loadLibrary()
@fickle kite no
-cp is a parameter for the java vm
im a newb where do i exactly write it
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
i use launch4j to wrap the jar into an exe should i write that in the command line args place?
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
yeah but this is not part of the class i just want to make into a standalone
@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
i just used it so i can see the error messages bc when i open the jar nothing happens
Woah
you can just drag txt files and stuff into discord now and u can actually see it
like so
yep
like 2 days ago
this is microsoft
suggesting features
for eventual merger
@midnight wind I wonder how it would handle markdown files
boo.
where's my syntax highlighting
just text
@midnight wind is it? https://i.imgur.com/GuUGnRh.png
oh like that
yep
so
Booo
@midnight wind that guide basically set up a bridge network
and has you install influxdb
for what?
sensor system
for in a car
realtime readouts of the onboard computer
@midnight wind most cars have one of these ports:
ah
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
anyone knows SQL here?
I hate doing anything that isnt just the most basic possible queries
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?
im gonna guess end loop; cos its obviously not end for;
that's it actually
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
it kind of makes sense I guess because (hopefully) there is also while loop, and possible others
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
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
@wheat cobalt what element is that? webkit or the buit in IE browser?
I know .NET has a "Webpage" UI element
I know SQL from a sysadmin's point of view.
people still ask to ask
i already solved the issue
F
F
Huh, I always wondered - How different is Oracle from the "mainstream" of MySQL / MariaDB?
Completely. Syntax is at times barely compatible once you go past very basic statements.
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.
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.
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
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!"
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
It is slowly getting better. But still, many a people do.
Content development is more important than platform upgrade for them.
@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
Huh. Okay, I can imagine that being nifty.
What table engine does Oracle use? Something custom, or does it also use like... InnoDB?
I also know that Oracle has some powerful tools when it comes to scaling
Maria does too. Not so sure about MySQL.
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.
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.
And although innodb doesn't crash nearly as easily... When it does crash, it crashes hard. And is a total pain to restore π
just that its stored.
Yeah, that's what I'd use it for, too
@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
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.
@violet cipher you know what is even faster? :D
Compatible with redis
they made some of the routines multithreaded
simple lookups are orders of magnitude faster
@violet cipher who needs caching amirite? :D
Yeah, like, who cares about a CDN with a complicated 3-level caching. My origin server can handle the whole of global traffic lol
You can always do clustering
Or loadbalancing. A single IP can lead to a lot of different machines.
BGP is your friend.
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
MS-SQL is something I never really dealt with. As it's a predominantly Windows thing.
Yeah, but it is actually a very nice database
Queries are sane
and you can easily write complicated constructs
there's no "Gotchas"
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
I'd go for postgres if I I wanted SQL, otherwise i'm personally a fan of mongo
https://www.youtube.com/watch?v=b2F-DItXtZs yes I get the memes
Document storage the slowest of its kind
lol 'impotence mismatch'
I recently looked into graph db's
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
yep
but it is transactional, atomic and consistent
and scales by sharding
doesnt really matter what node is on what cluster
influxdb is pretty cool too to work with stuff like grafana
yep
@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)
got any ideas on how I can do this? π
So I argued with them, that downloading 1.5million measurepoints is stupid
oof yeah
@naive terrace BLE
@naive terrace yeah not only
1080p screens
can at most display 1080 points.
1920
well I figured they did client-side calcs and averages, did they not?
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
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
that's still a radius though isn't it?
if you sniff for MACs
no I can't use wifi because iphones suck π
@naive terrace walls would make your measurements inaccurate
@naive terrace my solution btw for their problem.
if my iphone isn't unlocked it will only sometimes (like 5% of the time) respond
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)
that's still a lot of data to be pushed somewhere
Mh not really
or is influx constantly updated as the backend gets more data?
ok so influx is updated w/ that ingest
so instead, I use influx as a cache
I see ok
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
geez
yeppers
no thanks
Influx is fast in that regard
ever try to do rolling average calculations in SQL?
with scalable resolution?
nope
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
Yep makes sense
I want to officially thank you for bringing this video to my attention. I've been laughing here like mad.
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
but mongodb is web scale.
probably π
A Q&A session on web servers turns existential.
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
yee
use nginx ffs
nginx is better than apache
nginx β€οΈ
its a fact
its web scale
WeLL i UsE iis!!
I hate wordpress, but yes that sounds accurate
isn't iis microsoft web server?
idk i'm just kidding xddd
IIS' config is a mess
xD I've never touched it, never wanted to touch it
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
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 π¦
@naive terrace C# is actually a very fine language
its just the standard library and the package ecosystem that stinks imo
reactor projects, automatic dependency tree building
fucking love it
I tried hosting a nuget server
literally impossible
I've heard you can use maven w/ C# but never looked into it
either artifacts work, and you dont get debug symbols
I don't know how mature those plugins etc are either
I haven't dived into nuget enough to know, but it looks a mess
@naive terrace Plexus compiler in maven supports like 10+ languages lol
There are C++ projects built with maven
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
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
heh
the C# stuff was just to play around
@naive terrace eventually the whole plugin building got a bit out of control
https://i.imgur.com/1QoTKDt.png
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
nice, I've started on one myself, not super mature yet
I mean sure but then it's not me building it π
@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
mine is geared towards minigames / adventure games so inv saving isn't as big of a thing for me
menu's however π
haha yep. I plan on having a web console too
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
neither does minecraft π
if you do allow them to do anything of that sort you thread it and return a future or something
@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
for loading data I stole an idea from hypixel where I use limbo π
player connects, proxy puts them in a limbo, does all the connection details / profile async
then redirects to final destination
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
yep. Limbo also doubles if a connection fails or a fallback etc... many uses
so I load up a small map there too
you should never be connected long enough to see it
but if you do you get a nice msg telling you to do /lobby
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
we have a hub server as fallback
the void worlds are a nessesary evil, because the profiles used to be single-server
if there's an infraction or the profile can't load on first join thenyes it kicks
and only saved on logout, so I needed a placeholder server
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
@naive terrace there are specialized event databases for this
where you can have a data aggregate through time
that'd be cool, i'll have to look into it
if you really hate yourself player.yml and use actual git π
oooh i'll have to look into this
I do like event-driven processes
@naive terrace if you like java and event driven
you should have a look at scala, with Akka
no no I like python and tolerate java π
The idea is that you pass a message to an actor
and the actor then acts on it
it can either emit another message
ok yep
or terminate
Its a pretty useful construct
Its a spin on functional event driven programming.
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
@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
can I call, and if another event is triggered interrupt a named event?
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
lol yeah. I've also got some phillips hue bulbs
so I can do both from the same application π
@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
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
event driven in terms of lights
and figure out the loop based tasks
yep or hour before sunset
but a task or an actor might be blink the light bulb forever
dumb example, but same idea
forever or until interrupted
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
so each actor is sort of like a function
Yeah, its a functional paradigm
you only pass messages
so for example Event<Button1 was pressed> goes to some UserActor
yep makes sense I get that part
curious how I'd do infinite loops
You don't :)
where one loop might take 2-3 minutes
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
I mean the bulb will be freaking out a bit
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
yeah what youre describing is basically concurrency lol
that part isn't hard even with just python threading
That's the whole premise of the actor model :)
yeah, but actors help if you have a large scale system
but yes I do like the actor model overall and I want to use it π
If anything, it is good practice.
going to look a pykka for sure
in scala you can use akka, and it has specialized syntax :D
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
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:
Erlang Programming Language
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
uhm
do you guys think sql injection testing a random website may be illegal?
whitehat style to inform them their site is not secure.
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.
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
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/
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.
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.
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.
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.
@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
how do you optimize a python program to spend less time?
anyone know a library for C to accept the "β©" character?
isnt that just unicode?
you can do those literals
U+2229 is the unicode hex value of the character Intersection. Char U+2229, Encodings, HTML Entitys:β©,β©,β©, UTF-8 (hex), UTF-16 (hex), UTF-32 (hex)
UTF-8 equivalent is: 0xE2 0x88 0xA9
Its just character encoding
and thus in code you can use this: https://en.wikipedia.org/wiki/C_string_handling#Constants_and_types
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...
the thing I was trying was to print this in conosle, but how I can do what you are talking?
@dire carbon what is the output of that program then?
the stadistic formula with the 3 char
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
but then I should search for a thing to insert in that ""?
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...
This pretty much takes you through the history of how it all works
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...
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
@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
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.
pointers, funtions, structs and dinamic memory is what I know for now, and the use of some lib
Oh... Yeah.
@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
Emojicode is a full-blown programming language consisting of emojis.
^ π€£
well, so I think I'll research a bit, thanks for the help
...I'd take brainfuck anyday over... that
I like how the line ending of a statement is MKAY
@dire carbon did you include locale.h ?
so if I do it in Linux that's it? (I have it also)
Yeah, well I dont know how C on windows handles this lol
I've only ever done C on linux
a wise man
Like, windows to me is consumer shit that you cannot develop on sanely.
I write enterprise stuff, not games
/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 ^
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
/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
but the & is not necesary in a print right? only when is a scan
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 &
well, so I think I have to change that
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.
so bizarre because the program prints it well without &
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
okey
could be
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
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.
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
So I've figured out the main function that does the heavy lifting.
https://github.com/EOSIO/eosjs/blob/master/src/eosjs-serialize.ts#L685-L700
and it uses createInitialTypes function to get the initial list of types for it to decode, and each has its own deserialize function.
Hopefully I'll figure it all out given enough weekends π
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
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.
Quartus? are using VHDL or Verilog?
it looks like you are running ModelSim
Modelsim and Verilog + SystemVerilog. And yeah i use Quartus to program it to the fpga and for the rtl viewer
Although i also use a lot of VHDL in other contexts
@dim lava What dev board are you usin?
DE-10 and also i have another MAX10 @arctic tusk
the second one is made by a local company so you'll almost certainly have never heard of it lol
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
<input type="button" value="Button text" onclick="window.location.href='url'">
You can also just wrap the button in an anchor tag.
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
damn
i didnt even know that lol
i should look into that
wouldve been helpful for me if id known that about 9 months ago
wouldve saved me heaps of time
Can it convert the time format to the local time format automatically? As in date formating translation. In different countries there standards put the date time text in different orders. I have seen this done in a c program before (likely a library too).
@rancid nimbus https://pypi.org/project/python-dateutil/
standard library for handling datetime/timezones/timespans, including the most common variant: ISO 8601
i still use datetime
Nice. I have DE0 Nano and DE10-Lite
I'm not super technical with it, I don't know
I can send some example code if you need me to
`#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
Have at it lads,
https://github.com/Yorisoft/puppet-purchase
@languid minnow Scalper's tools ?
fuck python, now c is my best friend.
hey guys check out the new version of the python vector generator https://github.com/ModcoLocko/Vector-Graphics-Generator
Now available for normies
Normies but you sent it to #development
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.
@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.
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
@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
There are python web frameworks
Flask I think
Django
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
@native helm my question to you is, why are you using phpmyadmin 
testing purposes. quicker to troubleshoot wordpress development with phpmyadmin than console. but I rarely use it anyway, but just for testing stuff rn
@native helm are you sure it even supports multiple servers?
it does
@native helm oddly enough
their documentation specify multiple hosts and ports
but only a single user and pass combination
yeah
r
@rare dagger let me quickly whip up something
I want it to stay at 1-3 files
I can just create a .NET executable
powershell is really just that
its a small scripting language to run bits of .NET code
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
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);
}
}
}
}
π€£
Hm. And can i use powershell for it
lemme see if it works
@rare dagger no, this API is a stupid mess
its written by idiots for idiots
ok wtf. i wanna feel how death feels like
(jk)
I didnt know that it would use different pid
each time
but ok
What will happen after 1 minute i wonder
@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)
ehm
idk what to do with thaat code
@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?
I need only 1 pid



