/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1552431198843.jpg (778x720, 155K)

Other urls found in this thread:

common-lisp.net/project/mcclim/
ceramic.github.io/
medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263
pastebin.com/bX8rp59g
networkx.github.io/documentation/networkx-1.10/tutorial/tutorial.html
github.com/sharpsuite/initenv
github.com/sharpsuite/sharpinit
oreilly.com/library/view/concurrency-in-net/9781617292996/
shop.oreilly.com/product/0636920030171.do
twitter.com/SFWRedditVideos

leetcode

what's the best GUI toolkit for Common Lisp? Should I just fall for the Electron meme?

Attached: 1535183122251.jpg (1283x1468, 138K)

Why would anyone use Java on Android when C++ exists?

Hmm, maybe I should visit user today and see how his JavaScript project goes!

Attached: 4d24ff4e6797a37ed79c564579e294c4.jpg (564x957, 56K)

>content-length
length represented in plain text
>transfer-encoding chunked
length represented in hexadecimals in plain text
>content-md5
checksum represented in base64

Pretty inconsistent, for no good reason

What's the best beginner textbook for C#

dart > js

What's the worst advanced textbook for C++?

Use Electron

Attached: A8D87A05-A975-48FF-AC11-AC7665DE31BB.jpg (1178x1204, 992K)

will people laugh at me if i make a pull request? :(

im already laughing at you

only if you forget your anime profile pic

No, they probably expect contributions from more junior people. They also might be worried that you'll take whatever criticism they have for your contribution the wrong way.

In what way?

o-ok, thanks
i never changed my profile picture from default :(
>they probably expect contributions from more junior people
how do you know?
>They also might be worried that you'll take whatever criticism they have for your contribution the wrong way.
i will cry and never rebase my fork

nice digits, what does it matter you can always abandon the account

>no anime avi
pull request rejected

>avi
pull request rejected

wow rude this is directly against the spirit of the CoC I just submitted

no, quite the opposite actually.
people who open issues but refuse to work on them get laughed at. the maintainer will likely be thrilled to get a pr even if it has some issues. dont worry if you need to revise it a couple of times. the maintainer knows way more about the software than you do, so its only natural.
if you're feeling nervous, open an issue and say you have a pr that you think would help.

>people who open issues but refuse to work on them get laughed at.
You actually believe that?

It’s also the best

Attached: 00FB3507-6C78-4BA5-B4F7-8FA34892DD99.jpg (1224x1516, 359K)

yes, I know several maintainers of smallish open source projects and they bully those people hard

its my personal account attached to my name. dont want to abandon it.
i dont want people to know im a weeb!
thanks user, i did it. my first pull request. hope i didnt fuck anything up

Why? Are there really no better options? Year of McClim when?

Why would anyone use C++ on Android when Kotlin exists?

cringe

It sucks, it's not fulfilling, and it's probably worse than not writing code in the first place.

I'm writing a folder synchronization tool, mostly for my needs. The point is to have one cross platform tool for all needs, e.g. rpi holds a copy of the entire archive, PC contributes new files from "hot" folders to local archive, also synchronizes local archive with remote, phone just contributes new files etc. Basically, you write a configuration file for each device and then all your data is managed for you, on your own infrastructure.

Well, it transfers files alright, but there is a lot to be desired.

->Written in Ruby so far, which feels dead right there. No Idea what I really want, I've rewritten barebones in Java, C++, haxe. Java has lots of stuff built-in, but I don't know if I want to be on the JVM.

->No way to delete files across all clients, haven't thought of a way to propagate deletions.

->How do you even detect FS events in the first place? Writing OS-specific listeners is a headache, and you have to deal with limits. Cross-platform libraries are lacking. Honestly, just polling millions of files doesn't work so bad, but it's not elegant and I have battery life concerns.

->I like the simplicity of a single tool, but it looks like I will need a client/server arch.

->SSH/SFTPS handles encryption and authentication on the wire for me. Yes, the files are all flat on the filesystem. Yes it's bad. What do I even do? Store the folder structure on a database and keep the files encrypted with random names? But I like to just browse my archive on my PC.

->How do I even register users/devices?

->At some point I realized my transfer speeds are lower than expected. I removed all dependencies and synchronization logic, and just used rsync. Even killed my nice loggers. The tool is just a layer of config file parsing/validation on top of rsync now. But rsync isn't everywhere, I do my phone backups from Termux.

I'm lazy and bad.

Attached: 1300207413244.png (452x452, 139K)

Lisp support for GUI is just bad

Forgot to mention, my "trash can" implementation sucks and causes everything inside to be perpetually backed up in the archive in annoying places.

im pretty new to programming and stuff, im using python rn and idk how to trun my program into a exe and how do i display images on the program

First of all, you need .NET in your life.
Second, just use dropbox lmao you nerd.

Python doesnt make exes

Unironically just make a WebUI

common-lisp.net/project/mcclim/

What do you want that goes beyond what something like rclone offers?

ceramic.github.io/

medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263

But just so we're clear here. You can, and most of the time will, run the .py files as they are, at least while developing.

What are you on about

any expert in emaclisp?

i am working at NFA to DFA converter, i want to write it with python library for making graphs, but i fucked up something, for example here. This function is taking DiGraph, taking all incomming edges, and looking for edge that is not e-closure (means it changing state on char input, it has label: char), then it takes target of this directed edge (target: node), and is looking for ancestors of this node, then i will feed subgraph of those ancestors to same function, etc...

But there is error: "The node {3 : 'char':'b'}} is not in graph" I am perplexed, because i can draw this graph i inputed into function, and there is node: 3 with incoming edge of label: "'char':'b'".

def nfaToDfa(graph, node, ancestors):
inE= list()
inE2 = graph.in_edges(graph.nodes())
inE=inE2
print(inE)
for eS in inE:
if "char" in graph[eS[0]][eS[1]]:
source, target = eS
print(target)
B = nx.dag.ancestors(graph, graph[target])
return B

DG.add_edges_from([(8,6),(8,9),(6,1), (6,4),(1,2, {'char': 'a'}),(2,3,{'char': 'b'}),(3,7)
,(4,5,{'char':'c'}),(5,7),(7,6),(7,9)])
DG.nodes[8]["starting"]=True
DG.nodes[9]["accepting"]=True
plt.subplot(111)

d = nx.dag.ancestors(DG, DG.nodes[8]["starting"])
H=DG.subgraph(d)
nfaToDfa(H, H.nodes[8], d)


Here is entire code
pastebin.com/bX8rp59g
still pretty rough around the edges because i am learning this library
:

here is this damned library

networkx.github.io/documentation/networkx-1.10/tutorial/tutorial.html

How is the jobhunt going?

Attached: 1541215404032.png (1897x5504, 3.99M)

I'm writing a tool to make highly configurable, flexible applications with browser-based frontends; where chosen classes and their instances can be viewed and manipulated in browser, and where instances ( as well as basic datatypes ) can be used to instantiate classes or create "partial classes"; through web forms.
In principle you can make the software exactly as granular and configurable as you're willing to "strongly type" you classes and their methods so that the software can keep track of what's capable of clicking into what else.
It's all in Python, which has no inherent strong typing, so it's all pretty much bolted on to the existing type system.
I really dislike OOP and have been growing very tired of Python's shoddy support for functional programming and metaprogramming; but I the thing seems to be coming together.
I'm 50% proud of myself and 50% disgusted.

Attached: 1558679379912.jpg (720x960, 221K)

>->No way to delete files across all clients, haven't thought of a way to propagate deletions.
How instantaneous does the synchronization need to be? Can't you just poll your server periodically and have it give you a diff of a recursive ls taken ever 10 minutes or so?

i don't think you understand what the term "strong typing" means

python doesn't have types

C# init

Attached: sharpinit-login-2.webm (720x442, 2.47M)

>First of all, you need .NET in your life.
You think so?
>Second, just use dropbox lmao you nerd.
I seriously consider it, it would solve some of the issues, especially speed. But I'd have to pay for extra storage, and, in the end, owing my infrastructure feels good.

Looks promising, though I can send and receive folders already. What I miss is the sauce to make the experience good, such as:
->Propagating deletions and updates across devices with bidirectional access (there will be conflicts)
->Client authentication
->Cross-platform

Not a lot, this could work.

>tfw your question gets locked as off-topic
God damnit it.

Go on?

bing deserves to be bullied and shot

post it here

Got a thing lined up. I'll call back on Monday, I think.

cool

why

I deleted it in shame.
Gonna quit my job come Monday too, I'm not cut out for this.

> Gonna quit
You're just making the curiosity stronger. What's the problem?

post greentext

Don't quit your job because you're not a prodigy. Pajeet would NEVER quit a tech job due to incompetence.

its ok to have anxiety sometimes user. we all do, to one degree or another.

ty user

I want to have a whole suite of userland utilities written in C#
it's a cool, useful language with memory safety, and 70% of all security vulnerabilities in memory unsafe languages stem from memory safety bugs
so if you switch to a memory safe language you automatically cut down on 70% of all vulns
the first thing to write was an init imo, once sharpinit is satisfactory I'll probably write a POSIX compliant shell and some other generic utilities, then I'll work on (in no particular order) udevd, dbus stuff, tty handler, package manager (maybe I could adapt nuget)
maybe even graphical stuff in the future
it's also not limited to being an init, I'm using it as an unprivileged service manager on my server, replacing per-user systemd instances
and since it's systemd unit file compatible with a number of key properties already implemented, it's pretty much a drop-in replacement

i don't get your webm. is it a VM with C# tools?

are you really a roach or is it a meme?

so basically I have a script that sets up a Linux + .NET Core + busybox environment (and nothing else)
and I'm running my C# init daemon inside that environment
github.com/sharpsuite/initenv
github.com/sharpsuite/sharpinit

I really am a roach

I'm not actually quitting, I'm just a bit frustrated because I was handed a project that's above my pay-grade and it's hard to find the resources I need to even get started. I tried to ask the SE stack overflow guys for recommendations but they told me to fuck off because apparently picking the right tool for the job isn't an important aspect of software engineering.
The TL;DR is that I need to make a .NET project that has relatively complex threading requirements (threads can spontaneously explode, lots of queuing and events passing between threads), and there's basically no way I'll be able to make something robust enough on my own.
So I was looking for advice on which libraries or .NET built-ins to consider from someone who had created something similar (it can't be too uncommon...) but I guess I'll just have to read a dozen books on the subject because fuck having free time.

Literally just found it on Google. You probably found it yourself already but incase you haven't:
oreilly.com/library/view/concurrency-in-net/9781617292996/

It does though, it just has dynamic typing

This Big Data meme is stupid.

>data over 100TB
>use MPI codes and run tremendously faster than spark/hadoop
>data less than 100TB
>just use oracle or msql and again, run ftremendously faster than spark/hadoop poop

Why do these """big data""" tools exist? They're either not needed or perform hilariously bad.

Attached: absolutelydisgusting.jpg (600x450, 78K)

"duck" typing
Basically 'types' are consider synonymous with 'has attributes x, y, z' in python.

How hard would it be to make a C REPL?
I was thinking of doing it in Lisp, and basically keeping the code given to the compiler in a stream, and I can thus compile that code everytime and run it in every eval.
My problems would be linking and errors though.

This would legit take me months to finish and understand completely though.
I basically need this, but turned into a library that a brainlet like myself can use.

Terry did it. Meaning it's either very easy, because Terry had schizophrenia while making his Holy C JIT compiler, or very hard, because Terry was the smartest programmer who ever lived.

that doesn't mean it has no types
a language with no types cant distinguish a string from an int from a float unless you tell it to

It has duck typing, but it makes type checks at runtime, so it's still dynamically (or in newer versions gradually) typed.

Guess I'll go with Electron or JavaFX.

That's the greatest question in programming.
Is this niggerlicious, or is it divine intellect?
We may never know.

O'Reilly books aren't usually college-textbook tier. A lot of them exist exactly for the purpose of providing just practical, usable information without an emphasis on theoretical background.

Found another one btw: shop.oreilly.com/product/0636920030171.do

You should maybe just hold off on catastrophizing for a bit. Most applications do not require you to really invent anything. Especially if you've got .NET available. Just put your panic away until you have some more concrete information about how hard the problem really is. Maybe it's something which already has been solved x1000 times and you just need to scavenge for scraps of code and whatnot.

I agree with you; I'm not the one who said Python has no types. But it's not the same as a "real" type system such as Haskell, for example, has. You can still clusterfuck yourself in Python without trying /too/ hard.

God says you have to suffer to get a blessing.

Don't fucking touch JavaFX. Just use electron, it's going to make your life like 20x better if you're comfortable in React.

>But it's not the same as a "real" type system such as Haskell
since when is there anything subjective about a type system
either it's there or it isn't, it doesn't need a certain amount of features to be considered real

*fucks hooker and loses virginity*

King Terry already did this.

>look up Qt OpenGL example
>Our OpenGLWindow class acts as an API which is then subclassed to do the actual rendering.
Yeah nice "example". Can sepplesfags ever resist complicating a simple thing?

He's obviously talking about a static type system because those provide more rigorous type requirements.

> since when is there anything subjective about a type system
Since interpreted languages started implementing "type systems" where you could do things like sets that contained themselves [ which was what they were originally invented to explicitly prohibit ].
In Comp Sci the type system is just the behaviour of whatever type checking algorithm you have. If you want to be retarded about it, you could have a type system with just one type to which everything belongs, and no subtypes, and by some narrow definition it's a type system. If you want to be non-retarded about it, there are variations in the strength of the guarantees various different type systems can give you.

there's nothing complicated about that, you're just dumb

>Since interpreted languages started implementing "type systems" where you could do things like sets that contained themselves [ which was what they were originally invented to explicitly prohibit ].
are retarded Haskell posters retroactively rewriting history now so it matches up with their autistic ideas of what a type system "should" be

TIL C++ is the most objectively beautiful language, objectively!

Defining POINTLESS BOILERPLATE is a complication. Can sepplesfags ever resist making responses that are as predictable as they are shitty?

That's boilerplate with a purpose, I don't even use C++

That's not how you spell Rust.

what's the most functionally beautiful language?

In C code, does seeing a # always mean a compiler directive?
Are compiler directives always to be done at the beggining of a file?
I read that #include means to literally include a file withing the file so as to have access to a library, so how does that work when I include a file including other files, what if I include stdio in one file, and then I include that file and stdio, wont stdio be there twice, somebody explain this to me.

try making a framework that works for everything and keeping it simple without tearing yourself apart maintaining the different needs of different platform retard.

if you want the "simple" method write the custom GUI/renderer framework yourself

> rewriting history
Top lel. Type systems were invented by Bertrand Russel to provide a way to prove that the Principia Mathematica system won't produces self-reference paradoxes. I'm not involved in logic or the foundations of mathematics but I thought this was pretty common knowledge.

Absolutely BASED and Sharppilled

Attached: ?.gif (1200x1200, 478K)