Previous: What are you working on today, Jow Forums?
/dpt/ — Daily Programming Thread
hi
fuck opengl
Is there a C++ library that does linear algebra on std::vectors? Including being able to handle Matrix vector multiplication when I have a vector < vector matrix?
Any work on Openstack?
What the hell is this retarded image?
Where are the cute anime girls?
Probably not, that's not wat std::vector was made for.
GLM is very easy to get started with though.
Integrating with QuickBooks desktop for any level of remote automation fucking SUCKS
glow in the dark manchild
Guys I made something useful in haskell
get out
spoiler: I unironically love haskell
Where do you think you are, reddit-kun?
Where do you need to return to, reddit-kun?
Code or it didn't happen.
Trying out previews and blah blah
pic related
nice
post a screenshot of your code
Okay later maybe
It parses my shitty web pay stub into a format used for hledger.
please answer
Cheeky program to convert text to emoji alphabet on discord for shitposting reasons
How to understand C's notation that result in
typedef int(*foo)(int,int);
foo bar(int);
without the typedef?
is this the correct declaration?
int(*)(int,int) bar(int);
check out Eigen
New to C#?
Back where I work, this would mean in +- 3 years
not quite but i'm a sys eng from the basis.
does my code look like i'm new to c#?
fml
You work for Jow Forums?
used to.
i even founded this website, but that's a story for another time.
So when I initiate a string it should know how many chars were allocated, why does it would need the NULL char if it knows how long it is?
Shitty image for silicon valley tier meme.
cuck
Shoe on glans or GTFO.
Not a C# developer here (mobile/front-end), but taking into account that C# is a functional language it would think it should look more like this.
yea i get your code. now i know why the noobie question was asked to me.
fml
Prelude> let 2 + 2 = 5 in 2 + 2
5
lol
>watching presentation
>presenter has an Alienware laptop
>tfw you understand why this happens
With a non-cuck programming language, I'd code that in 2 lines
no way dude
Yes, very.
This isn't production code so I would write it in an elegant way like so:
// using static System.Console;
public static void Main(string[] args)
{
string rtemp = ":regional_indicator_{0}:";
string input = ReadLine().ToLower().Trim();
string output = String.Join(" ", input.Where(x => x != ' ').Select(x => String.Format(rtemp, x)));
WriteLine(output);
}
10/10
Yeah, it makes sense in a declarative language.
You can get rid of rtemp by passing directly to String.Format and also get rid of input by chaining ReadLine()... with Where(...)...
Making a total of two lines
Do it
I am phoneposting so I am pretty sure I made a mistake somewhere
>You can get rid of rtemp by passing directly to String.Format and also get rid of input by chaining ReadLine()... with Where(...)...
great idea if you want to fuck around with your co-programmers
Yup I did. You need to:
>remove string join
>use aggregate instead of where..select mess
>use string interpolation and conditional check for space
Still two lines though and much shorter
Does it happen to produce side effects?
>useful
>side effects
pick one
I rarely use LINQ for production code.
Maybe some CRUD and filtering through a collection when I am 2 levels deep
It is also useful when you feel evil or want to bake something quickly
perl -lnE 's/([^ ])/:regional_indicator_\1:/g;say lc($_)'
Bad programmers don't like C++ because it often makes them feel stupid. Good programmers like C++ because it sometimes makes them feel stupid.
How do I practice good namespacing in C++?
I've been taught by plebs using
using namespace std;
don't use it at all.
It's literally useless bloat.
Yes, it outputs to the console
grow up faggot
You can interpret any char pointer as a string. If you allocate p, you can also pass p + 1, it’s still a valid string, but there is no size associated.
Nice. Fuck perl for ruining regex though
Process.Start("/bin/bash", "-c \"perl -lnE 's/([^ ])/:regional_indicator_\\1:/g;say lc($_)'\"");
Here is a true awful one liner in one statement:
WriteLine(ReadLine().ToLower().Trim().Aggregate("", (w, n) => w + (n == ' ' ? " ": String.Format(":regional_indicator_{0}:", n))));
Does anyone have the Humble Bundle functional programming pdfs download link?
Trying to fix my Vivado referencing errors for my artificial neuron research project. My VHDL testbench can't instantiate my neuron component because "neruon_v1 is not compiled under xil_defaultlib".
I spent several hours to figure out this is a IDE bug that hasn't been patched in years and none of the proposed fixes online are working.
Honest question, what is haskell useful for that another language doesn't do better?
I have no experience with it, just know everyone loves to shit on "muh functional programing"
What kind of projects can be made with C?
>he still doesn't know how to pirate pdfs
>watching presentation
>presenter has a fidget spinner
I shit you not, this was the easiest way to identify the person that never did anywork in the group project (uni)
Literally everything
prove it.
Reinventing the wheel. C programmers are the only ones who think it's normal to write your own linked lists.
I can't find a torrent for it. Also, some user in a /fpt/ said he was going to share, but I haven't seen links yet.
JS-tards just import a library for it
anything that doesn't involve averaging 2 integers
>/fpt/
that shit's still alive?
I remember it dying on the second day.
>things that didn't happen
/fpt/ lasted throughout Christmas, after which all the fp anons got back to work
^What he said
Most commonly and ubiquitous though are embedded systems. If its electronic and doesn't have an operating system it's most likely written in C.
You can do anything in Haskell, as long as you have side effects in your code. But because one of the principles of functional programming is 'no side-effects' you have to violate the very paradigm the language is based on. So as long as you accept that to write real-world code with Haskell you will introduce side effects, it's fine. But at that point you have to ask yourself if it's even worth it to code in a functional language anymore. If you're going to have side effects anyways, why stick with Haskell? The answer to that question on Jow Forums is that there's no point. The real world answer is that it can still be valuable to have a mostly functional system despite side effects.
Ahem.. better(worse) version
WriteLine(ReadLine().ToLower().Trim().Aggregate("", (w, n) => w + $"{(n == ' ' ? " " : $":regional_indicator_{n}:")}"));
fake news
Thanks
>what is IO
Turns out, I don't know much about hardware. Is there a nice long video tutorial explaining the spec details of modern PCs? For example, Socket types, slots, bus etc.
Watch videos for A+ certification
>video tutorial
lol
c# and sql. I feel like I've been sick of sql for 6 months.
A drone delivered my shoes today pic related, didn't know they were already using them for that.
But yeah basically look and realise you might have a deeper grasp of sql but you can never achieve my level of fabulousness that's about it really.
Those are generally pretty basic
Video is quicker for me
I am making a very comprehensive and s scaleable system hardware detection/monitor tool (POSIX).
throw the red ones away
I wholeheartedly agree with this
A fuck sepples too while we're at it
Use glm
>high heels
Why. That shit looks painful.
What do you want to do, statistics or graphics stuff?
Linear algebra.
HA HA HA HA ALSO
FUCK YOU ANTI-OOP FAGGOTS WITHIN RUST CORE DEVS
I'm balls deep in an inheritance hierarchy rn.
For example, Ryzen 1700X
It's a hardware
an AMD hardware
an AMD CPU hardware
an AMD CPU Zen hardware
an AMD CPU Zen first gen hardware
an AMD CPU Zen first gen 14 nanometers hardwarean AMD CPU Zen first gen 14 nanometers hardware that sits on either of AM4 and TR4 or SP3 sockets
It's a base class for Raven Ridge class
Which is, however Zen2 class that derives from AMD CPU base class
fffuck you hip faggots, you never make useful and comprehensive software!
>this is what OOP does to your mind
kill me 2bh
it's not easy, I am going insane
get help
AND YES, I'M TALKING MULTIPLE INHERITANCE, MI FROM 4-5 ABSTRACT BASE CLASSLESS IN TEMPLATES C++
I tried D, won't let me do MI
My old friend C++ never rejected me
I haven't slept in the last 19 hours
>MULTIPLE INHERITANCE
absolutely gross
But what features do you need?
Decompositions? Solvers? Big matrices? Use Eigen or Armadillo.
Multiplications of 3x3 or 4x4 matrices? You can use something simpler like GLM.
user, what the fuck are you doing?
You can make that a 1 liner in C# using reduce. So much for your superior language.
AHAHAHAHAHAH
>Ryzen 1700X
Inherits from sockets, friend of PCIE and SATA, inherits from FinFET, inherits from amd64, inherits from personal
I'm making the most comprehensive hardware admin/detection/monitor tool for POSIX to date.
Can somebody explain to me how to switch compilers on Visual Studio 2017? I feel like Microsoft are bullshitting me. I've read this blogs.msdn.microsoft.com