/dpt/ - Daily Programming Thread

Cute girl edition

Previous: What are you working on Jow Forums?

Attached: code_master.png (1164x1738, 2.17M)

Other urls found in this thread:

rogueliketutorials.com/libtcod/1
joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
hackage.haskell.org/packages/top
github.com/obsidiansystems/obelisk
idris-lang.org
chris.com/ascii/index.php?art=objects/buildings
chiark.greenend.org.uk/~sgtatham/puzzles/
twitter.com/SFWRedditGifs

learning vulkan

how come userland network stack can be faster than kernel

Remembering how to use SDL2.

Attached: 2018-07-25-212709_1280x800_scrot.png (1280x800, 51K)

>What are you working on Jow Forums?

Why tf would you write in Lisp

>writing some shell clusterfuck when I can make a C# program that never crashes instead

emacs configurations

So autism?

To be mysterious and esoteric
It aligns well with the goals of occult programmers

FUCKING BASH SCRIPTING SYNTAX IS SHIT
btw writing a >5 line script in pure bash because i thought it would be faster than using python or something (inb4 use c/go) for control flow

networking in whatever you're using(probably linux) is a straight hack, and whatever userland hack you're using has less features and is therefore faster.

ML family is the greatest langauges of all time.

I'm working through this libtcod tutorial using Python

rogueliketutorials.com/libtcod/1

Getting close to the end of the tutorial, I'm on part 11. So far I've only deviated by adding some extra properties to my entities and map rooms and redoing the menu system. Once done with the tutorial I'm going to rework the game in to a scifi roguelike.

Attached: 2018-07-25-174057_800x500_scrot.png (800x500, 22K)

i wanna fug iori

Slower than C, yet no faster to write. kys

hi bobby

But it looks pretty and is much easier to read therefor it is better.

Proof? Just use Rust if you want the same speed as C with the power of ML.

Does anyone else not see the point in writing more software?

There are very few occasions at this point where I find a problem and thing "I should write an application to solve this."

Building new solutions from the ground up for solved problems just seems so pointless, but then I look at my near barren github and think that maybe I should start cranking out shit just for the sake of it.

Attached: PLipXAZ.gif (260x195, 787K)

>solved problems
I'll usually write something from scratch because something the existing solution does is retarded, or so that I can add network functionality and control it remotely.

iktf. Do the autists who obsessively program for 10+ hours every day just reinvent the wheel?

Working on a Draw Poker game in Visual C#. Just for fun. Also I love Visual Studio and own 100 shares in Microsoft.

this is reasonable. but most of the time whatever i'm using is open source so i can just modify it to do what i want, or worse case scenario write a wrapper to add whatever functionality I need.

it's starting to seem that way. there's too much shit code out there as is, they need to stop.

I think it is because programmers think it is easier to rewrite code from scratch than to fix code which already exists.
joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

I reinvent the wheel because programming is mostly a hobby and wtf else am I supposed to do? I only really know Python and the open source software I use is generally massive programs written in C or C++ and I have no hope of contributing there.

I mean, let's say you like playing Othello. It's been done hundreds of thousands of times before but that doesn't mean you can't have fun doing it yourself. It won't be better than the other ones but it'll be yours. Same reason amateurs do art or music for fun.

Why aren't you using one of Haskell, PureScript, Idris, and Agda?

python or javascript with nodejs? what should I learn to create bots/scrapers/automate stuff + websites.

Because I'm not autistic and I like to write efficient code. White men write efficient code, (((they))) write abstract functional code

just give up dude
leave programming to people who actually do have ideas

Development time is more expensive than execution time for most software.

Working on some Crystal libraries

nobody on Jow Forums will ever understand this

Because I use Scheme daily at work and haven't learned Haskell yet

It has no libraries

Haskell has many high-quality libraries

Using Scheme is not a sin but a penance

Show me which ones that are actually high-quality and actively maintained?

it's cute and round

Cross compiling Haskell is a joke.

hackage.haskell.org/packages/top

Not that user but anything that Haskell excels at. Look at any lexing or parsing lib and it should be pretty good.

lol, those are rookies numbers.

Are you judging somethings quality solely based on how many people use it?

I think he might be. The Java argument in action.

Created a free lynda.com account and downloaded a ton of videos with a python script.

Does anyone use Qt with c++ on Windows? I built an app, but when I ship it the checkboxes are not displayed on some systems.

is lynda.com actually good?

I've heard their RE tutorials vary in quality but specifics are good.

Currently I'm adding bezzier curves to my aimbot to prevent straight line movements.

I think it's decent, depends on the course. I don't only watch programming vids, but also things like design. Photoshop and Illustrator tutorials are vety good.

Anybody done webassembly stuff?
I want to make some js lib go faster but not sure if I should somehow represent and pass js objects in webassembly code(rust/c) or just map them to numbers and use those in the webasm

>Remembering how to use SDL2.
Use sdl gpu

I write fortran.

Plotted activity of the last thread.

Attached: my.png (1366x768, 86K)

>github.com/obsidiansystems/obelisk
holy shit, this looks great

am i fucking retarded, whats a better way to do this, now with not a bunch of random spaces

// get the first episode in any consecutive chain of episodes, e.g. [(1),2,3,(5),(16),17,(32),33]
var episodes = result?.Select(item => item.Episode)
.Distinct().OrderBy(i => i)
.Aggregate(new List(), (list, i) =>
{
if (list.Count == 0)
list.Add(new List {i});
else if (list.Last().Last() + 1 != i)
list.Add(new List {i});
else
list.Last().Add(i);
return list;
}).Select(i => i.First());

Not using Javascript

alright i've got that step down since its c#, whats the next

now repost again but this time without using var

Not using C#

its an IEnumerable

Will look into that. Thanks!

Why threads are so confusing

Attached: 1517003239319.png (186x208, 28K)

how are they confzsing

Which is better: Rust or C?

C

C++

WHy?

static IEnumerable FirstEpisodes(IEnumerable items) {
var ordered = items.Select(i => i.Episode).Distinct().OrderBy(e => e);

return ordered.Where((e, n) => {
if(n == 0) {
return true;
}

if(ordered.ElementAt(n - 1) != e - 1) {
return true;
}

return false;
});
}

Only you can answer that, user. Look into your heart.

Rust

No

>rogueliketutorials.com/libtcod/1

looks cool

>idris-lang.org is down
update soon lads

>types could have prevented thi-

what language do I use for my simple puzzle game and neural network

Attached: Karakai Jouzu no Takagi-san - Ch.80 - Counting Steps - 2.png (918x680, 554K)

How do I defeat object oriented programming?

iori is for anal!

by adopting FP, its mortal chad enemy.

Is it bad I unironically prefer Standard ML?
I feel it has less bullshit. It's the Scheme of ML family.

you don't follow the OOP practice

oop is just fp but with boilerplatey syntax

quick someone give me some short assignment i am bored at work

I know you're not serious, but this is an incredibly stupid statement.

>brainlets

Attached: yy2.png (198x194, 61K)

draw a simple house in ascii with just programming, and absolutely no hard coding.

persistent red black trees make me want to fucking kill myself

the fuck does that even mean

you'll need somewhere to live
programming won't pay the rent

chris.com/ascii/index.php?art=objects/buildings

bot moh employeer wonts c++

Suggest Jow Forums JSON analyzer commands.
Examples:
>freq t
Computes how many posts were posted in t seconds interval
>avgfreq
Output average post frequency per hour, average unique ip frequence per hour and average image frequency per hour
>data
outputs post no and time side by side

c++ can be anything you want.

can it be my gf?

top country posts by board.

Well I managed to translate all the rendering stuff to sdl2_gpu, and the movement seems more smooth now. Thanks again!

Attached: 2018-07-26-013140_1280x800_scrot.png (1280x800, 63K)

Just write a siri

What a coincedence! I'm going through lazy foo's tutorials, but I'll be using makefiles because Code::Blocks has been annoying and I should learned makefiles (I'm used to not using an IDE professionally).

Epsilon uses a scheme dialect, and it's probably the most interesting text editor I've seen (it doesn't work that great on linux tho)

>bash is bad
Wait til you see batch. You're using ${var} right?

If you spend the time to learn Perl, you can make your own basic system libs and stuff. I don't have the same job anymore, but I wrote a library to load options files (it can even load them into arrays and hashes directly). It's not the safest, since it actually builds a perl script, runs it, and captures the result. It works fantastically though.

Find new problems to solve. I want to write a PLL logic simulator or a simulator for CMSS software so I can learn it for a job. I also want to write an audio-output based wave generator, for transcranial direct-current stimulation. That's not hard (I've done it before by creating wav files, I should do it live with SDL or something).

>good C code
>take 3-6 months to learn by even a mongrel
>can follow good code and remember language easily
>good functional code
>have to learn whatever meme it is for six months (not counting the two years spent on comp sci classes)
>every time it's going to be some shit that wraps a library and does nonsense with it, because each language decides to have it's own math memes that have to fall back on C because reality isn't pure math
I've been told repeatedly, Computer Scientists make worse programmers than Electrical Engineers, for many reasons.

Whatever these are in (C and libraries):
chiark.greenend.org.uk/~sgtatham/puzzles/

>writing a library
>day 1
>"gotta have this feature and that feature, better add an option for this and whatnot"
>implement everything, works fine
>getting close to completion, can release it soon
>"fuck your features, fuck your options, everything goes out the door, less code is better, we're keeping it minimal now"

and it feels so good

When you realize that 'monad' is another name for an object and funcfags are using OOP every day while being too dense to notice...

Attached: 1520309255805.jpg (604x453, 49K)