#development
1 messages · Page 86 of 1
My dad (director level) walked out because the company wants him to do a written test
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
now that I think about it, native apps act like SPAs
yes, pretty much anything is now a REST client to a REST server
cordova/ionic before electron was cool
electron is one of the cordova/ionic targets too, if you want to do that as well 🤷♂️
since when? i haven't tried cordova since I was college
and that was pre-electron era
4 years ?
dang, am i that old
ok, maybe not official release
seems like electron was added in Cordova 9, which is like 2 years maybe ?
yea, that makes sense
We are happy to announce that we have just released cordova 9.0.0! cordova@9.0.0To upgrade:npm uninstall -g cordovanpm install -g cordova@9.0.0Release Highl...
so 3 years in few weeks
I miss that era, when node is a buildtool
not something you would think to run a website
Yeah but the android only experience is a massive * and without device access / APIs it's mostly like an excellent mobile site experience not like full feature app.
Still hoping for native web app support, but not holding my breath after WebOS was essentially shutdown beyond TVs and Fridges. Lol
as i said, at that moment you are looking at Ionic Capacitor or Apache Cordova
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.
that is literally to what you write
Just a shame how long it's been and still no official support for it.
Cordova and Ionic in the end are SPA/PWA with ability to call native functions. That's all
Right but that's not native support, that's a compatability layer.
Would you say electron is not native
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.
@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
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
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?
yes genius plan. you will achieve market dominance with this 😂
ill sell it to Microsoft and they'll open source it so future generations can learn from it 
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
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
Qt is fine from my experience, and it's cross platform so that's nice too
yeah Qt is decent
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 😐
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
you don't compile
wait so how do i turn it into an exe
what are you actually doing now? how did you "pkg" it
pkg --debug index.js
this thing apparently
yikes
am i not suppose to use that?
nah, you can use what ever you want
can someone help me with compiling? dm me
compiling what
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
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
🤮 🤮 🤮 🤮
Hard to understand could you maybe share an example of your code on something like codepen?
The desired purpose seems fine
But people use it not as intended
I guess, but every use case I can think of just feels wrong. Lol
From what they say it's like for containers and portability
But for a container why would you build to an exe? Lol
¯_(ツ)_/¯
less storage?
idk
for the lulz?
Wouldn't it be more, since container would use layers and cache if you had say more than 1 node app. 🤔
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
yeah..
CLIs my favorite
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;
doesn't look like shortcut to me
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 ...
If it's a service you can see
Journalctl
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
On yeah it's a service indeed, wow it was down since the 21 of January lmao
It was supervising 80 ESXi 🤣 🤣 🤣
<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
made the wordle solver today from the recent 3b1b video & just got it working at about 0.3s
😎
rust based!
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
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
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
VSCode as a packaged product is subject to the Microsoft software license terms. Parts of code are open and free source, e.g. the parts in VSCodium, but others are not (see the Pylance issue 483).
It has everything that may make a meaningful difference to your experience
Iirc the only non-free parts of vsc are the telemetry, that's all i could see vscodium changing at least
But yes, you should use codium
Unfortunately, some extensions require the marketplace and thus VSCode :/. Pylance is the most prominent example.
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(++)).
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
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]
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.
https://www.jetbrains.com/pycharm/
https://www.sublimetext.com/
https://code.visualstudio.com/
no link for Visual Studio pls dont use it if you dont need to
Even if you want to do .net/c# ?
ah i see, well, in that case i would never even consider using it tbh, using proprietary development tools is unacceptable unless there is absolutely no other option imo
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
but also, even if you can't build it yourself, i imagine there must still be a way to grab the package file from the marketplace, even if it requires you to packet log using vscode with wireshark
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
yup
honestly all you need for .net is the cli tools from the core sdk and after that you can write in any ide
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 ?
Circular dependencies don't sound good
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
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.
you could just extract the answer from the cookie
Javascript programming language
Interview with a Javascript developer in 2022 with Jack Borrough - aired on © 2022 The Javascript.
Find more Javascript opinions under:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-
d3a717dd577f
Programmer humor
Javascript humor
Programming jokes
Programming memes
Javascript 2022
Js memes
js j...
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
The nav bar is above the div and the same size? If so you can treat the div like a wrapper and place the nav in it and content inside another container below it.
ideally it would fit to the amount of buttons (currently 2) + some margin
so not the same size
So it's something like
Nav
Content
But nav can be smaller / bigger than content, however nav should still be centered above the content?
yes
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. 😅
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
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.
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
someone can
vscode can't build anything unless you install an extension for it, what you should probably do is use make to automate compiling all the files and linking them
once you start using libraries i recommend using cmake to automatically write makefiles
im able to get a normal singular .cpp file to run fine, where my issue lies is in getting multi file programs to work. So if I have main.cpp Vector.cpp and Vector.h as all different files. I am unable to get it to run at that point.
even if the same exact files work fine in Visual Studio
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
I would assume CMake considering I have it installed
no
?
i'd say definitely cmake, but i didnt manually install cmake, it was apart of a reccomended C++ pack in visual studio code
what does your CMakeLists.txt file look like?
ive never had one of those
that's probably the problem, that's what that extension is supposed to work with
what should it look like?
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
alr so if i have this, am i gonna replace src with MultiFileExample?
if MultiFileExample is the same directory the CMakeLists.txt file is in, then no, just remove it entirely, otherwise yes
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
idk how to really work with it, so i wouldnt be surprised if i did something wrong lol
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()
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
yes it does
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
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
you have any ideas?
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
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
On windows I assume?
It's kinda a pita , try using WSL
yes, as of rn at least, i use both linux and windows so it gets annoying lol
im also not really sure what that is or how to use it
Runs Linux on Windows essentially then you can open vs code in WSL so your entire dev env is Linux even through your GUI desktop is Windows.
If you follow the MS docs really easy to install: https://docs.microsoft.com/en-us/windows/wsl/about
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.
@hollow basalt why the reaction?
if youre looking for cadding software then try fusion360, onshape, freecad, or anything else on this list https://all3dp.com/2/fusion-360-alternatives/
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
Bit of a long shot but any chance someone here can help me make a batch script to disabled and enable my network adapter? 
Look up, PowerShell enable/disable network adapter
Doesn't sound a long shot to me
thanks for that! will try
yes
Anyone got IDE suggestions for Python and C++?
Trying to find where to move away from JetBrains
Jetbrains
I don’t want to use JetBrains anymore
After their email a few hours ago
“Vote with your wallet” you know
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
¯_(ツ)_/¯
oh, haven't heard about that
Didn't know an IDE maker would take a stance on the war
vscode
Yeah I’ve been considering it
not exactly an IDE
I find it mildly confusing but it could perhaps work
What’s the difference? It lets me edit and run code
it's less of an IDE, and more of it connects to existing tools on your computer
like the building of the code is not built into it
it just connects to g++ or whatever and runs it there
But is it really different to the user if the outside is the same?
well it's not setup and ready
I think if I manage to understand how navigation works in VScode works I’ll likely switch to that
requires user setup
I can already create projects I think and write there
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
@lethal agate your license still works, they just won't be selling anymore
Yeah well it’s kinda not about technically being able to use, it’s about personally not wanting to support them anymore
fair enough ¯\_(ツ)_/¯
I'm not supporting the war in anyway, but jetbrains withdrawing seems ehh at best
Alright, I think I’ll try coding in VScode today
I mean continuing to use it isn't supporting them since you already paid. 😅
check your SQL statement
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;
}```
dont think you need a for loop there, theres no condition there i dont think
"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)
what loop would i use instead?
while
define guess and randNum
while loop {
}
correct!
that's how i'd do it atleast
If anything teaches you goto in C++, then drop that book/site/tutorial and get another one.
i thought that was weird 
That being said, it's for(init ; cond; post), not for(init ; cond). You're missing a semicolon.
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.
i know it's bad. my book taught me that, but i care more about my homework not being late than god form
😔
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.
remember homeworks are for school, but bad coding practices you carry until you work
doing it once doesn't automatically make it a habit
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
and hopefully not after
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
When using a 2D array as a grid for a player map why is it RowIndex -- to go up instead of RowIndex++
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).
"They" probably talk about this as a first step since the vimtutor starts with hjkl. So it's more or less tradition at this point.
Sounds like rows are indexed from top, down.
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 
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.
Depends on how you need them. I usually have all my loggers defined in a seperate global function.
Yeah okay
I just realized the fix is pretty simple. I was indirectly calling logging.getLogger(log_name) using the same log_name within a loop, which was continuously adding FileHandlers to the same logging instance
I'm starting to learn that, now I need to get used to it
Also hjkl is really NOT ergonomic, it should be jkl; .... but I can't remap that on all servers 😦
Also hjkl is really NOT ergonomic
Ortholinear keyboard gang rise up
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
Who needs an index when typing? #TRexTyping
I do hunt and poke without the hunting
and with more fingers, i think that's trex typing
is it weird that i usually don't have a hand on my keyboard at all when i'm not typing?
i keep one on my mouse and the other wherever
like you use middle and ring finger?
index as in a starting place, like how F and J have little bumps on them so u know where ur hands are
personally I just hit random keys and then figure out where i am from there
So far no one has figured out I'm a monkey with a typewriter
I don't know man, I don't pay that much attention to it but I'm pretty sure most of the time I'm typing soooo
And yeah I use those little bumps to know where I am
Lmao doing this in vim is just so confusing
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?)
using egrep yea
are you trying to search for what, words without a vowel? You know you can use ^[aeiou] right?
y? i realy have no idea , yasmin would be no but busy would be yes i think :D)
yep but then it will also include the diff characters, btu I understand that I can also set exceptions for that
anyone here who had worked with webapps and Tally in past?
Whats a webapp
[b-df-hj-np-tv-z] is the one that I used so that its cleaner
Wdym diff character like symbols?
yes, including spaces
Then invert that also
which is what i figured after learning more about the classes
That's progress and you're at the right path
are you asking what kind of webapp i am working with?
client is really happy with the web app we deployed
excited to get more in the future, hopefully, bigger pay 😎
you want to prepend
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
It’s a forward linear scan
thnx
Man, compiling Python from source on an Arm CPU from 2012 is kinda slow, who woulda thought?
I guess you should probably start using venvs if you start wondering which python executable is going to be used
You are compiling from an old smartphone ? ^^
Nah an old OrangePi
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)
Isnt Compiling from Source slow on basically any ARM CPU? I remember building Deno (Javascript runtime) from source on a Raspberry Pi (which isnt too slow) and it still took forever...
I’m sure apple’s M1 handles it just fine
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)
Yeah the arm chip in this orangepi was slow even when it released 10 years ago
Hi, does somebody know how to cross-compile a Qt application for a 32bit raspberry pi from windows?
Not sure how accurate this is, but this is cross-compiling, for the raspbery pi (I think only 32-bit existed back then). It is from Windows, but if you are doing devwork, you probably want to install wsl anyways (Make sure its wsl2), which is basically linux running in windows.
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
Of course i've already activated wsl2 😉. Ok i'll check the guide..., thanks
Day 615 of being burnt out, thinking about being productive today. oops, day's over
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
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
This article describes how to direct a Raspberry Pi with any conventional IR remote control and how to send IR signals from a Pi to control other devices.
In it, they use an external powersource instead of the 3.3v supply from the board. Any idea why?
Can anyone help me with unreal engine 4
no
Ok
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
how to connect to a database using "CSS" ?
that's what my employer wants me to do.......
can any1 help 

I suppose you could store the CSS in the DB, it's "connected"
Otherwise that's like asking "How do I connect my house paint to the electric outlet"
fancy
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.
ikr 😂
omg u typed a whole paragraph for a joke 

wasn't sure, don't wanna assume too much. I've heard dumber things
"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.
some time ago, it was pretty normal for bigger installs, sadly. i seen this with gitlab
the worst part is you could probably do that in some horrifying hacky way with modern CSS features
(or i think it was gitlab. maybe sentry. can't remember)
Years ago everyone was rockstars and ninjas. It pretty avant-garde for like 2007 but man, now I'm older and more bitter
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
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.
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.
Being a dev channel there's certainly a lot of range here
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. 😂😂
@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.
I do full stack, so I'm like that person who "can" do both but master of none. 😂
I'm fairly center I got a frontend guy because they were getting tired of looking at my printouts
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
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.
I feel this
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
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. 😂
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
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. 😂
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
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
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
Haha nice
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.
Alright team what companies are orange
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
They aren't just ecomm only other hint, but you can list 'em but I won't say 😉
alright its home depot
Oh I forgot about them, I always see listing in Houston for them with React.
Can't remeber if it mentioned Drupal. 🤔
I hate WordPress
I hate drupal more
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
I've been playing with Hugo rn
Drupal 9 can sorta kinda be used that way but the structure is weirdballs
it is kinda cool though it has GraphQL support... kinda
But I need to learn more WordPress since alot of sites we manage use it
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.
I thought I left Wordpress in 2011 and then around 2018, people really started wanting Wordpress sites. I was the one person who knew Wordpress at all. Sadly, I'd divulged that long ago.
Lol next time I work with an API to spit out stuff for a FE I'm going to say "fart all the content"
It's so stupid, most can just be static
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.
My personal blog is jekyll, it kinda sucks.
The problem is a visual editor
I've debated going to wordpress many-a-time
As I want to focus on writing, not writing markdown or HTML
Ive been liking Hugo
See yeah, you still need a cms
Is that the React one?
I really need to move my site something else. Jekyll has served me well though
Gatsby has this thing where you can use WordPress as CMS
I also may want to look into some WP to static generators
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 🙂
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. 😂
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.
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.
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?
Pretty inefficient I would say
Since you are rebuilding whole website for just another post
Do it for the lulz
maybe a ssg with partial rebuild support could work
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? 🤦♂️
Most issues people complain about are product or legal. Engineer issues are usually bugs or sometimes outages when we make big oops.
who are the people that decide to use wordpress for the sites
is it product or is it the first engineering people who decided it and then 5 years later still using wordpress
Idk tbh I don't work in that area, last time I touched WordPress was making websites mostly using themes for small business in college to make money. haha
if they have a dedicated engr team, why are they using wordpress in the first place
I was talking more so in application development, like a platform like YouTube.
well wordpress is like a religion, it gets grandfathered in for generations even if it doesnt make sense because its been thousands of years, but its a whole thing if you wanna replace it so you just live with it and complain about it 😔
see wordpress is only good because of all the stuff made for wordpress
like, I made a website on it real fast, since I found a theme for what I needed
a TEDx site for my school
cuz I'm not wanting to put in the dev time to remake everything, if they're happy then I'm employed
found this theme and boom, done https://wpeventpartners.com/preview/?product_id=TedxTalk
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.
as much as I hate wordpress, I love it
i agree roaldi
And you can properly secure a wordpress, you just have to be security conscious.
it has its place in the world, to both make sites faster and make sites slower
I've attempted writing my own CMS before, and NOPE. Its a huge pita
I'm looking into generating static sites from wordpress. Security wise and it should be faster.
the good(?) middle ground is a framework for CMS
@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.
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
indeed, my idea is. someone better than me already did a CMS. i hsould just use that
Ruby was fun, RoR is just so automated / quick to get everything up. ActiveRecord is one of the best ORM I have ever used. Django ORM was pretty good too.
I love NodeJS but I'm sometimes jealous of how easy the ORM was in RoR. lol
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. 😆 😆
I really enjoy ruby, it's all the fun parts of python with all the usable parts of things that arent python
i've just started learning php and boy, its tough
programming is tough for me, but i need it for my finals
Guys when i try to click on admin (under actions) in XAMPP nothing opens, how can i fix this?
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:
A - none of the above
C# programming language
Interview with a C# developer in 2022 with Jackson Monaeghan - aired on © 2022 The C#.
Music by:
https://teknoaxe.com/Link_Code_3.php?q=139
Programmer humor
C# humor
Programming jokes
Programming memes
C# 2022
C# memes
c# jokes
c sharp
.net
dot net
.net core
.net 5
visual studio
azure
Microsoft
xamarin
asp.net
.net fram...
My journal is just adding notes to code
We don't talk about how you chronologically order them
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
Planning? Whats that? #FeatureCreep
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.
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
https://github.com/roaldi/ScrapeYard
This is what I do for projects that I know I'm building for many people to use
@warped gulch
I need help with my VScode homework
I need a driver test class with my code
Language is java
I’m super busy with midterms this week to do it
then you should start now
I do this both on Physical Notes and through a Personal CMS/Wiki
"Microsoft Jav- I mean C#"
Amazing.
It’s due tomorrow
I really need help with jus the test driver
Yea, so you should start like right now
I literally can’t ffs
A test driver is just a class that tests all the functions of your function class
I know that
Idk how to make one is the problem
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();
}
}
Top is class, bottom is test driver?
No. I wont do your homework.
Oh I see
Fair
"We have WPF and UWP and Xamarin" Oh god
"Its like they are sending your code in the crash reports...."
click

stopped using venv when i switched to poetry , but it was for use with execve , and the path where it should look for the modules of the original process
I though poetry is just an extension of venvs
somewhat yes but with the difference that the venv doesnt live inside the project , so also no simlinks to the system sitepackages eg wich is kind of nice
importing?
import process
hello, i am having some trouble with swing (and a jfx webview), there are 2 issues:
- 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?
- 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 :<
agony
no
Duck you
Geese
Lol
exporting
hi guys, I am having problem with a C++ code, can anyone help?
oops meant importing
say the issue and people are more likely to help
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"
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
unlucky
should i share the entire code?
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
is there anyway to remove this?
yes
how?
fix your code
Anyone got any experience in creating Virtual printer that acts like wifi/network printer ? (Ubuntu/Linux)
If so please ping me
@eternal scarab This might fit your needs https://github.com/Boomaga/boomaga
thanks a lot, let me check
Are you putting the first item at index +1
the problems fixed, thanks to ᕼᗩᗷITᑌᗩᒪ
well what was the issue lol
@nocturne galleon moving the cursor before setting the value
Easy fix.
The unicode encoded one was borking on some other servers, and on android
@nocturne galleon so I just made it simple
ah i see, discord just hadn't updated it yet for me in the messages
newer ones work properly
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.
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)
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();
did you want to share that key
@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
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
@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.
it would but i really want this to be a single file script, and without having to mess with build tools
I imagine it'd be part of the sdk. It is for golang and python
it is not part of node.js from the research i did
Thats a pain.
it looks good to me from comparing it to examples i found online
If you use latest version of 17 it now has fetch support built in I think, which is easier to work with than request directly. Although if you want to automate the form data that I think still need a node module, since I don't think NodeJS has the FormData class browsers have.
If you use a node module you don't need any build tools though, just install the module once and be done.
Fetch support is neat, but there is still the issue that to use a form data module i would need to either install it globally or make the script not a single file, which i don't want
Well you could use a bundler I guess and still spit out 1 file... That or just fight w/ request I guess. 😆
Maybe its just because I don't use node, but this feels like a python thing to me
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
Did you try logging your form submission to make sure it all looks good?
Yup, looked good to me
Maybe i can try passing it through a validator, assuming one exists
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.
A "hacky" option is to just add the FormData code to your file. lol
https://github.com/form-data/form-data/blob/master/lib/form_data.js
Thanks for the help everyone, I'll look into it tomorrow :)
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?
@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
Maybe look into the engine behind CrossCode (https://impactjs.com/).
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!
You should use switch, pretty sure java supports switch with strings at least
yeah I'll definitely use a switch statement it was more just for readability when asking the question. Thank you!
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
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 ?
API docs for the runApp function from the widgets library, for the Dart programming language.
unfortunately i think in the end you are trying to use tools not meant/built for your use case
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
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
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
certain characters have to be escaped using backslash, if you are asking about that
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
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
I assume you want to mergedata1 and data2 into data12, yet you only assign to the former two. Make both data1 and data2 into const int[] and let the compiler errors guide you.
Greetings all: We’ve run into an issue where some customer WiFi SSID names that are not compatible with the mDash client library. Specifically, if there is an apostrophe in the SSID (e.g. Bob’s Network) then the ESP32 device is unable to connect. I’ve tried using \’ without success. Q1: What is the proper way to specify such an SSID using the ...
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 ^
Yeah, using special characters (non-digit, non-alpha) in your SSID can lead to "interesting" debugging sessions...
group by
SELECT data.trackName, SUM(data.playtime) FROM data WHERE playtime != 0 GROUP by data.trackName
Thank you very very much
I'll give it a try and if it doesn't work out I'll switch to rust+gtk(or another framework)
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
CSS is witchcraft and you can't convince me otherwise
Easily one of my fave gifs to share at work
yes, it is stupid and useless, but still awesome
Translation: print the following pattern:
Solution:
true

it works, wdym
Yup, and no math to take up cycles. Technically more efficient
It doesn't work though, the main-function never closes.
It goes on to the next page...
shhh, he doesn't know that
pogg
to be fair, it could be a task to teach you about printf function, no need to push functions, math & loops at that stage of education yet
(in other words, it could be just a big hello world)
to be fair, he only said print the pattern
Wohoooo, at 78% code coverage!
is that a yipee moment
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
Sounds more than sufficient
then yipee indeed
The sad fact is I can tell people how to write css just by looking at something at this point.
I’ve been called in so frequently to fix css dumpster fires
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 😄
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
for me the big issue is transformation and animation. those are topics i don't even try to understand, it is like a dark magic to me 😄
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"
Canvas comes up for d3
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?
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. :/
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
1frame is too fast
If I have google analytics in my mobile app, do I need to add Apple's App Tracking Transparency to my app?
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
That is a tricky question to answer, you can refer to this though https://developer.apple.com/app-store/user-privacy-and-data-use/
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.
Just get good bro pain is gain
camera on? just bring yo device
I’ve certain turned off vid and muted in meetings before
I talked with Apple Developer Support person over a phone call and I was still confused. They said something along the line of "tracking data and providing them to third-parties, or using them in advertisements, etc." requires the App Tracking Transparency. However, my google analytics only tracks user actions such as app launch, etc. so I'm not quite sure
I’d say app and user telemetry data typically won’t require the app tracking transparency but I don’t want to be a source of legal guidance.
Totally understand there. Appreciate the help anyway
No longer on the waiting list, let's try this :)
Love the new Stack Overflow Filters: https://stackoverflow.blog/2022/03/31/time-to-get-on-trend-filters/
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.
I love the Popup I got when going to StackOverflow earlier xD
Filters aren’t just for selfies anymore. Introducing Filters for Stack Overflow - the best way to beautify the site where you spend 10 hours a day.
I mean.. the 10 hours is a low estimate, but still...
still got stuff which takes forever
Not QUITE as man cores, but yes. I feel you. Sad that most things wont scale to even 16 cores...
at least i got enough ram for anything desktop oriented 😄
I dont...
Excellent profile picture, my good sir @cloud knot.
insanely ugly but working on a little tool for my prof
is it a design project
because if it isn't, 😎 nobody asked you to make it look good
No its for research
created on what
In a browser using threejs otherwise vanilla js
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...
the vertical monitor part made me laugh, cause i got a Java backend coworker who literally uses monitor vertically 😄
Can't believe I reinstalled my IDE only to find out that I misspelled paintComponent
so it was a painComponent (
) ?
But yeah, typos not caught by the compiler are the worst
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?
oh wow, that sierpinski triangle?
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
You can use all that ram and kiva midi player to play a large black midi file
thats cool
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)
From what I hear from the WAN show and lukes app experience small apps get fucked around every corner regarding rules and fees
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.
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
if you click the href does that image show in browser ?
rel="shortcut icon"
still nothing
i fixed the icon but nope
Nope
<link rel="icon" href="image/logo.ico" type="image/x-icon">
maybe image not recognized, try with simple png
could try putting the href as "./image/logo.ico" or same thing without the .
you could use some online image link to see, if really the image is the prob (for href)
cuz wouldnt image/logo.ico go to either website.com/image/logo.ico or website.com/pagenameimage/logo.ico depending on where its at
or just put the favicon in the root directory
yeah thats why I suggested to click the image link to see if that loads in the browser
He said he fixed it
i tried png still nothing
did you mention the type ?
and try to open the URL in incognito mode, which will load the site without cache
I think the problem is that there is no webserver
@inland marlin are you running a webserver or just reading the html raw
try /image/logo.ico
Even if he loads the html page just as file image/logo.png should work
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" />
The logo works when you add in css?
Whats a good UML Diagram tool?
thanks
yeah that shit is mwaahh
Holy hell a client managed to upload a 77 MB gif
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
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"
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
that's not what i meant by that, the copilot extension itself is proprietary (and so can be the data in the model but i don't care as much about that)
Ahhhhhh, I got you
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
Hi. I'm learning React is there a reason of why the attribute is not getting the value of the variable?
That's not how js templating works
It's ${name}
React became angry 😅
My bad, it's jsx so it's different
Try just {name}
Nope, it renders {name} in the element
No quotes
It became angry again
OMG, sorry I'm new to React, still adapting to all of it
Google is your best friend
Never used react myself
Thanks, I will read more deeply into it.
React is a very cool technology, very flexible
Vercel and Cloudflare pages have support, is free and good for being free
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
In react props string literals can drop curly braces and you can pass a prop name with no assignment which would be a boolean.
For example:
name="test" or name={"test"}
isBorder or isBorder={true}
And everything else is curly brace like:
age={100}
onChange={(e) => console.log(e)}
Etc
iirc for Fragment you can just do
return (
<>
...
</>
)
As fragment is implied with empty angle brackets
hey, can someone help me with this, i need to know what is the BIG O Notation of this python code.
your homework?
yes
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?
I think its O(log^2(|L|)*C) (or theta depending on what your professor wants) where C is the cost of searching and appending L
that is some pretty poor code even if i say so lol
Welcome to computer science. Where we teach you fancy algorithms, but not how to solve problems with em.
lmfao for real
ok i guess ltt bot deletes multiple messages if even one triggers the filter
That's Python, so x in L is linear. L.append(x) is amortized O(1).
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
ugh
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
Nice
can you ddos my website
(for testing)
no
@nocturne galleon what exactly are you trying to test?
prot
Prot?
agenst dos or ddos
Are you being actively targeted? There are plenty of ways to locally test
well my website just got over 10 b pings
Icmp? And what time frame?
10 min
Was it icmp? Or actual web requests?
actual web requests
Did you check from where?
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
If you want to do dos testing, do it internally.
Did you make someone mad? Just block the IP's coming in (there are tools for this) or put your stuff behind cloudflare.
well thare is thousands of ips
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
and 10b pings, seems a bit too much
Even a simple snort rule "block if more than x requests in a second" will handle this.
I use google domains
congrats?
yay:/
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.
ok
Or, again, cloudflare.
yes
that's just domain?
they don't do hosting as far as I'm aware so won't help at all
I assumed they were using google cloud 
My go-to is just slapping my sites onto/behind cloudflare and then never have to worry about an attack ever
I'm starting to learn cpp, coming from years of mainly python ... It's gonna be hard to stay consistent with the learning
you can just send requests for connection , without following up , leaving the host waiting till timeout
well attacks can still happen
from exploits, but yeah not ddos really
Is anyone familiar with RSPEC testing for Ruby on rails?
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
I'm a 16:9 32" 1080p TV gang member, and a 24" 16:9 1080p main monitor
Estimate is based off of relatively empty packets, single requests. I don't think slow loris type attacks are nearly as effective at hanging up a server anymore
can anyone join my zerotier network :/
why would I want to do that
free vpn?
anyone who doesn't already have a VPN doesn't need one
if it is free than why not
I just drop cash in a location once a year for my VPN subscription
because you pay for features
if u dont pay then no features
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
this mofo mails mullvad cash or some shit
iVPN 
why would I want some random person on the internet being able to see my traffic
yeah
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
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
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
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
I would assume some kind of virtualisation, not just docker strictly
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
for big boi server hosting, I would assume they don't use docker
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)
Nah. It's just straight virtual machines deployed. That's what we rent nowadays.
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)
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
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
The convention is to use underscore
_ , a = function()
oh cool
Waiting on Jenkins CI 🕰️ 👴
@wind horizon I just set up a internal CI/CD build server. Such an improvement
what did you use?
I was looking at FOSS things: drone, concourse
I already have a full JB license, so it's easy integration with all my IDE's just made sense
yeah
I imagine they're all pretty similar
Yep!
so far, jenkins is my least favorite
Anything in particular about it that makes you feel that way?
DSL and the clunky plugin ecosystem
That's one thing I do appreciate about using a paid product - the plugins and add-ons ecosystem is super smooth
if it's not easy, would bet it wouldn't be quick
have a client who needs a specific thing exported so often
the docs, sdk, are great
link to their sdk
they even have a sandbox environment where you can have test data and basically a demo application
nice they have multiple lang
using python which so far been a breeze
would use java just to meme
except for figuring out oauth in prod
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.
yea, think they have different designs in mind
GA is the CI/CD . jenkins is general automation
i still wish there was a CI/CD system with wake on lan functionality, i don't want to run all my build systems 24/7 at home
personally i used gitlab for most stuff, that is an all-in-one package (GIT hosting, CI/CD etc)
simple the word java doesnt have script in it unlike javascript
jk java is a programing language while javascript is a programing script
I guess you could setup your CI like GH runners to start on boot and then WoL the device. lol
For small projects though I just use the free amount you get unless I was doing tones of CI/CD stuff that would rack up a big bill.
what i mean is that i got tons of spare computers, i just don't want to run them 24/7 when i run like 1 or 2 builds per day
i got a spare i5/16GB RAM mac mini, a spare 10c X99 system with 32GB RAM etc
Couldn't you WOL them then run the build server on start?
(outside of my main threadripper 2950x, 128GB RAM server)
most of the CI/CD systems run tasks on active runners. but they don't have integrated capability to wake the system with runners to run them
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
Oh i see, so you want to WOL the clients/agents/runenrs not the main/master
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)
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
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
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. 🤔
Yea i guess the use case is for vms and contaienrs but not bare metal
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)
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 😄
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
Isn't that the puroose of mac mini, to have a mac without the screen
you need mac for everything macos and ios, their whole buildchain and toolset is macos only.
"could only dev if youre part of our eco system" yep sounds good
Classic Apple move
also $99/year to be able to publish into their stores
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
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
at least Objective C is now not the only option to code for mac/ios
i hate Objective C so much
I meant 1 company making the choice, but yeah I'm not saying I'd skip out on MacOS there are tones of users. In fact even though I'm not an Apple fan I'm typing this on a Mac right now. 😆
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
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];
Wait the 2nd one is Objective C syntax?
both are objective c
Someone really loved using [] when coming up with that. There is like 3 nested ones in that first line alone. 😆
but different libraries. first is what was used in NextStep, second one is current Apple code
and in any other language first line would be:
NSMutableArray mutableArray = new NSMutableArray();
second would be :
mutableArray.add(new NSMutableArray()); 😄
i seen worse objective c code than that
Wow I don't like that syntax one bit. lol
and then swift has the crazy unwrapping/type safety operators
Notes to never apply for an Apple IC role
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" 😄
What was their reasoning for everything being in [] I wonder?
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
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.
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
it protects the code from danger
apparently swift 6 is supposed to be at least partially about independence from apple
also swift does run on all of the big oses
@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
it is interfacing which is the issue, the whole section related to Optionals which do not exist in ObjC https://developer.apple.com/documentation/swift/optional
as someone who never used swift or objective-c. I am confused
i thought wrapping the logic in a "if not null" (or nil / undefined) is the way to go
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
optionals by itself are fine, just as they are in typescript and so on
it is when you hit the boundary of Objective C when it gets super confusing
object?.property is equal to object has property ? object.property: null
But swift also has ! (the "i know this object won't be null" operator) plus there is unsafelyUnwrapped when interracting with Objective C libraries and code
prolly somewhat like visual basic is partially independant form microsoft :p
