/dpt/ - Daily Programming Thread

Old thread Wanna chat? Join #dailyprog on rizon
dailyprog.org/chat/

Text editor poll: strawpoll.me/16604780

What are you working on?

Attached: phases of software development.jpg (600x632, 27K)

Other urls found in this thread:

youtu.be/CRDNPwXDVp0
zetcode.com/gui/gtk2/
rlgomes.github.io/work/prolog/2012/05/22/19.00-prolog-and-graphs.html
stackoverflow.com/questions/27264813/how-to-handle-a-path-in-prolog-graph-traversal
twitter.com/NSFWRedditImage

first for Nim

this thread is already ruined because op is faggot

RISC-V a cute

>Wanna chat? Join #dailyprog on rizon
why? there are less users than both on Jow Forumssicp or on the discord

>irc is a client-server architecture, not p2p.
IRC is federated and is not own by any company just like email isn't own and anyone can start their server

>it isn't more anonymous than discord
>we don't know what happen on these obscure irc mirrors/servers
the way protocol is working is preventing telemetry, unlike proprietary code that Discord is running

But how do you not feel awkward or bad about ignoring peoples contributions?

>discord
What has Jow Forums come to?

Attached: 1492515975449.jpg (1024x768, 97K)

Discord is for video game players.

Jow Forumssicp is pretty much dead despite having more (idle) users, and discord was never an option

>discord
Shut the fuck up, onions.

Attached: 1516011305305.png (1159x665, 231K)

>no anime op
Trash.

rate my code

Attached: cute squiggly line emoji.png (1920x1080, 551K)

>no anime op
Based.

there is all kind of communities on discord. everyone is welcome.

>communities on discord
All of them reeks of onions

>css """code"""
>anime paper show off
>discord
>spotify
>steam

brain tumor/10

no bully

dailyprog doesn't seem better.

>discord was never an option
why?

neck yourself, weeb trash

Any nice interfaces from a lisp language to ncurses?

I'm planning on making a "TODO" application where I can easily add and remove stuff (and color things according to their priority).
Right now juggling between CL and Racket

> classes named with inconsistent casing
Shift-del

>why?

Hello, right now I only know c and I want to start working on personal projects for my portfolio.
The thing is all I really know how to do is data structures and algorithms. I've made linked lists, trees, and other data structures from scratch. Everything I have made is console based.
Now that I want to create a tangible product with GUI and stuff, I have no Idea where to start. I've been looking at that chart that floats around on here for project ideas, but I have no idea on how to implement most things on it.
got any tips? Should I learn a new language or stick with c?

Makes me want to try using ncurses react components with clojurescript/reagent.

you could say the same about any irc server.

not really, no

>Now that I want to create a tangible product with GUI and stuff, I have no Idea where to start.
Learn C# with WPF/WinForms (the easiest way to make a GUI for Windows in few minutes really) or Java with JavaFX or anything that has wrappers for Qt

youtu.be/CRDNPwXDVp0
Watching this I'm thinking C++ is at its end. They're not moving fast enough. They're implementing complicated fake features to support normal C++ syntax within a constexpr context.

Stick to C, start using GTK
zetcode.com/gui/gtk2/

>GUI in C
You probably should learn another language. There's C compatible GUI libraries (and many OS api are C) but you'll likely have a better portfolio if you pick a GUI library based on popularity and learn whatever you need to produce a project with that GUI library.

I don't know what's popular right now. I imagine it matters what field you want to be in.

>Help with /prolog homework/ before I neck myself

"You need to define a program that works with graphs.

Suggest a representation of graphs such that every node has a unique name (a constant), and the neighbors are indicated.

Define a predicate that with this representation and without getting stuck in a loop, brings forth a way as a list of the names of the nodes in the order they are passed, when you have gone from node A to node B without passing a node more than once"

So whenever you walk pass a node you add its name to a list. Have no idea where to start or what to do
>pls help me youre my last hope

If you are open to suggestions, go into databases first -- specially relational. GUIs are tedious and the knowledge doesn't translate very well to other things.

whatever you do please, PLEASE don't make electron apps

I wish to be the video game boy.

Go to

People can use more than one board.

Make a clone of electron, but better.

But you will never be the one that wins

Is this bait? I really hope this is bait

Attached: 1509115870831.jpg (1137x1012, 250K)

Then go to too

Friendly reminder that nekofags are still mad

Attached: 1531017112693.jpg (1280x720, 347K)

I finally did it lads. CHIP-8 emulator on raspberry pi connected to 4x4 keypad, buzzer and 64x32 led screen. Currently playing snake, there is a beep sound when a 'fruit' is eaten

Code still needs quite a fair bit of cleanup, and maybe some configurability like snake colour

Attached: led_output.webm (1920x1080, 1.15M)

rlgomes.github.io/work/prolog/2012/05/22/19.00-prolog-and-graphs.html

stackoverflow.com/questions/27264813/how-to-handle-a-path-in-prolog-graph-traversal

I guess I'm behind with tech, because I never heard about electron till the last thread, looked it up, and holy shit every single program I've used in the last year or two that looks like it tries to look modern, but feel like shit to use was made with electron. Why do so many people use it?

What's with the mirrored shadow snake?

Last commit of the day, it's 5:40AM now so I'll go to sleep.

Attached: Screenshot from 2018-10-10 05-41-25.png (3840x2160, 807K)

just noticed it, I have no idea, I'll try and get it running again and see. There is some configuration for this thing to not break, like 'slowing down' the gpio pins, apparently some configuration is needed to reduce things like artifacts and flickering, so maybe I just need to play around a bit more

>it's another "get halfway there and get tired or lose interest" project
programming is shit

Attached: dif.png (1598x428, 218K)

C++ is a means to raise money for the C++ committee, nothing more.

Can't wait to try Packt Publishing with a trial subscription to become an epic programmer like my fellow bros.

what awful looking shit is this?

How do I find the beginning address of a pointer that's been increment by some unknown value?

the field of professional programming has somehow become saturated with web developers. they found it so hard to cope outside of the familiar aspects of web development that they decided to transplant the tumor (html, css, javascript) to desktop applications.

You can't. You have to know the original pointer or at least the increment.

It's D's gtk binding. What makes it awful?

unless you know what pattern of data in memory signifies the type of structure you're looking for, you can't.

6 levels of indentation is a start

so it's a interface/GUI for D programs?

It's not actually bad. You basically scope temporary imports into a closure. The imports or the widgets are not useful in later portion of the code.
Of course it doesn't work always, which is why I didn't wrap the last two widgets into closures if you look closely. Because the widgets depend on each other.

Yes. It's a Gtk Wrapper.

are programmable shaders microkernels compiled for gpu execution that make use of rendering specific hardware functions?
or are opencl microkernels an abstraction over programmable shaders?

i'm scared that if i get a job programming, then i'll be confronted with a codebase that uses 1 or 2 spaces per indent. i can't read that, it's instant dyslexia. what the fuck do you do in that situation?

I'm working on a video game

dat sum gay shit

To elaborate, I'm writing
void main() {
import std.stdio : writeln;

writeln(() {
import std.file : getcwd;
import std.path : basename;

return basename(getcwd());
}());
// instead of
import std.file : getcwd;
import std.path : basename;

writeln(basename(getcwd()));
}

both are abstractions over varied hardware. some hardware is just shader cores, other things are specifically there to speed up gpgpu.

Haven't made one since I was 10 years old. I'm having a lot of fun. Might be a manchild at heart.

Okay guys, I have three possible options:

-finish a cpu that we started to design last semester in vhdl, add peripherals (ram, video, input), build a assembler and get it working like a (((real))) computer
- programm a compiler and OS for x86
- programm a compiler and OS for armv6 (which is easier, also rpi1) and build a robot with it

Which one is it?

Attached: anon.jpg (750x1000, 35K)

Fucking why though?

2

1. If the closure is long and complex you don't pollute your external function stack with useless imports and temporary variables
2. Modular and easy to refactor.
3. Did I mention that it keeps your stack clean?

Interesting, thanks.

>when you're struggling to write something a legion of faggot javascript ninjas have ostensibly managed just fine because they all show theirs off on their blogs

seething

>kirino didn't win because incest is disgusting and it would've be frowned upon
feels great

Kirino did win though, the publishers just made the ending like this because muh social norms. But even if they didn't stay together she still won and neko lost.

I'm working with guile, it has ncurses bindings and a way to interactively work with an ncurses program you're doing, it's god tier.
Trust me, you can either do CL-CROATOAN, which has a more lispy interface, or Guile's ncurses bindings, which are named like the original functions, and have more freedom I guess. It's up to you really.
Also, I'd rather guile because of the fact that it'll be more scripty and hence more suitable for this TODO app.
Also, nice idea, I may implement that too.

Reminder that HTML+CSS is Turing complete.
Therefore it can be legitimate to call yourself a HTML programmer.

>bhop script

um ruri did win because she's my gf now. kyousuke was a beta anyway

I'm so good at programming that it hurts.

Attached: 1437497521042.jpg (1280x720, 60K)

I'm so good at programming that I don't even program

same

Holy shit. A lisp interface to C.
Exactly what I needed.
Thank you!!

No problem user, have fun.

/prolog code/

partstring(L, S):-
append(_,S,Lp),
append(Lp,_,L).

This does what i want it to but terminates with an error instead of just with "false". How to fix?

>Holy shit. A lisp interface to C.
>implying that is impressive

>learned a lot to get a job in programming eventually
>manage to get a spot as apprentice, get really nervous as there are guy there with year long experience
>they still do some dumb shit from time to time or ask for basic stuff
Is this normal?

Have you thought about adjunctions today, /dpt/?
Σ : (A → *) → *
K : * → (A → *)
Π : (A → *) → *

Σ ⊣ K ⊣ Π


A × - : * → *
A × - = Σ ∘ K
A → - : * → *
A → - = Π ∘ K

Σ ⊣ K ⊣ Π
Σ ∘ K ⊣ Π ∘ K
A × - ⊣ A → -


◇ : (A → *) → (A → *)
◇ = K ∘ Σ
□ : (A → *) → (A → *)
□ = K ∘ Π

Σ ⊣ K ⊣ Π
K ∘ Σ ⊣ K ∘ Π
◇ ⊣ □

most people are big dummies

Attached: ekmett GF is a moand.png (410x268, 221K)

What resources would you recommend, if any, to someone trying to study for the next year in preparation for uni?

I'm taking my last class for my associates in CS right now, but because I dropped out a couple years ago I honestly don't remember how to code at all. I know about code academy and a buddy gave me some programming books, but I was wondering if you guys had any other resources I could use.

wrong thread lol
but I hope that we just leave the UN, would be based

i'd recommend running for the hills

What happenede here?
(displayln (let () (define a b) (define b a) a))
=> #


Also, what is the value of (values)

all people are dummies

we all forget shit, don't pay attention, are lazy and often plain stupid
we're just apes with a little bit bigger brains

>-finish a cpu that we started to design last semester in vhdl, add peripherals (ram, video, input), build a assembler and get it working like a (((real))) computer
Hard
>- programm a compiler and OS for x86
Boring, tedious work, because it's been done so many times
>- programm a compiler and OS for armv6 (which is easier, also rpi1) and build a robot with it
Least bad choice. Take this

I-I'm not a dummy

>armv6
RISC-V, my dude
Only problem is chips are still expensive, but you can run everything in qemu

Yes you are.

Yes. You. Aaaree.

>but you can run everything in qemu
But that's not fun.
I'd have my raspberry pi b1 which is collecting dust anyways. My own OS would not as much bloat as raspbian (or linux in general) is/has and then it should have more than enough power