/dpt/ - Daily Programming Thread

What are you working on, /dpt/?

Old thread:

Attached: YlY-55R8OSd4cByTqQiD6Hs_tMu9O0uH4w02oZ4zto8.png (642x1083, 50K)

Other urls found in this thread:

plugins.jetbrains.com/plugin/10559-gapstyle-color-schemeatm
blog.burntsushi.net/ripgrep/
blog.plan99.net/modern-garbage-collection-911ef4f8bd8e
benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-gpp.html
golang.org/doc/faq#Why_does_Go_perform_badly_on_benchmark_x
github.com/xxxboomerxxx/ayy
pastebin.com/iF9rd5ef
open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
twitter.com/SFWRedditImages

i don't get it that's like 90% of any useful rust library why would rust users be mad about it

i mean seriously rust users may as well make a macro so they can write useful { ... } instead

>90%
Nice bait. ripgrep has like 5 lines of unsafe, and the Redox OS kernel has only 7%.

Why are language designers retarded? GC? Cock cages? muh not kosher?

Maybe I'll make Pong in HolyC, good thing the entire documentation comes with TempleOS

in Haskell this is just

import System.IO.Unsafe
useful = unsafePerformIO


e.g.
useful $ do
let x = useful readLn + useful readLn
print x

What colour theme do you guys use?
At this point I just switch around, every once in a while I just change completely for variation.
using plugins.jetbrains.com/plugin/10559-gapstyle-color-schemeatm

>paying for poobrains

remove atm from link to get it working

I think it's quite nice, it's an edu license so I'm not paying for it.

Attached: Screen Shot 2018-06-21 at 14.39.33.png (852x630, 110K)

What kind of th/s do you get?

ah no. not a miner. just creating my own crypto. trying out different consensus algo's etc. this is just prototype code

VSC with the Dark+ theme and Ubuntu Mono font.

>single use case awk implementation still has unsafe code
>OS that isnt an OS is still almost 1/10th unsafe
>In a language that is designed explicitly around safety
Do you know WHY they have unsafe code? Because its the only way to get any actual performance out of the code.

This doesnt require anything in C.

>sha1(nonce+hashDigest)
the nonce is supposed to be in the block itself.

GC isnt inherently evil, its usually a lot better than you at managing memory.
It just so happens that GC'd languages historically are much much slower.
Go is the only GC'd language I know of without that issue, getting near C++ speeds and sometimes near C memory usage when it doesnt have to make external C calls (such as for regexp, its native regexp is shit)

It has nothing to do with perfomance, ripgrep itself is 99.99% safe, yet it's a fastest grep out there:
blog.burntsushi.net/ripgrep/ . The real reason for unsafe is accessing unsafe interfaces, C API in ripgrep and hardware in Redox.
>single use case awk implementation still has unsafe code
90% of "unix toolbox" is a single use case awk implementation.
>OS that isnt an OS is still almost 1/10th unsafe
7% of the kernel, that thing that talks to hardware a lot, not the OS as a whole, which is mostly safe.

Bois I need to exercise my brainlet mind and understand algorithms and how to develop my own algorithms. Is there a book or some learning resource you'd recommend which is like "essential algorithms you must know as a programmer"?

> Go is [..] without that issue
False. Besides, Go's GC is really shitty comparing to Java's: blog.plan99.net/modern-garbage-collection-911ef4f8bd8e .

Attached: performance.png (630x358, 32K)

Its also not even feature complete against awk or grep, so its speed is irrelevant. It cant even do multiline search, which Im sure is a huge speed boost since you only ever need to consider a current line.
It, just like the language itself, is a solution looking for a problem.

What the fuck is this chart? How to read??

True. benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-gpp.html
Remember i said "getting near" speeds. But if you look at the memory its neck and neck which is great for a GCd language.
Also that article is ancient and ignores the fundamentals of how Go is designed. It makes all the concessions in its garbage collector because the language is designed specifically around millions of tiny coroutines being threaded with shared memory channels and tiny tiny stacks. The apparent naivete in the GC design is misleading if you dont understand the design and goal of the language itself.

Oh and before the nitpicking greentext on the benchmarks it performs poorly on (that i already addressed)
golang.org/doc/faq#Why_does_Go_perform_badly_on_benchmark_x

Tl;dr young language not fully optimized etc etc
Im not trying to say its a C/pples replacement but there does exist GCd languages that are performant.

>being slow on benchmarks is documented
Nice feature

Bitch what did I just say

Friendly reminder we all use Elm around here.

You addressed it by asserting it lol

Rust is the ultimate language.

Because its a factual statement that everybody gets their panties in a twist over if you ever suggest performance availability. Im not gunna plug my ears to the faults of a language I like.

If your favorite programming language was so good you wouldn't have to shill for it.

Rust, Haskell, Go
The tri-meme

How else would you know my fav PL is so good if I didn't shill it to you?

Use perl6

I don't, other people do.

But that's wrong.

>fastest grep
Single line only. It's shit.

You clearly don't understand what unsafe{} is for, so why do you insist on bringing it up in every damn thread?

It's to bypass Rust's shitty abstractions and actually do something fast for once.

I want to learn c++, I got experience with Python what books are recommended?

raw pointers aren't faster than borrowing

github.com/xxxboomerxxx/ayy rate my porn scripts lads

The only coding I do is codegolfing. It's relaxing to do while I try not to kill myself at work.

Only with a borrow checker that isn't shit.

Is there any language that doesn't base their library with import and export?

Literally every fucking thing in that chart is labelled.

Attached: 1348244681565.jpg (400x300, 31K)

What are some reasons glGenBuffers could randomly fail for?

Working on a language for writing text adventures. Don't have a standard or any code yet, just a messy first draft of how I want it to work.
pastebin.com/iF9rd5ef
It started out seeming like it would be easy to implement, but now that I've added a few features I want, I suddenly have no clue where to even start. Doesn't help that the only language I've ever made is a lisp whose gc didn't even wind up working (even if everything else did).

fucking eclipse doesnt load/ use my color theme anymore. I have eclipse color themes plugin installed and after every restart it resets to that fugly default dark theme instead my nice pastel. funny enough its correctly stored in the settings, but it just doesnt load it.
completely reinstalled eclipse. didnt help

halp

Attached: 1526941804772.jpg (1200x645, 48K)

what

Too many false positives on correct and safe algorithms. Multiple mutable references are fine, if not invalidated. So is interior mutability. Rust is dumb.

>programming in any language but C and Perl
Heh, brainlet.

>>> import brain
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'brain'

Attached: you.png (1427x258, 27K)

>read TAOCP
>goes moderately well, find it enjoyable
>says there won't be too much math
>right after comes this
Can I just skip it?

Attached: 1512445942584.png (717x675, 144K)

what c++ exceptions should have been
open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf

Because all the good languages are already made, if you want to make a new language it will either be a copy of a good one (already made) or a "new and innovative" piece of shit. And to do that voluntarily, you need to be retarded.

So I just made a client server where client send data to server and server prints the message after some day specified in data.
I want to learn how multiplayer games work.
From intuition I know all client should maintain similar kind of state machine object.
Any interaction between objects changes the state of interacting objects and effect should be visible from POV of all client.

Can someone explain me how the server should be designed?

you are wrong

>Because all the good languages are already made,
Where's my dependently typed, GC-less FPL then?

>FP
>good

t. brainlet

I am thinking of buying the whole set when I get my bonus . Is it worth?I heard he was writing the last book? Did he write or dead?

FP without a GC is impossible

t. speedlet

Can't you just make all variables pass by deep copy or reference-counted CoW pointers?

Can be done in multiple ways. But one way is
>client sends for example, x y z coord, and pitch/yaw looking direction, and heading (w/a/s/d)
>server calculates new velocity/position/direction/heading
>sends this out to the clients

Because Common Lisp exists, and it's as fast as any other language you'd care to compare it to, and thus the bar is impossibly high.

So the only things we get is "Java with more syntactic sugar" like Kotlin and Ceylon, or "C with a weird and kinda cool framework added on with some syntactical support" like Go and Vala.

It's kinda sad desu.

POST A SCREENSHOT OF YOUR CODE

Attached: screenshot.png (1898x1200, 231K)

Nigger I integrate a Java payment system to 5 different card aquirers, 4 "other" forms of payments and an in-house cashback bonus system with SAP.

Nothing written in that system is neat. It's hopefully readable, but that's about it.

Attached: file.png (956x1030, 75K)

Attached: screenshotcode.png (1562x979, 156K)

>SAP
you work on enterprise?

i have to work with a data-warehouse system that compiles financial reports written with SAP.

Why are you on these threads?

>post a screenshot of your code
>posts a screenshot of someone elses code

>Java payment system to 5 different card aquirers, 4 "other" forms of payments and an in-house cashback bonus system with SAP.
you must be earning > 100K i hope

did you wrote the system or are you just one of the "developers"

I've read this and while I don't agree with the entire document the proposed solution is pretty neat. I still added the document to my "C++ learning materials" because it does a good job of explaining why current sepples exceptions are a mess.

never said it was mine, fuckface

i just said to other people to post a screenshot of their code

still though?

you know I love to

Attached: Screen Shot 2018-06-21 at 12.26.39 PM.png (2880x1750, 1009K)

based Joseph at it again

>need a job to get experience
>need experience to get a job

Attached: 1521471184293.jpg (288x325, 32K)

Do you think he's got a cute little anus?

Attached: gopher.png (245x300, 40K)

>need experience to get a job
>what is entry level

>>need a job to get experience
why do idiot wagecucks actually believe this?

Attached: eclipse_2018-06-21_14-00-03.png (602x587, 21K)

>anus
Go fuck yourself

There's a Lisp without GC. I think it's called Carp.

>search entry level
>we need a devops full stack code ninja with 3+ years of experience in multiple languages/frameworks

We have an architect, but he has no clue how things are stitched together either.

> you must be earning...
I'm not hurting for money, if that's what you're asking.

Yes, I work on enterprise software. It could be worse, I don't have to deal with all the bullshit that the poor frontend JS developers have to deal with. I mean, I get to write SQL and have logs that tells me what went to hell, etc.

Those poor fuckers have to deal with webpack, gulp and grunt, and other JS "helpful tools" that sound like and remind you of bodily functions.

But I'm here because it's fun to be here, as opposed to chasing edge cases through a decade old system where the only thing that's great is the logging so at least you have that going for you. (But because the logging was done properly, it's a right pain to set up shit like ELK, so that's a pain. zgrep is not as neat. At least we have proper monitoring tools so we know when fucking ELAVON SHITS ITSELF FOR NO GOOD FUCKING REASON.

I mean, the guys who worked here before me did a really great job with diagnostics tools, so when things do go to shit, it's easily fixable.

Go and stay go.

Attached: Capture.png (1585x980, 151K)

Don't forget the crazy requirements of having to be a hypersocial team player with a good sense of humor. Literally every job announcement has this.

who wants to work with a shut-in 'tist?

Hmm Stele bank lisp?

one that believes they're much better than everyone else at that

Yes. Steel Banks Common Lisp.

I agree with actually. It's retarded to want everyone to have the same kind of outgoing super social attitude. It's also dangerous because you foster an environment where everyone is the same. Where's the fun in that? The great big thing about enterprise development is that the ramp-up time for a new engineer is measured in years. If a company have to pay 250 000+ over a period of two years just to get a new guy in, they're NOT going to fire you easily. Thus you must either have a tolerant chaotic environment where people are themselves fully and honestly, or you can have a dull gray environment where individuality is struck down and fear encouraged to make sure people don't leave.

The first option is much cheaper and more effective. It's immensely bad business practice to require people to be bubbly extroverts.

Now if they say "work well with others, can stand up for themselves without being a dick, tolerates that people disagree with them, and isn't an asshole", I'd be all behind that. but that's not what's asked for.

>while (1)
>not for(;;)

any java junior associate certified people in here? how was the exam? what should i do to prepare for it?

quick primer on the pros and cons of each

autism