/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread: Soli Deo Gloria

Attached: JSB.jpg (480x591, 130K)

Other urls found in this thread:

sqlite.org/fasterthanfs.html
ericlippert.com/2012/12/17/performance-rant/
sqlite.com/whentouse.html
amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
booksdescr.org/item/index.php?md5=8DA872E974D71A3DA307F439DC269560
youtube.com/watch?v=2RtDgTm6rn4
twitter.com/SFWRedditGifs

post your code

Attached: 1563732845465.png (1920x1080, 194K)

second for sepples

Attached: 6413418243831.png (747x850, 839K)

Attached: code-721-8910.png (1920x1040, 259K)

>JS
>code

nice

yes. difficult concept for your pea brain?

Attached: w4hyz6f1pnb31.jpg (971x624, 98K)

Lisp is the most powerful programming language.

How does sqlite and postgresql compare in read performance?
I only care about read performance, not writes or concurrency.

>2.1. Read Performance Measurements
>sqlite.org/fasterthanfs.html

>35% Faster Than The Filesystem
>The Filesystem
Excuse me, but "The Filesystem" isn't postgresql. I'm only interested in read performance relative to postgresql.

ahem
FUCK DATABASES

ericlippert.com/2012/12/17/performance-rant/

Excuse me.

Attached: 1533073168204.jpg (699x685, 236K)

I have been messing around with turtle on python. Pretty neat desu.

Attached: circles.webm (1280x720, 905K)

Very neat. I was expecting asteroids then all circle hell broke loose and I found that amusing.

pretty

Will I regret majoring in math w/ stats minor? Also, I'm in a really good mood today so don't fucking ruin it.

Attached: scream.jpg (500x362, 25K)

not if you plan on entering a math/stats field

SQLite is the fastest of them all.
Only use PostgreSQL if you are like running a bank.

Can SQLite handle hundreds of GB data?

I was always told postgresql was faster than sqlite though

there are some people who believe scripting like PHP is much faster than compiled like C/C++

also SQLite has a turbobased "code of conduct"

I don't believe you, who, how? surely no one can be that stupid

Of course. Don't get tricked by it's 'lite' name.
SQLite is the best for read-intensive databases.
Mysql and Postgres are best for write-intensive or databases that require multiple servers.

If only there was a page on the sqlite homepage, titled something like "When to use SQLite" that described all of these answers.

> An SQLite database is limited in size to 140 terabytes (247 bytes, 128 tibibytes). And even if it could handle larger databases
sqlite.com/whentouse.html

It's lite as in not obese and disgusting

Can I still wiggle into dev jobs, assuming an active github and decent projects to showcase? Basically, I want to study math but not close the doors that a CS degree opens.

>your code
>posts code from a public repo

if you're good enough.

>It's my repo

Genius has its limits.
Stupidity knows no bounds.

Any other doors closed by not getting a CS degree, but instead math? So far, the consensus that as long as I’m good, I can still be a dev at most places. That’s fine.

Sorry I know it’s stupid as fuck to ask here but I just don’t where else to get info to make such an important decision in a reasonably informed manner.

Is C a good language? I want to learn it as my first.

in the beginning, the degree matters, but after awhile experience is more important

to be honest, just start with C++. It's more useful, and for small programs you can just use the C subset of the language

why don't you do a CS with math minor

this is the programming equivalent of "install gentoo"

Everyone keeps telling me that C++ is "hideous boilerplate"

that's a meme, user. C++ was created to make programming bigger programs possible, which is a herculean task with just C. In reality, while a little bit more complex, C++ is far more useful.

no one is stopping you
see for yourself

every job offer there asks for C++ knowledge, not C. You can see that C++ preferred, and not "hideous boilerplate". The truth is that C++ is better

cuz i think (but am uncertain) that math keeps a lot of non-cs doors open, like financial modeling and data based jobs, while it also doesn’t necessarily close the doors that cs opens (dev jobs, basically). I also simply enjoy math more. But dev work is so reliable and secure, while math can be straight up unemployable at the B.S level it seems.

Would it be better to learn C then C++?

yeah, foot in the door stuff. but that’s what i’m trying to come to hard conclusions on - what doors are closed by going math? and cs?

i appreciate the patience to answer these stupid questions, shits stressful guys

by learning C++ you inevitably learn C, so learn C++. If you want to use C anytime in a program, you just have not to use the C++ features

take a chance and do what you really want. personally i don't believe in closed doors. it's pretty subjective either way.

learn C, then learn something useful, like javascript

isn't this like degrading yourself?

javascript is used to make real software all over the world. C and C++ are used to drive useless embedded devices as well as muh games

Hey guys, which book would be the best to learn C? Is K&R still a good option even though it's 30 years old, and it teaches c89 C?

Attached: 1552566990193.jpg (225x225, 7K)

you know C++ is the language your browser was written in, right? And you OS is written in C/C++. And your media player.

just read the standard

amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504

booksdescr.org/item/index.php?md5=8DA872E974D71A3DA307F439DC269560

all of my software is written in common lisp, chump

thanks user, #yolo

you wish, reetard

think about it this way
you can take the secure route, but you'll always wonder what if

that buttplug you are using? You guessed it, c++

I'm following along with SentDex's python tutorial. It's my first language.

sorry friend it's true

Thank you, anons! This will make me sound lazy, but I wish this book wasn't 800 pages long. Is there an effective way to read such a long book?

Attached: 1545455598634.jpg (680x329, 36K)

not that's actually rust, because it's a pain in the ass

C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said "to piss you off", but it's actually true. I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really *would* prefer to piss off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using the "nice" library features of the language like STL and Boost and other total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road you notice that some abstraction wasn't very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people don't screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don't screw things up with any idiotic "object model" crap.

Attached: 1547190072745.jpg (622x623, 17K)

t. web """programmer""" who has never written any real software

lol

linus torvalds is a dumb boomer still anchored in the times of C and Asm.

yeah, i think i know what to do. life’s a big gay joke anyway :^)

name one useful thing made with lisp

i did the same for algo trading. comfy

one page at a time ;)

an uninstaller for lisp

maxima

it doesn't matter
i'm using lisp and there is nothing you can do about it

Was reading about quaternions the other day on a whim, and realized "oh shit, these are way simpler than I thought", and ended up making a simple program that does compound 3D rotations, and then made it work with angular momentum. Since then, I've been working on a helicopter game/simulation that works semi-realistically. Writing it in C using OpenGL

Attached: 4160042611956.png (316x202, 89K)

He made a new one, apparently, for python 3 at the end of 2018 where you build a program with him step by step. I find it a lot more accessible than a normal "This is the print function" type tutorial. I need to get hands-on with these things. But yeah, I'm in bed with an old HP Pavilion with Lubuntu a friend gave me. Maximum comfy.

cope

pics or code, post them

Attached: 2161028870456.png (5000x5000, 713K)

I'd rather post neither to stay anonymous, but if you've got any questions about quaternions or 3D physics I'd be happy to answer them (at least as best as I can, I'm not an expert)

learn lisp

>"oh shit, these are way simpler than I thought"
Now I feel like a brainlet.

ahhh, puussy. Nah I just wanted to see ur choppa

For context, I majored in math, hehe. I took a crack at them like 7 years ago (before completing my degree) and was like "whoaaa what the fuck is this shit?", so when I came back to them a few days ago I was expecting to be flummoxed again, only to realize that they're actually not that hard to work with (I have no idea WHY they work, but figuring out how to use them was relatively easy after taking some of the courses I'd taken, and having written a few 3D graphics programs already)

youtube.com/watch?v=2RtDgTm6rn4

Can anybody help me fix my code? Can't seem to get it to work.

Attached: my kode.jpg (768x1024, 37K)

ooh lol, it's ugly as hell- in blender I just made a cube, subdivided it a few times, extruded a little tail, smoothed the whole thing, and then added two little sticks that hover below for the skids. It looks more like a rounded mallet than a helicopter

>Picture of monitor
Sorry, but you're too retarded to be a programmer.

Can't see the full text of the problem, not sure what you're trying to do

The truth is that programming languages matter much less than IQ.
Some of my favourite software is written in languages that I despise.

nm, figured it out: so when your loop iterates, what are the values of "tens" and "fifties"?

>t. not aware of the glory of lisp

is that the quant one? or just a general intro python thing? but yeah, his teaching style is boss. I hate the overly verbose tutorials (print function crap) or those that are completely hands off.

you're not updating the tens and fifties variables inside the loop. You set them to something at the start, your while loop keeps running until they're set so some equation passes, but then you never update the variables.

Also, you're not giving the right answer at the end. It's asking for the number of each bill, not the total value of that type of bill (e.i. if there are 7 tens, the answer is 7, not 70). If it were me, I'd axe the "tens" and "fifties" variables entirely, it'd make it more simple IMO

>majored in math
answer my dumb questions about majoring in math vs cs pls

this is some other guy's code that he posted i was just messing around

Attached: 1563219913099.png (571x553, 55K)