#development
1 messages · Page 52 of 1
yeah np, prolly a lot of people here who can help with anything
slicing means that you're slicing your original strings at certain positions into smaller pieces.
In this example, the new string should start at index 2, which is 'C' and it should end at index 5, which is 'F'.
This means that slice will return "CDEF" (or "CDE" if index 5 is exclusive, depends on language/implementation)
ok thx
concat(substr(X, 2, 4), G) X = “PQRSTUVW” G = “B”
@glad bone sorry to bother u again
So, substr is basically the same as slice.
With index 2 and index 4 that'd be "RS".
Then concatenate "RS" with "B", making "RSB"
@fathom prawn
just put it here
ok
toLowerCase(concat(substr(X, 2, 4), G)) same X and G as above
is this just going to be "RSB"?
@fathom prawn No, as it converts it to lower case it turns into "rsb"
ahh ok what about concat(toLowerCase(substr(X, 2, 4)), G)
Well as you are converting the "RS" part to lower case, only that part will be lower case.
=> "rsB"
ahhh makes sense thx
reminder that my nanorand is currently the best non-cryptographic RNG crate in the Rust ecosystem, as it has a 4.5 GiB/s wyrand implementation (with 64-bit output)

concat(pop(Coin), slice(F, 3, 4)) Coin = [ “H”, “T” ] F = “ABCDEFG” can anyone help me solve this plz
@glad bone
so u find pop(coin) which is "T" then slice which is "D" so would it be "T","D" ?
"T", "D" or "TD", yeah
awesome thx
Are you cheating?
Is there a way to put gradients over the top of buttons without affecting their button style using pure CSS?
Wait, found a way. Change the background-image rather than the background
@unique flint yes thats is
Anyone able to explain to me why this isn't working?
Not sure why the package file isn't loading into the folder
Just learning to script, so feedback is helpful
have you tried just enter?
Yeah, nothing
have you tried linux?
The OS...?
yea, probably works on linux
^
@nocturne galleon installed all the packages you need?
$ npm install in the root of the directory of said project
that should download all the libraries it needs
$ node app.js to launch your node app
👌
hi... just a question ... can any pair of 3 lines segments, where adding any of the 2 lines is longer than the last line segment create a triangle?
https://www.youtube.com/watch?v=qTRW7ELhhME&t I was watching this video (more like for 10 secs)... 🤷♂️ I just remembered property, I couldn't find anyone in comments saying it, so there must be a exception to it and I must be wrong in some way... but I can't think any 😕
Sign up with brilliant and get 20% off your annual subscription: https://brilliant.org/ZachStar/
STEMerch Store: https://teespring.com/stores/stemerch
Support the Channel: https://www.patreon.com/zachstar
PayPal(one time donation): https://www.paypal.me/ZachStarYT
►Follow m...
🤔
now that I think about it
x + > z makes sense no matter what
I can't think of an example where it doesn't
@vernal marsh what's your idea
yeah me too 🤷♂️ that's the first solution came into my mind.. because its so freaking simple
I thought he would follow this when he said geometrical property
I am pretty sure we can proove this mathematically but 🤣 I am pretty lazy
I still can't think of an exception
yeah..... neither me 🤷♂️ ... I asked my brother who is major in maths he said that its fundamental property of triangle to have 2 sides addition larger than other side and it applies to all triangles.
I guess this goes the other way around too... if any combination of 2 sides is longer than third then it can form a triangle
It should be that way
lol I looked in comments for like pure 10 mins
no one wrote it.... I was like.. naah I might be wrong on this, there is no way..
anyways ... if anyone else 😅 looks at it pls let us know if we are wrong.. now I am fairly certain I am not... but still
Anyone here a C++ Fanboy?
Lots, if not everyone I talk to is a Java boy
Either Java or Python
Very popular
what if I told you i like assembly
@hollow basalt macro assemblers ? xD
hmm
does LOLCODE have webframework currently?
don't ask why TF would someone do that, ask why not
oml
.lol
oh a http server
was expecting a web framework
emojicode is a very productive language
other languages usually take time debugging
need a whole new keyboard
emojicode uses most of the programmers time finding the emoji itself
spend more time coding instead of debugging
must be great

emojis are annoying
cus UTF8 vs Unicode
need to reserve double amount of bytes in my database
just to support emojis
👀
unicode is 16 bit
we should go back to wingding
lol
http://tomscott.com - http://twitter.com/tomscott - This is the most ridiculous thing I've built in a long while: a full-size, real-life emoji keyboard, made of 14 keyboards and over 1,000 individually placed stickers. And yet, it's got everything from Unicode 8 -- but not yet...
made with autohotkey lmao
cus windows cannot detect multiple keyboards as seperate keyboards
but autohotkey can
and of course it's a tom scott production
he's the emojigod
and of course it's a tom scott production
he's the one brave enough to do it
first guy to upload a video on how it works
and they also made emogli
emoji only chat service
should be a feature of the warship during april's fools
mutes anyone not using emoji
what?
19" on the ruler, nice [REDACTED] bro
smashing keyboard you're banned
if i got it right
@hollow basalt
does anyone here have a favorite program to make basic vr games in? when I get my headset I wanna screw around with stuff like that
I believe you could play around with Unity. Not into game development but I'm guessing that major 3D engines may lead you somewhere.
Yeah, unity would be a good place to begin. plenty of resources and info on the web.
@paper escarp
bruh
Okie thanks
Godot I think also started having vr support
I'm trying to recompile my kernel, but am running into some dependency issues with openssl
/tmp/ccZfY8Cs.o: In function `main':
sign-file.c:(.text.startup+0x4f): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5b): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x295): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[2]: *** [scripts/sign-file] Error 1
Makefile:560: recipe for target 'scripts' failed
make[1]: *** [scripts] Error 2
make[1]: Leaving directory '/home/crystal/kern/linux-source-4.4.0'
debian/ruleset/targets/common.mk:295: recipe for target 'debian/stamp/build/kernel' failed
make: *** [debian/stamp/build/kernel] Error 2
openSSL 1.1.1 isnt available through apt for me, so I compiled and installed it locally
I can find the references in /usr/local/include, but the compile step for the kernel still errors out...
I'm at a bit of a loss.
sudo apt list openssl -a
Listing... Done
openssl/xenial-updates,xenial-security,now 1.0.2g-1ubuntu4.17 amd64 [installed,automatic]
openssl/xenial 1.0.2g-1ubuntu4 amd64
$ openssl version -a
OpenSSL 1.1.1 11 Sep 2018
built on: Mon Sep 21 09:42:59 2020 UTC
platform: linux-x86_64
options: bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DNDEBUG
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib/engines-1.1"
Seeding source: os-specific
I'm not one for premature celebrations, but I think I am making progress
@hollow basalt nah,ubuntu 16
this is my daily driver
and its very outdated, so lot of packages and parts I've been fixing on my own
main reason for recompiling..
PREEMPT
Kernel preemption is a method used mainly in monolithic and hybrid kernels where all or most device drivers are run in kernel space, whereby the scheduler is permitted to forcibly perform a context switch (i.e. preemptively schedule; on behalf of a runnable and higher priority...
not on LTS
and I wouldn't anyways, because it would literally
break
everything
PREEMPT kernels have 'low latency' desktop
GNOME has a tendency to freeze, when there's a lot of IO or kernel cpu usage
preemptible kernel, gives priority to user-space
so it doesnt freeze the desktop
it also gets rid of vsync issues
backend dev
This fixed my compiler issues ^
compile and install from source lol
server and desktop are much alike
except no DE
well
kernel 4.7 needs new OpenSSL library to compile
and ubuntu 16 has only up to version 1.0.1g
but I need at least 1.1
you gon call your isp today?
ask them the spice?
sorry
thiskeyboard is shit
work keyboard
rubber dome
I hate it
Im not bringing a greasy RGB keyboard into work
I have corsair xD
K70 RGB
dual monitor + laptop on a stand
so I use external
yeah its a thing you put your laptop on
raises it off the table
so its same height as your monitors
its like a dock
but without cables.
I could use the dock
but I don't have usbc
still compiling
-1/10
@hollow basalt rip
no pics 4 me
azure 
cloud 
Install this ^
FF?
it makes cloud marketing seem a bit more realistic
uploading your files to my butt
sounds like something stanley from the office would say
I'm using word online, to do spellcheck on all my markdown files
this feels so wrong
rip tim
@hollow basalt at home I have two 1080p60 displays, and laptop on the side
laptop is also my HID host
so desktop's keyboard & mouse comes from the laptop
3 screens, two machines, one keyboard & mouse
Synergy software shares one mouse & one keyboard between multiple computers & monitors. Easy download, install & configuration. A Symless product.
One of the few pieces of software, I actually paid for
I paid for the pro version
cus it has TLS encryption
:/

yawn
yes
I use my private laptop @ work
since
I refuse to work on windows
if macbook people can get away with it
then so can linux users
wa
no its not
xD
nm-connection-editor
ez
I use L2TP
mh
well
I configured L2TP on my mikrotik
mostly because it works on android, iOS, windows, linux and OSX
PPTP is old
and not as secure
L2TP/IPsec is the norm nowadays
cool
compiler is done
its now packaging
then
it has to prepare bunch of headers
there's lot of propietary solutions out there too
I think l2tp/ipsec, with passphrase is only like 2 passwords
what software is it?
wat
does it make a sound?
SUCCESS
sudo dpkg -i linux-image-4.4.232_4.4.232.custom_amd64.deb linux-headers-4.4.232_4.4.232.custom_amd64.deb
Selecting previously unselected package linux-image-4.4.232.
(Reading database ... 647016 files and directories currently installed.)
Preparing to unpack linux-image-4.4.232_4.4.232.custom_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.232 /boot/vmlinuz-4.4.232
Done.
Unpacking linux-image-4.4.232 (4.4.232.custom) ...
Selecting previously unselected package linux-headers-4.4.232.
Preparing to unpack linux-headers-4.4.232_4.4.232.custom_amd64.deb ...
Unpacking linux-headers-4.4.232 (4.4.232.custom) ...
Setting up linux-image-4.4.232 (4.4.232.custom) ...
:D
hopefully this works
I grabbed the source of my currently running kernel
and generated the config, from the running kernel
so it should work
k
installed
nvidia drivers also recompiled successfully :o
kk
moment of truth
Linux watomat 4.4.232 #1 SMP PREEMPT Mon Sep 21 13:15:54 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux
you can change that :P
/etc/apt/sources.list
vmware
barf
only reason I had to do thiskernel upgrade lol..
was because my previous kernel... was about a year old
lol
hold on
lemme see how many kernels I have installed on this
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.232
Found initrd image: /boot/initrd.img-4.4.232
Found linux image: /boot/vmlinuz-4.4.185+
Found initrd image: /boot/initrd.img-4.4.185+
Found linux image: /boot/vmlinuz-4.4.179+
Found initrd image: /boot/initrd.img-4.4.179+
Found linux image: /boot/vmlinuz-4.4.167+
Found initrd image: /boot/initrd.img-4.4.167+
Found linux image: /boot/vmlinuz-4.4.162+
Found initrd image: /boot/initrd.img-4.4.162+
Found linux image: /boot/vmlinuz-4.4.155+
Found initrd image: /boot/initrd.img-4.4.155+
Found linux image: /boot/vmlinuz-4.4.144+
Found initrd image: /boot/initrd.img-4.4.144+
Found linux image: /boot/vmlinuz-4.4.140+
Found initrd image: /boot/initrd.img-4.4.140+
Found linux image: /boot/vmlinuz-4.4.0-189-generic
Found initrd image: /boot/initrd.img-4.4.0-189-generic
Found linux image: /boot/vmlinuz-4.4.0-142-generic
Found initrd image: /boot/initrd.img-4.4.0-142-generic
Found linux image: /boot/vmlinuz-4.4.0-45-generic
Found initrd image: /boot/initrd.img-4.4.0-45-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
generic kernel is one without any ubuntu patches
the ones with a + are self compiled
like
4 years now?
I never removed the old ones
lol
distro kernel is installed alongside my system, but I dont use it
literally, how to recompile kernel:
$ apt install linux-source
$ cd /tmp
$ tar xf /usr/src/linux-image-$(uname -r)
and then
$ make olddefconfig to generate make configs using your current kernel
fakeroot make-kpkg -j2 --initrd --revision=4.4.232.custom kernel_image kernel_headers
@hollow basalt yeah yea
this is
recompiling the distro's kernel
linux-source is whichever your distro is
easy install
xD
ubuntu server installation takes like 2-3 mins
anylonger and you are doing it wrong
@hollow basalt did it download the one you selected ?
cus that's completely wrong architecture xD
you installing this on a vmware host?
why do you need a desktop?
ubuntu desktop is 80% programs
and 20% OS
ye
I have a windows desktop
and linux laptop
and like 5 linux servers
I game on my desktop
and its also got a nice watermark
"Activate Windows"
nop
I have a legit key
just.. windows installation is so broken
that it errors out when I enter key
some weird error in system32
and the effort involved in reinstalling windows
vs
not giving a fuck & just game
cus windows isn't 1. 2. 3. done
takes
ages to get all the programs
back the way they were
copy the %APPDATA%, and pray all the settings get carried over
that sort of bs
what?
is it ?
on linux this is so normal lol
~/.config/
just copy that
and ezgame
should write a program/toolkit
for managing .config <--> appdata
for various programs
even mac is suprior in that regard
programs and program databases can be fully backed up on macs
it is
did you know that linux isnt? xD
linux isnt fully posix compliant
but mac is
linux does things little different
details..
quircks.
always
there's
1000s of different sound cards
but if they are usb
they all use usb-snd-core
1 driver
but the cards's specifics, have to be configured in the driver
often called 'quircks' mode
when you have issues on linux
and people suggest to maybe install drivers.
I just..
die inside
did you know that with many drivers
the drivers are in the kernel, often before the hardware is even released
lot of intel stuff
and amd
pretty much all that, works out of the box
currently, the only driver that doesn't play ball
is nvidia
I use DKMS to load it into the kernel
its a way to have drivers live outside of kernel code
when you install a new kernel, it has to link the nvidia drivers to the new kernel binary
and then it installs
nouveau
there's two areas on linux
where I die inside, if i have to debug them
Xorg
and
ALSA
display stuff and sound stuff
configuring that
is hell
xD
you can make it work
just have to know what config to wrangle
lol
"Please contact system administrator"
esp, if the software runs into an error
why can it not fix itself
why does a human need to press a button to "unfuck" it
ugh
2 more hours
then I get to go home
and get back to building in factorio
xD
nothing much changed for me
except, that I use a car to go to work now
instead of public transport
dont want to be among the proletariat and get sick
esp since the average dutch person gives 0 fucks
people not wearing masks
2nd wave is happening here right now
Rotterdam and Amsterdam are declared "red zones"
and we barely test
@hollow basalt you should have seen.. the day the lockdowns and pandemic started
they said, they were going to close the coffeeshops (place to buy weed)
and literally
that same evening
100s of people in line
next day, they reverted decision
you cant smoke in the cafe itself
but you can go in, to buy some
yeah, I mean
if there's on thing that is good during pandemic
people gettin high, at home on the couch
instead of going out in public
@hollow basalt KVM/QEMU
And this is my front-end
virt-manager is great
:)
And this console emulator
I dont use vnc
I just have X11 forwarding
ssh -X root@server
huh
download, install, and run Xming
then in PuTTY
set X11 screen to: localhost:0.0
and it works
I use Xming with putty & forwarding also
x11spice also works
its an alternative
@hollow basalt my VM host doesnt have a DE either
but I do run GUI programs on it
via forwarding
you dont need that
only if you want the host to shutdown the guest, without a hard-kill
and network autoconfig
also uses tools
I usevmware too
but if I need options
I just go with debian
yeppers
debian is also the distro
that if you need help with
you will always find someone using it
if you want latest and greatest
go Fedora
Fedora is often the first distro to support new hardware features
because its rolling release
Friend of mine runs Tumbleweed
Rolling release
Incredibly stable
nah I mean
if you want to try out
the latest and greatest graphics
Fedora is usually the first to deliver an OS with the newest kernel
for testing purposes and bleeding edge, you'd do that
really?
mh
ubuntu server doesnt need much
can run that stuff with 500MB ram
and 1 core
ubuntu desktop
has a bunch of things that slow your PC
like
tracker-miner-fs
it indexes all your files
and sucks up CPU
:D
transparant terminal
xD
@warm sleet uh....did someone get banned here?
?
Or you just talking to yourself?
@hollow basalt keeps deleting their messages
But...why?
@warm sleet Why would he delete it
Maybe for this exact comedic effect
what's the comedy

@cinder kraken baited xD
it looks like a monologue from a mental asylum

would it be possible to port the code from lets say an old console to a pc and change the code up so that it could use your hardware and act like a console as in using original disks in said pc
can i get a what what from all my haskell users out there?
Currently making a hands free bot so that people who want founders additions of 3080s, 3090s or 3070s can get ONE without having to die clicking reload. Heres about 4 hours of work, currently in the optimizing stage so its a bit slow on startup: https://youtu.be/AUAe4vkkCz4
Realy build of something I threw together in about 4 hours. Its meant to allow someone to make a single purchase before all the other mass purchase bots can get through. Currently kinda slow and only works on chrome. If I do some debugging I might work on getting it to run on ...
I already beat the basic robot identification
And yes I'm also botting. The point isn't to stop botting, but let people who actually only want one or two cards but them.
Question: (heres the line of code)
I then got this error message when trying to run !tutorial
Anyone know what the issue is?
where did you even delcared the message @nocturne galleon
I guess it's supposed to be
bot.on('message', message => {
}
which is better to learn (I know very basic JavaScript and i know how to code in scratch well)
Python, Java, C++ or Lua (Lua as in Roblox game development)
Depends what you're trying to do?
if you want to do systems development
your answers are Rust, Go, and C++
if you want to do web services, you need to learn one of the above and then learn docker/podman
most of the core languages have binding to JIT languages such as Lua
Any web developers here
hope not
trying to teach myself python can't see anything wrong but apparently there is
most likely a dumb question but i got to start some where
If it is a simple question about html or css i can help you
@hexed harness What are you trying to do?
make it ask me to add something to y then print y then repeat
Add to y or set y to equal?
add
how many times do you want to do that?
It would have to be a set number of times, untill y reaches a certain value or you could have a specifiq input stop the program.
is there a way to make it loop endlessly?
Yes. I use a while loop instead of a for loop then.
A for loop is better if you know how many iterations you need, and a while loop is better for iterating until a condition is met.
while True:
do_stuff()
Will loop forever
If you are getting an integer from input you'll have to cast it to an int since the input() function will return a string.
so while true do
end?
There is not a do and end in python the blocks of code are defined on indentation.

While true will work in most languages
```html (newline)
code
```
<div id="einstein_bio">
A Breif Bio of Einstein
</div><!-- End of einstein_bio Div-->
<div id="mozart_bio">
A Breif Bio of Mozart
</div>
<!--End of Mozart_bio Div-->
</div>``` I want to select the mozart and einstein bio with a jquery command to hide.
can someone help me, i cant figure out how to use descent and filter with bio at the same time
You want to hide them with JS rather than CSS?
with jquery
ohh 
but yeah, i know jquery is working in the document, because i was able to hide the whole page
$('#einstein_bio', '#mozart_bio').hide()
my proffesor is a little picky, i wanted to do that, but he wants us to use the filters
i tried this, but its not working
I mean you can just do $('*_bio') that will select anything that ends in _bio
i just tested that, it doesnt work
One sec im just checking havent used jquery in so long
Ah yeah it does use the queryselector syntax so
$('[id$="bio"]')
@deft stone
They still teaching jQuery in Uni?
yeah
Your Prof should read this https://medium.com/javascript-in-plain-english/jquery-will-die-soon-heres-why-976a6b8105e1
i'll send it over
its old technology, but yk how long it takes for them to transition to latest tech
eventhough we pay 40k a year in tuition
The webdev course at my uni asks the students to use pictures for buttons.
glad mine isnt that bad
It's mostly just that one prof who's terrible. The rest of them range from mediocre to pretty good.
TBH i am tired of being a college student at this point, because i am tired of learning old technology. None of my college classes teach AWS, which is the next big thing
i discussed this with some advisors and proffesors, and they just shrug it off, and tells me 'its a long process to add a course'
okay, one should not learn AWS
one should learn what composes the various micro service architectures
AWS is cool but it's like 1% of the ecosystem it represents
If you really want to learn actual web development
learn Rust, Go, and C++
javascript and HTML5 are made up based text languages which you can infer from knowing one of those languages
afterwards
simply go throug this diagram https://landscape.cncf.io
college is not there to teach you specific things tailored to the private sector. college is there to provide a route to learn new material
trade schools provide instruction for specific domains in the private sector
@nocturne crypt those are some wise words, thats why on the side i am learning aws on my own through udemy

When I was at uni I did a course specifically in IBM mainframe because it's such a niche subject system z that everyone that knows about it is getting to retirement age lol
When I was at uni, I did study
Chicken science 🐔 the best subject
Starting with Rust, Go and C++ is crazy, imo. What is even "actual web development" and why isn't JavaScript/Typescript + NodeJS better for beginner?
Or even, gasp, Java, endgasp.
NodeJS better for beginner
Because I wouldn't teach someone about the event loop while they are printing hello world

(my 2 cents)
So Java it is 🤗
I always start teaching with C#, 'cause it's comparatively easy, yet has all the commonly used programming blocks, that make up most modern day software (like OOP, strong data typing, easy to use console Interface, etc)
Java is less... microsofty-yy
Obviously Java is pretty similar, but I found it more difficult to start out with a Project then C#, since VS has built-in project templates
In the end, everyone has their own preferences
I just use IDEA
. . .
I used to use VSC for NodeJS/React, but lately I have transferred everything to either Webstorm (NodeJS, React) or Idea (Java)
Webstorm is basically Idea with some plugins, but I like the separation.
but idea is more expensive
I have professional version
I have bundle of everything anyway
all of Jetbrains stuff
I use Datagrip a lot as well
But community edition of IDEA is good enough
has all the features youd want for a java program
IDEA is pretty much all the IDE
you want pycharm? install the python plugin
you want datagrip?
it's built in
I have Clion seperately
you want inner peace?
idea can't give you that
I have never seen the point in Webstorm, if I can do all my development in IntelliJ. That includes NodeJS, Vue/Nuxt, Angular, etc.
yeah on IDEA thats just plugins
The problem with the Community Edition is that many Plugins are not available for it
Won't all of those plugins make it slower in the end?
IDEA is quite heavy because it has a huge index
2-3GB
on large projects
but once that index is ready
if you want a lightweight editor, use notepad++
its very very fast
IDEA is generally fast when you use it
just startup is slow
Visual Studio is slow while you use it
Yeah, I think I still prefer to have Webstorm for JS/TS and Idea for Java
Visual Studio is slow while you use it
Visual Studio is slowwhile you use it
I've done MVC web development on both java and C#
found the java variant to be a bit saner
.NET adds a lot of crap
Java is more used in the industry, so for learning purposes it might be more useful.
But I would think it is quite simple to transfer from C# to Java and back, haven't tried it myself though.
Yeah, VS is just slow AF. The only thing I like about VS is the default dark color theme. But I know I'm somewhat alone with that opinion
@obtuse stump I currently do both
some projects I do Java on backend
and .NET on frontend desktop
I am nutty in that regard, I use all-white themes everywhere 😄
because winforms with drag and drop is easy
I suck at UI/UX
if I need to do webfrontend
I tend to reach for some bootstrap variant
White theme is better visible in the sun and I like to work out on the porch 😄
Honestly, lately I've tried to work myself into Electron for App development, mostly since I'm well familiar with HTML/CSS
And I've kinda been transitioning to Fullstack JS/TS development anyways
I haven't tried Electron myself, but I have heard that it is possible to make snappy/good application in it 😄
Haven't just seen one yet 😄
Slack, looking at you!
iirc spotify used to be
You're litterally using an Electron App rn (unless you're using Discord in your browser)
Spotify is not Electron
I cannot understand what is happening with Spotify development, management must be so bad there.
Nice, named constraints, hate when people don't name theirs 😄
Spotify is not Electron
||used to be||
In many cases with Electron Apps, there's also a Web interface that looks almost identical, like is the case with Discord, Slack, MS Teams. But not always is this the Case. I ran into issues once with an experimental Nuxt implementation with Electron, because it's default Port was already used by the Logitech G Hub for it's interface xD
@obtuse stump some things are very nice if you do a bit of advanced sql
DROP PROCEDURE IF EXISTS proc_bungee_check_login;
CREATE PROCEDURE proc_bungee_check_login(
IN ip VARCHAR(15), IN playerid BINARY(16)
)
BEGIN
DECLARE adr INT UNSIGNED DEFAULT INET_ATON(ip);
IF EXISTS(SELECT ''
FROM player
WHERE uuid = playerid AND banned IS NOT NULL)
THEN
SELECT
'PLAYERBAN' AS state,
banreason,
banned
FROM player
WHERE uuid = playerid;
ELSEIF EXISTS(
SELECT ''
FROM ip_address
WHERE address = adr AND banned IS NOT NULL)
THEN
SELECT
'IPBAN' AS state,
banreason,
banned
FROM ip_address
WHERE address = adr;
ELSE
SELECT
'NONE' AS state,
NULL AS banreason,
NULL AS banned;
END IF;
END;
And the new NZXT Cam software is Electron as well from what I can tell
this procedure checks if player is either banned or ipbanned
I usually define a java interface, for all my procedures
and just have a simple facade to interface with
Yeah, it is sometimes much more performant to do the query/logic near data.
these are two rather big tables
Scrap the "from what I can tell"...
Btw, who else loves that in oracle databases '' and NULL are equivalent 😄
Gotta love legacy.
'' is empty string
if you do EXISTS
it just checks if theres a record in a table
and that table is a subquery
the goal of this procedure
We use an Oracle Database at work, and I hate it. But yeah, generally speaking if you have a VARCHAR2 column, and put an empty string in it, Oracle will store NULLinstead...
is to return 3 columns, banstate (NONE, IPBAN, PLAYERBAN)
then banreason
and then expiration date, or 0 for permanent
Ah, I didn't even look at your code (or rather, I looked but did not catch it there), it was just a general reminder of good times debugging something.
@obtuse stump this runs on the proxy of my minecraft server xD
IDEA database is unconfigured, so thats red
my only objection in that code, is how I get the UUID into the db, I used to do the unhex on the database
but newer parts of software use raw bytes directly with jdbc
this is like a 6 year ongoing project
Nice, longest my personal project has ever lasted is about 3 months.
This was the project I learned my craft with
I've got many other things since then
but this one still lives and breathes
even had some other contributors work on it too
closed source though
Haven't found anything that I really would need, so most of my personal projects are just trying out some new things.
That are too risky to try out on work projects.
Its a cross-server synchronization plugin basically
but it has
many parts
you have the core plugin
which just facilitates custom data in sql
and then there's a chat system ontop of that
these two, can then be ran with a proxy
and have synchronized inventories between servers
as well as chat
also, has another module you can install for things like a backend API
Wow, that is quite sizeable project indeed.
xD
we had some network services
like profiles you could view online
leaderboards
and that project grew as well
and it can now grab live data from the servers
chat works on discord too
xD
its total about 35k lines of code
@obtuse stump http://javadocs.knockturnmc.com/core-api/
this is for a harry potter themed roleplay server
so spells, magic, plants, potions, pets
minigames
tons of scorekeeping and tracking
since its roleplay
quests as well
Discord implementation was quite easy actually
we already had this, for IRC back in the day
and just added another instance of that handler, with another prefix name xD
messaging was all done through https://redis.io/
👍
I'm writing a .htaccess file and I'm getting an error about bad flag delimiters, does anything immediately stick out as being wrong to anyone?
RewriteRule ^(apis|images)($|/) - [L}
sudo apt install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
Depends: node-ansi (>= 0.3.0-2) but it is not going to be installed
Depends: node-ansi-color-table but it is not going to be installed
Depends: node-archy but it is not going to be installed
Depends: node-block-stream but it is not going to be installed
Depends: node-fstream (>= 0.1.22) but it is not going to be installed
Depends: node-fstream-ignore but it is not going to be installed
Depends: node-github-url-from-git but it is not going to be installed
Depends: node-glob (>= 3.1.21) but it is not going to be installed
Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
Depends: node-inherits but it is not going to be installed
Anyone has an idea what is going on here?
I have nodejs installed
there's an old version of npm on my system, that was installed through source
that version does not work
but trying to then install one through my package manager, does not work
nvm
I figured out the issue
npm was installed twice, path configuration used an older version that shipped with the distro
/usr/bin/npm vs /usr/local/bin/npm

Also, you should update npm via npm (nothing wrong here)
sudo npm i -g npm@latest
@little knoll why they don't just use apt for this
oh well.
nodejs developers are snowflakes anyways
the problem I was having has to do with this:
$ apt-cache policy npm
npm:
Installed: (none)
Candidate: 3.5.2-0ubuntu4
Version table:
3.5.2-0ubuntu4 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
didnt see that NPM was installed with the nodejs package
so when I searched for npm, it only listed the ancient versions from Ubuntu Xenial
and this is very confusing and a bit against the linux package logic
$ apt show nodejs
Package: nodejs
Version: 12.18.4-1nodesource1
Priority: optional
Section: web
Maintainer: Chris Lea <chl@nodesource.com>
Installed-Size: 92,3 MB
Provides: nodejs-dev, nodejs-legacy, npm
the nodejs package shouldn't be installing npm as well
Well, that's a common thing to distribute package manager updates through the package manager itself afaik (pip also does that)
Also, due to apt and others linux packages manager, packages aren't always up to date on their repos, so the best way to get the latest npm (or even pip) version is to download the latest version from itself.
And furthermore, your apt-cache should point to nodesource for npm afaik so that's even weirder
And when it comes to Node and NPM, I'd highly suggest using NVM, as it allows for easier switching between Node versions, and completely goes around this issue
Hey does anyone know where, in the US, software companies that will hire high schooler doing CompSci
@little knoll yeah I expected npm to be its own package, but its bundled with nodejs
I guess nodesource is nonstandard in this
@grizzled steeple Im not using nvm ever again.
I used it once
Its. so. slow.
NodeJS usually comes with NPM?
At least the Windows builds come with NPM
@grizzled steeple ye nodesource on debian does too. apparently xD
To be totally honest, I've been more of a Windows dev, so I don't know about Node on Linux all that much. NVM on windows isn't that bad, it's actually fairly quick, since it only switches a few sym-links around
yeah..
my experience with nvm on linux was, that it made my shell... crawl
literally, 1-2 second wait, between commands
not sure if this was because I use zsh
besides
if you need an older or newer variant of nodejs
they have different repositories for each major release
public class computers{
public static void Main() {
computers mypart = new computers();
mypart.setname("Doofus");
mypart.setweight(15.0);
System.out.println(mypart.getName());
}
}
anybody know why setname and setweight do not work
Do you have a setname and getName function?
for something like this it seems like it would make more sense to have the name and maybe the weight be part of the constructor
so would i do public weight
not necessarily but if you made a constructor it would be computers mypart = new computers("Doofus", 15.0)
You could do it your way now but you would need to have a method/function called setname() that updates the name variable in the class
so how would you create that method
it says it can not find the method setweight and setname
public class Computers {
private String name;
private double weight;
public Computers(String name_, double weight_) {
name = name_;
weight = weight_;
}
}
this would be an example of using a constructor in Java
if you want to use setname or setweight you have to write those methods
you could do
public class computers {
private String name;
private double weight;
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
The set and get methods are methods you have to create
thsi si what i have
public class computers{
public static void Main() {
computers mypart = new computers();
mypart.setname("Doofus");
mypart.setweight(15.0);
System.out.println(mypart.getName());
}
}
it is saying setname and setweight are not a method
That's because you haven't written them yet
so how would i write them
public class computers {
private String name;
private double weight;
// Do this again but for weight
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public static void main() {
computers mypart = new computers();
mypart.setName("Doofus");
mypart.setWeight(15.0);
System.out.println(mypart.getName());
}
}
it's how I said in my last post, you have to make a method public String getName() and a method public void setName()
Or in builder pattern
public class Computer {
private String name;
private double weight;
public String getName() {
return name;
}
public Computer setName(String name) {
this.name = name;
return this;
}
public double getWeight() {
return weight;
}
public Computer setWeight(double weight) {
this.weight = weight;
return this;
}
public static Computer newInstance() {
return new Computer();
}
}
no you can write a setWeight that takes in a double
or a string, up to you
whatever makes sense for your workload
oh i see
You could even make multiple versions that take either option and convert
what is a "procedural programming language", is it just a language with functions?

It would be confusing to say it as functions
Since we have functional programming
Functional programming to my understanding means a function must always give the same output if it is given the same input whereas procedural programming can have states (such as a global variable)
This article attempts to set out the various similarities and differences between the various programming paradigms as a summary in both graphical and tabular format with links to the separate discussions concerning these similarities and differences in extant Wikipedia articles.
functional programming is what mathematical functions looks like when written
ok so
i need a php/html which ever web text file editor
im building a minecraft management panel
@hot grotto cool
so your problem RN is the rendering is broken
none of the code i see only will open a text file
even if its hard coded for directory
in the html file
so for simplicity it should be like this:
- Request file
- PHP read file from disk
- Return file contents to frontend
- Edit file
- PHP write file into disk
are we on the same page?
are we on the same page?
pun not intended
i know
lol
<?php
// configuration
$url = 'http://example.com/backend/editor.php';
$file = '/path/to/txt/file';
// check if form has been submitted
if (isset($_POST['text']))
{
// save the text contents
file_put_contents($file, $_POST['text']);
// redirect to form again
header(sprintf('Location: %s', $url));
printf('<a href="%s">Moved</a>.', htmlspecialchars($url));
exit();
}
// read the textfile
$text = file_get_contents($file);
?>
<!-- HTML form -->
<form action="" method="post">
<textarea name="text"><?php echo htmlspecialchars($text) ?></textarea>
<input type="submit" />
<input type="reset" />
</form>
so many scripts out there yet none work

can't you load the page first
then AJAX call to the backend to retreive the file
the problem is the script code wont open any files
Can someone enlighten me on why some imports in typescript/nodejs, are prefixed with an @ ?
as an example:
import m from 'mithril';
import {MithrilTsxComponent} from 'mithril-tsx-component';
import {UmbracoBlog} from "../common/heartcore.query";
vs
import {Client} from '@umbraco/headless-client';
what does it mean if there's an @ ?
mithril is a node_module, just as the ^ headless-client
I dont know xD
I that context it is just a name of a folder
So you should find a folder called @umbraco in node modules
🤔
However there are other uses of it depending on the compiler.... For example it can be used to define the root of the project rather than node_modules root like @/src/main etc
In other contexts like webpack it can be part of the bundler like Can't says and be used to define a transpilation
So it depends on where you are using it
As an example Angular https://angular.io/guide/setup-local as seen here uses @ in the name of the module basically to make it obvious that it is a framework
It is also sometimes used as the framework developers know that it will want to defined in a specific way
In conclusion: Like many things in JS it doesnt only have one single definition and can be very confusing to people that are learning the language
#JSForLife
I'm a java dev, new workplace
all is .NET and node
xD
@light prism I'm developing a new framework/toolset for their application development
ASP.NET MVC will be tossed out
Good man
and replaced by an all-node based app
currently, they are doing routing based paged as well as SPAs
so the framework I am setting up, has three modules
client side code, server side code, and a common code lib
libraries used by the server can also ran on the client
Problem I have run into when people use all node solutions
Most important thing: when running in production make sure node is set to production mode otherwise you will hit a serious performance bottleneck
things like content providing to a mithril SPA
@light prism I'm quite stoked on this though :D
pretty cool that i can write a client in node, and use it on both server and client
I know node's threading model isnt the same
with java, you have 1 thread for 1 request
javascript encourages functional aproaches
Yeah... Ive not used mithril but I have done angular universal and react server which do essentially the same
TSX is nice. I have however over years of using these systems developed a hatred for any language that encourages not separating concerns
Like JSX, TSX, JSPs etc
JSP is argh
its like PHP's philosophy
CSS, HTML, Javascript, PHP
one file
leggo.
They encourage you to put your program code in the template file which is messy and leads to issues on large projects
I prefer templating languages like mustache which actively prevent you putting anything more than the template in the file
@light prism I'm planning on also incorporating a CDN with webpack :)
the bundle.js it generates
can be uploaded to the umbraco CDN (Umbraco is the cloud based CMS)
@light prism if I had to develop webpages using my own experience & tooling
I reach for Java using a trimmed down version of MVC
and handlebars for templating
Nice. Ensure you make your bundles small
any recommendations on doing views with node & express?
My preference for web is Dropwizard 2.0 > Handlebars with Typescript vanilla (No frameworks) and stylus compiled using parcel bundler
right now, its just express.use() to provide a static html file that loads mithril
And you are using Mithril as an SPA?
@light prism its a bit of both
the framework should be able to write full MVC applications
but also provide "drop-in" applications with mithril
they do a lot of interactive application development on the web
like product configurators for webshops
their current setup is something along the lines of:
ASP.NET Razor view, that loads mithril code
So real simple I use this for SPAs
response.sendFile(path.resolve(__dirname, 'dist/index.html'));
});
Ye, I do that ^
But say, I want to do route resolution
and pick what controller I need
either SPA or regular page
So you can do that just put your SPA under a path something like /spa/*
@light prism user goes to a path, path is resolved with Umbraco, this returns a document type
based on the document type, I want to then select what controller I need
if its an SPA, is entirely defined in the controller itself
its not Path -> Controller, but rather Path -> Document -> Controller
if (req && req.params && req.params[0]) {
const location = islandContents.find(content => content.url_slug === req.params[0])
if (location) {
res.send(location)
return
}
}
console.error(`No content was found for location: ${utils.safeGetIncArr(req, 'params[0]')}`)
res.sendStatus(404)
})```
This is a simple path resolver I made for an API recently
yeah, I might just write my own route resolver
Umbraco is a bit.. unique in the way it proceeds
@light prism ah ok
yeah I need to do route provision through umbraco...
so I request a url from umbraco, it tells me what content and what content type it is
Express is very flexible on routing you can pretty much do whatever you lkike
and depending on that, I Need the right controller for that type
@light prism it reminds me of sparkjava
Looks identical
Yeah so I did something similar to that when using Contentstack as a CMS
But I eventually moved that Dropwizard for the sake of my sanity
Its similar yeah
Well, the toolset is for either making full-fledge sites
or
making just 1 component of a site
while the rest is made by a third party
hence mithril
so they can use components and re-use them in other projects
@light prism since I can't find a reasonable alternative to maven archetypes
I might just use this project as a git repo that you fork for each new project
You can use something like a yeoman generator for boilerplate
mh
Or even use npx which can do project generation for you
Bit more complicated cos you have to do a lot of the background work yeoman is easier
I think right now, yeoman is out of scope
but I can definetly put this in my documentation
maybe look at it in the future
with git, advantage is that you can just update the structure, and then merge that downstream
Yes assuming your fork isnt too divergent
mhmm
Trying to standardize the 'client and server' code by providing a layer inbetween
that can execute/be used by both execution environments
Middleware to the rescue
some things ,the client can do directly by fetching from the CDN
some things, are authoritative
so need the server to do it

@light prism the beauty of this all, is that the document structure you have defined in the CMS
can be exported via graphQL
I use this as mapping in typescript
Ah but there you will run into deployment nightmares using graphQL the same ones I ran into
this is something they have been able to do previously, because of Razor views and umbraco's model builder




