/dpt/ - Daily Programmmmmmmmmmmmming Thread

What are you working on, Sup Forums?

Old thread:

Other urls found in this thread:

tuhdo.github.io/c-ide.html
pastebin.com/gtXi7bzg
geoff.greer.fm/2015/01/15/why-neovim-is-better-than-vim/
github.com/npm/registry/issues/255
open-std.org/JTC1/SC22/WG14/www/docs/n1570.pdf
twitter.com/NSFWRedditGif

c++ is the worst language of all time

yer mum

Come on user, why aren't you using Vim?

Neither

c++ is the greatest shitshow of all time

kys

While I agree with Neither that pic is a strawman.

Newfag

I am. But feel myself branching out to other editors all the time due to the lackluster plugin ecosystem.

TypeScript support in Vim is inferior to VSCode's, and downright unacceptable once you start using TSX.

The natural progression is not from vim to vs code. The natural progression is from vim to emacs.

>Go
>performance-wise compared to python and ruby
nice b8 OP

I'm working on a project in Go. Is using something like
stuff_arr, err := getstuffArr(map[string]interface{}{
"string_key": "string value",
"int_key": 32,
"timestamp_key": "2006-01-02 15:04:05",
}, " ORDER BY `another_key` DESC")


A good way to cut down on the amount of boilerplate code MySQL queries?

anonymous structs

Go is not as fast as any of the languages listed as having good performance.

Different user. What's a good Emacs setup for c and c++ Dev?
I've started to feel limited by vim, but don't want to use something like vscode or sublime.

Emacs also has the same ecosystem problem, even worse at times, and its Vim emulation mode is far from perfect demanding I learn all the retarded Emacs shit necessary to get around.

Since I already know Vim and VS Code has no learning curve, fuck that noise.

but the gap in neither is massive

...

Go is not fast. Whether it is slow or very slow is irrelevant for categorizing it in the OP pic. Don't use it if you need good performance.

tuhdo.github.io/c-ide.html

wew

getStuffArr returns []interface{} so that it can be passed to template.Execute or cast to StuffStruct as needed.
Also I forgot to mention that getstuffArr in this case would convert that to
pastebin.com/gtXi7bzg
(I'm posting it on pastebin because Sup Forums is being autistic and not letting me post SQL)

to be fair Haskell can get very fast, sometimes it surprises me how much
it's the only benchmark winning, another three are tie and rest is Go being faster
I've submitted few solutions to that website in past and there are still tons of shit solutions, it's possible that the Go one is just bad, will take a look at it

VIM is a surprisingly good IDE

c++ is the greatest language of all time

why is Haskell so slow and bloated?

Definitely, especially with NERDtree.
If you put this in your ~/.vimrc
nmap :wincmd k
nmap :wincmd j
nmap :wincmd h
nmap :wincmd l

You can use press Alt+ to move up, down, left, and right through the panes. Or whatever they're called, I don't remember

It's not designed for performance at all costs.

>muh plusturd is so efficient for fizzbuzz

wtf is your definition of bloat?

is neovim or vim?

what's wrong with go?
what's wrong with python?

Should I switch to neovim?

vim, I've only used neovim once or twice

holy shit so easy to trigger the haskslow fanboys

This is what happens when your self-esteem depends on knowing some esoteric programming language

Actually, it might work on neovim since it's supposed to be compatible with vim.

...

which do you think is better
I was using spacemas evil mode for a couple weeks and got really used to moving around, but the heme kept fucking up and I didn't really like that I didn't use most of the stuff that was installed by default

shit, that is was left there by accident

No idea, sorry. From what I've heard, one of the biggest reasons neovim was created was because of internal politics, so there might not even be much of a tangible benefit to using it over traditional vim.

#define auto __auto_type

beginner python programmer from last thread.

Thanks for the encouragement.

I have a question about form not function. I know there is some way I can make the following code snip into one line rather than two, but should I? Is there any benefit to reducing the amount of lines it takes me to do something? I don't really understand the deeper computer stuff, so please go easy on me if I am askign a 101 question here.
month1 = calendar.monthrange(int(time.strftime('%Y')),x+1)
month = (month1[1])

my mom walked in while I was a gif watching a girl giving a blowjob~

>From what I've heard, one of the biggest reasons neovim was created was because of internal politics
geoff.greer.fm/2015/01/15/why-neovim-is-better-than-vim/
Doesn't sound like some sjw fork to me.

brah the most choice lingo is cython

>The dev community is apathetic. The benevolent dictator is averse to change.
That's what I was referring to.

Python is a garbage language. Back to with you

>redefining a reserved keyword

C++ overloads my brain. Haskell is somehow simpler.

You are never going to use auto in C for what is what meant to use so it's fine. Also it fucks up sepplesfags who try to compile my code with sepples compiler.

Well, with the then current state being broken garbage what would you expect them to do?
I really wonder if VIM or NEOVIM have fixed their inefficient text buffer until today.

undefined behavior

it's text replacement macro you tard.

roll

No, you aren't code golfing.
If you have to choose between clarity and brevity, pick clarity.
You'll have to read that code later. Think about what will matter more to you then.

And defining macros for keywords is undefined behavior.

>C is minimal
>has multiple keywords that are near-universally useless

The only thing you have to learn to "get around" are opening and moving between buffers.

C-x f to open a file.
C-x b to view the buffer list.

Everything else about navigation responds to vim commands. It works exactly the same.

Saving/closing buffers can be handled purely through vim commands as if saving or closing a file.

Eventually as you start to give a shit about keeping multiple buffers open, eshell, etc., you'll pick up more Emacs-specific stuff. But you don't need to know much at all to get started.

t. ex-vimmer

>C
/* 0, 0, 5, 0, 3, 0, 0, ... */
int arr2[10] = { [2] = 5, [4] = 3 };

No idea. Also I noticed that my Alt+ config settings don't seem to work with neovim :/

other than C most of my programming has been in functional languages(Haskell, Scheme, Clojure). I'm contemplating starting with C++, it looks like mess to me but there are just too many useful libraries for me to neglect it. Anyone know of some intro on (modern) C++, preferably in light of someone coming from a functional background? I know the OOP paradigm well enough but I can't say I'm a big fan of it.

What's wrong with this?

regarding the pic in OP, I do most of my programming in C++14.

what's an ACTUAL fast development language? no memes.

it's pretty defined behavior because the text is replaced as is.

What are all these useful C++ libraries everyone keeps talking about?

unironically use C#

Haskell, Idris, Scheme

Mainly game engines and QT

Just a neural network that doesn' seems to work. It looks so dumb change variables randomly hoping something to happens.
[CODE]

public void CalculateOutput()
{
output = 1 / (1 + Math.Exp(-(GetZ()-bias)));
}
[/CODE]

Python is the king of short development times

> no memes
> functional programming

If you don't like FP then try CL

C preprocessor code doesn't have anything to do with the semantics of C

github.com/npm/registry/issues/255
>the city of javascript

As if those don't exist in other languages ......

open-std.org/JTC1/SC22/WG14/www/docs/n1570.pdf
See ยง 6.4.1

holy shit this is amazing

I'm getting a warning when compiling my C++ code:
warning: #pragma once in main file
But the pragma is in a .h file.
What the fuck is going on?

the problem is that you're not using a real include guard

If I learn C really well and am already competent in a few languages that support OOP... how close am I to being employable in C++?

this seems very similar to leftpadgate

What does #pragma once do?

Not at all. C++ is a completely different beast to C and to most OOP languages.

Halfway there.

C++'s object system is broken and overcomplicated. Just like pretty much everything else added to the language since C.

just name your files with the .cpp extension and you are hired

Not much really.
C++ is a superset (mostly) of C but they're still chalk and cheese.

What's the issue?

>depending on some random lib that could disappear at any moment
When will weblets learn?

>abandonware and shit-slow libs
>just as good as industry standard projects

>depending on some random tile editor that could disappear at any moment

do you use the IFNDEF shit in your header files?

You mean apart from the fact that npm just purged a ton of packages and people can publish their own shit with the purged packages names and cause fuckery for everyone?
Nothing.

I actually tried out Vim today. It's just really annoying to set up.

>girishia
>massive issue for us because of this. Please resolve asap
kek
>build requires internet connection
>build requires code cowboys to not fuck up hacked together pkg registry
>what is self-contained build
>what is local pkg caching
>what is non-fragile development
ah, javascript, the new code monkey island

because I use EMACS you fucking brainlet

>Eventually as you start to give a shit about keeping multiple buffers open, eshell, etc., you'll pick up more Emacs-specific stuff.
That's the problem: I already do all that shit on Vim, using multiple tabs with 3-6 buffers open.
I use the full extent of Vim, I'd rather just write any missing plug-in than have to use a mismatch of not-quite-Vim and learn all the Emacs bullshit. There is *nothing* I can gain from that.

anything cool about neovim, anons?

weblets continuing to be the laughing stock of software engineering as usual

No, just #pragma once in the single header file I have.

morpheusvim is better