/dpt/ - Daily Programming Thread

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

Attached: Cliff.png (640x512, 11K)

Other urls found in this thread:

bitbucket.org/chromiumembedded/cef/src/master/
twitter.com/AnonBabble

Rust!

Attached: 93C95D84-9EBE-4D57-8C2B-575D3F3823A2.png (1200x800, 47K)

uninstall c
install zig

Nothing.
Give me your ideas Jow Forums

Get a job you dumb NEET

space engine, but everything is ASCII

>try to get a job, but you don't want to smoke ayahuasca, go to impeach blumpf rallies, or micro dose LSD while you're trying to work

Sorry, not a culture fit

I want to hack together a compiler simple enough to make in C or Assembly for a language that is extremely extensible. Kind of like a Lisp but compiled and fast and better syntax. Anything I can look to for inspiration?

Anonee~ You finished with your JavaScript studies yet? I want to play with you...

Attached: 1565819214779.jpg (1200x1200, 221K)

>What are vacations

Attached: aoba??.jpg (748x720, 60K)

What are vacations?

an alien concept to your average wagie.
if he ceases to work for longer than 12 hours, his body temperature quickly rises and he goes into a frenzy.

are you telling me that user is given a break from work, and decides to program in that break? is he some kind of nerd?

interpreted languages are garbage, pythonfags get the rope asap

haskell fags blown the fuck out

require 'prime'

Prime.each do |prime|
puts prime
end


import Control.Monad

primes = filterPrime [2..]
where filterPrime (p:xs) =
p : filterPrime [x | x

import Data.Number.Primes
main = mapM_ print primes

is c# based?

I love these "I semi-know one lang, and can barely compile copied code from the other, but let me go ahead and do shitty benchmarks anyway" posts

install F#

it's not great, but the alternative is getting good enough at Haskell to thoroughly criticize it. This is like letting a flame burn your entire body to ash because, even though you instantly realized it burned painfully, you didn't have a chemist's understanding of the exact processes involved.

it's especially funny when they post assembly output and pretend code size correlates with performance on modern microarchitectures

ah yes, the cherry of "I've been called out on my awful actions, so let me try to rationalize it with a shitty metaphor".
truly incredible.

rewrite the ruby code to use the same extremely naive prime generation

>can't say the food tastes like shit unless you are a professional chef

what advantage(s) does it have over c#?

>ha ha surely only a single /dpt/ poster could have come to dislike Haskell
we are legion tho

>order a pizza from a professional restaurant
>it's delicious
>make your own spaghetti (badly)
>it's not delicious
>pizza > spaghetti

so I know nothing about programming and I want to make an user interface for libtorrent, I want it to be in C++ and I want to do it with Visual studio. How do I start?

download libtorrent?

programming for work

download visual studio

every /dpt/ poster can't into comparing benchmarks though

can use most everything C# can, but you have an actual FPL with clean syntax

benchpress >benchmark

>I want it to be in C++
visual studio has drag-and-drop tools to make a UI
just put the various elements you want on the form, double click on them and it puts you into the code for that element

my dick > ur mom

done and done,
and... how do I start, what should I be learning in order to get me started? I don't want to learn hello world shit and variables and how to create classes and shit, I always end up dropping every languiage I try to learn because that's uninteresting.

programming is boring, TV hacking isn't real

this is interesting, will look it up on youtube and see if there's a tutorial for it

I know but the end result is what I want, I want a torrent client designed by me. I think most torrent clients are gabage

I'm trying to learn QT. QTdesigner looks like a neat tool. Every time I try to alter something I've made in QTdesigner in QTcreator, however, it ends up throwing a massive fucking fit at me. The error messages are useless because Google never provides anything close to my problem, and I don't know enough to actually interpret them myself. This is my fault, I know, I'm retarded.

The official documentation sucks, however. Can anyone provide me a better guide on QT than the official stuff?

>can use most everything C# can
>most
>no proper code generation and limited templates
ok bruv
>but you have an actual FPL
because c# obviously cannot do that
>with clean syntax
highly debatable

>because c# obviously cannot do that
LINQ is siht

How is a big data streaming platform like Kinesis actually implemented? I mean I know it'll be a company secret exactly how it works but presumably there are general techniques for that sort of thing.

LMAO Just get a waifu like everyone else instead of trying to design your own qt3.14
don't reinvent the wheel user

none, F# is like sitting between two chairs
makes it easier to rape your ass

what are the best resources to learn to make my own 2D and 3D editor hybrid?

Attached: pepe.jpg (1387x702, 85K)

based and red pilled

Attached: 9781632369291.jpg (487x700, 165K)

cringe and bluepilled

>I don't want to learn the basics of the language and work up from that because that's uninteresting but i still want to create a big application
what? how old are you? how do you expect to get something done without learning the basics of it and experimenting first? why are you trying to create something big right off the bat with 0 knowledge? why not create something small first, learn some more through that experience and then move on to something bigger and bigger? what the fuck are you even thinking? i have so many questions
programming is not very interesting and creating a bigger app/system while keeping the code clean and crap logic free is a hassle regardless of your skill level

Attached: 1499307473094.png (480x360, 23K)

reddit
you dumb frogposter

You might not like it, but this is what top readability looks like.
pub fn longest_repeating(n: i64) -> i64 {
let mut n = n.abs();
let mut c = (-1, -1);
let mut m = (-1, -1);

while n > 0 {
let i = n % 10;
if c.0 == i {
c.1 += 1;
} else {
c = (i, 1);
}
if c.0 == m.0 || m.1 < c.1 || (m.1 == c.1 && c.0 < m.0) {
m = c
}
n /= 10;
}

m.0
}

C++ compiler errors aren't supposed to be google-able. sepples learn what errors mean through trial and error. The second you cry for help on the internet you have lost.
Use something else if you don't like it.

Attached: 1534354331907.jpg (700x688, 114K)

absolutely based. it's hard to see how he'll ever recover from this.
try asking the amateur game dev place on /vg/

Faggot.

what is m supposed to be?

a tuple containing the longest repeating digit in a number and its counter, resolving for ties with the smallest digit (as explained in the original post)

I'm restarting my MLASM project and making it cleaner. Instead of specifying infix the compiler will assume the function is infix if it takes two args and parens are omitted. For example 1 + 3 is the same as +(1, 3). How should I go about specifying precedence though?
+ : int a, int b -> int =
$ add {a}, {b}
a

So the niches it's popular in are cryptocurrency, WASM, and firefox, right?

>trying to webdev in rust
will always be the most hilarious thing in that dumb ass community

needs better name like minmax_digits

Does this look good?
+ : int a, int b -> int : prec 5 =
$ add {a}, {b}
a

just use whitespace lmao
5+3 * 6
(5+3) * 6

readability is improved with aesthetic code, not with verbose variable names

Oh my, was there a language that actually did this?

What's wrong about it? Rust's actix is one of the, if not the fastest web framework out there.

rust is the literal antithesis to webdev.

rust is the literal cure for cancer?
[x] doubt

>C shart
No `const` parameters
SDK has opt-out telemetry
No `Option` for reference types
`MSTest` not portable
Can't index on `foreach` loops
Can't access a subarray in a multidimentional array with a given index

foreach (var val in arr) val += 2; // compile fails
for (int i = 0; i < arr.Length; arr[i] = arr[i++] + 2) { } // works

foreach(var i in evens){} // error
int i = 22; // wont work because i is now declared at the top somehow
for(int i = 0; i < 10; ++i){} // works somehow?
---
{
int x = 4;
}
int x = 3; // Considered Harmful
---
public class Test {
public static void Main()
{
var x = new int();

if (x is int i) // i is now in the scope
{
// do things
}
// hundreds of lines later
for(int i = 0; i < 10; Console.WriteLine(i++)){} // uh oh
}
}
---
var a = String.Format("A {445}", "B");// 0 warnings, 0 errors, runtime crash

to the typical way of webdev* i guess is better phrasing
If Elm were fullstack it'd be the GOAT web lang

Elaborate please? It has a seamless WASM backend too.

iteration and productiveness is rusts biggest con
>inb4 rust shills from the woodwork proclaiming how productive they are

mate trust the dubs

Ah I see what you mean now. However if you want to be productive you can just use clone() and Arc everywhere you know...
Then again most webdevs aren't smart enough to handle it. Rust is still offering the fastest modern backend framework though, and it's more practical than C++ in that scenario.

Being efficient is where the timesink comes from.

also no HKTs

So today my boss i was trying to change my http apps to https but when i tried to do some api calls i was getting some certificate error. That shit only stopped giving me error when i tried to access the back end ip trough my browser and trying to perform the api call again. Not only that but some other shit like window.open() doesn't fucking work anymore.

so much shit happened i dont even know what to ask to understand what is going on.

performance in webdev isn't actually the top importance unless you're FAANG. And I think the reason why Rust hasn't exploded in webdev is because the reality of the language is a massive deterrent. And the effort to sink into it to become proficient to minimize wasted time just isn't worth it for most people/companies.
They'd rather take 2-3rd best performance but top-tier iteration speeds. That's why I also think the successor to Rust will realize the BC needs to be decoupled and made optional.

>Arc
why not call it Unicorn ?
>a single web search will show you what it means
>just remember this random name
>everything has names in programming, this isn't a new burden
>readability? you think people should be able to read code when they don't even know the language?
>this isn't ideal Rust anyway. don't like it? good! you shouldn't be using it!
>there is literally no complaint that you can raise against the noble and useful Unicorn that couldn't be just as validly raised against, uh, I dunno, ARC, lol.

Atomic
Reference
Counted

please proofread your abhorrent posts you dumb mobile poster.

>Arc, the apparent path described above and below the horizon by a celestial body (such as the sun).

kek. Are you high or drunk?

based retard

I get that, but Rust has a really fluid node JS interop with Neon too. I'm interested in trying it out for my next pet project.

the difference here is that you're both cooking and critiquing the food

Based. Stop using meme languages. This includes C in the year of lord 2019. (except Haskal)

Attached: 1538644063084.png (821x1011, 176K)

Rust or bust

>fast, safe, easy concurrency for backend
>primary WASM target for frontend
????

I get it.
You all just hate unicorns.
It's a real tragedy for women in programming that Rust didn't adopt the Unicorn nomenclature for refcounted objects.
gj never getting laid because you scared all the grrls away, incels.

That should be Assembly instead of .NET if you were being honest.

you are a botscript

thanks doc

Attached: kh.png (1280x719, 717K)

zetcode qt5
I personally hate the designer along with the whole IDE

Attached: shen.png (821x1080, 3.39M)

are we eternally doomed to feel dissapointed with whatever crap we come up when architecturing user interfaces?

I am using Dear Imgui and my code quickly become shit when trying to make this fucking thing work

just use cef

what the fuck does this have anything to do with canadian expeditionary force

bitbucket.org/chromiumembedded/cef/src/master/