this post was submitted on 21 Jul 2023
134 points (98.6% liked)

Linux

48033 readers
1194 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hello,

I installed Ubuntu a few months ago on my work laptop and I've been running and loving it since.

However, I am used to VsCode, so this is what I am using in Ubuntu as well.

So I am curious, what kind of coding so you do? And what is your workflow.

I am an embedded firware developper and mainly use C. I am cross compiling my code in VsCode for a FPGA from Xilinx (dual core arm + PL)

Never dove into make files and cmake more than what I needed in the past, but I had an opportunity to learn CMake and build a project from it.

So my workflow is :

  1. Code in VsCode
  2. Build in CMake
  3. Transfer the app through scp on the target with a custom script (target is running petalinux, which is yocto + Xilinx recipes)
  4. Use gdb server to debug the code.

It's a pretty simple workflow, but I'd like to know what you guys are running so that I can maybe upgrade my workflow.

(page 2) 50 comments
sorted by: hot top controversial new old
[–] Elw@lemmy.sdf.org 3 points 1 year ago
  1. Code in Nvim
  2. At work we build using shell scripts, for personal stuff it's usually Make
  3. At work, deploy with Jenkins to Kubernetes or through Puppet to real/vm hosts. a. At home, I use Ansible 99% of the time
  4. Debugging?
[–] CalcProgrammer1@lemmy.ml 3 points 1 year ago

Code in VSCode

UI in QT Creator

Build with qmake

Commit with git

Push to GitLab

Run jobs with gitlab-runner

Deploy AppImage, deb, rpm builds with Docker

[–] featherfurl@lemmy.ml 3 points 1 year ago

Helix + sway + nix-shell + git + sourcehut is a pretty tasty combo not gonna lie.

[–] wgs@lemmy.sdf.org 3 points 1 year ago

I use vis to write code, ^Z and make/mk to build the project. Most of the debugging is done with valgrind and eventually gdb though my use is very limited.

When I work on manpages, I use wendy to automatically preview manpages everytime the source file changes.

[–] slembcke@lemmy.ml 3 points 1 year ago (2 children)

I do game dev, and I've been loving VSCode. I used to use a mishmash of stuff, but VSCode can do kinda everything. Working on retro-dev C/asm for NES or Genesis? Lua projects? Shaders? Debugging a native Linux/SDL game? Doing some math in a Julia notebook? Unity3D development? Working on Windows/Mac? The answer is VSCode to all! I still use vim for some light stuff or working on remote machines, but meh... VSCode has nice defaults for me without having to fiddle.

For my native Linux gamedev, I've just been using the MS Cmake and Cpp-tools extensions. They work great, and you can script up the rest with actions. The debugger isn't great, but it's convenient and good enough for simple crashes. I switch to GDB when things get interesting though. I suppose I have an extension for shaders too, but it's just syntax highlighting.

load more comments (2 replies)
[–] Afiefh@lemmy.world 3 points 1 year ago

Mainly C++ with a sprinkling of Python and Rust for fun.

Used to code KDevelop, now VSCode. Build in a regular terminal (I prefer Meson over Cmake, both end up producing Ninja files.) Debug with valgrind, gdb and ddd. Push to Gitlab for my personal projects.

I use Docker for my test environments as it's easy to bring them up and restore them to mint condition, and it ensures that the longer running tests with side effects don't interfere with one another.

[–] nitefox@lemmy.world 3 points 1 year ago

CLion for Rust/C++, VS Code for web dev stuff

[–] danhab99@programming.dev 3 points 1 year ago* (last edited 1 year ago)

$mod+enter vim enter Ctrl+p [type a part of the name of the file I want] O [write code]

[–] dawwwsh@lemmy.world 3 points 1 year ago

I tend to prefer Jetbrains editors (CLion, Rider, WebStorm) for projects, and just nano/micro for config editing and such...

[–] wintermute@discuss.tchncs.de 2 points 1 year ago

I code in C/C++. Work laptop is windows, but the products run on various Linux and Unix flavors, as well as in Windows. So I use Clion on win, that syncs the code changes to a Linux VM for building and testing. The toolchain is in a docker image, so I can change the build and test environments without affecting each other. Since I need to test on different OSs, I have multiple VMs in a server at the office.

[–] russjr08@outpost.zeuslink.net 2 points 1 year ago

I'm currently running Fedora Kinoite, via the Universal Blue kinoite-nvidia image.

A lot of the stuff I personally develop is done in Java/Kotlin, so for those projects I use IntelliJ (via the JetBrains "All Products Pack") to work. For everything else such as Rust which I've been slowly trying to get into, or PHP which I sometimes write for work I tend to use Neovim because its simple enough. I suspect as I start to build bigger projects in Rust I'll start using it through IntelliJ or CLion to have access to a nice debugging environment, but so far the little bit of debugging that I've needed can be done through rust-gdb.

Its a nice simple workflow, and Fedora already has podman installed for when I'm utilizing Docker as well which is nice.

[–] vaalla@discuss.tchncs.de 2 points 1 year ago

I mostly write rust now, but this workflow was finetuned over years. Use 2 terminals each on a diferent monitor, one runs neovim and the other is for building/running. If the project is a bit more complex, I will run it in a docker container( maybe mount the /etc/shadow and frieds so all artefacts are created using the same user as in the outside) . Developed a bunch of tools over the years to optimise this:

  • a 'package manager' in bash so I have a folder for each project/context. One for work, one common, one for the server stuff like this. All are in PATH.
  • parterm - remote control for the terminal so i can start a build from neovim in a different terminal.
  • 'ndock' - at work I use a bunch of branches, this script will set up a few envs and then start a docker in a folder coresponding to that branch.

At my old job had to work on a remote vm so I setup sshfs for a while, but was slow and just moved all my tools there.

I have a pattern where i put all my projects in ~/dev/<branch> and all info related to a task in ~/dev//bugs/<issue_nr>. This is usefull because I can have scripts the work similar for different projects with small changes. For example to run my binary with the config for a issue i just do

ndock <branch>
nr <issue nr>

This will start docker or connect to an existing one for that branch if available, compile the code, run my binary with the config present in the bug folder. In the last few month started running it with rr to be sure i can debug any random issue.

[–] Gnubyte@lemdit.com 2 points 1 year ago

Hi! web dev here. It's time to change your setup ever so slightly with VSCodium, and electerm too optionally: https://vscodium.com/ https://github.com/electerm/electerm

I usually install all my setups in PopOS or a server I'm developing on: https://github.com/gnubyte/debian-setup/blob/master/setup.sh

Then install Insomnia.rest, VSCodium, and finally electerm.

Basically I'll program in nodeJS, BunJS, or python.

Then I'll ask chatGPT via Rubberduck (link below) to generate a docker and docker compose live mount for my dependencies of my frontend and backends. Then I begin to iterate over my work.

https://github.com/rubberduck-ai/rubberduck-vscode

My latest flow is basically to start with chatGPT, write a four paragraph description of what I want, have it save me about five hours of boiler plate nonsense, and then disconnect from chatGPT to do the advance stuff like handle security, data structure relationships, etc. Sometimes I go back to chatGPT for how an algorithm should be implemented for efficiency inside a short snippet, then apply it again to my code. There was some great bloom filter work it was able to help me with.

Other stuff I've been trying is like podman and I'm interested lately in Jenkins to do builds since I realized I have too many projects that build and work a particular way, I can't Shepard them all by hand. With that will likely come unit testing, both hopefully assisted by AI to cut down on time. I'd like to reinvest that time on hankerrank and frontend masters to start transitioning to something like rust.

I use GVim for coding and text editing in general.

Programming wise, CLI tools (grep, sed, awk, sort, head, etc) are enough for most of my tasks. I've written a few Python TUI projects (uses Textual framework) but these are around 300-400 lines, so Vim is more than enough for my purposes. Don't even need any plugins.

[–] garam@lemmy.my.id 2 points 1 year ago (1 children)

Xfce spin Fedora using VS Code with CSharp dotnet omnisharp, sometime vim with coc nvim and omnisharp vim.

PHP intelephense, podman, kvm/qemu, some el clone or rhel cloud image, and windows server 2019 vhd to qcow2.

Other than that, firefox for frontend web debug.. For desktop dev, avalonia UI. Other than that, none.

[–] greywolf0x1@lemmy.ml 2 points 1 year ago (1 children)

I'm learning C# on my gnome Fedora and I can't use IlSpy to decompile code on VSCode. How do you do this?

Also, my debug time takes so long, I think microshit intentionally makes it so on linux

[–] garam@lemmy.my.id 3 points 1 year ago* (last edited 1 year ago) (3 children)

I never use IlSpy, sorry

Have you look into their cli? https://github.com/icsharpcode/ILSpy/tree/master/ICSharpCode.ILSpyCmd

Also there is AvaloniaUI ILSpy https://github.com/icsharpcode/AvaloniaILSpy https://github.com/icsharpcode/ILSpy/discussions/2926

Also seems not all dll can be opened using ilspy https://github.com/icsharpcode/ILSpy/issues/2689

Debug times shouldn't be long tbh hmm.. How big is your project?-

load more comments (3 replies)
[–] Ansis100@lemmy.world 2 points 1 year ago

Using VSCode with NeoVim plugin (allows Vim commands in VSC). Code JavaScript locally, deploy using GitHub and Docker/k8s.

[–] z3rOR0ne@lemmy.ml 1 points 1 year ago

Bspwm/sxhkd on Artix Linux with runit init.

Neovim, lots of plugins and custom shortcuts and commands. Espanso text expander for even more functionality.

St terminal with zsh. Lots of aliases and shell scripts add lots more functionality.

JavaScript Developer with some docker integration.

load more comments
view more: ‹ prev next ›