[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 327
Thread images: 25

No Edition Edition

What are you working on my dudes?
>>
I am not a computer scientist.
>>
Embedded Fuck Python General

Who could come up with such a shitty language?
>>
More Computer Science PhD applications!
>>
What would you tell someone who thinks they suck at programming and can't understand anything?
>>
>>58398893
best scripting language
>>
I'm working on Python homework. About to an hero
>>
>>58398893
Python is awesome. Stop talking crap.
>>
>>58398911
They aren't trying hard enough.
>>
First for GL can suck a cock
>>
>>58398911
They should be patient, and they should be reading HtDP because it actually teaches HOW to program (not just tells you what elements comprise a program in language X).
>>
Why do people keep designing languages that are riddled with the mistakes of the past, like weak or dynamic typing, or OOP?
>>
>>58398936
No it isn't.

https://www.youtube.com/watch?v=uqsZa36Io2M
>>
>>58398861
>python
>high performance
>>
>>58398911

I would ask what it is that draws you to programming. You really shouldn't go into a profession just because everyone else is. You should find something you enjoy, that you are capable enough at doing that you can make a living off of it. Alternatively, find a job that will allow you the free time to work on your hobbies while still supporting you. Programming can be fun for many, but you shouldn't force yourself into it.
>>
>>58398936
>lying
why would you do this
>>
>>58398883
kys shitty web dev
>>
>>58399001
I speak only truth.
>>
File: YidZYVf.jpg (289KB, 900x1200px) Image search: [Google]
YidZYVf.jpg
289KB, 900x1200px
ball pythons > the python language
>>
>>58398985
Is this a critique of Python or of Django
>>
>>58398861
you always forget to put link to the old thread, dumbfuck
>>
>>58398985
how about use some fucking words instead of linking an hour long video on youtube
>>
File: 20170105_155217.png (117KB, 949x341px) Image search: [Google]
20170105_155217.png
117KB, 949x341px
>2016±1
>not reading research papers to become a better code monkey
>>
>>58399033
Both.

>>58399042
Python doesn't give you the tools necessary to program effectively.
>>
>>58398987
A language is neither performant or not

An implementation may or may nort be
>>
>>58399044
Can we bring a racial discrimination lawsuit against Google, then?
>>
>>58399028

hognose > ball python
>>
>>58399049
what is missing ?
>>
>>58399049
Your definition of "effectively" is skewed.
>>
>>58399093
Lazy evaluation
Typeclasses
>>
>>58399093
Referential transparency
>>
File: github_graph.png (72KB, 768x443px) Image search: [Google]
github_graph.png
72KB, 768x443px
>>58398861
>dudes
I sexually identify as a bumblebee, you.shitlord

Take that into account next time
>>
>>58399065
A shame that such fine creatures are now associated with a terrible programming language.
>>
>>58399104

Oh hey, Ruby has lazy evaluation... but only when you explicitly ask for it.
>>
Fuck Python it's much too useful.
>>
>>58399104

Shut up.
>>
>>58398959

Attract Normies.
>>
How much math do I need to know to be better than the typical pajeet?

How much to be rainman tier problem solving?
>>
def palindrome_check(string_to_check):
string_reversed = ''
for x in range(len(string_to_check)-1, -1, -1):
string_reversed += string_to_check[x]
if string_to_check == string_reversed:
return True
else:
return False

print (palindrome_check(""))


I know the "-1, -1, -1" reverses the string, but how does it work?
>>
>>58398861
golang backend service
>>
>>58399260

This is a terrible method.
>>
>>58398959
People, for the most part, design languages that they would like to use. It doesn't matter if you don't like weak or dynamic typing or OOP, it's what they like that counts. Inevitably, some people will use those languages because those are features that they personally enjoy as well.
>>
>>58399143
So in other words, it has strict evaluation?
>>
File: 1461003381419.png (44KB, 657x527px) Image search: [Google]
1461003381419.png
44KB, 657x527px
Is CLRS the best algorithms textbook?

Is there anything better?
>>
>>58399273
I know, but uni forces me to learn that way. [::-1] is a lot easier and works by [begin:end:step], but I have no idea how -1 -1 -1 works
Putting -1 in the end means it starts reading backwards, what do the other -1's do?
>>
>>58399318
start and end
>>
File: unsafe code.png (300KB, 800x425px) Image search: [Google]
unsafe code.png
300KB, 800x425px
You're not writing unsafe code Anon, are you?
>>
atom or sublime
>>
>>58399283

Correct. But enumerable objects can be transformed into a "lazy" enumerable object that will more or less lazy evaluate every message they receive except for I think the :first method, which forces evaluation on the first n elements. Ruby can get the primary benefits of lazy evaluation without forcing it on everything.

>>58399318

range(start, stop, step)

Start element was length - 1, since everything is 0-based.
Stop is -1. This is a non-inclusive range, so this means that the last element is 0.
Last -1 means that it decrements each time.

On a side note, I don't like Python's non-inclusive ranges. In Ruby, the range 1..5 includes 1,2,3,4, and 5. It makes sense. In Python, range(1,5) includes 1,2,3, and 4, but not 5.
>>
Whats the best GUI package for python? I want something very nice and easy to use, I don't expect it to be as easy and nice as C# but I'll take what I can get
>>
>>58399436
a curses wrapper, I'm sure there's one for python
>>
>tfw when you write a function you don't fully understand and it just werks

def gcd(a , b):
if b == 0:
return a
else:
return gcd(b, a%b)


feels good, man.
>>
>>58399436
I'm perfectly fine with tkinter.
>>
So apparently python is actually really fucking useful when working on linux software (like half of it is in python for some reason). What's the best book to start learning it from?
>>
>>58399328
>>58399389
now it's making sense, thanks guys.
>>
>>58398861
Serious question about python:

If you ignore performance, is there any reason not to use python for everything. I mean obviously if you're a computer scientist, you use more, but I'm just a pleb.

Is there anything I cannot do with python?
>>
>>58399459
are you literally retarded?
that shit couldn't be simpler
>>
>>58399467
I also just realized it's basically the same as start/end/step method as [::-1] but I'm a fucking idiot
prolly because it's 5 AM

>>58399463
I'm learning Python at my uni and they highly recommend the book "perkovic introduction to computing using python"
I didnt'read it myself so take my advice with a grain of salt.
>>
>>58399483
At the moment, low level stuff like drivers can't be written in python. Neither can kernels, or truly embedded programs. There is a python compiler for arduino, though, if I'm not wrong.
>>
>he still uses python over ruby

it's fucking 2017 for christ's sake
>>
>>58399455
Curses wrapper? could you explain im not too sure I understand what youre trying to tell me

>>58399461
How does it deal with making things look pretty?

>>58399459
when b == 0 your function terminates, else it calls itself (recursive function)

>>58399483
The thing is python is very good to use for small scale projects, if you want to do something quickly and know it will not scale then python is best. Python does not scale well in big projects because it is very slow
>>
>>58399495
Are you fellow Balkanite?
>>
>>58399483
>Is there anything I cannot do with python?
No, it's Turing-complete.

So is Brainfuck, but there's a reason you don't use that for serious programming.
>>
File: 1378507205236.png (122KB, 398x309px) Image search: [Google]
1378507205236.png
122KB, 398x309px
>>58399256
I guess I should say, what math do I need to know?
>>
>>58399384
You mean
emacs or vim
>>
>>58399524
>living in the stone age
>>
>>58399512
https://en.wikipedia.org/wiki/Ncurses
>>
>>58399519
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/
>>
>>58399516
no I'm Dutch

I probably have .pdf somewhere if you want
>>
>>58399529
Oh I see, I'm looking for style points so this is not what I need, needs to be a proper gui
>>
>>58399519
Math and CS/CE/EE go hand in hand.

The more math you know, the better overall at your programming and technical/algorithmic logic you'll be.

I mean, you should learn as much math as you do computer programming.

Unless you like being your average Takbir Fun Mobile Game™ code monkey
>>
>>58399459
You don't understand the function or the algorithm? The algorithm is called euclid's algorithm for gcd, it's fairly simple.
>>
>>58399512
>How does it deal with making things look pretty?
Its not pretty, but its effective.
I still have my first tkinter GUI program, its stupid as hell, but hey it works, it pulls live weather data for my city and refreshes it every 60s.
>>
>>58399528
>implying old == bad
>>
>>58399565
That said, would a math degree serve me well? In terms of "being a good programmer. It's something that always interested me, so more like a hobby and not as a career. My employer reimburses education costs and the most convenient schools nearby have decent 2 year math programs and nothing more than basic SQL/java/c++ as far as computers go, but I mean I can do that shit on my own time.
>>
>>58399597
I see, speaking of retrieving data from a website and so on, how do these things works? I've been looking to do something simple like you are but I've never been bothered to.
>>
>>58399606
>wtf do i need to buy a car for, i have a horse that i can ride
>>
>>58399483

When performance doesn't matter, it generally tends to boil down to personal preference, available libraries, and platform support. If Python suits your style of writing code best, it'll probably be a good language for writing most programs, except when you need a specific library that either does not exist or is poorly implemented in Python. Personally, I find myself more productive in Ruby than any other language, so when performance is not an issue, I use Ruby.

>>58399509

Oh hush. There are rubyisms that Python programmers don't like, and pythonisms that Ruby programmers don't like.

>>58399519

It is not so much that you need a specific amount of math (although certain areas of computer science will need specific math subjects), but rather, that you should have a mathematical mind, and math should come easy to you. Making calculus a requirement in universities is just a helpful way of filtering out retards.
>>
>>58399260
oh hey, i worked on this earlier today in think python.

def first(word):
return word[0]

def last(word):
return word[-1]

def middle(word):
return word[1:-1]

def is_palindrome(word):
if not first(word) == last(word):
return False
elif len(middle(word)) == 0:
return True
else:
return is_palindrome(middle(word))
>>
>>58399436
I don't write much GUI, but when I did I used Tkinter. I have no complains.
If you want something more modern and conventionally pretty, try PyQt. It's a QT wrapper, which is multi platform(including mobile) and supports multi touch.
>>
>>58399658
>would a math degree serve me well
>the hundreds of CS/CE uni students that say they're going to double major in Math, and then drop the math major after like two semesters
everytime

I don't know but I betcha it would if you plan on using "abstract algebra" and shit that you get towards the end of the line.

You really should just be pretty versed in math up to discrete mathematics and linear algebra. Those things are pretty important. But there's a point where math just gets too abstract for it to be super useful in programming.

Whatever floats your boat I guess.
>>
>>58399698
>Making calculus a requirement in universities is just a helpful way of filtering out retards.
>tfw lazy in high school years with math and now i don't know how to catch up
Don't go easy on the math kids.
>>
>>58399663
Not the person you were talking to.
You have to get the data from the site somehow. You will probably want to use urllib to download JSON data from an API or if it's not available, download the web page and extract the data with the soup library.
>>
>>58399663
Read about beautifulsoup, requests or urllib modules(there are plenty of tutorials on yt if you are lazy).
Also you need to be familiar with HTML/CSS, because you need to extract data from CSS class.
>>
>>58398985
https://youtu.be/uqsZa36Io2M?t=1h33s

This is pretty much where I am. The "you gotta copy paste without monads d00d" doesn't resonate with me because duck typing.
>>
>>58399717

>not taking calculus in high school
>>
>>58399759
I did, but I half assed it then stupidly took a year off doing nothing and forgot fucking everything.
>>
>>58399665
That would be implying emacs and vim are outdated
(they're not)
>>
>>58399763
http://tutorial.math.lamar.edu/
ok then relearn it
>>
>>58399665
>wtf do I need a new car for, my current one is fine and the insurance is cheaper for it
>>
>>58399768
>>58399776
>terminal TE babbies literally are scared of the future

it's hilarious really
>>
>>58399769
I'll try.
>>
>>58399782
And here you go implying new is better
Sublime doesn't even have good keybindings, why would I use that piece of trash?
>>
>>58399795
are you >imblying vim has good keybindings?
emacs i can kind of understand, but vim's keybindings are literal dogshit
>>
>>58399785
Calc I - Tom Apostol is a pretty good /sci/ meme.
>>
>>58399698
>>58399706
Thanks mangs, I'll think about it some more.
>>
>>58399741
>>58399725
But this is only possible if the people who have the data actually give the information to begin with right? Im assuming youre not actually taking the data from a website (idk lets say www.weather.com) but actually directly taking the data from www.weather.com's database right?

>API
What is this?
>>
>>58399814
>API
>what is this

CS101 is down the hall and to the left famalam.

(PS: Like a big dictionary for programming syntax)
>>
File: ch31.png (957KB, 1350x758px) Image search: [Google]
ch31.png
957KB, 1350x758px
currently making an imageboard for eggman

and I'm also cloning agar.io to make a custom game for eggman
>>
>>58398911
that maybe it's time to accept that you're simply not smart enough to understand programming. A bad analogy, but I think it makes my point: can you teach a dog calculus or a cat linear logic? No. because the cognitive capacity to understand these concepts just isn't there.
>>
>>58399814
I'm leeching the data directly from their database with beautifulsoup4.
Data is there, you just need to take it.
>>
>>58399814
You can take the data from the website. Literally read the html and find where the data always is.

API means application programming interface
It's like web pages but for software to talk to other software. It can work within one machine or through the network. There are many types of APIs. The kind more common on networks is RESTful APIs.
>>
>>58399752
So you've got 500k lines of working Python code, or some other suitably large number.

That's a hell of a lot of code, written in a language that is inherently difficult to provide tool support for. Doing a large refactor (and don't say that only happens due to bad design decisions at the start, clients can and do change their minds in ways that you could not have anticipated when most of the code has already been written) is a terrifying experience in a language like Python, or JavaScript, or Ruby because you can't expect an IDE to get it all right for you. In the worst case you have make all the changes by hand, everywhere.

Think about fixing a bug in a list reversing function (assume one doesn't exist in the standard library) in Go vs in Java. In Java you fix one function and you're done. In Go you have to do it for every single element type that you copy-pasted the function to work with lists of. The point about monads letting you avoid repeating yourself is the exact same, just moved up one level.

So what do you do to catch mistakes when refactoring? You use tests. I mean, I hope you use tests. But then you have to go and change some of the tests. You'd have to do that in a language like Haskell too, because the spec has changed, but the amount of code you'd have to change would be much smaller, because Haskell has really powerful testing libraries like Quickcheck that you just don't see in Python, for the same reason you don't see monad transformer libraries in Python.

So yeah, you've got a load of working code, but it's a lot more brittle than code in a language with an advanced static type system like Haskell, and in most cases there is a lot more code than what would be needed in that kind of language.

I dunno about you, but I hate maintaining code. The quicker and more automated and less error-prone I can make it, the better.
>>
>>58399842

Please clone agar.io, but do not clone the facebook integration. And bring back direct connect.
>>
if anyone can help i will gladly appreciate it. i have a folder with couple hundred pdfs and i want to delete some of them. the ones i want to delete have no spaces they were merged in the current folder on accident, is there a way i can search and delete specific pdf files without spaces, and leave the pdf files with spaces undeleted?

on windows btw
>>
>>58399901
sorry mods to shill, but game.eggchan.org

I didn't include the FB integration, also what do you mean by direct connect?
>>
>>58399848
>>58399856
I see ty

>>58399908
I think a simple python script could do this, are the filenames with spaces in a partially ordered? e.g (file1, file2, file3)? Not sure if you can loop through files in a directory
>>
>>58399931
>filenames with spaces ordered?
no but the files with spaces ordered
>>
>>58399921

When agar.io first came out, there was no teaming, but people found a way to use the JS console to directly connect to specific server IPs and play with their friends. This angered a number of players who didn't like the clans going on, but to be honest, it made things a lot more fun, both when teaming and when playing solo.
>>
>>58399874
your example of python use is that of a software dev, but what about the people that use programming as a secondary skill for their job and only write small projects/scripts?

the only better choice i could think of for those people is matlab, but it's not free and it's even slower than python.
>>
>>58399937
I acutally found an easier solution:
http://stackoverflow.com/questions/11801309/how-to-loop-over-files-with-python/11801336

The only thing you have to do is check that the file youre currently checking contains a space character, and if it does simply move it to another directory or make a copy in a folder of the same directory

mind you I haven't actually done this before but it doesnt seem too hard, should be ~10 lines of code more or less
>>
>>58399931
>Not sure if you can loop through files in a directory

from os import listdir
from os.path import isfile, join

dir = "/home/chad/gayporn/"

files = [f for f in listdir(dir) if isfile(join(dir, f))]
>>
>>58399059
Python only has one implementation
>>
>>58400254
>
>>
>>58400268
https://www.python.org/
this implementation, the one by the python software foundation
>>
>>58400012
get with the times and use os.scandir() grandpa
>>
File: 2015-07-02 16.37.27.jpg (38KB, 201x283px) Image search: [Google]
2015-07-02 16.37.27.jpg
38KB, 201x283px
What's the best, modern tutorial/resource for multithreading with C++ these days?
>>
>>58400286
That's the reference implementation. The fact that there is only one reference implementation(which is actually expected) doesn't mean there isn't other ones.
If we hadn't known each other for so long I would think you don't know shit about programming.
>>
File: anti-bully.jpg (143KB, 833x696px) Image search: [Google]
anti-bully.jpg
143KB, 833x696px
>>58400303
no bully
>>
>>58400378
stupid baka
>>
File: maki-blushing-finger-hair.jpg (102KB, 960x1248px) Image search: [Google]
maki-blushing-finger-hair.jpg
102KB, 960x1248px
>>58400386
>>
>>58400406
cute
>>
>>58400357
>If we hadn't known each other for so long I would think you don't know shit about programming.
What? I don't know you.
>>
File: laughing-at-your-post.webm (688KB, 1280x720px) Image search: [Google]
laughing-at-your-post.webm
688KB, 1280x720px
>>58400429
>the point
>>
File: Maki-Love.jpg (148KB, 726x1024px) Image search: [Google]
Maki-Love.jpg
148KB, 726x1024px
>>58400426
y-you too
>>
>>58400437
Pls anon, just because I didn't acknowledge your point doesn't mean I missed the point
>>
File: ready_to_kill.png (176KB, 560x530px) Image search: [Google]
ready_to_kill.png
176KB, 560x530px
>>58400478
I'M NOT YOUR ANON
NOT ANYMORE
GET OUT OF MY BOARD
>>
File: 1462297514707.jpg (31KB, 363x435px) Image search: [Google]
1462297514707.jpg
31KB, 363x435px
>>58400493
>>
I'm learning C++ and wondering how it's used in the real world. If i have a function that returns an object:

BigFoo bar(...) {...}


If BigFoo has a lot of members, are people concerned that it will take a long time to move the return value to a variable in the caller?
>>
>>58400528
it's complicated don't worry about it
i have spent so long fucking around with rvalues and C++ bullshit you really don't want to deal with
>>
>>58400528
No, because you will only return a reference to that object
>>
How can i get into programming?
>>
>>58400573

https://en.wikibooks.org/wiki/Haskell

https://0x0.st/pbp.pdf
>>
File: wavylena2.png (296KB, 512x512px) Image search: [Google]
wavylena2.png
296KB, 512x512px
Hmm
>>
>>58400573
https://tour.dlang.org

Seriously though, that's so open-ended I don't even know where to begin with answering it. What do you want to do with programming?
>>
File: petting-cat.gif (323KB, 500x517px) Image search: [Google]
petting-cat.gif
323KB, 500x517px
>>58400573
Watch anime and dress like a girl.
>>
>>58400573
I can't tell you how to learn, I can only tell you how I did.

I began with ruby. It's nice but very slow language, so it's great for learning concepts, but it quickly gets very limiting.

My second language was C, it forces you to learn how machine works and it's blazing fast. Not quite practical though.

Then I learned scheme. It's a very good language for quick prototyping, but it practically has no libraries. It's very good for programming interpreters though.

From it I switched to Racket, which is basically scheme with libraries and now I am mainly using Common lisp, which is very fast (for a lisp, and compared to java, python, ruby, ...) and very powerful.

I am learning web stack right now though (html, css, js).

In between I also studied assembly, which is a very good learning experience, for it shows you that everything (from function calling convention forward) is totally arbitrary. It teaches you true freedom. I also dabbled in Forth, which shows you that true abstraction is also possible at low level and hardware description languages (basically html for designing processors).

It was a wild four years.
>>
>>58399059

Languages can be designed in such a way that efficient implementations are impossible or impractical.
>>
>>58400699
Please don't reproduce
I met many retarded people in my years on this site but you easily made it into the top 10 with this

You actually don't understand shit, so please let me give you this one advice, and please take it:
You are horribly stupid and it hurts, don't ever try to spread the shit you believe to know about anything ever again.

Now please try to think about the shit you're telling us here for at least 5 minutes and maybe you find the giant flaws in your logic all by yourself.
No one is here to give you private lessons. Maybe google or wikipedia to have a basic idea of the subject?.
If you still don't get it then, just kill yourself.
>>
File: pasta.jpg (561KB, 1920x1440px) Image search: [Google]
pasta.jpg
561KB, 1920x1440px
>>58400811
saved
>>
i got a lot of free time now so what language should i start with
>>
>>58400811
Nice bait, I am going to take it.

It's a fact that ruby is one of the slowest mainstream languages, so nothing wrong here. It's also very expressive, it's practically a weak lisp with syntax. It's perfect for learning about recursion, iteration, conditionals, oop, higher order functions, ... this really beginner stuff. You can also use python here, but I recommend ruby, due to it's mix of oop and functional paradigm.

C forces you to learn about memory, but it's a pain to program in, since it's abstractions are really leaky and it has neither a lot of expressive nor abstractive power.

Scheme is one of the most elegant languages here. Scheme and Racket are in language design community the ones most often used (together with haskell) for prototyping interpreters.

Common lisp is ugly but strongest lisp. Also the fastest one (sbcl). It has many flaws (it's not very consistent, it's lisp-2).

Web stack is basically the future. More and more services are moving to the web.

Assembly is really nice, it shows you complete freedom (and thus power and responsibility) and also how is memory really organized and how processors work. HDLs really force you to think about that.

Forth is the ultimate low-level language. It has very low level primitives, but really good abstractive facilities.

>>58400847
>>58400699
>>
>>58400847
MIT/GNU scheme
>>
>>58400865
I agree, but at least recommend him a better implementation.

I recommend chicken scheme, it's not complete implementation of standards (like gnu/mit, for example it lacks complex number (but has them in libraries)), but it gives you access to c libraries and is very easily mixed with c code, so you can optimize bottlenecks.

It's also one of faster schemes, since it compiles to C.
>>
>>58400865
im mean ive dabbles with some c and python but which one has more real world uses like which one will be more likely to get me a job.
>>
>>58400847
>>58400874
>>58400865

For the books check out Little Schemer, Seasoned Schemer, Reasoned Schemer (and the other ones named like this).

Or SICP.

Yes, scheme isn't the most practical, but your first language doesn't need to be practical. It has to be elegant, so it doesn't intrude upon your learning. Anyway you won't be using your first language in a year.

And scheme is simple enough that you can learn the basics in a day and then study concepts, which are language agnostic.
>>
>>58400862

>perfect for learning about recursion, iteration, ...
Most of these I would agree on, but recursion + ruby = not the best idea. The reference interpreter doesn't do tail call removal unless you compile it from source in a specific way. The reason for this is that they didn't want to make it part of the spec (so implementations like JRuby would get a free pass), and they didn't want to make it expected if the reference interpreter has it (so implementations like JRuby would get a free pass... fuck JRuby).
>>
>>58400895
It's not the best, but it's here. Also ruby is slow enough that even if it was tail call optimized...
>>
>>58400907

Point of tail call optimization isn't to speed it up so much as to not blow up the stack.
>>
>>58400874
If you want SANIC SPEED lisp, why not just go for Communist Lisp?
SBCL is pretty fucking fast, and can be optimized run like a raped ape.
>>
>>58400895
People use JRuby?
Are the JImplementations of languages even competitive when it comes to speed?
>>
When I compile other C programs, it produces a lot of .o files and then they're linked together afterwards with ld. My C programs don't produce any .o files and gcc automatically links them.

Is there anything wrong with this?
>>
>>58400920
Because he needs an elegant language to learn, and my main point is that with chicken you have access to libraries and thus a bit more motivation for projects.

Common lisp is all but elegant. But it's still my language of choice.
>>
>>58399372
It is fucking retarded how a standardized language can change so much
>>
>>58400924

JRuby can actually be faster because it can get JIT compiled to native code. Same with JPython. Not sure how they handle the fact that the Ruby runtime allows some things that just do not fly in the Java runtime... like redefining the same method on the same object multiple times.
>>
>>58400943
It doesn't scale

one change to a file would cause make to recompile everything since they don't have separate object files
>>
>>58400943

If you have a lot of source files, it is helpful to compile them down to object code first, so that if you have to change one file, you don't have to recompile everything. If you have only one or two files, you probably won't have problems with just compiling them all in one gcc command.
>>
>>58400943
Compiling lots of object files separately allows you to scale it better, by compiling many at the same time.
Also, if a single file changes, you don't need to recompile the whole project.
>>
python or c which one should i learn first which one would get me a job faster.
>>
>>58400983
learn C and move to Python, if you know the basics of C, you will open many doors to other langs (python including) and will learn a lot of concepts.
Then learn python ( you will need no more than couple weeks), and if you like C better, leave python for now and move to C++, never go back to C if you are not writing the universe from scratch or you want to work with micro controllers and stuff.

> which one would get me a job faster.
It depends.
In my region there is a lot of Python jobs, but C++ are higher paid. So....
>>
I have a project to finish but I'm too busy scamming on leddit / flirting with cute traps
I wonder if i'll get anything done ever lol
>>
>>58400999
is the difference in pay really that noticeable?
>>
>>58400999
thank you
>>
>>58401018
Wow, a redditor trapfag, what a surprise.
Kill yourself.
>>
>>58401018

Flirt with traps after you're done with your work. Do you think any of them want to fuck an unemployed dropout?
>>
>>58401071
>kill yourself
stay alive, thats the worse option for you
>>
File: 765.jpg (23KB, 385x385px) Image search: [Google]
765.jpg
23KB, 385x385px
Why is programming feminine and gay now?

What happened to masculine programming?
>>
>>58401079
they would fuck a drooling cripple if it hit on them
>>
>>58401087

Programming is neither masculine nor feminine. But a few traps, gays, and I suppose the occasional HETEROSEXUAL CISGENDER MALE STRIPED THIGH HIGH SOCK WEARER might like to convince you otherwise.
>>
>>58399463
Help from python pro pls
>>
>>58401120
Logical thinking is a masculine trait, competitiveness and showing off are also a masculine traits.

Programming is naturally masculine.
>>
>>58401226

Fair enough, though I do not think competitiveness and showing off are necessary skills to be a good programmer. They just make it more fun.
>>
I'm dicking around with C++.

Anyone have any idea why the STL is full of such horrible member function names? Any why the STL code itself is so godawful unreadable?

For example, consider vector, one of the most commonly used structures. You want to add something to the end? Do you call .append()? Nope. .add()? Nuh-uh. Nope, you call .push_back(). What could be clearer?

Is the entire C++ committee made up of ESL fuckheads, or do they just *like* shitty, ugly names on everything?

By the way, I know that 'back' comes from BackInsertionSequence, but WTF. It's like they don't give a shit about developers at all. They care about the cleverness and efficiency of their precious library, but don't actually seem to give much thought to the reason for said library to exist: for the benefit of programmers using it.

I'll leave you with the source for push_back, which is actually one of the most readable STL functions I've seen:

    void push_back(value_type&& _Val)
{ // insert by moving into element at end
if (_Inside(_STD addressof(_Val)))
{ // push back an element
size_type _Idx = _STD addressof(_Val) - this->_Myfirst;
if (this->_Mylast == this->_Myend)
_Reserve(1);
_Orphan_range(this->_Mylast, this->_Mylast);
this->_Getal().construct(this->_Mylast,
_STD forward<value_type>(this->_Myfirst[_Idx]));
++this->_Mylast;
}
else
{ // push back a non-element
if (this->_Mylast == this->_Myend)
_Reserve(1);
_Orphan_range(this->_Mylast, this->_Mylast);
this->_Getal().construct(this->_Mylast,
_STD forward<value_type>(_Val));
++this->_Mylast;
}
}


Heck, why not throw in std::sort from algorithm, too?

template<class _RanIt,
class _Pr> inline
void sort(_RanIt _First, _RanIt _Last, _Pr _Pred)
{ // order [_First, _Last), using _Pred
_DEBUG_RANGE(_First, _Last);
_DEBUG_POINTER(_Pred);
_Sort(_Unchecked(_First), _Unchecked(_Last), _Last - _First, _Pred);
}
>>
>>58398861
Moving a project to a different database. ORMs are for pussies and I actually want to learn SQL.
>>
Share some (obscure) data structures that have some really nice specific uses. Bonus points for implementations (libraries) in several languages
>>
>>58401087
>>58401120

I dunno what the FUCK is wrong with this place, but this is literally the only place I've ever seen traps *or* anime girls show up.

Seriously, did someone flood water supplies with estrogen and psychotropic substances ~15 years ago? Is this the new terrorist master plan? Turning /g/ into a bunch of mentally unfit, closeted homosexual?
>>
>>58398861
Suppose you have a database with a few million 4chan posts. 99% of them are pure cancer of course, but there are some well thought out posts among them. How would you write an algorithm, that finds those posts?

Currently I compress each post, and see which post has the lowest compression ratio. I then multiply it by the length of the post to weed out all the very short ones.

Are there any other approaches? Or know what that kind of heuristic is called so I can search for papers? When I search for data mining I only get approches to search for correlations or find reoccuring patterns, etc.

Would appreciate any suggestion.
>>
Any decent LaTeX templates for a software portfolio?

Specifically I just want to print out a booklet of programs I've developed, show screenshots and code samples for my next interview.
>>
>>58401867
Assign each post a 'score' attribute. Run them against a word filter that lowers the score based on specific words used, like 'cuck'. Increase the score based on number of replies
>>
>>58401867
>>58401919

I am interested

most of it will be copypasta though, or some retard talking about how cool his waifu is to some other fucking retard.

still, I have hope that them good posts find their way to ya
>>
>>58401919
Thanks. At the moment I'm looking to score each post individually. But eventually I would like to evaluate which post reverences to which and build discussion graphs, that can be analyzed further.
Word filter is a good idea though.

>>58401990
Using the described method I found some interesting posts. But yeah, mlp rape fan fiction has pretty high entropy it seems.
>>
>>58398861
tree styled editor in qt
>>
>>58401638

>push_back
Aside from the std::vector template is the std::basic_string template, which is further specialized into std::string, std::wstring, and a few others.. This string class has two methods which add stuff at the end of the string, push_back and append. The append method adds multiple characters (another string) to the end of the string, while push_back adds only one. The std::basic_string template is designed to have a similar interface to the std::vector template, but is a separate type to make implementations more catered to typical string usage, rather than plain old data usage.

A template function could be created that operates on both strings and vectors using the same push_back interface. If the function for vectors were append instead, then the string class would have to either swap the names of these functions, or there would be an internal inconsistency that would prevent this level of generic programming.

push_back is simply the most logical name for appending a single element to a vector or list. If there is a future need for a method which pushes another vector to the end of a vector, or list to the end of a list, append would be the ideal name for such a method.

It also helps keep internal consistency with the fact that there is a push_front method in some other classes. If we changed push_back in all types to something like just add, what should push_front become?

>>58401755

Go to /lgbt/ and you'll find that it is swarming with traps. There's also some on /soc/.
>>
>>58401638
>literally every variable starts with an underscore
Can some Pajeet please explain this meme to me.
>>
>>58402140

Identifiers that begin with an underscore followed by a capital letter, or identifiers that start with two underscores, are reserved for the standard library and other compiler builtins. If you use them in your own code, it's undefined behavior. This prevents name pollution between the standard library and user code.
>>
>>58402136
you're the hottest trap on /g/ ruby senpai :3
>>
>>58402242

That's funny, because I'm not a trap. I'm a 25 year old man with a beard and mustache.
>>
>>58401087
you used to need a high level of education/drive to be a programmer. Now, anyone can learn it including NEET smug anime girl posters that have nothing better to do.

Not knocking the self taught, but you used to need some credentialing/certificates to work in the industry
>>
>>58401638
>Is the entire C++ committee made up of ESL fuckheads, or do they just *like* shitty, ugly names on everything?

To protect against macros.

What's a nice way to represent an abstract syntax tree internally? Right now I have something painfully simple like this:

struct node {
char c;
node* left;
node* right;
}


and it does the job when I'm parsing expressions like
1 + 2 * 5
, but things get tricky when I want something more complex along the lines of
3.14 + log2(8) * 5.7341
.
>>
The fuck kind of cancer general is this.
>>
>>58402268
*25 year old brony neckbeard
>>
>>58400593
reminds me of those wave effects you'd see on 16-bit games and shit.
>>
would you say it is a bad idea to store JSON as is

{
"a":"b",
"c":d",
"d":"e"
}


and

select something from somewhere where something like '%"c":"d"%';


?
>>
>>58402399
Yes, I would.

Why would you do that?
>>
>>58402415

seems simpler than handling a:b, c:d, d:e separately
>>
How would you store links between posts in an imageboard's SQL database?

>>58402399
Use Postgres's JSON type, if you want queryable JSON.
>>
Hey lads, gota learn R for my stats course. What are some neat things that R is good for besides stats?
>>
>>58402443

parent->child relation


post# | post | post_parent
1 | asdf | null
2 | ghjk | 1



so post#2 is reply on post#1
>>
absolute noob here

i browse through random github projects just to see what real code looks like and it's hopeless. its so confusing.

I dont even understand what

self._screen_file = [sys.stdout, sys.stderr][params.get('logtostderr', False)]


is supposed to do
>>
The utility of having it be called push_back instead of append:

#include <string>
#include <vector>
#include <iostream>

template<class C>
void append_self(C& container)
{
/* Note: std::basic_string and std::vector need to reserve memory, or
* their iterators can become invalidated when pushing back new objects.
* This method is not available for std::list, so SFINAE and template
* specialization would be required to make this universal across all
* STL container classes.
*/
container.reserve(container.size() * 2);

auto last = container.end();
for (auto curr = container.begin(); curr != last; ++curr) {
container.push_back(*curr);
}
}

int main()
{
std::string s = "hello";
std::vector<int> v = { 1,2,3,4,5 };

append_self(s);
append_self(v);

std::cout << s << std::endl;
for (auto e : v) {
std::cout << e << std::endl;
}

return 0;
}
>>
>>58401087
>feminine now
>masculine programming
Reminder programming is the job for women, whereas EE is the job for real men.
t. 1950s
>>
>>58402481
It picks whether to log to stderr you retard.

[1, 2][False] == 1
[1, 2][True] == 2
>>
Please help.
>>58402252
>>
>>58402481
> python programmers
> let's create a new list just to use it as ternary operator
> wonders why python code is slow as shit
>>
>>58402268
still the most feminine prob lel
>>
>>58402268

What a coincidence. I'm a 30 year old with a beard and a feminine benis.
>>
>>58402628
But readability > performance, Anon. :^)

On the other hand, I believe it's optimized for small arrays of the same type.
>>
>>58402657
COBOL is readable as fuck.
>>
>>58402481
>real code
It's because people who unironically use python aren't actual programmers, they're data scientists who have developed insanely hacky ways of using the language to do what they want.
They don't know why or what they're doing, just that it works the way they want
>>
>>58398883
Why should you be?
This is a programming thread.
>>
File: 1480971974295.jpg (13KB, 200x255px) Image search: [Google]
1480971974295.jpg
13KB, 200x255px
Smaller and faster computers keep releasing. Now literal JS code artistans can write the code for MCs.
I am deeply concerned about that. I wanted to be a low-level programmer, but now will my skills be ever needed?
Please help
>>
the noob here again

what's the point of writing performance efficient code in python?

as I understand it you would not use python for that in the first place anyway
>>
>>58402697
its ok anon, you're good until MCU's get 1gb ram
>>
>>58402713

Performance efficient code in Python... you wrote a big application in Python due to poor judgment, and now you need to make it fast.
>>
>>58402713
> what's the point of writing performance efficient code in python?

If you are programmer that only knows python and your boss is yelling at you because your code is slow and uses 16gb of rams to compute factorial.
>>
>>58402481
Doesn't look very elegant to me. Don't know why someone would do this, what project is that?
>>
>>58402759

YoutubeDL.py
>>
>>58398861
I've tried C, C++, C#, and Python

I'm currently using Lua and LOVE.

Guys I'm learning programming, I don't plan on getting a job programming, I probably won't finish a game worth actually playing but I'm having fun doing my retard coding. I hang out in some IRC's that have CS students and professional software devs that are trying to help learn to program, they constantly ask me for code even when I don't feel like programming, but then they shit all over it and tell me to learn data structures and other things that make my head explode and make me not want to program.

Am I being a bitch? They send me code samples of them re-writing my code to be better and they feel like a mess that I can't read. Is programming something I'm never going to be able to do right unless I do intense self study or drop $50,000 going to a 4 year uni?
>>
>>58402851
what irc?
>>
>>58402575
tbf that is terrible readability.

still ez to figure out, but literally would it have killed whoever made that to just make a few lines of code so that it doesn't look like a turd?
>>
Is
https://www.tutorialspoint.com/cobol/cobol_quick_guide.htm
page nice for learning COBOL?
>>
>>58402860
I don't want to say. Its a small one, its not dpt or any /g/ irc channel.
>>
>>58402875
I'm asking because i also learn c# and often stumble upon shit that i need to ask someone, asking /g/ is hit or miss and stack overflow is usually good but people like to use the most obscure method of solving things instead of already established one liners, that's why i need some stable c# community
>>
>>58399874
Dude, even Java has monads now. (The standard library even provides some useful ones, like Optional<Type>, which is pretty much the same as Maybe type.)
And compiler macros.

If Python doesn't have monads and compiler macros, it's not as cool as Java. That should make Python programmers kill themselves out of sheer shame.
>>
>>58402900
What are monads?
>>
>>58402923
gonads
>>
>>58401755
/g/ has always a faggot anon~

in all seriousness I've hooked up with so many dudes who go on /g/, this is possibly the gayest board on 4chan after /hm/ and /lgbt/
>>
>>58402851
You may be fucking up, but so may they. If code can be made objectively faster and more efficient it may be justified to compromise readability. Good knowledge of data structures may make the 'mess' easier to understand: code you have seen/written multiple times does no longer look like a mess to you. Could you post an example?

Try to follow style guides. Don't make code look 'messier' if it doesn't add anything (performance/portability/...) but don't make it look more readable if that is slower. Remember many languages have standard ways to solve problems and you should use those.
>>
>>58398928
Same here, what's your assignment?
>>
>>58402888
Sorry can't say it, I do sympathize but if I said it I know it would get raided.

The only advice I can give with finding good IRC channels, like legit good ones, is to take moots old advice that he gave at one of his convention talks. You need to go into random small channels and just talk to people looking for peeps that aren't fags. Any dedicated channel for some sort of topic is going to have hyperfag clique culture, autistic moderators, or will literally be dead with no one in it. Most of the 4chan ones I've gone to are like this too, though they're mostly just dead and not really that fag prone desu.

Look on Rizon if you want anons. Freenode and Quake are for gaming. Freenode is also like the minecraft den. The crossover between weeaboo anime posters and programmers is pretty significant. If you join a channel filled with weebs theirs likely to be several cs students and other programmers in there.
>>
>>58402481
it's essentially
self._screen_file = sys.stderr if params.get('logtostderr', False) else sys.stdout
>>
>>58400331
get used to posix or windows multithreading and then just use std::thread as it's just a wrapper
>>
>>58400699
Guile has plenty of great library support. I'd recommend it for writing stuff for GNU OSes, such as Linux.
>>
>>58400953
That's actually easy. Methods are just Runnables.
New method? New Runnable.
You could even keep a stack of them to get CLOS-like :before and :after methods.
>>
>>58400528
most of the times (and in c++17 it's guaranteed) it's optimized by the compiler (copy ellision), so don't worry about it
struct Fuu { much fields... };

Fuu foo()
{
Fuu fuu{}; //
...
return fuu;
}

int main()
{
Fuu fou{ foo() };
}

Soo fou & fuu are actually one and the same object which isn't moved.
>>
>>58402932
I guess I could post an example.

I know what the problems are for the most part. They write more generic/reusable code thats more robust which is definitely good programming, I know it is, but when I'm just having fun trying to make some sort of game mechanic or something I don't want to write code thats so generic I can't even tell what the fuck its supposed to do.

Especially in Lua since its a dymanically typed language you can go super generic, I know thats a strength of the language, and I guess I should be using it. From a me actually wanting to program standpoint I have more fun when I just use globals and nested if statements generally creating easily readable/specific code that is absolutely garbage tier in terms of re-usability, maintainability, or expandability.

https://hastebin.com/ifabuniger.lua
>>
>>58400543
duh... what?!
>>
>>58403063
Looks pretty okay to me, but remember that functions (in almost any language) should have one single, clear functionality.
Take for example your key map. It's now an elseif chain, which is okay now but is going to be horribly long if you get a lot of commands.
Also,it's eavaluating trying lots of options (every 'elseif' will be evaluated until it finds the right one). It's readable now, but if you put more game logic there Also, if you are writing the game logic there it will, it's going to be unreadable soon.

An optimization here would be to put them in a hashmap, which is a pretty standard and fast way to look up things by name:
keymap = {
"up" = moveUp,
"down" = moveDown,
"return" = selectOption
}

The things that are in books are mostly there to make you realise very early that some code is sustainable in the long term, preferably before you write it.
>>
>>58402713
Maybe you write software commonly used on the linux platform.
>>
>>58403156
I don't get what you mean. Won't it have to go through a logic chain in order to provide the specific functionality for whatever screen you're on?
>>
>>58403179
You have different control sets for different screens right?
So you either implement the screen check in the key functions, or have different key maps/functions in each screen (like you have now). Depends on the use case, but it seems more reasonable to me to define a keymap for each screen type.
>>
>>58401755
> Closeted

>>58401867
You want to look up sentiment analysis. It does something approaching what you want.

>>58401885
Make one yourself. You're a developer, and you put LaTeX on your resume...

>>58402462
Economic forecasting, visualization, grabbing data from various sources...

Make a simple BI Dashboard with R. It'll be "fun". For extra "fun", use the R web-server.

>>58402923
A monad is, in plain English, a thing that is used to build computations.
Let's use Optional<Type> in Java as an example.
A monad is something with:
> a parameterized type M<T>, which we recognize immediately as Optional<T>
> a “unit” function T -> M<T>, or in plain Java-English, a constructor, such as Optional::of.
> a “bind” operation: M<T> bind T -> M<U> = M<U>, which is Optional::flatMap.

To me, the most difficult thing to get here is what the bind thing is.
If you've used Linux before you probably have used piping. flatMap is a way to pipe data.
Basically, a way to operate on the T inside the monad.

Another monad in Java is the Stream.
Again, you have a Stream<Type>, a way to create streams (such as Collections#stream()), and a way to operate on the contents (such as forEach, map, filter, etc.) each returning new Streams of Types.

It's a way to do method-chaining without getting murdered by null pointers and such.
You get type safety and all those things for almost free.

And that's what a monad is, and how it works.
I hope that this explanation made it better for you.
>>
>>58403225
So you mean create a screen class/table and have keymap be a table in the screen table?

love keymap function -> screen.update(key) -> keymap[key].logic()

sorry for the shitty psuedo code.
>>
>>58401755
>Seriously, did someone flood water supplies with estrogen and psychotropic substances ~15 years ago?
Actually this has happened, sort of, in some places.
>>
>>58403264
Yes for example, that would be a way to keep the code clean and structured, even when you get to the point where you have 50 screens and 20 keys defined. Though if you're sure you won't, don't change it and just move on with game mechanics or stuff.

The key is to keep it generic enough to not run into trouble, but not so generic that everything takes 3x too much time and ruin the fun.
>>
>>58403323
I would say that the trick is to keep things separated, and start out simple, and refactor whenever you need more structure.

That way your large application doesn't start out with too much scaffolding, but adds it on as it accrues complexity.
>>
>>58402928
>this is possibly the gayest board on 4chan after /hm/ and /lgbt/
You forgot about /pol/, which is likely competing with /lgbt/ for the title of faggotry capital of the world.

>>58398861
Making an integration for something with virtually no documentation.

Also, working on convincing some very wealthy people that I have good ideas.
>>
How to think of things to program. I made a script that gets the main colors from a picture but that's about it
>>
>>58401120
That's right, Ruby. Striped thigh-high socks are not just for the homosexuals.
>>
>>58403323
Alright I'll keep that in mind.

I'm using the IDE zerobbrane and it lets you jump to methods. I was just using that.

>>58403335
When I was using C# and VS I'd seperate everything and have 40 million classes and object managers and shit. In Lua I want to be lazy and shove everything in main.lua.

Honestly I think I need to write unmanagable code before I can write manageable code. I'm not very good at learning how to correct mistakes without making them. I've never really gotten to that point though, whenever I share code I get told to refactor it, then it gets confusing and I just scrap the project.

Thanks for the advice though guys I'm starting to think I'm worrying about this shit too much. Its not like I'm writing business software or anything. Its probably better for me to finish something shitty than to not finish something good.
>>
What does /dpt/ think of LabView ?
>>
>>58403404
Get a job with access to real-world data and problems.
>>
>>58398911
I'd tell them they're most likely right.
>>
>>58403495
But I'm a student so I can't do that
>>
File: 1479984241978.jpg (134KB, 807x935px) Image search: [Google]
1479984241978.jpg
134KB, 807x935px
Employed Haskell programmer reporting in
>>
>>58403681
>tfw too intelligent for zygohistomorpic prepomorphisms
>>
>>58403404
Read some paper introducing whatever approach to whatever problem and try to implement it in a way which doesn't suck.

Take the horrid way the authors of the paper implemented it as both a basic guideline and a cautionary tale. Scientific software invariably sucks because good software is not the point (the point is to prove an approach works in principle, publish, and move on).

There's a wealth of interesting problems, you don't need to bother with fancy front-end stuff, and it's useful at all and you wrap it up nicely as a package/library you may end up with some extra consulting and/or re-licensing money.
>>
>>58403816
*and IF it's useful at all
>>
why isn't __OPTIMIZE__ defined (gcc, C++)

i just want to know if it's seeing my compiler flags or not because it seems they don't make any fucking difference
>>
>>58403902
>__OPTIMIZE__ is defined in all optimizing compilations.
so optimization is turned off?
>>
>>58403404
ask /b/ for ideas
>>
>>58403816
This sounds interesting. I'm also doing a maths degree so it might work out. Is there anywhere you recommend finding these papers and things?

>>58403916
Well they might have one good idea or so. Doesn't hurt to try
>>
>>58403902
ok all i had to do was move down the

include $(BUILD_SHARED_LIBRARY)


below the compiler flags

fucking hell, you have to read EVERYTHING, there are too many gotchas that no one else explains
>>
>>58403927
Just find an area of interest and look on Scopus/Web of Knowledge/whatever for relevant papers.

Stuff related to biology tend to be both easiest to understand and the lowest in terms of software quality so I'd start there.
>>
>>58404037
Will have a look. Might also give me stuff to actually upload to github too
>>
>>58404046
In might experience it might be a good idea to do this based on latest papers from well-established (i.e. frequently cited in previous works) authors.

They're likely to be onto something but there won't be a large code base derived from this particular awful bit of code they've shared yet.

If someone like me (or you if you decide to try doing it) doesn't pick it up in the way I mentioned what will usually happen is some group will want to use the method but find that the original code is crap, so some poor PhD student will be tasked with rewriting it fully or partially for that group's use.

Most of the time they won't even release the rewrite because it's not novel, publishable work, it's just wrangling the old work of someone else into usability. In fact many groups, each with their own poor PhD student, will end up rewriting the same thing, and none of them will release it.
>>
>>58404147
*in my experience

Sorry for typos and the like, it's been a long few nights due to grant proposal deadlines.
>>
>>58404037
>>58404046
>Scopus/Web of Knowledge
Is there a way to get into these sites without having your uni, etc be registered? Is google scholar good enough? I've never really used any of them

>>58404147
It might take me a while to think of something to search but I'll give it ago. I'm not really a high skill level coder or anything though. Also I feel like in a lot of cases I might have to learn a lot of other stuff just to implement a solution. I'll look into it though
>>
>>58404175
Didn't know scopus/WoK didnt work without uni acces, does it not? (Cant check, am on uni network).
But I never really used any of these, google scholar and sci-hub for most of my research.
WoK can be useful to quickly get an overview of state of the art papers for some subject, but as soon as you have read ~5 papers on a subjects you'll see which references are everywhere.

I made a C4.5+AdaBoost implementation in C++ once, it really got me thinking of how to translate mathematical concepts into datatypes and formulas into functions/routines.
>>
>>58404175
Most of the original algorithms stuff is open access btw, mathematicians are nice :)
>>
File: a6NVCsK.jpg (46KB, 1440x1232px) Image search: [Google]
a6NVCsK.jpg
46KB, 1440x1232px
Who wants a job?
>>
>>58404241
It seemed like you needed an account.

>>58404258
Oh well that's great then

I'm actually only just starting my second year of uni so I'm not that knowledgeable and have no idea what to search or what is in the scope of what I can do but it seems like it could be fun. I guess I'll search for algorithms and stuff firstly
>>
>>58404279
I bet I could get $75 out of this guy if I leverage my PhD in Computer Science.
>>
>>58404279

KEK. People are fucking delusional.

inb4 some pajeet actually does it for $50
>>
>>58404279
Is that per hour? Still very low.
>>
>>58404279
I've seen that offer before, but the camera-screenshot adds a new level of awful.
>>
Using gtk and the gtk2hs bindings for haskell, when I have a combobox with a reasonable amount of items (around 2000+ the issue arrises), my GUI becomes super unresponsive and uses a full core of my cpu. I would think for a combobox 2000 results isn't that many, or am I expecting too much?

Even once all the results have loaded and the combobox is not focused it's still using a full core.

I'm fairly sure it's not my code doing something bad and it's not the updating of the listbox as once it has loaded it still shits itself.


search :: Builder -> String -> MessageDialog -> MVar [ThreadId]
-> IO (Maybe String)
search builder entry _ _ = do
eitherResults <- find entry
case eitherResults of
Left msg -> return $ Just msg
Right results -> do
postGUIAsync $ updateResultsBox builder (map pack results)
return Nothing
>>
I want to make an android app to read a 70MB json file.
The guy who gave it to me said it's a "database".
It's gonna take a lot of time, because i have no idea how android apps are supposed to work.
>>
>>58404308
>Is that per hour?
No, that's $50 for the entire project.
>>
>>58404356
Sounds like less than an afternoon, depending on the details of what the app has to do.

Spinning up an android app and reading the JSON as objects and displaying that back somehow is easy as hell.
>>
>>58404279
>Build it
>Get $50
>Use it
>Make $50k/month on commodities market

I don't see what the problem is
>>
The world only needs C and Python.

Why do the other languages even exist?
>>
>>58403681
What do you do?
>>
>>58404404
>The world only needs C.
FTFY
>>
>>58404427
I drive
>>
>>58404462
I mean what do you use Haskell for?
>>
>>58404462
It's not safe to drive and read 4chan.
>>
>Go
>in charge of date and time formatting
>in Hugo
Fuck me. How the hell does this work? A model date and time and some shit, who designed this garbage?
>>
>>58404597
What's the problem?
>>
>>58404597
Rob Pike.
Certified own fart smeller and full blown homo sexual.
>>
File: 1476086297701.png (205KB, 418x350px) Image search: [Google]
1476086297701.png
205KB, 418x350px
ue4 was a mistake. currently fucking around on the answerhub and people have no basic understanding of vectors, affine transformations, quaternions and other important elements of 3d transformations.
>>
>>58404774
>not making your own engine with C, opengl and sdl/glfw
LOL
>>
does clang have equivalent extensions to these gcc extensions?

__builtin_ffs(int)

__builtin_clz(unsigned int)

__attribute__((optimize("-Os")))

__attribute__((noinline, noclone))

__attribute__((always_inline))
>>
>>58404715
>post.md
>date = "2007-01-15"
>template.html
>{{ .Date }}
Output:
>2007-01-15 00:00:00 +0000 UTC

It outputs the entire timestamp as Go stores it. You can't format it because it doesn't adhere to the standard timestamp that Go uses and there is no strftime. Whoever designed this shit needs to be shot, immediately.
>>
>>58404774
the commercial engines are dogshit-tier, any real studio will use an in-house engine if they are able to

if you have high requirements and the ability you should literally make your own engine
>>
>>58404814
write an alternative?
suggest a change?
fork it and maintain a fork with formats?
write a plugin that adds formatting if it's possible?

don't need to be angry about someone not considering all use cases that everyone will need, especially with a free and open source project
>>
>>58404814
>there is no strftime
What is docs?
https://golang.org/pkg/time/#Time.Format
>>
>>58404820
>if you have high requirements and the ability you should literally make your own engine
this is funny. do you have any idea how long it takes to even write a bunch of tools. not even speaking of the engine itself. if you are alone you better off killing yourself.
>>
>>58404869
You have never used Go, have you?

>>58404855
I'll just stop using this meme "code-artisan" language and switch to something sensible.
>>
>>58404801
>Clang supports GCC’s gnu attribute namespace. All GCC attributes which are accepted with the __attribute__((foo)) syntax are also accepted as [[gnu::foo]]. This only extends to attributes which are specified by GCC (see the list of GCC function attributes, GCC variable attributes, and GCC type attributes). As with the GCC implementation, these attributes must appertain to the declarator-id in a declaration, which means they must go either at the start of the declaration or immediately after the name being declared.
huh, this is baller af then
>>
>>58404893
>I'll just stop using this meme "code-artisan" language and switch to something sensible.

Fair enough, I wouldn't use Go either.
>>
>>58404893
I maintain a moderate size Go project.
>>
>>58404894
also
>Clang supports a number of builtin library functions with the same syntax as GCC, including things like __builtin_nan, __builtin_constant_p, __builtin_choose_expr, __builtin_types_compatible_p, __builtin_assume_aligned, __sync_fetch_and_add, etc. In addition to the GCC builtins, Clang supports a number of builtins that GCC does not, which are listed here.
>>
>>58404855
Dude, consider the retardation that went into that format.
> It looks like the standard ISO format
> It fucking ISN'T the standard ISO format
There is no fucking reason to allow such retardation.

Next you'll be telling me that Go only supports EBCDIC because UTF-8 is for faggots.

Formatted output is a basic requirement for programmers that needs to provide human readable output.
>>
>>58404870
>tfw writing an engine because my language doesn't have alternatives
At least its 2D
>>
I find it concerning that javascript has more lispy feel than clojure.
>>
>>58404943
Doesn't clojure lack tail calls?
>>
>>58404331
That's not a reasonable amount of items.
20 is a reasonable amount of items in a combobox.

If you need more, use a text field with search.
>>
>>58404937
it's a great learning experience and you will end up a much better, experienced programmer. but for one person its just way out of scope beyond the most simple things.
>>
>>58404937
Just learn C++/C#
>>
>>58404952
Yeah that's exactly what i am talking about.
>>
>>58404774
That's because it's a free engine, everyone wants to be a game developer.
>>
>>58404954
>for one person its just way out of scope beyond the most simple things.
sort of, but i think the complexity of game engines is overrated. they're mostly just importing your models and rendering them, handling input and such which is all really easy. obviously it's more than that but it's not some impossible godlike thing that you can never get close to.
>>
>>58404987
Yeah, most people in game-dev recommend writing an engine for yourself for a good reason.

I wrote a roguelike engine once, handling keyboard input and ascii output are simple, while game logic is well, not that hard to be honest. Writing map generators was the best part.
>>
>>58404376
Wonderful.
Jeah android studio already has some default activities and it looks like i just need to understand what i want to do.
>>
>>58404987
yeah sure for simple 2d things. write some simple sprite renderer, implement box2d and voila. but when you want to have some more advanced, 3d things you will start getting clogged down. just to write a decent map editor. my experience is that if you dont write an engine for a very specific use-case you are constantly working and expanding on your engine without ever getting to the actual game part. or maybe I just enjoyed working on it too much
>>
How should i handle requests with a PHP web form? should each submit buttons have its own isset() function that calls the queries i want?
>>
>>58405081
You shouldn't handle them with PHP no matter what anyway.
>>
/g/ cool kids club checklist

[x] hate OOP
[x] hate IDEs
[x] use only Haskell
[x] never produce actually useful software (this is important)
[x] wear knee socks
[x] tiling window manager
[x] dark-like-my-soul customized colors
[x] tiny keyboard with "artisan" caps
[x] hate popular Linux distributions (far too intelligent for them)
>>
>>58405081
By using a better language.
>>
>>58405103
cool kids code naked you fucking sissy.
sage
>>
>>58405103
[x] hate OOP (functional masterrace)
[x] hate IDEs (emacs is godly)
[] use only Haskell (I like lisps more)
[x] never produce actually useful software (this is important) (arguably)
[] wear knee socks
[] tiling window manager (kde or xfce, I don't care about wm)
[] dark-like-my-soul customized colors
[] tiny keyboard with "artisan" caps
[x] hate popular Linux distributions (far too intelligent for them) (ubuntus just suck)
>>
>>58405059
Well, I was saying that from a C#/Xamarin viewpoint, but I'm sure it's easy in Java too.
>>
New thread:

>>58405128
>>58405128
>>58405128
>>
>>58398911
That every programmer went trough this step.
>>
>>58405103
[x] hate OOP
[x] hate IDEs
[x] use only Haskell
[x] never produce actually useful software (this is important)
[] wear knee socks
[x] tiling window manager
[] dark-like-my-soul customized colors
[] tiny keyboard with "artisan" caps
[] hate popular Linux distributions (far too intelligent for them)
>>
>>58401755
>Turning
Look at him and laugh
Thread posts: 327
Thread images: 25


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.