/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Previous thread:

Attached: 1523119699663.png (3840x2105, 366K)

Other urls found in this thread:

gnu.org/software/zile/
process-one.net/en/ejabberd/downloads/
graalvm.org/
innoq.com/en/blog/native-clojure-and-graalvm/
ruby-doc.org/core-2.4.0/IO.html#method-i-readlines
twitter.com/SFWRedditImages

first for lisp

>If that's true and you don't know how to build what's in your picture then you should be practicing the feedback.
>you ignored his criticisms of that fizzbuzz


but ffs, the fizzbuzz is unrelated to the tile issue.
and i DID say i would pretty up the fizzbuzz later. this is not ignoring.
it is not meant to go into production so there's no rush.

The previous is on page 4.
Nigger

>fizzbuzz in rust and sepples
can we get a redo on this thread? I had enough fizzbuzz from last thread.

Yeah, Qt is very nice. And I'm pretty sure it has common and scheme bindings.

I think it even has something like the (((Visual Basic))) graphical UI creator. I don't know if you can set it up to autogenerate onclick functions for Lisp though. Maybe I'll have to write my own. I miss windows XP.

On a scale of fizzbuzz to a C compiler, how hard would it be to write a POSIX window manager in modern C++?

Attached: y83ptl3actk01.jpg (3024x4032, 681K)

>no anime image
illlegitimate thread

Attached: daily programming club.jpg (1280x720, 166K)

yet YOU legitimize it with a post to bump it.

>the fizzbuzz is unrelated to the tile issue.
the issue is you're an inexperienced dev in need of practice. i'd say it's very relevent
cleaning up some bad code shouldn't take more than 10 minutes and it will teach you a bit about proper form

>and i DID say i would pretty up the fizzbuzz later. this is not ignoring.
>it is not meant to go into production so there's no rush.

your exact words were "it works, don't it? again, LEARNING make it pretty later."
and then you posted a pick fizzbuzzing with "you suck"
hardly a respectful way to respond to legitimate feedback

>and then you posted a pick fizzbuzzing with "you suck"
it was to demo the fizz and buzz were not hard-coded. maybe you-rock or super-man wouldn't have rustled the jimmies. mea culpa

>cleaning up some bad code shouldn't take more than 10 minutes and it will teach you a bit about proper form
so if i clean it up, will that solve the tile issue? not sure how. seeing as it's a different project all together. but i'll go do that now.

After years of banging my head against this shit I'm finally "getting" programming more complex than shell scripting. Granted it's in Python, but still. Is Clojure any good?

>so if i clean it up, will that solve the tile issue?
no, but you'll learn some more proper form, which will save you some headaches down the line

I already told you man, look through the docs for help
If you're not sure what exactly you're looking for, make whatever issue you're having more clear
your original post made it sound like you were just looking for some oneline solution for making things look like in your pic, which there won't be. the UI in that pic is a collection of various UI elements, not just one big blob

Should I stop studying JavaScript and instead learn Solidity and make millions through the funding of a blockchain related startup scam?

>Is Clojure any good?

>non-homoiconic
>claims to be a lisp
probably not

>. the UI in that pic is a collection of various UI elements, not just one big blob
thanks for putting it so eloquently.

so then the question would be:
what UI elements are used here?

posting the pic you're talking about might help attract help m8
I don't know shit about UIs, but maybe look into drop-down menus and thumbnails. those are the common names for the little pictures and the 3 dot menu button

Attached: 1525228994254[1].jpg (540x4437, 921K)

DIY.

I am using someone elses activation key for pycharm

What is the worst that could happen?

thanks, i'll trek down this path for a while. let you know if dead end.

Nice collection, BTW.
If these are the title that interest you, it's for sure that you're no dummy.
You'll pick up on programming, no doubt.

Do you need it dynamically linked or is static okay?

You get him banned and he gets pissed at you.

dwm is what, 500 lines?

i got it off the interwebs
T-there is no way they can break into my shit through the IDE ,r-right?
Or retrieve my config files or other shit.
I am working remotely through SFTP so it could fuck me up big time

Attached: 1523845332832.jpg (400x400, 63K)

Dynamically linked is preferred, for plugin management.
dwm has no features though, I want it to be a replacement of mutter. And then create a DE around it with QML

>create a DE
that alone could be a huge task depending on how many tools you want to provide the end user

A couple weeks ago I wrote a shitty parser. I'm making it less shit.
(# (# # (# # #) (# # # #) #) (# # (# # #) (# # # #) #) #)

Above is a parse of ((lambda (x) (x x)) (lambda (x) (x x)))

>Dynamically linked is preferred
Then C++ is out of the question, unless you have a different copy of the library for each combination of compiler and stdlib versions. C++ does not have a standardized ABI, and also doesn't have modules yet.

C++20 has modules

Attached: 1518057870451.jpg (986x1188, 325K)

>have no skill
>but have a vietnamese girlfriend
>learned shit basic vietnamese for it
>contact recruiter
>see he is vietnamese
>typical vietnamese grammatical errors in email
>when go in to meet him, bring banh cam
>offer him one, speak a little vietnamese
>have a job the next day
based viet bro dishes out that delicious nepotism just for taking a little interest in his culture

it's still shit

so we'll be actually using it by 2025?

*2052

>get emacs
>fucking hate it, can't do anything
>have to google every fucking thing I want to do
>stick to it
>hey this actually is pretty efficient
>start configuring for little things here and there
>omfg emacs masterrace
Now it's a cycle of
>emacs doesn't do what I want to do
>fuck this shit I'm not using emacs
>what fucking autists put up with this shit
>try other editors, regret
>go back to emacs, hack config files for like 5 hours
>emacs works fucking precisely in the manner my ideal text editor would
>omfg emacs masterrace
Feeling really conflicted about emacs right now, configuring is absolute shit but I've yet to find something better.
Maybe my next project can be a text editor.

Finally supported by major compilers 2067
Finally gets supported by proprietary compilers you're forced to use at work 2079

gcc has a stable ABI

>Maybe my next project can be a text editor.
That's what I'm working on. That's why I'm writing a parser, for the syntax highlighting.

Learning C# for work and adding some unit tests as practice and to add some code coverage.
Was a mission and a half to get it set up properly. Why are C# and C# tooling tutorials universally shit? Not to mention the 25,000 pajeet tutorials you have to filter through to even find a half decent one. Out of all the programming languages I've learned - C# has so far been the worst when it comes to trying to find answers to what should be simple problems. What should have taken 15 minutes took me nearly 4 hours to debug and solve myself after wasting 3 hours searching for a fix to the problem.

The problem was NUnit tests weren't being detected by Visual Studio. Yes, I installed the 3 NuGet packages. No, it wasn't the x64 bullshit.

Attached: 1523230866.png (590x146, 196K)

people will understand how all the components interact together by 5022

imo clojurescript is better than clojure, unless you need java for performance.

why not just use community edition? is free, friend.

>Maybe my next project can be a text editor.
you planning on using zile?
gnu.org/software/zile/

>gnu
nope

sorry, it's actually the best. you might find another "configurable" editor, but it's really a lie.

>gnu
yes

>gnu
maybe

gnulag 1000 years

>algorithms and datastructures library
>text editor
How many spooky datastructures and algorithms could different text editors possibly share in common?

moreso GNU license model is a fucking scam.
What GNU licensers want you to think:
>hurr durr OSS! I am free to use it! And it will be free for everyone forever!
What GNU licensers think:
>fucking idiots, thinking that shit is free. Dumbshits are using crippleware while we're making fucking bank concurrently licensing non-crippled commercial versions on the side while staving off competitors.

>Dumbshits are using crippleware while we're making fucking bank concurrently licensing non-crippled commercial versions on the side while staving off competitors.
If GNU is so rich why is Stallman basically a hobo? Meanwhile Linus has a 150 mil to his name.

Because Stallman is an idealist, a useful idiot in a world of exploitationists.

Stallman is a genius but CIA niggers fucked him in the head recently.

>recently

Mind linking me to some info about these people in GNU who are making millions?

>recently
He's been broken since his father left user.

my electron app

Just look at any software licensed under GNU as a "Community Edition" alongside commercial versions.
One of the worst offenders is ejabberd. The plugin system is horrible broken unless you get the Commercial version.

>Just look at any software licensed under GNU as a "Community Edition" alongside commercial versions.
bretty sure that isn't allowed
isn't the whole point that if gpl code is used in something the code must be made available

>claims people are getting rich
>doesnt give names
Oh fuck off.

It is allowed.
Limitations are only placed on the consumers of the license/code. The author of the code retains all rights, and is free to license their code however they wish alongside the GPL.
I named ejabberd. MongoDB is another one. These are legit businesses.
Compare to IntelliJ, which has a community edition licensed under the truly free Apache license.

>ejabberd
Ejabberd isn't even gnu software. So i guess you were thinking about companies that arent gnu when bitching about gnu software

process-one.net/en/ejabberd/downloads/
> ejabberd is distributed under the terms of GNU GPL v2 »

I'm trying to make a program which will roll a number (X), and save this into a file with the date it was done at, if it's already been rolled today, then don't roll anymore and don't save the result (im bad at explaining)

I got this tiny script to roll+read+save the file, but I'm having issues trying to get it to detect if a roll has already been made, could anyone give me feedback on this?
It will save to a file and all, but it cannot detect if a line exists, what could i be doing wrong?

TimeTake = Time.now.strftime("%d/%m/%y")

def sabotaje?
coinflip = rand(2)
if coinflip == 1
"Free for today"
else
"Stop being lame"
end
end

result = TimeTake + " " + sabotaje?
print result

filee = open('log.txt', 'r')

if filee.readlines("log.txt").grep("/#{TimeTake}/").size > 0
print "You already rolled today"
filee.puts "already rolled"
else
filee = open('log.txt', 'w')
filee.puts result
end

Yup not part of the gnu project. You're trying to tie the business practices of shitty software like mongodb to gnu projects. Anyone can engage in shit. What's your point? You think mongodb would be better with the peasant edition having an mit license? Snowball's chance in he'll.

I just finished working on a URL dumper for Firefox in C# because I am a tab hoarder shitter. Right now, I am trying to turn it into a standalone exe because I want to make it portable. So far, the solutions I found are going over my head and stackexchange is not being very helpful right now.

Explain? saves the urls of your tabs to something?

dude GNU is a project with a license (GPL) written specifically for it, just because another project uses that license doesn't mean it's part of the GNU project

They're enablers, and useful idiots of exploitationists.
It's true, my gripe is with copyleft, not GNU itself. But the reason I rejected zile wasn't because it was it was associated with GNU, but rather because being associated with GNU means it's copyleft.
If you guys weren't autistic, you should've been able to infer that from my criticisms.

It finds the location of the last saved Firefox session and saves the urls from that to a text file

What combination of Webdev shit should I learn? Going to be applying to jobs soon and each job for some reason requires JavaScript, but then different frameworks(? Not familiar with this stuff at all). Should I learn JavaScript, angular, nodejs, react, mongodb, es6, css? It’s really overwhelming. (I know c++/c, Python, and some java all to a intermediate level).

Clojure (as well as Node.JS, R, Python 3, and other JVM languages) can compile to native binaries now with GraalVM.

graalvm.org/
innoq.com/en/blog/native-clojure-and-graalvm/

Doesn't matter what framework you learn
by the time you're done learning it the webdev industry will have moved on
The only thing that's constant is JavaScript since it's the script lang of web-browsers
just learn JS and then lie and say you know whatever framework is trendy (learn the basics so you don't look like a fool if they ask you any questions)
learn as you go

Just program your server with c++ and your webpages in Lua

>c++
"no"

But no sane person would ever want to steal your website.

Yeah, seems like every year there’s some new trend. Just gonna focus on JS. Thanks

Anyone? For some reason I'm unable to find if the current date exists within this file.

>that 30 year old boomer that still uses C instead of C++ or java

Attached: boomer.png (381x353, 32K)

Don't use question marks in function names, idiot.

Perhaps you should take a look at the documentation for the :readlines method.

ruby-doc.org/core-2.4.0/IO.html#method-i-readlines

If there are no arguments provided, the entire file will be read, and split according to the default separator, which is the newline character.

If there is one argument provided, and it is a string, that argument will be the separator. If that argument is an integer, the default separator is used, and the integer provided will be the maximum number of bytes for the resulting strings. If the first argument is nil, the method will allow the separator to be nil, and read everything into one string.

If there are two arguments provided, the first will be used as the separator, and the second as the byte limit.

You opened the file, and then told it to split wherever it sees the words "log.txt"

Thank you user.

decided to just learn how to use command line instead of programming..didn't even try to run ruby or python today..hard..

Attached: Saber(cub).jpg (225x225, 12K)

Also, I should find it worthy of note that you are opening the file multiple times here, and you never close it. Why not open it for reading and writing? In fact, you should probably open it with mode "a+" if you do not intend to completely destroy all of the entries you've put into the file, since mode "w" writes from the beginning instead of the end.

Why not try something like this?
File.open("log.txt", "a+") do |file|
if file.readlines.any? { |line| line.include? TimeTake } then
puts "You already rolled today"
file.puts "already rolled"
else
file.puts result
end
end

Not hard. It's actually very easy.
What it is is *expansive*. You have to learn a lot to do very little.
What this means is that you can do it, even if it seems that you can't. The problem isn't that you're unable to do it, it's that you have to learn a lot more until you can do it.
You're walking a marathon here, not sprinting a 100m.

>30 year old boomer
retard

In practice is writing to the end of a file O(1) or is it O(n)? (n is the size of the file)

i assume it depends on the filesystem
why not experiment and find out

>Just program your server with c++
wow who would ever do that

Writing & scanning to the end is O(n), "jumping" is platform-dependent

O(1) on most modern *nixen. There's zero penalty even for multi gigabyte log files except disk space usage, which is why logrotate+gzip exists.

ok guys I'm gonna do it. I'm gonna write my own text editor to replace emacs.
What language/frameworks/etc. should I use?
I'm considering FreePascal for ultimate cross-platform support and it's easier than C++.
Any other recommendations?
This will be my first time writing a major app that's not webdev.

PyQt + QtQuick.

CurrentPlatform.Init();
TodoItem item = new TodoItem { Text = "Awesome item" };
await MobileService.GetTable().InsertAsync(item);


where, in general, does it make sense to put this in a xamarin forms app?
(yes, i've been through azure docs and xamarin form docs and stackoverflow)

Attached: azure.png (1366x768, 95K)

>tfw finding $15/mo api keys on github repos
i havent signed up for api access in over a year because people put their keys in public repos LMAO

the problem with C# is you rely on Microsoft for everything. Including documentation

who puts that shit in a public repo?

pajeets

Hey can someone answer a noob question pls when you donwload something from github in c++ and its a bunch of cpp and hpp files how do you open it all within the same program on visual studio?

Lol

thanks

you cant do it because of how computers work

javascript -> jQuery -> nodejs -> whatever else

after js basics, jquery and backend stuff everything else can be picked up very easily. the primary step is jquery because everybody uses it and it looks like shit. after learning jquery though 99% of stackoverflow javascript questions/answers begin to make sense.