/dpt/ - Daily Programming Thread

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

Attached: get.gif (369x480, 452K)

Other urls found in this thread:

sfml-dev.org/download/csfml/
github.com/lilsnooker/visualsr/blob/master/main.c
challenge.flinks.io/
youtube.com/watch?v=4_ODvZ01CjU
docs.oracle.com/javase/tutorial/uiswing/concurrency/
docs.oracle.com/javase/tutorial/uiswing/components/progress.html
youtu.be/gqTihL-7FbA
twitter.com/SFWRedditGifs

>What are you working on, Jow Forums?
Got my SDL2 program to compile and run on GNU/Linux as well as Windows. I wasn't expecting it to work.

Attached: scrot.png (1920x1080, 773K)

Lisp is the most powerful programming language.

redpill me on SDL2. I want to make a roguelike but the windows terminal is trash

It's good stuff

if you want to use C, it's the best there is.
If you want to use C++, use GLFW as a starting point, or if you want a more "complete" solution, SFML

does sfml work for C?

Yes, but why would you use something fundamentally build around C++ with C?

I dont know. Ive wanted to switch to c++, but its scary. I know I can kind of write C in c++, but all the 728274738 new features makes it daunting

Working on the software sound mixer in my operating system. It's mixing sounds from many apps okay but there are little skips in the audio all the time which is obviously not good enough :)

well theres sfml-dev.org/download/csfml/
anyway

Wow, very neat, user!

Any tutorials for SDL2 in ordinary C?

Working on my game

Attached: 1550845282650.webm (734x528, 346K)

Thanks user! How's your project going?

Not off the top of my head but feel free to clone these if it helps. github.com/lilsnooker/visualsr/blob/master/main.c

Broke my main hand so it's slow. I can take my time which is nice, I just want my hand back, though.

broke your jerk off hand

most of the features added since C++11 are just easier ways of doing the same thing anyway
if you learn c++11 you learn everything since in an hour or so

How do I use multiple pages of virtual memory in C/C++?

Like say I have a 32-bit system and 500MB of overhead. How do I allocate multiple 3.5GB pages, then programmatically change which one I read? Is this best done by writing/reading filestreams of serialized data into a reserved memory segment?

Is there a Linux/Windows syscall I can preform to do this without the peformance hit of read/write huge 3.5GB filestreams?

Both memmap and virtualalloc seem to discard pages when I allocate a new one.

Attached: card.jpg (488x488, 38K)

If you made a startup, what's your big buxx idea?

Attached: wizard.jpg (462x465, 178K)

thinking of an idea for a project as besides some projects I did in University I have no portfolio.

but if im gonna learn c++ ill go for c++20 right? the most modern

IoT dildos

>the most modern
It's cool you keep updated with the most modern standards but chances are that if you get a job programming C++, the most recent one available for you to work with will probably be C++11

I know JS pretty well and I'm about to learn a framework. I feel like I should know a more traditional programming language though, just for good reference and to expand my mind a bit.

What would you guys recommend from this list?

>Java
>C++
>Ruby
>C#
>Objective-C

you don't really have to be original, as long as you grab a slice of a market
competition is healthy

>getting a dev job
that will never happen so its not a concern

probably C#

>I know JS pretty well
what's the output of
('ba' + NaN + 'a').toLowerCase()

Coca-Cola!

correct

C# then C. do yourself a favor and forget that Objective-C exists.

very epic, friend.

a challenge for any bored anons
challenge.flinks.io/

Nobody here knows?

>crab in a bucket

>Both memmap and virtualalloc seem to discard pages when I allocate a new one.
how are you using those functions?

I would expect 3.5GB to consist of many, many pages.

If you want your program to keep more than 3.5GB in memory, this is what 64-bit architectures are for.

Services as a Device, or SaaD.
Basically, a 15cm on a side black cube that you plug into a wall socket and your home network. It then lets you have a externally accessible nextCloud instance there without having to know jack about setting one up. Instead just load our mobile phone app from Saad.com then we'll do all the setup for you.

I'll post the usage in a few hours. On my phone about to drive to Ann Arbor. Right now the software requests an allocation of a few billion bytes at startup, I don't remember the flags it uses. I do remember it segfaulting when I tried to make subsequent calls to ask for more, seperate pages. Like, trying to access the original chunk caused segfaults.

Fair callout.

I don't want it to keep >3.5GB in RAM at the same time. Plenty of DOS software layered groups of pages to access more than 65k of data. I want to have 3.5GB chunks that I can swap with each other, but not use more than one at a time. Think like how ASCII codepages work.

I know I can implement that with filestreams. I was just hoping for a faster, less hacky solution.

bonus: listening device for advertising profiling

So I've been trying to make a Discord bot, but it keeps on going offline everytime I turn off my computer; I constantly need to type "node ." in the cmd as I turn on my computer. I'm asking if anyone knows what's happening or how I turn it online permanently. When I solve it, I'll delete this post if you want.

Attached: bandicam 2019-07-28 13-13-20-209.jpg (792x324, 38K)

Try sealing your laptop shut with gorilla glue so the program doesn't fall out.

research startup scripts

Would it help if you use a shared memory buffer between multiple processes?

Did you use your computer as the node server? If yes then each time you turn off your computer the server is dead, dead server means bot is dead. If you want it to online permanently, either you keeps your computer on or host your bot to a cloud server

What I'm thinking is if you want multiple address spaces (if I understand you) then you can use multiple processes, one process per address space.

not the op, but my jerk off hand is my off hand, gotta use my main hand for the mouse

Attached: 1555952925086.jpg (1275x966, 116K)

Isn't GLFW also a C library? Why recommend it for C++ usage but not for C usage?

based

He's a brainlet. GLFW is great for C or C++ and it's ported to many other languages as well for bindings and use. It does one job and it does it well. It's how libraries should be.

JAI update! Constructors BTFO!
youtube.com/watch?v=4_ODvZ01CjU

Attached: JAI.png (1276x741, 235K)

You don't need constructors or destructors if you have generics and references.

disgusting

I'm curious what lisp zealots think of his macros.

they are initializers not constructors
make-instance vs initialize-instance in CLOS MOP

i am an official lisp shitposter
please provide an example of his macros

Do you have a link where he talks about them?

who is that

jeremy

Looking for anons with gaydev artist contacts, or just suggestions for a good 3d/2d artist who can make lolis that don't suck (including "private" parts, in many variations and degrees of damage).
Paying 8-14k€ per rigged model in case of 3d.

this is programming thread
no one here is good at art
check /3/ or /agdg/

>entire video is him talking but not showing any code.

Good thing i didn't ask about you, but your contacts or recommendations.
Those boards are amateurs, i need someone who makes a living doing art. There's plenty of loli rape/breeding sims with shitty art.

Why is C++ so prevelant in competitive programming?

retard

Because compiled C++ is usually as fast as C but with better abstractions. In competitions where real execution speed is measured, you have to go with something fast, and C++ has the best balance.

I guess what I'm asking is why do other popular C-like languages not seem to compete with it? Like Rust, D, etc.. I've even heard of Haskell being used I think

I'd imagine it's because those languages have such massive toolsets compared to langs like C or Rust.

I imagine for Rust the added strictness just gets in the way. I have no idea about D.
Competitive programming isn't about good software engineering, it's about quickly coming up with an algorithm, implementing it, and optimizing it. C++ is good for this because all of the containers and algorithms in the standard library have guaranteed complexity requirements. C++ also lets you easily drop down into the C level and optimize your loops for vectorization.
Haskell can be useful for some problems because it's laziness and trivial parallelism can be used to implement some lazy algorithms much easier than in a strict language. It also tends to be compact, so you can write a solution quicker if you know what you are doing.

Attached: C programmer in its natural habitat.jpg (1198x700, 172K)

Noob here. If I want to add certain methods that change a Java GUI but instead of wanting them to be triggered by some object's action listener I want them to actually run continuously in a loop (I assume adding them to the EDT) how do I achieve this? In the generated code if I try to add said methods in "run{}" inside main, they are just triggered once and then the loop stops and waits for some GUI action.

I shill for Rust but secretly use Ada.

(?) c a b = if c then a else b

even 2 ? 4 $ 3 => 4
null [] ? (1+) : (2*) => (1+)

I shill for Lisp but secretly use Lisp.

I shill for Idris but secretly use Haskell

docs.oracle.com/javase/tutorial/uiswing/concurrency/

docs.oracle.com/javase/tutorial/uiswing/components/progress.html

SwingWorker class

I shill for Rust but secretly use Go. True story.

how does the second example work?

I shill for satania, but I secretly used applel

Is deep learning a meme? I remember reading that Minsky called neural nets a meme

>Minsky
Neural nets have been around since the 60s, only recently have they stopped being a meme.

fuck rust trannies

not really, it's just applied mathematics

They're a meme in the sense that they can't be used for anything more significant than playing games or generating pictures.

If your interests lie in serious matters, avoid them.

So a business for making cloud storage devices? Seems nice

The "mathematics" of DL is extremely trivial though. Most of the complications come from the implementation side of things e.g. programming.

jeremy who

It's only the cloud when it's someone else's hardware. Maybe it should be a bright blue cube, to represent a bright clear sunny day, instead of a nasty dreary cloudy day.

Usually do coding videos, but this evening I went through a list of 160 viva questions I put together some time ago:

youtu.be/gqTihL-7FbA

Attached: thesis.jpg (744x389, 57K)

nice list of questions

>just post irrelevant shit

Can anyone pill me on Elixir? Is it any good? or should I just go with Go

neither

What kind of damage?
Don't hurt the lolis.

just jeremy

They're a meme insofar as they will not lead to anything resembling 'true' intelligence. They're super useful for pattern recognition though, but the applications of this aren't as wide as people want you think.