/dpt/ - Daily Programming Thread

Old thread: What are you working on, Jow Forums?

Attached: 1538030883202.jpg (400x400, 40K)

Other urls found in this thread:

fpcomplete.com/rust
gcc.gnu.org/projects/cxx-status.html
mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html
github.com/komeiji-satori/Dress
twitter.com/NSFWRedditImage

Wasting time.

Did you honestly think your shitlang has selective local imports?
LOL

fpcomplete.com/rust
So, fpcomplete is abandoning Haskell for Rust? Good for them.

I thought C++ might have but i guess that'c coming in C++245

>c#
How do I get a dictionary string key by a regex search? Or should I just iterate the keys like the dumb fuck that I am.

>dictionary string key by a regex search

Attached: 1542442490297.png (1092x1050, 120K)

Yes

Attached: 1548034025038.jpg (295x295, 24K)

Huuuuuuuuuuur, ehehe!! Hurr hurr, how do I shot web?

Everyone but Jow Forums contrarians are taking the std::rust pill

learn what a dictionary is, rajeesh

legit kek

Attached: 1543008897370.gif (700x285, 3.38M)

If you learn how to rebut pajet. It was a perfectly valid question.

Good post

Attached: 1536537224489.png (316x422, 150K)

Hash tables don't work like that.

Why are C# faggots so fucking dumb jesus christ

>dictionary string key
Redundant. Chances are if you are using dictionaries, you're using strings as keys.

>by regex search
What the fuck are you searching? Why are you searching for keys?

They are dumb because they use C#

Hey, I'm Jow Forums and I'm learning Rust right now. It's real good. But I do sometimes wish there was a way to use Rust with a memory model of C where you call malloc/free manually yourself. I realize that would defeat the whole premise of the language, but the language has become way more than just "C with an angry compiler" (meaning I believe you'd get a better C if you just ripped out the whole borrow checker and static analysis tooling).

Which means my only option is iterating the keys in N speed instead of constant speed, as I said

I want the first string key in a dictionary which is containing another string

Yuno is the cutest

Imagine being this smug.

Attached: Screenshot_2019-02-01 Eliezer Yudkowsky on Twitter.png (640x534, 58K)

Imagine unironically believing koding is hard
snowflakes, I swear

>Twitter post by literally who

Attached: 1374577061478.png (303x323, 119K)

did he have a stroke halfway in writing that tweet.

If you can learn to count and to speak, you can definitely learn to code. Not everyone should have to learn, though.

436 hello worlders

Why OpenGL in X forwarding uses X-server's GPU to render rather than pre-render the image from the client's machine's GPU?

Isn't sending tons of pre-rendered data use more bandwidth than sending the whole complete image?

wrong

Attached: 1549011025870.jpg (687x971, 201K)

Because that's how it was done when GLX was first designed. The X server had exclusive control over the GPU and couldn't share it with anyone else.
>Isn't sending tons of pre-rendered data use more bandwidth than sending the whole complete image?
X11 is anything but efficient. It runs like complete shit over the network.

like poettering

why so many animes in here? is there a correlation between being a programmer and liking anime?

why so much English in here? is there a correlation between being a programmer and speaking English?

why so many anonymous in here? is there a correlation between being a programmer and being anonymous?

why are there so many fags in here? is there a correlation between being a programmer and being gay?

why so many brainlets in here? is there a correlation between being a programmer and being a brainlet?

What's the cutest and most anime programming language?

Attached: enlightened.png (720x719, 394K)

we already went over this hundreds of times
quit asking such dumb questions

Attached: 1543020062309.png (1280x720, 652K)

Moonlang with Love2D

isn't it obvious?

Attached: 1530318282805.png (712x1150, 519K)

im so tired

There's a correlation between being a programmer and being a cute girl with a cute feminine penis.

Attached: 15487882518160.jpg (960x478, 60K)

wuby ofc

Attached: b5e51c8f66fe34d04752ff905235a0e1--programming-languages-chicas-anime.jpg (300x440, 20K)

He's right though. You need some degree of autism to program.

Stop setting unrealistic beauty standards on men.

Nonsense, you can do it, user!

Attached: 1548992633548.jpg (1905x1372, 278K)

is that supposed to look good?

>ywn look as good
why even?

trying being a man instead of pretending to be a woman you fucking faggot

Even if I wanted to, I'm taller than over ninety-nine percent of women in my country. Keep trying, cult.

fuck off, I'd like to be a decent programmer

...

It does.

Attached: DxJP0jtX0AA5_lT.jpg large.jpg (2048x1148, 298K)

Hot desu~ I'd offer her a hot meal.

What's arguably the best design pattern? A friend of mine just told me I should kill myself if I don't use MVC

trannies will always look like trannies
you can put on as much makeup and hair and girl clothes as you want, you just need to look at the actual person, it's a man

you should kill your friend
also yourself if you believe in *one* best design pattern
actually just burn the world for ever inventing arguments about meme patterns

> 1994 + 25
> design patterns
Just write code, m8.

>the best design pattern

Attached: 0cbpdjii3pa11.png (645x729, 105K)

His videos get derailed every time. He presents good points but the delivery is shit.

that's arguably not true,
but hey, if that's what help you sleep at night

I personally like how she looks better and better over time, HRT is a miracle.

Passed my first university programming course which was about python. The last things that the course taught were classes, inheritance SOLID principles, abstractmethods etc.
My second semester starts in two weeks. Should I learn another programming language in the meantime or deepen my python knowledge?

Needs FFS

>that's arguably not true,
only in your demented imagination

nobody cares

why is rust so nasty looking

Clojure seems pretty neat and it's built on the JVM which is nice but I really don't know what I'd use it for when langs like java/python already exist.

Any suggestions on what kind of projects it's good for?

Attached: chipanddip1.png (800x443, 496K)

gcc.gnu.org/projects/cxx-status.html
Looks like we're going to get most of C++20 before it's even released.

>concepts not in main brunch
I'm not going to compile GCC

Well, here I am.

Where do I get started with my journey /dpt/?

Attached: Screenshot_2.png (1550x876, 687K)

mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html

It IS in main branch though. It's been in GCC for quite a while now, it's just a bit buggy.

Attached: 1546361914133.png (675x123, 16K)

You're probably misusing the dict then.
Anyway since it's an IEnumerable you can just use linq to filter it for you.

>reading

Attached: 1541093865031.jpg (726x669, 40K)

> 1984 + 35
> SICP
wew

I am employed as a developer for five months but I wrote only like 25 lines of code.

r8 me

I doubt it can be done more efficiently than this.

Attached: Capture.png (415x43, 4K)

Stfu bitchboy

Attached: Netflix-Twitter-Memes-Japon-Estados_Unidos-La_Jungla_367474596_111992973_1024x576.jpg (1024x576, 40K)

Have you learned how to use Git yet?
github.com/komeiji-satori/Dress

I am employed as a developer for 13 years but I wrote only like 10 lines of code in the past month or so.

What kind of lifeless tool maintains and updates parsers for sepples vNext drafts?

Tough question really. To me, it's part of a much more general question which is: why should I use a dynamic language, not necessarily a lisp, when I can just write massive amounts of AOT compiled code and call it a day? There's no real answer to that. Lisps are harder to master but some people swear only by them, and there are good reasons for that. They are more concise and less restraining, so if you know what you are doing you can outperform code monkeys 10-to-1. But it's a more creative and personal process to write lisp programs. You essentially create embedded domain specific languages all the time. Lispers tend to be super idiosyncratic. It really comes down to whether this style of programming suits you. At the end of the day you can write any program either in blub langs or lisp langs and it'll work.

I don't read chink.

> if you know what you are doing you can outperform code monkeys 10-to-1
So how come there hasn't been a single relevant Lisp project out there for 30 years or so? What are these 10x lispers working on?

Hasklers, what does this evaluate to?
let xs = 10 : (xs >>= (\x -> [])) in length xs

except for
- LaTeX
- EcmaShit (the good bits anyway)
- All the stuff in Python/Ruby
- ...

Measure against dict.Keys.Where(...)

1

Good on you for trying, but no! It's bottom. Can you tell why?

Because lazy-by-default was a mistake.

Attached: 68747470733a2f2f7777772e69647269732d6c616e672e6f72672f6c6f676f2f6c6f676f2e706e67.png (487x225, 15K)

I've been using C++2a features on a personal project for a while now. Designated initializers configuring templates is comfy.

The big ones - operator and constexpr new - are not ready though.

Don't strictly more programs succeed when evaluated lazily than eagerly?

>Designated initializers configuring templates is comfy.
Elaborate. What do these two things have to do with each other?

no
are you retarded

Not if they leak space.

The difference was neglible, but Keys.Where() was ~6% faster.
var dict = new Dictionary();
var N = 1000000;

for (var i = 0; i < N; i++)
{
var s = i.ToString();
var r = s.Reverse().ToString();

dict.Add(s,r);

}

var rnd = new Random();
var timer = new Stopwatch();

timer.Restart();
for (var i = 0; i < 100; i++)
{
var x = rnd.Next(0, 999999);
var y = dict.Keys.Where(key => key.Contains(x.ToString())).ToList();
}

var t1 = timer.ElapsedMilliseconds;

timer.Restart();
for (var i = 0; i < 100; i++)
{
var x = rnd.Next(0, 999999);
var y = dict.Where(entry => entry.Key.Contains(x.ToString())).ToList();
}

var t2 = timer.ElapsedMilliseconds;

Console.WriteLine(t1);
Console.WriteLine(t2);
Console.ReadLine();


run one
t1: 10610 ms
t2: 11398 ms

run two
t1: 10793 ms
t2: 11342 ms

in function programming, everything is a function and thus lazy evaluation is the best suited.

>C# can't round to two significant digits
Pajeet language

Yes well it's what my colleague's module exposes to me and what I can work with
Thanks. Dunno why I got so much ridicule.