#development

1 messages · Page 86 of 1

cloud knot
#

if my 21 years of work, multitude of projects i worked on are not enough for you to decide, then yeah, screw the company following some stupid hiring guideline

hollow basalt
#

My dad (director level) walked out because the company wants him to do a written test

cloud knot
#

PWA works completely normal on Android, you only miss native features. PWA on iOS is a bit worse.

You always got Ionic Capacitor or Apache Cordova as an interim solution if you need native functionality.

#

obviously Capacitor/Apache Cordova pretty much requires your app to be client side SPA, which might or might not be a dealbreaker

hollow basalt
#

now that I think about it, native apps act like SPAs

cloud knot
#

yes, pretty much anything is now a REST client to a REST server

hollow basalt
#

cordova/ionic before electron was cool

cloud knot
#

electron is one of the cordova/ionic targets too, if you want to do that as well 🤷‍♂️

hollow basalt
#

since when? i haven't tried cordova since I was college

#

and that was pre-electron era

cloud knot
#

4 years ?

hollow basalt
#

dang, am i that old

cloud knot
#

ok, maybe not official release

#

seems like electron was added in Cordova 9, which is like 2 years maybe ?

hollow basalt
#

yea, that makes sense

cloud knot
#

so 3 years in few weeks

hollow basalt
#

I miss that era, when node is a buildtool

#

not something you would think to run a website

wind horizon
cloud knot
#

as i said, at that moment you are looking at Ionic Capacitor or Apache Cordova

wind horizon
#

Has anyone used a good Cordova app though? All the ones I used were clunky.

The React Native apps I used are okay, but it's still not really building a native web app.

cloud knot
#

that is literally to what you write

wind horizon
#

Just a shame how long it's been and still no official support for it.

cloud knot
#

Cordova and Ionic in the end are SPA/PWA with ability to call native functions. That's all

wind horizon
#

Right but that's not native support, that's a compatability layer.

hollow basalt
#

Would you say electron is not native

wind horizon
#

Imagine how nice it'd be to ship something like slack or discord as nothing more than some JS, html, and css. No package of all the extra stuff, windows / Mac app stores just run the web app transparently and provide access to device APIs.

nocturne galleon
#

@hollow basalt electron is definitely not native, it just takes the guts of chrome and let's you basically use a website as a native app but it's still just js, css and html

next cipher
#

yeah electron is kinda the opposite end of the spectrum from native

#

fwiw with swiftUI and jetpack compose you can kinda keep your native iOS and android codebases more or less in sync, architecture wise

#

most of the mobile app stuff I've touched has unfortunately been react native because of time/resource limitations but swiftUI is quite nice to work with... apple shenanigans notwithstanding

silk eagle
#

so what you guys are saying is, just make a windows forms app in the designer in VS in 5 minutes, make each button run a python script, write the output to a text file, and then read the text file in the wfa?

nocturne galleon
#

VS is agonizing

#

i will never touch it

next cipher
silk eagle
#

ill sell it to Microsoft and they'll open source it so future generations can learn from it linuth

next cipher
#

i have had the wonderful luck to never have to make windows UIs thus far

#

I'm sure my luck won't last but.... if someone tries to make me I'll find a new job

silk eagle
#

Last one I made was over 5 years ago, I evolved from windows forms app though, I was using windows presentation forms 😎

#

it looked and functioned marginally better

nocturne galleon
next cipher
#

yeah Qt is decent

silk eagle
#

just draw a UI on a sheet of paper with crayons, take a picture of the sheet of paper, slap the ui into flash player or whatever (i have no idea how to make flashplayer stuff) and then put buttons on the buttons.

#

no need to overcomplicate things with 😐 Qt designer 😐

fickle verge
#

im trying to compile a node js app but it works just fine in the terminal but when i used pkg the app doesn't work. It suppose to connect to the internet but it appears that isnt working

hollow basalt
#

you don't compile

fickle verge
#

wait so how do i turn it into an exe

hollow basalt
#

what are you actually doing now? how did you "pkg" it

fickle verge
#

pkg --debug index.js

midnight wind
#

this thing apparently

hollow basalt
#

yikes

fickle verge
#

am i not suppose to use that?

hollow basalt
#

nah, you can use what ever you want

nocturne galleon
#

can someone help me with compiling? dm me

silk eagle
#

compiling what

cinder idol
#

the red corner I'd like to put a news broadcast. any recommended ways to get fox/cnn/abc stream there?

#

hoping for a copy paste iframe but am open to more intermediate solutions

dense marten
#

Hello, I'm having some issues with CSS. Is it possible for me to have a div that is relative to the edge of a flex box on the x-axis, but absolutely positioned on the y-axis? I have a slideout that I want to be on the side of a specific column of my flexbox but always at the same height even when scrolling. I've tried position: fixed and then putting the div inside the flex box but it doesn't seem to be working how I would like as the height is moving depending on what else is before it in the flex box

wind horizon
wind horizon
midnight wind
#

But people use it not as intended

wind horizon
#

I guess, but every use case I can think of just feels wrong. Lol

midnight wind
wind horizon
midnight wind
#

less storage?
idk

hollow basalt
#

for the lulz?

wind horizon
#

I have a feeling it's mostly ppl what want to make a windows node app and not use electron. 😂

Which just feels wrong.

Think it was never the goal of node to be an executable like that. Lol

midnight wind
#

yeah..

silk eagle
#

command line node apps

mellow wyvern
#

CLIs my favorite

nocturne galleon
#

I am new to c# does it not let you use a foreach loop if you use the array initialization shortcut like public int[] numArr = new int[] { 1, 2, 3, 4, 3 }; it just prints out nothing unless I make it like numArr [1] = 500;

hollow basalt
#

doesn't look like shortcut to me

somber dome
#

Any way to check the uptime history of a process ?

#

I saw that some processes weren't up on a specific server so I started them

#

But I need to know when they went down ...

midnight wind
#

Journalctl

cinder idol
#

there a way to adjust where an iframe looks at its source page? like if i want to look in the middle of the page on load how could one do this

somber dome
#

On yeah it's a service indeed, wow it was down since the 21 of January lmao

#

It was supervising 80 ESXi 🤣 🤣 🤣

cinder idol
#
<div id="overlayse">
      <iframe id="stream"
            style="display:block;"
            width=100%
            height=100%
            src="https://www.fox29.com/live"
        ></iframe>
</div>


<script>
      setInterval(onOff, 2000);
      function onOff()
      {
        document.getElementById("stream").disabled = true;
      }
     
</script>
#

so im having an issue where I'm trying to disable either overlayse or stream and its for some reason this loop isnt working

nocturne galleon
#

made the wordle solver today from the recent 3b1b video & just got it working at about 0.3s

#

😎

nocturne galleon
#

Got a partial mojang API implementation including Microsoft identity platform auth in bash, currently it only supports the /profile endpoint but it should be easy to add more now that the auth is done, usage is ./mc.sh profile accountUsernameHere
You need to give it your own azure AD app client id though, the only dependencies not included in the gnu coreutils are curl and jq
https://gist.github.com/NepNep21/d8684d33511ca6af0dbff211ef796e0a

Gist

Partial mojang API implementation in bash, more endpoints coming in the future - mc.sh

#

I juat did it because i wanted pain for the challenge tbh, not much reason lol

#

It was surprisingly not that bad

nocturne galleon
#

Visual studio code is better for everything and visual studio should never be used, as it is proprietary and in some languages (not python tbf) it tries to lock you into micro$hit's ecosystem

sturdy ingot
lapis plume
#

dont go for visual studio

#

visual studio code is much better

nocturne galleon
#

It has everything that may make a meaningful difference to your experience

nocturne galleon
#

But yes, you should use codium

sturdy ingot
#

Either way, between the two at choice, I'd definitely use VSCode. But I also heard a lot of good stuff about PyCharm. And personally? I don't care as long as the editor experience is nice and it provides an easy way to run the scripts. So all (neo)Vi(m), Emacs, VSCode and even nano are fine (but not ed or Notepad(++)).

nocturne galleon
#

imo neovim is the best option if you can use it for all languages while at the same time using less memory than the heaviest IDE you would otherwise use, i couldn't get that to work though since the kotlin language server i tried alone already uses almost as much ram as intellij

#

also, are there any extensions that actually need the marketplace? at the end of the day couldn't you just build the package yourself and manually add it? even cpptools (microsoft's official C/C++ extension) provides (or at least used to) a file you can install to vscodium

sturdy ingot
# nocturne galleon also, are there any extensions that ***actually*** need the marketplace? at the ...

Again, Pylance is the best example: it's not open source/free software, see its README: https://github.com/microsoft/pylance-release

This repository is for providing feedback and documentation on the Pylance language server extension in Visual Studio Code. You can use the repository to report issues or submit feature requests. The Pylance codebase is not open-source but you can contribute to Pyright to make improvements to the core typing engine that powers the Pylance experience. [emphasis mine]

grizzled lake
#

honestly I really like pycharm but idk if you have to pay for it or not? SublimeText is also nice for python but I've not personally used it. VSCode is a beast and can do anything, Visual Studio is slow and crashes all the time.

nocturne galleon
nocturne galleon
# somber dome Even if you want to do .net/c# ?

i don't see why not, just have to make sure to use .net 5 for cross platform support, i will never make a program that doesn't support at least windows and linux, unless its purpose is specifically tied to one of them

#

i don't really care about supporting macOS since it would be very hard for me to test anything there due to not owning a mac and macOS virtualization being a pain

nocturne galleon
somber dome
#

I always used VSC, mainly for python and general text editor (latex, sysadmin stuff etc)
But I did download visual studio cuz I wanted to try out .net/c#

#

And wow it was slow

grizzled lake
#

honestly all you need for .net is the cli tools from the core sdk and after that you can write in any ide

wise nymph
#

I have a large javascript project with multiple files that are all "cross-requireing" themselves with file paths. Is there an easy way to "compile" all of the project into one file, with the require parts being changed automatically ?

midnight wind
wise nymph
#

Yeah it isnt, that's why I'm trying to find an automated tool to do it, but if nothing comes up I'm gonna get to it

wind horizon
# wise nymph Yeah it isnt, that's why I'm trying to find an automated tool to do it, but if n...

You can use a bundler like webpack or if it's NodeJS a lot of ppl use stand alone babel, these days circular dependency is common in JS due to the export / import process however we have seen a push to close this up a bit ever since Node 14 throwing errors for it. So now you have more people building for node through bundler or putting in plug-ins that prevent code with circular deps.

nocturne tree
grizzled lake
nocturne galleon
#

so, let's say i have a div using flexbox on the middle of the screen where the content of my website is, but i want to add a navbar at the very top, what would be the best way to do that? i tried absolute positioning but using left: 50% to put it at the horizontal center of the top puts the very left of the element at the center, not its center, so that doesn't work

wind horizon
nocturne galleon
#

so not the same size

wind horizon
#

So it's something like

Nav
Content

But nav can be smaller / bigger than content, however nav should still be centered above the content?

nocturne galleon
#

yes

wind horizon
#

So sounds like you just need flex set on the container and then 2 rows. One for nav and one for content.

I can send an example bit later after work and see if we are on same page. 😅

nocturne galleon
#

Alright thanks :D it's pretty late here anyway so i will only be able to work on it tomorrow so don't worry about doing it fast

wind horizon
# nocturne galleon Alright thanks \:D it's pretty late here anyway so i will only be able to work o...

I think this is what you are talking about, where you have centered your entire page and then inside that you want to have a nav and some content both centered inside the centered page wrapper. It sounds like you specifically want it to NOT link the size of the nav with the size of the content box. If so think this is kind of what you are looking for, if you want them linked then it's simpler and I don't think you'd need the 2nd flex wrapper.

https://codepen.io/randomcodemonkey/pen/vYpBOPX

rough kestrel
#

I am in a C++ class and we just got to multiple file programs, I use VSCODE to do all my work and can't get it to build my program.
Can someone please help me fix this, I use both windows and linux
I can use visual studio on my windows laptop until i get it fixed

hollow basalt
#

someone can

nocturne galleon
#

once you start using libraries i recommend using cmake to automatically write makefiles

rough kestrel
#

even if the same exact files work fine in Visual Studio

nocturne galleon
#

again, just "visual studio works and vscode doesn't" is not enough information, i need to know what vscode extension you're using to do it

rough kestrel
#

I would assume CMake considering I have it installed

hollow basalt
#

no

rough kestrel
#

?

rough kestrel
nocturne galleon
#

what does your CMakeLists.txt file look like?

rough kestrel
#

ive never had one of those

nocturne galleon
#

that's probably the problem, that's what that extension is supposed to work with

rough kestrel
#

what should it look like?

nocturne galleon
#

i'll send the one for my latest (unfinished) C++ project just so you have an idea

#
cmake_minimum_required(VERSION 3.4)

project(DinoFinder)

string(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_AUTOUIC TRUE)

find_package(Qt5 REQUIRED COMPONENTS Core Widgets)

set(MAIN_SOURCES 
    src/Main.cpp
    src/ui/MainWindow.ui
    src/ui/MainWindow.cpp
    src/SaveData.cpp
    src/GameObject.cpp
    src/Util.cpp
    src/ReadFailureException.cpp
)
add_executable(DinoFinder WIN32 ${MAIN_SOURCES})

target_link_libraries(DinoFinder Qt5::Core Qt5::Widgets)

the first 2 lines are required, the 3rd is optional and there are probably better ways to do it, the AUTOUIC one is only necessary if using Qt .ui files, which you're not so don't use it, find_package and target_link_libraries are also only necessary for Qt in this case, also note that with the 3rd line, if using msvc instead of gcc/mingw, you might need to change it to msvc's equivalent options

#

of course replace the MAIN_SOURCES lines with the source files for your project

#

you don't strictly need to include the headers there but some people do it, i'm not sure whether it's good to or not so you'll have to look that up

rough kestrel
#

alr so if i have this, am i gonna replace src with MultiFileExample?

nocturne galleon
#

if MultiFileExample is the same directory the CMakeLists.txt file is in, then no, just remove it entirely, otherwise yes

rough kestrel
#

ok got it, i'm gonna have another question but for now Im gonna just try this

#

it'll be a minute, i gotta walk to a class

#

alr so

#

after adding the file in the same directory I get this still

rough kestrel
#

idk how to really work with it, so i wouldnt be surprised if i did something wrong lol

nocturne galleon
#

you might need to click the build button before running it, also, remove the find_package and libraries lines, and make the name in add_executable match the one in project()

rough kestrel
#

alr

#

Starting build...
C:\msys64\mingw64\bin\g++.exe -fdiagnostics-color=always -g "F:\School\Visual Studio Code\C++\MultiFileExample\main.cpp" -o "F:\School\Visual Studio Code\C++\MultiFileExample\main.exe"
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\matth\AppData\Local\Temp\ccT1e52Z.o:F:\School\Visual Studio Code\C++\MultiFileExample/main.cpp:6: undefined reference to Vector::Vector()' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\matth\AppData\Local\Temp\ccT1e52Z.o: in function main':
F:\School\Visual Studio Code\C++\MultiFileExample/main.cpp:7: undefined reference to `Vector::print()'
collect2.exe: error: ld returned 1 exit status

Build finished with error(s).

#

this is what i get when i go to build it

nocturne galleon
#

does Vector.cpp contain a Vector::print() function?

#

and a constructor?

rough kestrel
#

yes it does

nocturne galleon
#

also i forgot to tell you to remove the autouic line again, do that

#

and i don't know why it would be giving linking errors

#

the functions should be available since you put it in the add_executable

rough kestrel
#

seems like the same error

#

i even switched up my setup a little bit and I still have the same issue

#

lemme explain what I mean, I use both linux and windows (two different machines) to program. my laptop is windows, desktop linux, I have a file server where I store all of my programs so i can easily access it on both machines, it works amazing typically, however i figured maybe it could cause an issue with this, so i switched over to my local VSCODE directory on my laptop, copied the code over, and tried it again, same error.

#

it's a weird setup admittedly, but it works well for me

rough kestrel
#

when i stop telling it to use any of the functions and have a hello world program it says

#

here's a picture of the code

nocturne galleon
#

Yeah i don't know

#

Sorry

rough kestrel
#

damn alr, thanks for the help tho

#

if i cant figure it out, i can always just use Visual Studio on my laptop and use a VM on my desktop, although it'll be a little annoying tbh

#

im gonna go watch some videos on how to do it sometime in the next few days, hopefully, i'll be able to get it to work

midnight wind
#

It's kinda a pita , try using WSL

rough kestrel
#

im also not really sure what that is or how to use it

wind horizon
nocturne galleon
#

Can you suggest me some 3D modeling software. Also happy to know how much productive are they. Also it would be more helpful if they have a ASME/ISO based library for parts.

nocturne galleon
#

@hollow basalt why the reaction?

spring pond
somber dome
#

Any good ressource to learn .NET, the goal is to learn how to make simple visual applications. I really do struggle with the whole "front end" part of programming

tired tapir
#

Bit of a long shot but any chance someone here can help me make a batch script to disabled and enable my network adapter? goaPleadingShy

midnight wind
hollow basalt
#

Doesn't sound a long shot to me

tired tapir
#

thanks for that! will try

safe forge
#

any idea whats the error here?

hollow basalt
#

yes

lethal agate
#

Anyone got IDE suggestions for Python and C++?

#

Trying to find where to move away from JetBrains

hollow basalt
#

Jetbrains

lethal agate
#

I don’t want to use JetBrains anymore

#

After their email a few hours ago

#

“Vote with your wallet” you know

hollow basalt
#

what's their email

lethal agate
# hollow basalt what's their email

Well they sent email to me today about them stopping sales in my country and our main ally, so I think it would just be dumb to continue supporting them after that

#

¯_(ツ)_/¯

hollow basalt
#

oh, haven't heard about that

#

Didn't know an IDE maker would take a stance on the war

lethal agate
#

Yeah

#

So fuck them

midnight wind
lethal agate
#

Yeah I’ve been considering it

midnight wind
#

not exactly an IDE

lethal agate
#

I find it mildly confusing but it could perhaps work

lethal agate
midnight wind
#

it's less of an IDE, and more of it connects to existing tools on your computer

midnight wind
#

it just connects to g++ or whatever and runs it there

lethal agate
#

But is it really different to the user if the outside is the same?

midnight wind
#

well it's not setup and ready

lethal agate
#

I think if I manage to understand how navigation works in VScode works I’ll likely switch to that

midnight wind
#

requires user setup

lethal agate
#

I can already create projects I think and write there

midnight wind
#

need to setup a tasks.json like json { "tasks": [ { "type": "cppbuild", "label": "C/C++: g++.exe build active file", "command": "C:/msys64/mingw64/bin/g++.exe", "args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"], "options": { "cwd": "${fileDirname}" }, "problemMatcher": ["$gcc"], "group": { "kind": "build", "isDefault": true }, "detail": "compiler: C:/msys64/mingw64/bin/g++.exe" } ], "version": "2.0.0" }

#

not exactly plug and play like an actual IDE

slate frigate
#

@lethal agate your license still works, they just won't be selling anymore

lethal agate
slate frigate
#

fair enough ¯\_(ツ)_/¯

hollow basalt
#

I'm not supporting the war in anyway, but jetbrains withdrawing seems ehh at best

lethal agate
#

Alright, I think I’ll try coding in VScode today

wind horizon
#

I mean continuing to use it isn't supporting them since you already paid. 😅

cloud knot
frank junco
#

Visual Studio is saying that at line 9 (the beginning of the for loop) it expected an expression but I do not under stand what expression isn't there:

#include <cstdlib>
using namespace std;

int main() {
    int guess;

LOOP:
    for (int randNum = rand() % 101;) {
        cout << randNum;

        cout << "Guess a whole number from 0 to 100";
        cin >> guess;
        
        if (guess == randNum) {
            break;
        }
        else if (guess > randNum) {
            cout << "Too high. Try again.\n";
            goto LOOP;
        }
        else if (guess < randNum) {
            cout << "Too low. Try again.\n";
            goto LOOP;
        }
    }
    
    cout << "Congratulations!You figured out my number!\n";

    return 0;
}```
silk eagle
#

"expected an expression" is probably just the ide saying "bro what" cuz the code is basically saying "for integer"

#

(havent touched that lang since skyrim released, could be very wrong)

frank junco
silk eagle
#

define guess and randNum
while loop {

}
correct!

#

that's how i'd do it atleast

sturdy ingot
silk eagle
#

i thought that was weird KEKW

sturdy ingot
#

Also, if you just remove the LOOP: label and the gotos, your code will work fine and won't generate a new random number on every wrong guess.

frank junco
silk eagle
#

😔

sturdy ingot
#

Eh, homework is something else. Unless you get points for style I wouldn't bother with homework code either as soon as its running.

#

Still if you want to improve your code after it works feel free to head over to https://codereview.stackexchange.com/. They will be happy to give you some points (if it works, they have a only-working-code policy IIRC).

Need to go to work, happy coding.

hollow basalt
frank junco
silk eagle
#

yea but doing it once might tempt you to do it twice

#

and doing it twice is basically just doing it once a second time

somber dome
#

I have a somewhat stupid question
I'm using vim daily (there isn't even nano on the servers), my usage is really simple most of the times. I kind of basically only do "i, blablabla, esc, :wq", some /tosearch + n and that's basically all I know
I'm trying to learn a bit more about it

But ... everyone talks about hjkl .... why ? My arrow keys works by default, do I have a custom installation of vim or something ?
I know hjkl is better cuz it's on the home row so you move less your hand, but is it a normal behavior to have arrow keys activated ? I mean so many people are talking about hjkl being "the first step" that I find it a bit strange

#

Do you have an example ? Because "str" is a "type" in python and can't be used like that
Did you mean, "I have a variable of the str type and what does "variable[0]" do ?"

#

Yes

#

But you can't have a "string variable" named "str" so be careful

nocturne galleon
#

When using a 2D array as a grid for a player map why is it RowIndex -- to go up instead of RowIndex++

sturdy ingot
# somber dome I have a somewhat stupid question I'm using vim daily (there isn't even nano on ...

IMHO, it's more about Vim "sentences" than using strict hjkl. E.g. want to go down 10 lines? Use 10j (or 10<down>). Want to delete three words? Use d3w. Want to grab the string at place? ya".

Understanding verb + repetition + motions and repetition + action is the first step. Staying on the home row increases the likeliness of finding the motions by accident, but no usage of hjkl will ever teach you that ^a (control+a) increases the number at your cursor (and similarly, 3 ^x will decrease the current number by 3).

sturdy ingot
slate frigate
livid bison
#

Oh my I just discovered a hilarious bug

#

Anyone here familiar with python's logging module and setting up multiple handlers?

#

And how to avoid recursively multiplying the amount of handlers kekLaugh

nocturne galleon
# slate frigate Sounds like rows are indexed from top, down.

I think I get it now in this case first row is row 0, second is row 1 third is row 2. So you are forced to go down first using row++ to row 2 for example then to go back up to row 1 call row--. This makes sense I guess just confusing because indexes go up as you go down.

slate frigate
livid bison
somber dome
#

Also hjkl is really NOT ergonomic, it should be jkl; .... but I can't remap that on all servers 😦

livid bison
#

Also hjkl is really NOT ergonomic
Ortholinear keyboard gang rise up cooldoge

somber dome
#

I mean my hand naturally rest on jkl;

#

Like my index is on j by "default"

#

And having it on h isn't ergonomic to me

slate frigate
#

Who needs an index when typing? #TRexTyping

silk eagle
#

I do hunt and poke without the hunting

#

and with more fingers, i think that's trex typing

nocturne galleon
#

i keep one on my mouse and the other wherever

hollow basalt
silk eagle
#

personally I just hit random keys and then figure out where i am from there

slate frigate
#

So far no one has figured out I'm a monkey with a typewriter

somber dome
#

And yeah I use those little bumps to know where I am

somber dome
nocturne galleon
#

kinda a pain in the ass to learn

#

learning how to do regex patterns ?

deft sigil
#

dunno for regex in bash|egrep (as i dont know the analog for it but it might be worth looking it up if there are any) but in python(and most other languages) your better of using the buildin string variables for lettermatching , + casefold , as there might be some odd characters in there that are technically "letters" think of the ß in: straße its lowercase but using casefold on it would convert it to 'ss', normally i wouldnt worry about it but if your using it on books , there is a chance there alre some of these letters in there , "it was all fun and games untill somebody invented ascii codepages" 🙂

#

does anybody know if there is a priority for wich way python searches $PYTHONPATH? (in otherwords do i prepend or append in order for python to use the pad i add before the rest for identical modulenames? or does python have a different build in priority for certain paths for like sys.executable or so?)

nocturne galleon
pliant siren
#

are you trying to search for what, words without a vowel? You know you can use ^[aeiou] right?

deft sigil
nocturne galleon
nimble shore
#

anyone here who had worked with webapps and Tally in past?

hollow basalt
#

Whats a webapp

nocturne galleon
#

[b-df-hj-np-tv-z] is the one that I used so that its cleaner

hollow basalt
nocturne galleon
hollow basalt
#

Then invert that also

nocturne galleon
#

which is what i figured after learning more about the classes

hollow basalt
nimble shore
nocturne galleon
#

client is really happy with the web app we deployed KEKW excited to get more in the future, hopefully, bigger pay 😎

nocturne galleon
#

the big time savings was figuring out where to post the data, thank god for Google Sheets API, and with it having decent free allocation on bot posts and requests, it was more than enough for the client

shy helm
#

It’s a forward linear scan

deft sigil
livid bison
#

Man, compiling Python from source on an Arm CPU from 2012 is kinda slow, who woulda thought?

somber dome
somber dome
livid bison
somber dome
#

Okay so I'm starting to learn vim a bit for work (servers with no graphical interfaces, only vim available)
And i'm falling in love with it

I just found out that we can use :e . to open up a file explorer inside vim, and it's so much better than using cd/pwd/ls for normal stuff

#

Pretty sure I won't ever get out of vim when doing anything lmao

#

ssh into server => vim even if it's to restart a service (lmao maybe not)

median arch
livid bison
#

I’m sure apple’s M1 handles it just fine

next cipher
#

it has nothing to do with the architecture, it's just that the raspi is still a low power processor

#

raspi is pretty fast for a low power ARM chip but it's still limited to a 7W tdp iirc even in the latest ones

#

the basic m1 even in the passively cooled MBA is still ... 10W? i think 15W peak

#

so a good bit more power (and it's on 5nm process)

livid bison
#

Yeah the arm chip in this orangepi was slow even when it released 10 years ago

proper bridge
#

Hi, does somebody know how to cross-compile a Qt application for a 32bit raspberry pi from windows?

median arch
proper bridge
silk eagle
#

Day 615 of being burnt out, thinking about being productive today. oops, day's over

nocturne galleon
#

I always wanted a rasberry pi but I feel like it will just sit on my desk and do nothing because I dont actually need one lol

fringe mural
#

Speaking of raspberry pis. Can someone help me out with something? Im trying to make a LIRC remote with my pi 4 and the most recently tutorial I could find uses this circuit

#

In it, they use an external powersource instead of the 3.3v supply from the board. Any idea why?

frank shard
#

Can anyone help me with unreal engine 4

nocturne galleon
#

no

frank shard
#

Ok

supple hull
#

Oh god, going over the Drupal 9 site that our contractor built and he's using some bs called Lando which is a wrapper for Docker and stuff. I hate getting this removed from things. It's locked docker desktop version 2.x and Docker is now Docker 4.x which could totally screw me on other projects.

#

Drupal devs are really are a different breed

#

I'd rather just docker exec bash into my containers and run the things

#

Brutal amount of containers for a CMS

timber marten
#

how to connect to a database using "CSS" ?

#

that's what my employer wants me to do.......
can any1 help linuth

silk eagle
supple hull
#

Otherwise that's like asking "How do I connect my house paint to the electric outlet"

supple hull
# timber marten that's what my employer wants me to do....... can any1 help <:linuth:65437995504...

Not sure how versed you are but CSS a static text asset that doesn't have any scripting abilities in itself, there's logic patterns you can put in but that's it. It's used to style markup, specifically HTML, setting things like fonts, colors, layout/position of various mark up items, menus and so on.

I'd suggest taking this nice and easy, by following up your answer with a question, "CSS isn't designed for that, what were you hoping to accomplish?" for clarification. Then you can then drill down.

timber marten
supple hull
supple hull
#

"Let's get this party started!" Lando, go f (warshipped) yourself. I am not partying, I am trying to spin up a drupal website. There are few things less party than fuckin' drupal.

cloud knot
next cipher
#

the worst part is you could probably do that in some horrifying hacky way with modern CSS features

cloud knot
#

(or i think it was gitlab. maybe sentry. can't remember)

supple hull
midnight wind
#

one thing that annoys me is just how many website can be static

#

yet they use wordpress, arghh

#

my static website takes like less than a second to load

#

WP websites I find that at least a second, often more

wind horizon
supple hull
# wind horizon Are those all containers? Dang

When the contractor told me he really liked Lando I was like "Fine, whatever." This is for an important client but I was happy I was migrating 7 years of data from Drupal 7 to Drupal 9. Usually a CMS website docker container stack when I've made them is all of the CMS container (Apache/PHP) and DB container.

#

I'm not a fan of things that divorce you from the tech by too much abstraction. TypeScript might be the one exception. I could tell the dude didn't really know what it was doing too when he was helping me set it up.

#

It messed up and I went in and deleted the images manually that it'd installed and he didn't quite understand images v containers

#

Dude is a drupal expert, and he really does know drupal well but I'm glad I'm not married to any single framework or worse, CMS.

#

One last minor complaint, guy is one of those copy and paste monkies and we're all guilty of it but he just copy and pasted this mess of gulp tasks and he's on an Apple Silicon machine like me but runs Gulp via rosetta since he's not sure how to update the tasks so I'll have to do that. It's on Node v14. I get it not really his world, I started as strictly a front end dev.

silk eagle
#

I like reading the messages here without knowing what most of these things are so I play a game where I guess what something is and then google it to see if I was right.

supple hull
#

Being a dev channel there's certainly a lot of range here

wind horizon
#

I been spending my day working on a browser extension with built in graphs. Graphs can be a pain enough, also fitting then into inside a small extension popup window and still making sense. 😂😂

slate frigate
#

@wind horizon thats why I love having a frontend guy. I just blast him with data, he makes the pretty graphs and dashboards to visualize it

#

All I have to worry about is performance.

wind horizon
#

I do full stack, so I'm like that person who "can" do both but master of none. 😂

slate frigate
#

I'm fairly center I got a frontend guy because they were getting tired of looking at my printouts

wind horizon
#

I can execute on designs pretty well and make judgment calls on ugly things or poor ux. However don't ask me to design something, if I have a blank canvas I'm just like...umm... Lol

slate frigate
#

Oh, my uglyness was 100% my intent. Nowhere in my job description does it say "artist", so beware ye who asks me for a ui.

supple hull
#

As far as graphs, man, I'm a front end guy but D3 is just beyond me. Of course you can make a career out of just knowing D3 well.

#

Anything <canvas> to this day is just ???? to me despite going pretty far off the deep end on SVGs and animating them

wind horizon
#

I did D3 once, made an awesome graph out of it at my last job since they wanted something custom no one had yet.

Took me solid week just learning how todo what I needed. Looked awesome when done, but now 2 years later I tried to use D3 and was like........ Idk wtf I'm going and I don't wanna spend a week to learn it again. 😂

supple hull
#

I used a wrapper for D3 (remember how I was bitching about how you shouldn't do this?) It was great for a project until I was asked to do something the wrapper didn't support.

#

You fed the wrapper JSON and some configuration and got super happy fun amazing D3 charts

#

I looked like a boss for a hot second there

wind horizon
#

There are a few of those, they always start out great and then the product person asks for something the wrapper doesn't support and your world falls apart. 😂

#

The worst are the D3 wrappers that someone then made a react wrapper for. So it's like you lost some of D3 power to get simplicity and then you lost even more and even some bugs from someone who made a hack wrapper around a wrapper. 😂

supple hull
#

Fortunately it was a mock up for a UI. For awhile, my company would get these random one off projects from Intel that were kinda fun. They'd want a super high fidelity mockup. I'd build a simple react app simulating the functionality for them and hand them off. They'd use these to demonstrate to the top people what they intended

wind horizon
#

I'm pretty unhappy with most react chart options outside high charts and high charts cost $ ppl aren't always willing to pay for. Lol

supple hull
#

I think the scale Intel is, they'd rather burn $20k on a mockup and have the UX hammered out then

#

Man, I hate graphs and react

#

I liked those projects as I'd just create a dummy data JSON file and then the intel guys could just change the numbers to reflect the thing they'd be doing or replace the copy etc

wind horizon
#

Haha nice

supple hull
#

The Drupal 9 project is for a very large retailer and it's their corporate website. For years I've been the only guy who makes said mega corp's website. I'm not sure if I'm on an NDA for that one so it's just a very orange company.

#

I hate drupal 🙂

#

The great irony is they might launch this site and just have me remake in.... wordpress. Wordpress will haunt me to the grave. We'll be in 2080 and have Wordpress version 29 on our AR decks.

silk eagle
#

Alright team what companies are orange

wind horizon
#

Hmm idk e-commerce so no idea who is orange. Haha

#

I had an old employer that was orange, but that wasn't e-commerce

supple hull
#

They aren't just ecomm only other hint, but you can list 'em but I won't say 😉

silk eagle
#

alright its home depot

wind horizon
#

Oh I forgot about them, I always see listing in Houston for them with React.

Can't remeber if it mentioned Drupal. 🤔

supple hull
#

Ideally we'd move to a headless CMS and build a really cool front end that could be torn down every x amount of years

midnight wind
#

I've been playing with Hugo rn

supple hull
#

Drupal 9 can sorta kinda be used that way but the structure is weirdballs

#

it is kinda cool though it has GraphQL support... kinda

midnight wind
#

But I need to learn more WordPress since alot of sites we manage use it

wind horizon
#

Burn it all down and come join the micro-service world.

supple hull
#

Again, I'd love to have a headless CMS and fart all the content to a cool front end. Hell, you could even make an app that hits the stupid site.

supple hull
wind horizon
#

Lol next time I work with an API to spit out stuff for a FE I'm going to say "fart all the content"

midnight wind
#

It's so stupid, most can just be static

supple hull
#

Marketing people love wordpress. It's that whole danger factor where you can install horrible SEO plugins and data tracking pollute the site and the WYSIWYG editor was really solid and now Gutenberg is also fairly solid.

supple hull
midnight wind
#

The problem is a visual editor

supple hull
#

I've debated going to wordpress many-a-time

#

As I want to focus on writing, not writing markdown or HTML

midnight wind
midnight wind
supple hull
midnight wind
#

Go

#

That's my main problem, not very friendly

supple hull
#

I really need to move my site something else. Jekyll has served me well though

midnight wind
#

Gatsby has this thing where you can use WordPress as CMS

#

I also may want to look into some WP to static generators

supple hull
#

If any static site generators have a nice oldschool wysiwyg editor, that lets me sometimes jam in custom HTML that'd be enough. I just haven't looked. I tried installing a Jekyll manager but it wasn't very useful.

#

I also could just use wordpress, I mean shit, I write entire themes and plugins and custom gutenberg blocks from scratch. I just don't feel like doing that 🙂

wind horizon
#

Whenever it comes to personal stuff I feel like a lot of devs just don't want todo it. 😅

#

Spend too much time doing it for work. Making a npm module for fun, browser extension, whole custom react app for viewing data of my current fave game. Yup np.

Make a website for myself, not even a basic html one. My domain goes to nothing, just have an email. 😂

supple hull
#

I have a substantial blog

#

Mostly because I accidentally wrote a massive upgrade guide for Apple Mac Pros.

#

Gets a fair amount of traffic but I'm exceptionally lazy about posting to it. 2-3 posts a month for years and years, mostly since I don't have much to show for social media. Never had a twitter account. I have a linkedin profile I never update. I'm not active on github.

wind horizon
#

I'm semi active on github, all the others I just update when I switch jobs. Lol

#

But my new employer uses github enterprise on prem, so I'm on the public one a lot less now.

spring cradle
#

hypothetically, how inefficient would it be to attempt to make a basic social media with git submodules, hugo blog and a commenting system hooked into a ci?

midnight wind
#

Pretty inefficient I would say

#

Since you are rebuilding whole website for just another post

hollow basalt
#

Do it for the lulz

spring cradle
#

maybe a ssg with partial rebuild support could work

nocturne galleon
#

What is wrong with youtube engineers I cant send a helpful link but the same video could have 1000 crypto scam comments with shady urls? 🤦‍♂️

wind horizon
silk eagle
#

is it product or is it the first engineering people who decided it and then 5 years later still using wordpress

wind horizon
hollow basalt
#

if they have a dedicated engr team, why are they using wordpress in the first place

wind horizon
#

I was talking more so in application development, like a platform like YouTube.

silk eagle
midnight wind
#

like, I made a website on it real fast, since I found a theme for what I needed

#

a TEDx site for my school

silk eagle
#

cuz I'm not wanting to put in the dev time to remake everything, if they're happy then I'm employed

midnight wind
wind horizon
#

I think maybe that comes also from the fact that many WordPress sites don't have huge engineering teams behind them. Lot of companies I know that run them often contract out WordPress work or have limited staffing for the WordPress site. I'm sure there are deff cases that isn't true, I'm just speaking from what I have seen in the past. lol

When you have major engineering teams behind custom platforms often times apps do get rewritten even when they are custom, since improvements are made, platforms change, issues with early decisions come up and you rearch a new app that address them.

midnight wind
#

as much as I hate wordpress, I love it

hollow basalt
#

i agree roaldi

slate frigate
#

And you can properly secure a wordpress, you just have to be security conscious.

silk eagle
#

it has its place in the world, to both make sites faster and make sites slower

slate frigate
#

I've attempted writing my own CMS before, and NOPE. Its a huge pita

midnight wind
#

I'm looking into generating static sites from wordpress. Security wise and it should be faster.

hollow basalt
slate frigate
#

@hollow basalt i was writing it on top of gin (golang http framework) but it was just a lot of work for something that wasn't going to have much pay off. Rather have someone else develop it, and other people test it.

silk eagle
#

I was learning golang for a while, it was neat and all but I ultimately stopped because I kept having to put "golang" instead of "go" in my searches

#

so now I'm learning ruby because I already know english so what else is there to learn

hollow basalt
wind horizon
#

And tbh one of the biggest reasons I favor NodeJS isn't even NodeJS, it's just because I love working on the same language front-end and back-end. I know many of my old co-workers on Ruby and Python projects would shake their heads seeing me using NodeJS for that reason. 😆 😆

silk eagle
#

I really enjoy ruby, it's all the fun parts of python with all the usable parts of things that arent python

safe forge
#

i've just started learning php and boy, its tough

#

programming is tough for me, but i need it for my finals

nocturne galleon
#

Guys when i try to click on admin (under actions) in XAMPP nothing opens, how can i fix this?

frank junco
#

I don't understand why I am getting these errors in my code (please ping me):

#include <cmath>
#include <iomanip>
#include<stdlib.h>
using namespace std;

int main() {
    const float piVal = 3.14159;
    float b;
    float h;
    float r;
    int choice;

    cout << "Geometry Calculator\n\n";
    cout << "1. Calculate the area of a circle\n\n";
    cout << "2. Calculate the area of a rectangle or square\n\n";
    cout << "3. Calculate the area of a triangle\n\n";
    cout << "4. Quit\n\n";
    cout << "Enter your choice (1-4): ";
    cin >> choice;

    while (choice > 4 || choice < 1) {
        cout << "\n\nPlease only input the numbers 1, 2, 3, or 4.";
        cout << "\n\nEnter your choice (1-4): ";
        cin >> choice;
    }

    while (choice >= 1 && choice <= 4) {
        switch (choice) {
        case 1:
            cout << "\n\nEnter value of the radius in inches: ";
            cin >> r;

            while (r < 0) {
                cout << "\n\nPlease enter a number that is 0 or greater: ";
                cin >> r;
            }

            float circleArea = piVal * (pow(r, 2));

            cout << "\n\nThe area of the circle is " << circleArea;

            return 0;
        case 2:
            cout << "\n\nEnter value of the base in inches: ";
            cin >> b;

            while (b < 0) {
                cout << "\n\nPlease enter a number that is 0 or greater: ";
                cin >> b;
            }

            cout << "\n\nEnter value of the height in inches: ";
            cin >> h;

            while (h < 0) {
                cout << "\n\nPlease enter a number that is 0 or greater: ";
                cin >> h;
            }

            float rectArea = h * b;

            if (h == b) {
                cout << "\n\nThe area of the square is " << rectArea;
            }
            else {
                cout << "\n\nThe area of the rectangle is " << rectArea;
            }

            return 0;
        case 3:
            cout << "\n\nEnter value of the base in inches: ";
            cin >> b;

            while (b < 0) {
                cout << "\n\nPlease enter a number that is 0 or greater: ";
                cin >> b;
            }

            cout << "\n\nEnter value of the height in inches: ";
            cin >> h;

            while (h < 0) {
                cout << "\n\nPlease enter a number that is 0 or greater: ";
                cin >> h;
            }

            float triArea = (b * h) / 2;

            cout << "\n\nThe area of the triangle is " << triArea;

            return 0;
        case 4:
            return 0;
        default:
            return 0;
        }
    }
}```

Visual Studio is giving me these errors:
hollow basalt
#

A - none of the above

nocturne galleon
silk eagle
#

My journal is just adding notes to code

#

We don't talk about how you chronologically order them

unborn cosmos
# frank junco I don't understand why I am getting these errors in my code (please ping me): `...

Try wrap your case statement with {}, for example:

 case 1:
{
        cout << "\n\nEnter value of the radius in inches: ";
        cin >> r;
        while (r < 0) {
            cout << "\n\nPlease enter a number that is 0 or greater: ";
            cin >> r;
        }
        float circleArea = piVal * (pow(r, 2));
        cout << "\n\nThe area of the circle is " << circleArea;
        return 0;
}```

This is because the case statement doesn't introduce a new scope
slate frigate
#

Planning? Whats that? #FeatureCreep

silk eagle
#

It depends, usually there's some planning ofc, if it's a big project then I'll make a little workflow Silicon Valley HBO sticky note wall that imitates Notion, but for smaller projects most of the planning is just mental for me.

slate frigate
#

I'm a solo dev, so it'll depend on the size of the project. Right now I'm working on something I did some planning for, but it nothing more than some diagrams to visualize data flow, and a little psuedocode

#

I do use jetbrains team tools, like TeamCity and YouTrack, but thats more for an internal ci/cd pipeline

viscid lintel
#

I need help with my VScode homework

#

I need a driver test class with my code

#

Language is java

viscid lintel
#

I’m super busy with midterms this week to do it

hollow basalt
plush valley
#

I do this both on Physical Notes and through a Personal CMS/Wiki

plush valley
viscid lintel
#

I really need help with jus the test driver

hollow basalt
#

Yea, so you should start like right now

viscid lintel
plush valley
#

A test driver is just a class that tests all the functions of your function class

viscid lintel
#

Idk how to make one is the problem

plush valley
#
public class HelloWorld {
  public void hello() {
    System.out.println("Hello, world!");
  }
}
``` < Your Class that contains all your Functions

public class HelloWorldDriver {
public static void main(String[] args) {
HelloWorld sayhello = new HelloWorld();
sayhello.hello();
}
}

viscid lintel
#

So wait

#

Can you create one that works with my code?

viscid lintel
plush valley
plush valley
viscid lintel
viscid lintel
plush valley
#

"Its like they are sending your code in the crash reports...."

#

click

nocturne galleon
deft sigil
plush valley
deft sigil
slate frigate
#

importing?

hollow basalt
#

import process

nocturne galleon
#

hello, i am having some trouble with swing (and a jfx webview), there are 2 issues:

  1. it appears that the WebView i am trying to add to a subclass of JPanel using a Y_AXIS BoxLayout is being added to the very top instead of the bottom, even though it's the last thing added before an element that appears at the bottom, is this intended? how can i avoid it?
  2. the WebView only appears as a thin white line
    what am i doing wrong? here is the code and an image of the resulting interface (the arrows point to what seems to be the webview), also the reason i'm not using lambdas is that i have to use java 6 syntax for a reason that's a bit of a pain to explain (no, it's not homework, if you feel it's important enough i can explain it but i don't think it's relevant to this)
if (!MicrosoftAuth.shouldUseDeviceFlow) {
            Platform.runLater(new Runnable() {
                @Override
                public void run() {
                    WebView webView = new WebView();
                    final JFXPanel jfxPanel = new JFXPanel();
                    jfxPanel.setScene(new Scene(webView));
                    msaLogInForm.auth.browser = webView.getEngine();
                    SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            add(jfxPanel);
                            add(Box.createVerticalStrut(300)); // To demonstrate that the webview is on top
                            validate();
                        }
                    });
                }
            });
        }

https://cdn.discordapp.com/attachments/894881243617955850/943944312671047850/unknown.png

#

i have been trying to figure this out for like 2 months but still nothing :<

nocturne galleon
#

agony

viscid lintel
#

911 EMERGENCY

#

Can some test my IntelliJ code?

hollow basalt
#

no

viscid lintel
hollow basalt
#

Geese

viscid lintel
#

Lol

nocturne galleon
#

Is this for an assignment / test in your school or sumthn

silk eagle
#

exporting

river sorrel
#

hi guys, I am having problem with a C++ code, can anyone help?

silk eagle
silk eagle
#

that way its not a whole back and forth thing its just you say the issue, someone appears and tells u what the problem is, and then everyone is happy, no "anyone help", "sure bro whats the problem", "ok bro its this: ", "ok bro here where u went wrong"

river sorrel
#

so the problem i am having is with Queue in C++
basically i am getting a random 0 in my queue
other than that everything is working fine

hollow basalt
#

unlucky

river sorrel
silk eagle
#

Whatever is relevant to the issue, so probably definition of the obj queue (so close) class if thats a thing u made, or enqueue or display and whatnot

river sorrel
#

above are all the images of implementation

hollow basalt
#

Looks good to me

#

0 is expected

river sorrel
#

is there anyway to remove this?

hollow basalt
#

yes

river sorrel
#

how?

hollow basalt
#

fix your code

river sorrel
eternal scarab
#

Anyone got any experience in creating Virtual printer that acts like wifi/network printer ? (Ubuntu/Linux)

#

If so please ping me

slate frigate
nocturne galleon
river sorrel
#

the problems fixed, thanks to ᕼᗩᗷITᑌᗩᒪ

nocturne galleon
slate frigate
#

@nocturne galleon moving the cursor before setting the value

slate frigate
#

Easy fix.

nocturne galleon
#

why are they different?

slate frigate
#

The unicode encoded one was borking on some other servers, and on android

#

@nocturne galleon so I just made it simple

nocturne galleon
#

ah i see, discord just hadn't updated it yet for me in the messages

#

newer ones work properly

slate frigate
#

Yeah, pretty sure discord stores username and user uid seperately, so older messages will still have the older username associated with the message id

#

If its any way similar to how telegram does things. And I'm WAY too familiar with the telegram API.

nocturne galleon
#

i don't know much about the discord API, only like 1 endpoint that i had to implement myself since JDA doesn't support it yet

#

but yeah, the user id (snowflake) is handled separately from the tag

#

i like how simple it is to add new requests to JDA, nice API design

#

(if implementing it for general use, an AuditableRestActionImpl<Sticker> or something like that should be used, since that endpoint returns the sticker data on success, but i don't need that for this so i didn't do it)

nocturne galleon
#

currently rewriting my image upload script to use node.js instead of bash, to be able to determine whether the screenshot was cancelled without having to use a temporary file, but i keep getting a bad request response, any ideas?

#!/bin/env node
const { execSync, spawn } = require("child_process");
const exit = require("process").exit;
const randomUUID = require("crypto").randomUUID;
const request = require("https").request;

const key = ""; //Enter key from upload.systems

const image = execSync("flameshot gui -r", { "encoding": "buffer" });
if (image.length === 0) {
  exit(1);
}
const boundary = "--" + randomUUID() + "--";
const dataBeforeImage = `${boundary}\r\nContent-Disposition: form-data; name="file"; filename="api.png"\r\nContent-Type: image/png\r\n`;
const dataAfterImage = `\r\n${boundary}\r\nContent-Disposition: form-data; name="key"\r\nContent-Type: text/plain\r\n${key}\r\n${boundary}`;
const reqData = Buffer.concat([Buffer.from(dataBeforeImage, "utf8"), image, Buffer.from(dataAfterImage, "utf8")]);
const post = request("https://api.upload.systems/images/upload", {
  "headers": {
    "Content-Type": `multipart/form-data; "boundary=${boundary}"`,
    "Accept": "application/json",
    "User-Agent": "ShareX/13.4.0"
  },
  "method": "POST"
}, (res) => {
  const code = res.statusCode;
  if (code >= 400) {
    console.error(code);
    return;
  }
  res.setEncoding("utf8");
  let data = "";
  res.on("data", (chunk) => {
    data += chunk;
  });
  const url = JSON.parse(data).url;

  const xclip = spawn("xclip", ["-sel", "clip"]);
  xclip.stdin.write(url);
});
post.write(reqData);
post.end();
strange pawn
#

did you want to share that key

slate frigate
#

@nocturne galleon

1.) Don't forget to sanitize stuff like that key.
2.) Why use flameshot? Surely node.js has a screenshot library you can import, that way you have way better control over stuff like checking if it has been canceled

nocturne galleon
#

well damn, i thought i had more experience than to forget to remove keys when asking for help like that lmao

#

as to why flameshot, it's what i already have, using js is just a workaround i'm having to deal with

#

already reset the key fyi

slate frigate
#

@nocturne galleon I'd check to see how you're building the multipart form.

#

I'd try using something that'll build it for you, that way it makes it easier for developing.

nocturne galleon
#

it would but i really want this to be a single file script, and without having to mess with build tools

slate frigate
#

I imagine it'd be part of the sdk. It is for golang and python

nocturne galleon
#

it is not part of node.js from the research i did

slate frigate
#

Thats a pain.

nocturne galleon
#

it looks good to me from comparing it to examples i found online

wind horizon
nocturne galleon
wind horizon
slate frigate
#

Maybe its just because I don't use node, but this feels like a python thing to me

nocturne galleon
#

As in i should use python? No, python is the popular modern language i have the worst time reading

#

So it is not something i will ever consider, it's a pain to read

wind horizon
#

Did you try logging your form submission to make sure it all looks good?

nocturne galleon
#

Maybe i can try passing it through a validator, assuming one exists

wind horizon
#

Hmm could use one of those libs to generate a good request and log it, compare. 🤔

I'd also maybe try simplifying the script and submitting a img you already have to cut out the complexity of your child process buffers for the screen shot and validate your base request code works as expected.

nocturne galleon
#

Thanks for the help everyone, I'll look into it tomorrow :)

cinder idol
#

Thinking of making a Stardew valley clone for my own personal experience. I’ve used html5 canvas and JavaScript in the past to make basic 2D games but I’d really have to relearn everything. Or I could try out using an engine like unreal or unity. Any recommendations?

slate frigate
#

@cinder idol Nothing to say you can't, but you're going to run into a lot of frustration dealing with systems that weren't meant to do that

sturdy ingot
fallow nimbus
#

Hoping someone here can help me out, I was lurking in another channel while working on this and then noticed this one. I'm writing some code in java and I'm getting an operator passed to this function as a string so something like variable = "+" I need to preform that action, in this case addition, on two other variables and store the value in another variable. I'm trying to google how to go about getting that + from being stored in a variable as a string to being able to be used in an expression like 2 (variable) 3 would equate to 5.

Also now that I write this out I'm beginning to question if I am even going about this the right way? Should I just set up some kind of logic that boils down to:
"if variable.equals"+" do addition on this"
" if variable.equals"*" do multiplication this? "

#

fair enough lol, thanks for the reassurance!

nocturne galleon
fallow nimbus
amber cloud
#

Any flutter gurus around?
I want to make an application that is primarily used on the console but can be opened as a gui too
I can read passed arguments but not write to stdout (not shown in this example but I tried).
Also a zombie windows stays behind after I return main.

How can I prevent that window from opening automatically?

import 'package:flutter/material.dart';
import 'dart:io';

void main(List<String> arguments) {
  if(arguments.isNotEmpty) {
    File file = new File("/tools/test.txt");
    IOSink io = file.openWrite(mode: FileMode.write);
    io.writeln("HELLO");
    io.writeln(arguments);
    io.close();
    return;
  }else {
    runApp(const MyApp());
  }
}

//class MyApp extends StatelessWidget {
//default project continues from here
cloud knot
# amber cloud Any flutter gurus around? I want to make an application that is primarily used o...

if you read the documentation, runApp only replaces the 'root widget' with your app https://api.flutter.dev/flutter/widgets/runApp.html . So by that time, the window already exists.

https://github.com/leanflutter/window_manager maybe the hide/show method ?

GitHub

This plugin allows Flutter desktop apps to resizing and repositioning the window. - GitHub - leanflutter/window_manager: This plugin allows Flutter desktop apps to resizing and repositioning the wi...

#

unfortunately i think in the end you are trying to use tools not meant/built for your use case

lone hornet
#

my homework project says that I need to take the data from two unsorted arrays and merge them. my problem is that whenever I try to merge them I get a stack smashing error. I noticed on geeksforgeeks that they wrote a SortedMerge() function where they sorted with a separate function. However, my professor said that he was able to create a solution within 10 lines. Do I need to make a new function for sorting or Do I implement sorting within my MergeData() function?

#

here's the code I wrote:

void mergeData(int data1[], int size1, int data2[], int size2, int data12[])
{
    int i=0;
    int j=0;
    int k=0;
    while (i < size1 && j < size2)
    {
        if(data1[i] <= data2[j]) {
        data1[i] = data12[k];
        i++;
        k++;
        }
        else {
        data2[j]=data12[k];
        j++;
        k++;
        }
        
    }
    while (i<size1) {
        data1[i] = data12[k];
        i++;
        k++;
    }
    while (j<size2)
    {
        data2[j]=data12[k];
        j++;
        k++;
    }
}

I used one of the methods found on geeksforgeeks however it's basically how my Professor described what my function should look like

#

except he mentioned using i and j but not mentioning k

lone hornet
#

here's something I found. when I compile and run my program with g++ I get this output

#

but If I compile and run it with geany, I get this output

bright cloak
#

is there a problem using a single quote inside a string?

#define WIFI_SSID      "Le's"

i know the password is correct but my ESP32 cant connect to it :S

cloud knot
#

but don't think you would have to escape ' inside the "

#

but i haven't did C for nearly 20 years, so can't be 100% sure

bright cloak
#

it is weird

#

the house owner has a guest network "Leil4" that my ESP32 has NO problem connecting to :S but it cant connect to Le's

sturdy ingot
cloud knot
# bright cloak the house owner has a guest network "Leil4" that my ESP32 has NO problem connect...
#

that guy:

Looking at the user SSID we assumed Bob’s Network had an apostrophe (U+0027). In fact, it was right single quote (U+2019).

#

@bright cloak ^

sturdy ingot
cloud knot
#

group by

#

SELECT data.trackName, SUM(data.playtime) FROM data WHERE playtime != 0 GROUP by data.trackName

amber cloud
wind horizon
#

LTT nav bugged on short viewports due to 2nd bottom nav being absolute position and no spacing tricks to ensure it has enough room. oops lol

slate frigate
wind horizon
#

Easily one of my fave gifs to share at work

cloud knot
#

yes, it is stupid and useless, but still awesome

sharp vault
#

Translation: print the following pattern:
Solution:

visual path
hollow basalt
slate frigate
#

Yup, and no math to take up cycles. Technically more efficient

soft cosmos
#

It doesn't work though, the main-function never closes.

wind horizon
#

It goes on to the next page...

hollow basalt
cloud basin
#

pogg

cloud knot
#

(in other words, it could be just a big hello world)

hollow basalt
#

to be fair, he only said print the pattern

slate frigate
#

Wohoooo, at 78% code coverage!

plucky zenith
#

is that a yipee moment

slate frigate
#

Yep 🙂

#

Don't need anymore, the rest of the code there's no reason to make tests for, but I have over 90% coverage on the modules I care about

plucky zenith
#

then yipee indeed

supple hull
#

I’ve been called in so frequently to fix css dumpster fires

cloud knot
# supple hull The sad fact is I can tell people how to write css just by looking at something ...

that is me often when looking at the code problem. Coworker comes to me after spending 2-3 hours on a problem, i read the description, search a bit in source code, in 10-15 minutes i have a theory of where the issue might be, in another 15-30 minutes i have at least an explanation for the issue and most times even a fix or a recommendation. I start to wonder if they are getting lazy because of this 😄

supple hull
#

I realized how hard it is to explain flex today

#

I was trying to explain the base being a factor of columns and it was a big woosh

cloud knot
supple hull
#

Canvas even a decade into being a UX developer is just like "Don't get it"

#

or rather "I don't want to understand it"

cloud knot
#

only thing i use canvas for is compressing JPG in JS 😄

#

and/or resizing

supple hull
#

Canvas comes up for d3

echo trellis
#

Hi ! I have a question about Unity !

#

I'm trying to code a series of actions that must take place on an extremely precise timing, on a few thousandths of a second. In this case, I'm flashing a sprite. So I want this one to turn on very exactly 1.5 milliseconds (0.0015 seconds) and turn off 15 milliseconds (0.015 seconds). We would have been in classic C # I would have used the System thread sleep. But as I know, Unity really doesn't like this function. I know coroutines can help for this, but it's mainly for parallel execution, but in my case it's not necessary, nothing else should happen on the screen during flashing.

How do I do it?

echo trellis
#

Hm...I got the answer. It's not really possible. The computer (and Unity) can do that, but, the monitor won't be fast enough to display the flash. So...It's useless. :/

silk eagle
#

not sure how, but I bet you could get the display's refresh rate and then 1 second / refresh rate = time for 1 frame, and then just display it for 1 frame

#

but if its something that requires it to be exactly 1.5 ms then youd need a... 666.666667hz monitor

#

could still display at lower refresh rates if youre lucky

hollow basalt
#

1frame is too fast

vestal spire
#

If I have google analytics in my mobile app, do I need to add Apple's App Tracking Transparency to my app?

nocturne galleon
#

how would i make this function work?

#

where i push hide and it closes/hides the context menu

#

reason is becuase sometimes the context menu gets stuck and wont close

topaz flare
supple hull
#

One of the hardest things about remote development is having to epically 💩 during client calls and not just causally leave a meeting to use the restroom.

silk eagle
#

Just get good bro pain is gain

hollow basalt
supple hull
vestal spire
topaz flare
vestal spire
native granite
#

No longer on the waiting list, let's try this :)

grizzled steeple
median arch
#

TIL you should NEVER limit your CPU to 1GHz when compiling. It just takes the fun out of the Developement Cycle, when you have to wait FOREVER to run anything.

median arch
cloud knot
#

still got stuff which takes forever

median arch
# cloud knot

Not QUITE as man cores, but yes. I feel you. Sad that most things wont scale to even 16 cores...

cloud knot
#

at least i got enough ram for anything desktop oriented 😄

median arch
#

I dont...

fiery terrace
peak acorn
#

insanely ugly but working on a little tool for my prof

silk eagle
#

because if it isn't, 😎 nobody asked you to make it look good

peak acorn
#

No its for research

hollow basalt
peak acorn
deft sigil
#

https://www.youtube.com/watch?v=m4-HM_sCvtQ , finally someone who shares my opinion about java , (but for the last 2 sentenses) 🙂 https://www.youtube.com/watch?v=m4-HM_sCvtQ

Java is one of the most successful and most dreaded technologies in the computer science world. Let's roast this powerful open-source programming language to find out why it has so many haters.

#java #programming #comedy #100SecondsOfCode

🔗 Resources

Java Website https://java.com
Java in 100 Seconds https://youtu.be/l9AzO1FMgM8
Why Java Suck...

▶ Play video
cloud knot
brazen tiger
#

Can't believe I reinstalled my IDE only to find out that I misspelled paintComponent

cloud knot
lapis plume
#

Ya

#

It's super annoying

lament bridge
#

Hey,

I have a slight problem in MySQL.

I am trying to get those users that have basically 0 active servers and they have 0 active subscriptions. I am also wishing to write a similar query, but rather have zero records in servers and subscriptions, so basically just a user with empty subs and servers.

My current query looks like this

SELECT subscription.user_id as UserID,  subscription.status, user.date_created, user.email, (
( 
    SELECT count(server.user_id) FROM server WHERE subscription.user_id = server.user_id
)) as Server, COUNT(CASE WHEN subscription.status="active" then 1 else 0 end) as activeSub, COUNT(CASE WHEN server.status="active" then 1 else 0 end) as activeServ
FROM subscription
JOIN server on subscription.user_id = server.user_id
JOIN user on subscription.user_id = user.user_id
WHERE subscription.status = "canceled" and server.status = "error"
GROUP BY user.user_id
having COUNT(CASE WHEN subscription.status="active" then 1 else 0 end) = 0 AND COUNT(CASE WHEN server.status="active" then 1 else 0 end) = 0
ORDER BY user.date_created DESC

For some reason though it does not list the people who have 0 subs and 0 active servers, am I doing something wrong?

open summit
peak acorn
#

Generated through "self assembling tiles" yes

#

The basic idea is you have a tile set of cubes, each face of the cube can have a certain number of connectors, each with a color. Start with one tile, and randomly add tiles under the condition that: a tile needs to (after being placed) make at least 2 connections, and any face that is touching another cube must have every color matching exactly

#

You can make cool things like a binary counter with a relatively small number of different tile types

jagged spire
open summit
#

thats cool

restive ore
#

Does anyone here know if Android apps like UberEats, Glovo etc have to pay the google app store fee or do they work around that?
Asking as my final uni project has the chance we will have a payment system and wanted to know a bit more about the fee in case we need to put info on final project report
In the past I thought they did pay but after the "Amazon pulling payments out" of apps after the google deadline, idk anymore 🤣
(info based on latest TechLinked video of Tech News)

peak acorn
#

From what I hear from the WAN show and lukes app experience small apps get fucked around every corner regarding rules and fees

wind horizon
# restive ore Does anyone here know if Android apps like UberEats, Glovo etc have to pay the g...

If I'm remembering the rules right (been a whole since I dealt with this):

They don't pay a fee for goods / services that are not delivered through the phone / app. That's how they get around this for Uber, Amazon, etc.

Notice you can buy a movie disc on Amazon app, but not a digital movie. A digital service is considered delivered on the phone/app and subject to fees.

This is also why Uber can use 3rd party payment gateways Venmo and PayPal.

#

What you can do to work around this is ask the user to open the browser and subscribe on your mobile website. They can consume the content in the app at no cost to you, it's that actual payment handling that can't be done in app without the fee. (Unless it's physical goods etc)

For example Hulu, Netflix, and other streaming providers do it like this. You can't subscribe in the apps, but you can consume the content you already have a subscription for.

It's all madness, we need the gov to throw down some regulation and stop this imo.

inland marlin
#

i need help with favicons

#

i added the following code <link rel="shortcut ico" href="image/logo.ico"> and it wont pop up

#

im still learning html 5 n stuff

#

but help

eternal scarab
#

rel="shortcut icon"

inland marlin
#

i fixed the icon but nope

hollow basalt
#

Nope

eternal scarab
#

maybe image not recognized, try with simple png

silk eagle
#

could try putting the href as "./image/logo.ico" or same thing without the .

eternal scarab
#

you could use some online image link to see, if really the image is the prob (for href)

silk eagle
#

cuz wouldnt image/logo.ico go to either website.com/image/logo.ico or website.com/pagenameimage/logo.ico depending on where its at

midnight wind
#

or just put the favicon in the root directory

eternal scarab
#

yeah thats why I suggested to click the image link to see if that loads in the browser

#

He said he fixed it

inland marlin
eternal scarab
#

did you mention the type ?

#

and try to open the URL in incognito mode, which will load the site without cache

midnight wind
#

I think the problem is that there is no webserver

#

@inland marlin are you running a webserver or just reading the html raw

midnight wind
eternal scarab
#

Even if he loads the html page just as file image/logo.png should work

inland marlin
#

woooo it actually works but i added this and it worked i though all hope was lost but then i said hey why not use this <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>repl.it</title> <link href="style.css" rel="stylesheet" type="text/css" />

hollow basalt
#

The logo works when you add in css?

timber basin
#

Whats a good UML Diagram tool?

slate frigate
timber basin
#

thanks

inner hemlock
supple hull
#

Holy hell a client managed to upload a 77 MB gif

nocturne galleon
# inner hemlock yeah that shit is mwaahh

I already got accepted but I'm really against programming using proprietary software so I'm hoping i get accepted into codex so i can use a FOSS extension that uses it

slate frigate
#

So far in my using of it, nothing indicates straight ripping of proprietary software.

#

And if code snippets can be called proprietary software... Welp, I better get on copyrighting "hello world"

next cipher
#

there's a real issue with that kind of thing

#

if copilot is really "intelligent" and generating its own brand new code that's one thing, but all it's really shown to be doing is regurgitating snippets of other people's code from similar contexts

#

which are very much still that person's intellectual property, in a legal sense... but they have no way of finding out and no legal recourse

nocturne galleon
slate frigate
#

Ahhhhhh, I got you

nocturne galleon
#

btw i just got my keyboard -> controller emulator working :>

#

there is one pretty big issue though, it doesn't have a configurable keymap so it's probably terrible for non QWERTY keyboards, and the right thumbstick doesn't work at all with keyboards that don't have a numpad

#

i'll fix that tomorrow

ruby aurora
#

Hi. I'm learning React is there a reason of why the attribute is not getting the value of the variable?

midnight wind
#

It's ${name}

ruby aurora
midnight wind
#

Try just {name}

ruby aurora
#

Nope, it renders {name} in the element

midnight wind
ruby aurora
midnight wind
#

Brackets, no quotes

ruby aurora
#

OMG, sorry I'm new to React, still adapting to all of it

midnight wind
#

Google is your best friend

#

Never used react myself

ruby aurora
#

Thanks, I will read more deeply into it.

#

React is a very cool technology, very flexible

lament fable
next cipher
#

yeah so JSX is its own syntax, it's basically "looks like html but doesn't quite behave like it"

#

which i think was a poor design decision but it's convenient as long as you keep track of where you're writing HTML vs when it's actually JSX

wind horizon
nocturne tree
static cave
#

hey, can someone help me with this, i need to know what is the BIG O Notation of this python code.

hollow basalt
#

your homework?

static cave
somber dome
#

How can I send a video feed from opencv directly to a VR headset without using bloatwares like unity game engine and such?

#

Can I have the br headset just seen as a display by the OS?

peak acorn
deft sigil
slate frigate
#

Welcome to computer science. Where we teach you fancy algorithms, but not how to solve problems with em.

peak acorn
#

lmfao for real

#

ok i guess ltt bot deletes multiple messages if even one triggers the filter

sturdy ingot
peak acorn
#

Sure so Llog(L)^2 I think

#

if my summation rules were correct

#

amortized analysis was so weird when we did that in my algos class

echo grotto
#

i need some coding help

#

im trying to update someone elses code for an Advance Wars By Web map editor

#

main objective is to add support for the 15th and 16th factions, and ive replicated almost all of the relevant code with copy/find/replace/paste. problem is they aren't showing up properly and i am not a coder

hollow basalt
#

Nice

peak acorn
#

did github remove the link for ssh cloning

#

nvm im so dumb i wasnt logged in

nocturne galleon
#

can you ddos my website
(for testing)

hollow basalt
#

no

slate frigate
#

@nocturne galleon what exactly are you trying to test?

nocturne galleon
#

prot

slate frigate
#

Prot?

nocturne galleon
#

agenst dos or ddos

slate frigate
#

Are you being actively targeted? There are plenty of ways to locally test

nocturne galleon
#

well my website just got over 10 b pings

slate frigate
#

Icmp? And what time frame?

nocturne galleon
#

10 min

slate frigate
#

Was it icmp? Or actual web requests?

nocturne galleon
#

actual web requests

slate frigate
#

Did you check from where?

nocturne galleon
#

unknown

#

wait

#

south asia

slate frigate
#

No such thing as an unknown source. So you can just check those IP's against a reputation tracker, and block or allow depending. And also check user agent and headers for identifying info

nocturne galleon
#

south asia

#

it was loading

#

hello

#

hello

slate frigate
#

If you want to do dos testing, do it internally.

nocturne galleon
#

ok

#

well it happoned again

slate frigate
#

Did you make someone mad? Just block the IP's coming in (there are tools for this) or put your stuff behind cloudflare.

nocturne galleon
#

well thare is thousands of ips

slate frigate
#

If its someone paying a booter to do this, eventually they'll run out of money/credits, while you'll still have a functioning website. And yeah, thags why I mentioned tools

hollow basalt
#

and 10b pings, seems a bit too much

slate frigate
#

Even a simple snort rule "block if more than x requests in a second" will handle this.

nocturne galleon
#

I use google domains

hollow basalt
#

congrats?

nocturne galleon
#

yay:/

slate frigate
#

And i kinda agree with Kyou. That puts it at an average of ~360GB a minute assuming relatively empty packets. And google can handle that no issue, if you're using their hostibg service. If you're experiencing service degradation, put in a ticket with google.

nocturne galleon
#

ok

slate frigate
#

Or, again, cloudflare.

nocturne galleon
#

yes

midnight wind
#

they don't do hosting as far as I'm aware so won't help at all

slate frigate
#

I assumed they were using google cloud blobshrug

silk eagle
#

My go-to is just slapping my sites onto/behind cloudflare and then never have to worry about an attack ever

somber dome
#

I'm starting to learn cpp, coming from years of mainly python ... It's gonna be hard to stay consistent with the learning

deft sigil
midnight wind
#

from exploits, but yeah not ddos really

copper forge
#

Is anyone familiar with RSPEC testing for Ruby on rails?

somber dome
#

Are you guys more of the 21:9 34" 1440p gang or the 32" 4K gang for programming ?

#

I'd be in the 38" 5120x2160 gang if I could but they have a somewhat elitist selection to enter it

silk eagle
slate frigate
nocturne galleon
#

can anyone join my zerotier network :/

midnight wind
nocturne galleon
#

free vpn?

silk eagle
#

anyone who doesn't already have a VPN doesn't need one

nocturne galleon
#

if it is free than why not

silk eagle
#

I just drop cash in a location once a year for my VPN subscription

silk eagle
#

if u dont pay then no features

wind horizon
#

Isn't zerotier more about SD-WAN? I don't want to join some other persons network when I use a VPN, I just want anon / masked outbound traffic from a provider I trust more than my ISP. Lol

peak acorn
silk eagle
#

iVPN smart

midnight wind
acoustic roost
#

after update my nginx to stable 1.20 the vhost mistakenly serve wrong domain to the app, what the hell?

#

god bless me I make snapshot yesterday

silver furnace
#

If that's truly a bug, then it's <<StAbLe>> 1.20; not stable 1.20

#

And deserves like instant critical CVEs and issue opened

#

But check if it's some config overwrite/delete or "intended" changes that made your old ones require changes

#

Although I'm mostly going by apache/general httpd knowledge, if the "wrong vhost" is "served to an app", it should mean that it's the wrong vhost in general you get from the intended domain or subdomain

#

if you get some default or 'localhost' vhost docroot after the update, chances are your old vhost configs aren't loaded anymore

hollow basalt
#

agreed, if that's the case. People would be screaming by now, and we would've heard it

#

we would be reading "nginx not reliable, why apache is still the best" and so on

silver furnace
#

I mean somebody loled at me either here or on FP I don't remember. It was when I told them how annoying it is to have either hackers or that one typical wp "worm" traverse every vhost relative to /var/www/ from the actual root of the server

#

Should be "containerized". When I asked, apparently there's no true way with a single instance of apache

#

Having said that, I did eventually find a complete solution as far as my needs go. In every vhost config, you can specify some php admin value and seemingly make php truly behave as though docroot is the root in all file references

#

But still, apparently you're not even supposed to use vhosts as a means of any containerization

#

So big http hosts or wordpress engine (anything that would use http server and give out separate subdomains to users) wouldn't use vhosts anyways pretty sure

#

Even those pure http servers with just the usual cpanel, ftp access, phpmyadmin, etc, etc would probably run separate instances of the httpd at least

hollow basalt
#

I would assume some kind of virtualisation, not just docker strictly

silver furnace
#

Idk as far as multiple apache users/groups with that number of services but yeah exactly

#

Now you're talking proots, chroots, or just higher level virtualization. I have no idea but yeah just install docker and let it handle it lol

hollow basalt
#

for big boi server hosting, I would assume they don't use docker

silver furnace
#

But still, that php admin value set to whatever docroot is on vhosts: good hack for vhosts not seeing each other lol

#

Assuming you only have php on top of the base apache stuff

#

html "references" are urls within doc root that are http got the same way as the document itself; CSS same thing except for some reason the relative url is somehow different (but either way, it's the client get/load within docroot)

silver furnace
#

It reports virtual hardware, physical cores/threads/speeds, memory, etc. And obviously storage.

#

Yeah I don't exactly know what goes on in there but it's basically some kind of virtualization of the hardware. On the other side, it's completely irrelevant how they implement it. As long as it works as intended

#

If it breaks, it would mean that you have neighbors like paging your memory from their virtual machine somehow lol. My guess is that it would more likely be unintended and users wouldn't even realize what's happening. It shouldn't even be that obvious until you get like seg faults and the system is still miraculously usable

#

I don't care what they use. It could be twice as fast metal running pairs of instances or literally a guy plugging an hdd with the image you picked to deploy lol.

#

Tl;dr it's 2022. LAMP stack and everything of that nature is a thing of the past; it's for a perfectly valid and justifiable reason.

(And yet people still use it, I'm still looking for those jobs, those jobs are available and urgently hiring for some reason :D)

halcyon lintel
#

im tryna make a function code but im getting [Error] expression list treated as compound expression in initializer [-fpermissive], can anyone tell me why?

nvm, i got it

peak acorn
#

In python, a function can return multiple values like return a, b, c. But is it possible to only pull out the b and c return values? The way im doing it is just putting a random trash variable to take the place of the a

hollow basalt
#
_ , a = function()
peak acorn
#

oh cool

wind horizon
#

Waiting on Jenkins CI 🕰️ 👴

slate frigate
#

@wind horizon I just set up a internal CI/CD build server. Such an improvement

slate frigate
#

Jetbrains TeamCity, with YouTrack integration

#

The free license is pretty enabling

midnight wind
#

I was looking at FOSS things: drone, concourse

slate frigate
#

I already have a full JB license, so it's easy integration with all my IDE's just made sense

midnight wind
#

yeah

slate frigate
#

I imagine they're all pretty similar

midnight wind
#

jenkins can be self-hosted I think?

#

yeah

slate frigate
#

Yep!

hollow basalt
#

so far, jenkins is my least favorite

slate frigate
#

Anything in particular about it that makes you feel that way?

hollow basalt
#

DSL and the clunky plugin ecosystem

slate frigate
#

That's one thing I do appreciate about using a paid product - the plugins and add-ons ecosystem is super smooth

midnight wind
#

you know what surprised me, as so far easy to develop for

#

quickbooks

hollow basalt
#

if it's not easy, would bet it wouldn't be quick

midnight wind
#

have a client who needs a specific thing exported so often

#

the docs, sdk, are great

hollow basalt
#

link to their sdk

midnight wind
#

they even have a sandbox environment where you can have test data and basically a demo application

hollow basalt
#

nice they have multiple lang

midnight wind
#

using python which so far been a breeze

hollow basalt
#

would use java just to meme

midnight wind
#

except for figuring out oauth in prod

wind horizon
#

Jenkins has a terrible UI and just feels like a relic imo. I love Github Actions and you can run them on prem using the runner.

hollow basalt
#

GA is the CI/CD . jenkins is general automation

vocal ermine
cloud knot
#

personally i used gitlab for most stuff, that is an all-in-one package (GIT hosting, CI/CD etc)

zenith elm
# vocal ermine

simple the word java doesnt have script in it unlike javascript

#

jk java is a programing language while javascript is a programing script

wind horizon
cloud knot
#

i got a spare i5/16GB RAM mac mini, a spare 10c X99 system with 32GB RAM etc

hollow basalt
#

Couldn't you WOL them then run the build server on start?

cloud knot
#

(outside of my main threadripper 2950x, 128GB RAM server)

cloud knot
#

i guess i could make a separate monitor for 'stuck jobs', then figure out which system i have to wake for that, wake it, then resume the stuck job

hollow basalt
#

Oh i see, so you want to WOL the clients/agents/runenrs not the main/master

cloud knot
#

but it would be nice if CI/CD systems could handle this out of the box.

#

yes, WoL the runners. the main server runs 24/7, but obviously i don't want to do mac/ios builds on VM

#

(we talk about home use, not professional)

hollow basalt
#

Fair enough, maybe for certain builds, add a task for the master to WOL the specific client then wait X length of time before proceeding

cloud knot
#

yes, that is possible, but kinda hacky, might as well do the monitor task then to also put it back in sleep etc

#

i guess this use case is too rare to even be considered

wind horizon
#

I believe GH runners doesn't have a central / main node you run, each runner just gets connected to your GH org or repos. So you could WoL them probably. I'm not sure how GH actions handles a job waiting on a runner, I'd assume it would keep retrying until runner is online. If so you could maybe tie a webhook to calling the WoL even. 🤔

hollow basalt
wind horizon
#

And tbh most of CI/CD today is built around vms & containers, I don't think there are tone of people with bare metal servers dedicated to CI/CD. (well there are CI/CD pools so big they take up entire servers, but they often are still running in something like container or virtualization of sorts, so the host can be easily lost or replaced etc)

cloud knot
#

yes, but mac/ios is a special use case to be fair. everything else i could virtualize on my threadripper proxmox server, but mac is kinda sketchy with x86 and pretty much imposisble with m1 macs. I guess everyone just runs their mac minis 24/7 😄

wind horizon
#

Yeah I remember seeing some CI/CD companies sold "mac" runners, can't remember which company it was. They legit had bunch of like mac minis and stuff connected in and you paid a premium to have your jobs run on them. LOL

#

That was a while ago, I assumed by now Apple came up with something to let ppl build for their eco system without needing their hardware. I guess not? I don't ever dev for Mac, so not my area. lol

hollow basalt
#

Isn't that the puroose of mac mini, to have a mac without the screen

cloud knot
hollow basalt
#

"could only dev if youre part of our eco system" yep sounds good

wind horizon
#

Classic Apple move

cloud knot
#

also $99/year to be able to publish into their stores

wind horizon
#

I feel bad for people who have to adapt things like CI/CD just for 1 company that doesn't like to play nice. lol

hollow basalt
#

I wouldn't think of 1 company.
I would think of the thousands if not million users that i would miss out if i don't

cloud knot
#

at least Objective C is now not the only option to code for mac/ios

#

i hate Objective C so much

wind horizon
#

You know if Apple had a really small user base they'd likely make it as easy as possible to develop apps for their eco system trying to bring devs in. lol

cloud knot
#

lol, just found this, sums up pretty much what i dislike about objective c, outside of the stupid bracket syntax... Apple talks a lot.

Objective-C is not verbose. This is a myth. What is verbose is Apple, and they are verbose because they inherited OpenStep and people followed its naming conventions to very bad results. The original AppKit, you would write something like this:

id list = [List new];
[list add:[List new]];
id otherList = [list objectAt:0];

This became:

 NSMutableArray *mutableArray = [[[NSMutableArray alloc] init] autorelease];
 [mutableArray addObject:[[[NSMutableArray alloc] init] autorelease]];
 NSMutableArray *otherMutableArray = [mutableArray objectAtIndex:0];
wind horizon
#

Wait the 2nd one is Objective C syntax?

cloud knot
#

both are objective c

wind horizon
#

Someone really loved using [] when coming up with that. There is like 3 nested ones in that first line alone. 😆

cloud knot
#

but different libraries. first is what was used in NextStep, second one is current Apple code

cloud knot
#

second would be :
mutableArray.add(new NSMutableArray()); 😄

#

i seen worse objective c code than that

wind horizon
#

Wow I don't like that syntax one bit. lol

cloud knot
#

and then swift has the crazy unwrapping/type safety operators

wind horizon
#

Notes to never apply for an Apple IC role

cloud knot
#

how to concatenate 2 strings in apple world:

NSString *myString = @"This";
NSString *test = [myString stringByAppendingString:@" is just a test"];
#

when i do objective c, i sometimes have to google simple things, because one has to figure out what the hell is the method called for that specific function

#

like above, anywhere else it would be called something like concat, but here it is "stringByAppendingString" 😄

wind horizon
#

What was their reasoning for everything being in [] I wonder?

cloud knot
#

to be fair, i only do objective c once in a while, when we need to upgrade some library for our hybrid app

#

smalltalk

#

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language

#

In Objective-C one does not call a method; one sends a message

wind horizon
#

Interesting reading on wiki, things like one can create an instance that can intercept any message sent to it remind me a lot of middlewares and event based systems we use today just done on the lower level of each method / object. 🤔

Not sure I'd want to take that syntax todo it, but sounds interesting none the less.

next cipher
#

i actually really like swift as a language

#

unfortunately it's controlled by apple

#

it runs on Linux iirc

#

but there's zero other things you can do on Linux with it

#

so not exactly useful unless you're writing software for the apple ecosystem

silk eagle
spring pond
#

also swift does run on all of the big oses

slate frigate
#

@cloud knot It's kinda hacky, but one of the things you can do with TeamCity is run outside scripts. You could probably set up a WoL script to turn everything on

cloud knot
hollow basalt
#

i thought wrapping the logic in a "if not null" (or nil / undefined) is the way to go

next cipher
#

optionals are one of the best features of swift

#

and pretty much any modern language

#

there's a reason why swift, rust, modern c++ etc all use them

cloud knot
#

it is when you hit the boundary of Objective C when it gets super confusing

cloud knot
deft sigil