/dpt/ - Daily Programming Thread

What are you writing in Haskell, trannies?

Attached: 592A5534-CD85-403D-B8AF-E0684ADCABD1.jpg (613x703, 95K)

Other urls found in this thread:

youtube.com/watch?v=4l5HdmPoynw
guides.rubyonrails.org/getting_started.html
ruby-lang.org/en/documentation/
freecourselab.com/wp-content/uploads/2018/12/FreeCourseLab.com-Udemy - C Programming For Beginners - Master the C Language.torrent
freecourselab.com/c-programming-for-beginners-master-the-c-language/
cs.rit.edu/~ats/books/ooc.pdf
twitter.com/NSFWRedditImage

First for C.

Second for C++.

Third for Lua

Last thread: >>

Give me an idea for a project to work on.

Attached: 1548559291402.jpg (612x716, 313K)

What's the best way to use C# objects, that's been converted into Json, in JS? I'm thinking of attaching an attribute to each class and using t4 to generate js prototypes that I use on the JS.

artificial general intelligence

>satania but with crapple filename
>that one macOS haskelltard
get a trip already
JSON is directly consumed in JS as an object.
no idea about the rest of your post

Why are all functional programming languages garbage collected?

>What are you writing
Trying to make sense of what I wrote two days ago, and why it doesn't behave like I expect it to

If you want to solve the upward funarg problem in generally, you kinda have to have unlimited extent (aka garbage collection).

xth for I have crippling depression induced by my programming job

x+1th for thinking I'm smarter than I really am, and taking on a task that's too hard for me at uni (again)

or induced by your attitude about the job/life

Is there any reason you posted this fantasy?

I do not understand

Is Lua worth learning /dpt/?

and?

programming is a woman's job, boomers and their fathers new this, it's why it has so many trannies now

yes
WoW Classic is coming out soon and you'll have plenty of addons to remake for it

Is tranny a woman?

Sorry I post in wrong thread

no, but trannies willing imitate women and take their place in society.

/jp/ please sudo stay

Forgot Haskell even existed until this thread to be honest. I remember it fondly but it's useless. Show me your best C or C++ code you raging bunch of faggots.

Attached: 1422824591837.jpg (409x393, 32K)

Very useful if you play games that have scripting support as mentioned.
I've heard it's also relatively easy to implement in your own projects to provide scripting support as well.

Just be aware that tables (not arrays) are 1-indexed.

youtube.com/watch?v=4l5HdmPoynw

#include

void
main(void)
{
return echo(void);
}

void
echo(void)
{ cout >> "Hello, world."

Attached: 1553251476772.jpg (600x611, 53K)

I've been reading sicp and I closed the book when nothing made sense and square roots started being mentioned. Is this normal?

I am creating a recipe database which takes in ingredients as an input from the user, and outputs recipes based one those ingredients. I am using Visual Studio, C# and SQLClient. I have an SQL query which retrieves recipes that contains at least on of the ingredients, but I need it to return a recipe when ALL ingredients are in that recipe. Does anyone have any ideas how to do this?

Attached: sql query.png (789x91, 8K)

Anyone here know SSE?

Yes. You need an IQ above 80 to understand SICP.

>wake up
>suddenly want to embed V8 in my C++ program and write me some dank javascript programs
talk me out of it dpt

enjoy your sql injection

I'm finishing a degree in mathematics and I would like to study theoretical computer "science". Which language can other researcher expect you to know? I already know C (procedural and system), scheme (SICP) and python. Should I learn OOP?
I literally just want to apply for a master in theoretical computer science. I also plan to read CLRS (with the exercises of course). Should I also learn Haskell? It seems to be a popular language among research.

Embed a good language instead, like scheme.

A naked woman robbed a bank

Nobody could remember her face

>tfw too brainlet to make my programs in C
how do I cope

Attached: 1448259211693.jpg (423x364, 32K)

I'm not worried about that buddy:) thanks for your help :)

If i learn ruby on rails concepts , how interchangeable are they with normal ruby ?
Im taking vanilla ruby in Uni and all i see interms of tutorials is just ruby on rails
Is it the exact same version of ruby but with web implementation ? Im confused

>weeb
beyond salvation

Let's say I want my C program to read commands with possible arguments from stdin, typed by the user during execution. Is there a better way of doing this than getting line from stdin with getline() and then using getopt on it?

What's his endgame?

Attached: cv_thu.jpg (189x189, 8K)

what does it do? will it even compile?

pls assist

Attached: 1447890637428.png (237x332, 91K)

>ruby on rails
There is a thread for web dev...
According to the official doc: guides.rubyonrails.org/getting_started.html you are supposed to learn Ruby before learning the framework
Here is the official Ruby doc for ressources to learn : ruby-lang.org/en/documentation/

his website is not working..

Attached: Dzzbiv2XcAAdvVk.png (852x506, 187K)

>that window manager waifu
cute, I want to make my own

What drives people to do some weird shit like "Forth implementation for WebAssembly"? How do I acquire that magic autism?

C programming GOD

Attached: D0ALXvAWwAEIDcn.png large.png (1079x1185, 72K)

go through hardest tasks on Jow Forums top 100 img?

Attached: 1545754810565.png (540x540, 206K)

>What drives people to do some weird shit like "Forth implementation for WebAssembly"? How do I acquire that magic autism?
I can imagine boredom and being skilled enough to do it. Most jobs (CRUD) are not interesting at all.

I need an asciidoctor Rust crate

can you give me a sample output of that query

Please tell me of some youtube series, sites, or books I can use to learn C. I've been using this but I'm lost now that i'm at ptrs and arrays.

Attached: 1471911602546.jpg (852x973, 475K)

Is it worth it to buy a udemy course in C? My professor sucks literal ass and goes off tangents instead of teaching.

Attached: Capture.png (1534x266, 144K)

the salvation of Christ

C Primer Plus by Stephen Prata. I use this to learn C and it's really comfy, easy to understand, everything is clear and there are many question review and exercises to review what you learned. You also learn the modern standard instead of the old way of doing things.

I wouldn't, because they always appear "on sale" so I can't take them seriously
try this tho freecourselab.com/wp-content/uploads/2018/12/FreeCourseLab.com-Udemy - C Programming For Beginners - Master the C Language.torrent
gotten from: freecourselab.com/c-programming-for-beginners-master-the-c-language/

>Udemy

Attached: DZ68SDrW0AANl9v.jpg (1200x644, 62K)

just to clarify, that's a torrent for that udemy course.
Still, a book would most likely be a lot better. Make sure to do all exercises if a book has them

Here I just entered 'Eggs', and it outputs both Pancakes and Ommlette, yet both of these recipes include more ingredients than Eggs.

Attached: querytest.png (766x283, 13K)

#include
#include

void echo(const std::string& str)
{
std::cout

Attached: 1523887338537.png (150x147, 56K)

I would just take CS50 instead, it's free and by harvard, not some medium blogger.

I'm not a cs type. I like building shit and working with my hands which is why I'm a mechE. I have no fucking idea if udemy is a meme or not.

Thanks user. I find I learn best though if I use multiple sources watching a lecture, then reading the book.

reminder that this is valid c++
template
void foo(Ts......);

So if C isnt really a total subset of C++, what are some of those things that C has the C++ doesn't?

more autistic community

Its prepAration time not prepEration time

if you remove the GROUP BY clause, does it show every recipe multiple times for every ingredient that's in it? If yes, you could remove the group by and put a HAVING clause with COUNT(DISTINCT Ingredient_ID) = numOfIngredients

Designated initializers (as of C++20: more powerful designated initalizers).
Implicit conversions from void*.
There are also things that behave differently, such as inline.

If he were alive today, what language would he primarily use?

Attached: alan-turing-9512017-1-402.jpg (300x300, 8K)

so?

There is goto but no gosub in C. Why is this?

en-gb

nice font faggot

The fuck is gosub you monkey? It's just bait right?

some visual basic shit

>open C source code of some project
>can't understand jack shit
the language is simple, but the arcane bullshit people make up with it is not

Attached: 1262383842398.jpg (240x250, 10K)

I need a data structure in C++ that allows me to store a pair of objects without allowing duplicates. For example, something like an pair where first 1 and second 2 would be the same as first 2 and second 1. Does such a thing exist?

Yes it does, I tried using what you said and now I get this error:

Attached: sqlerr.png (983x482, 17K)

std::set with a custom comparator.

Made ImageButton for WinForms.

Attached: imagebutton.gif (221x84, 71K)

I'm retarded, you need group by for the HAVING clause
try enabling it, but I forgot how it works then with what you've added
fuck I wish I can try it myself instead

How can I simplify chains of if statement guards on c#? I have about 120 places where I have to write
if(foo(...))
return result1;

if(bar(...))
return result 2;

...

return uniqueResult;

It's about 5 ifs each time, the parameters to foo and bar are different each time, but the result1, result2,... Are constants, except for resultUnique,which is different each time.

>K&R - The C programming language
basic stuff
>Stephen Prata - C Primer Plus
basic stuff + some advanced C98/C99/C11 stuff with exercises and other shit
>cs.rit.edu/~ats/books/ooc.pdf
OOP in C
>Peter Van Der Linden - Expert C Programming. Deep C Secrets
Some stories about C language with some C tricks and pitfalls
>Richard M. Reese - Understanding and Using C Pointers. Core Techniques for Memory Management
The name speaks for itself
>Ben Klemens - 21st Century C: C Tips from the New School
Same as above
>P. J. Plauger - The standard C library
Just

>How can I simplify
I think if your functions mutate state and order matters, then you can only obfuscate it.

>OOP in C

Attached: 1541010365930.jpg (1000x1000, 230K)

But why? Winforms is dead.

How do I shrink a JPEG to target file size? Say it's originally 3 MB, I need it to maintain as much quality as possible and be under 1 MB. Is it as simple as just shrinking the resolution by 1/3?

That’s sepples not c.

Still no luck :( It does not make any difference from what I can see, 'Eggs' still displays both results, I also tried adding ingredients while incrementing the number of ingredients and it made no difference

Attached: querytest2.png (689x506, 16K)

Make foo return result1 or null instead of true and false, then use
return foo(...)
?? bar(...)
?? gar(...)
?? Other

Switch case and an inlined or not function that evaluates for the condition. They're all related, you know what you're doing, just name it.

>stop staring at a computer screen and find a vocation
T-thanks father. At least you’re not immigrant shilling.

Attached: B5E9EAD7-B166-4372-B771-7624243D8C85.png (1229x1160, 63K)

>Winforms is dead.

Couldn't be further from the truth.

I don't know anything about C# but this looks to me like you either have 5 completely different conditions to break out of the function in which case I guess it is what it is and there is no simplifying to do. Maybe you can try making a high order that receives those functions and doing a switch case in there. It's the same but a bit more elegant, and maybe you can reuse this function in the 120 places you have this pattern.

Can you tell me what it does?

It's been replaced by WPF years ago.