#development

1 messages Β· Page 46 of 1

bleak harness
#

c++ can be cool then, but he'll have to get swanky on those matrices

ashen sky
#

@buoyant creek Experience does not mean much.. I've read a lot of C++ code for a piece of software I use at work, also added a few debugging statements here and there, when it didn't work as expected. But I'm not able to start anything from scratch. Without any extra info "Experience with" does not mean a lot.

buoyant creek
#

Then it's up to him to give more details, we already gave some nice tips with what he just said.

delicate snow
#

@ashen sky thanks. I know c++. Im a graphics software engineer with openGL and c++ primarily.

The reason im interesting in javascript for realtime image processing and computer vision, is because ill be building a javascript web application for a company, who in the future may want to expand to an app and add that type functionality.

#

@buoyant creek to be determined. ^^^ Im trying to see if its possible to lower the cost with javascript as well, as c++ takes a lot more to write.

#

Like if it works, it works. Ya know? I just dont even know if its possible with how fast javascript is vs c++.

Choppy and glitchy is not the goal lol.

#

Anyways, i think i came up with a solution for the company now... one that would avoid the need or drastically lower the added value for such an app.

#

But im under NDA, so i cant really say anything specific.

lunar quail
#

@delicate snow that’d be something fit for webassembly. If you’re concerned about compatibility, then maybe asm.js. But nearly every browser supports webassembly nowadays.

#

That’s a very common use-case for webassembly. I have a qrcode scanning webassembly project that runs using the camera on the device. It uses OpenCV to scan for barcodes and qrcodes in real-time. Standard JavaScript was successfully scanning at about 1 frame/second. Webassembly would get about 10 frames a second in Mobile Safari on the iPhone.

#

It was very unoptimized code, but it worked, and 10 frames/second was very acceptable for us.

delicate snow
#

Hmmmm @lunar quail well that gives me something to think about. That sounds like it may be something thats less intensive to compute though. This would be along the lines of 3D tracking to super impose an image.

#

@lunar quail i dont think theyll explore it tbh. I told them that what they are thinking about is very complicated, and not cheap.

But i just gotta make sure i keep that door open with a low effort path there from whatever i write.

lunar quail
#

@delicate snow if/when you do get around to it, emscripten is your friend. It does all the transpiling and library loading with llvm. It even builds an html loader file as an example

delicate snow
#

Mmm solid recommendation. Youre not the first. I was told to use it to compile c++ to javascript, but havent explored it yet.

#

I know its solid, cuz so many people have told me to use it for all sorts of things.

proper gale
#

@delicate snow web app or phone app?

#

for android app, use Tensorflow lite from C++, and interact with it with the JNI

#

for a web app, tensorflow non-lite from Python or C++

#

for Apple, fuck idk

#

im specifically talking about computer vision, for image processing, see if you can offload that to the GPU via webgl or similar

worthy dirge
#

How good is Tensorflow C++ api compared with Pytorch? I have seens talks about the latter one, seems pretty sweet.

echo pendant
#

Okay I need some help

#

I am trying to figure out how I am going to get Razer Chroma to talk to my Coolermaster RGB. I think I might need to use the SDK and translate the API between both adding support.

#

Both have an SDK

delicate snow
#

@proper gale why not like openCV? I havent delved into th field of image processing and computer vision yet. I just have like some basic theory knowledge, and same for AI and machine learning. Same for mobile.

My expertise is in graphics programming, like i said. Im... ive spent about a year learning programming and about 6 months learning math i think. So i think im considered new to programming? πŸ˜‚

proper gale
#

Well what do you actually need it to do?

#

Computer vision and image processing are so generic that no answer is really wrong

#

Also, opencv is built on top of tensorflow

#

Iirc on opencv

nocturne galleon
#

Any Python guys in here?

zealous ginkgo
#

Me

proper gale
#

@worthy dirge i mean, tensorflow's python API is implemented on top of its C API, C++ being idfk but you can use the C API

#

the C++ API is meant specifically for embedding stuff though

#

so, you have a model you trained in Python already, you can load that in C++ and not need to bother with Python

buoyant creek
#

@proper gale I guess you're a bit confused. OpenCV and tf are 2 completly different projects. In fact, opencv is way older

proper gale
#

the what the fuck is wikipedia on about, ive heard of OpenCV, knew what it did more or less, never checked into much more about it

#

specifucally OpenCV supports the deep learning frameworks TensorFlow, Torch/PyTorch and Caffe.

#

its not just tensorflow, but i can be tensorflow

#

i omitted the others because, well, nobody cares, everything is tensorflow.

#

thats what wikipedia/github seems to be saying at least

buoyant creek
#

You can use OpenCV (a computer vision meant for real time stuff) along with tf/pytorch/we in order to gather images from the first and pass that images into your DL framework

proper gale
#

yea, that makes more sense

#

anything ive done stayed as TF

#

TF-lite is a competetor to OCV i guess then?

#

iirc, its designed for real time inferencing.

#

yup, i was correct there, its for inferncing on mobile devices.

buoyant creek
#

tf-lite is a lightweight version of tensorflow

#

It's not a competitor to opencv

proper gale
#

TensorFlow Lite is an open source deep learning framework for on-device inference.

buoyant creek
#

opencv is meant to work with vision, and you can attach models made somewhere else for it to use

proper gale
#

TF-lite can do that same thing, but meh

buoyant creek
#

tf-lite is meant to run any kind of pre-trained model (not actually any, but that's not relevant), be it images or not

proper gale
#

im not knowledgable enough here really.

buoyant creek
#

You can do inferences from data extracted from a pdf, image or chat messages

proper gale
#

i rarely touch anything not C++

#

and the ML/CV stuff while i do a bit of that shit, its minimal.

buoyant creek
#

I used to work with embedded and automotive stuff, but made the jump to ML and DS last year

proper gale
#

want to run arbituary C++ code compiled at runtime? i can help you with that.

#

as soon as LLVM fixes their operator overloading bugs with C++20

#

well, Clang

solar pendant
#

Reminder to any game devs here, this weekend is Global Game Jam 2020.

round dome
proper gale
#

@last ingot when embedding shit, Clang works far better. and from my experiance clang has better errors than GCC< so i use clang

#

if its something someone else wrote, they should be pretty damn similar

#

ive used both, i can use both just fine, Clang is easier to work with when you fuck up.

#

GCC errors are or at least were significnalty more cryptic.

#

new code.

#

porting shit i dont know.

#

comparatively cryptic

#

both are horrid for template errors, but meh

#

no compiler does a good job there

#

also, from a code base standpoint, Clang is better for embedding than GCC

#

Clang being part of the by design modular LLVM stack, vs GCC being, well, not.

#

embedding in an application/driver/etc

#

for drivers, AMD at least uses them in their drivers

#

not sure about Nvidia

#

embedded systems shouldn't be running a compiler in the first place.

#

well, lets say you want to make a GPU driver, you need a way to compile the shaders, instead of calling something on the command line, you use an API provided by Clang to compile the code.

#

Clang/GCC are almost perfectly interchangable on linux

#

so long as you dont go fucking with the standard libraries, you can link between them just fine

#

libc++ will fuck you up a bit there, because you need to make sure everything else is compiled against it for it to work correctly

#

if libc++ stuff is used in the API, if its not then you dont actually need to, its weird

left shoal
#

does anyone have servers and wanna start a host

buoyant creek
#

I really love clang, but gcc has far better support for some embedded devices

worthy dirge
#

I would say msvc has better template error message than gcc

proper gale
#

i was comparing GCC and Clang, havent used MSVC basically at all myself.

nocturne galleon
#

Does anyone have or can get me the Clickteam Fusion Android Exporter? Mine is corrupted. Thanks

worthy dirge
#

Yeah?πŸ€” But there is MSVC running on wine on compiler explorer

nocturne galleon
#

I just realised how easy HTML is

brave jungle
#

lolno

#

frontend is not easy

elder ivy
#

it's easy until it's not. and if you haven't reached the point where it's not you haven't done it enough yet

nocturne galleon
#

I mean as programming goes, it's not hard compared to things like c++

brave jungle
#

it really depends on what you see easiest

#

some might be talented in web design and others in low level stuff like C

round dome
#

I find C easier than python

ashen sky
#

@nocturne galleon HTML is as much programming as writing a document in word...

vocal fable
#

I have couple of questions for you guys

  1. Anybody uses Window Subsystem for Linux is good compare to something like Git Bash?
  2. Is Dual Boot worth it ? For learning to code
    3 Have you used chocolatey if yes it worth it ?
    Please reply ASAP
buoyant creek
#
  1. Used to use its first version until I was allowed to install linux at my previous job, it was really slow and had some problems with the file system, but I guess it was better than git bash
  2. I think so? I haven't used windows in years, so I can't say much
  3. Again, not a windows user, but it seems like a cheap shot at a package manager for windows
sage vector
#

@vocal fable

  1. Anybody uses Window Subsystem for Linux is good compare to something like Git Bash?
    Not used it but I use Git Bash on my work and it is "fine" but not that great.
  1. Is Dual Boot worth it ? For learning to code
    Personally, I am not that big fan of dual boot since it makes it rather inconvenient to change between each installation each time you want to change context. I would start with a Virtual Machine and if you are going to like it, go full Linux on a dedicated machine.

3 Have you used chocolatey if yes it worth it ?
Yes, and I think it is a rather horrible attempt to simulate a package manager on Linux but at the same time trying to much to make everything automatically with some really nasty scripting.

vocal fable
#

Thanks @sage vector !

raven kernel
#

@vocal fable cough just install linux
Sorry.

  1. Git bash and the WSL are two completely different beasts. One just tries to be a nicer environment to run git commands whilst the other litterally tries to be Linux. From my experiance getting files in and out of the WSL environment is a bit of a pain but I beleive they have fixed that mostly?? So... depends on your use case as to whether it's 'good' or not.

  2. Dual booting is well.. Annoying imo. You'll probably find that you just end up using what your used to all the time leaving the other OS mostly unused and a waste of space. If you intend on learning Linux, use it like you mean it, install it outright and learn otherwise you'll probably just neglect it. If your thinking of using linux for leanring to code... ehh, find a platform you like (whether it's linux, mac or windows) and learn on that. Coding environments differ slightly from platform to platform and learning the ins and outs of your platform for what your learning is rather helpful. I've used Linux for >5 years and I'm at the stage where I have no clue how to even use windows let alone compile C code on it.

  3. Exactly what @sage vector said although I want to add that unlike linux package managers, chocolately doesn't download from a software repo like package managers but rather just grabs the latest version from the software's website and therefore has no concept of version control or upgrading software or even making sure that what it's downloading is going to be reliable. The usecase for chocolatey is when your trying to automate the deployment of new windows machines rather then for the end user trying to maintain their software.

vocal fable
#

Thanks @raven kernel for your advice

raven kernel
#

np happy to help

vocal fable
#

by they which linux disto are you running right now?

sage vector
#

@vocal fable Arch Linux (and have done that for the last 14ish years)

vocal fable
#

ok I am running Pop OS on VMware right now

#

Arch is bit too much for me right now

#

what kind of development are you doing right now?

sage vector
#

Well, I am not using Linux at my work but for home projects I am using primarily IntelliJ on Linux to develop Dart and Java programs

#

My current project is making a lib to interface LIRC (infrared remote control system to send and receive infrared signals) with Dart

#

But yes, Arch is not for everybody but it is really great for people like me πŸ™‚

vocal fable
#

sounds cool

buoyant creek
#

Anyone here ever tried to use nginx as a server for a rtmp stream that allows clients to view it through mpeg-dash?

zealous ginkgo
#

I am using Ubuntu server (I have two servers). Currently my work computer has dual boot with Windows 10 and Arch Linux. But I will install Manjaro Linux (Based on Arch Linux) soon.

sage vector
#

@zealous ginkgo Any reasons for Manjaro?

#

(Instead of Arch)

vocal fable
#

Manjaro is said to be Arch on training wheels

sage vector
#

Manjaro is really not Arch. It is more like a fork than a distribution based on Arch.

vocal fable
#

@zealous ginkgo Can you share your Dual boot experience ?

zealous ginkgo
#

I switched to Arch from Ubuntu desktop but I am still not familiar with Arch using from command line. That is why I think that it would be better to install Arch with DE first. Then move to command line.

#

Yes, I can share.

#

If you want to make dual booting configuring/installation (I do not know the right word for it) easy, I recommend choosing Linux Mint or Ubuntu. They have option to install alongside Windows.

#

This install alongside Windows installation option partitions your hard drive automatically, but you can do it by yourself.

#

But it is not really hard to partition hard drive by yourself.

vocal fable
#

I was thinking of dual booting Pop os

#

do you have a specific reason to dual boot or you are doing it just for fun

zealous ginkgo
#

I am using Windows for gaming, but it is not a good reason because many games can be installed and played on Linux distros.

vocal fable
#

Linux for development I guess

zealous ginkgo
#

So sorry I thought that you were asking why I am keeping Windows. I use Linux because I program PHP, Node.JS and Python. So yes, Linux for development. And I am using Windows for gaming and running some exes (I know WINE exists).

vocal fable
#

will you recommend dual boot to any one who is learning coding?

sage vector
#

No, if the purpose is to learn coding I don't think it makes much sense to also start learning linux

#

Unless you are going to make some Linux specific development

#

Should add that I think it is important to lean Linux (especially if you are going to be professional developer) but Linux can be complex enough alone πŸ™‚

buoyant creek
#

If you're starting, I don't think it matters

#

But there's only one guy where I work that prefers to use windows for dev purposes lol

#

The rest of us mostly use linux, with some on macs

vocal fable
#

Well thanks guys for your time everyone

#

Well I am not just starting out I am getting back into Coding after almost a year

#

Also I have Computer sci degree but it's curriculum is pretty old

ashen sky
#

@vocal fable Why would you need linux, just to "learn to code"?

vocal fable
#

Kind off

#

Windows is not development friendly

ashen sky
#

Why not?

vocal fable
#

Why not?
@ashen sky sorry but I didn't get that.

ashen sky
#

@vocal fable What makes Windows development unfriendly?

vocal fable
#

Setting things up

#

Lack of good terminal /package manager

ashen sky
#

You install Visual Studio, and that's it? You install PyCharm, and Python, pretty easy. Also making windows software is QUITE unfriendly on ANYTHING but windows. πŸ˜‰

vocal fable
#

Also knowledge of Linux is considered good for a developer

#

@ashen sky do you use windows for development?

ashen sky
#

Depends on what you want to do. If you want to do stuff for the web, sure, but if you want to write business software, windows would be more interesting.

#

I use whatever I need to get the job done. Mostly we write in PHP, and PHP IS a nightmare on Windows, however, if we used C#, getting it to work on anything BUT windows, would be a nightmare. So it really depends on the platform you develop for, and the level of control you ACTUALLY needs of the system. For learning, I think not much beats VisualStudio when it comes to getting an IDE up and running. It's litterally just a matter of pressing next, and selecting the platforms (Like mobile, web, desktop) and languages you need (Python, C#, C++), then wait and you're ready.

But if you need to develop something, doing it on the target platform is mostly always the way to go. No OS will ever be better suited for the job, than the OS your users use.

And to answer your question, I mostly use PHPStorm and PyCharm on a Mac, as our main target platform is the LAMP stack.

#

And for a terminal, powershell is quite capable, once you get to know it.

#

@vocal fable Most of my colleagues use Windows btw.

vocal fable
#

I trying to learn web development

ashen sky
#

For that, development OS make no difference. Most of the great tools exists and are fairly easy to install on all three major platforms. (Win, Mac, Lin)

#

@vocal fable Also, in my opinion, good knowledge of your development OS, will really help whenever something goes wrong. It's WAY easier to troubleshoot something if you KNOW where to look, know where everything is. It makes it much easier to work out, if the problem is in your code, your toolchain, or some OS setting, you never knew existed.

#

If you want to learn Linux, fine, if you want to learn development, fine, want to learn development on linux? Also fine. However, don't try to learn everything at once. Get to know the OS you want to learn, THEN setup a development environment, and get coding. Trying to learn everything at once, can easily lead to frustrations, when you have no idea where to start, when things don't work as expected.

vocal fable
#

Okay thanks for your advice @ashen sky

proper gale
#

@vocal fable only bit im gonna add, if you think you are going to eventually want to move from windows to linux, make sure whatever IDE you use works well on both.

#

thats why i didnt spend the time to learn Visual Studio, opting for Clion instead, it runs on Windows and Linux, and i already knew how to use JB IDEs

worthy dirge
#

On Windows, Clion is slower, and less nicer to use imo than Visual studio. And it's not free for everyone

buoyant creek
#

I don't think it's a good idea to get attached to an IDE at all

#

Use some general purpose editor like sublime, vscode, atom or even vim

#

I only use IDEs when a specific project/team has build everything on top of it

sage vector
#

I would add to this that the need of using an IDE is very dependent on the language you are programming. E.g. it will not be a great experience to be a Java programmer without using an IDE and I guess the same could be said for C#. Even Dart (which are closer to script languages) can be rather annoying without the tooling from an IDE.

worthy dirge
#

The best approach is you know how to work without an IDE, and then just use an IDE

sage vector
#

Yes πŸ‘

proper gale
#

i was more getting at that its a PITA to switch IDEs, and you probably dont want to do that at the same time as learning a new OS, your approach to how you like to code is up to you

#

@worthy dirge, VS being nicer than Clion on windows is exactly why i considered VS in the first place

worthy dirge
#

You can consider QT too, an even less nicer but free version of Clion, if used as C++ ide

proper gale
#

the whole reason i went with Clion was because i already knew how to use JB IDEs

#

the few IDE features i actually want, CLion has, so im just gonna stick with it.

gentle sedge
#

Finally got into Unity for the first time and I'm really impressed. I made a lot more progress then I thought I ever would. I don't really have any idea in mind yet, just learning.

harsh needle
#

Anybody wanna tell me what I have to learn/do to make my.own smartwatch?

limpid reef
#

Well, for starters, you're going to need hardware, either something small like an arduino or Tiny board + LCD screen, or a full production facility. Then you'll need to take an off the shelf OS, like Android, and develop it into your own, or write something from scratch, including an app to sync it with smartphones.

harsh needle
#

And apps?

#

Like calender etc

harsh needle
#

Or from the play store

worthy dirge
#

Use STM32 to build from scratch

ashen sky
#

@buoyant creek For beginners, setting up an entire development toolchain, including editor, compiler, debugger etc. is quite a task on it's own. If you want to get started learning how to write the code, an IDE will lower the barrier quite a bit. Also, never seen a much nicer debugger than the one included in VS. I suppose the one in CLion will be pretty much like what you get in PHPStorm and PyCharm, while gdb or the like, has quite a learning curve of its own.

buoyant creek
#

Fair enough. Although, FWIW, CLion does use gdb as a debugger

worthy dirge
#

And you need extra stuff to set up Clion compiler and Cmake. While VS will run with one key after installed.

buoyant creek
#

If we're talking C/C++ IDEs for starters, nothing beats Code::Blocks

#

Bundles everything, cross-plat and isn't fucking big like vs

round dome
nocturne galleon
#

@buoyant creek Visual studio is so much better than Code::Blocks

#

Code::Blocks is awful. Sometimes GCC doesn't even install correctly and fucks the whole thing up and as an IDE, VS is just nicer, better to use, easier, more features and can do a lot more, not to mention how much better it looks.

buoyant creek
#

Eh, I'm really not a fan of VS, way too clunky and heavy for my taste without bringing much to the table compared to other solutions

#

Along with being non-free and windows only

worthy dirge
#

It's free

buoyant creek
#

Not if you're using it for actual work

worthy dirge
#

Define actual work

buoyant creek
#

And also in the sense of being proprietary

#

Something that brings you money

#

Because then you'd need a commercial license

worthy dirge
#

I do actual work and I use free community edition

buoyant creek
worthy dirge
#

I don't see a conflict

buoyant creek
#

If you're using as an individual for your own projects, it's fine

#

For an actual company/workplace, it's not

onyx girder
#

Wow I bet microsoft is gonna send FBI to your work place

buoyant creek
#

You do know that it's common for them to make audits and get in contact with people that are misusing their licenses, right?

#

A quick google shows many cases of that happening

#

Also, your company can't be taken seriously if you don't even pay your own licenses

bleak harness
#

hmmm, what about VSCode ?

ashen sky
#

@bleak harness I find it quite lacking, for my taste. It's very similar to Atom.

bleak harness
#

wait what ? with all the official extensions that exist ?

ashen sky
#

@bleak harness Having to go through and install a bunch of extensions, is quite wasteful in a work setting, unless it's the only tool able to do the job. I'm about to start on a C# project, and installing a windows development machine, with VS on it, and whatever needed to access our source repositories, took a few hours. If I also needed to install a bunch of extensions just to get basic functionality like integrated compiling, debugging and running of the code, it would had taken a lot of time. I bet you can customize VSCode to be quite useful, however, for me, it's simply not worth my time to find the extensions I need, and install them. I've done it for other IDE's and editors, and to be sure you get the right environment, you have to go through quite a lot of extensions, even some you either decide not to install, or remove after testing them.

#

If I didn't have any other options, I might had taken the time to customize either VSCode or Atom, but I do have a license for VS, and everything is included after install. πŸ˜‰

bleak harness
#

hmmm, I get your point.
I've been blasting through it with c, py, dart/flutter but I usually run a terminal (ubuntu-bash or powershell) for all my git and compilation needs, which in itself makes it more manageable

#

I wanted to murder CMakeLists.txt at multiple points back in the day

ashen sky
#

Sure, I just hate having to switch between applications to do simple things like starting a debugging session. However, I do use Sourcetree for most git operations.

bleak harness
#

between applications ? I use the terminal pane in VSCode

#

and I've tried git GUI's but I always end up making branches and f*cking up stashes

ashen sky
#

Yeah, well, I mostly work with PHP, whenever I use something written with C/C++ or using any kind of make build process, I'm compiling someone elses software. (Mostly Open Source projects)

bleak harness
#

ah yeah, I do that too, I just take the *NIX version and run make

ashen sky
#

Well, I probably have too few things I need a terminal for. PHPStorm which is my primary IDE, has a terminal built in, but I've never really had a need for it.

bleak harness
#

yeah, same with PyCharm, but I sometimes do some grep in bash

ashen sky
#

Well, mostly you run some combo of ./configure && make && make install

bleak harness
#

yeah

ashen sky
#

I hardly ever work with file based data. Whenever I do, it's troubleshooting deployed code, not on my own machine. Which means SSH sessions to remote machines, not doing something in the IDE at all.

bleak harness
#

hmmm, depends on the work I guess then.

#

The last few days I've been hardcore using dart/Flutter and VSCode has been a life saver (especially for my laptop's potato RAM)

ashen sky
#

Yeah, and what environment you're used to. πŸ˜‰

#

Just a matter of using the tool that works best for you, to do the job.

proper gale
#

whats wrong with cmake?

bleak harness
#

I used to love Intellij and the likes, but it's pretty much neodynium in terms of memory and CPU usage

#

cmake is someone taking 'copy me but don't make it too obvious' literally and just rendering a simple tool unusable

#

imho

ashen sky
#

Well, I've not had problems with resource usage in PHPStorm or PyCharm, I've not used other JetBrains IDEs though. The main RAM hog on my work computer are Safari and Chrome. πŸ˜‰

bleak harness
#

how much RAM do you have ?

proper gale
#

CLion is an extremely heavy user of ram for me

#

and CPU

bleak harness
#

I'm at a nice and breezy 8

#

GB

proper gale
#

CLion usually sits at 20-25 for me

bleak harness
#

my home desktop is at 32 which makes it my main when not otr

#

@proper gale of RAM ?

proper gale
#

mhmm

bleak harness
#

w.t.f

proper gale
#

ive got 96GB in my system, so, meh

ashen sky
#

@bleak harness Haha.. Actually had to remote in and check. But 16GB in the work computer. But the previous machine I had, had 8GB, which was also no problem for the IDEs.

#

However, I DID once run VERY much out of RAM, when Safari used about 80 GB (Yes, 80 GigaBytes of RAM)

bleak harness
#

@ashen sky it's a problem when opera has 70 tabs open one of which is spotify and another youtube

#

@proper gale can't extend my laptop^s ram sadly

proper gale
#

only 70 tabs?

bleak harness
#

weird flex but ok

proper gale
#

i usually have 300-400 open

bleak harness
#

8 GB RAM - (dart + vscode + 70 tabs)

#

leaves more or less 600Mb left

ashen sky
#

Well, I use Tidal for music, and just installed the application instead. Don't know if you have that option, or a policy prevents it.

bleak harness
#

I do, but then I get ads

ashen sky
#

Ahh.. So you don't have a paid account?

bleak harness
#

nope

#

still a student, with like very little moulah to my name

ashen sky
#

Ahh.. So you're one of the reasons, they don't really make any money. πŸ˜›

bleak harness
#

yes my 8.- contribution shall be missed

ashen sky
#

I have NO idea what their ad revenue on free accounts is... But one person will not make much of a difference. It's the combined number of people doing it that does. But I suppose they could solve the problem with most ad blockers, if the problem was big enough.

proper gale
bleak harness
#

too much flex

proper gale
#

there is a chance, that i have more ram, than you do SSD space

bleak harness
#

Well no

proper gale
#

do you think thats all of my servers?

#

because those three have 512GB

ashen sky
proper gale
#

1TB of ram, good good

bleak harness
#

ssd

proper gale
#

i said chance

ashen sky
#

Well, to be hornest, it's 2 machines in a VMWare cluster. πŸ˜‰

proper gale
#

mine are three machines, and only 512GB

bleak harness
#

y'all crazy

proper gale
#

i need to get an IB card in Kizuna so i can use that 256GB of ram as a stupid fast ramdisk

#

for rem/ram

bleak harness
#

potato compared to y'all

proper gale
#

fucking WSL

bleak harness
#

yes

#

fight me

proper gale
#

garbage

#

run actually linux

bleak harness
#

that's my J: disk

ashen sky
#

@proper gale Yeah, well, we need a lot of smaller servers, not a few big ones. However, we DID try to compile stuff like asterisk and firefox on the bare metal, before installing VMWare on them. With 16 cores each, it took about 5 minutes to compile Firefox, and about 30 sec to compile asterisk.

proper gale
#

@ashen sky about that, Kizuna (my fastest server for compiling), yea, it takes 40 minutes for it to compile tensorflow

#

64 thread bulldozer @ 2.2ghz

bleak harness
#

Y'all crazy

#

Or I need to invest more money

proper gale
#

rem and ram are behind Kizuna at 60 minutes

#

and my other serves fall behind there somewhere

bleak harness
#

So @proper gale what do you develop in ?

#

As in langs ?

proper gale
#

C++

bleak harness
#

Just c++?

proper gale
#

pretty much

bleak harness
#

Huh

#

Interesting

ashen sky
proper gale
#

what is this, a quad core?

ashen sky
#

A 6-7 year old machine, if I'm not mistaken. πŸ˜‰

proper gale
#

i wasnt getting at the age

#

my servers are sandybridge at the newest

ashen sky
#

@ashen sky about that, Kizuna (my fastest server for compiling), yea, it takes 40 minutes for it to compile tensorflow
@proper gale Never compiled tensorflow, so can't say if it's fast or sole. πŸ˜›

proper gale
#

try it sometime, it takes a while

ashen sky
#

I've compiled PHP, Apache and the Linux kernel, on a 486 machine.. Does that count? πŸ˜›

proper gale
#

sure

#

still waiting on an MKL bug to be fixed in tensorflow

ashen sky
#

I think it took like 3 hours for all of them. I'm pretty sure I've watched a movie while it was compiling.

proper gale
#

use MKL and MultiWorkerMirrored, crashes

ashen sky
#

As in several workers doing exactly the same at the same time?

proper gale
#

multiple machines working on the same model, using different parts of the same dataset

ashen sky
#

Ahh.. Ok. And machinelearning and data analysis tasks, also explain the need for huge quantities of RAM. πŸ˜‰

proper gale
#

also why i have IB between those two machines

#

when i first got them, i was running tests with the onboard ethernet ports

#

bad scaling because latency, and maxing them out

#

even IPoIB is lower latency, and its much faster

ashen sky
#

Yeah. The most crazy connection we have, are 10Gbit ethernet P2P between our 2 ESX hosts, for speedy vmotion tasks.

proper gale
#

and somehow its supposted to work with RDMA, but as it is right now, i can get the same performanuce with one of them instead of two by using an mkl compiled TF vs a non-mkl clustered

#

and have lower power draw while doing it

ashen sky
#

The only concept there I kinda get, is RDMA for "Remote Direct Memory Access" if I'm not mistaken. πŸ˜›

craggy acorn
#

i wanna upgrade my cpu and change my motherboard since i cant change the fan speed right now, can anyone help me?

proper gale
#

yee

bleak harness
#

sure

ashen sky
#

@craggy acorn Hmm.. Potentiometer on the power line to the fan, would allow you to adjust the speed.

proper gale
#

using RDMA latency can be lowered vs using the TCP/IP stack on top of IB (RDMA anyway)

#

IPoIB is still faster than normal ethernet though

ashen sky
#

And I suppose my understanding that IB = Infiniband is correct. πŸ˜‰

craggy acorn
#

@ashen sky where do i find that? i dont see it anywhere

bleak harness
#

@craggy acorn amazon, ebay, local electronics store, local hardware store

proper gale
#

eth ```64 bytes from ram.localdomain (172.17.1.50): icmp_seq=4 ttl=64 time=0.225 ms

bleak harness
#

an old volume knob, etc...

proper gale
#

IPoIB ```64 bytes from 192.168.150.3: icmp_seq=4 ttl=64 time=0.153 ms

craggy acorn
#

oh

#

ill try that

ashen sky
#

@craggy acorn Wherever you get you electonic components (That is stuff like resistors, IC's and the like)

#

@craggy acorn Something like this one, should do it. You need to apply the power line from the PSU/Fan header, to one of the outer pins, ground to the other of the outer pins, and the powerline to the fan to the middle pin. By turning the knob, you change the resistance on the circuit, limiting current/voltage flowing to the fan, and thereby limiting its speed. It's a quite analog solution, but also pretty low budget, since a potentiometer costs about USD 1-2, then add the wires you need, and either solder or some other means of connecting the wires.

#

Actually that's how casemodders limited fan speeds about 15-20 years ago. πŸ˜‰

#

It WILL however, not give you an excuse for upgrading CPU and mainboard. πŸ˜‰

craggy acorn
#

i think im still gonna upgrade my cpu though

ashen sky
#

I'd probably go that route myself as well, as the CPU and mainboard in my computer is pretty old.

bleak harness
#

wooh, just had a 20 minute C debugging adventure

proper gale
#

only 20 minutes?

buoyant creek
bleak harness
#

@proper gale yep, was a friends code, she'd f*'d up some includes and a socket address family declaration

#

in and out, 20 minute adventure

wet stump
#

anyone experienced with c++ by any chance

spark quartz
sick condor
#

@bleak harness At least it wasn't a 4 hour adventure

ancient cave
#

I suppose while we are flexing our system specs, i’ve got an AMD Ryzen 7 2700, 16 GB of RAM (going to upgrade to 32 in the near future) and a GTX 1660

round dome
#

@wet stump just ask your question

light isle
#

Bro

#

I've got a pretty powerful rig

pulsar terrace
#

@light isle I want to have arch with dwm so bad, but every time something goes wrong at some point with dual bootloader windows/arch 😟

light isle
#

Arch sucks dont use it

pulsar terrace
#

how come?

light isle
#

It requires extra work for now achievable benefit

pulsar terrace
#

I find setting it up pretty easy and I loved how easy it was to customize it for my dev environment

#

though I wonder if nvidia has any drivers yet for 2080ti

buoyant creek
#

It does

#

rtx cards work flawlessly with the proprietary drivers

pulsar terrace
#

cool, I remember my friend always had issues with his 1080ti when it came out for like a year

#

I had a 1070 and it worked fine

#

might give it a try someday soon, really miss my arch setup

#

was the most productive environment I had

#

windows couldn't implement proper virtual desktops for so many years and when they did it was utter garbage

#

and still is

buoyant creek
#

I can't really stand using windows nowadays. Anything on it is so... sluggish

pulsar terrace
#

it's not that it's sluggish for me, more that in windows I have to jump through bunch of fire hoops before I could do something that on my linux setup is just a single shortcut press

#

and that I can just code in any little thing I need into my window manager

#

meanwhile in windows land nowadays: remember the thing that took 2 clicks to do? now it's 5 clicks and 10 dialogs away πŸ‘

buoyant creek
#

Yeah, also that lol

#

But wsl helped a little bit

pulsar terrace
#

never tried it

buoyant creek
#

Had to use it for a while

#

Made using windows more bearable

#

But still not comfortable enough

olive terrace
#

WSL feels like they sloppily threw something together, I'm waiting for WSL 2

pulsar terrace
#

is it possible to use two different drives for bootloaders, windows/linux uefi setup?

buoyant creek
#

Yeah, sure

#

You'd just need to pick which drive to boot from in your uefi

light isle
#

@olive terrace use cygwin

bleak harness
#

WSL is brilliant for tty only things (compilation tools such as gcc, ...)

#

gonna double my RAM very soon

elder iris
#

yo im teaching myself python and I'm stuck on a simple bug. could anyone dm for a min and help me out?

rare egret
#

WSL 2 has been available for a while now?

idle shuttle
#

yo im teaching myself python and I'm stuck on a simple bug. could anyone dm for a min and help me out?
@elder iris why don't you just put it here, you might get help faster instead of others having to reach out to you...

elder iris
#

it ended up just being an indentation issue

#

but thanks

indigo roost
#

Anyone over here who's good at Vuforia ?

wise hearth
#

9000 threads on a 4c/8t laptop cpu

#

casualy matching the performance of 10 1080's

#

as you do

gray reef
#

anyone here got experience with swift?

round dome
#

Here's the only swift code you'll ever need

import Foundation

do {
  try Process.run(URL(fileURLWithPath:"/bin/bash"), arguments: ["-c", "pacman -S gcc"]) { (process) in
    print("C > Swift")
  }
} catch {}```
digital moon
#

you're also going to need binutils and gdb if you ever need to debug or such

floral stirrup
#

learning Java still, can you use getters and setters for exception handling? like, can you put your exception handling mechanics in your setters and getters?

nocturne galleon
#

My latest project for monitoring my linux servers πŸ˜„ based on proxmox

raven kernel
#

looking very nice. Love the color scheme

onyx grove
#

@nocturne galleon wow that's cool!

#

is it on github?

wet tartan
#

what is the best programming language for games i wanna get into game developing ive done some research and the internet says C++ but i wanna hear an opinion from real people

round dome
#

ya C++ is pretty neat

worthy dirge
#

Isn't here also internet?

worthy dirge
#

It is the best time to learn C++, with C++20

nocturne galleon
#

I am trying to learn some C#, and I have a piece of text I'd like centered in the console, regardless of window size - Can one of you point me in the right direction?

worthy dirge
#

Define small

#

Modules literally changed how the language works

#

You don't want to change the syntax to a language

#

You can find many infos about modules but you will find much more after major compiler supports it. Basically, no more header files headaches and easy to use packages like python does

#

Every headaches can be solved by if you have experience with ...

median jewel
#

Hi, not sure if this is the best place to ask but I think it should be.
Someone from our team messaged in #tech-chat-1 a little while ago but I guess it was missed.

#

Me, Sirocyl and Langerhans work on switchroot android, which you currently have a video on floatplane on, if you have any questions or comments about it we would love to hear them

round dome
#

so many things are different from c++11 to c++20 lol

#

make_unique, compile time integer sequences, user-defined literals for standard library types, new [[attributes]], variable templates, type deduction, lambda capture, generic lambdas, binary literals, parallel algorithms, splicing for maps and sets, std::byte, std::filesystem, std::apply, std::invoke, std::string_view, std::any, std::optional, std::variant, direct initialization of enums, u8 char literals, constexpr if, selection statements with initializers, structured bindings, nested namespaces, inline variables, lambda capture this by value, constexpr lambda, folding expressions, template argument deduction for class templates, concepts, designated initializers, template syntax for lambdas, ranged-based for loops with initializers, constexpr virtual functions, explicit(bool), char8_t, immediate functions, using enum

#

and more

round dome
#

No most of the changes aren't just for readability, most of what's added gives you better ways to manipulate your objects (addition of STL algos that play with prvalues,...) so you get optimization boosts.

You could even experience optimizations compiling c++11 code with a c++20 compiler.

Saying you could just use boost and stick to c++11 isn't really justified. Depending on boost (even though it's a good library) isn't really a good thing. Having stuff in the standard takes care of portability and dependencies.

Of course you could simulate C++20 behavior with C++98 or C++11 but you would be wasting time (unless there are a few legacy compatibility restrictions, in which case you should still port the old code to C++20, but some companies are dumb).

#

well in the near future old code bases are bound to be updated to new versions, preprocessor directives making everything messy are bound to be extinct

worthy dirge
#

Ranges are for readability

#

That's in C++11

round dome
#

I'm not a big fan of writing auto in my code, but I like the operator and the deduction that comes with it

#

it's the trick part in trick question

#

I already answered everything it was so addictive

#

answer to the screenshot here:||it's undefined behavior||

#

they use C++17 because it's was the latest official version people that are into the language know

#

but some C++14 and C++11 behaviors are tested too

worthy dirge
#

C++ new standard is always trying to be compatible to older standard, so that you don't break your code

round dome
#

I just can't wait for them to add questions about C++20

worthy dirge
#

I guess it's int

#

Auto should use least biggest containable type

drifting maple
#

Hi Is there anyone in here who is versed in Python

#

or who could maybe help out a poor college student figuring out where things are breaking?

#

My problem is it's kind of al ong string

#

and I didn't want to just bury everyone's talk

median python
#

@pulsar sparrow @bright olive hey you two i found something in one of LTT's videos that might need editing out. Could potentially demonetize the video?

#

is there a place to submit this information?

pulsar sparrow
#

I dunno if there is a place to submit something like that other than emailing the info@linusmediagoup.com, is it the ripped shorts thing or something else?

olive terrace
#

Well now I'm curious, what's the ripped shorts thing?

median python
#

its is the ripped shorts thing! I kept scrolling down comments and finally started seeing people mentioning it so i assume you all read the comments semi regularly?

pulsar sparrow
#

all good then, it'll get changed if they think it needs to.

median python
#

Sounds good, sorry to bother you. I'm sure you're not technically working right now.

pulsar sparrow
#

lol, all good.

olive terrace
#

@median python you've gotta DM me the video lmao

median python
#

@olive terrace its in the dyson video. You'll have to watch the entire thing to find it πŸ˜‰

olive terrace
#

Works for me lol

#

Good ol Ctrl + F

median python
#

@olive terrace i wanted you to watch the whole thing in order to keep their user attention rating high 😐

olive terrace
#

I already watched the entire video

#

Wasn't looking there tho

median python
#

ya i thought they were about to plug LTTstore lmfao i was really confused

round dome
#

why the fuck are you bringing this up in the #development channel

gaunt finch
#

how di i correct this margin problem?

gaunt finch
#

Html and css

#

Ok

silent eagle
#

So anyone here wanna join me on fun project ?
First of all i know there is not much point of making this but its just fun project with open possibilities.
I was thinking about designing web browser but iam not programer so i cant do it in Chromium. But if you are interested to do this Dm me.

round dome
#

I wanna build a rocket to the flame nebula who's in

silent eagle
#

well its just fun side project, i will be doing the ui anyway so if its not programed its not any loss to me. i just ask if someone is looking into building portfolio

pale onyx
#

I am building a portfolio but I have no clue on how to setup a chromium lol

#

I made this background in photoshop, I am thinking about removing the turquoise blocks on the bottom and using CSS/JS to make animated ones that play an infinite loop so it would look like you are getting closer to the mountains

#

Would that animation be "too much?" I wanna make my portfolio website look unique

tribal ermine
#

just make it slow enough to not be annoying

forest sphinx
#

anyone know how to set policy on ChromeOS using terminal. Developer boot mode is enabled as well as Linux

frigid jetty
#

I hate big-o, no idea how to do it

#

anyone got advice

deep scarab
#

i <<= 1 is the same as doing i /= 2

worthy dirge
#

No. It's i*=2

#

So it would be 1+2+4+8+...+(nearest 2 exponent to N) times, so O(N)

elder ivy
#

isn't it O(N log N) ?

worthy dirge
#

@elder ivy This is geometric series

#

It's highschool math or something

elder ivy
#

?

worthy dirge
#

The accurate sum is (2N-1)

elder ivy
#

this seems like just regular algorithms course in uni

#

likely the first one

#

the sum? it's not about the sum is it

worthy dirge
#

It's about complexity, but in this question it's about looping times

elder ivy
#

the outer is log N and the inner is N --> N log N

worthy dirge
#

lol

elder ivy
#

?

worthy dirge
#

You don't simply multiply two complexity to get the total complexity

elder ivy
#
    for (j = 0; j < N; j++)
        foo()```

O(N^2) is it not?
worthy dirge
#

Yes, but it's because the inner loop var doesnot depend on the outter

elder ivy
#

I see what you mean

#

do you agree the outer is log N?

worthy dirge
#

yes

elder ivy
#

and then for each i the inner runs i times?

worthy dirge
#

This is obvious

elder ivy
#

so the inner is O(N)

worthy dirge
#

No

#

It's O(i) for each i, not N

elder ivy
#

same difference in big o notation isn't it

worthy dirge
#

The reason here is simple to reason. If you make N=8, the statement runs 15 times, if N=16, 31 times and so on... The nested loop is equivalent to a non-nested one, running (2N-1) times

elder ivy
#

o.O that's still in the same order of time

pale onyx
#

@tribal ermine I uploaded a "work in progress" version of my new portfolio page, this seems to be about the best I can get the animation working. If anyone wants to help on how I can make it look better, let me know.
https://www.kizmotek.com/Beta/

#

Here is the code for making that animation
CSS:

@keyframes introMoveUp {
  0% {
    height: 8vh;
    bottom:0;
  }
  100% {
    height: 0vh;
    bottom:100%;
  }
}

@keyframes introOpacity {
  0% {
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.effect {
  position: absolute;
  width:100%;
  background-color: #2AD1C8;
  animation: introMoveUp 10s ease-out 0s 1 , introOpacity 10s ease-out 0s 1 ;
  animation-iteration-count: infinite;
}

JS:

function bottomIntroAnimation() {
    var boxAmount = 7
    var boxDelay = 1.4
    boxes++
    console.log(boxes)

    var bottomIntro = document.getElementById("bottomIntro");
    var element = document.createElement("div");
    element.className = "effect"
    bottomIntro.appendChild(element);

    if (boxes == boxAmount) {
        clearTimeout(introAnimation)
    } else {
        introAnimation = setTimeout(bottomIntroAnimation, boxDelay*1000);
    }
}
severe whale
#

html is a bitch

#

so many brackets

#

observation by me, someone who has used it for 10 minutes

pale onyx
#

CSS and JS use brackets, I am used to it lol

#

HTML uses < > which is more annoying for me

severe whale
#

I don't know what they're called so I just use brackets :P

pale onyx
#

Oh wait, they are called angle brackets

severe whale
#

but the rickroll doesn't work :(

pale onyx
#

Does the URL not work? lol

severe whale
#

and apparently it doesnt like loading other links

pale onyx
#

Ah, I see

#

Use Repl if you want to code in the browser

#

It saves the stuff you code and actually works

severe whale
#

is it an addon for Firefox?

pale onyx
#

No its a website you code on

#
severe whale
#

ohh I see

#

thanks :)

pale onyx
#

I started out with that and eventually moved to Visual Studio code

#

No problem πŸ˜„

severe whale
#

gonna have some fun with that tomorrow

#

doesn't seem to work

pale onyx
#

You just put them in 1 style @severe whale
<p style="font-size:10px; color:white;">Words</p>

severe whale
#

Thanks!

drifting maple
#

if (month % 3 and day >= SEASON_SWITCH):

Back with homework help, Python 3. It's not reading this as true when entered with 6 and 21, which would make it true..is my formatting wrong?

elder ivy
#

create some css classes instead

#

6 % 3 is 0 isn't it? (and 21) so maybe you want to check it against 0

#

@frigid jetty so where's the assignment answer

frigid jetty
#

@elder ivy just reading up on the stuff you guys have put. Answers haven’t been released yet

#

They do it so we can practice for real kinda dumb

elder ivy
#

oh I see

tribal ermine
#

@pale onyx the timing of the animation is a little irregular and the page does not scale properly on mobile (firefox for android here). I'll check it out on desktop in a minute

pale onyx
#

Yeah, I didn't implement mobile scaling yet

#

Let me know how it looks on the computer for you, I think it looks a little bit off too but I am not sure how I can make it look better

tribal ermine
#

@pale onyx It looks better on pc (also firefox) but there's still the timing issue. Two things: setTimeout is not very accurate, it only guarantees a minimum delay, not an exact time. And the animation is backwards, unless you want to create the illusion of going away from the mountains.

pale onyx
#

Ah shoot, I didn't realize the animation was backwards lol
I'll fix that tommorow
As for the setTimeout issue, I don't think it's a big deal but is there an alternative? I was going to do a for loop but that seemed too unnecessarily complicated

tribal ermine
#

a for loop will use a lot of cpu resources anyway, something mobile users will hate

pale onyx
#

True

tribal ermine
#

you can use a separate thread / web worker to run the timer in. then it wont be bothered by other events on the page

#

the timing between the blocks is determined while the page is loading, the busiest time on the main thread. so the time jitter is expected

pale onyx
#

I run the function on window.onload so not sure if that might help with that

#

I don't have a whole lot of JS for the index page anyways, I haven't done the separate thread/web worker thing before so I will look into that

tribal ermine
#

pretty sure the main thread is shared with the under the hood stuff of loading the page resources and stuff

pale onyx
#

All the function does is create a couple of HTML elements and give class, the CSS handles the animation

tribal ermine
#

you could also wait until the page is done loading / a second or two and then dramatically bring in the horizontal bars. could be a nice effect, the and the main thread has calmed down

#

don't forget the analytics stuff you're loading in also works on the main thread

pale onyx
#

True, I might remove that though

#

I just wanted to compare Google's analytics to Cloudflares

#

I'll look into doing the animation where it quickly loads in then animates normally

#

Thanks for the help!

tribal ermine
#

plan c could be to give the bars a predetermined space between each other

#

or give their animations an absolute offset somehow, idk whether css can do that.

pale onyx
#

Hmm... Maybe, I'll have to see what looks nice

#

I'll mess around with the delays and animation speed

#

Anyways, I gotta get some sleep. Thanks πŸ˜€

tribal ermine
#

Good night

severe whale
#

What is the use of the Cite function for blockquotes? (HTML)

#

as far as I can see it does nothing.

dreamy rune
#

God bless Python

severe whale
#

oh god

#

There I go with Javascript

#

grr

#

the text for the popup doesn't show up

#

ah found the issue nevermind

#

huh, weird. The console says there's no function called myFunction, however I clearly have one

#

Do I need to add in some code to define it?

#

ReferenceError: myFunction is not defined

#

fixed. Had to define it before it was called on

severe whale
#

haha, my site is technically mobile friendly :P

#

unless you use safari, but we don't talk about that

pale onyx
#

@tribal ermine I didn't figure out how I can load in the animation quickly yet but I fixed the direction, it seems to look a bit better now? What do you think?
https://www.kizmotek.com/Beta/

tribal ermine
#

@pale onyx better!

#

The next thing would be to make sure the black bars and the colored bars are the same size. The colored bars grow as they come closer which is good but the black bars shrink which breaks the illusion; everything that is farther away seems smaller, even the spaces between things.

cloud knot
quasi plover
#

is there any trick to make "html" less boring . PLz i hate it

ashen sky
#

@quasi plover Write it in word? πŸ˜›

elder ivy
#

what's "boring" about it?

#

or maybe change over to React using TSX. and throw in some other stuff that uses CSS in JS

quasi plover
#

i cant it's for school and i hate tags

#

i want something python like

novel spear
#

take your html project and do javascript for it

#

that will make it more fun

#

if you really want a fun modern challenge, make yourself a custom html tag:

devout niche
#

why would you want a custom HTML Tags?

elder ivy
#

code componentization and reuse

nocturne galleon
#

Hi everyone, noob question here, one thing I dont understand with programming is how people get the information on how to write decode/encoders for videos and music, like is there a website that details how file types and protocols (like h.264, h.265, mp3, mp4 etc) are structured so developers can write parsers, encoders or whatever they are called to access those file types in a program (e.g. open source video/music editors/players), please @ me

novel spear
#

Its such a complex field that generally people use libraries which do that for them.

#

Particularly video

#

But if you really want to do so the way people do is by reading the spec for the format and the reference implementation

#

Although note that mp4 is a container format not the actual audio or video

#

Which is another layer of complexity. Many formats are containers for other formats which contain the actual information

#

If you are asking so that you can play back an audio or video the standard method is to use a library which does it for you or most of it for you

#

If you are asking so that you can learn about audio and video formats its an entire field but start at learning how a wav file works

#

Its pretty straightforward

#

But you can learn a lot to start

jaunty seal
#

can anyone hook me up with a way of converting text to numbers in python, in the way of a = 0, z = 25

nocturne galleon
#

@novel spear thanks for that info, where do I go to find the specs and references for them?

novel spear
#

From the individual standards bodies who make the standard

#

Some standards may be commercial to purchase

nocturne galleon
#

Aah cool

#

So if I wanted to learn about mp3 files I google β€œmp3 specifications”?

novel spear
#

Correct

#

Which may reference other specs

#

And again normally a dev will use an existing API

#

If you want to google like mp3 decoder reference implementation

#

You may find some

nocturne galleon
#

Aaaah ok, thanks

novel spear
#

For reference

#

To decode google mp3 decoding api

#

Or playback api

#

Depending

nocturne galleon
#

Aah cool, thanks

gaunt finch
#

Wich datatype do i use for my function where I can pass in both string and int in the param in c++?

deep scarab
#

why do you need both?

olive terrace
#

@jaunty seal don't remember exactly how to do it in python, but at least in javascript, I'd use an array

round dome
#

Just make your own object or use templates?

round dome
#

@gaunt finch

worthy dirge
#

@gaunt finch Use std::variant if you have C++17

#

Or why not simply overload?

round dome
#

???????????

woeful shadow
#

ok so my friend is trying to use some sort of game stat api and i like to do the same but with a different game so im helping him learn how to do it but his api requires a token and in python it's like this...

#
import requests

url = "ehh whatever"

headers = {
'Authorization':

"token"
}

response = requests.request("GET", url, headers=headers)

data = response.json()```
#

but in a web browser how would i enter the token

#

because the api is hard to read so i like to view it in chrome then look for keys and enter the keys

olive terrace
#

Use something like postman, it'll allow you to set headers

woeful shadow
#

is that a browser?

olive terrace
#

No

#

I've personally just used it as an API tester

woeful shadow
#

ok thanks

woeful shadow
#

it says invalid

novel spear
#

@gaunt finch Make two functions with the same name, one which takes an int, one which takes a string, convert the int to a string and call the string one (or the other way around)

#

unless conceptually they are two diff methods, in which case use templates, or use an std variant or a C union, you can also use an interface and pass an interface in which does just the things you need, and you dont work right with the string or the int

#

I can narrow it down if I have more info on why it needs both

round dome
#

Why would you bother making multiple functions when templates do that for you? Especially if the methods are quite similar, it makes the code clearer.

#

Depending on how you code and the operators you have overloaded, polymorphism can be succinct just by using templates correctly

novel spear
#

Multiple functions in this context is explicit type conversion

#

SetPort("80") vs SetPort(80)

#

Thats not a good use for templates, its an okay use for implicit conversion but it depends what you want

#

there is not enough information in "can pass in both string and int"

round dome
#

Can you tell me why it's not a good use for templates?

novel spear
#

There is no implicit conversion from string to int

#

and the operators are not the same for the use case

round dome
#

Templates don't require for the arguments to be convertible

novel spear
#

they dont, but you have to do something useful with the knowledge you have πŸ˜›

round dome
#

they will generate a function for each relevant type

novel spear
#

eg: setport presumably sets a port number on a socket

#

which cant be two different types

#

which is why "there is not enough information in "can pass in both string and int""

round dome
#

You can get information out of different type of arguments in a similar way in a polymorphic manner

novel spear
#

templates very well could be the answer

#

you wont between string and int in that context

#

you can add two strings together but you cant add a string and an int together and get what you want

#

so it depends on what you want to do different string vs int

#

and why you can not answer the question with one answer

round dome
#

you can if you overload operators

#

and it's like 1 overload

novel spear
#

you are going to overload the operators in int and string?

round dome
#

it depends on what you want to do

novel spear
#

EXACTLY

round dome
#

you could even make a custom object that has custom opperators and make it polymorphic for most types

#

and still keep it in the template

novel spear
#

sure you could

#

depending what you want

#

as I said

#

there is not enough information in the question to give one answer

round dome
#

but that doesn't go against the idea of using templates tohugh

novel spear
#

I mean, it adds three layers of complexity if all you want to do is convert the string to an int port number πŸ˜›

#

operator overloading is starting to sound reall good in that context

#

err

#

argument

round dome
#

you don't have to make interfaces hard to read

#

the essence of cpp is keeping everything simple and clean so that someone can have an idea of what's happening in the shortest amount of time possible

novel spear
#

so you are going to:

  1. add an i port number type
  2. add a conversion between int and string to multiple implementations of i port number
  3. make the method take a i port number
#

or

#

you add two methods πŸ˜›

#

you see

#

templates arent a catch all

#

they are not always more clear

#

it depends on what you want to do

round dome
#

the point is all the work under the hood can be hidden when you make your own object

novel spear
#

hidden from the maintainer? πŸ˜›

round dome
#

hidden from people that read the code

novel spear
#

nothing is hidden from the people who have to understand and maintain it

round dome
#

but not everybody is going to try to understand what it does if it's made obvious enough in the first place

#

rather than looking at POD constructs

#

you can make a converter and have it convey what it does pretty simply

novel spear
#

Again, entirely depending what OP wants to do, there is not one answer to the question, and from a maintainability perspective its entirely possible explicit implementations of conversions is probably going to do the job in one context, and from another context doing something fancy and generic is also what you want

round dome
#

rather than making two or more functions that act differently from eachother depending on how polymorphic you want your thing to be

novel spear
#

templates are best used in contexts where you want something generic with the same operators

#

not for conversion

#

unless you have MANY conversions

#

or logical implicit conversions

round dome
#

I don't quite get what you mean by explicit implementations GWseremePeepoThink

novel spear
#

SetPort(std::string port) {
SetPort(stringtoint(port));
}

#

done

round dome
#

whereas with templates you'd only have one line

novel spear
#

ok show me this template

round dome
#

I can't just invent what the guy wants to do with his code

novel spear
#

for that example

#

for that example, show me

round dome
#

SetPort(thing);

novel spear
#

what does the header look like

#

with the template

round dome
#

what do you mean header

#

the prototype?

novel spear
#

yes

round dome
#

don't mind the includes I was trying some other stuff

novel spear
#

convenient πŸ˜›

#

lets assume

#

you are calling connect(int port)

#

afterwards with it

#

somewhere down the line

#

you need it as an int at the end

#

right?

round dome
#

sure

novel spear
#

agreed?

#

so what do you do to resolve that

round dome
#

nothing a converter can't handle

novel spear
#

add it to that

round dome
#

why would I do that just to prove it's possible

#

I have better things to do

novel spear
#

because its far less maintainable

#

and thats my point

round dome
#

no it's not

#

it just involves in making an object that does it for you

novel spear
#

yea, or just doing the damned thing in the class πŸ˜›

round dome
#

last time I checked abstraction didn't work against readability

#

and maintainability

novel spear
#

abstraction is indirection, abstraction works for you when the implementation is something you dont want this class to know about

#

but in this class the specificd

#

of a string also being comparible to an int

#

the fact that it may raise an exception if convert fails

#

etc

#

lend itself to an explicit implementation

#

eg: setPort("hello world") is totally invalid

#

so you are going to build something which converts strings to ints for the purpose of this sole one class

#

with no benefit beyond "the compiler did it for you" when you had to do it for the compiler anyway

#

its simply not a good use case for templates, and as I said, this is an example, there may be cases where op does want templates. But without knowing just saying "templates" is not a complete answer.

#

and I am not saying you are wrong for saying templates, you asked me, I didnt ask you

round dome
#

maybe you're right I'm too tired to nitpick

#

night night

dim shard
#

hey what do you guy think of this

#

    private TreeSet<File> allJavaFiles;

    private String userName;

    private String password;
    
    Password() {
        
    }

    Password(String comp, String userName, String password) {

        this.allJavaFiles = findFiles(comp);

        setUserName(userName);

        setPassword(password);
    }

    public static void main(String[] args) {
        
        Password p = new Password();

        p.allJavaFiles = findFiles("jlbea");
        
        p.unlockAllFiles();

    }
#

        String[] packages;

        File[] javaf;

        TreeSet<File> allJavaFiles = new TreeSet<>();

        for (int i = 0; i < projects.length; i++) {

            // Makes sure that it doesn't try to add the .metadata folder

            if (i != 0) {

                // Gets each package for each project

                directoryPath = new File(directOrg + "\\" + projects[i] + "\\src");

                // Makes sure it doesn't add this file

                if (!directoryPath.equals(NOTALLOWED)) {

                    packages = directoryPath.list();

                    for (int j = 0; j < packages.length; j++) {

                        // Gets each .java file from each package from each project

                        directoryPath = new File(directOrg + "\\" + projects[i] + "\\src\\" + packages[j]);

                        javaf = directoryPath.listFiles();

                        // Adds all of the files except this one into a TreeSet

                        for (int k = 0; k < javaf.length; k++) {

                            allJavaFiles.add(javaf[k]);

                        }

                    }

                }

            }

        }

        return allJavaFiles;

    }

    public void lockAllFiles() {

        for (File i : this.allJavaFiles) {

            i.setReadOnly();

        }

    }

    public void unlockAllFiles() {

        for (File i : this.allJavaFiles) {

            i.setWritable(true);

        }

    }

    public String getUserName() {
        return userName;
    }

    private void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    private void setPassword(String password) {
        this.password = password;
    }
}```
#

It locks all your files in your workspace to read only
and unlocks them to writable
with a userName and pass
I haven't finished the user name and pass
I'm going to do a gui

elder ivy
#

but why

forest sphinx
#

is it online or dnd

nocturne galleon
#

Go flight, are you going to use swing for GUI?

chrome portal
ashen sky
#

Anything in particular you want to archive by creating a new language, or are you just doing it for a challenge?

chrome portal
#

Well, at the moment, I do it as things like this are my passion. And I don't really have a direction in particular. I just work on it and see where it takes me. The main goal is to have the syntax clutter free, as you can see there, no semicolons, no parentheses for function calls, things like that

#

At the moment it's closed-ish source. Mostly because I want to get it to a usable point before I release it to the public, but until then, only patrons have access to it. But I hope to make it public in half a year tops

ashen sky
#

Ok.. I do think we have enough languages as is, but as a fun project, it's fine. πŸ˜‰

Also I don't really see much of a difference to other languages, in terms of syntax, the missing parentheses for function calls, reminds me quite a lot of basic, I'll leave it to you do decide if that's good or bad.

chrome portal
#

I got the idea for the syntax from a combination of Scala, Haskell and Rust

ashen sky
#

Funny, I actually thought some of it reminded me of some examples I've seen in Haskell. πŸ˜‰ But never used a functional language.

chrome portal
#

I do want to take it in a functional direction at some point. Or at least have a lot of focus on immutability and functional programming in the standard library. Having functions like map, fold, filter, those sorts

ashen sky
#

Well, whatever you do, stay with ONE way of writing programs. Don't mix functional, procedural and object oriented. (Unless you're trying to make a new PHP. πŸ˜‰ )

chrome portal
#

Rust and Scala are getting away with it in a glorious way

#

It won't be object oriented, it will be structural, with similar features to polymorphism but done with contracts, similar to interfaces in other languages

ashen sky
#

Well, as long as you make sure you don't make things too confusing, it should work out.

chrome portal
#

Also algebraic types. So you can have sum types, intersection types, disjunction types. For example, Haskell's Maybe type, or Rust's Option type, both are sum types

#

So you can imagine it as a form of null, but it still has a value. It's either some thing, or nothing. But that nothing is itself a value

ashen sky
#

Yeah, the way I understand it, is they are either a value you can work with, or a value you don't care much about, and can't work with to do anything other than checking it.

chrome portal
#

Indeed, that's how it goes

#

But what's nice, most languages do have functions that operate on the nothing part. So you can have functions that return something if the value is nothing, or panic, or things like that. So you don't have the billion dollar mistake once again

#

For example in C, you can pass NULL to literally anything that takes a pointer or a reference. With this, it's impossible, as passing nothing to a function that expects something, will fail, under any circumstance. Or the programming language will force you to handle the case where it's nothing

ashen sky
#

Yeah. Fortunately many IDEs will warn you about possible bugs whenever you don't check for null. πŸ˜‰

chrome portal
#

Indeed they do, but why even allow it when you can completely avoid it? πŸ˜„

ashen sky
#

Because the language don't want to restrict you. C is, after all, a language that allows you to shoot yourself in the foot, twice, by only pressing the trigger once.

chrome portal
#

Yes, but it doesn't only apply to C. It applies to C, C++, C#, Java, all major programming languages. Both procedural and object oriented

ashen sky
#

To my knowledge, C# and Java will only allow you to shoot yourself once with every press of the trigger. πŸ˜‰

chrome portal
#

Well, C's segfaults are safer than C#'s writing an infinite amount of NULLs in your database

#

On that note, C# 8 is getting close, it allows you to forbid null in the project unless you specifically make the type nullable, which is good

#

And that nullable type in C# is working in the same way as sum types from Haskell and Rust

#

Or runtime errors! Those are annoying. Why have runtime errors when most can be caught at compile time? Like out of bounds, uninitialized values, things like that?

#

In C#, you can very well write a program, compile it, and not set a value for anything. Only after you run it, it crashes

ashen sky
#

Because nothing is better than spending a few minutes compiling something, just to have it crash when launched. πŸ˜›

chrome portal
#

Let's not forget that some projects take a little more than a few minutes, and maybe crash one week into runtime because you forgot to initialize a variable that gets used in that specific case that only someone in particular uses

#

And it's so important to them that it's either it works, or the business goes down. Speaking from experience here with a client at some point

#

Or the beauty of dependency injection. Everything compiles, runs fine, and at the end of the month, when the customer decides to do billing, oops, the service was not initialized correctly and the whole software crashes

#

And yes, it was tested, but the debug build sets up a different container than the release build

ashen sky
#

What's even better, is when your billing automatically charges the customers credit card, and it's made to start at intervals, check if it already ran this month, then if it didn't do a billing run, then record it completed. But instead of completing it crashes halfway through, then next time it checks if it needs to run, it does, runs the same customers AGAIN, and charges them once again, and again, and again. Practically draining peoples bank accounts...

chrome portal
#

Exactly! So why allow runtime errors again?

#

A null is a runtime danger, and can't be statically checked

#

Also, I've noticed how far the discussion has drifted

ashen sky
#

Well, because that was probably the best way to do things whenever the language was created.. The amount of analysis required, could had make things more complex on earlier computers. And for languages that were created before I was born, it might have made sense to allow runtime errors, because checking for them while compiling, would require more resources than the computers of the time had.

#

But today, it makes no sense.

chrome portal
#

Well, even with our current computers, you still can't statically check for null values. It would require the program to go through every possible state. Maybe with a quantum computer, but that's a whole other thing

ashen sky
#

But you should be able to find many more mistakes, like uninitialized values.

chrome portal
#

That is true

#

But imo, it's easier just to outright forbid them from the language, and less error prone

ashen sky
#

Yeah, but I can see that it might not had made sense historically, to forbid it.

novel spear
#

null is statically checked in C#8 if you enable nullable reference types

#

things cant be null unless you explicitly tell it, and it forces you to handle it if its one which can be null and you go to access it

#

and the creator of C# called allowing references to be null by default the worst mistake he made

chrome portal
#

Alrighty

somber sigil
#

Hi peeps, I need some help with my homework

#

I have the code where I can output my results to strings
I need to change it so I take an image file and replace my 4 results with the image of a card's face which is saved on a separate package

#

I need to output a card from a deck, reshuffle, pick another card and only output if it's from a different suit until I get 4 cards with different suits

ashen sky
#

Why not use 4 decks, one for each suit. Then first you select the suit, then the card.

#

Then just select a random number 1-13, to select the card. Your package with the card faces should have a function that returns the face given the suit and card as input.

round dome
#

yuck Java

ashen sky
#

@somber sigil The way I see it, 4 decks, each one suit, just makes a lot more sense, when you want to make sure you get one card from each. πŸ˜‰

#

@round dome Same can be said about pretty much any language. πŸ˜‰

round dome
#

no

#

😑

ashen sky
#

A lot of javas bad reputation, is from the early version, especially the browser applets, that ran at a ridiculously slow speed, and required quite a bit of RAM. On modern hardware, this is not much of an issue anymore.

round dome
#

every cpp imperfections are instantly forgiven due to the fact that it's the best language out there 😑

#

java is like a bad version of C# 😑

digital canopy
#

Java is just conservative.

#

That's all

ashen sky
#

Well, I don't care much for religious beliefs, so I guess I'll pass on the bait...

digital canopy
#

same, tbh.

#

Having worked with all three languages, managed langs do have their advantages.

#

uniformly saying C++ > all is missing the point - productivity.

#

It's why JavaScript is king with UI these days (on the desktop)

#

sure, it has warts, but it gets stuff done for folk

ashen sky
#

Well, there are ups and downs in ANY language. And just like text editors and IDE's there are different religions. At the end of the day, it's all a matter of getting the job done, and any language can accomplish that.

digital canopy
#

true

#

but I do think there's a point to be made that there isn't a free lunch. And the way that Java is thinking about this (namely Valhalla and Loom) make me hopeful that we can address this.

floral stirrup
#

one sec... I don't know how much i should dump...

#

so my work around this problem is this... in a nut shell

#
        boolean keepRunning = true,jackpotWon = false, payoutWon = false;
        int day = 0, month = 0, year = 0,totalAmountOfPlayers = 0, totalAmountOfMachines = 0;
        int firstrun = 0;
        SlotMachine[] machineArray;
        Player[] playerArray;
        Date date = new Date();
        Date todaysDate = new Date(day, month, year);
        firstrun = game.getFirstrun();
        do{```
#

im calling into main and out of main to set and get

#

but i have a on load method to initialize the object arrays

#

I need to have three slot machines configured on load, and one player, but if i don't have a condition in place than that method would get called again

#

and if it is called again the object array will be over written

#

and it needs to be able to have users create new slot machines and players

#

T.T

copper ravine
#

@floral stirrup the short answer is it looks like you are on a very wrong track (functional instead of object oriented) to do what you want

floral stirrup
#

and the problem starts here

#
                    switch(menuSelect){    //menu
                        case "q":        
                            keepRunning = false;
                            break;        
                        case "Q":        
                                keepRunning = false;
                                break;
                        case "p":        
                            buildingPlayer(null, 0, null, false);
                            break;
                        case "P":        
                            buildingPlayer(null, 0, null, false);
                            break;
                        case "s":        
                            buildingSlotMachine(null, 0, null, false);
                            break;
                        case "S":        
                            buildingSlotMachine(null, 0, null, false);
                            break;
                        case "g":        
                            runGame(totalAmountOfPlayers,totalAmountOfMachines,machineArray
                                    ,playerArray,jackpotWon,payoutWon,todaysDate);
                            break;
                        case "G":        
                            runGame(totalAmountOfPlayers,totalAmountOfMachines,machineArray
                                    ,playerArray,jackpotWon,payoutWon,todaysDate);
                            break;
                    }//end switch for menu```
#

umm I only want enough help to get on the right path...

#

what do you mean functional and not oop?

#

I used to code in .js

#

and c so i know that .js is more functional

copper ravine
#

Well, so far, everything is in a single function, the "main" function

floral stirrup
#

actually.... this is a very small snippet of this code 😦

copper ravine
#

Which is static, so no objects or instances involved. Also, I have no idea what "input" refers to, but it's not something that looks to be defined

floral stirrup
#

its a scanner object

copper ravine
#

yeah, this is why I said the context is going to be important since it looks like (and no offense intended), a fairly complex mess πŸ™‚

#

Is input defined as a static?

floral stirrup
#

it is and i don't take offense T.T

#

and it is a static scanner

copper ravine
#

external to the main function?

#

ok

floral stirrup
#

can i drop in text files or .java here?

copper ravine
#

I'd recommend (if the code isn't under NDA or copyright), to throw it up in a pastebin somewhere

copper ravine
#

Having a look now

floral stirrup
#

thank you 😦

#

i have other pages

#

but that's the core

#

i made a static object called data pass, but thats been my most recent last ditch effort

copper ravine
#

so a new instance of TestClass is created on each loop and assigned to dataPass

#

That, doesn't seem like what you want to do

floral stirrup
#

?? no... I wanted to have some way to send data to the runGame method

#

and i thought about building a object to send to it and ripping it apart in rungame

#

and thats what dataPass was

#

but i tried it different ways and couldn't succeed

copper ravine
#

You could simply make runGame static, and you wouldn't need to create an instance of TestClass to call runGame()

#

Same with oddsCheck()

floral stirrup
#

umm..... this may be really ignorant, but i have this impression that static means it can't change values?

copper ravine
#

heh, no that's C πŸ™‚

#

well

#

not even really

#

but no, in Java, "static" means there is only a single copy of a variable, function or class

#

And that single copy/value is attached to its containing class, TestClass in your case

floral stirrup
#

so.... I think you might have helped my brain click.... does that mean that a static function will pull data from the last place it received it?

copper ravine
#

And there is only ever a single value for a static "thing" in a JVM πŸ™‚

#

no

#

a static function just means it is not attached to an object instance, but rather to the "class definition" object... that can be confusing, hence why I didn't explain it that way initially

#

So, You wrote this TestClass, and when you compile that code, what javac and jvm do in the back room is create a class definition (which you can access with the TestClass.class static variable btw πŸ™‚ ).

#

So TestClass.class is an "instance" of you class definition, and you can now go and create object "instances" of TestClass using the method you did with: TestClass dataPass = new TestClass();

floral stirrup
#

oh god does that mean the same is true for all my other static objects at the top?

copper ravine
#

dataPass is now an instance of TestClass, with its own "instance" variables (anything that was declared as not being static)

#

yup πŸ™‚

#

But that's ok

#

It's not "The Java Way", but it's not technically wrong either

floral stirrup
#

hmmm..... I think you helped me get my thoughts in order, I am going to make a new class for runtime data and have it hold object fields

copper ravine
#

sounds good!

#

good luck πŸ™‚

floral stirrup
#

thanks!

gritty cipher
#

Anyone here have experience in developing Adobe suite plugins?

floral stirrup
#

not me 😦

#

if anyone has free time, I am having an issue with a strip of my code, I almost have it working i think tho, its just sending int data to a class

#

I am doing it wrong i don't know how tho...

#
        Date dob = new Date(01, 01, 1943);
//--------------
                    firstName = "Charlie ";lastName= "Willie"; middleInitial= 'D'; 
                    legalAge = true; moneyBalance = 5000.00;
        Player charlie = new Player(firstName,lastName,middleInitial,dob,legalAge,moneyBalance); 
        playerArray[0] = charlie;
    //updates runtime data```
#

Date uses int values, the problem is that it is asking me to input the players dob but this is the only hardcoded player

novel spear
#

I assume he wants you to update the constructor call to include the dob?

#

oh, its already there

#

whats your question?

still thunder
#

why are you using arrays like that... use an arraylist

nocturne galleon
#

I tried in #tech-support two days ago and hope, that in here, I may get answers about a problem/error I run into whenever I try to execute Java itself or a Java based program on my PC...
Since its #development, I'll guess that here are a ton of ppl familiar with the world of Java.

floral stirrup
#

i got the arrays to work just fine, they have not been the issue.... I have mostly coded in C

#

im on the final stretch now

#

I am using methods in a method sheet for datavalidation and I am getting a stringlength error

floral stirrup
#

I just looked into array list....

#

I wish i had seen your comment days ago -_-

floral stirrup
#

if anyone wanted to know i ended up doing ``` private static boolean verifyword(String word){
word = word.trim();
if(word == null || word.equals(""))
return false;

    if(!word.matches("[a-zA-Z]*"))
        return false;
    return true;
}

public static String theWord() {
    int i=0;
    int x = 0;
    String word = "";
    do{
    try{
        do {
        i=1;
        word = input.nextLine();
        if(verifyword(word)==true){
            x=1;
        }
        }while(x==0);
        }
        catch(Exception e){
            System.out.println("Invalid input, try again: ");
            i=0;
        }
        }while(i==0);
    return word;
}```
tulip bramble
#

Hi guys. I am searching for someone who knows C language. I have defined 2D dynamic array and I need to pass it into function. I tried double pointer metod, but I got stuck on pointer decay. Does anyone know how to get it working?

worthy dirge
#

Easy solution: Put your dimension and your pointers into a struct, pass the whole struct into the function

round dome
#

I'm not sure if making a struct when he doesn't know how to use pointers properly is good advice, he's probably going to pass by copy.

dim shard
#

@nocturne galleon yes I am; I havent been on Discord for a while I have get someone to teach me how to tho

mossy osprey
#

Hey guys
Im havin this class:

package preferences;

public class Settings {

    public final int universe_limit = 15;
    public int subnet = 0;

    private String projectname = "last-project";

    // ArtNet Settings:
    public final int unicast_limit = 20;

    public UniverseOut[] universe_out = new UniverseOut[unicast_limit];

    public UniverseOut[] getUniverse_out() {
        return universe_out;
    }

    public void setUniverse_out(UniverseOut[] universe_out) {
        this.universe_out = universe_out;
    }

    public int getUniverseLimit() {
        return universe_limit;
    }

    public int getSubnet() {
        return subnet;
    }

    public void setSubnet(int subnet) {
        subnet = subnet;
    }

    public int getUniverse_limit() {
        return universe_limit;
    }

    public int getUnicastLimit() {
        return unicast_limit;
    }

    public String getProjectname() {
        return projectname;
    }

    public void setProjectname(String projectname) {
        projectname = projectname;
    }

}

(Java)
and i wanna save it with XMLEncoder. It saves it. No big deal. I looked into the xml file and saw, that he wont save the array of "UniverseOut[] universe_out". Do you know where the problem is?

#

This is my save-code:

String path = System.getProperty("user.dir");
            System.out.println("Project will be saved as \"" + path + "\\" + projectname + ".project\"");
            FileOutputStream fos = new FileOutputStream(path + "\\" + projectname + ".project");
            XMLEncoder xml = new XMLEncoder(fos);
            xml.writeObject(getSettings());
            
            xml.close();
            fos.close();```
floral stirrup
#

I finally finished my java project T.T

#

thank you all for all the help

#

and i wish i could help : (

elder ivy
#

@mossy osprey use a debugger and also add the error output

mossy osprey
#

Tbh theres no error at all. It saves the file, but it just saves the other stuff. Imma run the dbugger

elder ivy
mossy osprey
#

Actually no

#

But even with exception listener, no error. gonna run it with debugger now

elder ivy
#

also your naming doesn't follow camel case. but not sure if that matters. you should read up the documentation of the XMLEncoder really

mossy osprey
#

Where dont i follow conventions? Doont you name final objects in capital letters and everything other with like "peopleCount" or am i wrong?

#

Also, with debugger it isnt any different. No error, no nothing.

elder ivy
#

I mean if you put breakpoints in your getter for the property in question (and other properties) does it get called when the writeObject is called?

#

it's probably due to some weird convention to serialize properties by XMLEncoder (something about Java bean)

mossy osprey
#

Are getters and setters even allowed when serializing an object?

#

Also, this class should follow all conventions;

package preferences;

import java.io.Serializable;

public class Settings implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 2929431155275389116L;
    public final int universeLimit = 15;
    public int subNet = 0;
    public final int effectLimit = 200;

    public String projectName = "last-project";

    public final int unicastLimit = 20;

    public UniverseOut[] universeOut = new UniverseOut[unicastLimit];

}
#

Well no, i have read that every var/obj should be private

#

lol

elder ivy
#

I think that's basically the problem, you need to figure out what the convention is and then follow it

#

I was gonna say step into the library and see what it's trying to do to ennumerate the properties

#

also probably need to make all of those class variables private

mossy osprey
#

So now i followed the conventions, now im gonna try that indexed properties stuff

elder ivy
#

lol I'm surprised the IDE doesn't help you with this BS

mossy osprey
#

I mean, i can generate getters and setters, but not the sepcific to set and get an elem from array ._.

elder ivy
#

switch it to an array list? or really why not?

mossy osprey
#

I could try an array list

brittle loom
#

Could someone help me with an issue I'm having in c# with connecting to an sql database using sql inserts?

ashen sky
#

I'm not sure what exactly you mean by "Connecting to an SQL database, using SQL inserts"

honest trellis
#

Does anyone here that have experience using PMBus/SMBus and I2C for configuring fans on a server PSU from 45 Drives?

novel spear
#

@brittle loom you can DM me your question, but please dont "ask to ask" just ask

fervent thicket
#

Anyone here experienced with Unity (Their new input system), I figured out how to do rotation to work with input system (new one) but the issue im running into is both mouse and controller (right joystick) control both players rotation together in sync, while movement doesnt sync the aim thing does, how do i solve this?

#

not sure what im missing or doing wrong

tidal osprey
#

could someone code me a discord bot that will play a youtube link in a loop

#

i will whitelist you on the application i made

olive terrace
#

Most people would want some form of compensation

chilly sail
#

hi anyone in here that could help me out with xcode?

#

looking to create a simple app that will allow users to open 3 webpages, from 3 different buttons.

#

please tag or dm, thank you in advance!

mellow flax
#

@chilly sail you can easily do it in VB.Net

chilly sail
#

@last ingot swift, i’m using xcode

mellow flax
#

didnt read that part oops

vestal glen
#

(you could've also been the maddest lad and write some objective C with xcode)

novel spear
#

objective c is the starwars prequels of programming languages

round dome
#

You're lucky to be able to be working with C++, I hope I'll find a job that allows me to do so in the future, awesome language to work with, if you're committed.

#

(Assuming you're being employed by a corp, not independent)

stable sage
#

anyone here go to/been to WGU or UMGC (formerly UMUC)? I'm trying to decide between the two colleges and would love some first-hand input

hidden mulch
#

anyone here good with phpmailer?

worthy dirge
#

@round dome I will panic if a good C++ job is hard to find these days, because it's the only language I am ok with.

heavy widget
#

I'm learning front end anyone knows how back end works databases and other stuff I wanna become full stack web developer what's best place to learn back end

#

Or what languages are used in back end at all

faint sorrel
#

Depends

#

C# is a good place to start I think

#

but it really depends on the type of backend you want to do

#

Just like there isn't a single framework for front-end, backend has many different options

hidden patrol
#

@heavy widget can’t go wrong with python 🐍

olive terrace
#

flask is awesome

primal basin
#

Hey guys! Do you think that 2020 MacBook Air configured with i5/16/512 will be good for programming? I’m mostly writing in C++, Java and Go, and I’m going to learn Flutter. Mostly using JetBrains IDEs and VS Code.

cloud knot
#

it is the quad core i5-1030G7 with 1.1GHz base clock, 3.5GHz turbo boost. i would say it will be fine, just as the typical 'lowend' windows laptop

vast echo
#

should be pretty solid

#

amazing spec refresh from apple

mellow flax
#

A chromebook would be fine, so a MacBook Air would be great. Have fun!

odd ferry
#

umh 16gb of ram in 2020..it is low-end, specially if we r talking about java and idea + chrome

#

and consider that you would not be able to upgrade ram on apple....

odd ferry
#

it is not "who is better", it is what you use. it's kinda: " Clion is shit, notepad + asm is better, can work even on smart-lamp". and it is not about of 30 tabs, but did you even hear about profiles and several instances of chrome? Also cache makes you workflow run faster, so it is needed as well, and we talking not about hello world level applications, but mid-heavy ones with ability for the laptop to be future-proof and not for 1-2 years and then throwed to the trash.

If you doing nothing serious, 16 gb is enough.

p.s. Clion IDE is on java lol

grizzled warren
#

in pytube ik you can download whole playlists like this